Calling arbitrary functions on external chains create the following issue: gas limit can vary unlike the fixed value we use to have.
We can add GasLimit as an option for call and withdrawAndCall functions on the gateway.
Same as the RevertOption, the value is simply emitted in the event, then read and used in the protocol.
[EDIT] Actually we currently pay the gas fee directly in the smart contract and we should keep this behavior for simplicity.
Would therefore requires the following changes:
adding method withdrawGasFeeWithGasLimit() to ZRC20 to use it instead of GAS_LIMIT
_withdrawZRC20 use this if the gas limit option is specify (otherwise use default one)
Calling arbitrary functions on external chains create the following issue: gas limit can vary unlike the fixed value we use to have.
We can add
GasLimit
as an option for call and withdrawAndCall functions on the gateway.Same as the RevertOption, the value is simply emitted in the event, then read and used in the protocol.
[EDIT] Actually we currently pay the gas fee directly in the smart contract and we should keep this behavior for simplicity. Would therefore requires the following changes:
withdrawGasFeeWithGasLimit()
toZRC20
to use it instead ofGAS_LIMIT
_withdrawZRC20
use this if the gas limit option is specify (otherwise use default one)