Skip to content

Commit e4c64fa

Browse files
authored
Merge pull request #145 from Merit-Systems/shafu/add-token-to-reclaim-funds-event
Add token to reclaim funds event
2 parents 9a8b0f8 + a308b10 commit e4c64fa

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

interface/IEscrow.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ interface IEscrow {
6868
event ReclaimedRepoFunds(
6969
uint256 indexed repoId,
7070
uint256 indexed instanceId,
71-
address indexed admin,
71+
address indexed token,
72+
address admin,
7273
uint256 amount
7374
);
7475

src/Escrow.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ contract Escrow is Owned, IEscrow {
405405

406406
ERC20(token).safeTransfer(msg.sender, amount);
407407

408-
emit ReclaimedRepoFunds(repoId, instanceId, msg.sender, amount);
408+
emit ReclaimedRepoFunds(repoId, instanceId, token, msg.sender, amount);
409409
}
410410

411411
/* -------------------------------------------------------------------------- */

test/06_Claim.t.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ contract Claim_Test is Base_Test {
131131
uint256 initialFeeRecipientBalance = wETH.balanceOf(escrow.feeRecipient());
132132

133133
vm.expectEmit(true, true, true, true);
134-
emit Claimed(escrow.batchCount(), distributionId, recipient, expectedNetAmount, escrow.fee());
134+
emit Claimed(escrow.batchCount(), distributionId, recipient, expectedNetAmount, expectedFee);
135135

136136
vm.prank(recipient);
137137
escrow.claim(distributionIds, deadline, v, r, s, "");

test/07_ReclaimRepoFunds.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ contract ReclaimFund_Test is Base_Test {
9494
uint256 initialRepoBalance = escrow.getAccountBalance(REPO_ID, ACCOUNT_ID, address(wETH));
9595

9696
vm.expectEmit(true, true, true, true);
97-
emit ReclaimedRepoFunds(REPO_ID, ACCOUNT_ID, repoAdmin, reclaimAmount);
97+
emit ReclaimedRepoFunds(REPO_ID, ACCOUNT_ID, address(wETH), repoAdmin, reclaimAmount);
9898

9999
vm.prank(repoAdmin);
100100
escrow.reclaimRepoFunds(REPO_ID, ACCOUNT_ID, address(wETH), reclaimAmount);
@@ -677,7 +677,7 @@ contract ReclaimFund_Test is Base_Test {
677677
/* EVENTS */
678678
/* -------------------------------------------------------------------------- */
679679

680-
event ReclaimedRepoFunds(uint256 indexed repoId, uint256 indexed instanceId, address indexed admin, uint256 amount);
680+
event ReclaimedRepoFunds(uint256 indexed repoId, uint256 indexed instanceId, address indexed token, address admin, uint256 amount);
681681

682682
function _toArray(address addr) internal pure returns (address[] memory) {
683683
address[] memory arr = new address[](1);

0 commit comments

Comments
 (0)