Open skosito opened 3 months ago
In cases where we want to invoke an interface (there are a few of them across all the contracts), we can call them in a controlled way, such as in:
IZRC20 zrc20token = IZRC20(zrc20); try zrc20token.withdrawGasFee() returns (address gasZRC20, uint256 gasFee) { if (gasZRC20 == address(0)) revert InvalidZRC20; if (!zrc20token.transferFrom(msg.sender, FUNGIBLE_MODULE_ADDRESS, gasFee)) { revert GasFeeTransferFailed(); } } catch { revert SomeErrorEvent(); }
_Originally posted by @fbac in https://github.com/zeta-chain/protocol-contracts/pull/162#discussion_r1663924981_
_Originally posted by @fbac in https://github.com/zeta-chain/protocol-contracts/pull/162#discussion_r1663924981_