Skip to content

Commit

Permalink
Add referrer to Deposited event
Browse files Browse the repository at this point in the history
  • Loading branch information
robsecord committed Sep 10, 2020
1 parent d9b9c3e commit dbfdb1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions contracts/prize-pool/PrizePool.sol
Expand Up @@ -47,7 +47,8 @@ abstract contract PrizePool is OwnableUpgradeSafe, RelayRecipient, ReentrancyGua
address indexed operator,
address indexed to,
address indexed token,
uint256 amount
uint256 amount,
address referrer
);

/// @dev Event emitted when timelocked funds are re-deposited
Expand Down Expand Up @@ -315,7 +316,7 @@ abstract contract PrizePool is OwnableUpgradeSafe, RelayRecipient, ReentrancyGua
require(_token().transferFrom(operator, address(this), amount), "PrizePool/deposit-transfer-failed");
_supply(amount);

emit Deposited(operator, to, controlledToken, amount);
emit Deposited(operator, to, controlledToken, amount, referrer);
}

/// @notice Withdraw assets from the Prize Pool instantly. A fairness fee may be charged for an early exit.
Expand Down
2 changes: 1 addition & 1 deletion test/CompoundPrizePool.test.js
Expand Up @@ -176,7 +176,7 @@ describe('CompoundPrizePool', function() {
// Test depositTo
await expect(prizePool.depositTo(wallet2._address, amount, ticket.address, AddressZero))
.to.emit(prizePool, 'Deposited')
.withArgs(wallet._address, wallet2._address, ticket.address, amount)
.withArgs(wallet._address, wallet2._address, ticket.address, amount, AddressZero)

})

Expand Down

0 comments on commit dbfdb1f

Please sign in to comment.