From ab3d94af4784f4309342e85f3ca0bf4472953d08 Mon Sep 17 00:00:00 2001 From: nikhil kumar Date: Thu, 25 Jun 2026 17:35:13 +0530 Subject: [PATCH 1/3] ft: addong arc testnet --- __tests__/constants.test.ts | 67 +++++++++++++++++++++++++++++++++++++ lib/constants/index.ts | 38 ++++++++++++++++++++- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 __tests__/constants.test.ts diff --git a/__tests__/constants.test.ts b/__tests__/constants.test.ts new file mode 100644 index 0000000..976707f --- /dev/null +++ b/__tests__/constants.test.ts @@ -0,0 +1,67 @@ +import { + NETWORK_NAME_TO_CHAIN_ID, + NetworkNames, + Networks, + SupportedNetworks, + arcTestnet, +} from '../lib/constants'; +import { + CHAIN_ID_TO_NETWORK_NAME, + getChainFromId, + getNetworkConfig, +} from '../lib/utils'; + +describe('Arc Testnet network support', () => { + const arcTestnetChainId = 5042002; + + it('exposes Arc Testnet through supported network mappings', () => { + expect(SupportedNetworks).toContain(arcTestnetChainId); + expect(NETWORK_NAME_TO_CHAIN_ID[NetworkNames.ArcTestnet]).toBe( + arcTestnetChainId + ); + expect(CHAIN_ID_TO_NETWORK_NAME[arcTestnetChainId]).toBe( + NetworkNames.ArcTestnet + ); + }); + + it('returns Arc Testnet chain and bundler configuration', () => { + const config = getNetworkConfig(arcTestnetChainId); + + expect(config).toBe(Networks[arcTestnetChainId]); + expect(config).toMatchObject({ + chainId: arcTestnetChainId, + chain: arcTestnet, + bundler: 'https://testnet-rpc.etherspot.io/v2/5042002', + contracts: { + entryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', + walletFactory: '0x38CC0EDdD3a944CA17981e0A19470d2298B8d43a', + bootstrap: '0xCF2808eA7d131d96E5C73Eb0eCD8Dc84D33905C7', + multipleOwnerECDSAValidator: + '0x0eA25BF9F313344d422B513e1af679484338518E', + hookMultiPlexer: '0xDcA918dd23456d321282DF9507F6C09A50522136', + }, + }); + }); + + it('defines Arc Testnet viem chain metadata', () => { + const chain = getChainFromId(arcTestnetChainId); + + expect(chain.id).toBe(arcTestnetChainId); + expect(chain.name).toBe('Arc Testnet'); + expect(chain.nativeCurrency).toEqual({ + decimals: 18, + name: 'USDC', + symbol: 'USDC', + }); + expect(chain.rpcUrls.default.http).toContain( + 'https://rpc.testnet.arc.network' + ); + expect(chain.rpcUrls.default.webSocket).toContain( + 'wss://rpc.testnet.arc.network' + ); + expect(chain.blockExplorers?.default.url).toBe( + 'https://testnet.arcscan.app' + ); + expect(chain.testnet).toBe(true); + }); +}); diff --git a/lib/constants/index.ts b/lib/constants/index.ts index 9bf2b4f..b006acb 100644 --- a/lib/constants/index.ts +++ b/lib/constants/index.ts @@ -5,10 +5,12 @@ import { bsc, gnosis } from 'viem/chains'; export const SupportedNetworks = [ 1, 10, 14, 30, 31, 50, 51, 56, 97, 100, 114, 122, 123, 137, 2357, 5000, 5003, 8453, 10200, 42161, 42220, 43113, 43114, 44787, 59140, 59144, 80002, 84532, - 421614, 534351, 534352, 11155111, 11155420, 28122024, 79479957, 888888888, + 421614, 534351, 534352, 5042002, 11155111, 11155420, 28122024, 79479957, + 888888888, ]; export enum NetworkNames { + ArcTestnet = 'arcTestnet', BaseSepolia = 'baseSepolia', Sepolia = 'sepolia', Optimism = 'optimism', @@ -69,6 +71,7 @@ export interface NetworkConfig { export const NETWORK_NAME_TO_CHAIN_ID: { [key: string]: number; } = { + [NetworkNames.ArcTestnet]: 5042002, [NetworkNames.BaseSepolia]: 84532, [NetworkNames.Sepolia]: 11155111, [NetworkNames.Optimism]: 10, @@ -565,6 +568,39 @@ export const Networks: { hookMultiPlexer: '0xDcA918dd23456d321282DF9507F6C09A50522136', }, }, + [5042002]: { + chainId: 5042002, + chain: defineChain({ + id: 5042002, + name: 'Arc Testnet', + nativeCurrency: { + decimals: 18, + name: 'USDC', + symbol: 'USDC', + }, + rpcUrls: { + default: { + http: ['https://rpc.testnet.arc.network'], + }, + }, + blockExplorers: { + default: { + name: 'Arcscan', + url: 'https://testnet.arcscan.app', + }, + }, + testnet: true, + }), + bundler: 'https://testnet-rpc.etherspot.io/v2/5042002', + contracts: { + entryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', + walletFactory: '0x38CC0EDdD3a944CA17981e0A19470d2298B8d43a', + bootstrap: '0xCF2808eA7d131d96E5C73Eb0eCD8Dc84D33905C7', + multipleOwnerECDSAValidator: '0x0eA25BF9F313344d422B513e1af679484338518E', + erc20SessionKeyValidator: '', + hookMultiPlexer: '0xDcA918dd23456d321282DF9507F6C09A50522136', + }, + }, [79479957]: { chainId: 79479957, chain: defineChain({ From 8af7293f102d2b46b76b2bd377baf4860315fbca Mon Sep 17 00:00:00 2001 From: nikhil kumar Date: Thu, 25 Jun 2026 20:28:23 +0530 Subject: [PATCH 2/3] update: modular-sdk package --- __tests__/constants.test.ts | 67 ------------------------------------- package-lock.json | 8 ++--- package.json | 2 +- 3 files changed, 5 insertions(+), 72 deletions(-) delete mode 100644 __tests__/constants.test.ts diff --git a/__tests__/constants.test.ts b/__tests__/constants.test.ts deleted file mode 100644 index 976707f..0000000 --- a/__tests__/constants.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { - NETWORK_NAME_TO_CHAIN_ID, - NetworkNames, - Networks, - SupportedNetworks, - arcTestnet, -} from '../lib/constants'; -import { - CHAIN_ID_TO_NETWORK_NAME, - getChainFromId, - getNetworkConfig, -} from '../lib/utils'; - -describe('Arc Testnet network support', () => { - const arcTestnetChainId = 5042002; - - it('exposes Arc Testnet through supported network mappings', () => { - expect(SupportedNetworks).toContain(arcTestnetChainId); - expect(NETWORK_NAME_TO_CHAIN_ID[NetworkNames.ArcTestnet]).toBe( - arcTestnetChainId - ); - expect(CHAIN_ID_TO_NETWORK_NAME[arcTestnetChainId]).toBe( - NetworkNames.ArcTestnet - ); - }); - - it('returns Arc Testnet chain and bundler configuration', () => { - const config = getNetworkConfig(arcTestnetChainId); - - expect(config).toBe(Networks[arcTestnetChainId]); - expect(config).toMatchObject({ - chainId: arcTestnetChainId, - chain: arcTestnet, - bundler: 'https://testnet-rpc.etherspot.io/v2/5042002', - contracts: { - entryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032', - walletFactory: '0x38CC0EDdD3a944CA17981e0A19470d2298B8d43a', - bootstrap: '0xCF2808eA7d131d96E5C73Eb0eCD8Dc84D33905C7', - multipleOwnerECDSAValidator: - '0x0eA25BF9F313344d422B513e1af679484338518E', - hookMultiPlexer: '0xDcA918dd23456d321282DF9507F6C09A50522136', - }, - }); - }); - - it('defines Arc Testnet viem chain metadata', () => { - const chain = getChainFromId(arcTestnetChainId); - - expect(chain.id).toBe(arcTestnetChainId); - expect(chain.name).toBe('Arc Testnet'); - expect(chain.nativeCurrency).toEqual({ - decimals: 18, - name: 'USDC', - symbol: 'USDC', - }); - expect(chain.rpcUrls.default.http).toContain( - 'https://rpc.testnet.arc.network' - ); - expect(chain.rpcUrls.default.webSocket).toContain( - 'wss://rpc.testnet.arc.network' - ); - expect(chain.blockExplorers?.default.url).toBe( - 'https://testnet.arcscan.app' - ); - expect(chain.testnet).toBe(true); - }); -}); diff --git a/package-lock.json b/package-lock.json index 013f289..d6f44c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@etherspot/eip1271-verification-util": "0.1.2", - "@etherspot/modular-sdk": "6.1.1", + "@etherspot/modular-sdk": "6.1.2", "@zerodev/sdk": "^5.5.3", "buffer": "6.0.3", "lodash": "4.17.21", @@ -1916,9 +1916,9 @@ } }, "node_modules/@etherspot/modular-sdk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@etherspot/modular-sdk/-/modular-sdk-6.1.1.tgz", - "integrity": "sha512-dueRoAYtXz+azYci6x/U2SJDTUqAI5fjuZA4ex7XaiCHxHjwCeo2is5ggUZXITTAC3UbsnjtZ8TKaYMeBzmXYw==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@etherspot/modular-sdk/-/modular-sdk-6.1.2.tgz", + "integrity": "sha512-0M4h/377wV+sdnXqUrZESE+JPoicczgANQxvnnOlMWSS8jqgoOA61sqBmX8sblYBHo3F+aSvXvUXAd83AyWPwA==", "license": "MIT", "dependencies": { "@lifi/sdk": "2.5.0", diff --git a/package.json b/package.json index affc3ec..efecd42 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "homepage": "https://github.com/etherspot/transaction-kit#readme", "dependencies": { "@etherspot/eip1271-verification-util": "0.1.2", - "@etherspot/modular-sdk": "6.1.1", + "@etherspot/modular-sdk": "6.1.2", "@zerodev/sdk": "^5.5.3", "buffer": "6.0.3", "lodash": "4.17.21", From fb0f25727112bbf9619ea22c4b7475b5c2009e9e Mon Sep 17 00:00:00 2001 From: nikhil kumar Date: Thu, 25 Jun 2026 20:36:25 +0530 Subject: [PATCH 3/3] chore: version bump --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c13b6f..fed1f28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [2.1.5] - 2026-06-25 +### Added Changes + +- Added support for Arc Testnet +- Upgraded Modular SDK to 6.1.2 + ## [2.1.4] - 2025-12-09 ### Added Changes diff --git a/package.json b/package.json index efecd42..49f6070 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@etherspot/transaction-kit", "description": "Framework-agnostic Etherspot Transaction Kit", - "version": "2.1.4", + "version": "2.1.5", "main": "dist/cjs/index.js", "scripts": { "rollup:build": "NODE_OPTIONS=--max-old-space-size=8192 rollup -c --bundleConfigAsCjs",