From cb3e445b4813a05ae43b77f9e93cdd3759ecb23a Mon Sep 17 00:00:00 2001 From: ahramy Date: Tue, 17 Sep 2024 07:51:30 -0700 Subject: [PATCH] fix: modified wrong data decoding in _checkPayloadAgainstGatewayData --- contracts/InterchainTokenService.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/InterchainTokenService.sol b/contracts/InterchainTokenService.sol index f96bc72a..1aa993b8 100644 --- a/contracts/InterchainTokenService.sol +++ b/contracts/InterchainTokenService.sol @@ -707,7 +707,7 @@ contract InterchainTokenService is * @param amount The amount for the call contract with token. */ function _checkPayloadAgainstGatewayData(bytes memory payload, string calldata tokenSymbol, uint256 amount) internal view { - (, bytes32 tokenId, , , uint256 amountInPayload) = abi.decode(payload, (uint256, bytes32, uint256, uint256, uint256)); + (, bytes32 tokenId, , , uint256 amountInPayload) = abi.decode(payload, (uint256, bytes32, bytes, bytes, uint256)); if (validTokenAddress(tokenId) != gateway.tokenAddresses(tokenSymbol) || amount != amountInPayload) revert InvalidGatewayTokenTransfer(tokenId, payload, tokenSymbol, amount);