Skip to content

Commit

Permalink
Merge pull request #104 from 1inch/chore/SC-1237-Rename-escrow-Withdr…
Browse files Browse the repository at this point in the history
…awal-event

Rename withdrawal event
  • Loading branch information
byshape authored Aug 12, 2024
2 parents ef6956a + b67b856 commit 7b8d3f7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion contracts/EscrowDst.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ contract EscrowDst is Escrow, IEscrowDst {
IERC20(token).safeTransfer(to, immutables.amount);
}
_ethTransfer(msg.sender, immutables.safetyDeposit);
emit Withdrawal(secret);
emit EscrowWithdrawal(secret);
}
}
2 changes: 1 addition & 1 deletion contracts/EscrowSrc.sol
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ contract EscrowSrc is Escrow, IEscrowSrc {
{
IERC20(immutables.token.get()).safeTransfer(target, immutables.amount);
_ethTransfer(msg.sender, immutables.safetyDeposit);
emit Withdrawal(secret);
emit EscrowWithdrawal(secret);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IBaseEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ interface IBaseEscrow {
* @notice Emitted on successful withdrawal.
* @param secret The secret that unlocks the escrow.
*/
event Withdrawal(bytes32 secret);
event EscrowWithdrawal(bytes32 secret);

error InvalidCaller();
error InvalidImmutables();
Expand Down
10 changes: 5 additions & 5 deletions test/unit/Escrow.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ contract EscrowTest is BaseSetup {
vm.warp(block.timestamp + srcTimelocks.withdrawal + 100);
vm.prank(bob.addr);
vm.expectEmit();
emit IBaseEscrow.Withdrawal(SECRET);
emit IBaseEscrow.EscrowWithdrawal(SECRET);
swapData.srcClone.withdraw(SECRET, swapData.immutables);

assertEq(bob.addr.balance, balanceBobNative + SRC_SAFETY_DEPOSIT);
Expand Down Expand Up @@ -424,7 +424,7 @@ contract EscrowTest is BaseSetup {
// withdraw
vm.warp(block.timestamp + dstTimelocks.withdrawal + 10);
vm.expectEmit();
emit IBaseEscrow.Withdrawal(SECRET);
emit IBaseEscrow.EscrowWithdrawal(SECRET);
dstClone.withdraw(SECRET, immutables);

assertEq(dai.balanceOf(alice.addr), balanceAlice + TAKING_AMOUNT);
Expand All @@ -449,7 +449,7 @@ contract EscrowTest is BaseSetup {
// withdraw
vm.warp(block.timestamp + dstTimelocks.withdrawal + 10);
vm.expectEmit();
emit IBaseEscrow.Withdrawal(SECRET);
emit IBaseEscrow.EscrowWithdrawal(SECRET);
dstClone.withdraw(SECRET, immutables);

assertEq(alice.addr.balance, balanceAlice + TAKING_AMOUNT);
Expand Down Expand Up @@ -658,7 +658,7 @@ contract EscrowTest is BaseSetup {
// withdraw
vm.warp(block.timestamp + dstTimelocks.publicWithdrawal + 100);
vm.expectEmit();
emit IBaseEscrow.Withdrawal(SECRET);
emit IBaseEscrow.EscrowWithdrawal(SECRET);
IEscrowDst(address(dstClone)).publicWithdraw(SECRET, immutables);

assertEq(dai.balanceOf(alice.addr), balanceAlice + TAKING_AMOUNT);
Expand All @@ -683,7 +683,7 @@ contract EscrowTest is BaseSetup {
// withdraw
vm.warp(block.timestamp + dstTimelocks.publicWithdrawal + 100);
vm.expectEmit();
emit IBaseEscrow.Withdrawal(SECRET);
emit IBaseEscrow.EscrowWithdrawal(SECRET);
dstClone.withdraw(SECRET, immutables);

assertEq(dai.balanceOf(alice.addr), balanceAlice + TAKING_AMOUNT);
Expand Down

0 comments on commit 7b8d3f7

Please sign in to comment.