From f0b0263e107feef75ea477b67600a0ce629e9c16 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Wed, 11 Oct 2023 21:07:17 +0100 Subject: [PATCH] add onAccept events --- evm/src/modules/TokenGateway.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/evm/src/modules/TokenGateway.sol b/evm/src/modules/TokenGateway.sol index 7eaf51110..d907e6811 100644 --- a/evm/src/modules/TokenGateway.sol +++ b/evm/src/modules/TokenGateway.sol @@ -22,6 +22,9 @@ contract TokenGateway is IIsmpModule { address private host; address private admin; + // User has received some assets, source chain & nonce + event AssetReceived(bytes source, uint256 nonce); + // restricts call to `dispatcher` modifier onlyIsmpHost() { if (msg.sender != host || msg.sender != admin) { @@ -59,6 +62,8 @@ contract TokenGateway is IIsmpModule { (address _from, address to, uint256 amount, address tokenContract) = abi.decode(request.body, (address, address, uint256, address)); IERC6160Ext20(tokenContract).mint(to, amount, ""); + + emit AssetReceived(request.source, request.nonce); } function onPostTimeout(PostRequest memory request) public onlyIsmpHost {