diff --git a/package.json b/package.json index 151390d98..ef6e5ba67 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "scripts": { "audit:ci": "audit-ci --config ./audit-ci.jsonc", "build": "yarn workspace @arbitrum/sdk build", - "lint": "yarn workspace @arbitrum/sdk lint", - "format": "yarn workspace @arbitrum/sdk format", - "test:unit": "yarn workspace @arbitrum/sdk test:unit", + "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" @@ -37,6 +37,7 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-mocha": "^9.0.0", "eslint-plugin-prettier": "^4.0.0", + "ethers": "^5.0.0", "hardhat": "^2.18.3", "mocha": "^9.2.1", "nyc": "^15.1.0", @@ -48,6 +49,7 @@ "tslint": "^6.1.3", "typechain": "7.0.0", "typescript": "^5.7.2", + "viem": "^2.0.0", "yargs": "^17.3.1" }, "resolutions": { diff --git a/packages/viem-compatibility/.eslintignore b/packages/viem-compatibility/.eslintignore new file mode 100644 index 000000000..99ead7177 --- /dev/null +++ b/packages/viem-compatibility/.eslintignore @@ -0,0 +1,5 @@ +dist/** +node_modules/** +coverage/** +src/lib/abi +docs/** diff --git a/packages/viem-compatibility/.eslintrc b/packages/viem-compatibility/.eslintrc new file mode 100644 index 000000000..bde91889b --- /dev/null +++ b/packages/viem-compatibility/.eslintrc @@ -0,0 +1,8 @@ +{ + "root": false, + "extends": ["../../.eslintrc.js"], + "parserOptions": { + "files": ["src/**/*.ts", "src/**/*.js"] + }, + "ignorePatterns": ["dist/**/*", "node_modules/**/*"] +} \ No newline at end of file diff --git a/packages/viem-compatibility/.prettierignore b/packages/viem-compatibility/.prettierignore new file mode 100644 index 000000000..ee20e44d9 --- /dev/null +++ b/packages/viem-compatibility/.prettierignore @@ -0,0 +1,5 @@ +build/** +cache/** +dist/** +src/lib/abi/** +.nyc_output diff --git a/packages/viem-compatibility/.prettierrc.js b/packages/viem-compatibility/.prettierrc.js new file mode 100644 index 000000000..008736fae --- /dev/null +++ b/packages/viem-compatibility/.prettierrc.js @@ -0,0 +1,5 @@ +const baseConfig = require('../../.prettierrc.js') + +module.exports = { + ...baseConfig, +} diff --git a/packages/viem-compatibility/package.json b/packages/viem-compatibility/package.json new file mode 100644 index 000000000..958bfb9a4 --- /dev/null +++ b/packages/viem-compatibility/package.json @@ -0,0 +1,35 @@ +{ + "name": "@arbitrum/viem-compatibility", + "version": "0.0.1", + "description": "Typescript library for ethers compatibility with viem", + "author": "Offchain Labs, Inc.", + "license": "Apache-2.0", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "repository": { + "type": "git", + "url": "git+https://github.com/offchainlabs/arbitrum-sdk.git" + }, + "engines": { + "node": ">=v11", + "npm": "please-use-yarn", + "yarn": ">= 1.0.0" + }, + "bugs": { + "url": "https://github.com/offchainlabs/arbitrum-sdk/issues" + }, + "homepage": "https://offchainlabs.com", + "files": [ + "dist/**/*" + ], + "scripts": { + "build": "rm -rf dist && tsc -p tsconfig.json", + "test:unit": "mocha -r ts-node/register 'tests/**/*.test.ts'", + "lint": "eslint .", + "format": "prettier './**/*.{js,json,md,ts,yml}' '!./src/lib/abi' --write && yarn run lint --fix" + }, + "peerDependencies": { + "ethers": "^5.0.0", + "viem": "^2.0.0" + } +} diff --git a/packages/viem-compatibility/src/compatibility.ts b/packages/viem-compatibility/src/compatibility.ts new file mode 100644 index 000000000..6c184a418 --- /dev/null +++ b/packages/viem-compatibility/src/compatibility.ts @@ -0,0 +1,73 @@ +import { + Log as EthersLog, + TransactionReceipt as EthersTransactionReceipt, +} from '@ethersproject/abstract-provider' +import { BigNumber, providers } from 'ethers' +import { + PublicClient, + Log as ViemLog, + TransactionReceipt as ViemTransactionReceipt, +} from 'viem' + +interface HttpTransportConfig { + url: string +} + +// based on https://wagmi.sh/react/ethers-adapters#reference-implementation +export function publicClientToProvider(publicClient: PublicClient) { + const { chain } = publicClient + + if (typeof chain === 'undefined') { + throw new Error(`[publicClientToProvider] "chain" is undefined`) + } + + const network = { + chainId: chain.id, + name: chain.name, + ensAddress: chain.contracts?.ensRegistry?.address, + } + + const transport = publicClient.transport as unknown as HttpTransportConfig + const url = transport.url ?? chain.rpcUrls.default.http[0] + + return new providers.StaticJsonRpcProvider(url, network) +} + +function viemLogToEthersLog(log: ViemLog): EthersLog { + return { + blockNumber: Number(log.blockNumber), + blockHash: log.blockHash!, + transactionIndex: log.transactionIndex!, + removed: log.removed, + address: log.address, + data: log.data, + topics: log.topics, + transactionHash: log.transactionHash!, + logIndex: log.logIndex!, + } +} + +export function viemTransactionReceiptToEthersTransactionReceipt( + receipt: ViemTransactionReceipt +): EthersTransactionReceipt { + return { + to: receipt.to!, + from: receipt.from!, + contractAddress: receipt.contractAddress!, + transactionIndex: receipt.transactionIndex, + gasUsed: BigNumber.from(receipt.gasUsed), + logsBloom: receipt.logsBloom, + blockHash: receipt.blockHash, + transactionHash: receipt.transactionHash, + logs: receipt.logs.map(log => viemLogToEthersLog(log)), + blockNumber: Number(receipt.blockNumber), + // todo: if we need this we can add it later + confirmations: -1, + cumulativeGasUsed: BigNumber.from(receipt.cumulativeGasUsed), + effectiveGasPrice: BigNumber.from(receipt.effectiveGasPrice), + // all transactions that we care about are well past byzantium + byzantium: true, + type: Number(receipt.type), + status: receipt.status === 'success' ? 1 : 0, + } +} diff --git a/packages/viem-compatibility/src/index.ts b/packages/viem-compatibility/src/index.ts new file mode 100644 index 000000000..2d009673b --- /dev/null +++ b/packages/viem-compatibility/src/index.ts @@ -0,0 +1 @@ +export * from './compatibility' diff --git a/packages/viem-compatibility/tests/compatibility.test.ts b/packages/viem-compatibility/tests/compatibility.test.ts new file mode 100644 index 000000000..4a239ba0f --- /dev/null +++ b/packages/viem-compatibility/tests/compatibility.test.ts @@ -0,0 +1,154 @@ +import { expect } from 'chai' +import { BigNumber, providers } from 'ethers' +import { + createPublicClient, + defineChain, + http, + PublicClient, + TransactionReceipt, +} from 'viem' +import { arbitrumSepolia, mainnet } from 'viem/chains' +import { + publicClientToProvider, + viemTransactionReceiptToEthersTransactionReceipt, +} from '../src/compatibility' + +const testChain = defineChain({ + ...mainnet, + rpcUrls: { + default: { + http: ['https://example.com'], + }, + public: { + http: ['https://example.com'], + }, + }, +}) + +describe('viem compatibility', () => { + describe('publicClientToProvider', () => { + it('converts a public client to a provider', () => { + const transport = http('https://example.com') + const publicClient = createPublicClient({ + chain: testChain, + transport, + }) as unknown as PublicClient + + const provider = publicClientToProvider(publicClient) + expect(provider).to.be.instanceOf(providers.StaticJsonRpcProvider) + expect(provider.network.chainId).to.equal(testChain.id) + expect(provider.network.name).to.equal(testChain.name) + expect(provider.connection.url).to.equal('https://example.com') + }) + + it('successfully converts PublicClient to Provider', () => { + const publicClient = createPublicClient({ + chain: arbitrumSepolia, + transport: http(), + }) as unknown as PublicClient + + const provider = publicClientToProvider(publicClient) + + expect(provider.network.chainId).to.equal(publicClient.chain!.id) + expect(provider.network.name).to.equal(publicClient.chain!.name) + expect(provider.connection.url).to.equal( + 'https://sepolia-rollup.arbitrum.io/rpc' + ) + }) + + it('successfully converts PublicClient to Provider (custom Transport)', () => { + const publicClient = createPublicClient({ + chain: arbitrumSepolia, + transport: http('https://arbitrum-sepolia.gateway.tenderly.co'), + }) as unknown as PublicClient + + const provider = publicClientToProvider(publicClient) + + expect(provider.network.chainId).to.equal(publicClient.chain!.id) + expect(provider.network.name).to.equal(publicClient.chain!.name) + expect(provider.connection.url).to.equal( + 'https://arbitrum-sepolia.gateway.tenderly.co' + ) + }) + + it('throws error when chain is undefined', () => { + const publicClient = { + chain: undefined, + transport: http(), + } as unknown as PublicClient + + expect(() => publicClientToProvider(publicClient)).to.throw( + '[publicClientToProvider] "chain" is undefined' + ) + }) + }) + + describe('viemTransactionReceiptToEthersTransactionReceipt', () => { + it('converts viem transaction receipt to ethers format', () => { + const viemReceipt: TransactionReceipt = { + to: '0x1234', + from: '0x5678', + contractAddress: '0xabcd', + transactionIndex: 1, + gasUsed: BigInt(21000), + logsBloom: '0x', + blockHash: '0xblock', + transactionHash: '0xtx', + logs: [ + { + address: '0xcontract', + blockHash: '0xblock', + blockNumber: BigInt(123), + data: '0xdata', + logIndex: 0, + removed: false, + transactionHash: '0xtx', + transactionIndex: 1, + topics: [], + } as any, + ], + blockNumber: BigInt(123), + cumulativeGasUsed: BigInt(42000), + effectiveGasPrice: BigInt(2000000000), + status: 'success', + type: 'eip1559', + } + + const ethersReceipt = + viemTransactionReceiptToEthersTransactionReceipt(viemReceipt) + + expect(ethersReceipt.to).to.equal('0x1234') + expect(ethersReceipt.from).to.equal('0x5678') + expect(ethersReceipt.contractAddress).to.equal('0xabcd') + expect(ethersReceipt.transactionIndex).to.equal(1) + expect(ethersReceipt.gasUsed.eq(BigNumber.from(21000))).to.equal(true) + expect(ethersReceipt.blockNumber).to.equal(123) + expect(ethersReceipt.status).to.equal(1) + expect(ethersReceipt.logs[0].address).to.equal('0xcontract') + expect(ethersReceipt.byzantium).to.equal(true) + }) + + it('handles failed transaction status', () => { + const viemReceipt: TransactionReceipt = { + to: '0x1234', + from: '0x5678', + contractAddress: '0xabcd', + transactionIndex: 1, + gasUsed: BigInt(21000), + logsBloom: '0x', + blockHash: '0xblock', + transactionHash: '0xtx', + logs: [], + blockNumber: BigInt(123), + cumulativeGasUsed: BigInt(42000), + effectiveGasPrice: BigInt(2000000000), + status: 'reverted', + type: 'eip1559' as const, + } + + const ethersReceipt = + viemTransactionReceiptToEthersTransactionReceipt(viemReceipt) + expect(ethersReceipt.status).to.equal(0) + }) + }) +}) diff --git a/packages/viem-compatibility/tsconfig.json b/packages/viem-compatibility/tsconfig.json new file mode 100644 index 000000000..70de820d0 --- /dev/null +++ b/packages/viem-compatibility/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "target": "ES2020", + "rootDir": "./src", + "outDir": "./dist", + "skipLibCheck": true + }, + "include": ["src/**/*.ts", "src/**/*.d.ts"], + "exclude": ["node_modules", "dist"] +} diff --git a/yarn.lock b/yarn.lock index 13c535112..8258d4c9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@adraffy/ens-normalize@^1.10.1": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33" + integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg== + "@aduh95/viz.js@^3.7.0": version "3.7.0" resolved "https://registry.yarnpkg.com/@aduh95/viz.js/-/viz.js-3.7.0.tgz#a20d86c5fc8f6abebdc39b96a4326e10375d77c0" @@ -1086,11 +1091,28 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" +"@noble/curves@1.7.0", "@noble/curves@^1.4.0", "@noble/curves@^1.6.0", "@noble/curves@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== + dependencies: + "@noble/hashes" "1.6.0" + "@noble/hashes@1.2.0", "@noble/hashes@~1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12" integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ== +"@noble/hashes@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== + +"@noble/hashes@1.6.1", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -1393,6 +1415,11 @@ resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== +"@scure/base@~1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== + "@scure/bip32@1.1.5": version "1.1.5" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" @@ -1402,6 +1429,15 @@ "@noble/secp256k1" "~1.7.0" "@scure/base" "~1.1.0" +"@scure/bip32@1.6.0", "@scure/bip32@^1.5.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.0.tgz#6dbc6b4af7c9101b351f41231a879d8da47e0891" + integrity sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA== + dependencies: + "@noble/curves" "~1.7.0" + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + "@scure/bip39@1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.1.1.tgz#b54557b2e86214319405db819c4b6a370cf340c5" @@ -1410,6 +1446,14 @@ "@noble/hashes" "~1.2.0" "@scure/base" "~1.1.0" +"@scure/bip39@1.5.0", "@scure/bip39@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.0.tgz#c8f9533dbd787641b047984356531d84485f19be" + integrity sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A== + dependencies: + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + "@sentry/core@5.30.0": version "5.30.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" @@ -1766,6 +1810,16 @@ JSONStream@^1.3.5: jsonparse "^1.2.0" through ">=2.2.7 <3" +abitype@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.7.tgz#876a0005d211e1c9132825d45bcee7b46416b284" + integrity sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw== + +abitype@^1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba" + integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg== + abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741" @@ -3119,6 +3173,42 @@ ethereumjs-util@^7.0.3: ethereum-cryptography "^0.1.3" rlp "^2.2.4" +ethers@^5.0.0, ethers@^5.6.9, ethers@^5.7.1: + version "5.7.2" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" + integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== + dependencies: + "@ethersproject/abi" "5.7.0" + "@ethersproject/abstract-provider" "5.7.0" + "@ethersproject/abstract-signer" "5.7.0" + "@ethersproject/address" "5.7.0" + "@ethersproject/base64" "5.7.0" + "@ethersproject/basex" "5.7.0" + "@ethersproject/bignumber" "5.7.0" + "@ethersproject/bytes" "5.7.0" + "@ethersproject/constants" "5.7.0" + "@ethersproject/contracts" "5.7.0" + "@ethersproject/hash" "5.7.0" + "@ethersproject/hdnode" "5.7.0" + "@ethersproject/json-wallets" "5.7.0" + "@ethersproject/keccak256" "5.7.0" + "@ethersproject/logger" "5.7.0" + "@ethersproject/networks" "5.7.1" + "@ethersproject/pbkdf2" "5.7.0" + "@ethersproject/properties" "5.7.0" + "@ethersproject/providers" "5.7.2" + "@ethersproject/random" "5.7.0" + "@ethersproject/rlp" "5.7.0" + "@ethersproject/sha2" "5.7.0" + "@ethersproject/signing-key" "5.7.0" + "@ethersproject/solidity" "5.7.0" + "@ethersproject/strings" "5.7.0" + "@ethersproject/transactions" "5.7.0" + "@ethersproject/units" "5.7.0" + "@ethersproject/wallet" "5.7.0" + "@ethersproject/web" "5.7.1" + "@ethersproject/wordlists" "5.7.0" + ethers@^5.1.0: version "5.6.4" resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.6.4.tgz#23629e9a7d4bc5802dfb53d4da420d738744b53c" @@ -3155,42 +3245,6 @@ ethers@^5.1.0: "@ethersproject/web" "5.6.0" "@ethersproject/wordlists" "5.6.0" -ethers@^5.6.9, ethers@^5.7.1: - version "5.7.2" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e" - integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg== - dependencies: - "@ethersproject/abi" "5.7.0" - "@ethersproject/abstract-provider" "5.7.0" - "@ethersproject/abstract-signer" "5.7.0" - "@ethersproject/address" "5.7.0" - "@ethersproject/base64" "5.7.0" - "@ethersproject/basex" "5.7.0" - "@ethersproject/bignumber" "5.7.0" - "@ethersproject/bytes" "5.7.0" - "@ethersproject/constants" "5.7.0" - "@ethersproject/contracts" "5.7.0" - "@ethersproject/hash" "5.7.0" - "@ethersproject/hdnode" "5.7.0" - "@ethersproject/json-wallets" "5.7.0" - "@ethersproject/keccak256" "5.7.0" - "@ethersproject/logger" "5.7.0" - "@ethersproject/networks" "5.7.1" - "@ethersproject/pbkdf2" "5.7.0" - "@ethersproject/properties" "5.7.0" - "@ethersproject/providers" "5.7.2" - "@ethersproject/random" "5.7.0" - "@ethersproject/rlp" "5.7.0" - "@ethersproject/sha2" "5.7.0" - "@ethersproject/signing-key" "5.7.0" - "@ethersproject/solidity" "5.7.0" - "@ethersproject/strings" "5.7.0" - "@ethersproject/transactions" "5.7.0" - "@ethersproject/units" "5.7.0" - "@ethersproject/wallet" "5.7.0" - "@ethersproject/web" "5.7.1" - "@ethersproject/wordlists" "5.7.0" - ethjs-util@0.1.6, ethjs-util@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" @@ -3212,6 +3266,11 @@ event-stream@4.0.1: stream-combiner "^0.2.2" through "^2.3.8" +eventemitter3@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" + integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== + evp_bytestokey@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" @@ -4083,6 +4142,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isows@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7" + integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw== + istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" @@ -4775,6 +4839,19 @@ os-tmpdir@~1.0.2: resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== +ox@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.1.2.tgz#0f791be2ccabeaf4928e6d423498fe1c8094e560" + integrity sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww== + dependencies: + "@adraffy/ens-normalize" "^1.10.1" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + "@scure/bip32" "^1.5.0" + "@scure/bip39" "^1.4.0" + abitype "^1.0.6" + eventemitter3 "5.0.1" + p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -6006,6 +6083,29 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== +viem@^2.0.0: + version "2.21.57" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.57.tgz#bedbb444bb42e07ccc2264a9a0441903a113aab8" + integrity sha512-Mw4f4Dw0+Y/wSHdynVmP4uh+Cw15HEoj8BOKvKH5nGA6oFZYRxSy9Ruu7ZG8jexeAVCZ57aIuXb0gNg6Vb1x0g== + dependencies: + "@noble/curves" "1.7.0" + "@noble/hashes" "1.6.1" + "@scure/bip32" "1.6.0" + "@scure/bip39" "1.5.0" + abitype "1.0.7" + isows "1.0.6" + ox "0.1.2" + webauthn-p256 "0.0.10" + ws "8.18.0" + +webauthn-p256@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.10.tgz#877e75abe8348d3e14485932968edf3325fd2fdd" + integrity sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA== + dependencies: + "@noble/curves" "^1.4.0" + "@noble/hashes" "^1.4.0" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -6121,6 +6221,11 @@ ws@7.4.6, ws@7.5.10, ws@^7.4.6: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== +ws@8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + ws@8.5.0: version "8.5.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f"