From b65ff0c4115af8139f9c563f2fd1dc839af0ebf4 Mon Sep 17 00:00:00 2001 From: SGiaccobasso Date: Fri, 20 Sep 2024 14:32:33 -0300 Subject: [PATCH] chore: add transfer received event --- contracts/interfaces/IAxelarGMPTransfer.sol | 43 ++++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/contracts/interfaces/IAxelarGMPTransfer.sol b/contracts/interfaces/IAxelarGMPTransfer.sol index 7e197548..974ab664 100644 --- a/contracts/interfaces/IAxelarGMPTransfer.sol +++ b/contracts/interfaces/IAxelarGMPTransfer.sol @@ -3,31 +3,44 @@ pragma solidity ^0.8.0; /** - * @title IAxelarGMPTransfer + * @title IInterchainTransferSent * @dev Interface for tracking asset value transfers using General Message Passing (GMP) calls in the Axelar Network. - * This interface defines an event that should be emitted when a GMP transfer occurs, + * This interface defines an event that should be emitted when a GMP transfer is sent, * allowing for standardized volume tracking across different implementations. */ -interface IAxelarGMPTransfer { +interface IInterchainTransferSent { /** - * @dev Emitted when a GMP transfer occurs, providing details for volume tracking. - * @param sender The address of the caller that initiated the transfer on the source chain. - * @param sourceChain The Axelar chain identifier of the source chain. + * @dev Emitted when a GMP transfer is sent, providing details for volume tracking. * @param destinationChain The Axelar chain identifier of the destination chain. - * @param destinationAddress The address of the contract on the destination chain that receives the transfer. - * @param recipientAddress The address of the final recipient of the transferred assets on the destination chain. - * @param tokenAddress The address of the token contract on the source chain. + * @param token The address of the token contract on the source chain. * @param amount The amount (in atomic units) of tokens transferred. - * @param decimals The number of decimal places for the token. */ - event AxelarGMPTransfer( - address indexed sender, - string sourceChain, + event InterchainTransferSent( string destinationChain, - string destinationContractAddress, + address token, + uint256 amount, + ); +} + +/** + * @title IInterchainTransferReceived + * @dev Interface for tracking asset value transfers using General Message Passing (GMP) calls in the Axelar Network. + * This interface defines an event that should be emitted when a GMP transfer is received, + * allowing for standardized volume tracking across different implementations. + */ +interface IInterchainTransferReceived { + /** + * @dev Emitted when an interchain transfer is received, providing details for volume tracking. + * @param sender The address of the caller that initiated the transfer on the source chain. + * @param sourceChain The Axelar chain identifier of the source chain. + * @param token The address of the token contract on the destination chain. + * @param amount The amount (in atomic units) of tokens received. + */ + event InterchainTransferReceived( + string sender, + string sourceChain, bytes recipient, address token, uint256 amount, - uint256 decimals ); }