Skip to content

Instantly share code, notes, and snippets.

function submitBid(uint _price, uint _amount) bidInMarket(_price) external returns (bool) {
Bid memory b;
b.price = _price;
b.amount = _amount;
for(uint i = 0; i < Bids.length; i++) {
if(Bids[i].price > _price) {
Bid[] memory tempBids = new Bid[](Bids.length - i);
for(uint j = i; j < Bids.length; j++) {
tempBids[j-i] = Bids[j];
}