Releases: OffchainLabs/arbitrum-sdk
v3.3.1
v3.3.0
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
- In case of a chain that uses ETH as its gas token, this is either
Asset Bridger
- Added a new property
nativeToken?: string
which is read from theL2Network
object
EthBridger
- Added
getApproveGasTokenRequest
andapproveGasToken
for approving the gas token to be spent by the Inbox
Erc20Bridger
- Added
getApproveGasTokenRequest
andapproveGasToken
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
Full Changelog: v3.2.0...v3.3.0
v3.2.0
What's Changed
This release introduces support for L3s, along with a couple other useful features and improvements. 🎉
L3 Support
Added by @brtkx, @douglance and @spsjvc in #379.
AssetBridger, InboxTools
- Updated type of
l1Network
property fromL1Network
toL1Network | L2Network
, as the referenced parent chain can be anL2Network
in case of an L3
Constants
- Added
ARB_MINIMUM_BLOCK_TIME_IN_SECONDS
which represents the minimum block time for an Arbitrum chain
L2Network
- Added
blockTime: number
to make more consistent withL1Network
- Represents the minimum block time for the chain
- When registering a custom Arbitrum chain, use the
ARB_MINIMUM_BLOCK_TIME_IN_SECONDS
constant
- Added
partnerChainIDs: number[]
to make more consistent withL1Network
- Represents the ids of the children chains (chains that settle to this chain)
- When registering a custom L3 Arbitrum chain, you can leave this empty
- When registering a custom L2 Arbitrum chain, you can leave this empty, unless there's a custom L3 that settles to this chain
Registering a custom L3 works the same way as registering a custom L2:
const myL3Network: L2Network = { ... }
addCustomNetwork({ customL2Network: myL3Network })
L2ToL1Message
- Updated
waitUntilReadyToExecute
to return status instead ofvoid
(@DZGoldman in #381, #386) - Updated
getOutboxProof
to useNodeInterface.l2BlockRangeForL1
if available (@brtkx in #404)- Should make looking up proofs significantly faster
Misc
- Added support for Node.js v20 (@douglance in #370)
- Fixed issue with token bridge deployment script (@ImJeremyHe in #374)
- Updated network addresses to checksum addresses (@Jason-W123 in #382)
- Updated docs for running the Nitro testnode (@dewanshparashar in #383)
New Contributors
- @ImJeremyHe made their first contribution in #374
- @Jason-W123 made their first contribution in #382
Full Changelog: v3.1.13...v3.2.0
v3.1.12
What's Changed
L2ToL1MessageNitro
Misc
- Bump
chai
version to fix a security vulnerability by @douglance in #354
New Contributors
- @douglance made their first contribution in #354
Full Changelog: v3.1.11...v3.1.12
v3.1.11
What's Changed
Misc
- Exported
ArbitrumProvider
by @DZGoldman in #333
Full Changelog: v3.1.10...v3.1.11
v3.1.10
v3.1.10-beta.0
What's Changed
- feat: add ParentChain and Chain to support Orbit chains @bartlomiej94 in #312
Full Changelog: v3.1.8...v3.1.10-beta.0