Example: cross-chain contract call
function setValue(uint256 value) external;bytes4 selector = bytes4(keccak256("setValue(uint256)"));
bytes memory callData = abi.encodePacked(selector, newValue);{
sourceChainId: "1", // Ethereum Mainnet
destinationChainId: "137", // Polygon Pos
inputs: [
// WETH
{ tokenType: "FUNGIBLE_TOKEN", tokenAddress: "0x0000000000000000000000004200000000000000000000000000000000000006", tokenId: "0", amount: "10000000" }
],
outputs: [],
callRecipient: "0x0...", // the contract address
callData: callData,
callValue: 0,
}Last updated
