diff --git a/.changeset/config.json b/.changeset/config.json index 10c7be672..d03bebe04 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -14,7 +14,9 @@ "access": "public", "baseBranch": "master", "updateInternalDependencies": "patch", - "ignore": [], + "ignore": [ + "@celo/e2e" + ], "snapshot": { "useCalculatedVersion": true, "prereleaseTemplate": "{tag}-{commit}" diff --git a/.github/actions/third-party-tests/action.yml b/.github/actions/third-party-tests/action.yml new file mode 100644 index 000000000..80850c0a3 --- /dev/null +++ b/.github/actions/third-party-tests/action.yml @@ -0,0 +1,48 @@ +name: Third party libraries testing workflow +description: "Tests one library at a time" +inputs: + library: + required: true + version: + default: 'latest' + description: Version to test again or 'latest' + required: false +runs: + using: "composite" + steps: + - uses: actions/setup-node@v4 + with: + node-version: '18' + - name: 'enable corepack for yarn' + run: sudo corepack enable yarn + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'yarn' + - name: Restore node cache + uses: actions/cache@v4 + id: cache_node + with: + # We need to cache all the artifacts generated by yarn install+build + # Update this list also in .github/actions/sync-workspace/action.yml with exactly the same list + path: | + ./.yarn/cache + ./.yarn/install-state.gz + node_modules + packages/**/node_modules + key: node-${{ runner.os }}-${{ runner.arch }}-${{ env.NODE_MODULE_CACHE_VERSION }}-${{ hashFiles('yarn.lock') }} + restore-keys: | + node-${{ runner.os }}-${{ runner.arch }}-${{ env.NODE_MODULE_CACHE_VERSION }}- + - name: Install yarn dependencies + run: git config --global url."https://".insteadOf ssh:// && yarn install + if: steps.cache_node.outputs.cache-hit != 'true' + - name: Run yarn postinstall if cache hitted + run: yarn run postinstall + if: steps.cache_node.outputs.cache-hit == 'true' + + - run: | + cd packages/e2e + yarn + yarn add ${{ github.event.input.library }}@${{ github.env.input.version }} + yarn run test:${{ github.event.input.library }} \ No newline at end of file diff --git a/.github/workflows/third-party-tests.yml b/.github/workflows/third-party-tests.yml new file mode 100644 index 000000000..820bfe5b4 --- /dev/null +++ b/.github/workflows/third-party-tests.yml @@ -0,0 +1,24 @@ +name: Third party libraries testing workflow +on: + workflow_dispatch: + inputs: + library: + type: choice + options: + - viem + - web3 + - ethers + version: + type: string + default: 'latest' + description: Version to test again or 'latest' + workflow_run: + +jobs: + third-party-test-workflow: + runs-on: ['self-hosted', 'org', '8-cpu'] + steps: + - uses: celo-org/developer-tooling/.github/actions/third-party-tests/action.yaml + with: + library: ${{ github.event.inputs.library }} + version: ${{ github.event.inputs.version }} diff --git a/package.json b/package.json index 395439354..7d901786d 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "reset-rn": "watchman watch-del-all; rm -rf $TMPDIR/metro-cache-*; rm -rf $TMPDIR/haste-map-*; rm -rf $TMPDIR/metro-symbolicate*", "reset-yarn": "yarn cache clean", "test": "yarn test-pure && yarn test-needing-ganache", - "test-pure": "yarn workspaces foreach -piv --all --exclude celo --exclude \"@celo/{celocli,contractkit,transactions-uri}\" run test", + "test-pure": "yarn workspaces foreach -piv --all --exclude celo --exclude \"@celo/{celocli,contractkit,transactions-uri,e2e}\" run test", "test-needing-ganache": "yarn workspace @celo/contractkit test && yarn workspace @celo/celocli test && yarn workspace @celo/transactions-uri test", "build": "yarn workspaces foreach -piv --all --topological-dev run build", "clean": "yarn workspaces foreach -piv --all run clean", diff --git a/packages/e2e/.env.example b/packages/e2e/.env.example new file mode 100644 index 000000000..547b578b9 --- /dev/null +++ b/packages/e2e/.env.example @@ -0,0 +1 @@ +TEST_ACCOUNT="0x123..." \ No newline at end of file diff --git a/packages/e2e/.eslintrc.cjs b/packages/e2e/.eslintrc.cjs new file mode 100644 index 000000000..bfd2057be --- /dev/null +++ b/packages/e2e/.eslintrc.cjs @@ -0,0 +1,3 @@ +module.exports = { + extends: '../../.eslintrc.js', +} diff --git a/packages/e2e/.gitignore b/packages/e2e/.gitignore new file mode 100644 index 000000000..7fabe89f6 --- /dev/null +++ b/packages/e2e/.gitignore @@ -0,0 +1,4 @@ +lib/ +tmp/ +.tmp/ +.env \ No newline at end of file diff --git a/packages/e2e/.npmignore b/packages/e2e/.npmignore new file mode 100644 index 000000000..600437e22 --- /dev/null +++ b/packages/e2e/.npmignore @@ -0,0 +1,16 @@ +/.devchain/ +/.devchain.tar.gz +/coverage/ +/node_modules/ +/src/ +/tmp/ +/.tmp/ + +/tsconfig.* +/jest.config.* +*.tgz + +/src + +/lib/**/*.test.* +/lib/test-utils \ No newline at end of file diff --git a/packages/e2e/CHANGELOG.md b/packages/e2e/CHANGELOG.md new file mode 100644 index 000000000..e69de29bb diff --git a/packages/e2e/README.md b/packages/e2e/README.md new file mode 100644 index 000000000..0c5285cc4 --- /dev/null +++ b/packages/e2e/README.md @@ -0,0 +1,3 @@ +# @celo/e2e + +TODO diff --git a/packages/e2e/eslint.tsconfig.json b/packages/e2e/eslint.tsconfig.json new file mode 100644 index 000000000..a8d4317b4 --- /dev/null +++ b/packages/e2e/eslint.tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.json", + "exclude": [] +} diff --git a/packages/e2e/package.json b/packages/e2e/package.json new file mode 100644 index 000000000..3d8c994d4 --- /dev/null +++ b/packages/e2e/package.json @@ -0,0 +1,35 @@ +{ + "name": "@celo/e2e", + "version": "0.0.1", + "description": "TODO", + "types": "./lib/index.d.ts", + "author": "cLabs", + "license": "Apache-2.0", + "homepage": "https://docs.celo.org/developer/tools", + "repository": "https://github.com/celo-org/developer-tooling/tree/master/packages/e2e", + "keywords": [], + "type": "module", + "exports": { + ".": "./lib/index.js" + }, + "scripts": { + "test": "yarn run vitest", + "test:viem": "yarn run vitest viem", + "test:ethers": "yarn run vitest ethers", + "test:web3": "yarn run vitest web3" + }, + "dependencies": { + "@celo/abis": "^11.0.0", + "@celo/typescript": "workspace:^", + "@celo/web3-plugin-transaction-types": "^1.0.2", + "@vitest/coverage-v8": "2.1.2", + "dotenv": "^8.2.0", + "ethers": "^6.13.4", + "viem": "^2.21.27", + "vitest": "^2.1.2", + "web3": "^4.13.0" + }, + "engines": { + "node": ">=18" + } +} diff --git a/packages/e2e/tests/common.ts b/packages/e2e/tests/common.ts new file mode 100644 index 000000000..5c95d9e0b --- /dev/null +++ b/packages/e2e/tests/common.ts @@ -0,0 +1,4 @@ +import { Hex } from 'viem' + +export const TEST_PRIVATE_KEY = process.env.TEST_ACCOUNT as Hex +export { celo, celoAlfajores } from 'viem/chains' diff --git a/packages/e2e/tests/ethers.test.ts b/packages/e2e/tests/ethers.test.ts new file mode 100644 index 000000000..cc4837c28 --- /dev/null +++ b/packages/e2e/tests/ethers.test.ts @@ -0,0 +1,56 @@ +import { Contract, ethers, Wallet } from 'ethers' + +import { describe, expect, it } from 'vitest' + +import { registryABI } from '@celo/abis' +import { celoAlfajores, TEST_PRIVATE_KEY } from './common' + +const provider = new ethers.JsonRpcProvider(celoAlfajores.rpcUrls.default.http[0]) +const signer = new Wallet(TEST_PRIVATE_KEY, provider) + +const cEURContract = new Contract( + '0x000000000000000000000000000000000000ce10', + registryABI, + provider +) +let cEUR = cEURContract.getAddressForString('StableToken') + +describe('e2e ethers test suite', () => { + it('is setup correctly', async () => { + const blockNumber = await provider.getBlockNumber() + expect(blockNumber).toBeTypeOf('number') + expect(blockNumber).toBeGreaterThan(0) + }) + + it('can get basic account info', async () => { + const address = await signer.getAddress() + expect(address).toMatchInlineSnapshot(`"0x5FB3913Eb60d125Afbe7A6572E4F0F624dd945Ed"`) + + const balance = await signer.provider?.getBalance(address, 'latest') + expect(balance).toBeTypeOf('bigint') + expect(balance).toBeGreaterThan(0n) + }) + + it('can call a contract', async () => { + expect(cEUR).resolves.toMatch(/^0x[A-Fa-f0-9]{40}$/) + }) + + it('can submit a basic tx', async () => { + const tx = await signer.sendTransaction({ + value: 1n, + to: await signer.getAddress(), + }) + await tx.wait() + expect(tx.hash).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }, 15000) + + it.skip('can submit a feeCurrency tx', async () => { + const tx = await signer.sendTransaction({ + value: 1n, + to: await signer.getAddress(), + // feeCurrency: await cEUR, + }) + await tx.wait() + expect(tx.hash).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }) +}) diff --git a/packages/e2e/tests/viem.test.ts b/packages/e2e/tests/viem.test.ts new file mode 100644 index 000000000..a3e1865eb --- /dev/null +++ b/packages/e2e/tests/viem.test.ts @@ -0,0 +1,68 @@ +import { registryABI } from '@celo/abis' + +import { createPublicClient, createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { createNonceManager, jsonRpc } from 'viem/nonce' + +import { describe, expect, it } from 'vitest' + +import { celoAlfajores, TEST_PRIVATE_KEY } from './common' + +const publicClient = createPublicClient({ + chain: celoAlfajores, + transport: http(), +}) + +const walletClient = createWalletClient({ + account: privateKeyToAccount(TEST_PRIVATE_KEY, { + nonceManager: createNonceManager({ + source: jsonRpc(), + }), + }), + transport: http(), + chain: celoAlfajores, +}) + +let cEUR = publicClient.readContract({ + abi: registryABI, + functionName: 'getAddressForString', + address: '0x000000000000000000000000000000000000ce10', + args: ['StableTokenEUR'], +}) + +describe('viem e2e test suite', () => { + it('is setup correctly', async () => { + const blockNumber = await publicClient.getBlockNumber() + expect(blockNumber).toBeTypeOf('bigint') + expect(blockNumber).toBeGreaterThan(0) + }) + + it('can get basic account info', async () => { + const [address] = await walletClient.getAddresses() + expect(address).toMatchInlineSnapshot(`"0x5FB3913Eb60d125Afbe7A6572E4F0F624dd945Ed"`) + + const balance = await publicClient.getBalance({ address, blockTag: 'latest' }) + expect(balance).toBeTypeOf('bigint') + expect(balance).toBeGreaterThan(0) + }) + + it('can call a contract', async () => { + expect(cEUR).resolves.toMatch(/^0x[A-Fa-f0-9]{40}$/) + }) + + it('can submit a basic tx', async () => { + const tx = await walletClient.sendTransaction({ + value: 1n, + to: await walletClient.getAddresses()[0], + }) + expect(tx).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }) + it('can submit a feeCurrency tx', async () => { + const tx = await walletClient.sendTransaction({ + value: 1n, + to: await walletClient.getAddresses()[0], + feeCurrency: await cEUR, + }) + expect(tx).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }) +}) diff --git a/packages/e2e/tests/web3.test.ts b/packages/e2e/tests/web3.test.ts new file mode 100644 index 000000000..0c85c3df1 --- /dev/null +++ b/packages/e2e/tests/web3.test.ts @@ -0,0 +1,72 @@ +import { registryABI } from '@celo/abis' +// import { CeloTransactionTypesPlugin } from '@celo/web3-plugin-transaction-types' + +import { describe, expect, it } from 'vitest' + +import Web3 from 'web3' + +import { TEST_PRIVATE_KEY, celoAlfajores } from './common' + +const web3 = new Web3(celoAlfajores.rpcUrls.default[0]) +const account = web3.eth.accounts.wallet.add(TEST_PRIVATE_KEY) +web3.setProvider(new Web3.providers.HttpProvider(celoAlfajores.rpcUrls.default.http[0])) + +const cEURContract = new web3.eth.Contract( + registryABI as any, + '0x000000000000000000000000000000000000ce10' +) +let cEUR = cEURContract.methods.getAddressForString('StableToken').call() + +describe('e2e web3 test suite', () => { + it('is setup correctly', async () => { + const blockNumber = await web3.eth.getBlockNumber() + expect(blockNumber).toBeTypeOf('number') + expect(blockNumber).toBeGreaterThan(0) + }) + + it('can get basic account info', async () => { + const { address } = account + expect(address).toMatchInlineSnapshot(`"0x5FB3913Eb60d125Afbe7A6572E4F0F624dd945Ed"`) + + const balance = await web3.eth.getBalance(address, 'latest') + expect(balance).toBeTypeOf('string') + expect(balance).toMatch(/\d+/) + expect(BigInt(balance)).toBeGreaterThan(0n) + }) + + it('can call a contract', async () => { + expect(cEUR).resolves.toMatch(/^0x[A-Fa-f0-9]{40}$/) + }) + + it('can submit a basic tx', async () => { + const params = { + value: 1, + from: account.address, + to: account.address, + } as const + + const tx = await web3.eth.sendTransaction({ + ...params, + gas: await web3.eth.estimateGas(params), + }) + + expect(tx.transactionHash).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }, 15000) + + it.skip('can submit a feeCurrency tx', async () => { + // web3.registerPlugin(new CeloTransactionTypesPlugin()) + // web3.celo.link(web3) + // web3.eth.defaultAccount = account.address + // const params = { + // value: 1, + // from: account.address, + // to: account.address, + // feeCurrency: await cEUR, + // } as const + // await web3.celo.populateTransaction(params) + // const tx = await web3.eth.sendTransaction({ + // ...params, + // }) + // expect(tx.transactionHash).toMatch(/^0x[A-Fa-f0-9]{64}$/) + }) +}) diff --git a/packages/e2e/tsconfig.json b/packages/e2e/tsconfig.json new file mode 100644 index 000000000..bb170fe17 --- /dev/null +++ b/packages/e2e/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@celo/typescript/tsconfig.library.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib", + "moduleResolution": "Node16", + "module": "Node16", + "declaration": true, + "types": ["vitest/globals"] + }, + "include": ["src/**/*", "types/**/*"], + "exclude": ["**/*.test.ts"] +} diff --git a/packages/e2e/typedoc.json b/packages/e2e/typedoc.json new file mode 100644 index 000000000..27e4b830b --- /dev/null +++ b/packages/e2e/typedoc.json @@ -0,0 +1,13 @@ +{ + "exclude": ["**/generated/*.ts", "**/*+(index|.test).ts"], + "excludePrivate": true, + "excludeProtected": true, + "hideGenerator": true, + "out": "../docs/viem-account-ledger", + "gitRevision": "master", + "readme": "none", + "entryPoints": ["./src"], + "githubPages": false, + "plugin": ["typedoc-plugin-markdown"], + "entryPointStrategy": "expand" +} diff --git a/packages/e2e/vitest.config.ts b/packages/e2e/vitest.config.ts new file mode 100644 index 000000000..1ca26a067 --- /dev/null +++ b/packages/e2e/vitest.config.ts @@ -0,0 +1,14 @@ +// vitest.config.ts +import dotenv from 'dotenv' +import { defineConfig } from 'vitest/config' + +dotenv.config() + +export default defineConfig({ + test: { + coverage: { + reporter: ['json', 'clover', 'lcov'], + }, + env: { ...process.env }, + }, +}) diff --git a/yarn.lock b/yarn.lock index adf2cf933..d5ebaf7d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,6 +19,20 @@ __metadata: languageName: node linkType: hard +"@adraffy/ens-normalize@npm:1.10.1": + version: 1.10.1 + resolution: "@adraffy/ens-normalize@npm:1.10.1" + checksum: 4cb938c4abb88a346d50cb0ea44243ab3574330c81d4f5aaaf9dfee584b96189d0faa404de0fcbef5a1b73909ea4ebc3e63d84bd23f9949e5c8d4085207a5091 + languageName: node + linkType: hard + +"@adraffy/ens-normalize@npm:1.11.0": + version: 1.11.0 + resolution: "@adraffy/ens-normalize@npm:1.11.0" + checksum: abef75f21470ea43dd6071168e092d2d13e38067e349e76186c78838ae174a46c3e18ca50921d05bea6ec3203074147c9e271f8cb6531d1c2c0e146f3199ddcb + languageName: node + linkType: hard + "@adraffy/ens-normalize@npm:1.9.0": version: 1.9.0 resolution: "@adraffy/ens-normalize@npm:1.9.0" @@ -1631,6 +1645,13 @@ __metadata: languageName: node linkType: hard +"@celo/abis-l2@npm:@celo/abis@12.0.0-canary.23": + version: 12.0.0-canary.23 + resolution: "@celo/abis@npm:12.0.0-canary.23" + checksum: a1a4779b9a608192556ef41a714e1f94ff0476684ec362d0d4dfa4bd07d07f1d7f32622104b063d1970740ec90aab0828e5b9b6f5e5d7550c0e1e39b13cce1a6 + languageName: node + linkType: hard + "@celo/abis@npm:11.0.0, @celo/abis@npm:^11.0.0": version: 11.0.0 resolution: "@celo/abis@npm:11.0.0" @@ -1895,6 +1916,22 @@ __metadata: languageName: node linkType: hard +"@celo/e2e@workspace:packages/e2e": + version: 0.0.0-use.local + resolution: "@celo/e2e@workspace:packages/e2e" + dependencies: + "@celo/abis": "npm:^11.0.0" + "@celo/typescript": "workspace:^" + "@celo/web3-plugin-transaction-types": "npm:^1.0.2" + "@vitest/coverage-v8": "npm:2.1.2" + dotenv: "npm:^8.2.0" + ethers: "npm:^6.13.4" + viem: "npm:^2.21.27" + vitest: "npm:^2.1.2" + web3: "npm:^4.13.0" + languageName: unknown + linkType: soft + "@celo/explorer@npm:^5.0.12, @celo/explorer@workspace:packages/sdk/explorer": version: 0.0.0-use.local resolution: "@celo/explorer@workspace:packages/sdk/explorer" @@ -2360,6 +2397,20 @@ __metadata: languageName: unknown linkType: soft +"@celo/web3-plugin-transaction-types@npm:^1.0.2": + version: 1.0.2 + resolution: "@celo/web3-plugin-transaction-types@npm:1.0.2" + dependencies: + "@celo/abis": "npm:^11.0.0" + "@celo/abis-l2": "npm:@celo/abis@12.0.0-canary.23" + web3-eth-accounts: "npm:4.2.2-dev.cc99825.0" + web3-utils: "npm:4.3.2-dev.cc99825.0" + peerDependencies: + web3: ">= 4.13.1 < 5" + checksum: 3606b1a22923ec5a73ed0069ba0e91432d4c89b2f511c1f6a12d4b81d362ff7164a15eb3e9b2a54b7f1903878f48506c60531792beae8bca47fc2b6126fa6f0e + languageName: node + linkType: hard + "@chainsafe/as-sha256@npm:^0.3.1": version: 0.3.1 resolution: "@chainsafe/as-sha256@npm:0.3.1" @@ -4301,6 +4352,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.2.0": + version: 1.2.0 + resolution: "@noble/curves@npm:1.2.0" + dependencies: + "@noble/hashes": "npm:1.3.2" + checksum: 94e02e9571a9fd42a3263362451849d2f54405cb3ce9fa7c45bc6b9b36dcd7d1d20e2e1e14cfded24937a13d82f1e60eefc4d7a14982ce0bc219a9fc0f51d1f9 + languageName: node + linkType: hard + "@noble/curves@npm:1.3.0, @noble/curves@npm:^1.3.0, @noble/curves@npm:~1.3.0": version: 1.3.0 resolution: "@noble/curves@npm:1.3.0" @@ -4319,6 +4379,15 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:1.6.0, @noble/curves@npm:~1.6.0": + version: 1.6.0 + resolution: "@noble/curves@npm:1.6.0" + dependencies: + "@noble/hashes": "npm:1.5.0" + checksum: 9090b5a020b7e38c7b6d21506afaacd0c7557129d716a174334c1efc36385bf3ca6de16a543c216db58055e019c6a6c3bea8d9c0b79386e6bacff5c4c6b438a9 + languageName: node + linkType: hard + "@noble/curves@npm:~1.4.0": version: 1.4.2 resolution: "@noble/curves@npm:1.4.2" @@ -4349,6 +4418,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:1.3.2, @noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": + version: 1.3.2 + resolution: "@noble/hashes@npm:1.3.2" + checksum: 685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b + languageName: node + linkType: hard + "@noble/hashes@npm:1.3.3, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:~1.3.2": version: 1.3.3 resolution: "@noble/hashes@npm:1.3.3" @@ -4363,20 +4439,13 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.5.0": +"@noble/hashes@npm:1.5.0, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:~1.5.0": version: 1.5.0 resolution: "@noble/hashes@npm:1.5.0" checksum: da7fc7af52af7afcf59810a7eea6155075464ff462ffda2572dc6d57d53e2669b1ea2ec774e814f6273f1697e567f28d36823776c9bf7068cba2a2855140f26e languageName: node linkType: hard -"@noble/hashes@npm:~1.3.0, @noble/hashes@npm:~1.3.1": - version: 1.3.2 - resolution: "@noble/hashes@npm:1.3.2" - checksum: 685f59d2d44d88e738114b71011d343a9f7dce9dfb0a121f1489132f9247baa60bc985e5ec6f3213d114fbd1e1168e7294644e46cbd0ce2eba37994f28eeb51b - languageName: node - linkType: hard - "@noble/secp256k1@npm:1.7.1, @noble/secp256k1@npm:~1.7.0": version: 1.7.1 resolution: "@noble/secp256k1@npm:1.7.1" @@ -4990,7 +5059,7 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.1.6, @scure/base@npm:~1.1.8": +"@scure/base@npm:~1.1.6, @scure/base@npm:~1.1.7, @scure/base@npm:~1.1.8": version: 1.1.9 resolution: "@scure/base@npm:1.1.9" checksum: f0ab7f687bbcdee2a01377fe3cd808bf63977999672751295b6a92625d5322f4754a96d40f6bd579bc367aad48ecf8a4e6d0390e70296e6ded1076f52adb16bb @@ -5041,6 +5110,17 @@ __metadata: languageName: node linkType: hard +"@scure/bip32@npm:1.5.0": + version: 1.5.0 + resolution: "@scure/bip32@npm:1.5.0" + dependencies: + "@noble/curves": "npm:~1.6.0" + "@noble/hashes": "npm:~1.5.0" + "@scure/base": "npm:~1.1.7" + checksum: 17e296a782e09aec18ed27e2e8bb6a76072604c40997ec49a6840f223296421612dbe6b44275f04db9acd6da6cefb0322141110f5ac9dc686eb0c44d5bd868fa + languageName: node + linkType: hard + "@scure/bip32@npm:^1.3.3": version: 1.3.3 resolution: "@scure/bip32@npm:1.3.3" @@ -6508,6 +6588,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:22.7.5": + version: 22.7.5 + resolution: "@types/node@npm:22.7.5" + dependencies: + undici-types: "npm:~6.19.2" + checksum: e8ba102f8c1aa7623787d625389be68d64e54fcbb76d41f6c2c64e8cf4c9f4a2370e7ef5e5f1732f3c57529d3d26afdcb2edc0101c5e413a79081449825c57ac + languageName: node + linkType: hard + "@types/node@npm:^12.12.6, @types/node@npm:^12.7.1": version: 12.20.55 resolution: "@types/node@npm:12.20.55" @@ -7010,6 +7099,21 @@ __metadata: languageName: node linkType: hard +"abitype@npm:1.0.6": + version: 1.0.6 + resolution: "abitype@npm:1.0.6" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3 >=3.22.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: d04d58f90405c29a3c68353508502d7e870feb27418a6281ba9a13e6aaee42c26b2c5f08f648f058b8eaffac32927194b33f396d2451d18afeccfb654c7285c2 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -7097,6 +7201,13 @@ __metadata: languageName: node linkType: hard +"aes-js@npm:4.0.0-beta.5": + version: 4.0.0-beta.5 + resolution: "aes-js@npm:4.0.0-beta.5" + checksum: 8f745da2e8fb38e91297a8ec13c2febe3219f8383303cd4ed4660ca67190242ccfd5fdc2f0d1642fd1ea934818fb871cd4cc28d3f28e812e3dc6c3d0f1f97c24 + languageName: node + linkType: hard + "aes-js@npm:^3.1.2": version: 3.1.2 resolution: "aes-js@npm:3.1.2" @@ -9085,7 +9196,7 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": +"crc-32@npm:^1.2.0, crc-32@npm:^1.2.2": version: 1.2.2 resolution: "crc-32@npm:1.2.2" bin: @@ -10537,6 +10648,21 @@ __metadata: languageName: node linkType: hard +"ethers@npm:^6.13.4": + version: 6.13.4 + resolution: "ethers@npm:6.13.4" + dependencies: + "@adraffy/ens-normalize": "npm:1.10.1" + "@noble/curves": "npm:1.2.0" + "@noble/hashes": "npm:1.3.2" + "@types/node": "npm:22.7.5" + aes-js: "npm:4.0.0-beta.5" + tslib: "npm:2.7.0" + ws: "npm:8.17.1" + checksum: 221192fed93f6b0553f3e5e72bfd667d676220577d34ff854f677e955d6f608e60636a9c08b5d54039c532a9b9b7056384f0d7019eb6e111d53175806f896ac6 + languageName: node + linkType: hard + "ethjs-unit@npm:0.1.6": version: 0.1.6 resolution: "ethjs-unit@npm:0.1.6" @@ -12918,6 +13044,15 @@ __metadata: languageName: node linkType: hard +"isows@npm:1.0.6": + version: 1.0.6 + resolution: "isows@npm:1.0.6" + peerDependencies: + ws: "*" + checksum: ab9e85b50bcc3d70aa5ec875aa2746c5daf9321cb376ed4e5434d3c2643c5d62b1f466d93a05cd2ad0ead5297224922748c31707cb4fbd68f5d05d0479dce99c + languageName: node + linkType: hard + "isstream@npm:~0.1.2": version: 0.1.2 resolution: "isstream@npm:0.1.2" @@ -19122,6 +19257,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:2.7.0": + version: 2.7.0 + resolution: "tslib@npm:2.7.0" + checksum: 9a5b47ddac65874fa011c20ff76db69f97cf90c78cff5934799ab8894a5342db2d17b4e7613a087046bc1d133d21547ddff87ac558abeec31ffa929c88b7fce6 + languageName: node + linkType: hard + "tslib@npm:^1.9.0": version: 1.14.1 resolution: "tslib@npm:1.14.1" @@ -19432,6 +19574,13 @@ __metadata: languageName: node linkType: hard +"undici-types@npm:~6.19.2": + version: 6.19.8 + resolution: "undici-types@npm:6.19.8" + checksum: cf0b48ed4fc99baf56584afa91aaffa5010c268b8842f62e02f752df209e3dea138b372a60a963b3b2576ed932f32329ce7ddb9cb5f27a6c83040d8cd74b7a70 + languageName: node + linkType: hard + "unique-filename@npm:^3.0.0": version: 3.0.0 resolution: "unique-filename@npm:3.0.0" @@ -19786,6 +19935,28 @@ __metadata: languageName: node linkType: hard +"viem@npm:^2.21.27": + version: 2.21.27 + resolution: "viem@npm:2.21.27" + dependencies: + "@adraffy/ens-normalize": "npm:1.11.0" + "@noble/curves": "npm:1.6.0" + "@noble/hashes": "npm:1.5.0" + "@scure/bip32": "npm:1.5.0" + "@scure/bip39": "npm:1.4.0" + abitype: "npm:1.0.6" + isows: "npm:1.0.6" + webauthn-p256: "npm:0.0.10" + ws: "npm:8.18.0" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: a166aa83956a22514de1f23d9cbf1b1fef224499a93f51e4cac73421b1cb004600158a5cd57f68940d631446b80952be3d535d6f27ab21151698d2f4b6a77b94 + languageName: node + linkType: hard + "viem@npm:~1.5.4": version: 1.5.4 resolution: "viem@npm:1.5.4" @@ -20112,6 +20283,15 @@ __metadata: languageName: node linkType: hard +"web3-errors@npm:1.3.1-dev.cc99825.0+cc99825": + version: 1.3.1-dev.cc99825.0 + resolution: "web3-errors@npm:1.3.1-dev.cc99825.0" + dependencies: + web3-types: "npm:1.8.1-dev.cc99825.0+cc99825" + checksum: 50bfa429d2fe9de4770f745161f9c68069b53b8f661f1498fdfbd3dadfbc903cd163c1290124cabd2ea60ca03dea68ecb3ed919c75bfd87e498a9181dc6c662b + languageName: node + linkType: hard + "web3-eth-abi@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-abi@npm:1.10.0" @@ -20168,6 +20348,21 @@ __metadata: languageName: node linkType: hard +"web3-eth-accounts@npm:4.2.2-dev.cc99825.0": + version: 4.2.2-dev.cc99825.0 + resolution: "web3-eth-accounts@npm:4.2.2-dev.cc99825.0" + dependencies: + "@ethereumjs/rlp": "npm:^4.0.1" + crc-32: "npm:^1.2.2" + ethereum-cryptography: "npm:^2.0.0" + web3-errors: "npm:1.3.1-dev.cc99825.0+cc99825" + web3-types: "npm:1.8.1-dev.cc99825.0+cc99825" + web3-utils: "npm:4.3.2-dev.cc99825.0+cc99825" + web3-validator: "npm:2.0.7-dev.cc99825.0+cc99825" + checksum: f9530d663e17a37e441b7863c286a1d593f3ede1cb7ee10457e2c2f059d45a5f17da3f9f73722ff81602a6aa0f7f4eddd0b84147fc0408fad3257f306d8ad1d2 + languageName: node + linkType: hard + "web3-eth-contract@npm:1.10.0": version: 1.10.0 resolution: "web3-eth-contract@npm:1.10.0" @@ -20420,6 +20615,13 @@ __metadata: languageName: node linkType: hard +"web3-types@npm:1.8.1-dev.cc99825.0+cc99825": + version: 1.8.1-dev.cc99825.0 + resolution: "web3-types@npm:1.8.1-dev.cc99825.0" + checksum: 7b1946603bc9921af9319a8fe7990b657c4c98e54c330c177593df14c2b37259e8b7773d070438126bcc22c52a55e12228a533637d75ef6a5014577c624253a9 + languageName: node + linkType: hard + "web3-utils@npm:1.10.4": version: 1.10.4 resolution: "web3-utils@npm:1.10.4" @@ -20436,6 +20638,19 @@ __metadata: languageName: node linkType: hard +"web3-validator@npm:2.0.7-dev.cc99825.0+cc99825": + version: 2.0.7-dev.cc99825.0 + resolution: "web3-validator@npm:2.0.7-dev.cc99825.0" + dependencies: + ethereum-cryptography: "npm:^2.0.0" + util: "npm:^0.12.5" + web3-errors: "npm:1.3.1-dev.cc99825.0+cc99825" + web3-types: "npm:1.8.1-dev.cc99825.0+cc99825" + zod: "npm:^3.21.4" + checksum: f34df963d4829af6d15ec27d5f925e4ffe1638eadf24e355b1113f0754a2fd0e6db9ca62f9701c9ff8207e0ead52a6c72d58e203a039dcca8892e5659d11879c + languageName: node + linkType: hard + "web3@npm:1.10.4": version: 1.10.4 resolution: "web3@npm:1.10.4" @@ -20451,6 +20666,16 @@ __metadata: languageName: node linkType: hard +"webauthn-p256@npm:0.0.10": + version: 0.0.10 + resolution: "webauthn-p256@npm:0.0.10" + dependencies: + "@noble/curves": "npm:^1.4.0" + "@noble/hashes": "npm:^1.4.0" + checksum: dde2b6313b6a0f20996f7ee90181258fc7685bfff401df7d904578da75b374f25d5b9c1189cd2fcec30625b1f276b393188d156d49783f0611623cd713bb5b09 + languageName: node + linkType: hard + "webauthn-p256@npm:0.0.5": version: 0.0.5 resolution: "webauthn-p256@npm:0.0.5" @@ -20761,6 +20986,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:8.18.0": + version: 8.18.0 + resolution: "ws@npm:8.18.0" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 70dfe53f23ff4368d46e4c0b1d4ca734db2c4149c6f68bc62cb16fc21f753c47b35fcc6e582f3bdfba0eaeb1c488cddab3c2255755a5c3eecb251431e42b3ff6 + languageName: node + linkType: hard + "ws@npm:8.2.3": version: 8.2.3 resolution: "ws@npm:8.2.3" @@ -21081,3 +21321,10 @@ __metadata: checksum: d731e3ba776a0ee19021d909787942933a6c2eafb2bbe85541f0c59aa5c7d475ce86fcb860d5803105e32244c3dd5ba875b87c4c6bf2d6f297da416aa54e556f languageName: node linkType: hard + +"zod@npm:^3.21.4": + version: 3.23.8 + resolution: "zod@npm:3.23.8" + checksum: 846fd73e1af0def79c19d510ea9e4a795544a67d5b34b7e1c4d0425bf6bfd1c719446d94cdfa1721c1987d891321d61f779e8236fde517dc0e524aa851a6eff1 + languageName: node + linkType: hard