Commit ed1a47ad authored by BHAVYA CHOUDHARY's avatar BHAVYA CHOUDHARY

Base Class for Auctions

parents
pragma solidity ^0.4.4;
contract DAuction {
uint256 minimumPrice;
uint256 biddingBlocksNum;
address judgeAddr;
uint256 startBlockNum;
address creator;
address highestBidder;
uint256 highestBid;
// constructor
function DAuction(uint256 reservePrice, uint256 biddingTimePeriod, address judgeAddress) {
minimumPrice = reservePrice;
blocksNum = biddingTimePeriod;
judgeAddr = judgeAddress;
startBlockNum = block.number;
creator = msg.sender;
}
// Three types of bidding functions. If not overriden, these generate errors
function bid() biddingOpen payable {
throw;
}
function commitBid(bytes32 bidCommitment) biddingOpen payable returns(bool) {
throw;
}
function revealBid(uint256 nonce) payable returns(address highestBidder) {
throw;
}
function finalize() auctionOver {
throw;
}
function refund(uint256 refundAmount) auctionOver judgeOnly {
throw;
}
modifier biddingOpen {
throw;
_;
}
modifier auctionOver {
throw;
_;
}
modifier judgeOnly {
require(msg.sender == judgeAddress);
_;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment