diff --git a/CODEOWNERS b/CODEOWNERS index ed9f279335c9..d82d54064a76 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -38,3 +38,6 @@ # on changes to the AVM transpiler /avm-transpiler/src @fcarreiro @dbanks12 ##################################################### + +# Notify fairies of changes to playground bundler config +/playground/vite.config.ts @Thunkar diff --git a/docs/docs/developers/guides/js_apps/pay_fees.md b/docs/docs/developers/guides/js_apps/pay_fees.md index 53b846734ae7..920485bff762 100644 --- a/docs/docs/developers/guides/js_apps/pay_fees.md +++ b/docs/docs/developers/guides/js_apps/pay_fees.md @@ -79,7 +79,7 @@ After a user has sent fee juice from L1 to be bridged to L2, a transaction can b The claim object: -#include_code claim_type_amount yarn-project/aztec.js/src/api/ethereum/portal_manager.ts javascript +#include_code claim_type_amount yarn-project/aztec.js/src/ethereum/portal_manager.ts javascript Calling a function on an object (in this case checking the balance of the fee juice contract) diff --git a/playground/src/aztecEnv.ts b/playground/src/aztecEnv.ts index 5aceaff7e5a9..715220205ee5 100644 --- a/playground/src/aztecEnv.ts +++ b/playground/src/aztecEnv.ts @@ -1,15 +1,19 @@ -import { createAztecNodeClient, type AztecNode } from '@aztec/aztec.js/utils'; +import { + createAztecNodeClient, + type AztecNode, + AztecAddress, + AccountWalletWithSecretKey, + Contract, + type PXE, + type Logger, + createLogger, +} from '@aztec/aztec.js'; -import { AztecAddress } from '@aztec/aztec.js/addresses'; -import { AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet'; -import { Contract } from '@aztec/aztec.js/contracts'; -import { type PXE } from '@aztec/aztec.js/interfaces/pxe'; import { createPXEService, type PXEServiceConfig, getPXEServiceConfig } from '@aztec/pxe/client/lazy'; import { createStore } from '@aztec/kv-store/indexeddb'; import { createContext } from 'react'; import { NetworkDB, WalletDB } from './utils/storage'; import { type ContractFunctionInteractionTx } from './utils/txs'; -import { type Logger, createLogger } from '@aztec/aztec.js/log'; const logLevel = ['silent', 'fatal', 'error', 'warn', 'info', 'verbose', 'debug', 'trace'] as const; @@ -155,7 +159,7 @@ export class AztecEnv { store: WebLogger.getInstance().createLogger('pxe:data:indexeddb'), pxe: WebLogger.getInstance().createLogger('pxe:service'), prover: WebLogger.getInstance().createLogger('bb:wasm:lazy'), - } + }, }); return pxe; } diff --git a/playground/src/components/common/fnParameter.tsx b/playground/src/components/common/fnParameter.tsx index 30fb78571e08..3b0927df4d06 100644 --- a/playground/src/components/common/fnParameter.tsx +++ b/playground/src/components/common/fnParameter.tsx @@ -1,4 +1,4 @@ -import { type ABIParameter, type AbiType, isAddressStruct } from '@aztec/stdlib/abi'; +import { type ABIParameter, type AbiType, isAddressStruct } from '@aztec/aztec.js'; import { formatFrAsString, parseAliasedBuffersAsString } from '../../utils/conversion'; import { useContext, useState } from 'react'; import EditIcon from '@mui/icons-material/Edit'; diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 8fd79ca1fe6b..25906edaeb52 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -1,7 +1,7 @@ -import { defineConfig, loadEnv, searchForWorkspaceRoot } from "vite"; -import react from "@vitejs/plugin-react-swc"; -import { PolyfillOptions, nodePolyfills } from "vite-plugin-node-polyfills"; -import bundlesize from "vite-plugin-bundlesize"; +import { defineConfig, loadEnv, searchForWorkspaceRoot } from 'vite'; +import react from '@vitejs/plugin-react-swc'; +import { PolyfillOptions, nodePolyfills } from 'vite-plugin-node-polyfills'; +import bundlesize from 'vite-plugin-bundlesize'; // Only required for alternative bb wasm file, left as reference // import { viteStaticCopy } from "vite-plugin-static-copy"; @@ -13,10 +13,7 @@ const nodePolyfillsFix = (options?: PolyfillOptions | undefined): Plugin => { ...nodePolyfills(options), /* @ts-ignore */ resolveId(source: string) { - const m = - /^vite-plugin-node-polyfills\/shims\/(buffer|global|process)$/.exec( - source - ); + const m = /^vite-plugin-node-polyfills\/shims\/(buffer|global|process)$/.exec(source); if (m) { return `./node_modules/vite-plugin-node-polyfills/shims/${m[1]}/dist/index.cjs`; } @@ -26,30 +23,30 @@ const nodePolyfillsFix = (options?: PolyfillOptions | undefined): Plugin => { // https://vite.dev/config/ export default defineConfig(({ mode }) => { - const env = loadEnv(mode, process.cwd(), ""); + const env = loadEnv(mode, process.cwd(), ''); return { - logLevel: "error", + logLevel: 'error', server: { // Headers needed for bb WASM to work in multithreaded mode headers: { - "Cross-Origin-Opener-Policy": "same-origin", - "Cross-Origin-Embedder-Policy": "require-corp", + 'Cross-Origin-Opener-Policy': 'same-origin', + 'Cross-Origin-Embedder-Policy': 'require-corp', }, // Allow vite to serve files from these directories, since they are symlinked // These are the protocol circuit artifacts, noir WASMs and bb WASMs. fs: { allow: [ searchForWorkspaceRoot(process.cwd()), - "../yarn-project/noir-protocol-circuits-types/artifacts", - "../noir/packages/noirc_abi/web", - "../noir/packages/acvm_js/web", - "../barretenberg/ts/dest/browser", + '../yarn-project/noir-protocol-circuits-types/artifacts', + '../noir/packages/noirc_abi/web', + '../noir/packages/acvm_js/web', + '../barretenberg/ts/dest/browser', ], }, }, plugins: [ - react({ jsxImportSource: "@emotion/react" }), - nodePolyfillsFix({ include: ["buffer", "path"] }), + react({ jsxImportSource: '@emotion/react' }), + nodePolyfillsFix({ include: ['buffer', 'path'] }), // This is unnecessary unless BB_WASM_PATH is defined (default would be /assets/barretenberg.wasm.gz) // Left as an example of how to use a different bb wasm file than the default lazily loaded one // viteStaticCopy({ @@ -61,11 +58,11 @@ export default defineConfig(({ mode }) => { // ], // }), bundlesize({ - limits: [{ name: "assets/index-*", limit: "1950kB" }], + limits: [{ name: 'assets/index-*', limit: '1600kB' }], }), ], define: { - "process.env": JSON.stringify({ + 'process.env': JSON.stringify({ LOG_LEVEL: env.LOG_LEVEL, // The path to a custom WASM file for bb.js. // Only the single-threaded file name is needed, the multithreaded file name will be inferred @@ -76,7 +73,7 @@ export default defineConfig(({ mode }) => { }, build: { // Required by vite-plugin-bundle-size - sourcemap: "hidden", + sourcemap: 'hidden', }, }; }); diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 79a847b91455..bd41c305479e 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -5,24 +5,25 @@ "type": "module", "exports": { ".": "./dest/index.js", - "./interfaces/pxe": "./dest/api/interfaces/pxe.js", + "./interfaces": "./dest/api/interfaces.js", "./abi": "./dest/api/abi.js", "./account": "./dest/api/account.js", "./addresses": "./dest/api/addresses.js", "./cheatcodes": "./dest/api/cheatcodes.js", - "./contracts": "./dest/contract/index.js", + "./contracts": "./dest/api/contract.js", "./deployment": "./dest/api/deployment.js", "./entrypoint": "./dest/api/entrypoint.js", "./eth_address": "./dest/api/eth_address.js", - "./ethereum": "./dest/api/ethereum/index.js", + "./ethereum": "./dest/api/ethereum.js", "./fee": "./dest/api/fee.js", "./fields": "./dest/api/fields.js", "./log": "./dest/api/log.js", "./log_id": "./dest/api/log_id.js", - "./rpc": "./dest/rpc_clients/index.js", + "./rpc": "./dest/api/rpc.js", "./tx_hash": "./dest/api/tx_hash.js", "./wallet": "./dest/api/wallet.js", - "./utils": "./dest/utils/index.js" + "./utils": "./dest/api/utils.js", + "./testing": "./dest/api/testing.js" }, "typedocOptions": { "entryPoints": [ diff --git a/yarn-project/aztec.js/src/account_manager/deploy_account_method.ts b/yarn-project/aztec.js/src/account_manager/deploy_account_method.ts index debabd70bd7f..19d56d5c4316 100644 --- a/yarn-project/aztec.js/src/account_manager/deploy_account_method.ts +++ b/yarn-project/aztec.js/src/account_manager/deploy_account_method.ts @@ -4,8 +4,8 @@ import type { PublicKeys } from '@aztec/stdlib/keys'; import type { AuthWitnessProvider } from '../account/interface.js'; import type { Wallet } from '../account/wallet.js'; import { Contract } from '../contract/contract.js'; +import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js'; -import { ContractFunctionInteraction } from '../contract/index.js'; import { EntrypointPayload, computeCombinedPayloadHash } from '../entrypoint/payload.js'; /** diff --git a/yarn-project/aztec.js/src/account_manager/index.ts b/yarn-project/aztec.js/src/account_manager/index.ts index 5f52856fc10f..f642ea5d2264 100644 --- a/yarn-project/aztec.js/src/account_manager/index.ts +++ b/yarn-project/aztec.js/src/account_manager/index.ts @@ -7,8 +7,8 @@ import { deriveKeys } from '@aztec/stdlib/keys'; import type { AccountContract } from '../account/contract.js'; import type { Salt, Wallet } from '../account/index.js'; import type { AccountInterface } from '../account/interface.js'; +import { Contract } from '../contract/contract.js'; import { DeployMethod, type DeployOptions } from '../contract/deploy_method.js'; -import { Contract } from '../contract/index.js'; import { DefaultWaitOpts, type WaitOpts } from '../contract/sent_tx.js'; import { DefaultMultiCallEntrypoint } from '../entrypoint/default_multi_call_entrypoint.js'; import { AccountWalletWithSecretKey, SignerlessWallet } from '../wallet/index.js'; diff --git a/yarn-project/aztec.js/src/api/abi.ts b/yarn-project/aztec.js/src/api/abi.ts index 8291aabae1ea..202228406304 100644 --- a/yarn-project/aztec.js/src/api/abi.ts +++ b/yarn-project/aztec.js/src/api/abi.ts @@ -3,6 +3,17 @@ export { type FunctionArtifact, EventSelector, FunctionSelector, + FunctionCall, + NoteSelector, + type ABIParameter, + decodeFromAbi, + encodeArguments, + type AbiType, + isAddressStruct, + isAztecAddressStruct, + isEthAddressStruct, + isWrappedFieldStruct, + isFunctionSelectorStruct, loadContractArtifact, contractArtifactToBuffer, contractArtifactFromBuffer, diff --git a/yarn-project/aztec.js/src/api/account.ts b/yarn-project/aztec.js/src/api/account.ts index 9e745d3e9379..d064159f05b9 100644 --- a/yarn-project/aztec.js/src/api/account.ts +++ b/yarn-project/aztec.js/src/api/account.ts @@ -7,4 +7,4 @@ export { getAccountContractAddress, } from '../account/index.js'; -export { AccountManager } from '../account_manager/index.js'; +export { AccountManager, type DeployAccountOptions } from '../account_manager/index.js'; diff --git a/yarn-project/aztec.js/src/contract/index.ts b/yarn-project/aztec.js/src/api/contract.ts similarity index 75% rename from yarn-project/aztec.js/src/contract/index.ts rename to yarn-project/aztec.js/src/api/contract.ts index 265886aea9cc..e128adf0e465 100644 --- a/yarn-project/aztec.js/src/contract/index.ts +++ b/yarn-project/aztec.js/src/api/contract.ts @@ -35,14 +35,28 @@ * * @packageDocumentation */ -export { Contract } from './contract.js'; +export { Contract } from '../contract/contract.js'; export { ContractFunctionInteraction, type ProfileResult, type SendMethodOptions, -} from './contract_function_interaction.js'; -export { DefaultWaitOpts, SentTx, type WaitOpts } from './sent_tx.js'; -export { ContractBase, type ContractMethod, type ContractNotes, type ContractStorageLayout } from './contract_base.js'; -export { BatchCall } from './batch_call.js'; -export { type DeployOptions, DeployMethod } from './deploy_method.js'; -export { DeploySentTx } from './deploy_sent_tx.js'; +} from '../contract/contract_function_interaction.js'; +export { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/sent_tx.js'; +export { + ContractBase, + type ContractMethod, + type ContractNotes, + type ContractStorageLayout, +} from '../contract/contract_base.js'; +export { BatchCall } from '../contract/batch_call.js'; +export { type DeployOptions, DeployMethod } from '../contract/deploy_method.js'; +export { DeploySentTx } from '../contract/deploy_sent_tx.js'; + +export { + type PartialAddress, + type ContractClassWithId, + type ContractInstanceWithAddress, + getContractClassFromArtifact, + getContractInstanceFromDeployParams, + type NodeInfo, +} from '@aztec/stdlib/contract'; diff --git a/yarn-project/aztec.js/src/api/deployment.ts b/yarn-project/aztec.js/src/api/deployment.ts index e6e2ad245211..ed89873c5aa6 100644 --- a/yarn-project/aztec.js/src/api/deployment.ts +++ b/yarn-project/aztec.js/src/api/deployment.ts @@ -1,3 +1,4 @@ export { registerContractClass } from '../deployment/register_class.js'; export { broadcastPrivateFunction, broadcastUnconstrainedFunction } from '../deployment/broadcast_function.js'; export { deployInstance } from '../deployment/deploy_instance.js'; +export { ContractDeployer } from '../deployment/contract_deployer.js'; diff --git a/yarn-project/aztec.js/src/api/ethereum.ts b/yarn-project/aztec.js/src/api/ethereum.ts new file mode 100644 index 000000000000..6c6a7d2058ed --- /dev/null +++ b/yarn-project/aztec.js/src/api/ethereum.ts @@ -0,0 +1,11 @@ +export { + L1FeeJuicePortalManager, + L1ToL2TokenPortalManager, + L1TokenManager, + L1TokenPortalManager, + type L2AmountClaim, + type L2AmountClaimWithRecipient, + type L2Claim, + generateClaimSecret, +} from '../ethereum/portal_manager.js'; +export { getL1ContractAddresses } from '../ethereum/l1_contracts.js'; diff --git a/yarn-project/aztec.js/src/api/ethereum/index.ts b/yarn-project/aztec.js/src/api/ethereum/index.ts deleted file mode 100644 index f99e90e89197..000000000000 --- a/yarn-project/aztec.js/src/api/ethereum/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export { - L1FeeJuicePortalManager, - L1ToL2TokenPortalManager, - L1TokenManager, - L1TokenPortalManager, - type L2AmountClaim, - type L2AmountClaimWithRecipient, - type L2Claim, - generateClaimSecret, -} from './portal_manager.js'; -export { getL1ContractAddresses } from './l1_contracts.js'; -export { RollupCheatCodes, EthCheatCodes } from './cheat_codes.js'; -export { ChainMonitor } from './chain_monitor.js'; -export { AnvilTestWatcher } from './anvil_test_watcher.js'; -export { - deployL1Contract, - deployL1Contracts, - type DeployL1ContractsReturnType, -} from '@aztec/ethereum/deploy-l1-contracts'; diff --git a/yarn-project/aztec.js/src/api/interfaces/pxe.ts b/yarn-project/aztec.js/src/api/interfaces.ts similarity index 100% rename from yarn-project/aztec.js/src/api/interfaces/pxe.ts rename to yarn-project/aztec.js/src/api/interfaces.ts diff --git a/yarn-project/aztec.js/src/api/rpc.ts b/yarn-project/aztec.js/src/api/rpc.ts new file mode 100644 index 000000000000..7f12bc9cba0f --- /dev/null +++ b/yarn-project/aztec.js/src/api/rpc.ts @@ -0,0 +1,2 @@ +export { createPXEClient } from '../rpc_clients/pxe_client.js'; +export { createCompatibleClient } from '../rpc_clients/node/index.js'; diff --git a/yarn-project/aztec.js/src/api/testing.ts b/yarn-project/aztec.js/src/api/testing.ts new file mode 100644 index 000000000000..c17d63bc0f70 --- /dev/null +++ b/yarn-project/aztec.js/src/api/testing.ts @@ -0,0 +1,5 @@ +export { AnvilTestWatcher } from '../test/anvil_test_watcher.js'; +export { RollupCheatCodes } from '../test/rollup_cheat_codes.js'; +export { AztecCheatCodes } from '../test/aztec_cheat_codes.js'; +export { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes'; +export { CheatCodes } from '../test/cheat_codes.js'; diff --git a/yarn-project/aztec.js/src/utils/index.ts b/yarn-project/aztec.js/src/api/utils.ts similarity index 53% rename from yarn-project/aztec.js/src/utils/index.ts rename to yarn-project/aztec.js/src/api/utils.ts index bd52ec8ea9c3..acc098ae5bee 100644 --- a/yarn-project/aztec.js/src/utils/index.ts +++ b/yarn-project/aztec.js/src/api/utils.ts @@ -1,4 +1,4 @@ -export { generatePublicKey } from './pub_key.js'; +export { generatePublicKey } from '../utils/pub_key.js'; export { type AztecAddressLike, type EthAddressLike, @@ -7,15 +7,15 @@ export { type FunctionSelectorLike, type U128Like, type WrappedFieldLike, -} from './abi_types.js'; +} from '../utils/abi_types.js'; export { computeAuthWitMessageHash, computeInnerAuthWitHash, computeInnerAuthWitHashFromAction, type IntentAction, type IntentInnerHash, -} from './authwit.js'; -export { waitForPXE } from './pxe.js'; -export { waitForNode, createAztecNodeClient, type AztecNode } from './node.js'; -export { getFeeJuiceBalance } from './fee_juice.js'; -export { readFieldCompressedString } from './field_compressed_string.js'; +} from '../utils/authwit.js'; +export { waitForPXE } from '../utils/pxe.js'; +export { waitForNode, createAztecNodeClient, type AztecNode } from '../utils/node.js'; +export { getFeeJuiceBalance } from '../utils/fee_juice.js'; +export { readFieldCompressedString } from '../utils/field_compressed_string.js'; diff --git a/yarn-project/aztec.js/src/api/wallet.ts b/yarn-project/aztec.js/src/api/wallet.ts index edcf1b0f6e15..e43a5bddb55d 100644 --- a/yarn-project/aztec.js/src/api/wallet.ts +++ b/yarn-project/aztec.js/src/api/wallet.ts @@ -1,7 +1 @@ -export { - AccountWallet, - AccountWalletWithSecretKey as AccountWalletWithSecretKey, - SignerlessWallet, - type Wallet, - getWallet, -} from '../wallet/index.js'; +export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet, getWallet } from '../wallet/index.js'; diff --git a/yarn-project/aztec.js/src/contract/batch_call.ts b/yarn-project/aztec.js/src/contract/batch_call.ts index f46fc2760cc7..607cdcaf30e3 100644 --- a/yarn-project/aztec.js/src/contract/batch_call.ts +++ b/yarn-project/aztec.js/src/contract/batch_call.ts @@ -1,7 +1,7 @@ import { type FunctionCall, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi'; import type { TxExecutionRequest } from '@aztec/stdlib/tx'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import { type ExecutionRequestInit, mergeExecutionRequestInits } from '../entrypoint/entrypoint.js'; import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js'; import type { SimulateMethodOptions } from './contract_function_interaction.js'; diff --git a/yarn-project/aztec.js/src/contract/contract.ts b/yarn-project/aztec.js/src/contract/contract.ts index db1d2175d079..61caeae78aa2 100644 --- a/yarn-project/aztec.js/src/contract/contract.ts +++ b/yarn-project/aztec.js/src/contract/contract.ts @@ -3,7 +3,7 @@ import type { AztecAddress } from '@aztec/stdlib/aztec-address'; import { getContractClassFromArtifact } from '@aztec/stdlib/contract'; import { PublicKeys } from '@aztec/stdlib/keys'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import { ContractBase } from './contract_base.js'; import { DeployMethod } from './deploy_method.js'; diff --git a/yarn-project/aztec.js/src/contract/contract_base.ts b/yarn-project/aztec.js/src/contract/contract_base.ts index bc28318afba7..84fd3ba018f2 100644 --- a/yarn-project/aztec.js/src/contract/contract_base.ts +++ b/yarn-project/aztec.js/src/contract/contract_base.ts @@ -7,7 +7,7 @@ import { } from '@aztec/stdlib/abi'; import { type ContractInstanceWithAddress, computePartialAddress } from '@aztec/stdlib/contract'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import { ContractFunctionInteraction } from './contract_function_interaction.js'; /** diff --git a/yarn-project/aztec.js/src/contract/deploy_method.ts b/yarn-project/aztec.js/src/contract/deploy_method.ts index 5f7761ab61b4..12c5ad68cd66 100644 --- a/yarn-project/aztec.js/src/contract/deploy_method.ts +++ b/yarn-project/aztec.js/src/contract/deploy_method.ts @@ -11,7 +11,7 @@ import type { GasSettings } from '@aztec/stdlib/gas'; import type { PublicKeys } from '@aztec/stdlib/keys'; import type { TxExecutionRequest } from '@aztec/stdlib/tx'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import { deployInstance } from '../deployment/deploy_instance.js'; import { registerContractClass } from '../deployment/register_class.js'; import { type ExecutionRequestInit, mergeExecutionRequestInits } from '../entrypoint/entrypoint.js'; diff --git a/yarn-project/aztec.js/src/contract/deploy_proven_tx.ts b/yarn-project/aztec.js/src/contract/deploy_proven_tx.ts index 13d61a308cfa..cf7151091524 100644 --- a/yarn-project/aztec.js/src/contract/deploy_proven_tx.ts +++ b/yarn-project/aztec.js/src/contract/deploy_proven_tx.ts @@ -3,7 +3,7 @@ import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract'; import type { PXE } from '@aztec/stdlib/interfaces/client'; import type { Tx } from '@aztec/stdlib/tx'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import type { Contract } from './contract.js'; import { DeploySentTx } from './deploy_sent_tx.js'; import { ProvenTx } from './proven_tx.js'; diff --git a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts index e5992e06da53..6ff89c1fb776 100644 --- a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts @@ -5,7 +5,7 @@ import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract'; import type { AztecNode, PXE } from '@aztec/stdlib/interfaces/client'; import type { TxHash, TxReceipt } from '@aztec/stdlib/tx'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import type { Contract } from './contract.js'; import type { ContractBase } from './contract_base.js'; import { SentTx, type WaitOpts } from './sent_tx.js'; diff --git a/yarn-project/aztec.js/src/contract/protocol_contracts.ts b/yarn-project/aztec.js/src/contract/protocol_contracts.ts index 0166d5e3f3c7..a72d22c45d41 100644 --- a/yarn-project/aztec.js/src/contract/protocol_contracts.ts +++ b/yarn-project/aztec.js/src/contract/protocol_contracts.ts @@ -1,6 +1,6 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts'; -import type { Wallet } from '../wallet/index.js'; +import type { Wallet } from '../account/wallet.js'; import { UnsafeContract } from './unsafe_contract.js'; /** Returns a Contract wrapper for the class registerer. */ diff --git a/yarn-project/aztec.js/src/contract/proven_tx.ts b/yarn-project/aztec.js/src/contract/proven_tx.ts index cbe0a4c87a69..dd30bb060060 100644 --- a/yarn-project/aztec.js/src/contract/proven_tx.ts +++ b/yarn-project/aztec.js/src/contract/proven_tx.ts @@ -1,7 +1,7 @@ import type { PXE } from '@aztec/stdlib/interfaces/client'; import { Tx } from '@aztec/stdlib/tx'; -import type { Wallet } from '../account/index.js'; +import type { Wallet } from '../account/wallet.js'; import { SentTx } from './sent_tx.js'; /** diff --git a/yarn-project/aztec.js/src/contract/unsafe_contract.ts b/yarn-project/aztec.js/src/contract/unsafe_contract.ts index f45b7eb9ba30..05174da334d1 100644 --- a/yarn-project/aztec.js/src/contract/unsafe_contract.ts +++ b/yarn-project/aztec.js/src/contract/unsafe_contract.ts @@ -1,7 +1,7 @@ import type { ContractArtifact } from '@aztec/stdlib/abi'; import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract'; -import type { Wallet } from '../wallet/index.js'; +import type { Wallet } from '../account/wallet.js'; import { ContractBase } from './contract_base.js'; /** Unsafe constructor for ContractBase that bypasses the check that the instance is registered in the wallet. */ diff --git a/yarn-project/aztec.js/src/deployment/index.ts b/yarn-project/aztec.js/src/deployment/index.ts deleted file mode 100644 index 587eeb108ce7..000000000000 --- a/yarn-project/aztec.js/src/deployment/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './contract_deployer.js'; diff --git a/yarn-project/aztec.js/src/api/ethereum/l1_contracts.ts b/yarn-project/aztec.js/src/ethereum/l1_contracts.ts similarity index 89% rename from yarn-project/aztec.js/src/api/ethereum/l1_contracts.ts rename to yarn-project/aztec.js/src/ethereum/l1_contracts.ts index 7796ec1b5652..645f2ad49b6f 100644 --- a/yarn-project/aztec.js/src/api/ethereum/l1_contracts.ts +++ b/yarn-project/aztec.js/src/ethereum/l1_contracts.ts @@ -1,7 +1,7 @@ import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses'; import { retryUntil } from '@aztec/foundation/retry'; -import { createPXEClient } from '../../rpc_clients/index.js'; +import { createPXEClient } from '../rpc_clients/pxe_client.js'; export const getL1ContractAddresses = async (url: string): Promise => { const pxeClient = createPXEClient(url, {}); diff --git a/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts b/yarn-project/aztec.js/src/ethereum/portal_manager.ts similarity index 98% rename from yarn-project/aztec.js/src/api/ethereum/portal_manager.ts rename to yarn-project/aztec.js/src/ethereum/portal_manager.ts index 368c7411165e..37ce8c50428a 100644 --- a/yarn-project/aztec.js/src/api/ethereum/portal_manager.ts +++ b/yarn-project/aztec.js/src/ethereum/portal_manager.ts @@ -5,7 +5,10 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import type { Logger } from '@aztec/foundation/log'; import type { SiblingPath } from '@aztec/foundation/trees'; -import { FeeJuicePortalAbi, OutboxAbi, TestERC20Abi, TokenPortalAbi } from '@aztec/l1-artifacts'; +import { FeeJuicePortalAbi } from '@aztec/l1-artifacts/FeeJuicePortalAbi'; +import { OutboxAbi } from '@aztec/l1-artifacts/OutboxAbi'; +import { TestERC20Abi } from '@aztec/l1-artifacts/TestERC20Abi'; +import { TokenPortalAbi } from '@aztec/l1-artifacts/TokenPortalAbi'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; import { computeSecretHash } from '@aztec/stdlib/hash'; import type { PXE } from '@aztec/stdlib/interfaces/client'; diff --git a/yarn-project/aztec.js/src/fee/fee_juice_payment_method_with_claim.ts b/yarn-project/aztec.js/src/fee/fee_juice_payment_method_with_claim.ts index 89eae417ea06..28efae594188 100644 --- a/yarn-project/aztec.js/src/fee/fee_juice_payment_method_with_claim.ts +++ b/yarn-project/aztec.js/src/fee/fee_juice_payment_method_with_claim.ts @@ -3,8 +3,8 @@ import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import type { FunctionCall } from '@aztec/stdlib/abi'; import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi'; -import type { L2AmountClaim } from '../api/ethereum/portal_manager.js'; import { getFeeJuice } from '../contract/protocol_contracts.js'; +import type { L2AmountClaim } from '../ethereum/portal_manager.js'; import type { Wallet } from '../wallet/index.js'; import { FeeJuicePaymentMethod } from './fee_juice_payment_method.js'; diff --git a/yarn-project/aztec.js/src/index.ts b/yarn-project/aztec.js/src/index.ts index db7b56ea4a15..6f51e88a49c3 100644 --- a/yarn-project/aztec.js/src/index.ts +++ b/yarn-project/aztec.js/src/index.ts @@ -20,32 +20,12 @@ * TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it). */ -export { ContractDeployer } from './deployment/index.js'; - -export { NoteSelector } from '@aztec/stdlib/abi'; - -export { createCompatibleClient, createPXEClient } from './rpc_clients/index.js'; - -export { type DeployAccountOptions } from './account_manager/index.js'; - -export { AccountWallet, AccountWalletWithSecretKey, SignerlessWallet } from './wallet/index.js'; - -export { EthAddress } from '@aztec/foundation/eth-address'; - export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields'; export { SiblingPath } from '@aztec/foundation/trees'; export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants'; -export { - type PartialAddress, - type ContractClassWithId, - type ContractInstanceWithAddress, - getContractClassFromArtifact, - getContractInstanceFromDeployParams, - type NodeInfo, -} from '@aztec/stdlib/contract'; export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees'; export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys'; export { computeSecretHash } from '@aztec/stdlib/hash'; @@ -57,7 +37,6 @@ export { } from '@aztec/stdlib/keys'; export { AuthWitness } from '@aztec/stdlib/auth-witness'; export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers'; -export { FunctionCall } from '@aztec/stdlib/abi'; export { Tx, TxExecutionRequest, @@ -80,7 +59,6 @@ export { ProtocolContractAddress } from '@aztec/protocol-contracts'; // TODO: These kinds of things have no place on our public api. // External devs will almost certainly have their own methods of doing these things. // If we want to use them in our own "aztec.js consuming code", import them from foundation as needed. -export { decodeFromAbi, encodeArguments, type AbiType } from '@aztec/stdlib/abi'; export { toBigIntBE } from '@aztec/foundation/bigint-buffer'; export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto'; export { makeFetch } from '@aztec/foundation/json-rpc/client'; @@ -97,10 +75,12 @@ export { fileURLToPath } from '@aztec/foundation/url'; export * from './api/abi.js'; export * from './api/account.js'; export * from './api/addresses.js'; -export * from './api/cheat_codes.js'; -export * from './api/ethereum/index.js'; +export * from './api/deployment.js'; +export * from './api/ethereum.js'; +export * from './api/eth_address.js'; export * from './api/fee.js'; export * from './api/log.js'; -// Granular export, even if not in the api folder -export * from './contract/index.js'; -export * from './utils/index.js'; +export * from './api/contract.js'; +export * from './api/utils.js'; +export * from './api/rpc.js'; +export * from './api/wallet.js'; diff --git a/yarn-project/aztec.js/src/rpc_clients/index.ts b/yarn-project/aztec.js/src/rpc_clients/index.ts deleted file mode 100644 index 194614b56eeb..000000000000 --- a/yarn-project/aztec.js/src/rpc_clients/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './pxe_client.js'; -export * from './node/index.js'; diff --git a/yarn-project/aztec.js/src/api/ethereum/anvil_test_watcher.ts b/yarn-project/aztec.js/src/test/anvil_test_watcher.ts similarity index 97% rename from yarn-project/aztec.js/src/api/ethereum/anvil_test_watcher.ts rename to yarn-project/aztec.js/src/test/anvil_test_watcher.ts index 5b06b45c1cff..f4f7aa4b3fb1 100644 --- a/yarn-project/aztec.js/src/api/ethereum/anvil_test_watcher.ts +++ b/yarn-project/aztec.js/src/test/anvil_test_watcher.ts @@ -4,11 +4,11 @@ import type { EthAddress } from '@aztec/foundation/eth-address'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/running-promise'; import type { TestDateProvider } from '@aztec/foundation/timer'; -import { RollupAbi } from '@aztec/l1-artifacts'; +import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; import { type GetContractReturnType, getAddress, getContract } from 'viem'; -import { RollupCheatCodes } from './cheat_codes.js'; +import { RollupCheatCodes } from './rollup_cheat_codes.js'; /** * Represents a watcher for a rollup contract. diff --git a/yarn-project/aztec.js/src/utils/aztec_cheatcodes.ts b/yarn-project/aztec.js/src/test/aztec_cheat_codes.ts similarity index 100% rename from yarn-project/aztec.js/src/utils/aztec_cheatcodes.ts rename to yarn-project/aztec.js/src/test/aztec_cheat_codes.ts diff --git a/yarn-project/aztec.js/src/api/cheat_codes.ts b/yarn-project/aztec.js/src/test/cheat_codes.ts similarity index 90% rename from yarn-project/aztec.js/src/api/cheat_codes.ts rename to yarn-project/aztec.js/src/test/cheat_codes.ts index eecb51dfba42..e4068d1a79e0 100644 --- a/yarn-project/aztec.js/src/api/cheat_codes.ts +++ b/yarn-project/aztec.js/src/test/cheat_codes.ts @@ -2,8 +2,8 @@ import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes'; import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses'; import type { PXE } from '@aztec/stdlib/interfaces/client'; -import { AztecCheatCodes } from '../utils/aztec_cheatcodes.js'; -import { RollupCheatCodes } from './ethereum/cheat_codes.js'; +import { AztecCheatCodes } from './aztec_cheat_codes.js'; +import { RollupCheatCodes } from './rollup_cheat_codes.js'; /** * A class that provides utility functions for interacting with the chain. diff --git a/yarn-project/aztec.js/src/api/ethereum/cheat_codes.ts b/yarn-project/aztec.js/src/test/rollup_cheat_codes.ts similarity index 98% rename from yarn-project/aztec.js/src/api/ethereum/cheat_codes.ts rename to yarn-project/aztec.js/src/test/rollup_cheat_codes.ts index 7ea1d79669fb..efcf163ab9cf 100644 --- a/yarn-project/aztec.js/src/api/ethereum/cheat_codes.ts +++ b/yarn-project/aztec.js/src/test/rollup_cheat_codes.ts @@ -3,13 +3,11 @@ import { EthCheatCodes } from '@aztec/ethereum/eth-cheatcodes'; import type { L1ContractAddresses } from '@aztec/ethereum/l1-contract-addresses'; import { EthAddress } from '@aztec/foundation/eth-address'; import { createLogger } from '@aztec/foundation/log'; -import { RollupAbi } from '@aztec/l1-artifacts'; +import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; import { type GetContractReturnType, type Hex, createPublicClient, fallback, getContract, http, keccak256 } from 'viem'; import { foundry } from 'viem/chains'; -export { EthCheatCodes }; - /** Cheat codes for the L1 rollup contract. */ export class RollupCheatCodes { private client: ViemPublicClient; diff --git a/yarn-project/aztec.js/src/utils/fee_juice.ts b/yarn-project/aztec.js/src/utils/fee_juice.ts index e9fd51fb52ab..81ddb58844a7 100644 --- a/yarn-project/aztec.js/src/utils/fee_juice.ts +++ b/yarn-project/aztec.js/src/utils/fee_juice.ts @@ -2,8 +2,7 @@ import { Fr } from '@aztec/foundation/fields'; import { ProtocolContractAddress } from '@aztec/protocol-contracts'; import type { AztecAddress } from '@aztec/stdlib/aztec-address'; import { deriveStorageSlotInMap } from '@aztec/stdlib/hash'; - -import type { PXE } from '../api/interfaces/pxe.js'; +import type { PXE } from '@aztec/stdlib/interfaces/client'; /** * Returns the owner's fee juice balance. diff --git a/yarn-project/aztec/src/sandbox/sandbox.ts b/yarn-project/aztec/src/sandbox/sandbox.ts index b5b4990b2d04..9c7ae1cde522 100644 --- a/yarn-project/aztec/src/sandbox/sandbox.ts +++ b/yarn-project/aztec/src/sandbox/sandbox.ts @@ -2,7 +2,8 @@ import { getSchnorrWallet } from '@aztec/accounts/schnorr'; import { deployFundedSchnorrAccounts, getInitialTestAccounts } from '@aztec/accounts/testing'; import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; -import { AnvilTestWatcher, EthCheatCodes, SignerlessWallet } from '@aztec/aztec.js'; +import { SignerlessWallet } from '@aztec/aztec.js'; +import { AnvilTestWatcher, EthCheatCodes } from '@aztec/aztec.js/testing'; import { type BlobSinkClientInterface, createBlobSinkClient } from '@aztec/blob-sink/client'; import { setupCanonicalL2FeeJuice } from '@aztec/cli/setup-contracts'; import { GENESIS_ARCHIVE_ROOT, GENESIS_BLOCK_HASH } from '@aztec/constants'; diff --git a/yarn-project/cli/src/cmds/l1/advance_epoch.ts b/yarn-project/cli/src/cmds/l1/advance_epoch.ts index 4fc5fbbc9c2f..a4003f922318 100644 --- a/yarn-project/cli/src/cmds/l1/advance_epoch.ts +++ b/yarn-project/cli/src/cmds/l1/advance_epoch.ts @@ -1,4 +1,5 @@ -import { CheatCodes, createPXEClient, makeFetch } from '@aztec/aztec.js'; +import { createPXEClient, makeFetch } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import type { LogFn } from '@aztec/foundation/log'; export async function advanceEpoch(l1RpcUrls: string[], rpcUrl: string, log: LogFn) { diff --git a/yarn-project/cli/src/cmds/l1/assume_proven_through.ts b/yarn-project/cli/src/cmds/l1/assume_proven_through.ts index 6217b05179ab..2d5aa03f664e 100644 --- a/yarn-project/cli/src/cmds/l1/assume_proven_through.ts +++ b/yarn-project/cli/src/cmds/l1/assume_proven_through.ts @@ -1,4 +1,5 @@ -import { EthCheatCodes, RollupCheatCodes, createPXEClient, makeFetch } from '@aztec/aztec.js'; +import { createPXEClient, makeFetch } from '@aztec/aztec.js'; +import { EthCheatCodes, RollupCheatCodes } from '@aztec/aztec.js/testing'; import type { LogFn } from '@aztec/foundation/log'; export async function assumeProvenThrough( 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 0459b9a660bf..dd686e466254 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 @@ -1,6 +1,6 @@ -import { deployL1Contract, fileURLToPath } from '@aztec/aztec.js'; +import { fileURLToPath } from '@aztec/aztec.js'; import { BBCircuitVerifier } from '@aztec/bb-prover'; -import { type ViemPublicClient, type ViemWalletClient, createL1Clients } from '@aztec/ethereum'; +import { type ViemPublicClient, type ViemWalletClient, createL1Clients, deployL1Contract } from '@aztec/ethereum'; import type { Logger } from '@aztec/foundation/log'; import { HonkVerifierAbi, HonkVerifierBytecode, IVerifierAbi } from '@aztec/l1-artifacts'; import { Proof } from '@aztec/stdlib/proofs'; diff --git a/yarn-project/end-to-end/src/e2e_block_building.test.ts b/yarn-project/end-to-end/src/e2e_block_building.test.ts index 2746bc74bd7f..82aa203dcf3b 100644 --- a/yarn-project/end-to-end/src/e2e_block_building.test.ts +++ b/yarn-project/end-to-end/src/e2e_block_building.test.ts @@ -3,10 +3,8 @@ import type { AztecNodeService } from '@aztec/aztec-node'; import { type AccountWallet, AccountWalletWithSecretKey, - AnvilTestWatcher, type AztecAddress, type AztecNode, - type CheatCodes, ContractDeployer, ContractFunctionInteraction, Fr, @@ -20,6 +18,7 @@ import { retryUntil, sleep, } from '@aztec/aztec.js'; +import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing'; import { getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { asyncMap } from '@aztec/foundation/async-map'; import { times, unique } from '@aztec/foundation/collection'; 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 807d35d7287b..ebdec0d7dabb 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 @@ -1,4 +1,5 @@ -import { AnvilTestWatcher, type AztecAddress, type CheatCodes, EthAddress, Fr, type Wallet } from '@aztec/aztec.js'; +import { type AztecAddress, EthAddress, Fr, type Wallet } from '@aztec/aztec.js'; +import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing'; import { EthCheatCodes, type ViemPublicClient, type ViemWalletClient, createL1Clients } from '@aztec/ethereum'; import { RollupContract } from '@aztec/ethereum/contracts'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; 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 ada71b14e577..83952263927a 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 @@ -4,13 +4,13 @@ import { type AccountWallet, AztecAddress, type AztecNode, - CheatCodes, type CompleteAddress, EthAddress, type Logger, type PXE, createLogger, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { type ViemPublicClient, createL1Clients, deployL1Contract } from '@aztec/ethereum'; import { InboxAbi, OutboxAbi, RollupAbi, TestERC20Abi, TestERC20Bytecode } from '@aztec/l1-artifacts'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_private.test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_private.test.ts index db03704e637f..6c4158db185b 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_private.test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging/token_bridge_private.test.ts @@ -1,4 +1,5 @@ -import { CheatCodes, Fr } from '@aztec/aztec.js'; +import { Fr } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { RollupAbi } from '@aztec/l1-artifacts'; import { getContract } from 'viem'; diff --git a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts index 53d881596c91..f8d615e473c3 100644 --- a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts +++ b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts @@ -1,6 +1,5 @@ import { type AccountWallet, - type CheatCodes, Fr, HashedValues, type Logger, @@ -9,6 +8,7 @@ import { type UniqueNote, deriveKeys, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { ClaimContract } from '@aztec/noir-contracts.js/Claim'; import { CrowdfundingContract } from '@aztec/noir-contracts.js/Crowdfunding'; import { TestContract } from '@aztec/noir-contracts.js/Test'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_empty_blocks.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_empty_blocks.test.ts index d9ff11859110..bf62fd820fc6 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_empty_blocks.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_empty_blocks.test.ts @@ -1,7 +1,7 @@ import { type Logger, sleep } from '@aztec/aztec.js'; -import { ChainMonitor } from '@aztec/aztec.js/ethereum'; // eslint-disable-next-line no-restricted-imports import { RollupContract } from '@aztec/ethereum/contracts'; +import { ChainMonitor } from '@aztec/ethereum/test'; import { jest } from '@jest/globals'; diff --git a/yarn-project/end-to-end/src/e2e_epochs/epochs_proof_fails.test.ts b/yarn-project/end-to-end/src/e2e_epochs/epochs_proof_fails.test.ts index a6ed4aa86543..9b407aee9cc2 100644 --- a/yarn-project/end-to-end/src/e2e_epochs/epochs_proof_fails.test.ts +++ b/yarn-project/end-to-end/src/e2e_epochs/epochs_proof_fails.test.ts @@ -1,6 +1,6 @@ import { type Logger, getTimestampRangeForEpoch, sleep } from '@aztec/aztec.js'; -import { ChainMonitor } from '@aztec/aztec.js/ethereum'; import { RollupContract } from '@aztec/ethereum/contracts'; +import { ChainMonitor } from '@aztec/ethereum/test'; import { type Delayer, waitUntilL1Timestamp } from '@aztec/ethereum/test'; import { promiseWithResolvers } from '@aztec/foundation/promise'; import type { TestProverNode } from '@aztec/prover-node/test'; 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 94ac185c9774..de75e0c097f1 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 @@ -1,7 +1,7 @@ import { AztecNodeService } from '@aztec/aztec-node'; import { Fr, type Logger, getTimestampRangeForEpoch, retryUntil, sleep } from '@aztec/aztec.js'; -import { ChainMonitor } from '@aztec/aztec.js/ethereum'; import { RollupContract } from '@aztec/ethereum/contracts'; +import { ChainMonitor } from '@aztec/ethereum/test'; import { DelayedTxUtils, type Delayer, waitUntilL1Timestamp } from '@aztec/ethereum/test'; import { randomBytes } from '@aztec/foundation/crypto'; import { withLogNameSuffix } from '@aztec/foundation/log'; diff --git a/yarn-project/end-to-end/src/e2e_fees/fee_settings.test.ts b/yarn-project/end-to-end/src/e2e_fees/fee_settings.test.ts index b9c5b6f6a3a1..a3ca4d1407cb 100644 --- a/yarn-project/end-to-end/src/e2e_fees/fee_settings.test.ts +++ b/yarn-project/end-to-end/src/e2e_fees/fee_settings.test.ts @@ -2,10 +2,10 @@ import { type AccountWallet, type AztecAddress, type AztecNode, - type CheatCodes, FeeJuicePaymentMethod, retryUntil, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { Fr } from '@aztec/foundation/fields'; import { TestContract } from '@aztec/noir-contracts.js/Test'; import type { GasSettings } from '@aztec/stdlib/gas'; 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 e5a4880f3bab..e66dab0362f2 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 @@ -3,15 +3,15 @@ import { type AccountWallet, type AztecAddress, type AztecNode, - ChainMonitor, - CheatCodes, type Logger, type PXE, createLogger, sleep, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { FEE_FUNDING_FOR_TESTER_ACCOUNT } from '@aztec/constants'; import { type DeployL1ContractsArgs, RollupContract, createL1Clients } from '@aztec/ethereum'; +import { ChainMonitor } from '@aztec/ethereum/test'; import { EthAddress } from '@aztec/foundation/eth-address'; import { RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; import { AppSubscriptionContract } from '@aztec/noir-contracts.js/AppSubscription'; diff --git a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts index 9c5fdffbc31b..d7740f51b5fa 100644 --- a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts @@ -1,10 +1,6 @@ -import { - type AccountWallet, - type CheatCodes, - type DeployL1ContractsReturnType, - Fr, - type Logger, -} from '@aztec/aztec.js'; +import { type AccountWallet, Fr, type Logger } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; +import type { DeployL1ContractsReturnType } from '@aztec/ethereum'; import type { TestDateProvider } from '@aztec/foundation/timer'; import { RollupAbi } from '@aztec/l1-artifacts'; import { LendingContract } from '@aztec/noir-contracts.js/Lending'; diff --git a/yarn-project/end-to-end/src/e2e_outbox.test.ts b/yarn-project/end-to-end/src/e2e_outbox.test.ts index d3c6dbb34488..4b6b170c53d4 100644 --- a/yarn-project/end-to-end/src/e2e_outbox.test.ts +++ b/yarn-project/end-to-end/src/e2e_outbox.test.ts @@ -2,12 +2,12 @@ import { type AccountWalletWithSecretKey, type AztecNode, BatchCall, - type CheatCodes, - type DeployL1ContractsReturnType, EthAddress, Fr, type SiblingPath, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; +import type { DeployL1ContractsReturnType } from '@aztec/ethereum'; import { sha256ToField } from '@aztec/foundation/crypto'; import { truncateAndPad } from '@aztec/foundation/serialize'; import { OutboxAbi } from '@aztec/l1-artifacts'; 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 0b1c7579f13f..e871b9eba2cc 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 @@ -2,10 +2,9 @@ import { getSchnorrWalletWithSecretKey } from '@aztec/accounts/schnorr'; import type { InitialAccountData } from '@aztec/accounts/testing'; import type { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import type { AccountWalletWithSecretKey } from '@aztec/aztec.js'; -import { ChainMonitor } from '@aztec/aztec.js/ethereum'; import { RollupContract, getExpectedAddress, getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { L1TxUtilsWithBlobs } from '@aztec/ethereum/l1-tx-utils-with-blobs'; -import { EthCheatCodesWithState } from '@aztec/ethereum/test'; +import { ChainMonitor, EthCheatCodesWithState } from '@aztec/ethereum/test'; import { type Logger, createLogger } from '@aztec/foundation/log'; import { ForwarderAbi, ForwarderBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; import { SpamContract } from '@aztec/noir-contracts.js/Spam'; 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 922c37bb807a..0a53dd1fa529 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 @@ -1,5 +1,6 @@ import type { AztecNodeService } from '@aztec/aztec-node'; -import { deployL1Contract, sleep } from '@aztec/aztec.js'; +import { sleep } from '@aztec/aztec.js'; +import { deployL1Contract } from '@aztec/ethereum'; import { TestERC20Abi as FeeJuiceAbi, GovernanceAbi, diff --git a/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts b/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts index 2dd3dcaf6e5a..9bea56c2639a 100644 --- a/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts +++ b/yarn-project/end-to-end/src/e2e_prover/e2e_prover_test.ts @@ -8,18 +8,17 @@ import { type Archiver, createArchiver } from '@aztec/archiver'; import { type AccountWalletWithSecretKey, type AztecNode, - type CheatCodes, type CompleteAddress, - type DeployL1ContractsReturnType, EthAddress, type Logger, type PXE, createLogger, - deployL1Contract, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { BBCircuitVerifier, type ClientProtocolCircuitVerifier, TestCircuitVerifier } from '@aztec/bb-prover'; import { createBlobSinkClient } from '@aztec/blob-sink/client'; import type { BlobSinkServer } from '@aztec/blob-sink/server'; +import { type DeployL1ContractsReturnType, deployL1Contract } from '@aztec/ethereum'; import { Buffer32 } from '@aztec/foundation/buffer'; import { HonkVerifierAbi, HonkVerifierBytecode, RollupAbi, TestERC20Abi } from '@aztec/l1-artifacts'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; diff --git a/yarn-project/end-to-end/src/e2e_pruned_blocks.test.ts b/yarn-project/end-to-end/src/e2e_pruned_blocks.test.ts index 66f67cfb19c6..51c174e18512 100644 --- a/yarn-project/end-to-end/src/e2e_pruned_blocks.test.ts +++ b/yarn-project/end-to-end/src/e2e_pruned_blocks.test.ts @@ -2,12 +2,12 @@ import { type AccountWallet, type AztecAddress, type AztecNode, - type CheatCodes, type Logger, MerkleTreeId, type Wallet, retryUntil, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; 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 5979422dfb4c..5c3e5096fd8c 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 @@ -1,4 +1,5 @@ -import type { AztecNode, CheatCodes, Logger, PXE, Wallet } from '@aztec/aztec.js'; +import type { AztecNode, Logger, PXE, Wallet } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { type DeployL1ContractsReturnType, GovernanceProposerContract, 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 84360d64792f..86d23a1d23d0 100644 --- a/yarn-project/end-to-end/src/e2e_synching.test.ts +++ b/yarn-project/end-to-end/src/e2e_synching.test.ts @@ -37,7 +37,6 @@ import { createArchiver } from '@aztec/archiver'; import { AztecNodeService } from '@aztec/aztec-node'; import { type AccountWalletWithSecretKey, - AnvilTestWatcher, BatchCall, type Contract, Fr, @@ -46,6 +45,7 @@ import { createLogger, sleep, } from '@aztec/aztec.js'; +import { AnvilTestWatcher } from '@aztec/aztec.js/testing'; import { createBlobSinkClient } from '@aztec/blob-sink/client'; import { EpochCache } from '@aztec/epoch-cache'; import { 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 e4489960ca48..a99e00069e95 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 @@ -1,5 +1,5 @@ -import { type Logger, deployL1Contracts } from '@aztec/aztec.js'; -import type { DeployL1ContractsArgs, L1ContractsConfig } from '@aztec/ethereum'; +import type { Logger } from '@aztec/aztec.js'; +import { type DeployL1ContractsArgs, type L1ContractsConfig, deployL1Contracts } from '@aztec/ethereum'; import { getVKTreeRoot } from '@aztec/noir-protocol-circuits-types/vk-tree'; import { ProtocolContractAddress, protocolContractTreeRoot } from '@aztec/protocol-contracts'; 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 64d2aa7dfc41..0bf2b2a307d3 100644 --- a/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts +++ b/yarn-project/end-to-end/src/fixtures/snapshot_manager.ts @@ -2,21 +2,25 @@ import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr'; import { type InitialAccountData, deployFundedSchnorrAccounts, generateSchnorrAccounts } from '@aztec/accounts/testing'; import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; import { - AnvilTestWatcher, type AztecAddress, BatchCall, - CheatCodes, type CompleteAddress, type ContractFunctionInteraction, - type DeployL1ContractsReturnType, type Logger, type PXE, type Wallet, getContractClassFromArtifact, } from '@aztec/aztec.js'; import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment'; +import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing'; import { type BlobSinkServer, createBlobSinkServer } from '@aztec/blob-sink/server'; -import { type DeployL1ContractsArgs, createL1Clients, getL1ContractsConfigEnvVars, l1Artifacts } from '@aztec/ethereum'; +import { + type DeployL1ContractsArgs, + type DeployL1ContractsReturnType, + createL1Clients, + getL1ContractsConfigEnvVars, + l1Artifacts, +} from '@aztec/ethereum'; import { EthCheatCodesWithState, startAnvil } from '@aztec/ethereum/test'; import { asyncMap } from '@aztec/foundation/async-map'; import { randomBytes } from '@aztec/foundation/crypto'; diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index 95fcf0ef36d0..8c901f613cf6 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -10,13 +10,10 @@ import { type Archiver, createArchiver } from '@aztec/archiver'; import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; import { type AccountWalletWithSecretKey, - AnvilTestWatcher, type AztecAddress, type AztecNode, BatchCall, - CheatCodes, type ContractMethod, - type DeployL1ContractsReturnType, FeeJuicePaymentMethod, type Logger, type PXE, @@ -25,20 +22,22 @@ import { createAztecNodeClient, createLogger, createPXEClient, - deployL1Contracts, makeFetch, waitForPXE, } from '@aztec/aztec.js'; import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment'; +import { AnvilTestWatcher, CheatCodes } from '@aztec/aztec.js/testing'; import type { BBNativePrivateKernelProver } from '@aztec/bb-prover'; import { createBlobSinkClient } from '@aztec/blob-sink/client'; import { type BlobSinkServer, createBlobSinkServer } from '@aztec/blob-sink/server'; import { FEE_JUICE_INITIAL_MINT, GENESIS_ARCHIVE_ROOT, GENESIS_BLOCK_HASH } from '@aztec/constants'; import { type DeployL1ContractsArgs, + type DeployL1ContractsReturnType, ForwarderContract, NULL_KEY, createL1Clients, + deployL1Contracts, getL1ContractsConfigEnvVars, isAnvilTestChain, l1Artifacts, diff --git a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts index 039fa607b46d..ccf87c7208c7 100644 --- a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts +++ b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts @@ -1,6 +1,7 @@ // docs:start:imports import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing'; -import { type AccountWallet, CheatCodes, Fr, type PXE, TxStatus, createPXEClient, waitForPXE } from '@aztec/aztec.js'; +import { type AccountWallet, Fr, type PXE, TxStatus, createPXEClient, waitForPXE } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; // docs:end:imports // docs:start:import_contract import { TestContract } from '@aztec/noir-contracts.js/Test'; 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 e6cb8c017e86..d21b28d1efca 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 @@ -15,10 +15,14 @@ import { type SiblingPath, type TxReceipt, type Wallet, - deployL1Contract, retryUntil, } from '@aztec/aztec.js'; -import type { L1ContractAddresses, ViemPublicClient, ViemWalletClient } from '@aztec/ethereum'; +import { + type L1ContractAddresses, + type ViemPublicClient, + type ViemWalletClient, + deployL1Contract, +} from '@aztec/ethereum'; import { TestERC20Abi, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-artifacts'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; 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 e9019a2dedf1..708516525dc2 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 @@ -2,7 +2,6 @@ import { type AccountWallet, AztecAddress, type AztecNode, - type CheatCodes, EthAddress, Fr, type Logger, @@ -10,6 +9,7 @@ import { computeAuthWitMessageHash, generateClaimSecret, } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { type DeployL1ContractsReturnType, type ViemPublicClient, diff --git a/yarn-project/end-to-end/src/simulators/lending_simulator.ts b/yarn-project/end-to-end/src/simulators/lending_simulator.ts index c88f16a64b86..9d0723859a73 100644 --- a/yarn-project/end-to-end/src/simulators/lending_simulator.ts +++ b/yarn-project/end-to-end/src/simulators/lending_simulator.ts @@ -1,5 +1,6 @@ // Convenience struct to hold an account's address and secret that can easily be passed around. -import { AztecAddress, type CheatCodes, Fr } from '@aztec/aztec.js'; +import { AztecAddress, Fr } from '@aztec/aztec.js'; +import { CheatCodes } from '@aztec/aztec.js/testing'; import { pedersenHash } from '@aztec/foundation/crypto'; import type { TestDateProvider } from '@aztec/foundation/timer'; import type { RollupAbi } from '@aztec/l1-artifacts'; diff --git a/yarn-project/end-to-end/src/spartan/4epochs.test.ts b/yarn-project/end-to-end/src/spartan/4epochs.test.ts index e683fca03d7a..056e82905713 100644 --- a/yarn-project/end-to-end/src/spartan/4epochs.test.ts +++ b/yarn-project/end-to-end/src/spartan/4epochs.test.ts @@ -1,5 +1,5 @@ import { readFieldCompressedString } from '@aztec/aztec.js'; -import { RollupCheatCodes } from '@aztec/aztec.js/ethereum'; +import { RollupCheatCodes } from '@aztec/aztec.js/testing'; import { getL1ContractsConfigEnvVars } from '@aztec/ethereum'; import { EthCheatCodesWithState } from '@aztec/ethereum/test'; import { createLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/end-to-end/src/spartan/gating-passive.test.ts b/yarn-project/end-to-end/src/spartan/gating-passive.test.ts index d9789d3512e9..1d141f36ab97 100644 --- a/yarn-project/end-to-end/src/spartan/gating-passive.test.ts +++ b/yarn-project/end-to-end/src/spartan/gating-passive.test.ts @@ -1,5 +1,5 @@ import { createCompatibleClient, sleep } from '@aztec/aztec.js'; -import { RollupCheatCodes } from '@aztec/aztec.js/ethereum'; +import { RollupCheatCodes } from '@aztec/aztec.js/testing'; import { EthCheatCodesWithState } from '@aztec/ethereum/test'; import { createLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/end-to-end/src/spartan/reorg.test.ts b/yarn-project/end-to-end/src/spartan/reorg.test.ts index 074f1d8bd68c..0802a875f52c 100644 --- a/yarn-project/end-to-end/src/spartan/reorg.test.ts +++ b/yarn-project/end-to-end/src/spartan/reorg.test.ts @@ -1,5 +1,5 @@ import { sleep } from '@aztec/aztec.js'; -import { RollupCheatCodes } from '@aztec/aztec.js/ethereum'; +import { RollupCheatCodes } from '@aztec/aztec.js/testing'; import { EthCheatCodesWithState } from '@aztec/ethereum/test'; import { createLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/end-to-end/src/spartan/utils.ts b/yarn-project/end-to-end/src/spartan/utils.ts index 021e46ccb89b..cebf8c7e932b 100644 --- a/yarn-project/end-to-end/src/spartan/utils.ts +++ b/yarn-project/end-to-end/src/spartan/utils.ts @@ -1,5 +1,5 @@ import { createAztecNodeClient, createLogger, sleep } from '@aztec/aztec.js'; -import type { RollupCheatCodes } from '@aztec/aztec.js/ethereum'; +import type { RollupCheatCodes } from '@aztec/aztec.js/testing'; import type { Logger } from '@aztec/foundation/log'; import type { SequencerConfig } from '@aztec/sequencer-client'; diff --git a/yarn-project/ethereum/src/contracts/fee_juice.ts b/yarn-project/ethereum/src/contracts/fee_juice.ts index 388adb66278b..da6820f2883a 100644 --- a/yarn-project/ethereum/src/contracts/fee_juice.ts +++ b/yarn-project/ethereum/src/contracts/fee_juice.ts @@ -1,5 +1,5 @@ import { EthAddress } from '@aztec/foundation/eth-address'; -import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts'; +import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts/TestERC20Abi'; import { type GetContractReturnType, type Hex, getContract } from 'viem'; diff --git a/yarn-project/ethereum/src/contracts/forwarder.ts b/yarn-project/ethereum/src/contracts/forwarder.ts index ff7e300e5520..f988a0e7147c 100644 --- a/yarn-project/ethereum/src/contracts/forwarder.ts +++ b/yarn-project/ethereum/src/contracts/forwarder.ts @@ -1,6 +1,7 @@ import { toHex } from '@aztec/foundation/bigint-buffer'; import type { Logger } from '@aztec/foundation/log'; -import { ForwarderAbi, ForwarderBytecode } from '@aztec/l1-artifacts'; +import { ForwarderAbi } from '@aztec/l1-artifacts/ForwarderAbi'; +import { ForwarderBytecode } from '@aztec/l1-artifacts/ForwarderBytecode'; import { type EncodeFunctionDataParameters, diff --git a/yarn-project/ethereum/src/contracts/governance.ts b/yarn-project/ethereum/src/contracts/governance.ts index 2f4d3789aaf9..09d079b6dd4d 100644 --- a/yarn-project/ethereum/src/contracts/governance.ts +++ b/yarn-project/ethereum/src/contracts/governance.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import type { Logger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; -import { GovernanceAbi } from '@aztec/l1-artifacts'; +import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi'; import { type EncodeFunctionDataParameters, diff --git a/yarn-project/ethereum/src/contracts/governance_proposer.ts b/yarn-project/ethereum/src/contracts/governance_proposer.ts index 83d7578365c0..75985931815f 100644 --- a/yarn-project/ethereum/src/contracts/governance_proposer.ts +++ b/yarn-project/ethereum/src/contracts/governance_proposer.ts @@ -1,6 +1,6 @@ import { memoize } from '@aztec/foundation/decorators'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { GovernanceProposerAbi } from '@aztec/l1-artifacts'; +import { GovernanceProposerAbi } from '@aztec/l1-artifacts/GovernanceProposerAbi'; import { type GetContractReturnType, type Hex, type TransactionReceipt, encodeFunctionData, getContract } from 'viem'; diff --git a/yarn-project/ethereum/src/contracts/rollup.ts b/yarn-project/ethereum/src/contracts/rollup.ts index 8c33ca146d41..be5062bf7080 100644 --- a/yarn-project/ethereum/src/contracts/rollup.ts +++ b/yarn-project/ethereum/src/contracts/rollup.ts @@ -1,7 +1,9 @@ import { memoize } from '@aztec/foundation/decorators'; import { EthAddress } from '@aztec/foundation/eth-address'; import type { ViemSignature } from '@aztec/foundation/eth-signature'; -import { RollupAbi, RollupStorage, SlasherAbi } from '@aztec/l1-artifacts'; +import { RollupAbi } from '@aztec/l1-artifacts/RollupAbi'; +import { RollupStorage } from '@aztec/l1-artifacts/RollupStorage'; +import { SlasherAbi } from '@aztec/l1-artifacts/SlasherAbi'; import { type Account, type GetContractReturnType, type Hex, getAddress, getContract } from 'viem'; diff --git a/yarn-project/ethereum/src/contracts/slashing_proposer.ts b/yarn-project/ethereum/src/contracts/slashing_proposer.ts index 47d36efd84aa..fcef89a031a3 100644 --- a/yarn-project/ethereum/src/contracts/slashing_proposer.ts +++ b/yarn-project/ethereum/src/contracts/slashing_proposer.ts @@ -1,5 +1,5 @@ import { EthAddress } from '@aztec/foundation/eth-address'; -import { SlashingProposerAbi } from '@aztec/l1-artifacts'; +import { SlashingProposerAbi } from '@aztec/l1-artifacts/SlashingProposerAbi'; import { type GetContractReturnType, type Hex, getContract } from 'viem'; diff --git a/yarn-project/aztec.js/src/api/ethereum/chain_monitor.ts b/yarn-project/ethereum/src/test/chain_monitor.ts similarity index 100% rename from yarn-project/aztec.js/src/api/ethereum/chain_monitor.ts rename to yarn-project/ethereum/src/test/chain_monitor.ts diff --git a/yarn-project/ethereum/src/test/index.ts b/yarn-project/ethereum/src/test/index.ts index 345924d3695c..6b6e5807b512 100644 --- a/yarn-project/ethereum/src/test/index.ts +++ b/yarn-project/ethereum/src/test/index.ts @@ -3,3 +3,4 @@ export * from './eth_cheat_codes_with_state.js'; export * from './start_anvil.js'; export * from './tx_delayer.js'; export * from './upgrade_utils.js'; +export * from './chain_monitor.js'; diff --git a/yarn-project/ethereum/src/test/upgrade_utils.ts b/yarn-project/ethereum/src/test/upgrade_utils.ts index 652fd5bf00c4..3d84ed28afc2 100644 --- a/yarn-project/ethereum/src/test/upgrade_utils.ts +++ b/yarn-project/ethereum/src/test/upgrade_utils.ts @@ -1,6 +1,6 @@ import type { Logger } from '@aztec/foundation/log'; -import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts'; import { GovernanceAbi } from '@aztec/l1-artifacts/GovernanceAbi'; +import { TestERC20Abi as FeeJuiceAbi } from '@aztec/l1-artifacts/TestERC20Abi'; import { type GetContractReturnType, type PrivateKeyAccount, getContract } from 'viem'; diff --git a/yarn-project/ethereum/src/utils.ts b/yarn-project/ethereum/src/utils.ts index 5f028d65ce1a..243f41ae9825 100644 --- a/yarn-project/ethereum/src/utils.ts +++ b/yarn-project/ethereum/src/utils.ts @@ -1,6 +1,6 @@ import type { Fr } from '@aztec/foundation/fields'; import type { Logger } from '@aztec/foundation/log'; -import { ErrorsAbi } from '@aztec/l1-artifacts'; +import { ErrorsAbi } from '@aztec/l1-artifacts/ErrorsAbi'; import { type Abi, diff --git a/yarn-project/pxe/src/entrypoints/client/bundle/index.ts b/yarn-project/pxe/src/entrypoints/client/bundle/index.ts index 3f4a339f0e71..46e26b7bd029 100644 --- a/yarn-project/pxe/src/entrypoints/client/bundle/index.ts +++ b/yarn-project/pxe/src/entrypoints/client/bundle/index.ts @@ -2,4 +2,4 @@ export * from '../../../pxe_service/index.js'; export * from '../../../config/index.js'; export * from '../../../storage/index.js'; export * from './utils.js'; -export { PXEOracleInterface } from '../../../pxe_oracle_interface/index.js'; +export { PXEOracleInterface } from '../../../pxe_oracle_interface/pxe_oracle_interface.js'; diff --git a/yarn-project/pxe/src/entrypoints/client/lazy/index.ts b/yarn-project/pxe/src/entrypoints/client/lazy/index.ts index 3f4a339f0e71..46e26b7bd029 100644 --- a/yarn-project/pxe/src/entrypoints/client/lazy/index.ts +++ b/yarn-project/pxe/src/entrypoints/client/lazy/index.ts @@ -2,4 +2,4 @@ export * from '../../../pxe_service/index.js'; export * from '../../../config/index.js'; export * from '../../../storage/index.js'; export * from './utils.js'; -export { PXEOracleInterface } from '../../../pxe_oracle_interface/index.js'; +export { PXEOracleInterface } from '../../../pxe_oracle_interface/pxe_oracle_interface.js'; diff --git a/yarn-project/pxe/src/entrypoints/server/index.ts b/yarn-project/pxe/src/entrypoints/server/index.ts index 05cc5088853b..aa939b193464 100644 --- a/yarn-project/pxe/src/entrypoints/server/index.ts +++ b/yarn-project/pxe/src/entrypoints/server/index.ts @@ -3,4 +3,4 @@ export * from '../../pxe_http/index.js'; export * from '../../config/index.js'; export * from '../../storage/index.js'; export * from './utils.js'; -export { PXEOracleInterface } from '../../pxe_oracle_interface/index.js'; +export { PXEOracleInterface } from '../../pxe_oracle_interface/pxe_oracle_interface.js'; diff --git a/yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.test.ts b/yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.test.ts index a1e5e180c0d1..75c70306eadb 100644 --- a/yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.test.ts +++ b/yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.test.ts @@ -26,7 +26,7 @@ import { ContractDataProvider } from '../storage/contract_data_provider/contract import { NoteDataProvider } from '../storage/note_data_provider/note_data_provider.js'; import { SyncDataProvider } from '../storage/sync_data_provider/sync_data_provider.js'; import { TaggingDataProvider } from '../storage/tagging_data_provider/tagging_data_provider.js'; -import { PXEOracleInterface } from './index.js'; +import { PXEOracleInterface } from './pxe_oracle_interface.js'; import { WINDOW_HALF_SIZE } from './tagging_utils.js'; const TXS_PER_BLOCK = 4; diff --git a/yarn-project/pxe/src/pxe_oracle_interface/index.ts b/yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.ts similarity index 100% rename from yarn-project/pxe/src/pxe_oracle_interface/index.ts rename to yarn-project/pxe/src/pxe_oracle_interface/pxe_oracle_interface.ts diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index f10fb2300e1e..ad6b30382118 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -71,7 +71,7 @@ import type { PXEServiceConfig } from '../config/index.js'; import { getPackageInfo } from '../config/package_info.js'; import { KernelOracle } from '../kernel_oracle/index.js'; import { KernelProver, type ProvingConfig } from '../kernel_prover/kernel_prover.js'; -import { PXEOracleInterface } from '../pxe_oracle_interface/index.js'; +import { PXEOracleInterface } from '../pxe_oracle_interface/pxe_oracle_interface.js'; import { AddressDataProvider } from '../storage/address_data_provider/address_data_provider.js'; import { AuthWitnessDataProvider } from '../storage/auth_witness_data_provider/auth_witness_data_provider.js'; import { CapsuleDataProvider } from '../storage/capsule_data_provider/capsule_data_provider.js';