Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit e16b3bc

Browse files
emit event upon receival of funds from relay
1 parent 311a4d6 commit e16b3bc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

contracts/IonicLiquidator.sol

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ contract IonicLiquidator is OwnableUpgradeable, ILiquidator, IUniswapV2Callee, I
3434
using AddressUpgradeable for address payable;
3535
using SafeERC20Upgradeable for IERC20Upgradeable;
3636

37+
event VaultReceivedETH(address sender, uint256 amount, bytes permissionKey);
38+
3739
/**
3840
* @dev W_NATIVE contract address.
3941
*/
@@ -227,7 +229,9 @@ contract IonicLiquidator is OwnableUpgradeable, ILiquidator, IUniswapV2Callee, I
227229
* @notice receiveAuctionProceedings function - receives native token from the express relay
228230
* You can use permission key to distribute the received funds to users who got liquidated, LPs, etc...
229231
*/
230-
function receiveAuctionProceedings(bytes calldata permissionKey) external payable {}
232+
function receiveAuctionProceedings(bytes calldata permissionKey) external payable {
233+
emit VaultReceivedETH(msg.sender, msg.value, permissionKey);
234+
}
231235

232236
function withdrawAll() external onlyOwner {
233237
uint256 balance = address(this).balance;

contracts/IonicUniV3Liquidator.sol

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ contract IonicUniV3Liquidator is OwnableUpgradeable, ILiquidator, IUniswapV3Flas
2929
using AddressUpgradeable for address payable;
3030
using SafeERC20Upgradeable for IERC20Upgradeable;
3131

32+
event VaultReceivedETH(address sender, uint256 amount, bytes permissionKey);
3233
/**
3334
* @dev Cached liquidator profit exchange source.
3435
* ERC20 token address or the zero address for NATIVE.
@@ -183,7 +184,9 @@ contract IonicUniV3Liquidator is OwnableUpgradeable, ILiquidator, IUniswapV3Flas
183184
* @notice receiveAuctionProceedings function - receives native token from the express relay
184185
* You can use permission key to distribute the received funds to users who got liquidated, LPs, etc...
185186
*/
186-
function receiveAuctionProceedings(bytes calldata permissionKey) external payable {}
187+
function receiveAuctionProceedings(bytes calldata permissionKey) external payable {
188+
emit VaultReceivedETH(msg.sender, msg.value, permissionKey);
189+
}
187190

188191
function withdrawAll() external onlyOwner {
189192
uint256 balance = address(this).balance;

0 commit comments

Comments
 (0)