Last active
January 17, 2022 07:53
-
-
Save ac12644/8a974202e310f98f749f46ff9078c995 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract AuctionRepository { | |
// Array with all auctions | |
Auction[] public auctions; | |
// Mapping from auction index to user bids | |
mapping(uint256 => Bid[]) public auctionBids; | |
// Mapping from owner to a list of owned auctions | |
mapping(address => uint[]) public auctionOwner; | |
// Bid struct to hold bidder and amount | |
struct Bid { | |
address from; | |
uint256 amount; | |
} | |
// Auction struct which holds all the required info | |
struct Auction { | |
string name; | |
uint256 blockDeadline; | |
uint256 startPrice; | |
string metadata; | |
uint256 deedId; | |
address deedRepositoryAddress; | |
address owner; | |
bool active; | |
bool finalized; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment