Skip to content

v3.3.0

Compare
Choose a tag to compare
@spsjvc spsjvc released this 14 Feb 11:29
· 163 commits to main since this release
4c0d43a

What's Changed

Custom Gas Token Support

This release adds custom gas token support. Added by @spsjvc, @douglance and @godzillaba in #310.

L2Network

  • Added a new property nativeToken?: string
    • In case of a chain that uses ETH as its gas token, this is either undefined or the zero address
    • In case of a chain that uses a custom gas token, this is the address of said token on the parent chain

Asset Bridger

  • Added a new property nativeToken?: string which is read from the L2Network object

EthBridger

  • Added getApproveGasTokenRequest and approveGasToken for approving the gas token to be spent by the Inbox

Erc20Bridger

  • Added getApproveGasTokenRequest and approveGasToken for approving the gas token to be spent by the relevant Gateway

The only extra thing you have to do for custom gas token chains is to make sure to call approveGasToken before executing a deposit, so that the Inbox (in case of a native token deposit) or the relevant Gateway (in case of a token deposit) have allowance to spend your tokens in order to pay for fees. The rest of your code can stay the same, as everything else will be handled internally by the SDK.

Erc20Bridger

  • Updated to call outboundTransferCustomRefund when using a different refund address (@brtkx in #285)

Full Changelog: v3.2.0...v3.3.0