diff --git a/contracts/0.8.9/SepoliaDepositAdapter.sol b/contracts/0.8.9/SepoliaDepositAdapter.sol index a6ee6d8d2..48e5fa863 100644 --- a/contracts/0.8.9/SepoliaDepositAdapter.sol +++ b/contracts/0.8.9/SepoliaDepositAdapter.sol @@ -43,6 +43,8 @@ contract SepoliaDepositAdapter is IDepositContract, Ownable { event EthRecovered(uint256 amount); + event BepoliaRecovered(uint256 amount); + error EthRecoverFailed(); error BepoliaRecoverFailed(); @@ -83,6 +85,7 @@ contract SepoliaDepositAdapter is IDepositContract, Ownable { if (!success) { revert BepoliaRecoverFailed(); } + emit BepoliaRecovered(bepoliaOwnTokens); } function deposit( diff --git a/test/0.8.9/sepolia-deposit-adapter.test.js b/test/0.8.9/sepolia-deposit-adapter.test.js index 869974698..8c23890f1 100644 --- a/test/0.8.9/sepolia-deposit-adapter.test.js +++ b/test/0.8.9/sepolia-deposit-adapter.test.js @@ -58,7 +58,8 @@ contract('SepoliaDepositAdapter', ([deployer]) => { log('bepoliaHolderEndBalance', bepoliaHolderEndBalance) // Recover Bepolia tokens - await depositAdapter.recoverBepolia() + const receipt = await depositAdapter.recoverBepolia() + assert.emits(receipt, 'BepoliaRecovered', { amount: BEPOLIA_TO_TRANSFER }) const bepoliaTokensOnAdapter = await bepoliaToken.balanceOf(adapterAddr) assert.equals(bepoliaTokensOnAdapter, 0)