zeta-chain / protocol-contracts

Protocol contracts implementing the core logic of the protocol, deployed on ZetaChain and on connected chains
MIT License
70 stars 58 forks source link

GatewayZEVM: adding `CallOptions` containing a GasLimit value for `call` and `withdrawAndCall` functions #307

Closed lumtis closed 3 months ago

lumtis commented 3 months ago

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: