Multichain
Search…
⌃K

Pay Fees on destination chain

Goerli (5):
AnycallConfig:0x7EA2be2df7BA6E54B1A9C70676f668455E329d29
BNB Testnet (97):
AnycallConfig:0x5E2FeA0D1D06cD52cF949f1732bcC440AdCa459E
Fantom Testnet (4002):
AnycallConfig: 0x470BFEE42A801Abb9a1492482d609fB84713d60F
Avalanche Fuji Testnet (43113):
AnycallConfig: 0x6aB6d61428fde76768D7b45D8BFeec19c6eF91A8
Fees are handled in anyCallConfig contracts in V7.
When you use flag 2 or 6 in anyCall, you're indicating fees should be paid on the destination chain. This is done often to make UX more smooth by abstracting fees away for end users. The fees would be the exact gas cost used by the tx.
You would call the following function on the above contract on the destination chian to add fees.
_account would be your contract on the destination chain. This is different from V6.
function deposit(address _account) external payable { executionBudget[_account] += msg.value; emit Deposit(_account, msg.value); }
Example:
If I want to call anyCall from goerli to bnb testnet and my destination contract address for bnb testnet is 0xmock000000000000000000000000000000000000
I would call deposit(0xmock000000000000000000000000000000000000 ) with the appropriate gas fees.
If the gas fee isn't enough when you call anycall, the tx wouldn't execute until you top up with enough gas fees. This status would be reflected in the api.