diff --git a/package.json b/package.json index 032b581e..43b6515c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test:unit": "yarn test --ci __test__/unit" }, "dependencies": { - "@arbitrum/sdk": "^3.1.13-orbit-custom-fee-token.1", + "@arbitrum/sdk": "^3.2.0", "@types/jest": "^29.2.5", "@uniswap/token-lists": "^1.0.0-beta.33", "ajv": "^8.12.0", diff --git a/src/main.ts b/src/main.ts index 6d282bc7..317e72b9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,9 @@ #!/usr/bin/env node -import { addCustomChain } from '@arbitrum/sdk'; -import { Chain } from '@arbitrum/sdk/dist/lib/dataEntities/networks'; +import { + L2Network, + addCustomNetwork, + constants as arbConstants, +} from '@arbitrum/sdk'; import { yargsInstance } from './lib/options'; import * as dotenv from 'dotenv'; @@ -66,7 +69,7 @@ if (process.env.NODE_ENV !== 'test') { alltokenslist.parseAsync(); } -const xai: Chain = { +const xai: L2Network = { chainID: 660279, confirmPeriodBlocks: 45818, ethBridge: { @@ -81,6 +84,7 @@ const xai: Chain = { isCustom: true, name: 'Xai', partnerChainID: 42161, + partnerChainIDs: [], retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '0xb15A0826d65bE4c2fDd961b72636168ee70Af030', @@ -101,8 +105,10 @@ const xai: Chain = { nitroGenesisBlock: 0, nitroGenesisL1Block: 0, depositTimeout: 1800000, + blockTime: arbConstants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, }; -const rari: Chain = { + +const rari: L2Network = { chainID: 1380012617, confirmPeriodBlocks: 45818, ethBridge: { @@ -117,6 +123,7 @@ const rari: Chain = { isCustom: true, name: 'RARI Mainnet', partnerChainID: 42161, + partnerChainIDs: [], retryableLifetimeSeconds: 604800, tokenBridge: { l1CustomGateway: '0x8bE956aB42274056ef4471BEb211b33e258b7324', @@ -137,8 +144,10 @@ const rari: Chain = { nitroGenesisBlock: 0, nitroGenesisL1Block: 0, depositTimeout: 1800000, + blockTime: arbConstants.ARB_MINIMUM_BLOCK_TIME_IN_SECONDS, }; -addCustomChain({ customChain: xai }); -addCustomChain({ customChain: rari }); + +addCustomNetwork({ customL2Network: xai }); +addCustomNetwork({ customL2Network: rari }); export { update, yargsInstance }; diff --git a/yarn.lock b/yarn.lock index 04f17ab9..125a8797 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,10 +10,10 @@ "@jridgewell/gen-mapping" "^0.1.0" "@jridgewell/trace-mapping" "^0.3.9" -"@arbitrum/sdk@^3.1.13-orbit-custom-fee-token.1": - version "3.1.13-orbit-custom-fee-token.1" - resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.1.13-orbit-custom-fee-token.1.tgz#c10e26c71447eb8c9d0cb1c6efe26c57841b18b7" - integrity sha512-DkKk92Ga1lAsn0FZ+6/HAMcPHdmdAvCalZYfWhyHxTQXYdAWDA9Pz0gRi1KaOBPV2eQn7t64Cluz9Z3LU+7Bog== +"@arbitrum/sdk@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@arbitrum/sdk/-/sdk-3.2.0.tgz#9cc2d2d1df929c7a1702f366a444d1439d17dc08" + integrity sha512-Y8NyL1EgWE8SGRFFxtqYIedQzKe7pMS9P9j0iDQ3eL1xvOf0t0WKb8vcta0cP2TcAOOpRZ3TWKPVfpBtwMsXCg== dependencies: "@ethersproject/address" "^5.0.8" "@ethersproject/bignumber" "^5.1.1"