Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
acf2a39
feat: provider-agnostic core + ethers5/viem adapter packages
douglance Apr 2, 2026
00ab983
feat: add @arbitrum/ethers6 adapter package
douglance Apr 2, 2026
05d984b
fix: ABI encoder/decoder bugs + Contract error handling + adapter fixes
douglance Apr 2, 2026
96e0da3
feat: complete withdrawal lifecycle + WETH fix + missing features
douglance Apr 2, 2026
0690465
feat: L1-L3 teleportation + complete adapter re-exports + package setup
douglance Apr 2, 2026
e8b0c08
feat: integration tests + cleanup + @arbitrum/sdk re-export
douglance Apr 3, 2026
a14fb8d
test: integration tests pass against live arbitrum-testnode
douglance Apr 3, 2026
4129d45
feat: shared integration test harness + ETH scenarios (6 tests × 3 ad…
douglance Apr 3, 2026
55d9fd9
fix: workspace linking + viem alias + rollupUtils test + finalization
douglance Apr 3, 2026
6a1c55e
feat: backwards-compatible @arbitrum/sdk compat layer
douglance Apr 3, 2026
83daa6b
feat: wire up @arbitrum/sdk index.ts to compat layer + original lib e…
douglance Apr 3, 2026
b9d746d
fix: rewrite reexport test to verify old class-based API surface
douglance Apr 4, 2026
569cadb
fix: run original integration tests through compat layer
douglance Apr 4, 2026
217ec29
fix: flatten event args in compat layer for backwards compat
douglance Apr 4, 2026
13fe63a
fix: add 20% gas estimate margin in withdrawal test assertion
douglance Apr 4, 2026
66b07b1
fix: adapter typing and multicall compat export
douglance Apr 16, 2026
d2ddc5f
test: add full integration scenario suite across adapters
douglance Apr 16, 2026
c69e88e
chore: migrate from yarn to pnpm workspaces
douglance Apr 17, 2026
7ae10a6
chore: restore nitro-contracts caret and eslintrc>js-yaml override
douglance Apr 20, 2026
169e206
fix: use 2-level selector for eslintrc>js-yaml override
douglance Apr 20, 2026
9051d18
fix(ci): wire core gen:abi, format compat layer, allowlist sol2uml ad…
douglance Apr 21, 2026
47445c4
fix: add async-mutex as direct sdk dependency
douglance Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 41 additions & 31 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo
- name: Install dependencies
run: pnpm install --frozen-lockfile

lint:
name: Lint on Node.js v${{ matrix.node-version }}
Expand All @@ -43,21 +45,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint sdk
run: |
yarn gen:abi
yarn build
yarn lint --format junit -o $TEST_PATH/sdk-lint.xml
pnpm gen:abi
pnpm build
pnpm lint --format junit -o $TEST_PATH/sdk-lint.xml

- name: Upload build artifacts
uses: actions/upload-artifact@v4
Expand All @@ -83,17 +87,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo
- name: Install dependencies
run: pnpm install --frozen-lockfile

- run: yarn audit:ci
- run: pnpm audit:ci

test-unit:
name: Test (Unit) on Node.js v${{ matrix.node-version }}
Expand All @@ -106,23 +112,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: |
yarn gen:abi
yarn build
pnpm gen:abi
pnpm build

- name: Run unit tests
run: CI=true yarn test:unit
run: CI=true pnpm test:unit

test-integration:
name: Test (Integration) on Node.js v${{ matrix.node-version }}${{ matrix.orbit-test == '1' && ' with L3' || '' }}${{ matrix.decimals == '16' && ' with custom gas token (16 decimals)' || matrix.decimals == '20' && ' with custom gas token (20 decimals)' || matrix.decimals == '18' && ' with custom gas token (18 decimals)' || '' }}
Expand Down Expand Up @@ -157,15 +165,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install node_modules
uses: OffchainLabs/actions/node-modules/install@main
with:
cache-key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-monorepo
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Set up the local node
uses: OffchainLabs/actions/run-nitro-test-node@main
Expand All @@ -179,13 +189,13 @@ jobs:

- name: Build
run: |
yarn gen:abi
yarn build
pnpm gen:abi
pnpm build

- name: Generate network file
run: yarn gen:network
run: pnpm gen:network

- name: Run integration tests
env:
NODE_OPTIONS: --no-experimental-strip-types
run: CI=true yarn test:integration
run: CI=true pnpm test:integration
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
engine-strict = true
public-hoist-pattern[]=@types/*
public-hoist-pattern[]=@ethersproject/*
public-hoist-pattern[]=typescript
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
"type": "node",
"request": "launch",
"name": "Run Unit Tests",
"runtimeExecutable": "yarn",
"runtimeVersion": "18",
"runtimeExecutable": "pnpm",
"runtimeVersion": "24",
"runtimeArgs": ["test:unit"],
"skipFiles": ["<node_internals>/**"]
},
{
"type": "node",
"request": "launch",
"name": "Run Integration Tests",
"runtimeExecutable": "yarn",
"runtimeVersion": "18",
"runtimeExecutable": "pnpm",
"runtimeVersion": "24",
"runtimeArgs": ["test:integration"],
"skipFiles": ["<node_internals>/**"]
}
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ npm install @arbitrum/sdk
# or

yarn add @arbitrum/sdk

# or

pnpm add @arbitrum/sdk
```

## Key Features
Expand Down Expand Up @@ -92,13 +96,13 @@ For more detailed usage examples and API references, please refer to the [Arbitr
3. Generate the network configuration against your active Nitro test node:

```sh
yarn gen:network
pnpm gen:network
```

4. Execute the integration tests:

```sh
yarn test:integration
pnpm test:integration
```

## Documentation
Expand Down
18 changes: 17 additions & 1 deletion audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,22 @@
// https://github.com/advisories/GHSA-4992-7rv2-5pvq
// undici CRLF injection via `upgrade` option
// from: hardhat>undici
"GHSA-4992-7rv2-5pvq"
"GHSA-4992-7rv2-5pvq",

// sol2uml transitive dev deps (dev-only, diagram generation for contracts)
// These surfaced under pnpm where yarn's resolutions had previously shadowed them.
// from: @offchainlabs/l1-l3-teleport-contracts>@arbitrum/nitro-contracts>sol2uml>...
// https://github.com/advisories/GHSA-xxjr-mmjv-4gpg — lodash
"GHSA-xxjr-mmjv-4gpg",
// https://github.com/advisories/GHSA-r5fr-rjxr-66jc — lodash
"GHSA-r5fr-rjxr-66jc",
// https://github.com/advisories/GHSA-f23m-r3pf-42rh — lodash
"GHSA-f23m-r3pf-42rh",
// https://github.com/advisories/GHSA-r4q5-vmmm-2653 — follow-redirects
"GHSA-r4q5-vmmm-2653",
// https://github.com/advisories/GHSA-3p68-rc4w-qgx5 — axios
"GHSA-3p68-rc4w-qgx5",
// https://github.com/advisories/GHSA-fvcv-3m26-pcqx — axios
"GHSA-fvcv-3m26-pcqx"
]
}
98 changes: 47 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{
"private": true,
"packageManager": "pnpm@10.33.0",
"scripts": {
"audit:ci": "audit-ci --config ./audit-ci.jsonc",
"build": "yarn workspace @arbitrum/sdk build",
"lint": "yarn workspaces run lint",
"format": "yarn workspaces run format",
"test:unit": "yarn workspaces run test:unit",
"test:integration": "yarn workspace @arbitrum/sdk test:integration",
"gen:abi": "yarn workspace @arbitrum/sdk gen:abi",
"gen:network": "yarn workspace @arbitrum/sdk gen:network"
},
"workspaces": {
"packages": [
"packages/*"
]
"build": "pnpm --filter @arbitrum/core build && pnpm --filter @arbitrum/ethers5 build && pnpm --filter @arbitrum/ethers6 build && pnpm --filter @arbitrum/viem build && pnpm --filter @arbitrum/sdk build",
"lint": "pnpm -r run lint",
"format": "pnpm -r run format",
"test:unit": "pnpm --filter @arbitrum/core test:unit && pnpm --filter @arbitrum/ethers5 test:unit && pnpm --filter @arbitrum/ethers6 test:unit && pnpm --filter @arbitrum/viem test:unit",
"test:integration": "pnpm --filter @arbitrum/ethers5 test:integration && pnpm --filter @arbitrum/ethers6 test:integration && pnpm --filter @arbitrum/viem test:integration",
"gen:abi": "pnpm --filter @arbitrum/sdk gen:abi && pnpm --filter @arbitrum/core gen:abi",
"gen:network": "pnpm --filter @arbitrum/sdk gen:network"
},
"devDependencies": {
"@arbitrum/nitro-contracts": "^1.1.1",
Expand Down Expand Up @@ -53,44 +49,44 @@
"vitest": "^4.1.2",
"yargs": "^17.3.1"
},
"resolutions": {
"lodash.pick": "https://github.com/lodash/lodash/archive/refs/tags/4.17.21.tar.gz",
"**/@ethersproject/providers/ws": "7.5.10",
"**/puppeteer/ws": "8.17.1",
"**/puppeteer/tar-fs": "2.1.4",
"**/hardhat/ws": "7.5.10",
"**/hardhat/@sentry/node/cookie": "0.7.0",
"**/follow-redirects": "1.15.6",
"**/micromatch": "4.0.8",
"**/elliptic": "6.6.1",
"**/secp256k1": "4.0.4",
"**/nanoid": "3.3.8",
"**/serialize-javascript": "6.0.2",
"**/patch-package/cross-spawn": "6.0.6",
"**/eslint/cross-spawn": "7.0.5",
"**/foreground-child/cross-spawn": "7.0.5",
"**/istanbul-lib-processinfo/cross-spawn": "7.0.5",
"**/istanbul-lib-instrument/@babel/core/@babel/helpers": "7.26.10",
"**/hardhat/undici": "5.29.0",
"**/chokidar/braces": "3.0.3",
"**/sol2uml/axios": "0.30.2",
"**/brace-expansion": "1.1.12",
"**/mocha/minimatch/brace-expansion": "2.0.2",
"**/convert-svg-core/glob/minimatch/brace-expansion": "2.0.2",
"**/eslint/js-yaml": "3.14.2",
"**/eslint/@eslint/eslintrc/js-yaml": "3.14.2",
"**/mocha/js-yaml": "4.1.1",
"**/diff": "5.2.2",
"**/anymatch/picomatch": "2.3.2",
"**/readdirp/picomatch": "2.3.2",
"**/micromatch/picomatch": "2.3.2",
"**/tinyglobby/picomatch": "4.0.4",
"**/form-data": "4.0.5",
"**/lodash": "4.18.1",
"**/minimatch": "3.1.5",
"**/immutable": "4.3.8",
"**/flatted": "3.4.2",
"**/patch-package/yaml": "1.10.3",
"**/vite": "8.0.5"
"pnpm": {
"overrides": {
"lodash.pick": "https://github.com/lodash/lodash/archive/refs/tags/4.17.21.tar.gz",
"@ethersproject/providers>ws": "7.5.10",
"puppeteer>ws": "8.17.1",
"puppeteer>tar-fs": "2.1.4",
"hardhat>ws": "7.5.10",
"@sentry/node>cookie": "0.7.0",
"follow-redirects": "1.15.6",
"micromatch": "4.0.8",
"elliptic": "6.6.1",
"secp256k1": "4.0.4",
"nanoid": "3.3.8",
"serialize-javascript": "6.0.2",
"patch-package>cross-spawn": "6.0.6",
"eslint>cross-spawn": "7.0.5",
"foreground-child>cross-spawn": "7.0.5",
"istanbul-lib-processinfo>cross-spawn": "7.0.5",
"@babel/core>@babel/helpers": "7.26.10",
"hardhat>undici": "5.29.0",
"chokidar>braces": "3.0.3",
"sol2uml>axios": "0.30.2",
"brace-expansion": "1.1.12",
"eslint>js-yaml": "3.14.2",
"@eslint/eslintrc>js-yaml": "3.14.2",
"mocha>js-yaml": "4.1.1",
"diff": "5.2.2",
"anymatch>picomatch": "2.3.2",
"readdirp>picomatch": "2.3.2",
"micromatch>picomatch": "2.3.2",
"tinyglobby>picomatch": "4.0.4",
"form-data": "4.0.5",
"lodash": "4.18.1",
"minimatch": "3.1.5",
"immutable": "4.3.8",
"flatted": "3.4.2",
"patch-package>yaml": "1.10.3",
"vite": "8.0.5"
}
}
}
43 changes: 43 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@arbitrum/core",
"version": "0.1.0",
"description": "Provider-agnostic core library for Arbitrum SDK",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/OffchainLabs/arbitrum-sdk.git",
"directory": "packages/core"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.js"
},
"./abi": {
"types": "./dist/abi/index.d.ts",
"import": "./dist/abi/index.js",
"require": "./dist/abi/index.js"
}
},
"files": ["dist", "package.json", "README.md", "LICENSE"],
"scripts": {
"gen:abi": "ts-node ./scripts/genAbi.ts",
"build": "tsc",
"test": "vitest run",
"test:unit": "vitest run --exclude '**/tests/integration/**'",
"lint": "echo 'lint not configured yet'",
"format": "echo 'format not configured yet'"
},
"dependencies": {
"abitype": "^1.0.8",
"@noble/hashes": "^1.7.1",
"async-mutex": "^0.4.0"
},
"devDependencies": {
"typescript": "^5.7.2",
"vitest": "^4.1.1"
}
}
Loading
Loading