Skip to content

Commit

Permalink
fix: modified wrong data decoding in _checkPayloadAgainstGatewayData
Browse files Browse the repository at this point in the history
  • Loading branch information
ahramy committed Sep 17, 2024
1 parent 2b07e70 commit cb3e445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contracts/InterchainTokenService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cb3e445

Please sign in to comment.