From 25889f298ef1672add75d9394018003546b23531 Mon Sep 17 00:00:00 2001 From: ahramy Date: Sat, 9 Nov 2024 12:02:49 -0800 Subject: [PATCH] updated --- contracts/InterchainTokenService.sol | 2 +- contracts/interfaces/IInterchainTokenService.sol | 2 +- test/InterchainTokenService.js | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contracts/InterchainTokenService.sol b/contracts/InterchainTokenService.sol index 7bd5f569..efd337cf 100644 --- a/contracts/InterchainTokenService.sol +++ b/contracts/InterchainTokenService.sol @@ -513,7 +513,7 @@ contract InterchainTokenService is uint256 amount, bytes memory data, uint256 gasValue - ) external whenNotPaused { + ) external payable whenNotPaused { if (data.length == 0) revert EmptyData(); amount = _takeToken(tokenId, msg.sender, amount, false); diff --git a/contracts/interfaces/IInterchainTokenService.sol b/contracts/interfaces/IInterchainTokenService.sol index f3b3c363..54dadff1 100644 --- a/contracts/interfaces/IInterchainTokenService.sol +++ b/contracts/interfaces/IInterchainTokenService.sol @@ -235,7 +235,7 @@ interface IInterchainTokenService is uint256 amount, bytes calldata data, uint256 gasValue - ) external; + ) external payable; /** * @notice Sets the flow limits for multiple tokens. diff --git a/test/InterchainTokenService.js b/test/InterchainTokenService.js index dfdb5556..bf3a7945 100644 --- a/test/InterchainTokenService.js +++ b/test/InterchainTokenService.js @@ -1687,7 +1687,9 @@ describe('Interchain Token Service', () => { await expect( reportGas( - service.callContractWithInterchainToken(tokenId, destinationChain, destAddress, amount, data, 0), + service.callContractWithInterchainToken(tokenId, destinationChain, destAddress, amount, data, 0, { + value: gasValue, + }), `Call service.callContractWithInterchainToken ${type}`, ), )