diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 68e1b00a467e..2f784942a6b6 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -78,11 +78,11 @@ "@aztec/protocol-contracts": "workspace:^", "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "lodash.groupby": "^4.6.0", "lodash.omit": "^4.5.0", "tsc-watch": "^6.0.0", - "tslib": "^2.5.0", - "viem": "2.23.7" + "tslib": "^2.5.0" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index 2d15e92ba04b..c26ce570d5b7 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -28,9 +28,16 @@ import { makeAndSignCommitteeAttestationsAndSigners, makeBlockAttestationFromBlo import { getTelemetryClient } from '@aztec/telemetry-client'; import { jest } from '@jest/globals'; +import { + type FormattedBlock, + type Log, + type Transaction, + encodeFunctionData, + multicall3Abi, + toHex, +} from '@spalladino/viem'; import assert from 'assert'; import { type MockProxy, mock } from 'jest-mock-extended'; -import { type FormattedBlock, type Log, type Transaction, encodeFunctionData, multicall3Abi, toHex } from 'viem'; import { Archiver } from './archiver.js'; import type { ArchiverDataStore } from './archiver_store.js'; diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 3e293ef93deb..1f85ccc7d888 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -72,9 +72,9 @@ import { trackSpan, } from '@aztec/telemetry-client'; +import { type GetContractReturnType, createPublicClient, fallback, http } from '@spalladino/viem'; import { EventEmitter } from 'events'; import groupBy from 'lodash.groupby'; -import { type GetContractReturnType, createPublicClient, fallback, http } from 'viem'; import type { ArchiverDataStore, ArchiverL1SynchPoint } from './archiver_store.js'; import type { ArchiverConfig } from './config.js'; diff --git a/yarn-project/archiver/src/archiver/data_retrieval.ts b/yarn-project/archiver/src/archiver/data_retrieval.ts index 84beb66d1f8f..58b8cd01341e 100644 --- a/yarn-project/archiver/src/archiver/data_retrieval.ts +++ b/yarn-project/archiver/src/archiver/data_retrieval.ts @@ -28,7 +28,7 @@ import { getAbiItem, hexToBytes, multicall3Abi, -} from 'viem'; +} from '@spalladino/viem'; import { NoBlobBodiesFoundError } from './errors.js'; import type { DataRetrieval } from './structs/data_retrieval.js'; diff --git a/yarn-project/aztec-faucet/package.json b/yarn-project/aztec-faucet/package.json index 738663c27c92..fef8584fb1d4 100644 --- a/yarn-project/aztec-faucet/package.json +++ b/yarn-project/aztec-faucet/package.json @@ -67,10 +67,10 @@ "@aztec/foundation": "workspace:^", "@aztec/l1-artifacts": "workspace:^", "@koa/cors": "^5.0.0", + "@spalladino/viem": "2.38.2-eip7594.0", "koa": "^2.16.1", "koa-bodyparser": "^4.4.1", "koa-router": "^13.1.1", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/aztec-faucet/src/faucet.ts b/yarn-project/aztec-faucet/src/faucet.ts index 01d1d1619d20..98c07643e44f 100644 --- a/yarn-project/aztec-faucet/src/faucet.ts +++ b/yarn-project/aztec-faucet/src/faucet.ts @@ -12,8 +12,8 @@ import { type WalletClient, getContract, parseEther, -} from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; +} from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; import type { FaucetConfig, L1AssetConfig } from './config.js'; diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index d7c5fbfc4f28..7135e742e688 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -89,10 +89,10 @@ "@aztec/telemetry-client": "workspace:^", "@aztec/validator-client": "workspace:^", "@aztec/world-state": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "koa": "^2.16.1", "koa-router": "^13.1.1", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/aztec-node/src/aztec-node/config.test.ts b/yarn-project/aztec-node/src/aztec-node/config.test.ts index 689db448cbb3..09331c48d424 100644 --- a/yarn-project/aztec-node/src/aztec-node/config.test.ts +++ b/yarn-project/aztec-node/src/aztec-node/config.test.ts @@ -5,8 +5,8 @@ import type { SequencerClientConfig, TxSenderConfig } from '@aztec/sequencer-cli import { AztecAddress } from '@aztec/stdlib/aztec-address'; import type { ValidatorClientConfig } from '@aztec/validator-client/config'; -import type { Hex } from 'viem'; -import { generatePrivateKey, privateKeyToAddress } from 'viem/accounts'; +import type { Hex } from '@spalladino/viem'; +import { generatePrivateKey, privateKeyToAddress } from '@spalladino/viem/accounts'; import { createKeyStoreForValidator } from './config.js'; diff --git a/yarn-project/aztec-node/src/aztec-node/config.ts b/yarn-project/aztec-node/src/aztec-node/config.ts index 1ee6d03fd265..0ceab0e1c126 100644 --- a/yarn-project/aztec-node/src/aztec-node/config.ts +++ b/yarn-project/aztec-node/src/aztec-node/config.ts @@ -29,7 +29,7 @@ import type { SlasherConfig } from '@aztec/stdlib/interfaces/server'; import { type ValidatorClientConfig, validatorClientConfigMappings } from '@aztec/validator-client/config'; import { type WorldStateConfig, worldStateConfigMappings } from '@aztec/world-state/config'; -import { privateKeyToAddress } from 'viem/accounts'; +import { privateKeyToAddress } from '@spalladino/viem/accounts'; import { type SentinelConfig, sentinelConfigMappings } from '../sentinel/config.js'; diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index d5f1d848c4c4..df295a6cad9d 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -115,7 +115,7 @@ import { } from '@aztec/validator-client'; import { createWorldStateSynchronizer } from '@aztec/world-state'; -import { createPublicClient, fallback, http } from 'viem'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; import { createSentinel } from '../sentinel/factory.js'; import { Sentinel } from '../sentinel/sentinel.js'; diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index f1d70539924a..d7a49645bfdd 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -88,9 +88,9 @@ "@aztec/l1-artifacts": "workspace:^", "@aztec/protocol-contracts": "workspace:^", "@aztec/stdlib": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "axios": "^1.12.0", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/aztec.js/src/ethereum/portal_manager.ts b/yarn-project/aztec.js/src/ethereum/portal_manager.ts index 1a93a7c35433..43404ad24152 100644 --- a/yarn-project/aztec.js/src/ethereum/portal_manager.ts +++ b/yarn-project/aztec.js/src/ethereum/portal_manager.ts @@ -15,7 +15,7 @@ import { computeL2ToL1MessageHash, computeSecretHash } from '@aztec/stdlib/hash' import type { PXE } from '@aztec/stdlib/interfaces/client'; import { getL2ToL1MessageLeafId } from '@aztec/stdlib/messaging'; -import { type Hex, getContract, toFunctionSelector } from 'viem'; +import { type Hex, getContract, toFunctionSelector } from '@spalladino/viem'; import type { Wallet } from '../index.js'; diff --git a/yarn-project/aztec/package.json b/yarn-project/aztec/package.json index 1c73b3d8195d..61d861b0f531 100644 --- a/yarn-project/aztec/package.json +++ b/yarn-project/aztec/package.json @@ -59,13 +59,13 @@ "@aztec/telemetry-client": "workspace:^", "@aztec/txe": "workspace:^", "@aztec/world-state": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "@types/chalk": "^2.2.0", "abitype": "^0.8.11", "chalk": "^5.3.0", "commander": "^12.1.0", "koa": "^2.16.1", - "koa-router": "^13.1.1", - "viem": "2.23.7" + "koa-router": "^13.1.1" }, "files": [ "dest", diff --git a/yarn-project/aztec/src/examples/util.ts b/yarn-project/aztec/src/examples/util.ts index f94bbfe0fc1a..d4848b097fae 100644 --- a/yarn-project/aztec/src/examples/util.ts +++ b/yarn-project/aztec/src/examples/util.ts @@ -2,8 +2,8 @@ import { EthAddress } from '@aztec/aztec.js'; import type { ExtendedViemWalletClient } from '@aztec/ethereum'; import { jsonStringify } from '@aztec/foundation/json-rpc'; +import type { Hex } from '@spalladino/viem'; import type { Abi, Narrow } from 'abitype'; -import type { Hex } from 'viem'; /** * Helper function to deploy ETH contracts. diff --git a/yarn-project/aztec/src/sandbox/sandbox.ts b/yarn-project/aztec/src/sandbox/sandbox.ts index 1200c401b219..b5f7acadda18 100644 --- a/yarn-project/aztec/src/sandbox/sandbox.ts +++ b/yarn-project/aztec/src/sandbox/sandbox.ts @@ -31,9 +31,15 @@ import { } from '@aztec/telemetry-client'; import { getGenesisValues } from '@aztec/world-state/testing'; -import { type HDAccount, type PrivateKeyAccount, createPublicClient, fallback, http as httpViemTransport } from 'viem'; -import { mnemonicToAccount, privateKeyToAddress } from 'viem/accounts'; -import { foundry } from 'viem/chains'; +import { + type HDAccount, + type PrivateKeyAccount, + createPublicClient, + fallback, + http as httpViemTransport, +} from '@spalladino/viem'; +import { mnemonicToAccount, privateKeyToAddress } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import { createAccountLogs } from '../cli/util.js'; import { DefaultMnemonic } from '../mnemonic.js'; diff --git a/yarn-project/aztec/src/testing/anvil_test_watcher.ts b/yarn-project/aztec/src/testing/anvil_test_watcher.ts index 791263c4fb51..384f244d0d56 100644 --- a/yarn-project/aztec/src/testing/anvil_test_watcher.ts +++ b/yarn-project/aztec/src/testing/anvil_test_watcher.ts @@ -6,7 +6,7 @@ import { RunningPromise } from '@aztec/foundation/running-promise'; import type { TestDateProvider } from '@aztec/foundation/timer'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; -import { type GetContractReturnType, getAddress, getContract } from 'viem'; +import { type GetContractReturnType, getAddress, getContract } from '@spalladino/viem'; /** * Represents a watcher for a rollup contract. diff --git a/yarn-project/bb-prover/package.json b/yarn-project/bb-prover/package.json index ba17d4434ac7..b01ceba1c91e 100644 --- a/yarn-project/bb-prover/package.json +++ b/yarn-project/bb-prover/package.json @@ -92,14 +92,14 @@ "@aztec/noir-test-contracts.js": "workspace:^", "@aztec/protocol-contracts": "workspace:^", "@jest/globals": "^30.0.0", + "@spalladino/viem": "2.38.2-eip7594.0", "@types/jest": "^30.0.0", "@types/node": "^22.15.17", "@types/source-map-support": "^0.5.10", "jest": "^30.0.0", "jest-mock-extended": "^4.0.0", "ts-node": "^10.9.1", - "typescript": "^5.3.3", - "viem": "2.23.7" + "typescript": "^5.3.3" }, "files": [ "dest", diff --git a/yarn-project/blob-lib/package.json b/yarn-project/blob-lib/package.json index ab7b9dbb0e6d..8b2283e1297e 100644 --- a/yarn-project/blob-lib/package.json +++ b/yarn-project/blob-lib/package.json @@ -28,7 +28,7 @@ "dependencies": { "@aztec/constants": "workspace:^", "@aztec/foundation": "workspace:^", - "c-kzg": "4.0.0-alpha.1", + "c-kzg": "4.1.0", "tslib": "^2.4.0" }, "devDependencies": { diff --git a/yarn-project/blob-lib/src/blob.test.ts b/yarn-project/blob-lib/src/blob.test.ts index de6c6536158d..a2cab6d15828 100644 --- a/yarn-project/blob-lib/src/blob.test.ts +++ b/yarn-project/blob-lib/src/blob.test.ts @@ -21,7 +21,7 @@ const { } = cKzg; try { - loadTrustedSetup(); + loadTrustedSetup(8); } catch (error: any) { if (error.message.includes('trusted setup is already loaded')) { // NB: The c-kzg lib has no way of checking whether the setup is loaded or not, diff --git a/yarn-project/blob-lib/src/blob.ts b/yarn-project/blob-lib/src/blob.ts index 598f1d565f30..3ff6c24cc3e9 100644 --- a/yarn-project/blob-lib/src/blob.ts +++ b/yarn-project/blob-lib/src/blob.ts @@ -279,6 +279,7 @@ export class Blob { return { blobToKzgCommitment: cKzg.blobToKzgCommitment, computeBlobKzgProof: cKzg.computeBlobKzgProof, + computeCellsAndKzgProofs: cKzg.computeCellsAndKzgProofs, }; } diff --git a/yarn-project/blob-lib/src/blob_batching.test.ts b/yarn-project/blob-lib/src/blob_batching.test.ts index faa3eeb6fb03..c536a7c3a6b4 100644 --- a/yarn-project/blob-lib/src/blob_batching.test.ts +++ b/yarn-project/blob-lib/src/blob_batching.test.ts @@ -19,7 +19,7 @@ const trustedSetup = JSON.parse( const { FIELD_ELEMENTS_PER_BLOB, computeKzgProof, loadTrustedSetup, verifyKzgProof } = cKzg; try { - loadTrustedSetup(); + loadTrustedSetup(8); } catch (error: any) { if (error.message.includes('trusted setup is already loaded')) { // NB: The c-kzg lib has no way of checking whether the setup is loaded or not, diff --git a/yarn-project/blob-lib/src/blob_batching_public_inputs.test.ts b/yarn-project/blob-lib/src/blob_batching_public_inputs.test.ts index 8f4ea690f17c..8b4397bbe06b 100644 --- a/yarn-project/blob-lib/src/blob_batching_public_inputs.test.ts +++ b/yarn-project/blob-lib/src/blob_batching_public_inputs.test.ts @@ -15,7 +15,7 @@ import { import { makeBatchedBlobAccumulator, makeBlockBlobPublicInputs } from './testing.js'; try { - cKzg.loadTrustedSetup(); + cKzg.loadTrustedSetup(8); } catch (error: any) { if (error.message.includes('trusted setup is already loaded')) { // NB: The c-kzg lib has no way of checking whether the setup is loaded or not, diff --git a/yarn-project/blob-lib/src/index.ts b/yarn-project/blob-lib/src/index.ts index b6b53c7392af..6ddabf0bcb61 100644 --- a/yarn-project/blob-lib/src/index.ts +++ b/yarn-project/blob-lib/src/index.ts @@ -11,7 +11,7 @@ export * from './blob_batching_public_inputs.js'; export * from './sponge_blob.js'; try { - loadTrustedSetup(); + loadTrustedSetup(8); // See https://notes.ethereum.org/@jtraglia/windowed_multiplications } catch (error: any) { if (error.message.includes('trusted setup is already loaded')) { // NB: The c-kzg lib has no way of checking whether the setup is loaded or not, diff --git a/yarn-project/blob-lib/src/types.ts b/yarn-project/blob-lib/src/types.ts index 45cc5c026e4f..7011735df302 100644 --- a/yarn-project/blob-lib/src/types.ts +++ b/yarn-project/blob-lib/src/types.ts @@ -11,4 +11,6 @@ export interface BlobKzgInstance { blobToKzgCommitment(blob: Uint8Array): Uint8Array; /** Function to compute KZG proof for blob data */ computeBlobKzgProof(blob: Uint8Array, commitment: Uint8Array): Uint8Array; + /** Function to compute both blob data cells and their corresponding KZG proofs for EIP7594 */ + computeCellsAndKzgProofs(blob: Uint8Array): [Uint8Array[], Uint8Array[]]; } diff --git a/yarn-project/blob-sink/package.json b/yarn-project/blob-sink/package.json index e7ded4f1072c..438f5ea47506 100644 --- a/yarn-project/blob-sink/package.json +++ b/yarn-project/blob-sink/package.json @@ -64,11 +64,11 @@ "@aztec/kv-store": "workspace:*", "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:*", + "@spalladino/viem": "2.38.2-eip7594.0", "express": "^4.21.2", "snappy": "^7.2.2", "source-map-support": "^0.5.21", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/blob-sink/src/client/http.ts b/yarn-project/blob-sink/src/client/http.ts index aa5e4a3a23a5..c36a35b18657 100644 --- a/yarn-project/blob-sink/src/client/http.ts +++ b/yarn-project/blob-sink/src/client/http.ts @@ -3,7 +3,7 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { makeBackoff, retry } from '@aztec/foundation/retry'; import { bufferToHex } from '@aztec/foundation/string'; -import { type RpcBlock, createPublicClient, fallback, http } from 'viem'; +import { type RpcBlock, createPublicClient, fallback, http } from '@spalladino/viem'; import { createBlobArchiveClient } from '../archive/factory.js'; import type { BlobArchiveClient } from '../archive/interface.js'; diff --git a/yarn-project/blob-sink/src/client/tests.ts b/yarn-project/blob-sink/src/client/tests.ts index 69c457336e07..6417f9fc7de7 100644 --- a/yarn-project/blob-sink/src/client/tests.ts +++ b/yarn-project/blob-sink/src/client/tests.ts @@ -1,6 +1,6 @@ import { makeEncodedBlob } from '@aztec/blob-lib/testing'; -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; import type { BlobSinkClientInterface } from './interface.js'; diff --git a/yarn-project/blob-sink/src/types/api.ts b/yarn-project/blob-sink/src/types/api.ts index c59449e2209f..af2d1dad0bdf 100644 --- a/yarn-project/blob-sink/src/types/api.ts +++ b/yarn-project/blob-sink/src/types/api.ts @@ -1,4 +1,4 @@ -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; import { z } from 'zod'; export interface PostBlobSidecarRequest { diff --git a/yarn-project/cli/package.json b/yarn-project/cli/package.json index cd383c41e6a3..2e3074345a0c 100644 --- a/yarn-project/cli/package.json +++ b/yarn-project/cli/package.json @@ -83,13 +83,13 @@ "@aztec/world-state": "workspace:^", "@iarna/toml": "^2.2.5", "@libp2p/peer-id-factory": "^3.0.4", + "@spalladino/viem": "2.38.2-eip7594.0", "commander": "^12.1.0", "lodash.chunk": "^4.2.0", "lodash.groupby": "^4.6.0", "semver": "^7.5.4", "source-map-support": "^0.5.21", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@aztec/accounts": "workspace:^", diff --git a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts index d08ecbfffd65..906fda92e9db 100644 --- a/yarn-project/cli/src/cmds/infrastructure/sequencers.ts +++ b/yarn-project/cli/src/cmds/infrastructure/sequencers.ts @@ -3,8 +3,8 @@ import { GSEContract, RollupContract, createEthereumChain, getL1ContractsConfigE import type { LogFn, Logger } from '@aztec/foundation/log'; import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; -import { createPublicClient, createWalletClient, fallback, getContract, http } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; +import { createPublicClient, createWalletClient, fallback, getContract, http } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; export async function sequencers(opts: { command: 'list' | 'add' | 'remove' | 'who-next' | 'flush'; diff --git a/yarn-project/cli/src/cmds/l1/create_l1_account.ts b/yarn-project/cli/src/cmds/l1/create_l1_account.ts index 38e1815ba766..15db866e607f 100644 --- a/yarn-project/cli/src/cmds/l1/create_l1_account.ts +++ b/yarn-project/cli/src/cmds/l1/create_l1_account.ts @@ -1,6 +1,6 @@ import type { LogFn } from '@aztec/foundation/log'; -import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { generatePrivateKey, privateKeyToAccount } from '@spalladino/viem/accounts'; import { prettyPrintJSON } from '../../utils/commands.js'; diff --git a/yarn-project/cli/src/cmds/l1/get_l1_addresses.ts b/yarn-project/cli/src/cmds/l1/get_l1_addresses.ts index 6b0c693e9c67..f229d8168904 100644 --- a/yarn-project/cli/src/cmds/l1/get_l1_addresses.ts +++ b/yarn-project/cli/src/cmds/l1/get_l1_addresses.ts @@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/aztec.js'; import { RegistryContract, type ViemPublicClient, createEthereumChain } from '@aztec/ethereum'; import type { LogFn } from '@aztec/foundation/log'; -import { createPublicClient, fallback, http } from 'viem'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; export async function getL1Addresses( registryAddress: EthAddress, diff --git a/yarn-project/cli/src/cmds/l1/get_l1_balance.ts b/yarn-project/cli/src/cmds/l1/get_l1_balance.ts index 48b7138b0136..75f6297c1cab 100644 --- a/yarn-project/cli/src/cmds/l1/get_l1_balance.ts +++ b/yarn-project/cli/src/cmds/l1/get_l1_balance.ts @@ -3,7 +3,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address'; import type { LogFn } from '@aztec/foundation/log'; import { TestERC20Abi } from '@aztec/l1-artifacts'; -import { createPublicClient, fallback, getContract, http } from 'viem'; +import { createPublicClient, fallback, getContract, http } from '@spalladino/viem'; import { prettyPrintJSON } from '../../utils/commands.js'; diff --git a/yarn-project/cli/src/cmds/l1/prover_stats.ts b/yarn-project/cli/src/cmds/l1/prover_stats.ts index 5b84ac8c85cf..1964468cc92f 100644 --- a/yarn-project/cli/src/cmds/l1/prover_stats.ts +++ b/yarn-project/cli/src/cmds/l1/prover_stats.ts @@ -6,9 +6,9 @@ import { type LogFn, type Logger, createLogger } from '@aztec/foundation/log'; import { RollupAbi } from '@aztec/l1-artifacts'; import { createAztecNodeClient } from '@aztec/stdlib/interfaces/client'; +import { createPublicClient, fallback, getAbiItem, getAddress, http } from '@spalladino/viem'; import chunk from 'lodash.chunk'; import groupBy from 'lodash.groupby'; -import { createPublicClient, fallback, getAbiItem, getAddress, http } from 'viem'; export async function proverStats(opts: { l1RpcUrls: string[]; diff --git a/yarn-project/cli/src/cmds/l1/trigger_seed_snapshot.ts b/yarn-project/cli/src/cmds/l1/trigger_seed_snapshot.ts index 19f2850c6c7b..af84a2712af2 100644 --- a/yarn-project/cli/src/cmds/l1/trigger_seed_snapshot.ts +++ b/yarn-project/cli/src/cmds/l1/trigger_seed_snapshot.ts @@ -2,7 +2,7 @@ import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum'; import type { LogFn } from '@aztec/foundation/log'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; -import { getContract } from 'viem'; +import { getContract } from '@spalladino/viem'; import type { RollupCommandArgs } from './update_l1_validators.js'; diff --git a/yarn-project/cli/src/cmds/l1/update_l1_validators.ts b/yarn-project/cli/src/cmds/l1/update_l1_validators.ts index 9ac86e5b0d4c..066e3b0a1b28 100644 --- a/yarn-project/cli/src/cmds/l1/update_l1_validators.ts +++ b/yarn-project/cli/src/cmds/l1/update_l1_validators.ts @@ -14,8 +14,8 @@ import type { LogFn, Logger } from '@aztec/foundation/log'; import { RollupAbi, StakingAssetHandlerAbi } from '@aztec/l1-artifacts'; import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport'; -import { encodeFunctionData, formatEther, getContract } from 'viem'; -import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; +import { encodeFunctionData, formatEther, getContract } from '@spalladino/viem'; +import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; import { addLeadingHex } from '../../utils/aztec.js'; diff --git a/yarn-project/cli/src/utils/aztec.ts b/yarn-project/cli/src/utils/aztec.ts index a4fdb059430e..631045233bf2 100644 --- a/yarn-project/cli/src/utils/aztec.ts +++ b/yarn-project/cli/src/utils/aztec.ts @@ -63,7 +63,7 @@ export async function deployAztecContracts( debugLogger: Logger, ): Promise { const { createEthereumChain, deployL1Contracts } = await import('@aztec/ethereum'); - const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts'); + const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts'); const account = !privateKey ? mnemonicToAccount(mnemonic!, { addressIndex: mnemonicIndex }) @@ -112,7 +112,7 @@ export async function deployNewRollupContracts( logger: Logger, ): Promise<{ rollup: RollupContract; slashFactoryAddress: EthAddress }> { const { createEthereumChain, deployRollupForUpgrade, createExtendedL1Client } = await import('@aztec/ethereum'); - const { mnemonicToAccount, privateKeyToAccount } = await import('viem/accounts'); + const { mnemonicToAccount, privateKeyToAccount } = await import('@spalladino/viem/accounts'); const { getVKTreeRoot } = await import('@aztec/noir-protocol-circuits-types/vk-tree'); const account = !privateKey diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index bb964017d205..46d83d072af9 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -63,6 +63,7 @@ "@iarna/toml": "^2.2.5", "@jest/globals": "^30.0.0", "@noble/curves": "=1.0.0", + "@spalladino/viem": "2.38.2-eip7594.0", "@swc/core": "^1.4.11", "@swc/jest": "^0.2.36", "@types/fs-extra": "^11.0.2", @@ -96,7 +97,6 @@ "tslib": "^2.4.0", "typescript": "^5.3.3", "util": "^0.12.5", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/end-to-end/src/composed/e2e_token_bridge_tutorial_test.test.ts b/yarn-project/end-to-end/src/composed/e2e_token_bridge_tutorial_test.test.ts index 1696843692bb..bc7c4255f547 100644 --- a/yarn-project/end-to-end/src/composed/e2e_token_bridge_tutorial_test.test.ts +++ b/yarn-project/end-to-end/src/composed/e2e_token_bridge_tutorial_test.test.ts @@ -22,7 +22,7 @@ import { import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; -import { getContract } from 'viem'; +import { getContract } from '@spalladino/viem'; // docs:end:imports // docs:start:utils diff --git a/yarn-project/end-to-end/src/composed/integration_proof_verification.test.ts b/yarn-project/end-to-end/src/composed/integration_proof_verification.test.ts index e27a8dc5b956..4a77f23cac23 100644 --- a/yarn-project/end-to-end/src/composed/integration_proof_verification.test.ts +++ b/yarn-project/end-to-end/src/composed/integration_proof_verification.test.ts @@ -7,11 +7,11 @@ import { HonkVerifierAbi, HonkVerifierBytecode, IVerifierAbi } from '@aztec/l1-a import { Proof } from '@aztec/stdlib/proofs'; import { RootRollupPublicInputs } from '@aztec/stdlib/rollup'; +import { type GetContractReturnType, type Hex, getContract } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; import type { Anvil } from '@viem/anvil'; import { readFile } from 'fs/promises'; import { join } from 'path'; -import { type GetContractReturnType, type Hex, getContract } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; import { MNEMONIC } from '../fixtures/fixtures.js'; import { getACVMConfig } from '../fixtures/get_acvm_config.js'; diff --git a/yarn-project/end-to-end/src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts b/yarn-project/end-to-end/src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts index 833dd7b2c14d..c691aa33b9ee 100644 --- a/yarn-project/end-to-end/src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts +++ b/yarn-project/end-to-end/src/composed/web3signer/e2e_multi_validator_node_key_store.test.ts @@ -25,10 +25,10 @@ import type { ProposedBlockHeader, StateReference, Tx } from '@aztec/stdlib/tx'; import { NodeKeystoreAdapter, ValidatorClient } from '@aztec/validator-client'; import { jest } from '@jest/globals'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { mkdtemp, rmdir } from 'fs/promises'; import { tmpdir } from 'os'; import { join } from 'path'; -import { privateKeyToAccount } from 'viem/accounts'; import { addressForPrivateKey, diff --git a/yarn-project/end-to-end/src/composed/web3signer/integration_remote_signer.test.ts b/yarn-project/end-to-end/src/composed/web3signer/integration_remote_signer.test.ts index 4e7088ba3522..9bfb3be4c388 100644 --- a/yarn-project/end-to-end/src/composed/web3signer/integration_remote_signer.test.ts +++ b/yarn-project/end-to-end/src/composed/web3signer/integration_remote_signer.test.ts @@ -3,8 +3,8 @@ import { Buffer32 } from '@aztec/foundation/buffer'; import { LocalSigner, RemoteSigner } from '@aztec/node-keystore'; import { jest } from '@jest/globals'; -import type { TransactionSerializable, TypedDataDefinition } from 'viem'; -import { generatePrivateKey, privateKeyToAddress } from 'viem/accounts'; +import type { TransactionSerializable, TypedDataDefinition } from '@spalladino/viem'; +import { generatePrivateKey, privateKeyToAddress } from '@spalladino/viem/accounts'; import { createWeb3SignerKeystore, diff --git a/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts b/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts index 90d368f1a6b0..fb18680df57f 100644 --- a/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts +++ b/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts @@ -4,10 +4,10 @@ import { type ExtendedViemWalletClient, createExtendedL1Client } from '@aztec/et import { RollupContract } from '@aztec/ethereum/contracts'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; +import { parseEther } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { parseEther } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { MNEMONIC } from './fixtures/fixtures.js'; import { mintTokensToPrivate } from './fixtures/token_utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts index 2056fb9ae5ed..5de3bc1390e9 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts @@ -22,7 +22,7 @@ import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client'; -import { getContract } from 'viem'; +import { getContract } from '@spalladino/viem'; import { MNEMONIC } from '../fixtures/fixtures.js'; import { diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/l2_to_l1.test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/l2_to_l1.test.ts index a7a6ec01b209..49e9105d8742 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/l2_to_l1.test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/l2_to_l1.test.ts @@ -11,7 +11,7 @@ import { getL2ToL1MessageLeafId, } from '@aztec/stdlib/messaging'; -import { type Hex, decodeEventLog, getContract } from 'viem'; +import { type Hex, decodeEventLog, getContract } from '@spalladino/viem'; import type { CrossChainTestHarness } from '../shared/cross_chain_test_harness.js'; import { CrossChainMessagingTest } from './cross_chain_messaging_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_failure_cases.test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_failure_cases.test.ts index b83e63ca342d..55b5f5f30c04 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_failure_cases.test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_failure_cases.test.ts @@ -2,7 +2,7 @@ import { EthAddress, Fr, L1Actor, L1ToL2Message, L2Actor } from '@aztec/aztec.js import { RollupContract } from '@aztec/ethereum'; import { sha256ToField } from '@aztec/foundation/crypto'; -import { toFunctionSelector } from 'viem'; +import { toFunctionSelector } from '@spalladino/viem'; import { NO_L1_TO_L2_MSG_ERROR } from '../fixtures/fixtures.js'; import { CrossChainMessagingTest } from './cross_chain_messaging_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_first_slot.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_first_slot.test.ts index e849f372ed48..9c86b712b17a 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_first_slot.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_first_slot.test.ts @@ -10,7 +10,7 @@ import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam'; import { getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers'; import { jest } from '@jest/globals'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { type EndToEndContext, getPrivateKeyFromIndex } from '../fixtures/utils.js'; import { EpochsTestContext } from './epochs_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_high_tps_block_building.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_high_tps_block_building.test.ts index ee38f6fbab1e..7c21cf2c01b5 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_high_tps_block_building.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_high_tps_block_building.test.ts @@ -8,7 +8,7 @@ import { bufferToHex } from '@aztec/foundation/string'; import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam'; import { jest } from '@jest/globals'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { type EndToEndContext, getPrivateKeyFromIndex } from '../fixtures/utils.js'; import { EpochsTestContext } from './epochs_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_invalidate_block.parallel.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_invalidate_block.parallel.test.ts index db8ec65381b7..7aea5ebcc592 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_invalidate_block.parallel.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_invalidate_block.parallel.test.ts @@ -13,7 +13,7 @@ import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam'; import { OffenseType } from '@aztec/slasher'; import { jest } from '@jest/globals'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { type EndToEndContext, getPrivateKeyFromIndex } from '../fixtures/utils.js'; import { EpochsTestContext } from './epochs_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_l1_reorgs.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_l1_reorgs.test.ts index b01ae95a8376..8df7cc7e6df4 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_l1_reorgs.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_l1_reorgs.test.ts @@ -12,8 +12,8 @@ import { executeTimeout } from '@aztec/foundation/timer'; import type { ProverNode } from '@aztec/prover-node'; import { jest } from '@jest/globals'; +import { keccak256, parseTransaction } from '@spalladino/viem'; import 'jest-extended'; -import { keccak256, parseTransaction } from 'viem'; import { sendL1ToL2Message } from '../fixtures/l1_to_l2_messaging.js'; import type { EndToEndContext } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_simple_block_building.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_simple_block_building.test.ts index d621900854e9..b63b3f60f796 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_simple_block_building.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_simple_block_building.test.ts @@ -9,7 +9,7 @@ import { executeTimeout } from '@aztec/foundation/timer'; import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam'; import { jest } from '@jest/globals'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { type EndToEndContext, getPrivateKeyFromIndex } from '../fixtures/utils.js'; import { EpochsTestContext } from './epochs_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_test.ts index c7b2d2e62b96..8131d3e3e714 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_test.ts @@ -31,9 +31,9 @@ import { EthAddress, type L2BlockNumber } from '@aztec/stdlib/block'; import { type L1RollupConstants, getProofSubmissionDeadlineTimestamp } from '@aztec/stdlib/epoch-helpers'; import { tryStop } from '@aztec/stdlib/interfaces/server'; +import type { Hex } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { join } from 'path'; -import type { Hex } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; import { type EndToEndContext, diff --git a/yarn-project/end-to-end/src/e2e_fees/bridging_race.notest.ts b/yarn-project/end-to-end/src/e2e_fees/bridging_race.notest.ts index 1d7bbea91fc1..a5d937f7492f 100644 --- a/yarn-project/end-to-end/src/e2e_fees/bridging_race.notest.ts +++ b/yarn-project/end-to-end/src/e2e_fees/bridging_race.notest.ts @@ -4,7 +4,7 @@ import { Fq } from '@aztec/foundation/fields'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; import { jest } from '@jest/globals'; -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; import { FeesTest } from './fees_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_fees/fees_test.ts b/yarn-project/end-to-end/src/e2e_fees/fees_test.ts index 3280162e0c6a..5ee05bef052c 100644 --- a/yarn-project/end-to-end/src/e2e_fees/fees_test.ts +++ b/yarn-project/end-to-end/src/e2e_fees/fees_test.ts @@ -23,7 +23,7 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import { getCanonicalFeeJuice } from '@aztec/protocol-contracts/fee-juice'; import { GasSettings } from '@aztec/stdlib/gas'; -import { getContract } from 'viem'; +import { getContract } from '@spalladino/viem'; import { MNEMONIC } from '../fixtures/fixtures.js'; import { diff --git a/yarn-project/end-to-end/src/e2e_l1_publisher/e2e_l1_publisher.test.ts b/yarn-project/end-to-end/src/e2e_l1_publisher/e2e_l1_publisher.test.ts index 896bf2fde059..cd5f33854214 100644 --- a/yarn-project/end-to-end/src/e2e_l1_publisher/e2e_l1_publisher.test.ts +++ b/yarn-project/end-to-end/src/e2e_l1_publisher/e2e_l1_publisher.test.ts @@ -58,8 +58,6 @@ import { } from '@aztec/world-state'; import { beforeEach, describe, expect, it, jest } from '@jest/globals'; -import type { Anvil } from '@viem/anvil'; -import { type MockProxy, mock } from 'jest-mock-extended'; import { type Address, type GetContractReturnType, @@ -68,9 +66,11 @@ import { getAddress, getContract, multicall3Abi, -} from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; +import type { Anvil } from '@viem/anvil'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { sendL1ToL2Message } from '../fixtures/l1_to_l2_messaging.js'; import { setupL1Contracts } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_l1_with_wall_time.test.ts b/yarn-project/end-to-end/src/e2e_l1_with_wall_time.test.ts index 4b9a984ce742..3dcb28cfbf63 100644 --- a/yarn-project/end-to-end/src/e2e_l1_with_wall_time.test.ts +++ b/yarn-project/end-to-end/src/e2e_l1_with_wall_time.test.ts @@ -4,7 +4,7 @@ import { SecretValue } from '@aztec/foundation/config'; import type { PXEService } from '@aztec/pxe/server'; import { jest } from '@jest/globals'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { getPrivateKeyFromIndex, setup } from './fixtures/utils.js'; import { submitTxsTo } from './shared/submit-transactions.js'; diff --git a/yarn-project/end-to-end/src/e2e_multi_eoa.test.ts b/yarn-project/end-to-end/src/e2e_multi_eoa.test.ts index 9865c3ae72ec..87123cf74486 100644 --- a/yarn-project/end-to-end/src/e2e_multi_eoa.test.ts +++ b/yarn-project/end-to-end/src/e2e_multi_eoa.test.ts @@ -11,9 +11,9 @@ import type { TestSequencerClient } from '@aztec/sequencer-client/test'; import type { AztecNodeAdmin, PXE } from '@aztec/stdlib/interfaces/client'; import { jest } from '@jest/globals'; +import { type Hex, type TransactionSerialized, recoverTransactionAddress } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; import 'jest-extended'; -import { type Hex, type TransactionSerialized, recoverTransactionAddress } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; import { MNEMONIC } from './fixtures/fixtures.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_multi_validator/e2e_multi_validator_node.test.ts b/yarn-project/end-to-end/src/e2e_multi_validator/e2e_multi_validator_node.test.ts index c801265fcb2d..9c708cc1cdb5 100644 --- a/yarn-project/end-to-end/src/e2e_multi_validator/e2e_multi_validator_node.test.ts +++ b/yarn-project/end-to-end/src/e2e_multi_validator/e2e_multi_validator_node.test.ts @@ -23,8 +23,8 @@ import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; import { StatefulTestContractArtifact } from '@aztec/noir-test-contracts.js/StatefulTest'; import { BlockAttestation, ConsensusPayload } from '@aztec/stdlib/p2p'; -import { getContract } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; +import { getContract } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { getPrivateKeyFromIndex, setup } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_multi_validator/utils.ts b/yarn-project/end-to-end/src/e2e_multi_validator/utils.ts index 4dd7e3371704..b29bb3f6dc73 100644 --- a/yarn-project/end-to-end/src/e2e_multi_validator/utils.ts +++ b/yarn-project/end-to-end/src/e2e_multi_validator/utils.ts @@ -3,9 +3,9 @@ import { getAddressFromPrivateKey } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; import type { EthPrivateKey } from '@aztec/node-keystore'; +import { signMessage, signTypedData } from '@spalladino/viem/accounts'; import { writeFile } from 'fs/promises'; import { createServer } from 'http'; -import { signMessage, signTypedData } from 'viem/accounts'; // Create a mock JSON RPC signer // Only supports signing messages and type data diff --git a/yarn-project/end-to-end/src/e2e_p2p/add_rollup.test.ts b/yarn-project/end-to-end/src/e2e_p2p/add_rollup.test.ts index eeb606216e99..fdd8fe9cd095 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/add_rollup.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/add_rollup.test.ts @@ -32,11 +32,11 @@ import { computeL2ToL1MembershipWitness, getL2ToL1MessageLeafId } from '@aztec/s import { getGenesisValues } from '@aztec/world-state/testing'; import { jest } from '@jest/globals'; +import { type Hex, decodeEventLog, encodeFunctionData, getAddress, getContract } from '@spalladino/viem'; import fs from 'fs'; import getPort from 'get-port'; import os from 'os'; import path from 'path'; -import { type Hex, decodeEventLog, encodeFunctionData, getAddress, getContract } from 'viem'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { sendL1ToL2Message } from '../fixtures/l1_to_l2_messaging.js'; diff --git a/yarn-project/end-to-end/src/e2e_p2p/gossip_network_no_cheat.test.ts b/yarn-project/end-to-end/src/e2e_p2p/gossip_network_no_cheat.test.ts index 8bde293b6c12..b013532edd23 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/gossip_network_no_cheat.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/gossip_network_no_cheat.test.ts @@ -11,10 +11,10 @@ import { BlockAttestation, ConsensusPayload } from '@aztec/stdlib/p2p'; import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport'; import { jest } from '@jest/globals'; +import { getContract } from '@spalladino/viem'; import fs from 'fs'; import os from 'os'; import path from 'path'; -import { getContract } from 'viem'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { type NodeContext, createNodes } from '../fixtures/setup_p2p_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts b/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts index 5074bf141aa0..0b886d7967f3 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts @@ -28,9 +28,9 @@ import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees'; import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport'; import { getGenesisValues } from '@aztec/world-state/testing'; +import { type GetContractReturnType, getAddress, getContract } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import getPort from 'get-port'; -import { type GetContractReturnType, getAddress, getContract } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; import { ATTESTER_PRIVATE_KEYS_START_INDEX, diff --git a/yarn-project/end-to-end/src/e2e_p2p/slash_veto_demo.test.ts b/yarn-project/end-to-end/src/e2e_p2p/slash_veto_demo.test.ts index e3fb667ed477..4abf5a657b60 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/slash_veto_demo.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/slash_veto_demo.test.ts @@ -20,12 +20,12 @@ import { GSEAbi } from '@aztec/l1-artifacts/GSEAbi'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; import { SlasherAbi } from '@aztec/l1-artifacts/SlasherAbi'; +import { encodeFunctionData, getContract } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import assert from 'assert'; import fs from 'fs'; import os from 'os'; import path from 'path'; -import { encodeFunctionData, getContract } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; import { createNodes } from '../fixtures/setup_p2p_test.js'; import { getPrivateKeyFromIndex } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts b/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts index 5523f9974e8f..69054eea986b 100644 --- a/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p/upgrade_governance_proposer.test.ts @@ -9,10 +9,10 @@ import { } from '@aztec/l1-artifacts'; import { jest } from '@jest/globals'; +import { encodeFunctionData, getAddress, getContract } from '@spalladino/viem'; import fs from 'fs'; import os from 'os'; import path from 'path'; -import { encodeFunctionData, getAddress, getContract } from 'viem'; import { shouldCollectMetrics } from '../fixtures/fixtures.js'; import { createNodes } from '../fixtures/setup_p2p_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_prover/client.test.ts b/yarn-project/end-to-end/src/e2e_prover/client.test.ts index 24b939daec02..0cfd5d256e78 100644 --- a/yarn-project/end-to-end/src/e2e_prover/client.test.ts +++ b/yarn-project/end-to-end/src/e2e_prover/client.test.ts @@ -4,7 +4,7 @@ import { parseBooleanEnv } from '@aztec/foundation/config'; import { FeeJuicePortalAbi, TestERC20Abi } from '@aztec/l1-artifacts'; import '@jest/globals'; -import { type GetContractReturnType, getContract } from 'viem'; +import { type GetContractReturnType, getContract } from '@spalladino/viem'; import { FullProverTest } from '../fixtures/e2e_prover_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_prover/full.test.ts b/yarn-project/end-to-end/src/e2e_prover/full.test.ts index 717c1d9e3285..79410234c28a 100644 --- a/yarn-project/end-to-end/src/e2e_prover/full.test.ts +++ b/yarn-project/end-to-end/src/e2e_prover/full.test.ts @@ -12,7 +12,7 @@ import { TX_ERROR_INVALID_PROOF } from '@aztec/stdlib/tx'; import TOML from '@iarna/toml'; import '@jest/globals'; -import { type GetContractReturnType, getContract } from 'viem'; +import { type GetContractReturnType, getContract } from '@spalladino/viem'; import { FullProverTest } from '../fixtures/e2e_prover_test.js'; diff --git a/yarn-project/end-to-end/src/e2e_public_testnet/e2e_public_testnet_transfer.test.ts b/yarn-project/end-to-end/src/e2e_public_testnet/e2e_public_testnet_transfer.test.ts index e7979cbe9213..f0dc30b50e4b 100644 --- a/yarn-project/end-to-end/src/e2e_public_testnet/e2e_public_testnet_transfer.test.ts +++ b/yarn-project/end-to-end/src/e2e_public_testnet/e2e_public_testnet_transfer.test.ts @@ -1,7 +1,7 @@ import type { AccountWalletWithSecretKey, AztecAddress, Logger } from '@aztec/aztec.js'; import { PrivateTokenContract } from '@aztec/noir-contracts.js/PrivateToken'; -import { foundry, sepolia } from 'viem/chains'; +import { foundry, sepolia } from '@spalladino/viem/chains'; import { setup } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_sequencer/gov_proposal.test.ts b/yarn-project/end-to-end/src/e2e_sequencer/gov_proposal.test.ts index fe7a230fed73..7a8d60207ce9 100644 --- a/yarn-project/end-to-end/src/e2e_sequencer/gov_proposal.test.ts +++ b/yarn-project/end-to-end/src/e2e_sequencer/gov_proposal.test.ts @@ -15,7 +15,7 @@ import { NewGovernanceProposerPayloadBytecode } from '@aztec/l1-artifacts/NewGov import { TestContract } from '@aztec/noir-test-contracts.js/Test'; import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client'; -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import { getPrivateKeyFromIndex, setup } from '../fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_synching.test.ts b/yarn-project/end-to-end/src/e2e_synching.test.ts index 107890004b7a..113d2ec1b245 100644 --- a/yarn-project/end-to-end/src/e2e_synching.test.ts +++ b/yarn-project/end-to-end/src/e2e_synching.test.ts @@ -69,9 +69,9 @@ import { CommitteeAttestationsAndSigners, L2Block } from '@aztec/stdlib/block'; import { tryStop } from '@aztec/stdlib/interfaces/server'; import { createWorldStateSynchronizer } from '@aztec/world-state'; +import { getContract } from '@spalladino/viem'; import * as fs from 'fs'; import { type MockProxy, mock } from 'jest-mock-extended'; -import { getContract } from 'viem'; import { DEFAULT_BLOB_SINK_PORT } from './fixtures/fixtures.js'; import { mintTokensToPrivate } from './fixtures/token_utils.js'; diff --git a/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts b/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts index 7ae116d4ab8f..807106bfc515 100644 --- a/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts +++ b/yarn-project/end-to-end/src/fixtures/e2e_prover_test.ts @@ -33,8 +33,8 @@ import type { PXEService } from '@aztec/pxe/server'; import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client'; import { getGenesisValues } from '@aztec/world-state/testing'; -import { type Hex, getContract } from 'viem'; -import { privateKeyToAddress } from 'viem/accounts'; +import { type Hex, getContract } from '@spalladino/viem'; +import { privateKeyToAddress } from '@spalladino/viem/accounts'; import { TokenSimulator } from '../simulators/token_simulator.js'; import { getACVMConfig } from './get_acvm_config.js'; diff --git a/yarn-project/end-to-end/src/fixtures/l1_to_l2_messaging.ts b/yarn-project/end-to-end/src/fixtures/l1_to_l2_messaging.ts index 662fa37e87a5..2c2ac956d18e 100644 --- a/yarn-project/end-to-end/src/fixtures/l1_to_l2_messaging.ts +++ b/yarn-project/end-to-end/src/fixtures/l1_to_l2_messaging.ts @@ -4,7 +4,7 @@ import { tryJsonStringify } from '@aztec/foundation/json-rpc'; import { InboxAbi } from '@aztec/l1-artifacts'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; -import { decodeEventLog, getContract } from 'viem'; +import { decodeEventLog, getContract } from '@spalladino/viem'; import { getLogger } from './utils.js'; diff --git a/yarn-project/end-to-end/src/fixtures/setup_l1_contracts.ts b/yarn-project/end-to-end/src/fixtures/setup_l1_contracts.ts index 8091ebdd456d..701dfc196eca 100644 --- a/yarn-project/end-to-end/src/fixtures/setup_l1_contracts.ts +++ b/yarn-project/end-to-end/src/fixtures/setup_l1_contracts.ts @@ -3,8 +3,8 @@ import { type DeployL1ContractsArgs, type L1ContractsConfig, deployL1Contracts } import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree'; import { protocolContractTreeRoot } from '@aztec/protocol-contracts'; -import type { HDAccount, PrivateKeyAccount } from 'viem'; -import { foundry } from 'viem/chains'; +import type { HDAccount, PrivateKeyAccount } from '@spalladino/viem'; +import { foundry } from '@spalladino/viem/chains'; export { deployAndInitializeTokenAndBridgeContracts } from '../shared/cross_chain_test_harness.js'; diff --git a/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts b/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts index 9be6339cf98a..357aa6efd16a 100644 --- a/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts +++ b/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts @@ -40,6 +40,9 @@ import { tryStop } from '@aztec/stdlib/interfaces/server'; import { getConfigEnvVars as getTelemetryConfig, initTelemetryClient } from '@aztec/telemetry-client'; import { getGenesisValues } from '@aztec/world-state/testing'; +import type { Hex } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs'; import { copySync, removeSync } from 'fs-extra/esm'; @@ -47,9 +50,6 @@ import fs from 'fs/promises'; import getPort from 'get-port'; import { tmpdir } from 'os'; import path, { join } from 'path'; -import type { Hex } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { MNEMONIC, TEST_MAX_TX_POOL_SIZE, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js'; import { getACVMConfig } from './get_acvm_config.js'; diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index fd6f1212ad9d..d6d476422560 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -93,14 +93,14 @@ import { import { BenchmarkTelemetryClient } from '@aztec/telemetry-client/bench'; import { getGenesisValues } from '@aztec/world-state/testing'; +import { type Chain, type HDAccount, type Hex, type PrivateKeyAccount, getContract } from '@spalladino/viem'; +import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; import fs from 'fs/promises'; import getPort from 'get-port'; import { tmpdir } from 'os'; import * as path from 'path'; -import { type Chain, type HDAccount, type Hex, type PrivateKeyAccount, getContract } from 'viem'; -import { generatePrivateKey, mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { MNEMONIC, TEST_PEER_CHECK_INTERVAL_MS } from './fixtures.js'; import { getACVMConfig } from './get_acvm_config.js'; diff --git a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts index 8d7859a560ae..7e85bbac1817 100644 --- a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts @@ -23,7 +23,7 @@ import { TestERC20Abi, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-art import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; -import { type Hex, getContract } from 'viem'; +import { type Hex, getContract } from '@spalladino/viem'; import { mintTokensToPrivate } from '../fixtures/token_utils.js'; diff --git a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts index 07273f929131..4cddc0cd4ac7 100644 --- a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts +++ b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts @@ -24,7 +24,7 @@ import { computeL2ToL1MessageHash } from '@aztec/stdlib/hash'; import { computeL2ToL1MembershipWitness } from '@aztec/stdlib/messaging'; import { jest } from '@jest/globals'; -import { type GetContractReturnType, getContract, parseEther, toFunctionSelector } from 'viem'; +import { type GetContractReturnType, getContract, parseEther, toFunctionSelector } from '@spalladino/viem'; import { ensureAccountContractsPublished } from '../fixtures/utils.js'; import { CrossChainTestHarness } from './cross_chain_test_harness.js'; diff --git a/yarn-project/end-to-end/src/spartan/smoke.test.ts b/yarn-project/end-to-end/src/spartan/smoke.test.ts index 4eb0f3600f5a..8f826cb421d7 100644 --- a/yarn-project/end-to-end/src/spartan/smoke.test.ts +++ b/yarn-project/end-to-end/src/spartan/smoke.test.ts @@ -2,8 +2,8 @@ import { type PXE, retryUntil } from '@aztec/aztec.js'; import { RollupContract, type ViemPublicClient, createEthereumChain } from '@aztec/ethereum'; import { createLogger } from '@aztec/foundation/log'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; import type { ChildProcess } from 'child_process'; -import { createPublicClient, fallback, http } from 'viem'; import { startCompatiblePXE } from './setup_test_wallets.js'; import { diff --git a/yarn-project/end-to-end/src/spartan/upgrade_governance_proposer.test.ts b/yarn-project/end-to-end/src/spartan/upgrade_governance_proposer.test.ts index 7892234ca349..60e851ce89cd 100644 --- a/yarn-project/end-to-end/src/spartan/upgrade_governance_proposer.test.ts +++ b/yarn-project/end-to-end/src/spartan/upgrade_governance_proposer.test.ts @@ -12,8 +12,8 @@ // import { NewGovernanceProposerPayloadBytecode } from '@aztec/l1-artifacts/NewGovernanceProposerPayloadBytecode'; // import type { ChildProcess } from 'child_process'; -// import { privateKeyToAccount } from 'viem/accounts'; -// import { parseEther, stringify } from 'viem/utils'; +// import { privateKeyToAccount } from '@spalladino/viem/accounts'; +// import { parseEther, stringify } from '@spalladino/viem/utils'; // import { MNEMONIC } from '../fixtures/fixtures.js'; // import { isK8sConfig, setupEnvironment, startPortForward, updateSequencersConfig } from './utils.js'; diff --git a/yarn-project/end-to-end/src/spartan/utils.ts b/yarn-project/end-to-end/src/spartan/utils.ts index bae4c080dd5d..0f2b6c771a15 100644 --- a/yarn-project/end-to-end/src/spartan/utils.ts +++ b/yarn-project/end-to-end/src/spartan/utils.ts @@ -11,10 +11,10 @@ import { createAztecNodeClient, } from '@aztec/stdlib/interfaces/client'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; import { ChildProcess, exec, execSync, spawn } from 'child_process'; import path from 'path'; import { promisify } from 'util'; -import { createPublicClient, fallback, http } from 'viem'; import { z } from 'zod'; const execAsync = promisify(exec); diff --git a/yarn-project/epoch-cache/package.json b/yarn-project/epoch-cache/package.json index 02c5ffec103a..f38a4ba1d601 100644 --- a/yarn-project/epoch-cache/package.json +++ b/yarn-project/epoch-cache/package.json @@ -30,12 +30,12 @@ "@aztec/foundation": "workspace:^", "@aztec/l1-artifacts": "workspace:^", "@aztec/stdlib": "workspace:*", + "@spalladino/viem": "2.38.2-eip7594.0", "@viem/anvil": "^0.0.10", "dotenv": "^16.0.3", "get-port": "^7.1.0", "jest-mock-extended": "^4.0.0", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/epoch-cache/src/epoch_cache.ts b/yarn-project/epoch-cache/src/epoch_cache.ts index 635052c3df52..3044d6094375 100644 --- a/yarn-project/epoch-cache/src/epoch_cache.ts +++ b/yarn-project/epoch-cache/src/epoch_cache.ts @@ -13,7 +13,7 @@ import { getTimestampRangeForEpoch, } from '@aztec/stdlib/epoch-helpers'; -import { createPublicClient, encodeAbiParameters, fallback, http, keccak256 } from 'viem'; +import { createPublicClient, encodeAbiParameters, fallback, http, keccak256 } from '@spalladino/viem'; import { type EpochCacheConfig, getEpochCacheConfigEnvVars } from './config.js'; diff --git a/yarn-project/ethereum/package.json b/yarn-project/ethereum/package.json index 04a205409707..6df0e23d50b1 100644 --- a/yarn-project/ethereum/package.json +++ b/yarn-project/ethereum/package.json @@ -35,12 +35,12 @@ "@aztec/constants": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l1-artifacts": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "@viem/anvil": "^0.0.10", "dotenv": "^16.0.3", "lodash.chunk": "^4.2.0", "lodash.pickby": "^4.5.0", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/ethereum/src/account.ts b/yarn-project/ethereum/src/account.ts index b41797f6e48b..f76e0a555fb2 100644 --- a/yarn-project/ethereum/src/account.ts +++ b/yarn-project/ethereum/src/account.ts @@ -1,4 +1,4 @@ -import { privateKeyToAccount } from 'viem/accounts'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; export function getAddressFromPrivateKey(privateKey: `0x${string}`): `0x${string}` { return privateKeyToAccount(privateKey).address; diff --git a/yarn-project/ethereum/src/chain.ts b/yarn-project/ethereum/src/chain.ts index 8fd340265c9f..aee959047cfc 100644 --- a/yarn-project/ethereum/src/chain.ts +++ b/yarn-project/ethereum/src/chain.ts @@ -1,5 +1,5 @@ -import type { Chain } from 'viem'; -import { foundry } from 'viem/chains'; +import type { Chain } from '@spalladino/viem'; +import { foundry } from '@spalladino/viem/chains'; import { AZTEC_TEST_CHAIN_ID } from './constants.js'; diff --git a/yarn-project/ethereum/src/client.ts b/yarn-project/ethereum/src/client.ts index 80aaa021c621..89d516d5c614 100644 --- a/yarn-project/ethereum/src/client.ts +++ b/yarn-project/ethereum/src/client.ts @@ -11,9 +11,9 @@ import { fallback, http, publicActions, -} from 'viem'; -import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import { createEthereumChain } from './chain.js'; import type { ExtendedViemWalletClient, ViemPublicClient } from './types.js'; diff --git a/yarn-project/ethereum/src/constants.ts b/yarn-project/ethereum/src/constants.ts index a521ab80bfbe..ba93963c6874 100644 --- a/yarn-project/ethereum/src/constants.ts +++ b/yarn-project/ethereum/src/constants.ts @@ -1,4 +1,4 @@ -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; export const NULL_KEY: Hex = `0x${'0000000000000000000000000000000000000000000000000000000000000000'}`; export const AZTEC_TEST_CHAIN_ID = 677692; diff --git a/yarn-project/ethereum/src/contracts/empire_base.ts b/yarn-project/ethereum/src/contracts/empire_base.ts index fbad6d8880b0..69f270e3e676 100644 --- a/yarn-project/ethereum/src/contracts/empire_base.ts +++ b/yarn-project/ethereum/src/contracts/empire_base.ts @@ -2,7 +2,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address'; import { Signature } from '@aztec/foundation/eth-signature'; import { EmpireBaseAbi } from '@aztec/l1-artifacts/EmpireBaseAbi'; -import { type Hex, type TypedDataDefinition, encodeFunctionData } from 'viem'; +import { type Hex, type TypedDataDefinition, encodeFunctionData } from '@spalladino/viem'; import type { L1TxRequest } from '../l1_tx_utils/index.js'; diff --git a/yarn-project/ethereum/src/contracts/empire_slashing_proposer.ts b/yarn-project/ethereum/src/contracts/empire_slashing_proposer.ts index 5bfe4c2185fa..c9e7fd7fa412 100644 --- a/yarn-project/ethereum/src/contracts/empire_slashing_proposer.ts +++ b/yarn-project/ethereum/src/contracts/empire_slashing_proposer.ts @@ -3,7 +3,6 @@ import { createLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; import { EmpireSlashingProposerAbi } from '@aztec/l1-artifacts/EmpireSlashingProposerAbi'; -import EventEmitter from 'events'; import { type EncodeFunctionDataParameters, type GetContractReturnType, @@ -12,7 +11,8 @@ import { type TypedDataDefinition, encodeFunctionData, getContract, -} from 'viem'; +} from '@spalladino/viem'; +import EventEmitter from 'events'; import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js'; import type { ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/fee_asset_handler.test.ts b/yarn-project/ethereum/src/contracts/fee_asset_handler.test.ts index 1fa34c77799c..dad5ac553200 100644 --- a/yarn-project/ethereum/src/contracts/fee_asset_handler.test.ts +++ b/yarn-project/ethereum/src/contracts/fee_asset_handler.test.ts @@ -3,11 +3,11 @@ import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { TestERC20Abi as FeeAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi'; +import { type GetContractReturnType, getContract } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; import omit from 'lodash.omit'; -import { type GetContractReturnType, getContract } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { createExtendedL1Client } from '../client.js'; import { DefaultL1ContractsConfig } from '../config.js'; diff --git a/yarn-project/ethereum/src/contracts/fee_asset_handler.ts b/yarn-project/ethereum/src/contracts/fee_asset_handler.ts index 8de4224f63ef..af3962d680d5 100644 --- a/yarn-project/ethereum/src/contracts/fee_asset_handler.ts +++ b/yarn-project/ethereum/src/contracts/fee_asset_handler.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { FeeAssetHandlerAbi } from '@aztec/l1-artifacts/FeeAssetHandlerAbi'; -import { type Hex, encodeFunctionData, getContract } from 'viem'; +import { type Hex, encodeFunctionData, getContract } from '@spalladino/viem'; import type { L1TxUtils } from '../l1_tx_utils/index.js'; diff --git a/yarn-project/ethereum/src/contracts/fee_juice.ts b/yarn-project/ethereum/src/contracts/fee_juice.ts index 62d73f7b4c89..9c56f8521a97 100644 --- a/yarn-project/ethereum/src/contracts/fee_juice.ts +++ b/yarn-project/ethereum/src/contracts/fee_juice.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts/TestERC20Abi'; -import { type GetContractReturnType, type Hex, getContract } from 'viem'; +import { type GetContractReturnType, type Hex, getContract } from '@spalladino/viem'; import { type ExtendedViemWalletClient, type ViemClient, isExtendedClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/governance.test.ts b/yarn-project/ethereum/src/contracts/governance.test.ts index a4f7e60a826e..5ce78fa64fcb 100644 --- a/yarn-project/ethereum/src/contracts/governance.test.ts +++ b/yarn-project/ethereum/src/contracts/governance.test.ts @@ -2,9 +2,9 @@ import { createExtendedL1Client, getPublicClient } from '@aztec/ethereum'; import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { DefaultL1ContractsConfig } from '../config.js'; import { deployL1Contracts } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/contracts/governance.ts b/yarn-project/ethereum/src/contracts/governance.ts index d6f1c8dc5338..ac69b5f65825 100644 --- a/yarn-project/ethereum/src/contracts/governance.ts +++ b/yarn-project/ethereum/src/contracts/governance.ts @@ -11,7 +11,7 @@ import { encodeFunctionData, getContract, parseEventLogs, -} from 'viem'; +} from '@spalladino/viem'; import type { L1ContractAddresses } from '../l1_contract_addresses.js'; import { createL1TxUtilsFromViemWallet } from '../l1_tx_utils/index.js'; diff --git a/yarn-project/ethereum/src/contracts/governance_proposer.ts b/yarn-project/ethereum/src/contracts/governance_proposer.ts index a1fb721c61dc..b396b29a711a 100644 --- a/yarn-project/ethereum/src/contracts/governance_proposer.ts +++ b/yarn-project/ethereum/src/contracts/governance_proposer.ts @@ -9,7 +9,7 @@ import { type TypedDataDefinition, encodeFunctionData, getContract, -} from 'viem'; +} from '@spalladino/viem'; import type { L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js'; import type { ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/gse.test.ts b/yarn-project/ethereum/src/contracts/gse.test.ts index 3111a5d4cc20..3e435bad0a44 100644 --- a/yarn-project/ethereum/src/contracts/gse.test.ts +++ b/yarn-project/ethereum/src/contracts/gse.test.ts @@ -2,9 +2,9 @@ import { GSEContract, getPublicClient } from '@aztec/ethereum'; import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { DefaultL1ContractsConfig } from '../config.js'; import { deployL1Contracts } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/contracts/gse.ts b/yarn-project/ethereum/src/contracts/gse.ts index 7f6a6df8962a..f5106e4a4ceb 100644 --- a/yarn-project/ethereum/src/contracts/gse.ts +++ b/yarn-project/ethereum/src/contracts/gse.ts @@ -3,7 +3,7 @@ import { GSEAbi } from '@aztec/l1-artifacts/GSEAbi'; import type { ProjPointType } from '@noble/curves/abstract/weierstrass'; import { bn254 } from '@noble/curves/bn254'; -import { type GetContractReturnType, type Hex, getContract } from 'viem'; +import { type GetContractReturnType, type Hex, getContract } from '@spalladino/viem'; import type { ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/inbox.ts b/yarn-project/ethereum/src/contracts/inbox.ts index 6fe2038d4b2f..6aa71bb2ba57 100644 --- a/yarn-project/ethereum/src/contracts/inbox.ts +++ b/yarn-project/ethereum/src/contracts/inbox.ts @@ -2,7 +2,7 @@ import { Buffer16 } from '@aztec/foundation/buffer'; import { EthAddress } from '@aztec/foundation/eth-address'; import { InboxAbi } from '@aztec/l1-artifacts/InboxAbi'; -import { type BlockTag, type GetContractReturnType, type Hex, getContract } from 'viem'; +import { type BlockTag, type GetContractReturnType, type Hex, getContract } from '@spalladino/viem'; import { getPublicClient } from '../client.js'; import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/contracts/multicall.test.ts b/yarn-project/ethereum/src/contracts/multicall.test.ts index d898af2a5915..8fda743f2df1 100644 --- a/yarn-project/ethereum/src/contracts/multicall.test.ts +++ b/yarn-project/ethereum/src/contracts/multicall.test.ts @@ -5,10 +5,10 @@ import { GovernanceProposerAbi } from '@aztec/l1-artifacts/GovernanceProposerAbi import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi'; import { TestERC20Bytecode } from '@aztec/l1-artifacts/TestERC20Bytecode'; +import { type GetContractReturnType, type PrivateKeyAccount, encodeFunctionData, getContract } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type GetContractReturnType, type PrivateKeyAccount, encodeFunctionData, getContract } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { createExtendedL1Client } from '../client.js'; import { DefaultL1ContractsConfig } from '../config.js'; diff --git a/yarn-project/ethereum/src/contracts/multicall.ts b/yarn-project/ethereum/src/contracts/multicall.ts index e85f2bf4c239..da63de0746e7 100644 --- a/yarn-project/ethereum/src/contracts/multicall.ts +++ b/yarn-project/ethereum/src/contracts/multicall.ts @@ -2,7 +2,7 @@ import { toHex as toPaddedHex } from '@aztec/foundation/bigint-buffer'; import { TimeoutError } from '@aztec/foundation/error'; import type { Logger } from '@aztec/foundation/log'; -import { type EncodeFunctionDataParameters, type Hex, encodeFunctionData, multicall3Abi } from 'viem'; +import { type EncodeFunctionDataParameters, type Hex, encodeFunctionData, multicall3Abi } from '@spalladino/viem'; import type { L1BlobInputs, L1TxConfig, L1TxRequest, L1TxUtils } from '../l1_tx_utils/index.js'; import type { ExtendedViemWalletClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/registry.test.ts b/yarn-project/ethereum/src/contracts/registry.test.ts index eaa1b52650a5..ed3697aad180 100644 --- a/yarn-project/ethereum/src/contracts/registry.test.ts +++ b/yarn-project/ethereum/src/contracts/registry.test.ts @@ -3,11 +3,11 @@ import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { RegistryAbi } from '@aztec/l1-artifacts/RegistryAbi'; +import { createPublicClient, getContract, http } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; import omit from 'lodash.omit'; -import { createPublicClient, getContract, http } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { createExtendedL1Client } from '../client.js'; import { DefaultL1ContractsConfig } from '../config.js'; diff --git a/yarn-project/ethereum/src/contracts/registry.ts b/yarn-project/ethereum/src/contracts/registry.ts index 89156ec13c7a..ac5b58feab84 100644 --- a/yarn-project/ethereum/src/contracts/registry.ts +++ b/yarn-project/ethereum/src/contracts/registry.ts @@ -3,7 +3,7 @@ import { createLogger } from '@aztec/foundation/log'; import { RegistryAbi } from '@aztec/l1-artifacts/RegistryAbi'; import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi'; -import { type GetContractReturnType, type Hex, getContract } from 'viem'; +import { type GetContractReturnType, type Hex, getContract } from '@spalladino/viem'; import type { L1ContractAddresses } from '../l1_contract_addresses.js'; import type { ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/rollup.test.ts b/yarn-project/ethereum/src/contracts/rollup.test.ts index de53c201e0f4..ba1841759b09 100644 --- a/yarn-project/ethereum/src/contracts/rollup.test.ts +++ b/yarn-project/ethereum/src/contracts/rollup.test.ts @@ -4,10 +4,10 @@ import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; +import type { Abi } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import type { Abi } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { DefaultL1ContractsConfig } from '../config.js'; import { deployL1Contracts } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/contracts/rollup.ts b/yarn-project/ethereum/src/contracts/rollup.ts index 89a2dfab6b31..93221c86ed2e 100644 --- a/yarn-project/ethereum/src/contracts/rollup.ts +++ b/yarn-project/ethereum/src/contracts/rollup.ts @@ -4,7 +4,6 @@ import type { ViemSignature } from '@aztec/foundation/eth-signature'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage'; -import chunk from 'lodash.chunk'; import { type Account, type GetContractReturnType, @@ -15,7 +14,8 @@ import { getContract, hexToBigInt, keccak256, -} from 'viem'; +} from '@spalladino/viem'; +import chunk from 'lodash.chunk'; import { getPublicClient } from '../client.js'; import type { DeployL1ContractsReturnType } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/contracts/slasher_contract.ts b/yarn-project/ethereum/src/contracts/slasher_contract.ts index e7b41c7e0bf9..3053b19bc2d4 100644 --- a/yarn-project/ethereum/src/contracts/slasher_contract.ts +++ b/yarn-project/ethereum/src/contracts/slasher_contract.ts @@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { createLogger } from '@aztec/foundation/log'; import { SlasherAbi } from '@aztec/l1-artifacts/SlasherAbi'; -import { type GetContractReturnType, getContract } from 'viem'; +import { type GetContractReturnType, getContract } from '@spalladino/viem'; import type { ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/contracts/tally_slashing_proposer.test.ts b/yarn-project/ethereum/src/contracts/tally_slashing_proposer.test.ts index bd450b69d026..b79580ce8937 100644 --- a/yarn-project/ethereum/src/contracts/tally_slashing_proposer.test.ts +++ b/yarn-project/ethereum/src/contracts/tally_slashing_proposer.test.ts @@ -14,10 +14,10 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { bufferToHex } from '@aztec/foundation/string'; import { TallySlashingProposerAbi } from '@aztec/l1-artifacts/TallySlashingProposerAbi'; +import { type Hex, type TypedDataDefinition, encodeFunctionData, hashTypedData } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type Hex, type TypedDataDefinition, encodeFunctionData, hashTypedData } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { TallySlashingProposerContract } from './tally_slashing_proposer.js'; diff --git a/yarn-project/ethereum/src/contracts/tally_slashing_proposer.ts b/yarn-project/ethereum/src/contracts/tally_slashing_proposer.ts index 2d15a36ac151..ac07190ca0ae 100644 --- a/yarn-project/ethereum/src/contracts/tally_slashing_proposer.ts +++ b/yarn-project/ethereum/src/contracts/tally_slashing_proposer.ts @@ -12,7 +12,7 @@ import { type TypedDataDefinition, encodeFunctionData, getContract, -} from 'viem'; +} from '@spalladino/viem'; /** * Wrapper around the TallySlashingProposer contract that provides diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.test.ts b/yarn-project/ethereum/src/deploy_l1_contracts.test.ts index 916efbe7bef8..1b0aed86868e 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.test.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.test.ts @@ -6,8 +6,8 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; import { MockVerifierAbi, MockVerifierBytecode, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts'; -import type { Hex } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; +import type { Hex } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; import { createEthereumChain } from './chain.js'; import { createExtendedL1Client } from './client.js'; diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index be547d68639b..dd039212e306 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -8,9 +8,6 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { DateProvider } from '@aztec/foundation/timer'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; -import type { Abi, Narrow } from 'abitype'; -import { mkdir, writeFile } from 'fs/promises'; -import chunk from 'lodash.chunk'; import { type Chain, type ContractConstructorArgs, @@ -26,8 +23,11 @@ import { getContractAddress, numberToHex, padHex, -} from 'viem'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { foundry } from '@spalladino/viem/chains'; +import type { Abi, Narrow } from 'abitype'; +import { mkdir, writeFile } from 'fs/promises'; +import chunk from 'lodash.chunk'; import { isAnvilTestChain } from './chain.js'; import { createExtendedL1Client } from './client.js'; diff --git a/yarn-project/ethereum/src/eth-signer/eth-signer.ts b/yarn-project/ethereum/src/eth-signer/eth-signer.ts index bbb74cbdce2b..b11f98099ad2 100644 --- a/yarn-project/ethereum/src/eth-signer/eth-signer.ts +++ b/yarn-project/ethereum/src/eth-signer/eth-signer.ts @@ -5,7 +5,7 @@ import type { Buffer32 } from '@aztec/foundation/buffer'; import type { EthAddress } from '@aztec/foundation/eth-address'; import type { Signature } from '@aztec/foundation/eth-signature'; -import type { TransactionSerializable, TypedDataDefinition } from 'viem'; +import type { TransactionSerializable, TypedDataDefinition } from '@spalladino/viem'; /** * Abstraction for signing operations used by the node keystore. diff --git a/yarn-project/ethereum/src/l1_artifacts.ts b/yarn-project/ethereum/src/l1_artifacts.ts index 5c91a155dfea..5714b5866def 100644 --- a/yarn-project/ethereum/src/l1_artifacts.ts +++ b/yarn-project/ethereum/src/l1_artifacts.ts @@ -60,7 +60,7 @@ import { ValidatorSelectionLibBytecode, } from '@aztec/l1-artifacts'; -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; export const RegistryArtifact = { name: 'Registry', diff --git a/yarn-project/ethereum/src/l1_tx_utils/factory.ts b/yarn-project/ethereum/src/l1_tx_utils/factory.ts index 10d75b9f8eda..a6851bb6f118 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/factory.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/factory.ts @@ -2,7 +2,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import type { Logger } from '@aztec/foundation/log'; import { DateProvider } from '@aztec/foundation/timer'; -import type { TransactionSerializable } from 'viem'; +import type { TransactionSerializable } from '@spalladino/viem'; import type { EthSigner } from '../eth-signer/eth-signer.js'; import type { ExtendedViemWalletClient, ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.test.ts b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.test.ts index 9d54d60f1de1..2481ece7f88b 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.test.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.test.ts @@ -9,9 +9,6 @@ import { sleep } from '@aztec/foundation/sleep'; import { TestDateProvider } from '@aztec/foundation/timer'; import { jest } from '@jest/globals'; -import type { Anvil } from '@viem/anvil'; -import { type MockProxy, mock } from 'jest-mock-extended'; -import assert from 'node:assert'; import { type Abi, type BlockTag, @@ -22,9 +19,12 @@ import { createPublicClient, encodeFunctionData, http, -} from 'viem'; -import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; +import type { Anvil } from '@viem/anvil'; +import { type MockProxy, mock } from 'jest-mock-extended'; +import assert from 'node:assert'; import { createExtendedL1Client, getPublicClient } from '../client.js'; import { EthCheatCodes } from '../test/eth_cheat_codes.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts index 68f143f0e89b..284c6c1b47fe 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils.ts @@ -8,7 +8,6 @@ import { sleep } from '@aztec/foundation/sleep'; import { DateProvider } from '@aztec/foundation/timer'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; -import pickBy from 'lodash.pickby'; import { type Abi, type BlockOverrides, @@ -21,8 +20,9 @@ import { createNonceManager, formatGwei, serializeTransaction, -} from 'viem'; -import { jsonRpc } from 'viem/nonce'; +} from '@spalladino/viem'; +import { jsonRpc } from '@spalladino/viem/nonce'; +import pickBy from 'lodash.pickby'; import type { ViemClient } from '../types.js'; import { formatViemError } from '../utils.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils_with_blobs.ts b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils_with_blobs.ts index 4f20c383ee80..13fdb9ac9f08 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils_with_blobs.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/l1_tx_utils_with_blobs.ts @@ -3,7 +3,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import type { Logger } from '@aztec/foundation/log'; import { DateProvider } from '@aztec/foundation/timer'; -import type { TransactionSerializable } from 'viem'; +import type { TransactionSerializable } from '@spalladino/viem'; import type { EthSigner } from '../eth-signer/eth-signer.js'; import type { ExtendedViemWalletClient, ViemClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/readonly_l1_tx_utils.ts b/yarn-project/ethereum/src/l1_tx_utils/readonly_l1_tx_utils.ts index 9ec70075bcae..f89438fae5f6 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/readonly_l1_tx_utils.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/readonly_l1_tx_utils.ts @@ -4,7 +4,6 @@ import { makeBackoff, retry } from '@aztec/foundation/retry'; import { DateProvider } from '@aztec/foundation/timer'; import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; -import pickBy from 'lodash.pickby'; import { type Abi, type Account, @@ -19,7 +18,8 @@ import { formatGwei, getContractError, hexToBytes, -} from 'viem'; +} from '@spalladino/viem'; +import pickBy from 'lodash.pickby'; import type { ViemClient } from '../types.js'; import { type L1TxUtilsConfig, defaultL1TxUtilsConfig, l1TxUtilsConfigMappings } from './config.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/signer.ts b/yarn-project/ethereum/src/l1_tx_utils/signer.ts index 2580b60709bf..951d02abecce 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/signer.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/signer.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import type { ViemTransactionSignature } from '@aztec/foundation/eth-signature'; -import { type TransactionSerializable, type WalletClient, parseTransaction } from 'viem'; +import { type TransactionSerializable, type WalletClient, parseTransaction } from '@spalladino/viem'; import type { SigningCallback } from './types.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/types.ts b/yarn-project/ethereum/src/l1_tx_utils/types.ts index 9b5662599977..9048395bfecf 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/types.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/types.ts @@ -2,7 +2,7 @@ import type { BlobKzgInstance } from '@aztec/blob-lib/types'; import { EthAddress } from '@aztec/foundation/eth-address'; import type { ViemTransactionSignature } from '@aztec/foundation/eth-signature'; -import type { Abi, Address, Hex, TransactionReceipt, TransactionSerializable } from 'viem'; +import type { Abi, Address, Hex, TransactionReceipt, TransactionSerializable } from '@spalladino/viem'; import type { L1TxUtilsConfig } from './config.js'; diff --git a/yarn-project/ethereum/src/l1_tx_utils/utils.ts b/yarn-project/ethereum/src/l1_tx_utils/utils.ts index 18c231724ead..c66a8413a2be 100644 --- a/yarn-project/ethereum/src/l1_tx_utils/utils.ts +++ b/yarn-project/ethereum/src/l1_tx_utils/utils.ts @@ -1,6 +1,6 @@ import { compactArray } from '@aztec/foundation/collection'; -import type { ContractFunctionExecutionError } from 'viem'; +import type { ContractFunctionExecutionError } from '@spalladino/viem'; export function tryGetCustomErrorNameContractFunction(err: ContractFunctionExecutionError) { return compactArray([err.shortMessage, ...(err.metaMessages ?? []).slice(0, 2).map(s => s.trim())]).join(' '); diff --git a/yarn-project/ethereum/src/test/eth_cheat_codes.test.ts b/yarn-project/ethereum/src/test/eth_cheat_codes.test.ts index 65526f0fa2d3..2f9e962dfa10 100644 --- a/yarn-project/ethereum/src/test/eth_cheat_codes.test.ts +++ b/yarn-project/ethereum/src/test/eth_cheat_codes.test.ts @@ -4,10 +4,10 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; import { TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts'; +import { type Hex, encodeFunctionData, getContract } from '@spalladino/viem'; +import { mnemonicToAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type Hex, encodeFunctionData, getContract } from 'viem'; -import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import { createExtendedL1Client } from '../client.js'; import { deployL1Contract } from '../deploy_l1_contracts.js'; diff --git a/yarn-project/ethereum/src/test/eth_cheat_codes.ts b/yarn-project/ethereum/src/test/eth_cheat_codes.ts index 0398cc8eec3f..504371d97fd0 100644 --- a/yarn-project/ethereum/src/test/eth_cheat_codes.ts +++ b/yarn-project/ethereum/src/test/eth_cheat_codes.ts @@ -6,7 +6,7 @@ import { createLogger } from '@aztec/foundation/log'; import { pluralize } from '@aztec/foundation/string'; import type { TestDateProvider } from '@aztec/foundation/timer'; -import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from 'viem'; +import { type Hex, type Transaction, createPublicClient, fallback, hexToNumber, http } from '@spalladino/viem'; import type { ViemPublicClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/test/fallback_transport.test.ts b/yarn-project/ethereum/src/test/fallback_transport.test.ts index 57ba156cdf50..1ccf6183e08f 100644 --- a/yarn-project/ethereum/src/test/fallback_transport.test.ts +++ b/yarn-project/ethereum/src/test/fallback_transport.test.ts @@ -1,5 +1,4 @@ import { jest } from '@jest/globals'; -import type { Anvil } from '@viem/anvil'; import { type Account, type Chain, @@ -19,9 +18,10 @@ import { fallback, http, publicActions, -} from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; +import type { Anvil } from '@viem/anvil'; import { startAnvil } from './start_anvil.js'; diff --git a/yarn-project/ethereum/src/test/rollup_cheat_codes.ts b/yarn-project/ethereum/src/test/rollup_cheat_codes.ts index 82a96f4cd9bb..8f73574df5cc 100644 --- a/yarn-project/ethereum/src/test/rollup_cheat_codes.ts +++ b/yarn-project/ethereum/src/test/rollup_cheat_codes.ts @@ -13,8 +13,8 @@ import { getContract, hexToBigInt, http, -} from 'viem'; -import { foundry } from 'viem/chains'; +} from '@spalladino/viem'; +import { foundry } from '@spalladino/viem/chains'; import { EthCheatCodes } from './eth_cheat_codes.js'; diff --git a/yarn-project/ethereum/src/test/start_anvil.test.ts b/yarn-project/ethereum/src/test/start_anvil.test.ts index f71c75eb7037..58fcec326476 100644 --- a/yarn-project/ethereum/src/test/start_anvil.test.ts +++ b/yarn-project/ethereum/src/test/start_anvil.test.ts @@ -1,8 +1,8 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; +import { createPublicClient, http, parseAbiItem } from '@spalladino/viem'; import type { Anvil } from '@viem/anvil'; -import { createPublicClient, http, parseAbiItem } from 'viem'; import { startAnvil } from './start_anvil.js'; diff --git a/yarn-project/ethereum/src/test/tx_delayer.test.ts b/yarn-project/ethereum/src/test/tx_delayer.test.ts index bb3a28577c02..6074323f41c9 100644 --- a/yarn-project/ethereum/src/test/tx_delayer.test.ts +++ b/yarn-project/ethereum/src/test/tx_delayer.test.ts @@ -5,10 +5,17 @@ import { sleep } from '@aztec/foundation/sleep'; import { TestDateProvider } from '@aztec/foundation/timer'; import { TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts'; +import { + type PrivateKeyAccount, + createWalletClient, + fallback, + getContract, + http, + publicActions, +} from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type PrivateKeyAccount, createWalletClient, fallback, getContract, http, publicActions } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import type { ExtendedViemWalletClient } from '../types.js'; import { EthCheatCodes } from './eth_cheat_codes.js'; diff --git a/yarn-project/ethereum/src/test/tx_delayer.ts b/yarn-project/ethereum/src/test/tx_delayer.ts index 8aeda0310e18..8071e790fabd 100644 --- a/yarn-project/ethereum/src/test/tx_delayer.ts +++ b/yarn-project/ethereum/src/test/tx_delayer.ts @@ -3,7 +3,6 @@ import { type Logger, createLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; import type { DateProvider } from '@aztec/foundation/timer'; -import { inspect } from 'util'; import { type Client, type Hex, @@ -14,7 +13,8 @@ import { publicActions, serializeTransaction, walletActions, -} from 'viem'; +} from '@spalladino/viem'; +import { inspect } from 'util'; import { type ViemClient, isExtendedClient } from '../types.js'; diff --git a/yarn-project/ethereum/src/test/upgrade_utils.ts b/yarn-project/ethereum/src/test/upgrade_utils.ts index 1f918551ae50..68d38d37b716 100644 --- a/yarn-project/ethereum/src/test/upgrade_utils.ts +++ b/yarn-project/ethereum/src/test/upgrade_utils.ts @@ -2,7 +2,7 @@ import type { Logger } from '@aztec/foundation/log'; import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi'; import { TestERC20Abi as StakingAssetAbi } from '@aztec/l1-artifacts/TestERC20Abi'; -import { type GetContractReturnType, type PrivateKeyAccount, getContract } from 'viem'; +import { type GetContractReturnType, type PrivateKeyAccount, getContract } from '@spalladino/viem'; import { extractProposalIdFromLogs } from '../contracts/governance.js'; import type { L1ContractAddresses } from '../l1_contract_addresses.js'; diff --git a/yarn-project/ethereum/src/types.ts b/yarn-project/ethereum/src/types.ts index 642a30922fca..a654dd7162ae 100644 --- a/yarn-project/ethereum/src/types.ts +++ b/yarn-project/ethereum/src/types.ts @@ -11,7 +11,7 @@ import type { PublicRpcSchema, WalletActions, WalletRpcSchema, -} from 'viem'; +} from '@spalladino/viem'; /** Type for a viem public client */ export type ViemPublicClient = PublicClient, Chain>; diff --git a/yarn-project/ethereum/src/utils.ts b/yarn-project/ethereum/src/utils.ts index d480b8f809fa..758f1219d99b 100644 --- a/yarn-project/ethereum/src/utils.ts +++ b/yarn-project/ethereum/src/utils.ts @@ -12,7 +12,7 @@ import { type Log, decodeErrorResult, decodeEventLog, -} from 'viem'; +} from '@spalladino/viem'; export interface L2Claim { claimSecret: Fr; diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 9963f060de07..8f273dba3e67 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -126,6 +126,7 @@ "devDependencies": { "@jest/globals": "^30.0.0", "@libp2p/interface": "1.3.1", + "@spalladino/viem": "2.38.2-eip7594.0", "@types/detect-node": "^2.0.0", "@types/jest": "^30.0.0", "@types/koa": "^2.15.0", @@ -152,8 +153,7 @@ "supertest": "^6.3.3", "ts-node": "^10.9.1", "typescript": "^5.3.3", - "typescript-eslint": "^8.32.1", - "viem": "2.23.7" + "typescript-eslint": "^8.32.1" }, "files": [ "dest", diff --git a/yarn-project/foundation/src/crypto/secp256k1-signer/secp256k1_signer.test.ts b/yarn-project/foundation/src/crypto/secp256k1-signer/secp256k1_signer.test.ts index 05c9d12fdc7d..1c8eb2829988 100644 --- a/yarn-project/foundation/src/crypto/secp256k1-signer/secp256k1_signer.test.ts +++ b/yarn-project/foundation/src/crypto/secp256k1-signer/secp256k1_signer.test.ts @@ -2,8 +2,17 @@ import { Buffer32 } from '@aztec/foundation/buffer'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Signature } from '@aztec/foundation/eth-signature'; -import { hashMessage, recoverAddress as viemRecoverAddress, recoverPublicKey as viemRecoverPublicKey } from 'viem'; -import { type PrivateKeyAccount, generatePrivateKey, privateKeyToAccount, publicKeyToAddress } from 'viem/accounts'; +import { + hashMessage, + recoverAddress as viemRecoverAddress, + recoverPublicKey as viemRecoverPublicKey, +} from '@spalladino/viem'; +import { + type PrivateKeyAccount, + generatePrivateKey, + privateKeyToAccount, + publicKeyToAddress, +} from '@spalladino/viem/accounts'; import { Secp256k1Signer } from './secp256k1_signer.js'; import { recoverAddress as lightRecoverAddress, recoverPublicKey as lightRecoverPublicKey } from './utils.js'; diff --git a/yarn-project/node-keystore/package.json b/yarn-project/node-keystore/package.json index 1e8cf57ba40d..59db55a46f05 100644 --- a/yarn-project/node-keystore/package.json +++ b/yarn-project/node-keystore/package.json @@ -66,8 +66,8 @@ "@aztec/foundation": "workspace:^", "@aztec/stdlib": "workspace:^", "@ethersproject/wallet": "^5.7.0", + "@spalladino/viem": "2.38.2-eip7594.0", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/node-keystore/src/keystore_manager.test.ts b/yarn-project/node-keystore/src/keystore_manager.test.ts index 27f88a002421..c4a7a24c1e89 100644 --- a/yarn-project/node-keystore/src/keystore_manager.test.ts +++ b/yarn-project/node-keystore/src/keystore_manager.test.ts @@ -6,10 +6,10 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { describe, expect, it, jest } from '@jest/globals'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; import { mkdirSync, writeFileSync } from 'fs'; import { tmpdir } from 'os'; import { join } from 'path'; -import { mnemonicToAccount } from 'viem/accounts'; import { KeystoreError, KeystoreManager } from '../src/keystore_manager.js'; import { LocalSigner, RemoteSigner } from '../src/signer.js'; diff --git a/yarn-project/node-keystore/src/keystore_manager.ts b/yarn-project/node-keystore/src/keystore_manager.ts index ac7aa2d8d28a..259d730d05d5 100644 --- a/yarn-project/node-keystore/src/keystore_manager.ts +++ b/yarn-project/node-keystore/src/keystore_manager.ts @@ -10,10 +10,10 @@ import type { Signature } from '@aztec/foundation/eth-signature'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; import { Wallet } from '@ethersproject/wallet'; +import type { TypedDataDefinition } from '@spalladino/viem'; +import { mnemonicToAccount } from '@spalladino/viem/accounts'; import { readFileSync, readdirSync, statSync } from 'fs'; import { extname, join } from 'path'; -import type { TypedDataDefinition } from 'viem'; -import { mnemonicToAccount } from 'viem/accounts'; import { ethPrivateKeySchema } from './schemas.js'; import { LocalSigner, RemoteSigner } from './signer.js'; diff --git a/yarn-project/node-keystore/src/signer.ts b/yarn-project/node-keystore/src/signer.ts index 5201b1db66e7..9198078345a7 100644 --- a/yarn-project/node-keystore/src/signer.ts +++ b/yarn-project/node-keystore/src/signer.ts @@ -18,7 +18,7 @@ import { keccak256, parseTransaction, serializeTransaction, -} from 'viem'; +} from '@spalladino/viem'; import type { EthRemoteSignerConfig } from './types.js'; diff --git a/yarn-project/node-lib/src/stores/l1_tx_store.test.ts b/yarn-project/node-lib/src/stores/l1_tx_store.test.ts index 4ff8920ab4a6..f4f5b4781b6d 100644 --- a/yarn-project/node-lib/src/stores/l1_tx_store.test.ts +++ b/yarn-project/node-lib/src/stores/l1_tx_store.test.ts @@ -4,7 +4,7 @@ import { omit } from '@aztec/foundation/collection'; import type { AztecAsyncKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/lmdb-v2'; -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; import { L1TxStore } from './l1_tx_store.js'; diff --git a/yarn-project/node-lib/src/stores/l1_tx_store.ts b/yarn-project/node-lib/src/stores/l1_tx_store.ts index ce7097d83e76..533e0864e1e6 100644 --- a/yarn-project/node-lib/src/stores/l1_tx_store.ts +++ b/yarn-project/node-lib/src/stores/l1_tx_store.ts @@ -4,7 +4,7 @@ import type { Logger } from '@aztec/foundation/log'; import { createLogger } from '@aztec/foundation/log'; import type { AztecAsyncKVStore, AztecAsyncMap } from '@aztec/kv-store'; -import type { TransactionReceipt } from 'viem'; +import type { TransactionReceipt } from '@spalladino/viem'; /** * Serializable version of L1TxRequest for storage. diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 5e1608c60de1..352af8d43e06 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -107,6 +107,7 @@ "@aztec/archiver": "workspace:^", "@aztec/world-state": "workspace:^", "@jest/globals": "^30.0.0", + "@spalladino/viem": "2.38.2-eip7594.0", "@types/jest": "^30.0.0", "@types/node": "^22.15.17", "get-port": "^7.1.0", @@ -116,8 +117,7 @@ "jest-mock-extended": "^4.0.0", "ts-node": "^10.9.1", "typescript": "^5.3.3", - "uint8arrays": "^5.0.3", - "viem": "2.23.7" + "uint8arrays": "^5.0.3" }, "files": [ "dest", diff --git a/yarn-project/p2p/src/mem_pools/attestation_pool/mocks.ts b/yarn-project/p2p/src/mem_pools/attestation_pool/mocks.ts index ed8d23ed4de1..7ae43dfb586f 100644 --- a/yarn-project/p2p/src/mem_pools/attestation_pool/mocks.ts +++ b/yarn-project/p2p/src/mem_pools/attestation_pool/mocks.ts @@ -8,7 +8,7 @@ import { } from '@aztec/stdlib/p2p'; import { makeHeader } from '@aztec/stdlib/testing'; -import { type LocalAccount, generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; +import { type LocalAccount, generatePrivateKey, privateKeyToAccount } from '@spalladino/viem/accounts'; /** Generate Account * diff --git a/yarn-project/p2p/src/services/peer-manager/peer_manager.test.ts b/yarn-project/p2p/src/services/peer-manager/peer_manager.test.ts index e7b9081eb0c3..0a99e0c9d6e3 100644 --- a/yarn-project/p2p/src/services/peer-manager/peer_manager.test.ts +++ b/yarn-project/p2p/src/services/peer-manager/peer_manager.test.ts @@ -20,8 +20,8 @@ import type { PeerId } from '@libp2p/interface'; import { peerIdFromString } from '@libp2p/peer-id'; import { createSecp256k1PeerId } from '@libp2p/peer-id-factory'; import { multiaddr } from '@multiformats/multiaddr'; +import { generatePrivateKey } from '@spalladino/viem/accounts'; import { type MockProxy, mock } from 'jest-mock-extended'; -import { generatePrivateKey } from 'viem/accounts'; import { type P2PConfig, getP2PDefaultConfig } from '../../config.js'; import { PeerEvent } from '../../types/index.js'; diff --git a/yarn-project/p2p/src/test-helpers/generate-peer-id-private-keys.ts b/yarn-project/p2p/src/test-helpers/generate-peer-id-private-keys.ts index cfeb1f82c3d2..d69614662439 100644 --- a/yarn-project/p2p/src/test-helpers/generate-peer-id-private-keys.ts +++ b/yarn-project/p2p/src/test-helpers/generate-peer-id-private-keys.ts @@ -1,4 +1,4 @@ -import { generatePrivateKey } from 'viem/accounts'; +import { generatePrivateKey } from '@spalladino/viem/accounts'; /** * Generate a list of peer id private keys diff --git a/yarn-project/prover-node/package.json b/yarn-project/prover-node/package.json index cffecbe7fb26..02cf313ae183 100644 --- a/yarn-project/prover-node/package.json +++ b/yarn-project/prover-node/package.json @@ -77,9 +77,9 @@ "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:^", "@aztec/world-state": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "source-map-support": "^0.5.21", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/prover-node/src/config.test.ts b/yarn-project/prover-node/src/config.test.ts index e50f6082715e..a71f5fa98e2a 100644 --- a/yarn-project/prover-node/src/config.test.ts +++ b/yarn-project/prover-node/src/config.test.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import type { EthPrivateKey } from '@aztec/node-keystore'; -import { generatePrivateKey, privateKeyToAddress } from 'viem/accounts'; +import { generatePrivateKey, privateKeyToAddress } from '@spalladino/viem/accounts'; import { type ProverNodeConfig, createKeyStoreForProver } from './config.js'; diff --git a/yarn-project/prover-node/src/factory.ts b/yarn-project/prover-node/src/factory.ts index c1ff56b4dcb7..7407587e404b 100644 --- a/yarn-project/prover-node/src/factory.ts +++ b/yarn-project/prover-node/src/factory.ts @@ -20,7 +20,7 @@ import { getPackageVersion } from '@aztec/stdlib/update-checker'; import { L1Metrics, type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client'; import { createWorldStateSynchronizer } from '@aztec/world-state'; -import { createPublicClient, fallback, http } from 'viem'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; import { type ProverNodeConfig, createKeyStoreForProver } from './config.js'; import { EpochMonitor } from './monitors/epoch-monitor.js'; diff --git a/yarn-project/prover-node/src/metrics.ts b/yarn-project/prover-node/src/metrics.ts index 631d50362246..1c30b1d0057a 100644 --- a/yarn-project/prover-node/src/metrics.ts +++ b/yarn-project/prover-node/src/metrics.ts @@ -16,7 +16,7 @@ import { ValueType, } from '@aztec/telemetry-client'; -import { formatEther, formatUnits } from 'viem'; +import { formatEther, formatUnits } from '@spalladino/viem'; export class ProverNodeJobMetrics { proverEpochExecutionDuration: Histogram; diff --git a/yarn-project/prover-node/src/prover-node-publisher.ts b/yarn-project/prover-node/src/prover-node-publisher.ts index e2a0b926c410..ff39e684895e 100644 --- a/yarn-project/prover-node/src/prover-node-publisher.ts +++ b/yarn-project/prover-node/src/prover-node-publisher.ts @@ -16,8 +16,8 @@ import type { FeeRecipient, RootRollupPublicInputs } from '@aztec/stdlib/rollup' import type { L1PublishProofStats } from '@aztec/stdlib/stats'; import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client'; +import { type Hex, type TransactionReceipt, encodeFunctionData } from '@spalladino/viem'; import { inspect } from 'util'; -import { type Hex, type TransactionReceipt, encodeFunctionData } from 'viem'; import { ProverNodePublisherMetrics } from './metrics.js'; diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index 59a3fc2c90be..6db992d300bb 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -76,13 +76,13 @@ "@aztec/protocol-contracts": "workspace:^", "@aztec/simulator": "workspace:^", "@aztec/stdlib": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "json-stringify-deterministic": "1.0.12", "koa": "^2.16.1", "koa-router": "^13.1.1", "lodash.omit": "^4.5.0", "sha3": "^2.1.4", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@aztec/merkle-tree": "workspace:^", diff --git a/yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts b/yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts index c1764ecd4ca5..e8cb615d6a23 100644 --- a/yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts +++ b/yarn-project/pxe/src/contract_function_simulator/oracle/private_execution.test.ts @@ -62,8 +62,8 @@ import { } from '@aztec/stdlib/tx'; import { jest } from '@jest/globals'; +import { toFunctionSelector } from '@spalladino/viem'; import { Matcher, type MatcherCreator, type MockProxy, mock } from 'jest-mock-extended'; -import { toFunctionSelector } from 'viem'; import { ContractFunctionSimulator } from '../contract_function_simulator.js'; import type { ExecutionDataProvider } from '../execution_data_provider.js'; diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index e8d41af1cf30..b0025e26338c 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -50,9 +50,9 @@ "@aztec/telemetry-client": "workspace:^", "@aztec/validator-client": "workspace:^", "@aztec/world-state": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "lodash.chunk": "^4.2.0", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@aztec/archiver": "workspace:^", diff --git a/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts b/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts index 8b520dc0863d..e1116ee12e84 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts @@ -13,7 +13,7 @@ import { GasFees } from '@aztec/stdlib/gas'; import type { GlobalVariableBuilder as GlobalVariableBuilderInterface } from '@aztec/stdlib/tx'; import { GlobalVariables } from '@aztec/stdlib/tx'; -import { createPublicClient, fallback, http } from 'viem'; +import { createPublicClient, fallback, http } from '@spalladino/viem'; /** * Simple global variables builder. diff --git a/yarn-project/sequencer-client/src/publisher/sequencer-publisher-metrics.ts b/yarn-project/sequencer-client/src/publisher/sequencer-publisher-metrics.ts index a1795dbd786b..88c896300d7a 100644 --- a/yarn-project/sequencer-client/src/publisher/sequencer-publisher-metrics.ts +++ b/yarn-project/sequencer-client/src/publisher/sequencer-publisher-metrics.ts @@ -10,7 +10,7 @@ import { ValueType, } from '@aztec/telemetry-client'; -import { formatEther } from 'viem/utils'; +import { formatEther } from '@spalladino/viem/utils'; export type L1TxType = 'process'; diff --git a/yarn-project/sequencer-client/src/publisher/sequencer-publisher.test.ts b/yarn-project/sequencer-client/src/publisher/sequencer-publisher.test.ts index c42c7b2357cb..e4e19689710a 100644 --- a/yarn-project/sequencer-client/src/publisher/sequencer-publisher.test.ts +++ b/yarn-project/sequencer-client/src/publisher/sequencer-publisher.test.ts @@ -24,17 +24,17 @@ import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts'; import type { ProposedBlockHeader } from '@aztec/stdlib/tx'; import { jest } from '@jest/globals'; -import express, { json } from 'express'; -import type { Server } from 'http'; -import { type MockProxy, mock } from 'jest-mock-extended'; import { type GetTransactionReceiptReturnType, type PrivateKeyAccount, type TransactionReceipt, encodeFunctionData, toHex, -} from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; +} from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; +import express, { json } from 'express'; +import type { Server } from 'http'; +import { type MockProxy, mock } from 'jest-mock-extended'; import type { PublisherConfig, TxSenderConfig } from './config.js'; import type { SequencerPublisherMetrics } from './sequencer-publisher-metrics.js'; diff --git a/yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts b/yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts index 4a88bef76cf3..bc915fbd9678 100644 --- a/yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/sequencer-publisher.ts @@ -39,7 +39,7 @@ import type { L1PublishBlockStats } from '@aztec/stdlib/stats'; import { type ProposedBlockHeader, StateReference } from '@aztec/stdlib/tx'; import { type TelemetryClient, getTelemetryClient } from '@aztec/telemetry-client'; -import { type TransactionReceipt, type TypedDataDefinition, encodeFunctionData, toHex } from 'viem'; +import { type TransactionReceipt, type TypedDataDefinition, encodeFunctionData, toHex } from '@spalladino/viem'; import type { PublisherConfig, TxSenderConfig } from './config.js'; import { SequencerPublisherMetrics } from './sequencer-publisher-metrics.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/metrics.ts b/yarn-project/sequencer-client/src/sequencer/metrics.ts index 2b3538193c6f..7c0fb0a4a229 100644 --- a/yarn-project/sequencer-client/src/sequencer/metrics.ts +++ b/yarn-project/sequencer-client/src/sequencer/metrics.ts @@ -12,7 +12,7 @@ import { ValueType, } from '@aztec/telemetry-client'; -import { type Hex, formatUnits } from 'viem'; +import { type Hex, formatUnits } from '@spalladino/viem'; import type { SequencerState } from './utils.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.ts index fa8fbebd06a2..7a98c54589c0 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.ts @@ -37,8 +37,8 @@ import { AttestationTimeoutError } from '@aztec/stdlib/validators'; import { Attributes, type TelemetryClient, type Tracer, getTelemetryClient, trackSpan } from '@aztec/telemetry-client'; import type { ValidatorClient } from '@aztec/validator-client'; +import type { TypedDataDefinition } from '@spalladino/viem'; import EventEmitter from 'node:events'; -import type { TypedDataDefinition } from 'viem'; import type { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; import type { SequencerPublisherFactory } from '../publisher/sequencer-publisher-factory.js'; diff --git a/yarn-project/simulator/package.json b/yarn-project/simulator/package.json index c6b3526b884c..76371bf00074 100644 --- a/yarn-project/simulator/package.json +++ b/yarn-project/simulator/package.json @@ -83,6 +83,7 @@ "@aztec/noir-contracts.js": "workspace:^", "@aztec/noir-test-contracts.js": "workspace:^", "@jest/globals": "^30.0.0", + "@spalladino/viem": "2.38.2-eip7594.0", "@types/jest": "^30.0.0", "@types/lodash.clonedeep": "^4.5.7", "@types/lodash.merge": "^4.6.9", @@ -90,8 +91,7 @@ "jest": "^30.0.0", "jest-mock-extended": "^4.0.0", "ts-node": "^10.9.1", - "typescript": "^5.3.3", - "viem": "2.23.7" + "typescript": "^5.3.3" }, "files": [ "dest", diff --git a/yarn-project/slasher/package.json b/yarn-project/slasher/package.json index 12a7cd486659..02f1dae93ba7 100644 --- a/yarn-project/slasher/package.json +++ b/yarn-project/slasher/package.json @@ -61,9 +61,9 @@ "@aztec/l1-artifacts": "workspace:^", "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "source-map-support": "^0.5.21", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/slasher/src/tally_slasher_client.ts b/yarn-project/slasher/src/tally_slasher_client.ts index 16354ace531d..e7be802157d0 100644 --- a/yarn-project/slasher/src/tally_slasher_client.ts +++ b/yarn-project/slasher/src/tally_slasher_client.ts @@ -18,7 +18,7 @@ import { getSlashConsensusVotesFromOffenses, } from '@aztec/stdlib/slashing'; -import type { Hex } from 'viem'; +import type { Hex } from '@spalladino/viem'; import { SlashOffensesCollector, diff --git a/yarn-project/slasher/src/watchers/epoch_prune_watcher.test.ts b/yarn-project/slasher/src/watchers/epoch_prune_watcher.test.ts index a2ca7a0f93b9..a2b0ffcd9c06 100644 --- a/yarn-project/slasher/src/watchers/epoch_prune_watcher.test.ts +++ b/yarn-project/slasher/src/watchers/epoch_prune_watcher.test.ts @@ -14,9 +14,9 @@ import { OffenseType } from '@aztec/stdlib/slashing'; import { Tx } from '@aztec/stdlib/tx'; import { jest } from '@jest/globals'; +import type { Hex } from '@spalladino/viem'; import { type MockProxy, mock } from 'jest-mock-extended'; import EventEmitter from 'node:events'; -import type { Hex } from 'viem'; import { WANT_TO_SLASH_EVENT, type WantToSlashArgs } from '../watcher.js'; import { EpochPruneWatcher } from './epoch_prune_watcher.js'; diff --git a/yarn-project/stdlib/package.json b/yarn-project/stdlib/package.json index 4c8a91a2b294..1a495bce4b8e 100644 --- a/yarn-project/stdlib/package.json +++ b/yarn-project/stdlib/package.json @@ -78,6 +78,7 @@ "@aztec/l1-artifacts": "workspace:^", "@aztec/noir-noirc_abi": "portal:../../noir/packages/noirc_abi", "@google-cloud/storage": "^7.15.0", + "@spalladino/viem": "2.38.2-eip7594.0", "axios": "^1.12.0", "json-stringify-deterministic": "1.0.12", "lodash.chunk": "^4.2.0", @@ -87,7 +88,6 @@ "msgpackr": "^1.11.2", "pako": "^2.1.0", "tslib": "^2.4.0", - "viem": "2.23.7", "zod": "^3.23.8" }, "devDependencies": { diff --git a/yarn-project/stdlib/src/block/proposal/attestations_and_signers.ts b/yarn-project/stdlib/src/block/proposal/attestations_and_signers.ts index 28f3b33c8ceb..8566151805ea 100644 --- a/yarn-project/stdlib/src/block/proposal/attestations_and_signers.ts +++ b/yarn-project/stdlib/src/block/proposal/attestations_and_signers.ts @@ -1,7 +1,7 @@ import type { ViemCommitteeAttestations } from '@aztec/ethereum'; import { hexToBuffer } from '@aztec/foundation/string'; -import { encodeAbiParameters, parseAbiParameters } from 'viem'; +import { encodeAbiParameters, parseAbiParameters } from '@spalladino/viem'; import { z } from 'zod'; import type { Signable, SignatureDomainSeparator } from '../../p2p/signature_utils.js'; diff --git a/yarn-project/stdlib/src/l1-contracts/slash_factory.test.ts b/yarn-project/stdlib/src/l1-contracts/slash_factory.test.ts index 29a572c2052e..75d35bdf3337 100644 --- a/yarn-project/stdlib/src/l1-contracts/slash_factory.test.ts +++ b/yarn-project/stdlib/src/l1-contracts/slash_factory.test.ts @@ -12,10 +12,10 @@ import { Fr } from '@aztec/foundation/fields'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi'; +import { type TransactionReceipt, decodeFunctionData } from '@spalladino/viem'; +import { type PrivateKeyAccount, privateKeyToAccount } from '@spalladino/viem/accounts'; +import { foundry } from '@spalladino/viem/chains'; import type { Anvil } from '@viem/anvil'; -import { type TransactionReceipt, decodeFunctionData } from 'viem'; -import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; -import { foundry } from 'viem/chains'; import type { L1RollupConstants } from '../epoch-helpers/index.js'; import { OffenseType, type ValidatorSlash, type ValidatorSlashOffense } from '../slashing/index.js'; diff --git a/yarn-project/stdlib/src/l1-contracts/slash_factory.ts b/yarn-project/stdlib/src/l1-contracts/slash_factory.ts index a2522483f184..9005c4c8c9d7 100644 --- a/yarn-project/stdlib/src/l1-contracts/slash_factory.ts +++ b/yarn-project/stdlib/src/l1-contracts/slash_factory.ts @@ -4,7 +4,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { createLogger } from '@aztec/foundation/log'; import { SlashFactoryAbi } from '@aztec/l1-artifacts/SlashFactoryAbi'; -import { type GetContractReturnType, type Hex, type Log, encodeFunctionData, getContract } from 'viem'; +import { type GetContractReturnType, type Hex, type Log, encodeFunctionData, getContract } from '@spalladino/viem'; import type { L1RollupConstants } from '../epoch-helpers/index.js'; import { diff --git a/yarn-project/stdlib/src/p2p/consensus_payload.ts b/yarn-project/stdlib/src/p2p/consensus_payload.ts index 53d65dfe0192..6dad1095802b 100644 --- a/yarn-project/stdlib/src/p2p/consensus_payload.ts +++ b/yarn-project/stdlib/src/p2p/consensus_payload.ts @@ -4,7 +4,7 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { hexToBuffer } from '@aztec/foundation/string'; import type { FieldsOf } from '@aztec/foundation/types'; -import { encodeAbiParameters, parseAbiParameters } from 'viem'; +import { encodeAbiParameters, parseAbiParameters } from '@spalladino/viem'; import { z } from 'zod'; import type { L2Block } from '../block/l2_block.js'; diff --git a/yarn-project/telemetry-client/package.json b/yarn-project/telemetry-client/package.json index 4d6d35260cdf..efbc995d33cd 100644 --- a/yarn-project/telemetry-client/package.json +++ b/yarn-project/telemetry-client/package.json @@ -41,8 +41,8 @@ "@opentelemetry/sdk-metrics": "^1.28.0", "@opentelemetry/sdk-trace-node": "^1.28.0", "@opentelemetry/semantic-conventions": "^1.28.0", - "prom-client": "^15.1.3", - "viem": "2.23.7" + "@spalladino/viem": "2.38.2-eip7594.0", + "prom-client": "^15.1.3" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/telemetry-client/src/l1_metrics.ts b/yarn-project/telemetry-client/src/l1_metrics.ts index 8cebf6d498bd..5e3f20423709 100644 --- a/yarn-project/telemetry-client/src/l1_metrics.ts +++ b/yarn-project/telemetry-client/src/l1_metrics.ts @@ -1,6 +1,13 @@ import type { EthAddress } from '@aztec/foundation/eth-address'; -import { type Chain, type FallbackTransport, type Hex, type HttpTransport, type PublicClient, formatEther } from 'viem'; +import { + type Chain, + type FallbackTransport, + type Hex, + type HttpTransport, + type PublicClient, + formatEther, +} from '@spalladino/viem'; import { L1_SENDER } from './attributes.js'; import { L1_BALANCE_ETH, L1_BLOB_BASE_FEE_WEI, L1_BLOCK_HEIGHT, L1_GAS_PRICE_WEI } from './metrics.js'; diff --git a/yarn-project/validator-client/package.json b/yarn-project/validator-client/package.json index 2ce0f0e5eb84..e4067ae5d9e8 100644 --- a/yarn-project/validator-client/package.json +++ b/yarn-project/validator-client/package.json @@ -74,10 +74,10 @@ "@aztec/slasher": "workspace:^", "@aztec/stdlib": "workspace:^", "@aztec/telemetry-client": "workspace:^", + "@spalladino/viem": "2.38.2-eip7594.0", "koa": "^2.16.1", "koa-router": "^13.1.1", - "tslib": "^2.4.0", - "viem": "2.23.7" + "tslib": "^2.4.0" }, "devDependencies": { "@jest/globals": "^30.0.0", diff --git a/yarn-project/validator-client/src/duties/validation_service.test.ts b/yarn-project/validator-client/src/duties/validation_service.test.ts index f28d36be5e6b..cd64115cd464 100644 --- a/yarn-project/validator-client/src/duties/validation_service.test.ts +++ b/yarn-project/validator-client/src/duties/validation_service.test.ts @@ -4,7 +4,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { makeBlockProposal } from '@aztec/stdlib/testing'; import { Tx } from '@aztec/stdlib/tx'; -import { generatePrivateKey } from 'viem/accounts'; +import { generatePrivateKey } from '@spalladino/viem/accounts'; import { LocalKeyStore } from '../key_store/local_key_store.js'; import { ValidationService } from './validation_service.js'; diff --git a/yarn-project/validator-client/src/key_store/interface.ts b/yarn-project/validator-client/src/key_store/interface.ts index 5c9900e1ddb2..80585fb6f97c 100644 --- a/yarn-project/validator-client/src/key_store/interface.ts +++ b/yarn-project/validator-client/src/key_store/interface.ts @@ -4,7 +4,7 @@ import type { Signature } from '@aztec/foundation/eth-signature'; import type { EthRemoteSignerConfig } from '@aztec/node-keystore'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; -import type { TypedDataDefinition } from 'viem'; +import type { TypedDataDefinition } from '@spalladino/viem'; /** Key Store * diff --git a/yarn-project/validator-client/src/key_store/local_key_store.ts b/yarn-project/validator-client/src/key_store/local_key_store.ts index accf234badc6..ecffaff8aed7 100644 --- a/yarn-project/validator-client/src/key_store/local_key_store.ts +++ b/yarn-project/validator-client/src/key_store/local_key_store.ts @@ -3,7 +3,7 @@ import { Secp256k1Signer } from '@aztec/foundation/crypto'; import type { EthAddress } from '@aztec/foundation/eth-address'; import type { Signature } from '@aztec/foundation/eth-signature'; -import { type TypedDataDefinition, hashTypedData } from 'viem'; +import { type TypedDataDefinition, hashTypedData } from '@spalladino/viem'; import type { ValidatorKeyStore } from './interface.js'; diff --git a/yarn-project/validator-client/src/key_store/node_keystore_adapter.test.ts b/yarn-project/validator-client/src/key_store/node_keystore_adapter.test.ts index d87cba869feb..c3b8047d8be9 100644 --- a/yarn-project/validator-client/src/key_store/node_keystore_adapter.test.ts +++ b/yarn-project/validator-client/src/key_store/node_keystore_adapter.test.ts @@ -3,7 +3,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { beforeEach, describe, expect, it } from '@jest/globals'; -import type { TypedDataDefinition } from 'viem'; +import type { TypedDataDefinition } from '@spalladino/viem'; import { NodeKeystoreAdapter } from './node_keystore_adapter.js'; diff --git a/yarn-project/validator-client/src/key_store/node_keystore_adapter.ts b/yarn-project/validator-client/src/key_store/node_keystore_adapter.ts index 6b9a00bc3ae0..5e05d7d47d9e 100644 --- a/yarn-project/validator-client/src/key_store/node_keystore_adapter.ts +++ b/yarn-project/validator-client/src/key_store/node_keystore_adapter.ts @@ -7,8 +7,8 @@ import type { EthRemoteSignerConfig } from '@aztec/node-keystore'; import { AztecAddress } from '@aztec/stdlib/aztec-address'; import { InvalidValidatorPrivateKeyError } from '@aztec/stdlib/validators'; -import type { TypedDataDefinition } from 'viem'; -import { privateKeyToAccount } from 'viem/accounts'; +import type { TypedDataDefinition } from '@spalladino/viem'; +import { privateKeyToAccount } from '@spalladino/viem/accounts'; import type { ExtendedValidatorKeyStore } from './interface.js'; diff --git a/yarn-project/validator-client/src/key_store/web3signer_key_store.integration.test.ts b/yarn-project/validator-client/src/key_store/web3signer_key_store.integration.test.ts index 64dcfa9a5557..f8067eeb5aa5 100644 --- a/yarn-project/validator-client/src/key_store/web3signer_key_store.integration.test.ts +++ b/yarn-project/validator-client/src/key_store/web3signer_key_store.integration.test.ts @@ -4,7 +4,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { Signature } from '@aztec/foundation/eth-signature'; import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'; -import { type TypedDataDefinition, hashTypedData } from 'viem'; +import { type TypedDataDefinition, hashTypedData } from '@spalladino/viem'; import { LocalKeyStore } from './local_key_store.js'; import { Web3SignerKeyStore } from './web3signer_key_store.js'; diff --git a/yarn-project/validator-client/src/key_store/web3signer_key_store.ts b/yarn-project/validator-client/src/key_store/web3signer_key_store.ts index 79aed6fb5a65..f3fd086d2279 100644 --- a/yarn-project/validator-client/src/key_store/web3signer_key_store.ts +++ b/yarn-project/validator-client/src/key_store/web3signer_key_store.ts @@ -2,7 +2,7 @@ import type { Buffer32 } from '@aztec/foundation/buffer'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Signature } from '@aztec/foundation/eth-signature'; -import type { TypedDataDefinition } from 'viem'; +import type { TypedDataDefinition } from '@spalladino/viem'; import type { ValidatorKeyStore } from './interface.js'; diff --git a/yarn-project/validator-client/src/validator.test.ts b/yarn-project/validator-client/src/validator.test.ts index 0f0fb69a32c8..700eaa13890a 100644 --- a/yarn-project/validator-client/src/validator.test.ts +++ b/yarn-project/validator-client/src/validator.test.ts @@ -31,8 +31,8 @@ import { BlockHeader, ContentCommitment, type Tx, TxHash } from '@aztec/stdlib/t import { AttestationTimeoutError } from '@aztec/stdlib/validators'; import { describe, expect, it, jest } from '@jest/globals'; +import { type PrivateKeyAccount, generatePrivateKey, privateKeyToAccount } from '@spalladino/viem/accounts'; import { type MockProxy, mock } from 'jest-mock-extended'; -import { type PrivateKeyAccount, generatePrivateKey, privateKeyToAccount } from 'viem/accounts'; import { type ValidatorClientConfig, validatorClientConfigMappings } from './config.js'; import { ValidatorClient } from './validator.js'; diff --git a/yarn-project/validator-client/src/validator.ts b/yarn-project/validator-client/src/validator.ts index 18729934451a..df71e3904c95 100644 --- a/yarn-project/validator-client/src/validator.ts +++ b/yarn-project/validator-client/src/validator.ts @@ -25,8 +25,8 @@ import type { ProposedBlockHeader, StateReference, Tx } from '@aztec/stdlib/tx'; import { AttestationTimeoutError } from '@aztec/stdlib/validators'; import { type TelemetryClient, type Tracer, getTelemetryClient } from '@aztec/telemetry-client'; +import type { TypedDataDefinition } from '@spalladino/viem'; import { EventEmitter } from 'events'; -import type { TypedDataDefinition } from 'viem'; import { BlockProposalHandler, type BlockProposalValidationFailureReason } from './block_proposal_handler.js'; import type { ValidatorClientConfig } from './config.js'; diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index af7293fd29ee..30e5fcf8b1e2 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -43,10 +43,10 @@ __metadata: languageName: node linkType: hard -"@adraffy/ens-normalize@npm:^1.10.1": - version: 1.11.0 - resolution: "@adraffy/ens-normalize@npm:1.11.0" - checksum: 10/abef75f21470ea43dd6071168e092d2d13e38067e349e76186c78838ae174a46c3e18ca50921d05bea6ec3203074147c9e271f8cb6531d1c2c0e146f3199ddcb +"@adraffy/ens-normalize@npm:^1.11.0": + version: 1.11.1 + resolution: "@adraffy/ens-normalize@npm:1.11.1" + checksum: 10/dd19274d9fcaf99bf08a62b64e54f4748de11b235767addbd3f7385ae1b7777bd704d17ff003ffaa3295a0b9d035929381cf3b38329c96260bff96aab8ad7b37 languageName: node linkType: hard @@ -752,6 +752,7 @@ __metadata: "@aztec/stdlib": "workspace:^" "@aztec/telemetry-client": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.groupby": "npm:^4.6.9" "@types/lodash.omit": "npm:^4.5.7" @@ -765,7 +766,6 @@ __metadata: tsc-watch: "npm:^6.0.0" tslib: "npm:^2.5.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -778,6 +778,7 @@ __metadata: "@aztec/l1-artifacts": "workspace:^" "@jest/globals": "npm:^30.0.0" "@koa/cors": "npm:^5.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/koa-bodyparser": "npm:^4.3.12" "@types/node": "npm:^22.15.17" @@ -787,7 +788,6 @@ __metadata: koa-router: "npm:^13.1.1" ts-node: "npm:^10.9.1" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" bin: aztec-faucet: ./dest/bin/index.js @@ -822,6 +822,7 @@ __metadata: "@aztec/validator-client": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" jest: "npm:^30.0.0" @@ -831,7 +832,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" bin: aztec-node: ./dest/bin/index.js languageName: unknown @@ -849,6 +849,7 @@ __metadata: "@aztec/protocol-contracts": "workspace:^" "@aztec/stdlib": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" axios: "npm:^1.12.0" @@ -864,7 +865,6 @@ __metadata: tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" util: "npm:^0.12.5" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -923,6 +923,7 @@ __metadata: "@aztec/txe": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/chalk": "npm:^2.2.0" "@types/jest": "npm:^30.0.0" "@types/koa": "npm:^2.15.0" @@ -934,7 +935,6 @@ __metadata: koa-router: "npm:^13.1.1" ts-node: "npm:^10.9.1" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" bin: aztec: ./dest/bin/index.js languageName: unknown @@ -960,6 +960,7 @@ __metadata: "@aztec/telemetry-client": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" "@types/source-map-support": "npm:^0.5.10" @@ -971,7 +972,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" bin: bb-cli: ./dest/bb/index.js languageName: unknown @@ -1002,7 +1002,7 @@ __metadata: "@jest/globals": "npm:^30.0.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" - c-kzg: "npm:4.0.0-alpha.1" + c-kzg: "npm:4.1.0" get-port: "npm:^7.1.0" jest: "npm:^30.0.0" ts-node: "npm:^10.9.1" @@ -1022,6 +1022,7 @@ __metadata: "@aztec/stdlib": "workspace:^" "@aztec/telemetry-client": "workspace:*" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" "@types/source-map-support": "npm:^0.5.10" @@ -1035,7 +1036,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" bin: blob-sink-client: ./dest/client/bin/index.js @@ -1141,6 +1141,7 @@ __metadata: "@iarna/toml": "npm:^2.2.5" "@jest/globals": "npm:^30.0.0" "@libp2p/peer-id-factory": "npm:^3.0.4" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.chunk": "npm:^4.2.9" "@types/lodash.groupby": "npm:^4.6.9" @@ -1159,7 +1160,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" peerDependencies: "@aztec/accounts": "workspace:^" "@aztec/bb-prover": "workspace:^" @@ -1240,6 +1240,7 @@ __metadata: "@iarna/toml": "npm:^2.2.5" "@jest/globals": "npm:^30.0.0" "@noble/curves": "npm:=1.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@swc/core": "npm:^1.4.11" "@swc/jest": "npm:^0.2.36" "@types/fs-extra": "npm:^11.0.2" @@ -1277,7 +1278,6 @@ __metadata: tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" util: "npm:^0.12.5" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -1308,6 +1308,7 @@ __metadata: "@aztec/l1-artifacts": "workspace:^" "@aztec/stdlib": "workspace:*" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" "@viem/anvil": "npm:^0.0.10" @@ -1318,7 +1319,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -1333,6 +1333,7 @@ __metadata: "@aztec/l1-artifacts": "workspace:^" "@jest/globals": "npm:^30.0.0" "@noble/curves": "npm:=1.7.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.pickby": "npm:^4" "@types/node": "npm:^22.15.17" @@ -1347,7 +1348,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -1361,6 +1361,7 @@ __metadata: "@koa/cors": "npm:^5.0.0" "@libp2p/interface": "npm:1.3.1" "@noble/curves": "npm:=1.7.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/detect-node": "npm:^2.0.0" "@types/jest": "npm:^30.0.0" "@types/koa": "npm:^2.15.0" @@ -1404,7 +1405,6 @@ __metadata: typescript: "npm:^5.3.3" typescript-eslint: "npm:^8.32.1" undici: "npm:^5.28.5" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -1563,13 +1563,13 @@ __metadata: "@aztec/stdlib": "workspace:^" "@ethersproject/wallet": "npm:^5.7.0" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" jest: "npm:^30.0.0" ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -1765,6 +1765,7 @@ __metadata: "@libp2p/prometheus-metrics": "npm:^4.2.4" "@libp2p/tcp": "npm:9.0.24" "@multiformats/multiaddr": "npm:12.1.14" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" get-port: "npm:^7.1.0" @@ -1782,7 +1783,6 @@ __metadata: tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" uint8arrays: "npm:^5.0.3" - viem: "npm:2.23.7" xxhash-wasm: "npm:^1.1.0" languageName: unknown linkType: soft @@ -1873,6 +1873,7 @@ __metadata: "@aztec/telemetry-client": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" "@types/source-map-support": "npm:^0.5.10" @@ -1882,7 +1883,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -1906,6 +1906,7 @@ __metadata: "@aztec/simulator": "workspace:^" "@aztec/stdlib": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.omit": "npm:^4.5.7" "@types/lodash.times": "npm:^4.3.9" @@ -1921,7 +1922,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" bin: pxe: ./dest/bin/index.js languageName: unknown @@ -1978,6 +1978,7 @@ __metadata: "@aztec/validator-client": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.chunk": "npm:^4.2.7" "@types/lodash.pick": "npm:^4.4.7" @@ -1992,7 +1993,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -2015,6 +2015,7 @@ __metadata: "@aztec/telemetry-client": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.clonedeep": "npm:^4.5.7" "@types/lodash.merge": "npm:^4.6.9" @@ -2026,7 +2027,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -2043,6 +2043,7 @@ __metadata: "@aztec/stdlib": "workspace:^" "@aztec/telemetry-client": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" "@types/source-map-support": "npm:^0.5.10" @@ -2052,7 +2053,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -2073,6 +2073,7 @@ __metadata: "@jest/expect": "npm:^30.0.0" "@jest/globals": "npm:^30.0.0" "@libp2p/interface": "npm:1.3.1" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/lodash.chunk": "npm:^4.2.9" "@types/lodash.isequal": "npm:^4.5.8" @@ -2095,7 +2096,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" zod: "npm:^3.23.8" languageName: unknown linkType: soft @@ -2121,13 +2121,13 @@ __metadata: "@opentelemetry/sdk-metrics": "npm:^1.28.0" "@opentelemetry/sdk-trace-node": "npm:^1.28.0" "@opentelemetry/semantic-conventions": "npm:^1.28.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/koa": "npm:^2.15.0" jest: "npm:^30.0.0" prom-client: "npm:^15.1.3" ts-node: "npm:^10.9.1" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" languageName: unknown linkType: soft @@ -2177,6 +2177,7 @@ __metadata: "@aztec/stdlib": "workspace:^" "@aztec/telemetry-client": "workspace:^" "@jest/globals": "npm:^30.0.0" + "@spalladino/viem": "npm:2.38.2-eip7594.0" "@types/jest": "npm:^30.0.0" "@types/node": "npm:^22.15.17" jest: "npm:^30.0.0" @@ -2186,7 +2187,6 @@ __metadata: ts-node: "npm:^10.9.1" tslib: "npm:^2.4.0" typescript: "npm:^5.3.3" - viem: "npm:2.23.7" bin: validator-client: ./dest/bin/index.js languageName: unknown @@ -5142,6 +5142,13 @@ __metadata: languageName: node linkType: hard +"@noble/ciphers@npm:^1.3.0": + version: 1.3.0 + resolution: "@noble/ciphers@npm:1.3.0" + checksum: 10/051660051e3e9e2ca5fb9dece2885532b56b7e62946f89afa7284a0fb8bc02e2bd1c06554dba68162ff42d295b54026456084198610f63c296873b2f1cd7a586 + languageName: node + linkType: hard + "@noble/curves@npm:1.3.0, @noble/curves@npm:~1.3.0": version: 1.3.0 resolution: "@noble/curves@npm:1.3.0" @@ -5151,12 +5158,12 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:1.8.1, @noble/curves@npm:^1.1.0, @noble/curves@npm:^1.3.0, @noble/curves@npm:^1.4.0, @noble/curves@npm:^1.6.0, @noble/curves@npm:~1.8.1": - version: 1.8.1 - resolution: "@noble/curves@npm:1.8.1" +"@noble/curves@npm:1.9.1": + version: 1.9.1 + resolution: "@noble/curves@npm:1.9.1" dependencies: - "@noble/hashes": "npm:1.7.1" - checksum: 10/e861db372cc0734b02a4c61c0f5a6688d4a7555edca3d8a9e7c846c9aa103ca52d3c3818e8bc333a1a95b5be7f370ff344668d5d759471b11c2d14c7f24b3984 + "@noble/hashes": "npm:1.8.0" + checksum: 10/5c82ec828ca4a4218b1666ba0ddffde17afd224d0bd5e07b64c2a0c83a3362483387f55c11cfd8db0fc046605394fe4e2c67fe024628a713e864acb541a7d2bb languageName: node linkType: hard @@ -5178,6 +5185,24 @@ __metadata: languageName: node linkType: hard +"@noble/curves@npm:^1.1.0, @noble/curves@npm:^1.3.0, @noble/curves@npm:^1.4.0": + version: 1.8.1 + resolution: "@noble/curves@npm:1.8.1" + dependencies: + "@noble/hashes": "npm:1.7.1" + checksum: 10/e861db372cc0734b02a4c61c0f5a6688d4a7555edca3d8a9e7c846c9aa103ca52d3c3818e8bc333a1a95b5be7f370ff344668d5d759471b11c2d14c7f24b3984 + languageName: node + linkType: hard + +"@noble/curves@npm:~1.9.0": + version: 1.9.7 + resolution: "@noble/curves@npm:1.9.7" + dependencies: + "@noble/hashes": "npm:1.8.0" + checksum: 10/3cfe2735ea94972988ca9e217e0ebb2044372a7160b2079bf885da789492a6291fc8bf76ca3d8bf8dee477847ee2d6fac267d1e6c4f555054059f5e8c4865d44 + languageName: node + linkType: hard + "@noble/hashes@npm:1.3.0": version: 1.3.0 resolution: "@noble/hashes@npm:1.3.0" @@ -5199,13 +5224,20 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.7.1, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:^1.4.0, @noble/hashes@npm:^1.5.0, @noble/hashes@npm:~1.7.1": +"@noble/hashes@npm:1.7.1, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:^1.3.3, @noble/hashes@npm:^1.4.0": version: 1.7.1 resolution: "@noble/hashes@npm:1.7.1" checksum: 10/ca3120da0c3e7881d6a481e9667465cc9ebbee1329124fb0de442e56d63fef9870f8cc96f264ebdb18096e0e36cebc0e6e979a872d545deb0a6fed9353f17e05 languageName: node linkType: hard +"@noble/hashes@npm:1.8.0, @noble/hashes@npm:^1.8.0, @noble/hashes@npm:~1.8.0": + version: 1.8.0 + resolution: "@noble/hashes@npm:1.8.0" + checksum: 10/474b7f56bc6fb2d5b3a42132561e221b0ea4f91e590f4655312ca13667840896b34195e2b53b7f097ec080a1fdd3b58d902c2a8d0fbdf51d2e238b53808a177e + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -5920,10 +5952,10 @@ __metadata: languageName: node linkType: hard -"@scure/base@npm:~1.2.2, @scure/base@npm:~1.2.4": - version: 1.2.4 - resolution: "@scure/base@npm:1.2.4" - checksum: 10/4b61679209af40143b49ce7b7570e1d9157c19df311ea6f57cd212d764b0b82222dbe3707334f08bec181caf1f047aca31aa91193c678d6548312cb3f9c82ab1 +"@scure/base@npm:~1.2.5": + version: 1.2.6 + resolution: "@scure/base@npm:1.2.6" + checksum: 10/c1a7bd5e0b0c8f94c36fbc220f4a67cc832b00e2d2065c7d8a404ed81ab1c94c5443def6d361a70fc382db3496e9487fb9941728f0584782b274c18a4bed4187 languageName: node linkType: hard @@ -5938,14 +5970,14 @@ __metadata: languageName: node linkType: hard -"@scure/bip32@npm:1.6.2, @scure/bip32@npm:^1.5.0": - version: 1.6.2 - resolution: "@scure/bip32@npm:1.6.2" +"@scure/bip32@npm:1.7.0, @scure/bip32@npm:^1.7.0": + version: 1.7.0 + resolution: "@scure/bip32@npm:1.7.0" dependencies: - "@noble/curves": "npm:~1.8.1" - "@noble/hashes": "npm:~1.7.1" - "@scure/base": "npm:~1.2.2" - checksum: 10/474ee315a8631aa1a7d378b0521b4494e09a231519ec53d879088cb88c8ff644a89b27a02a8bf0b5a9b1c4c0417acc70636ccdb121b800c34594ae53c723f8d7 + "@noble/curves": "npm:~1.9.0" + "@noble/hashes": "npm:~1.8.0" + "@scure/base": "npm:~1.2.5" + checksum: 10/f90e0c23ab6a31a164856ae9cb9a8cae2886df608c74a6c0c4875095b017e30ffd92f28f73b8c52890d9a89fca86d19f6d60bb1ea7cad64c7987f92ae83509ad languageName: node linkType: hard @@ -5959,13 +5991,13 @@ __metadata: languageName: node linkType: hard -"@scure/bip39@npm:1.5.4, @scure/bip39@npm:^1.4.0": - version: 1.5.4 - resolution: "@scure/bip39@npm:1.5.4" +"@scure/bip39@npm:1.6.0, @scure/bip39@npm:^1.6.0": + version: 1.6.0 + resolution: "@scure/bip39@npm:1.6.0" dependencies: - "@noble/hashes": "npm:~1.7.1" - "@scure/base": "npm:~1.2.4" - checksum: 10/9f08b433511d7637bc48c51aa411457d5f33da5a85bd03370bf394822b0ea8c007ceb17247a3790c28237303d8fc20c4e7725765940cd47e1365a88319ad0d5c + "@noble/hashes": "npm:~1.8.0" + "@scure/base": "npm:~1.2.5" + checksum: 10/63e60c40fa1bda2c1b50351546fee6d7b0947cc814aa7a4209dcedd3693b5053302c8fca28292f5f50735e11c613265359acdc019127393dbab17e53489fc449 languageName: node linkType: hard @@ -6683,6 +6715,27 @@ __metadata: languageName: node linkType: hard +"@spalladino/viem@npm:2.38.2-eip7594.0": + version: 2.38.2-eip7594.0 + resolution: "@spalladino/viem@npm:2.38.2-eip7594.0" + dependencies: + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:1.8.0" + "@scure/bip32": "npm:1.7.0" + "@scure/bip39": "npm:1.6.0" + abitype: "npm:1.1.0" + isows: "npm:1.0.7" + ox: "npm:0.9.6" + ws: "npm:8.18.3" + peerDependencies: + typescript: ">=5.0.4" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10/ba922b7f02536d3aa86b0cafe4051f4decaec510894a0f133e0d92488f6edeff4f45c6fe84540719a95d4e988f67227acc2eb0349031e1a20ebbf8506e0574b2 + languageName: node + linkType: hard + "@swc-node/core@npm:^1.13.3": version: 1.13.3 resolution: "@swc-node/core@npm:1.13.3" @@ -8763,18 +8816,18 @@ __metadata: languageName: node linkType: hard -"abitype@npm:1.0.8, abitype@npm:^1.0.6": - version: 1.0.8 - resolution: "abitype@npm:1.0.8" +"abitype@npm:1.1.0": + version: 1.1.0 + resolution: "abitype@npm:1.1.0" peerDependencies: typescript: ">=5.0.4" - zod: ^3 >=3.22.0 + zod: ^3.22.0 || ^4.0.0 peerDependenciesMeta: typescript: optional: true zod: optional: true - checksum: 10/878e74fbac6a971953649b6216950437aa5834a604e9fa833a5b275a6967cff59857c7e43594ae906387d2fb7cad9370138dec4298eb8814815a3ffb6365902c + checksum: 10/fe445c095dcb255e32c50bb1342a49d32c03def8549347bfe7f73f54ebdc3198adf2af6366af89e1e9bd3d04beab3f22f35e099754655a6becd45e09ca30d375 languageName: node linkType: hard @@ -8791,6 +8844,21 @@ __metadata: languageName: node linkType: hard +"abitype@npm:^1.0.9": + version: 1.1.1 + resolution: "abitype@npm:1.1.1" + peerDependencies: + typescript: ">=5.0.4" + zod: ^3.22.0 || ^4.0.0 + peerDependenciesMeta: + typescript: + optional: true + zod: + optional: true + checksum: 10/3193d4e228caf606e4c915858e0af78b0b2529fc3baa149c2516379db74c0f9e2ace1999bf479a515b4f8f06d27b1cf8fca37f60b4f73a251eedd7bcac11cf89 + languageName: node + linkType: hard + "abort-controller@npm:^3.0.0": version: 3.0.0 resolution: "abort-controller@npm:3.0.0" @@ -10099,14 +10167,14 @@ __metadata: languageName: node linkType: hard -"c-kzg@npm:4.0.0-alpha.1": - version: 4.0.0-alpha.1 - resolution: "c-kzg@npm:4.0.0-alpha.1" +"c-kzg@npm:4.1.0": + version: 4.1.0 + resolution: "c-kzg@npm:4.1.0" dependencies: bindings: "npm:^1.5.0" - node-addon-api: "npm:^5.0.0" + node-addon-api: "npm:^8.3.1" node-gyp: "npm:latest" - checksum: 10/4095348ee345cc6db318e52fd14a6619200e5e76e5b9dcd665948bcb0b5273deb97833d910ac2aaa1ee6697610af36998f122c36a3ecb7bd674e3343328fcb42 + checksum: 10/c5caf4b0d16ebb4890c3eb5b0a7c79792295c733767c1279fee4255a5aaab1eecbbf633ceb54a9102707d111e749da73465eeb07921bcdf7cc0126ceb7457100 languageName: node linkType: hard @@ -15218,12 +15286,12 @@ __metadata: languageName: node linkType: hard -"isows@npm:1.0.6": - version: 1.0.6 - resolution: "isows@npm:1.0.6" +"isows@npm:1.0.7": + version: 1.0.7 + resolution: "isows@npm:1.0.7" peerDependencies: ws: "*" - checksum: 10/ab9e85b50bcc3d70aa5ec875aa2746c5daf9321cb376ed4e5434d3c2643c5d62b1f466d93a05cd2ad0ead5297224922748c31707cb4fbd68f5d05d0479dce99c + checksum: 10/044b949b369872882af07b60b613b5801ae01b01a23b5b72b78af80c8103bbeed38352c3e8ceff13a7834bc91fd2eb41cf91ec01d59a041d8705680e6b0ec546 languageName: node linkType: hard @@ -17634,21 +17702,21 @@ __metadata: languageName: node linkType: hard -"node-addon-api@npm:^5.0.0": - version: 5.1.0 - resolution: "node-addon-api@npm:5.1.0" +"node-addon-api@npm:^6.1.0": + version: 6.1.0 + resolution: "node-addon-api@npm:6.1.0" dependencies: node-gyp: "npm:latest" - checksum: 10/595f59ffb4630564f587c502119cbd980d302e482781021f3b479f5fc7e41cf8f2f7280fdc2795f32d148e4f3259bd15043c52d4a3442796aa6f1ae97b959636 + checksum: 10/8eea1d4d965930a177a0508695beb0d89b4c1d80bf330646a035357a1e8fc31e0d09686e2374996e96e757b947a7ece319f98ede3146683f162597c0bcb4df90 languageName: node linkType: hard -"node-addon-api@npm:^6.1.0": - version: 6.1.0 - resolution: "node-addon-api@npm:6.1.0" +"node-addon-api@npm:^8.3.1": + version: 8.5.0 + resolution: "node-addon-api@npm:8.5.0" dependencies: node-gyp: "npm:latest" - checksum: 10/8eea1d4d965930a177a0508695beb0d89b4c1d80bf330646a035357a1e8fc31e0d09686e2374996e96e757b947a7ece319f98ede3146683f162597c0bcb4df90 + checksum: 10/9a893f4f835fbc3908e0070f7bcacf36e37fd06be8008409b104c30df4092a0d9a29927b3a74cdbc1d34338274ba4116d597a41f573e06c29538a1a70d07413f languageName: node linkType: hard @@ -18060,23 +18128,24 @@ __metadata: languageName: node linkType: hard -"ox@npm:0.6.7": - version: 0.6.7 - resolution: "ox@npm:0.6.7" +"ox@npm:0.9.6": + version: 0.9.6 + resolution: "ox@npm:0.9.6" dependencies: - "@adraffy/ens-normalize": "npm:^1.10.1" - "@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" + "@adraffy/ens-normalize": "npm:^1.11.0" + "@noble/ciphers": "npm:^1.3.0" + "@noble/curves": "npm:1.9.1" + "@noble/hashes": "npm:^1.8.0" + "@scure/bip32": "npm:^1.7.0" + "@scure/bip39": "npm:^1.6.0" + abitype: "npm:^1.0.9" eventemitter3: "npm:5.0.1" peerDependencies: typescript: ">=5.4.0" peerDependenciesMeta: typescript: optional: true - checksum: 10/442fb31e1afb68922bf942025930d8cd6d8c677696e9a6de308008b3608669f22127cadbc0f77181e012d23d7b74318e5f85e63b06b16eecbc887d7fac32a6dc + checksum: 10/9fb1a89c710c02366fe2fdda7db4e17474336456d3b80fa24e059b3d269b45e94abfe950d7f52b220abc33cde2b75d03d24f31493382a6bab37ec5aada2bd925 languageName: node linkType: hard @@ -22162,27 +22231,6 @@ __metadata: languageName: node linkType: hard -"viem@npm:2.23.7": - version: 2.23.7 - resolution: "viem@npm:2.23.7" - dependencies: - "@noble/curves": "npm:1.8.1" - "@noble/hashes": "npm:1.7.1" - "@scure/bip32": "npm:1.6.2" - "@scure/bip39": "npm:1.5.4" - abitype: "npm:1.0.8" - isows: "npm:1.0.6" - ox: "npm:0.6.7" - ws: "npm:8.18.0" - peerDependencies: - typescript: ">=5.0.4" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/bf1618f39ca3645082323776342c0f87fa37f60bcca0476a7db0f6fbb9d1b6db7ab1e434a57463e8486bea29f97c5ab01e95b6139190a008d6f9a30194b7b081 - languageName: node - linkType: hard - "vite@npm:^7.1.7": version: 7.1.7 resolution: "vite@npm:7.1.7"