makerdao / token-auction

Continuous Splitting Token Auction
GNU Affero General Public License v3.0
21 stars 21 forks source link

Put bid price info in Bid event #41

Closed gl367 closed 8 years ago

gl367 commented 8 years ago

Changed the Bid event to include the bid price info, so that listeners in a harness language can get updates on the bid price. For example, an auction arbitrage bot needs the price info of bids in order to operate.

All 167 tests pass. Note that 4 tests were minimally altered, just by putting the bid price into the Bid event.

The documentation has also been updated to reflect this change.

rainbreak commented 8 years ago

Thanks.

@freekp: any comments? Anything extra you'd like?

rainbreak commented 8 years ago

@gl367: do you still need this?

@freekp: any other changes that'd be useful to you?

freekp commented 8 years ago

@rainbeam yeah looks great. To show the bid history, would we also need to add the account of the bidder to the Bid event?

gl367 commented 8 years ago

this change is not necessary -- you can get the price info by calling readAuctionlet(auction_id) in the callback of the event.

freekp commented 8 years ago

Does that also work for showing a history of the bids (last 5 for example)? If we check for the past 5 bid events via https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-events and we then call readauctionlet in the callback of each event will that give use the auctionlet at that time of the event?