Skip to main content

Migrating from v3 to v4

Arbitrum v4 introduces a number of changes to the Arbitrum SDK. This document outlines the changes and provides guidance on how to migrate your existing v3 code to v4.

Breaking Changes

With the launch of Orbit chains from Offchain Labs, the Arbitrum SDK has been updated to support the new chains. This has resulted in a number of breaking changes to the SDK. The following is a list of the most significant changes:

Renaming L1/L2 to Parent/Child

The terms L1 and L2 have been replaced with Parent and Child to better reflect the new Orbit chain architecture. The Arbitrum SDK has been updated to reflect this change.

v3 Namev4 Name
L2TransactionReceiptChildTransactionReceipt
L1ContractTransactionParentContractTransaction
L1TransactionReceiptParentTransactionReceipt
L1ToL2MessageParentToChildMessage
L1ToL2MessageWriterParentToChildMessageWriter
L1ToL2MessageReaderParentToChildMessageReader
L1ToL2MessageStatusParentToChildMessageStatus
L1ToL2MessageReaderClassicParentToChildMessageReaderClassic
L1ToL2MessageWriterParentToChildMessageWriter
L1ToL2MessageStatusParentToChildMessageStatus
L1ToL2MessageGasEstimatorParentToChildMessageGasEstimator
L2ToL1MessageStatusChildToParentMessageStatus
L2NetworkArbitrumNetwork
getL2NetworkgetArbitrumNetwork
addCustomNetworkregisterCustomArbitrumNetwork

Asset Bridger Class Methods

The AssetBridger class methods have been renamed to reflect the new Parent/Child terminology.

v3 Namev4 Name
checkL1NetworkcheckParentChain
checkL2NetworkcheckChildChain

Erc20Bridger Class Methods

The Erc20Bridger class methods have been renamed to reflect the new Parent/Child terminology.

v3 Namev4 Name
````

Removing L1 network

The Arbitrum SDK no longer requires the L1 network to be specified. The Arbitrum SDK now only requires the Child network to be specified.