Comment on page
How to integrate anyCall V7?
- Mainnet AnyCall Contracts:
Available Chains: Ethereum, Optimism, BNB Chain, Fantom, Polygon, Arbitrum, Avalanche.
Contract Address: 0x8efd012977DD5C97E959b9e48c04eE5fcd604374
- Testnet AnyCall Contracts:
Goerli (5): 0x965f84D915a9eFa2dD81b653e3AE736555d945f4
BNB Testnet (97): 0xcBd52F7E99eeFd9cD281Ea84f3D903906BB677EC
Fantom Testnet (4002): 0xfCea2c562844A7D385a7CB7d5a79cfEE0B673D99
Avalanche Fuji Testnet (43113): 0x461d52769884ca6235b685ef2040f47d30c94eb5
You can also lookup your tx with our explorer and api.
- 1.Sender Contract: Your sender contract needs to call the method
anyCallon the official anyCall contract.
- 2.Receiver Contract: A method named
anyExecuteneeds to exist on your
_tocontract address. This is needed because
anyExec(Our deployed anyCall Contract) will call
anyExecuteon your receiver contract.
- 3.Your contract needs to be payable to allow refund of excess fees.
function anyCall( address _to, bytes calldata _data, uint256 _toChainID, uint256 _flags, bytes calldata )
The destination chain would call
anyExecutefunction on the
_datapassed in the function. And you can customize what you do with such
function anyExecute(bytes calldata data) external override onlyExecutor returns (bool success, bytes memory result)
As stated above,
AnyCallExecutorwill make the final execution to your destination contract as a sandbox.
The address of this executor contract is stored in the main anycall contract. It can be accessed with an interface function like below.
function executor() external view returns (address executor);
The executor should then be saved in your contract constructor