Releases: OffchainLabs/arbitrum-orbit-sdk
v0.21.2
What's Changed
Support for non-18 decimal custom gas tokens
This release adds support for non-18 decimal custom gas tokens. Added by @chrstph-dvx and @spsjvc in #216 and #219.
The necessary scaling is done in the background for you. However, if you need to do any scaling yourself (e.g. for approvals), we've provided the following utilities - scaleFrom18DecimalsToNativeTokenDecimals
and scaleFromNativeTokenDecimalsTo18Decimals
.
This release also bumps the version of @arbitrum/sdk
to v4.0.2.
Other
- Added
prepareArbitrumNetwork
for easier compatibility with@arbitrum/sdk
(@chrstph-dvx in #221) - Exported several retryable fee utils (@spsjvc in #220):
createRollupGetRetryablesFees
createRollupGetRetryablesFeesWithDefaults
createRollupDefaultRetryablesFees
createTokenBridgeDefaultRetryablesFees
- Exported several ERC-20 utils (@spsjvc in #224):
fetchAllowance
fetchDecimals
Full Changelog: v0.21.1...v0.21.2
v0.21.1
v0.21.0
What's Changed
Custom Parent Chains
This release adds in functionality to use custom parent chains which are not supported by default. Added by @spsjvc in #181.
Register a custom parent chain by calling registerCustomParentChain
with the custom parent chain object as the argument.
The object needs to be a viem Chain
with the RollupCreator and TokenBridgeCreator contract addresses filled in:
registerCustomParentChain({
id: 123,
name: `My Chain`,
network: `my-chain`,
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18
},
rpcUrls: {
public: {
http: ['http://localhost:3000'] },
default: { http: ['http://localhost:3000']
},
},
// the following contract addresses have to be provided
contracts: {
rollupCreator: { address: '0x1000000000000000000000000000000000000000' },
tokenBridgeCreator: { address: '0x2000000000000000000000000000000000000000' },
},
})
Note that if you're using a custom parent chain, defaults for certain functions can't be provided, so you'll have to specify those values:
createRollupPrepareDeploymentParamsConfig
params.confirmPeriodBlocks
will be requiredparams.sequencerInboxMaxTimeVariation
will be required
createRollupPrepareTransactionRequest
andcreateRollup
params.maxDataSize
will be required
prepareNodeConfig
parentChainIsArbitrum
will be required
Other
- Updated
createRollupFetchTransactionHash
to allowfromBlock
override (@spsjvc in #213) - Updated long-range log query handling (@chrstph-dvx in #208)
- Long-range log queries will be split into several in case the RPC has a limit (will take longer but won't fail with an error)
Full Changelog: v0.20.1...v0.21.0
v0.20.1
v0.20.0
What's Changed
- Updated the default ArbOS version to ArbOS 32 (@spsjvc in #162)
- Updated retryable fee estimation, which should make things more stable in case of parent base fee spikes
- Updated
createTokenBridge
andcreateTokenBridgePrepareTransactionRequest
to throw with a custom error in case the token bridge contracts are already deployed for the Rollup (@chrstph-dvx in #186, @spsjvc in #201, #202)- Added a new function
isTokenBridgeDeployed
to check for this scenario - Previously, the functions would throw while waiting for retryables to execute
- Added a new function
- Updated node params needed in the example for fast withdrawals (@TucksonDev in #183)
Full Changelog: v0.19.0...v0.20.0
v0.20.0-beta.0
What's Changed
Register a custom parent chain by calling registerCustomParentChain
with the custom parent chain object as the argument. The object needs to be a viem Chain
object with the RollupCreator and TokenBridgeCreator contract addresses filled out:
registerCustomParentChain({
id: 123,
name: `My Chain`,
network: `my-chain`,
nativeCurrency: {
name: 'Ether',
symbol: 'ETH',
decimals: 18
},
rpcUrls: {
public: {
http: ['http://localhost:3000'] },
default: { http: ['http://localhost:3000']
},
},
// the following contract addresses have to be provided
contracts: {
rollupCreator: { address: '0x1000000000000000000000000000000000000000' },
tokenBridgeCreator: { address: '0x2000000000000000000000000000000000000000' },
},
})
Note that if you're using a custom parent chain, defaults for certain functions can't be provided, so you'll have to specify those values:
createRollupPrepareDeploymentParamsConfig
params.confirmPeriodBlocks
will be requiredparams.sequencerInboxMaxTimeVariation
will be required
createRollupPrepareTransactionRequest
andcreateRollup
params.maxDataSize
will be required
prepareNodeConfig
parentChainIsArbitrum
will be required
v0.19.0
What's Changed
- Fixed an issue with the
setup-fast-withdrawal
example, where the fast confirmer wasn't in the validator list (@TucksonDev in #171) - Fixed an issue with
createRollupPrepareTransaction
, making it work with RollupCreator v1.1 (@spsjvc in #173) - Added new getters and transaction request builders for SequencerInbox (@chrstph-dvx in #114, #117, #176, #178, #182)
- New getters
getMaxTimeVariation
isBatchPoster
isValidKeysetHash
- New transaction request builders
buildSetMaxTimeVariation
buildSetIsBatchPoster
,buildEnableBatchPoster
andbuildDisableBatchPoster
buildSetValidKeyset
andbuildInvalidateKeysetHash
- New getters
Full Changelog: v0.18.0...v0.19.0
v0.18.0
What's Changed
Breaking Changes
- Updated Rollup deployment utilities to use RollupCreator v2.1 (@spsjvc in #153)
- Parameter
batchPoster: Address
is changed tobatchPosters: Address[]
- Parameter
batchPosterManager
is added as optional- Responsible for managing active batch posters, optional as these actions can also be taken by the owner
- Parameter
const txRequest = await createRollupPrepareTransactionRequest({
params: {
config,
validators: [validator],
- batchPoster,
+ batchPosters: [batchPoster],
+ batchPosterManager,
},
account,
publicClient,
});
- Updated contract ABIs (@spsjvc in #160, #168)
- Updated import paths so contracts are grouped by contract name and version
- Updated the ABIs for Nitro contracts from v1.1 to v2.1, keeping v1.1 for backwards compatibility
- import { arbOwner, rollupAdminLogic, sequencerInbox } from '@arbitrum/orbit-sdk/contracts';
+ import { arbOwnerABI, arbOwnerAddress } from '@arbitrum/orbit-sdk/contracts/ArbOwner';
+ import { rollupABI } from '@arbitrum/orbit-sdk/contracts/Rollup';
+ import { sequencerInboxABI } from '@arbitrum/orbit-sdk/contracts/SequencerInbox';
// import latest version
import { rollupCreatorABI } from '@arbitrum/orbit-sdk/contracts/RollupCreator';
// import specific versions
import { rollupCreatorABI } from '@arbitrum/orbit-sdk/contracts/RollupCreator/v1.1';
import { rollupCreatorABI } from '@arbitrum/orbit-sdk/contracts/RollupCreator/v2.1';
- Removed
createRollupPrepareConfig
which was marked as deprecated since v0.15.0 (@spsjvc in #163)- It's replaced by
createRollupPrepareDeploymentParamsConfig
, keeping almost exactly the same API, other than requiring aPublicClient
of the parent chain in order to provide better defaults
- It's replaced by
- const config = createRollupPrepareConfig({
+ const config = createRollupPrepareDeploymentParamsConfig(parentPublicClient, {
chainId,
owner,
chainConfig,
});
- Removed some configurable parameters in
prepareChainConfig
(@spsjvc in #169)- Parameters that should not be changed can no longer be changed
- Parameters that can still be changed are:
chainId
(required)arbitrum.InitialChainOwner
(required)arbitrum.InitialArbOSVersion
arbitrum.DataAvailabilityCommittee
arbitrum.MaxCodeSize
arbitrum.MaxInitCodeSize
Other Changes
- Added AEP fee routing utilities with examples (@TucksonDev in #80)
- Added
feeRouterDeployChildToParentRouter
andfeeRouterDeployRewardDistributor
functions for contract deployment
- Added
- Added utilities for dealing with Consensus releases and WASM module roots (@spsjvc in #155, #166, #167)
- Added
isKnownWasmModuleRoot
to check if the provided value matches a known WASM module root - Added
getConsensusReleaseByVersion
andgetConsensusReleaseByWasmModuleRoot
for fetching Consensus releases
- Added
- Updated the default WASM module root to Consensus v31 (@spsjvc in #164)
- Updated Token Bridge Contracts refs to v1.2.2 (@spsjvc in #165)
Full Changelog: v0.17.2...v0.18.0
v0.17.2
v0.17.1
What's Changed
- Added an example script for enabling fast withdrawals (@TucksonDev in #143)
- Updated version of the
@arbitrum/sdk
dependency tov4.0.0
(@spsjvc in #151)
Full Changelog: v0.17.0...v0.17.1