From 2ccd3f5d6db25b74b0a8c31305afd25c8a7ce1fe Mon Sep 17 00:00:00 2001 From: Rahul Kothari Date: Fri, 22 Sep 2023 12:56:51 +0000 Subject: [PATCH] expose registry address --- .../archiver/src/archiver/archiver.test.ts | 6 +- .../archiver/src/archiver/archiver.ts | 7 ++ yarn-project/archiver/src/archiver/config.ts | 2 + yarn-project/archiver/src/index.ts | 10 +- .../src/aztec-node/http-node.test.ts | 13 +++ .../aztec-node/src/aztec-node/http-node.ts | 7 ++ .../aztec-node/src/aztec-node/server.ts | 4 + .../src/aztec_rpc_server/aztec_rpc_server.ts | 4 +- yarn-project/aztec-sandbox/src/sandbox.ts | 1 + .../aztec.js/src/contract/contract.test.ts | 1 + .../contract_function_form.module.scss | 99 +++++++++---------- .../app/components/contract_function_form.tsx | 9 +- .../src/app/components/copy.module.scss | 10 +- .../src/app/components/dropdown.module.scss | 74 +++++++------- .../src/app/components/popup.module.scss | 40 ++++---- .../src/app/components/select.module.scss | 72 +++++++------- .../components/wallet_dropdown.module.scss | 16 +-- .../blank-react/src/app/contract.module.scss | 68 ++++++------- .../blank-react/src/app/home.module.scss | 42 ++++---- yarn-project/boxes/blank/src/index.html | 18 ++-- .../contract_function_form.module.scss | 99 +++++++++---------- .../app/components/contract_function_form.tsx | 9 +- .../src/app/components/copy.module.scss | 10 +- .../src/app/components/dropdown.module.scss | 74 +++++++------- .../src/app/components/popup.module.scss | 40 ++++---- .../src/app/components/select.module.scss | 72 +++++++------- .../components/wallet_dropdown.module.scss | 16 +-- .../src/app/contract.module.scss | 68 ++++++------- .../private-token/src/app/home.module.scss | 42 ++++---- .../e2e_public_cross_chain_messaging.test.ts | 1 - yarn-project/end-to-end/src/fixtures/utils.ts | 1 + .../src/integration_l1_publisher.test.ts | 4 + yarn-project/p2p/src/client/mocks.ts | 8 ++ yarn-project/rollup-provider/src/app.ts | 8 ++ yarn-project/sequencer-client/src/config.ts | 2 + .../types/src/interfaces/aztec-node.ts | 6 ++ .../types/src/interfaces/node-info.ts | 4 + yarn-project/types/src/l1_addresses.ts | 5 + yarn-project/types/src/l2_block_source.ts | 6 ++ 39 files changed, 539 insertions(+), 439 deletions(-) diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index 612223426a70..b3f0db13e556 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -12,8 +12,9 @@ import { Archiver } from './archiver.js'; import { ArchiverDataStore, MemoryArchiverStore } from './archiver_store.js'; describe('Archiver', () => { - const rollupAddress = '0x0000000000000000000000000000000000000000'; - const inboxAddress = '0x0000000000000000000000000000000000000000'; + const rollupAddress = EthAddress.ZERO.toString(); + const inboxAddress = EthAddress.ZERO.toString(); + const registryAddress = EthAddress.ZERO.toString(); const contractDeploymentEmitterAddress = '0x0000000000000000000000000000000000000001'; const blockNums = [1, 2, 3]; let publicClient: MockProxy>; @@ -29,6 +30,7 @@ describe('Archiver', () => { publicClient, EthAddress.fromString(rollupAddress), EthAddress.fromString(inboxAddress), + EthAddress.fromString(registryAddress), EthAddress.fromString(contractDeploymentEmitterAddress), 0, archiverStore, diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 6c88251805d5..217df42dab63 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -65,6 +65,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource * @param publicClient - A client for interacting with the Ethereum node. * @param rollupAddress - Ethereum address of the rollup contract. * @param inboxAddress - Ethereum address of the inbox contract. + * @param registryAddress - Ethereum address of the registry contract. * @param contractDeploymentEmitterAddress - Ethereum address of the contractDeploymentEmitter contract. * @param searchStartBlock - The L1 block from which to start searching for new blocks. * @param pollingIntervalMs - The interval for polling for L1 logs (in milliseconds). @@ -75,6 +76,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource private readonly publicClient: PublicClient, private readonly rollupAddress: EthAddress, private readonly inboxAddress: EthAddress, + private readonly registryAddress: EthAddress, private readonly contractDeploymentEmitterAddress: EthAddress, searchStartBlock: number, private readonly store: ArchiverDataStore, @@ -103,6 +105,7 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource publicClient, config.rollupContract, config.inboxContract, + config.registryContract, config.contractDeploymentEmitterContract, config.searchStartBlock, archiverStore, @@ -264,6 +267,10 @@ export class Archiver implements L2BlockSource, L2LogsSource, ContractDataSource return Promise.resolve(this.rollupAddress); } + public getRegistryAddress(): Promise { + return Promise.resolve(this.registryAddress); + } + /** * Gets up to `limit` amount of L2 blocks starting from `from`. * @param from - Number of the first block to return (inclusive). diff --git a/yarn-project/archiver/src/archiver/config.ts b/yarn-project/archiver/src/archiver/config.ts index 675db4c278aa..f6604d8c6f2e 100644 --- a/yarn-project/archiver/src/archiver/config.ts +++ b/yarn-project/archiver/src/archiver/config.ts @@ -53,12 +53,14 @@ export function getConfigEnvVars(): ArchiverConfig { SEARCH_START_BLOCK, API_KEY, INBOX_CONTRACT_ADDRESS, + REGISTRY_CONTRACT_ADDRESS, } = process.env; return { rpcUrl: ETHEREUM_HOST || 'http://127.0.0.1:8545/', archiverPollingIntervalMS: ARCHIVER_POLLING_INTERVAL_MS ? +ARCHIVER_POLLING_INTERVAL_MS : 1_000, viemPollingIntervalMS: ARCHIVER_VIEM_POLLING_INTERVAL_MS ? +ARCHIVER_VIEM_POLLING_INTERVAL_MS : 1_000, rollupContract: ROLLUP_CONTRACT_ADDRESS ? EthAddress.fromString(ROLLUP_CONTRACT_ADDRESS) : EthAddress.ZERO, + registryContract: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO, inboxContract: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, contractDeploymentEmitterContract: CONTRACT_DEPLOYMENT_EMITTER_ADDRESS ? EthAddress.fromString(CONTRACT_DEPLOYMENT_EMITTER_ADDRESS) diff --git a/yarn-project/archiver/src/index.ts b/yarn-project/archiver/src/index.ts index 1ab04d4c58e6..d132e23af902 100644 --- a/yarn-project/archiver/src/index.ts +++ b/yarn-project/archiver/src/index.ts @@ -17,7 +17,14 @@ const log = createDebugLogger('aztec:archiver'); // eslint-disable-next-line require-await async function main() { const config = getConfigEnvVars(); - const { rpcUrl, rollupContract, inboxContract, contractDeploymentEmitterContract, searchStartBlock } = config; + const { + rpcUrl, + rollupContract, + inboxContract, + registryContract, + contractDeploymentEmitterContract, + searchStartBlock, + } = config; const publicClient = createPublicClient({ chain: localhost, @@ -30,6 +37,7 @@ async function main() { publicClient, rollupContract, inboxContract, + registryContract, contractDeploymentEmitterContract, searchStartBlock, archiverStore, diff --git a/yarn-project/aztec-node/src/aztec-node/http-node.test.ts b/yarn-project/aztec-node/src/aztec-node/http-node.test.ts index fdf5d2b5522e..42ad91c27f8a 100644 --- a/yarn-project/aztec-node/src/aztec-node/http-node.test.ts +++ b/yarn-project/aztec-node/src/aztec-node/http-node.test.ts @@ -159,6 +159,19 @@ describe('HttpNode', () => { }); }); + describe('getRegistryAddress', () => { + it('should fetch and return the registry address', async () => { + const addr = EthAddress.random(); + const response = { registryAddress: addr.toString() }; + setFetchMock(response); + + const result = await httpNode.getRegistryAddress(); + + expect(fetch).toHaveBeenCalledWith(`${TEST_URL}get-registry-address`); + expect(result).toEqual(addr); + }); + }); + describe('getExtendedContractData', () => { it('should fetch and return contract public data', async () => { const extendedContractData = ExtendedContractData.random(); diff --git a/yarn-project/aztec-node/src/aztec-node/http-node.ts b/yarn-project/aztec-node/src/aztec-node/http-node.ts index 52f1d898cfa9..b0500b0b8918 100644 --- a/yarn-project/aztec-node/src/aztec-node/http-node.ts +++ b/yarn-project/aztec-node/src/aztec-node/http-node.ts @@ -109,6 +109,13 @@ export class HttpNode implements AztecNode { return EthAddress.fromString(respJson.rollupAddress); } + public async getRegistryAddress(): Promise { + const url = new URL(`${this.baseUrl}/get-registry-address`); + const response = await fetch(url.toString()); + const respJson = await response.json(); + return EthAddress.fromString(respJson.registryAddress); + } + /** * Method to fetch the chain id of the base-layer for the rollup. * @returns The chain id. diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index f457247f9dbb..82c75cdd940a 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -181,6 +181,10 @@ export class AztecNodeService implements AztecNode { return this.blockSource.getRollupAddress(); } + public getRegistryAddress(): Promise { + return this.blockSource.getRegistryAddress(); + } + /** * Get the extended contract data for this contract. * @param contractAddress - The contract data address. diff --git a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts index fe754f7c6521..86555d6392b9 100644 --- a/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts +++ b/yarn-project/aztec-rpc/src/aztec_rpc_server/aztec_rpc_server.ts @@ -337,10 +337,11 @@ export class AztecRPCServer implements AztecRPC { } public async getNodeInfo(): Promise { - const [version, chainId, rollupAddress] = await Promise.all([ + const [version, chainId, rollupAddress, registryAddress] = await Promise.all([ this.node.getVersion(), this.node.getChainId(), this.node.getRollupAddress(), + this.node.getRegistryAddress(), ]); return { @@ -349,6 +350,7 @@ export class AztecRPCServer implements AztecRPC { chainId, protocolVersion: version, rollupAddress, + registryAddress, }; } diff --git a/yarn-project/aztec-sandbox/src/sandbox.ts b/yarn-project/aztec-sandbox/src/sandbox.ts index 8d25be5a2007..227cc7f6edbd 100644 --- a/yarn-project/aztec-sandbox/src/sandbox.ts +++ b/yarn-project/aztec-sandbox/src/sandbox.ts @@ -70,6 +70,7 @@ export async function createSandbox(config: Partial = {}) { aztecNodeConfig.rollupContract = l1Contracts.rollupAddress; aztecNodeConfig.contractDeploymentEmitterContract = l1Contracts.contractDeploymentEmitterAddress; aztecNodeConfig.inboxContract = l1Contracts.inboxAddress; + aztecNodeConfig.registryContract = l1Contracts.registryAddress; const node = await AztecNodeService.createAndSync(aztecNodeConfig); const rpcServer = await createAztecRPCServer(node, rpcConfig); diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index 1df16e7de1f8..a095b316b571 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -34,6 +34,7 @@ describe('Contract Class', () => { protocolVersion: 1, chainId: 2, rollupAddress: EthAddress.random(), + registryAddress: EthAddress.random(), }; const defaultAbi: ContractAbi = { diff --git a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.module.scss b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.module.scss index f28047b581ab..056dcc719ff6 100644 --- a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.module.scss @@ -1,67 +1,66 @@ .input { - border: none; - outline-width: 0; - outline-color: rgba(0, 0, 0, 0); - padding: 2px 20px 0 20px; - width: 100%; - height: 45px; - color: #000; - border: 1px solid rgba(0, 0, 0, 0); - font-size: 16px; - text-align: left; - font-weight: 400; - border-radius: 10px; - text-align: left; - text-overflow: ellipsis; - transition: box-shadow .2s; - box-shadow: 0px 4px 10px rgba(0, 0, 0, .1); - background-color: white; - -webkit-appearance: none; + border: none; + outline-width: 0; + outline-color: rgba(0, 0, 0, 0); + padding: 2px 20px 0 20px; + width: 100%; + height: 45px; + color: #000; + border: 1px solid rgba(0, 0, 0, 0); + font-size: 16px; + text-align: left; + font-weight: 400; + border-radius: 10px; + text-align: left; + text-overflow: ellipsis; + transition: box-shadow 0.2s; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); + background-color: white; + -webkit-appearance: none; - - &:disabled { - color: #4a4a4a; - background-color: rgba(239, 239, 239, 0.3); - background: radial-gradient(rgba(239, 239, 239, 0.3), rgba(239, 239, 239, 0.3)); - -webkit-text-fill-color: #4a4a4a; - cursor: not-allowed; - } + &:disabled { + color: #4a4a4a; + background-color: rgba(239, 239, 239, 0.3); + background: radial-gradient(rgba(239, 239, 239, 0.3), rgba(239, 239, 239, 0.3)); + -webkit-text-fill-color: #4a4a4a; + cursor: not-allowed; + } } .label { - font-weight: 450; - font-size: 18px; - display: flex; - width: 100%; - flex-direction: column; - text-align: left; - margin-bottom: 15px; - justify-content: space-between; + font-weight: 450; + font-size: 18px; + display: flex; + width: 100%; + flex-direction: column; + text-align: left; + margin-bottom: 15px; + justify-content: space-between; } .inputWrapper { - width: 100%; - display: flex; - gap: 15px; + width: 100%; + display: flex; + gap: 15px; } .field { - display: flex; - justify-content: start; - flex-direction: column; - align-items: flex-start; + display: flex; + justify-content: start; + flex-direction: column; + align-items: flex-start; } .content { - display: flex; - justify-content: space-between; - flex-direction: column; - margin: 30px; - width: 450px; - gap: 30px; + display: flex; + justify-content: space-between; + flex-direction: column; + margin: 30px; + width: 450px; + gap: 30px; } .actionButton { - width: 100%; - align-self: center; -} \ No newline at end of file + width: 100%; + align-self: center; +} diff --git a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx index e31c940a927f..69916e7061ee 100644 --- a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx +++ b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx @@ -86,7 +86,14 @@ async function handleFunctionCall( if (functionAbi.functionType === 'unconstrained') { return await viewContractFunction(contractAddress!, contractAbi, functionName, typedArgs, rpcClient, wallet); } else { - const txnReceipt = await callContractFunction(contractAddress!, contractAbi, functionName, typedArgs, rpcClient, wallet); + const txnReceipt = await callContractFunction( + contractAddress!, + contractAbi, + functionName, + typedArgs, + rpcClient, + wallet, + ); return `Transaction ${txnReceipt.status} on block number ${txnReceipt.blockNumber}`; } } diff --git a/yarn-project/boxes/blank-react/src/app/components/copy.module.scss b/yarn-project/boxes/blank-react/src/app/components/copy.module.scss index 6b4a52bf549c..26b2360c58a0 100644 --- a/yarn-project/boxes/blank-react/src/app/components/copy.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/copy.module.scss @@ -1,6 +1,6 @@ .copy { - cursor: pointer; - width: 35px; - height: 25px; - padding: 2px 8px; -} \ No newline at end of file + cursor: pointer; + width: 35px; + height: 25px; + padding: 2px 8px; +} diff --git a/yarn-project/boxes/blank-react/src/app/components/dropdown.module.scss b/yarn-project/boxes/blank-react/src/app/components/dropdown.module.scss index 8041aff4bc8f..18bd40b356bd 100644 --- a/yarn-project/boxes/blank-react/src/app/components/dropdown.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/dropdown.module.scss @@ -1,68 +1,68 @@ .dropdownWrapper { - position: absolute; - top: 60px; - right: 0px; - border-radius: 10px; - display: flex; - overflow: hidden; - flex-direction: column; - gap: 1px; - border: 1px solid #ebeaea; - background-color: #ebeaea; - z-index: 1; + position: absolute; + top: 60px; + right: 0px; + border-radius: 10px; + display: flex; + overflow: hidden; + flex-direction: column; + gap: 1px; + border: 1px solid #ebeaea; + background-color: #ebeaea; + z-index: 1; } .dropdownOptionBackground { - background-color: white; + background-color: white; } .dropdownOption { - font-size: 14px; - padding: 10px 25px; - white-space: nowrap; - cursor: pointer; - font-weight: 600; - justify-content: space-between; - letter-spacing: 0.5px; - display: flex; + font-size: 14px; + padding: 10px 25px; + white-space: nowrap; + cursor: pointer; + font-weight: 600; + justify-content: space-between; + letter-spacing: 0.5px; + display: flex; } .singleOption { - text-align: center; - align-items: center; - justify-content: center; + text-align: center; + align-items: center; + justify-content: center; } .dropdownOption.disabled { - background-image: initial; - cursor: default; - background-color: #c4c4c4; + background-image: initial; + cursor: default; + background-color: #c4c4c4; } .dropdownOptionBackground:hover { - background-color: #ebeaea; + background-color: #ebeaea; } .dropdownOptionBackground.disabled:hover { - background-color: white; + background-color: white; } .sublabel { - text-align: right; + text-align: right; } .sublabels { - display: flex; - flex-direction: row; - font-weight: 450; + display: flex; + flex-direction: row; + font-weight: 450; } .feeOption { - gap: 5px; - display: flex; - flex-direction: column; + gap: 5px; + display: flex; + flex-direction: column; } .label { - color: #2f1f49; -} \ No newline at end of file + color: #2f1f49; +} diff --git a/yarn-project/boxes/blank-react/src/app/components/popup.module.scss b/yarn-project/boxes/blank-react/src/app/components/popup.module.scss index ecaab4c22fb1..0917ca93f413 100644 --- a/yarn-project/boxes/blank-react/src/app/components/popup.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/popup.module.scss @@ -1,27 +1,27 @@ .popup { - width: 66vw; - position: absolute; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - background-color: white; - border-radius: 20px; - justify-content: space-around; - box-shadow: 0px 4px 10px rgba(0, 0, 0, .1); - border: 3px solid rgb(47, 31, 73); - align-items: center; - gap: 30px; - padding: 30px; - overflow: scroll; - min-width: 600px; - z-index: 100; + width: 66vw; + position: absolute; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: white; + border-radius: 20px; + justify-content: space-around; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); + border: 3px solid rgb(47, 31, 73); + align-items: center; + gap: 30px; + padding: 30px; + overflow: scroll; + min-width: 600px; + z-index: 100; } .alert { - width: 20px; + width: 20px; } .content { - width: 100%; -} \ No newline at end of file + width: 100%; +} diff --git a/yarn-project/boxes/blank-react/src/app/components/select.module.scss b/yarn-project/boxes/blank-react/src/app/components/select.module.scss index 71ecf95ab7f1..d639c52f47d7 100644 --- a/yarn-project/boxes/blank-react/src/app/components/select.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/select.module.scss @@ -1,65 +1,65 @@ .selectBox { - border-radius: 10px; - background-color: white; - position: relative; - font-family: Sohne; - font-size: 16px; - height: 45px; - cursor: pointer; - font-weight: 450; + border-radius: 10px; + background-color: white; + position: relative; + font-family: Sohne; + font-size: 16px; + height: 45px; + cursor: pointer; + font-weight: 450; - @media (max-width: 480px) { - margin: 0; - } + @media (max-width: 480px) { + margin: 0; + } } .icon { - min-width: 12px; + min-width: 12px; } .border { - box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.1); + box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.1); } .innerFrame { - height: 45px; - padding: 0 15px; - display: flex; - align-items: center; - justify-content: space-between; - overflow: hidden; - gap: 10px; + height: 45px; + padding: 0 15px; + display: flex; + align-items: center; + justify-content: space-between; + overflow: hidden; + gap: 10px; } .innerFrameWithButton { - padding-right: 0px; + padding-right: 0px; } .value { - white-space: nowrap; + white-space: nowrap; } .dropdown { - top: 45px; - left: 0%; - min-width: 130px; - width: 100%; + top: 45px; + left: 0%; + min-width: 130px; + width: 100%; } .closeButton { - height: 30px; - padding: 15px 15px 15px 5px; - display: flex; - justify-content: flex-end; - align-items: center; + height: 30px; + padding: 15px 15px 15px 5px; + display: flex; + justify-content: flex-end; + align-items: center; } .disabled { - background-color: rgba(239, 239, 239, 0.3); - color: #4a4a4a; - cursor: not-allowed; + background-color: rgba(239, 239, 239, 0.3); + color: #4a4a4a; + cursor: not-allowed; } .placeholder { - color: #757575; -} \ No newline at end of file + color: #757575; +} diff --git a/yarn-project/boxes/blank-react/src/app/components/wallet_dropdown.module.scss b/yarn-project/boxes/blank-react/src/app/components/wallet_dropdown.module.scss index 8ad6aae3cf6c..27fdfc4f7f72 100644 --- a/yarn-project/boxes/blank-react/src/app/components/wallet_dropdown.module.scss +++ b/yarn-project/boxes/blank-react/src/app/components/wallet_dropdown.module.scss @@ -1,9 +1,9 @@ .walletSelector { - position: fixed; - top: 30px; - right: 30px; - display: flex; - gap: 10px; - flex-direction: row; - align-items: center; -} \ No newline at end of file + position: fixed; + top: 30px; + right: 30px; + display: flex; + gap: 10px; + flex-direction: row; + align-items: center; +} diff --git a/yarn-project/boxes/blank-react/src/app/contract.module.scss b/yarn-project/boxes/blank-react/src/app/contract.module.scss index bd16d1959046..d5404d250357 100644 --- a/yarn-project/boxes/blank-react/src/app/contract.module.scss +++ b/yarn-project/boxes/blank-react/src/app/contract.module.scss @@ -1,53 +1,53 @@ .tos { - position: fixed; - bottom: 30px; - right: 30px; - cursor: pointer; - font-size: 14px; + position: fixed; + bottom: 30px; + right: 30px; + cursor: pointer; + font-size: 14px; } .selectorWrapper { - display: flex; - flex-direction: column; - margin: 30px; - gap: 20px; + display: flex; + flex-direction: column; + margin: 30px; + gap: 20px; } .functions { - display: flex; - flex-direction: row; - gap: 20px; + display: flex; + flex-direction: row; + gap: 20px; } .tag { - font-weight: 450; - display: flex; - position: relative; - flex-direction: column; - font-size: 16px; - gap: 5px; - background-color: #fff; - text-align: right; - padding: 14px 18px; - text-align: center; - background-color: #f9f9f9; - align-self: center; - border-radius: 10px; + font-weight: 450; + display: flex; + position: relative; + flex-direction: column; + font-size: 16px; + gap: 5px; + background-color: #fff; + text-align: right; + padding: 14px 18px; + text-align: center; + background-color: #f9f9f9; + align-self: center; + border-radius: 10px; } .back { - top: 15px; - width: 20px; - left: 30px; - margin-bottom: 15px; + top: 15px; + width: 20px; + left: 30px; + margin-bottom: 15px; } .address { - display: flex; - justify-content: center; - align-items: center; + display: flex; + justify-content: center; + align-items: center; } .title { - font-weight: 500; -} \ No newline at end of file + font-weight: 500; +} diff --git a/yarn-project/boxes/blank-react/src/app/home.module.scss b/yarn-project/boxes/blank-react/src/app/home.module.scss index 12cce21ad73e..44ff7f764465 100644 --- a/yarn-project/boxes/blank-react/src/app/home.module.scss +++ b/yarn-project/boxes/blank-react/src/app/home.module.scss @@ -1,28 +1,28 @@ .main { - display: flex; - gap: 20px; - flex-direction: column; - justify-content: center; - align-items: center; + display: flex; + gap: 20px; + flex-direction: column; + justify-content: center; + align-items: center; } .logo { - position: fixed; - cursor: pointer; - top: 35px; - left: 30px; - height: 35px; + position: fixed; + cursor: pointer; + top: 35px; + left: 30px; + height: 35px; } .privateBackground { - transform: rotate(-20deg); - width: 150vw; - height: 150vh; - font-weight: 500; - opacity: 0.3; - font-size: 14px; - pointer-events: none; - position: absolute; - font-size: 14px; - z-index: 0; -} \ No newline at end of file + transform: rotate(-20deg); + width: 150vw; + height: 150vh; + font-weight: 500; + opacity: 0.3; + font-size: 14px; + pointer-events: none; + position: absolute; + font-size: 14px; + z-index: 0; +} diff --git a/yarn-project/boxes/blank/src/index.html b/yarn-project/boxes/blank/src/index.html index b5a876be4e82..84f225fe8a91 100644 --- a/yarn-project/boxes/blank/src/index.html +++ b/yarn-project/boxes/blank/src/index.html @@ -1,16 +1,14 @@ - + - - - - + + + Minimal Noir Contract Webpack - + - + - - - \ No newline at end of file + + diff --git a/yarn-project/boxes/private-token/src/app/components/contract_function_form.module.scss b/yarn-project/boxes/private-token/src/app/components/contract_function_form.module.scss index f28047b581ab..056dcc719ff6 100644 --- a/yarn-project/boxes/private-token/src/app/components/contract_function_form.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/contract_function_form.module.scss @@ -1,67 +1,66 @@ .input { - border: none; - outline-width: 0; - outline-color: rgba(0, 0, 0, 0); - padding: 2px 20px 0 20px; - width: 100%; - height: 45px; - color: #000; - border: 1px solid rgba(0, 0, 0, 0); - font-size: 16px; - text-align: left; - font-weight: 400; - border-radius: 10px; - text-align: left; - text-overflow: ellipsis; - transition: box-shadow .2s; - box-shadow: 0px 4px 10px rgba(0, 0, 0, .1); - background-color: white; - -webkit-appearance: none; + border: none; + outline-width: 0; + outline-color: rgba(0, 0, 0, 0); + padding: 2px 20px 0 20px; + width: 100%; + height: 45px; + color: #000; + border: 1px solid rgba(0, 0, 0, 0); + font-size: 16px; + text-align: left; + font-weight: 400; + border-radius: 10px; + text-align: left; + text-overflow: ellipsis; + transition: box-shadow 0.2s; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); + background-color: white; + -webkit-appearance: none; - - &:disabled { - color: #4a4a4a; - background-color: rgba(239, 239, 239, 0.3); - background: radial-gradient(rgba(239, 239, 239, 0.3), rgba(239, 239, 239, 0.3)); - -webkit-text-fill-color: #4a4a4a; - cursor: not-allowed; - } + &:disabled { + color: #4a4a4a; + background-color: rgba(239, 239, 239, 0.3); + background: radial-gradient(rgba(239, 239, 239, 0.3), rgba(239, 239, 239, 0.3)); + -webkit-text-fill-color: #4a4a4a; + cursor: not-allowed; + } } .label { - font-weight: 450; - font-size: 18px; - display: flex; - width: 100%; - flex-direction: column; - text-align: left; - margin-bottom: 15px; - justify-content: space-between; + font-weight: 450; + font-size: 18px; + display: flex; + width: 100%; + flex-direction: column; + text-align: left; + margin-bottom: 15px; + justify-content: space-between; } .inputWrapper { - width: 100%; - display: flex; - gap: 15px; + width: 100%; + display: flex; + gap: 15px; } .field { - display: flex; - justify-content: start; - flex-direction: column; - align-items: flex-start; + display: flex; + justify-content: start; + flex-direction: column; + align-items: flex-start; } .content { - display: flex; - justify-content: space-between; - flex-direction: column; - margin: 30px; - width: 450px; - gap: 30px; + display: flex; + justify-content: space-between; + flex-direction: column; + margin: 30px; + width: 450px; + gap: 30px; } .actionButton { - width: 100%; - align-self: center; -} \ No newline at end of file + width: 100%; + align-self: center; +} diff --git a/yarn-project/boxes/private-token/src/app/components/contract_function_form.tsx b/yarn-project/boxes/private-token/src/app/components/contract_function_form.tsx index c8c672f06768..ac19e8f9fc03 100644 --- a/yarn-project/boxes/private-token/src/app/components/contract_function_form.tsx +++ b/yarn-project/boxes/private-token/src/app/components/contract_function_form.tsx @@ -86,7 +86,14 @@ async function handleFunctionCall( if (functionAbi.functionType === 'unconstrained') { return await viewContractFunction(contractAddress!, contractAbi, functionName, typedArgs, rpcClient, wallet); } else { - const txnReceipt = await callContractFunction(contractAddress!, contractAbi, functionName, typedArgs, rpcClient, wallet); + const txnReceipt = await callContractFunction( + contractAddress!, + contractAbi, + functionName, + typedArgs, + rpcClient, + wallet, + ); return `Transaction ${txnReceipt.status} on block number ${txnReceipt.blockNumber}`; } } diff --git a/yarn-project/boxes/private-token/src/app/components/copy.module.scss b/yarn-project/boxes/private-token/src/app/components/copy.module.scss index 6b4a52bf549c..26b2360c58a0 100644 --- a/yarn-project/boxes/private-token/src/app/components/copy.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/copy.module.scss @@ -1,6 +1,6 @@ .copy { - cursor: pointer; - width: 35px; - height: 25px; - padding: 2px 8px; -} \ No newline at end of file + cursor: pointer; + width: 35px; + height: 25px; + padding: 2px 8px; +} diff --git a/yarn-project/boxes/private-token/src/app/components/dropdown.module.scss b/yarn-project/boxes/private-token/src/app/components/dropdown.module.scss index 8041aff4bc8f..18bd40b356bd 100644 --- a/yarn-project/boxes/private-token/src/app/components/dropdown.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/dropdown.module.scss @@ -1,68 +1,68 @@ .dropdownWrapper { - position: absolute; - top: 60px; - right: 0px; - border-radius: 10px; - display: flex; - overflow: hidden; - flex-direction: column; - gap: 1px; - border: 1px solid #ebeaea; - background-color: #ebeaea; - z-index: 1; + position: absolute; + top: 60px; + right: 0px; + border-radius: 10px; + display: flex; + overflow: hidden; + flex-direction: column; + gap: 1px; + border: 1px solid #ebeaea; + background-color: #ebeaea; + z-index: 1; } .dropdownOptionBackground { - background-color: white; + background-color: white; } .dropdownOption { - font-size: 14px; - padding: 10px 25px; - white-space: nowrap; - cursor: pointer; - font-weight: 600; - justify-content: space-between; - letter-spacing: 0.5px; - display: flex; + font-size: 14px; + padding: 10px 25px; + white-space: nowrap; + cursor: pointer; + font-weight: 600; + justify-content: space-between; + letter-spacing: 0.5px; + display: flex; } .singleOption { - text-align: center; - align-items: center; - justify-content: center; + text-align: center; + align-items: center; + justify-content: center; } .dropdownOption.disabled { - background-image: initial; - cursor: default; - background-color: #c4c4c4; + background-image: initial; + cursor: default; + background-color: #c4c4c4; } .dropdownOptionBackground:hover { - background-color: #ebeaea; + background-color: #ebeaea; } .dropdownOptionBackground.disabled:hover { - background-color: white; + background-color: white; } .sublabel { - text-align: right; + text-align: right; } .sublabels { - display: flex; - flex-direction: row; - font-weight: 450; + display: flex; + flex-direction: row; + font-weight: 450; } .feeOption { - gap: 5px; - display: flex; - flex-direction: column; + gap: 5px; + display: flex; + flex-direction: column; } .label { - color: #2f1f49; -} \ No newline at end of file + color: #2f1f49; +} diff --git a/yarn-project/boxes/private-token/src/app/components/popup.module.scss b/yarn-project/boxes/private-token/src/app/components/popup.module.scss index ecaab4c22fb1..0917ca93f413 100644 --- a/yarn-project/boxes/private-token/src/app/components/popup.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/popup.module.scss @@ -1,27 +1,27 @@ .popup { - width: 66vw; - position: absolute; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - background-color: white; - border-radius: 20px; - justify-content: space-around; - box-shadow: 0px 4px 10px rgba(0, 0, 0, .1); - border: 3px solid rgb(47, 31, 73); - align-items: center; - gap: 30px; - padding: 30px; - overflow: scroll; - min-width: 600px; - z-index: 100; + width: 66vw; + position: absolute; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + background-color: white; + border-radius: 20px; + justify-content: space-around; + box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); + border: 3px solid rgb(47, 31, 73); + align-items: center; + gap: 30px; + padding: 30px; + overflow: scroll; + min-width: 600px; + z-index: 100; } .alert { - width: 20px; + width: 20px; } .content { - width: 100%; -} \ No newline at end of file + width: 100%; +} diff --git a/yarn-project/boxes/private-token/src/app/components/select.module.scss b/yarn-project/boxes/private-token/src/app/components/select.module.scss index 71ecf95ab7f1..d639c52f47d7 100644 --- a/yarn-project/boxes/private-token/src/app/components/select.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/select.module.scss @@ -1,65 +1,65 @@ .selectBox { - border-radius: 10px; - background-color: white; - position: relative; - font-family: Sohne; - font-size: 16px; - height: 45px; - cursor: pointer; - font-weight: 450; + border-radius: 10px; + background-color: white; + position: relative; + font-family: Sohne; + font-size: 16px; + height: 45px; + cursor: pointer; + font-weight: 450; - @media (max-width: 480px) { - margin: 0; - } + @media (max-width: 480px) { + margin: 0; + } } .icon { - min-width: 12px; + min-width: 12px; } .border { - box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.1); + box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.1); } .innerFrame { - height: 45px; - padding: 0 15px; - display: flex; - align-items: center; - justify-content: space-between; - overflow: hidden; - gap: 10px; + height: 45px; + padding: 0 15px; + display: flex; + align-items: center; + justify-content: space-between; + overflow: hidden; + gap: 10px; } .innerFrameWithButton { - padding-right: 0px; + padding-right: 0px; } .value { - white-space: nowrap; + white-space: nowrap; } .dropdown { - top: 45px; - left: 0%; - min-width: 130px; - width: 100%; + top: 45px; + left: 0%; + min-width: 130px; + width: 100%; } .closeButton { - height: 30px; - padding: 15px 15px 15px 5px; - display: flex; - justify-content: flex-end; - align-items: center; + height: 30px; + padding: 15px 15px 15px 5px; + display: flex; + justify-content: flex-end; + align-items: center; } .disabled { - background-color: rgba(239, 239, 239, 0.3); - color: #4a4a4a; - cursor: not-allowed; + background-color: rgba(239, 239, 239, 0.3); + color: #4a4a4a; + cursor: not-allowed; } .placeholder { - color: #757575; -} \ No newline at end of file + color: #757575; +} diff --git a/yarn-project/boxes/private-token/src/app/components/wallet_dropdown.module.scss b/yarn-project/boxes/private-token/src/app/components/wallet_dropdown.module.scss index 8ad6aae3cf6c..27fdfc4f7f72 100644 --- a/yarn-project/boxes/private-token/src/app/components/wallet_dropdown.module.scss +++ b/yarn-project/boxes/private-token/src/app/components/wallet_dropdown.module.scss @@ -1,9 +1,9 @@ .walletSelector { - position: fixed; - top: 30px; - right: 30px; - display: flex; - gap: 10px; - flex-direction: row; - align-items: center; -} \ No newline at end of file + position: fixed; + top: 30px; + right: 30px; + display: flex; + gap: 10px; + flex-direction: row; + align-items: center; +} diff --git a/yarn-project/boxes/private-token/src/app/contract.module.scss b/yarn-project/boxes/private-token/src/app/contract.module.scss index bd16d1959046..d5404d250357 100644 --- a/yarn-project/boxes/private-token/src/app/contract.module.scss +++ b/yarn-project/boxes/private-token/src/app/contract.module.scss @@ -1,53 +1,53 @@ .tos { - position: fixed; - bottom: 30px; - right: 30px; - cursor: pointer; - font-size: 14px; + position: fixed; + bottom: 30px; + right: 30px; + cursor: pointer; + font-size: 14px; } .selectorWrapper { - display: flex; - flex-direction: column; - margin: 30px; - gap: 20px; + display: flex; + flex-direction: column; + margin: 30px; + gap: 20px; } .functions { - display: flex; - flex-direction: row; - gap: 20px; + display: flex; + flex-direction: row; + gap: 20px; } .tag { - font-weight: 450; - display: flex; - position: relative; - flex-direction: column; - font-size: 16px; - gap: 5px; - background-color: #fff; - text-align: right; - padding: 14px 18px; - text-align: center; - background-color: #f9f9f9; - align-self: center; - border-radius: 10px; + font-weight: 450; + display: flex; + position: relative; + flex-direction: column; + font-size: 16px; + gap: 5px; + background-color: #fff; + text-align: right; + padding: 14px 18px; + text-align: center; + background-color: #f9f9f9; + align-self: center; + border-radius: 10px; } .back { - top: 15px; - width: 20px; - left: 30px; - margin-bottom: 15px; + top: 15px; + width: 20px; + left: 30px; + margin-bottom: 15px; } .address { - display: flex; - justify-content: center; - align-items: center; + display: flex; + justify-content: center; + align-items: center; } .title { - font-weight: 500; -} \ No newline at end of file + font-weight: 500; +} diff --git a/yarn-project/boxes/private-token/src/app/home.module.scss b/yarn-project/boxes/private-token/src/app/home.module.scss index 12cce21ad73e..44ff7f764465 100644 --- a/yarn-project/boxes/private-token/src/app/home.module.scss +++ b/yarn-project/boxes/private-token/src/app/home.module.scss @@ -1,28 +1,28 @@ .main { - display: flex; - gap: 20px; - flex-direction: column; - justify-content: center; - align-items: center; + display: flex; + gap: 20px; + flex-direction: column; + justify-content: center; + align-items: center; } .logo { - position: fixed; - cursor: pointer; - top: 35px; - left: 30px; - height: 35px; + position: fixed; + cursor: pointer; + top: 35px; + left: 30px; + height: 35px; } .privateBackground { - transform: rotate(-20deg); - width: 150vw; - height: 150vh; - font-weight: 500; - opacity: 0.3; - font-size: 14px; - pointer-events: none; - position: absolute; - font-size: 14px; - z-index: 0; -} \ No newline at end of file + transform: rotate(-20deg); + width: 150vw; + height: 150vh; + font-weight: 500; + opacity: 0.3; + font-size: 14px; + pointer-events: none; + position: absolute; + font-size: 14px; + z-index: 0; +} diff --git a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts index 5ec2453ae2a4..68897f60a53d 100644 --- a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts @@ -44,7 +44,6 @@ describe('e2e_public_cross_chain_messaging', () => { logger_, cheatCodes, ); - l2Token = crossChainTestHarness.l2Token; l2Bridge = crossChainTestHarness.l2Bridge; ownerEthAddress = crossChainTestHarness.ethAccount; diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index df49c2dc438b..4c8d570e9873 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -230,6 +230,7 @@ export async function setup( config.rollupContract = deployL1ContractsValues.rollupAddress; config.contractDeploymentEmitterContract = deployL1ContractsValues.contractDeploymentEmitterAddress; config.inboxContract = deployL1ContractsValues.inboxAddress; + config.registryContract = deployL1ContractsValues.registryAddress; const aztecNode = await createAztecNode(config, logger); diff --git a/yarn-project/end-to-end/src/integration_l1_publisher.test.ts b/yarn-project/end-to-end/src/integration_l1_publisher.test.ts index 2ad33406c216..13bcd08e7608 100644 --- a/yarn-project/end-to-end/src/integration_l1_publisher.test.ts +++ b/yarn-project/end-to-end/src/integration_l1_publisher.test.ts @@ -68,6 +68,7 @@ describe('L1Publisher integration', () => { let rollupAddress: Address; let inboxAddress: Address; let outboxAddress: Address; + let registryAddress: Address; let contractDeploymentEmitterAddress: Address; let decoderHelperAddress: Address; @@ -95,6 +96,7 @@ describe('L1Publisher integration', () => { rollupAddress: rollupAddress_, inboxAddress: inboxAddress_, outboxAddress: outboxAddress_, + registryAddress: registryAddress_, contractDeploymentEmitterAddress: contractDeploymentEmitterAddress_, decoderHelperAddress: decoderHelperAddress_, publicClient: publicClient_, @@ -105,6 +107,7 @@ describe('L1Publisher integration', () => { rollupAddress = getAddress(rollupAddress_.toString()); inboxAddress = getAddress(inboxAddress_.toString()); outboxAddress = getAddress(outboxAddress_.toString()); + registryAddress = getAddress(registryAddress_.toString()); contractDeploymentEmitterAddress = getAddress(contractDeploymentEmitterAddress_.toString()); decoderHelperAddress = getAddress(decoderHelperAddress_!.toString()); @@ -145,6 +148,7 @@ describe('L1Publisher integration', () => { requiredConfirmations: 1, rollupContract: EthAddress.fromString(rollupAddress), inboxContract: EthAddress.fromString(inboxAddress), + registryContract: EthAddress.fromString(registryAddress), contractDeploymentEmitterContract: EthAddress.fromString(contractDeploymentEmitterAddress), publisherPrivateKey: sequencerPK, l1BlockPublishRetryIntervalMS: 100, diff --git a/yarn-project/p2p/src/client/mocks.ts b/yarn-project/p2p/src/client/mocks.ts index e98a3c42a62c..7face89993ed 100644 --- a/yarn-project/p2p/src/client/mocks.ts +++ b/yarn-project/p2p/src/client/mocks.ts @@ -24,6 +24,14 @@ export class MockBlockSource implements L2BlockSource { return Promise.resolve(EthAddress.random()); } + /** + * Method to fetch the registry contract address at the base-layer. + * @returns The registry address. + */ + getRegistryAddress(): Promise { + return Promise.resolve(EthAddress.random()); + } + /** * Gets the number of the latest L2 block processed by the block source implementation. * @returns In this mock instance, returns the number of L2 blocks that we've mocked. diff --git a/yarn-project/rollup-provider/src/app.ts b/yarn-project/rollup-provider/src/app.ts index 7b1cf70ca746..5a870b5b28ac 100644 --- a/yarn-project/rollup-provider/src/app.ts +++ b/yarn-project/rollup-provider/src/app.ts @@ -114,6 +114,14 @@ export function appFactory(node: AztecNode, prefix: string) { ctx.status = 200; }); + router.get('/get-registry-address', async (ctx: Koa.Context) => { + ctx.set('content-type', 'application/json'); + ctx.body = { + registryAddress: (await node.getRegistryAddress()).toString(), + }; + ctx.status = 200; + }); + router.get('/contract-data-and-bytecode', async (ctx: Koa.Context) => { const address = ctx.query.address; ctx.set('content-type', 'application/json'); diff --git a/yarn-project/sequencer-client/src/config.ts b/yarn-project/sequencer-client/src/config.ts index 9060a659c269..3a5540f97b33 100644 --- a/yarn-project/sequencer-client/src/config.ts +++ b/yarn-project/sequencer-client/src/config.ts @@ -25,6 +25,7 @@ export function getConfigEnvVars(): SequencerClientConfig { SEQ_MAX_TX_PER_BLOCK, SEQ_MIN_TX_PER_BLOCK, ROLLUP_CONTRACT_ADDRESS, + REGISTRY_CONTRACT_ADDRESS, INBOX_CONTRACT_ADDRESS, CONTRACT_DEPLOYMENT_EMITTER_ADDRESS, } = process.env; @@ -45,6 +46,7 @@ export function getConfigEnvVars(): SequencerClientConfig { transactionPollingIntervalMS: SEQ_TX_POLLING_INTERVAL_MS ? +SEQ_TX_POLLING_INTERVAL_MS : 1_000, rollupContract: ROLLUP_CONTRACT_ADDRESS ? EthAddress.fromString(ROLLUP_CONTRACT_ADDRESS) : EthAddress.ZERO, inboxContract: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, + registryContract: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO, contractDeploymentEmitterContract: CONTRACT_DEPLOYMENT_EMITTER_ADDRESS ? EthAddress.fromString(CONTRACT_DEPLOYMENT_EMITTER_ADDRESS) : EthAddress.ZERO, diff --git a/yarn-project/types/src/interfaces/aztec-node.ts b/yarn-project/types/src/interfaces/aztec-node.ts index ed61b46a11df..bac696c38502 100644 --- a/yarn-project/types/src/interfaces/aztec-node.ts +++ b/yarn-project/types/src/interfaces/aztec-node.ts @@ -67,6 +67,12 @@ export interface AztecNode extends DataCommitmentProvider, L1ToL2MessageProvider */ getRollupAddress(): Promise; + /** + * Method to fetch the registry contract address at the base-layer. + * @returns The registry address. + */ + getRegistryAddress(): Promise; + /** * Get the extended contract data for this contract. * @param contractAddress - The contract data address. diff --git a/yarn-project/types/src/interfaces/node-info.ts b/yarn-project/types/src/interfaces/node-info.ts index 4037d4917ed8..6c10d6b5ef86 100644 --- a/yarn-project/types/src/interfaces/node-info.ts +++ b/yarn-project/types/src/interfaces/node-info.ts @@ -24,4 +24,8 @@ export type NodeInfo = { * The rollup contract address */ rollupAddress: EthAddress; + /** + * The registry contract address + */ + registryAddress: EthAddress; }; diff --git a/yarn-project/types/src/l1_addresses.ts b/yarn-project/types/src/l1_addresses.ts index 3a9b9b772335..a85fb0f889ac 100644 --- a/yarn-project/types/src/l1_addresses.ts +++ b/yarn-project/types/src/l1_addresses.ts @@ -14,6 +14,11 @@ export interface L1Addresses { */ inboxContract: EthAddress; + /** + * Registry contract address. + */ + registryContract: EthAddress; + /** * ContractDeploymentEmitter contract address. */ diff --git a/yarn-project/types/src/l2_block_source.ts b/yarn-project/types/src/l2_block_source.ts index 4541f730b0ad..5da437eafebe 100644 --- a/yarn-project/types/src/l2_block_source.ts +++ b/yarn-project/types/src/l2_block_source.ts @@ -14,6 +14,12 @@ export interface L2BlockSource { */ getRollupAddress(): Promise; + /** + * Method to fetch the registry contract address at the base-layer. + * @returns The registry address. + */ + getRegistryAddress(): Promise; + /** * Gets the number of the latest L2 block processed by the block source implementation. * @returns The number of the latest L2 block processed by the block source implementation.