From 3675e1d110eccf45986bbbcf35e29746474bb7aa Mon Sep 17 00:00:00 2001 From: spypsy Date: Wed, 21 Feb 2024 12:48:34 +0000 Subject: [PATCH] fix: add registry contract to list (#4694) registry contract was missing from list of l1 contracts required to run `aztec` command --- yarn-project/aztec/src/cli/util.ts | 10 +---- .../ethereum/src/l1_contract_addresses.ts | 38 ++++++------------- 2 files changed, 13 insertions(+), 35 deletions(-) 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; +};