Last active
June 27, 2018 23:44
-
-
Save desaperados/02e5d7c1368c618d0d28581c89b211a8 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
// Copyright (C) 2018 AGPL | |
pragma solidity ^0.4.23; | |
contract DssEvents { | |
// Auction kickoff | |
event LogKick( | |
uint256 id, // bid id | |
address mom, // auction contract address | |
address lotKey, // lot address | |
address bidKey, // bid address | |
uint256 lot, // lot amount | |
uint256 bid, // bid amount | |
address guy, // high bidder (taker) | |
address gal, // receives auction income | |
uint48 tic, // bid expiry | |
uint48 end, // auction end | |
uint48 now, // event timestamp | |
address lad, // flip param - cdp holder | |
uint256 tab // flip param - outstanding debt | |
); | |
function emitKick( | |
uint256 id, | |
address lotKey, | |
address bidKey | |
) { | |
emit LogKick( | |
id, | |
this, | |
lotKey, | |
bidKey, | |
bids[id].lot, | |
bids[id].bid, | |
bids[id].guy, | |
bids[id].gal, // TODO - doesn't work for flop | |
bids[id].tic, | |
bids[id].end, | |
uint48(now), | |
0, // TODO - flip only | |
0 // TODO - flip only | |
); | |
} | |
// Tend phase bids | |
event LogTend( | |
uint256 id, // bid id | |
uint256 bid, // bid amount | |
address guy, // high bidder (taker) | |
uint48 tic, // bid expiry | |
uint48 now // event timestamp | |
); | |
function emitTend(uint256 id) { | |
emit LogTend( | |
id, | |
bids[id].bid, | |
bids[id].guy, | |
bids[id].tic, | |
uint48(now) | |
); | |
} | |
// Dent phase bids | |
event LogDent( | |
uint256 id, // bid id | |
uint256 lot, // lot amount | |
address guy, // high bidder (taker) | |
uint48 tic, // bid expiry | |
uint48 now // event timestamp | |
); | |
function emitDent(uint256 id) { | |
emit LogDent( | |
id, | |
bids[id].lot, | |
bids[id].guy, | |
bids[id].tic, | |
uint48(now) | |
); | |
} | |
// Auction settlement | |
event LogDeal(uint256 id, uint48 now); | |
function emitDeal(uint256 id) { | |
emit LogDeal(id, uint48(now)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment