diff --git a/yarn-project/aztec/src/cli/util.ts b/yarn-project/aztec/src/cli/util.ts index 28417b5217c..3a7a3f499cd 100644 --- a/yarn-project/aztec/src/cli/util.ts +++ b/yarn-project/aztec/src/cli/util.ts @@ -1,20 +1,12 @@ import { ArchiverConfig } from '@aztec/archiver'; import { AztecNodeConfig } from '@aztec/aztec-node'; import { AccountManager } from '@aztec/aztec.js'; -import { L1ContractAddresses } from '@aztec/ethereum'; +import { L1ContractAddresses, l1ContractsNames } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; import { LogFn, createConsoleLogger } from '@aztec/foundation/log'; import { P2PConfig } from '@aztec/p2p'; import { GrumpkinScalar, PXEService, PXEServiceConfig } from '@aztec/pxe'; -const l1ContractsNames = [ - 'rollupAddress', - 'inboxAddress', - 'outboxAddress', - 'contractDeploymentEmitterAddress', - 'availabilityOracleAddress', -]; - /** * Checks if the object has l1Contracts property * @param obj - The object to check diff --git a/yarn-project/ethereum/src/l1_contract_addresses.ts b/yarn-project/ethereum/src/l1_contract_addresses.ts index 272faccb370..147b2ced618 100644 --- a/yarn-project/ethereum/src/l1_contract_addresses.ts +++ b/yarn-project/ethereum/src/l1_contract_addresses.ts @@ -1,31 +1,17 @@ import { EthAddress } from '@aztec/foundation/eth-address'; +export const l1ContractsNames = [ + 'availabilityOracleAddress', + 'rollupAddress', + 'registryAddress', + 'inboxAddress', + 'outboxAddress', + 'contractDeploymentEmitterAddress', +]; + /** * Provides the directory of current L1 contract addresses */ -export interface L1ContractAddresses { - /** - * Availability Oracle Address. - */ - availabilityOracleAddress: EthAddress; - /** - * Rollup Address. - */ - rollupAddress: EthAddress; - /** - * Registry Address. - */ - registryAddress: EthAddress; - /** - * Inbox Address. - */ - inboxAddress: EthAddress; - /** - * Outbox Address. - */ - outboxAddress: EthAddress; - /** - * Data Emitter Address. - */ - contractDeploymentEmitterAddress: EthAddress; -} +export type L1ContractAddresses = { + [K in (typeof l1ContractsNames)[number]]: EthAddress; +};