Skip to content

Instantly share code, notes, and snippets.

@pabloruiz55
Last active November 13, 2017 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pabloruiz55/447eae1a5f09e48e188882dba68b4593 to your computer and use it in GitHub Desktop.
Save pabloruiz55/447eae1a5f09e48e188882dba68b4593 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.18;
contract EtherAuction {
// The address that deploys this auction and volunteers 1 eth as price.
address public auctioneer;
uint public auctionedEth = 0;
uint public highestBid = 0;
uint public secondHighestBid = 0;
address public highestBidder;
address public secondHighestBidder;
uint public latestBidTime = 0;
uint public auctionEndTime;
mapping (address => uint) public balances;
bool public auctionStarted = false;
bool public auctionFinalized = false;
event E_AuctionStarted(address _auctioneer, uint _auctionStart, uint _auctionEnd);
event E_Bid(address _highestBidder, uint _highestBid);
event E_AuctionFinished(address _highestBidder,uint _highestBid,address _secondHighestBidder,uint _secondHighestBid,uint _auctionEndTime);
function EtherAuction(){
auctioneer = msg.sender;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment