Skip to content

Commit

Permalink
Indexed event caller (#546)
Browse files Browse the repository at this point in the history
* Make locker event param indexed

*  Make bidder event param indexed
  • Loading branch information
ben-kaufman authored and orenyodfat committed Oct 2, 2018
1 parent bba1a43 commit 2e6d233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/schemes/Auction4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract Auction4Reputation is Ownable {
using RealMath for int216;
using RealMath for int256;

event Bid(uint indexed _auctionId, uint _amount, address _bidder);
event Bid(address indexed _bidder, uint indexed _auctionId, uint _amount);
event Redeem(uint indexed _auctionId, address indexed _beneficiary, uint _amount);

struct Auction {
Expand Down Expand Up @@ -115,7 +115,7 @@ contract Auction4Reputation is Ownable {
Auction storage auction = auctions[auctionId];
auction.totalBid = auction.totalBid.add(_amount);
auction.bids[msg.sender] = auction.bids[msg.sender].add(_amount);
emit Bid(auctionId, _amount, msg.sender);
emit Bid(msg.sender, auctionId, _amount);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions contracts/schemes/Locking4Reputation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract Locking4Reputation {

event Redeem(bytes32 indexed _lockingId, address indexed _beneficiary, uint _amount);
event Release(bytes32 indexed _lockingId, address indexed _beneficiary, uint _amount);
event Lock(bytes32 indexed _lockingId, uint _amount, uint _period, address _locker);
event Lock(address indexed _locker, bytes32 indexed _lockingId, uint _amount, uint _period);

struct Locker {
uint amount;
Expand Down Expand Up @@ -109,7 +109,7 @@ contract Locking4Reputation {
scores[_locker] = scores[_locker].add(_period.mul(_amount));
totalScore = totalScore.add(scores[_locker]);

emit Lock(lockingId, _amount, _period, _locker);
emit Lock(_locker, lockingId, _amount, _period);
}

/**
Expand Down

0 comments on commit 2e6d233

Please sign in to comment.