Skip to content

Instantly share code, notes, and snippets.

@pabloruiz55
Last active November 14, 2017 01:25
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/7e06fe5b3cbfd21db45c0015c0b191c0 to your computer and use it in GitHub Desktop.
Save pabloruiz55/7e06fe5b3cbfd21db45c0015c0b191c0 to your computer and use it in GitHub Desktop.
// The auctioneer has to call this function while supplying the 1th to start the auction
function startAuction() public payable{
require(!auctionStarted);
require(msg.sender == auctioneer);
require(msg.value == (1 * 10 ** 18));
auctionedEth = msg.value;
auctionStarted = true;
auctionEndTime = now + (3600 * 24 * 7); // Ends 7 days after the deployment of the contract
E_AuctionStarted(msg.sender,now, auctionEndTime);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment