I am making a test biding system in solidity, and I have a problem. I want to make a list of bids for each tokenId.
struct Bid {
bool hasBid;
uint tokenId1;
address bidder;
uint value;
}
mapping (uint => Bid) public Bids;
function enterBidForNFT(uint Index, value) public virtual {
Bids[Index] = Bid(true, Index, msg.sender, value);
}
There are implementations where only the highest bid is stored, but I want all of the bids to be available and their corresponding addresses.
Any idea?