diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a69da686a03..5d0ada10a70f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,9 +71,9 @@ setup_env: &setup_env command: ./build-system/scripts/setup_env "$CIRCLE_SHA1" "$CIRCLE_TAG" "$CIRCLE_JOB" "$CIRCLE_REPOSITORY_URL" "$CIRCLE_BRANCH" "$CIRCLE_PULL_REQUEST" defaults_e2e_test: &defaults_e2e_test - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + docker: + - image: aztecprotocol/alpine-build-image + resource_class: small jobs: # Dynamically filter our code, quickly figuring out which jobs we can skip. @@ -868,7 +868,6 @@ jobs: aztec_manifest_key: end-to-end <<: *defaults_e2e_test - e2e-outbox: docker: - image: aztecprotocol/alpine-build-image @@ -968,7 +967,7 @@ jobs: - *setup_env - run: name: "Test" - command: cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml TEST=e2e_fees.test.ts + command: DEPLOY_GAS_PORTAL=1 cond_spot_run_compose end-to-end 4 ./scripts/docker-compose.yml TEST=e2e_fees.test.ts aztec_manifest_key: end-to-end <<: *defaults_e2e_test @@ -1231,7 +1230,7 @@ defaults: &defaults - slack/notify: event: fail branch_pattern: "master" - + bb_acir_tests: &bb_acir_tests requires: - barretenberg-x86_64-linux-clang-assert diff --git a/build-system/scripts/remote_run_script b/build-system/scripts/remote_run_script index c157e4f91312..c3fb0379eb08 100755 --- a/build-system/scripts/remote_run_script +++ b/build-system/scripts/remote_run_script @@ -33,6 +33,8 @@ ssh -A -F $SSH_CONFIG_PATH $IP " # temp while we transitioning to avm export AVM_ENABLED=${AVM_ENABLED:-} + # temp while we work on fees + export DEPLOY_GAS_PORTAL=${DEPLOY_GAS_PORTAL:-} source ./remote_initialize $@ " diff --git a/yarn-project/archiver/src/archiver/config.ts b/yarn-project/archiver/src/archiver/config.ts index daddf75df065..7b225607aa02 100644 --- a/yarn-project/archiver/src/archiver/config.ts +++ b/yarn-project/archiver/src/archiver/config.ts @@ -62,6 +62,7 @@ export function getConfigEnvVars(): ArchiverConfig { INBOX_CONTRACT_ADDRESS, OUTBOX_CONTRACT_ADDRESS, REGISTRY_CONTRACT_ADDRESS, + GAS_PORTAL_CONTRACT_ADDRESS, DATA_DIRECTORY, } = process.env; // Populate the relevant addresses for use by the archiver. @@ -73,6 +74,9 @@ export function getConfigEnvVars(): ArchiverConfig { registryAddress: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO, inboxAddress: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, outboxAddress: OUTBOX_CONTRACT_ADDRESS ? EthAddress.fromString(OUTBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, + gasPortalAddress: GAS_PORTAL_CONTRACT_ADDRESS + ? EthAddress.fromString(GAS_PORTAL_CONTRACT_ADDRESS) + : EthAddress.ZERO, }; return { rpcUrl: ETHEREUM_HOST || 'http://127.0.0.1:8545/', diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index f3deb9c66669..e2f9b05c8a25 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -27,6 +27,7 @@ describe('Contract Class', () => { registryAddress: EthAddress.random(), inboxAddress: EthAddress.random(), outboxAddress: EthAddress.random(), + gasPortalAddress: EthAddress.random(), }; const mockNodeInfo: NodeInfo = { nodeVersion: 'vx.x.x', diff --git a/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts b/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts index d8d88910036b..04627578c64a 100644 --- a/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts @@ -1,25 +1,33 @@ import { FunctionCall } from '@aztec/circuit-types'; -import { FunctionData } from '@aztec/circuits.js'; +import { AztecAddress, FunctionData } from '@aztec/circuits.js'; import { FunctionSelector } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { GasTokenAddress } from '@aztec/protocol-contracts/gas-token'; +import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; +import { Wallet } from '../account/wallet.js'; import { FeePaymentMethod } from './fee_payment_method.js'; /** * Pay fee directly in the native gas token. */ export class NativeFeePaymentMethod implements FeePaymentMethod { - static #GAS_TOKEN = GasTokenAddress; + #gasTokenAddress: AztecAddress; - constructor() {} + private constructor(canonicalGasTokenAddress: AztecAddress) { + this.#gasTokenAddress = canonicalGasTokenAddress; + } + + static async create(wallet: Wallet): Promise { + const nodeInfo = await wallet.getNodeInfo(); + return new NativeFeePaymentMethod(getCanonicalGasTokenAddress(nodeInfo.l1ContractAddresses.gasPortalAddress)); + } /** * Gets the native gas asset used to pay the fee. * @returns The asset used to pay the fee. */ getAsset() { - return NativeFeePaymentMethod.#GAS_TOKEN; + return this.#gasTokenAddress; } /** @@ -27,7 +35,7 @@ export class NativeFeePaymentMethod implements FeePaymentMethod { * @returns The contract address responsible for holding the fee payment. */ getPaymentContract() { - return NativeFeePaymentMethod.#GAS_TOKEN; + return this.#gasTokenAddress; } /** @@ -46,12 +54,12 @@ export class NativeFeePaymentMethod implements FeePaymentMethod { getFunctionCalls(feeLimit: Fr): Promise { return Promise.resolve([ { - to: NativeFeePaymentMethod.#GAS_TOKEN, + to: this.#gasTokenAddress, functionData: new FunctionData(FunctionSelector.fromSignature('check_balance(Field)'), false), args: [feeLimit], }, { - to: NativeFeePaymentMethod.#GAS_TOKEN, + to: this.#gasTokenAddress, functionData: new FunctionData(FunctionSelector.fromSignature('pay_fee(Field)'), false), args: [feeLimit], }, diff --git a/yarn-project/aztec/src/sandbox.ts b/yarn-project/aztec/src/sandbox.ts index 161100eefce7..0fabe49202a9 100644 --- a/yarn-project/aztec/src/sandbox.ts +++ b/yarn-project/aztec/src/sandbox.ts @@ -98,6 +98,13 @@ export async function deployContractsToL1( contractAbi: RollupAbi, contractBytecode: RollupBytecode, }, + gasPortal: + process.env.DEPLOY_GAS_PORTAL === '1' + ? { + contractAbi: RollupAbi, + contractBytecode: RollupBytecode, + } + : undefined, }; aztecNodeConfig.l1Contracts = ( diff --git a/yarn-project/end-to-end/Earthfile b/yarn-project/end-to-end/Earthfile index c7228768a72e..fd066f33ed98 100644 --- a/yarn-project/end-to-end/Earthfile +++ b/yarn-project/end-to-end/Earthfile @@ -105,6 +105,7 @@ e2e-avm-simulator: DO +E2E_TEST --test=e2e_avm_simulator.test.ts e2e-fees: + ENV DEPLOY_GAS_PORTAL=1 DO +E2E_TEST --test=e2e_fees.test.ts e2e-dapp-subscription: diff --git a/yarn-project/end-to-end/scripts/docker-compose.yml b/yarn-project/end-to-end/scripts/docker-compose.yml index 114fd5f9ad8f..b8c99ed09207 100644 --- a/yarn-project/end-to-end/scripts/docker-compose.yml +++ b/yarn-project/end-to-end/scripts/docker-compose.yml @@ -28,6 +28,7 @@ services: PXE_BLOCK_POLLING_INTERVAL_MS: 50 ARCHIVER_VIEM_POLLING_INTERVAL_MS: 500 AVM_ENABLED: ${AVM_ENABLED:-} + DEPLOY_GAS_PORTAL: ${DEPLOY_GAS_PORTAL:-} ports: - '8080:8080' diff --git a/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts b/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts index df9dfb64e205..ec8801c7988e 100644 --- a/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts +++ b/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts @@ -1,6 +1,7 @@ import { AccountWalletWithPrivateKey, AztecAddress, + EthAddress, FeePaymentMethod, Fr, PrivateFeePaymentMethod, @@ -16,7 +17,7 @@ import { FPCContract, GasTokenContract, } from '@aztec/noir-contracts.js'; -import { GasTokenAddress } from '@aztec/protocol-contracts/gas-token'; +import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; import { jest } from '@jest/globals'; @@ -63,13 +64,13 @@ describe('e2e_dapp_subscription', () => { beforeAll(async () => { process.env.PXE_URL = ''; - e2eContext = await setup(3, { deployProtocolContracts: true }); + e2eContext = await setup(3, { deployGasToken: true }); await publicDeployAccounts(e2eContext.wallet, e2eContext.accounts); const { wallets, accounts, aztecNode } = e2eContext; // this should be a SignerlessWallet but that can't call public functions directly - gasTokenContract = await GasTokenContract.at(GasTokenAddress, wallets[0]); + gasTokenContract = await GasTokenContract.at(getCanonicalGasTokenAddress(EthAddress.ZERO), wallets[0]); aliceAddress = accounts.at(0)!.address; bobAddress = accounts.at(1)!.address; diff --git a/yarn-project/end-to-end/src/e2e_fees.test.ts b/yarn-project/end-to-end/src/e2e_fees.test.ts index 0a0064dbdbf9..5a3ce42acf83 100644 --- a/yarn-project/end-to-end/src/e2e_fees.test.ts +++ b/yarn-project/end-to-end/src/e2e_fees.test.ts @@ -59,8 +59,10 @@ describe('e2e_fees', () => { let bananaPrivateBalances: BalancesFn; beforeAll(async () => { - process.env.PXE_URL = ''; - e2eContext = await setup(3); + e2eContext = await setup(3, { + deployGasToken: true, + deployGasPortal: true, + }); const { accounts, logger, aztecNode, pxe, deployL1ContractsValues, wallets } = e2eContext; diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index b8fb20360557..212e29108c19 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -30,6 +30,8 @@ import { deployInstance, registerContractClass } from '@aztec/aztec.js/deploymen import { AvailabilityOracleAbi, AvailabilityOracleBytecode, + GasPortalAbi, + GasPortalBytecode, InboxAbi, InboxBytecode, OutboxAbi, @@ -96,6 +98,7 @@ export const setupL1Contracts = async ( l1RpcUrl: string, account: HDAccount | PrivateKeyAccount, logger: DebugLogger, + enableGas = false, ) => { const l1Artifacts: L1ContractArtifactsForDeployment = { registry: { @@ -118,6 +121,12 @@ export const setupL1Contracts = async ( contractAbi: RollupAbi, contractBytecode: RollupBytecode, }, + gasPortal: enableGas + ? { + contractAbi: GasPortalAbi, + contractBytecode: GasPortalBytecode, + } + : undefined, }; return await deployL1Contracts(l1RpcUrl, account, foundry, logger, l1Artifacts); }; @@ -183,7 +192,7 @@ async function setupWithRemoteEnvironment( config: AztecNodeConfig, logger: DebugLogger, numberOfAccounts: number, - deployProtocolContracts = false, + deployGasToken = false, ) { // we are setting up against a remote environment, l1 contracts are already deployed const aztecNodeUrl = getAztecUrl(); @@ -221,8 +230,10 @@ async function setupWithRemoteEnvironment( const cheatCodes = CheatCodes.create(config.rpcUrl, pxeClient!); const teardown = () => Promise.resolve(); - if (deployProtocolContracts) { - await deployPublicProtocolContracts(wallets[0]); + if (deployGasToken) { + // this contract might already have been deployed + // the following function is idempotent + await deployCanonicalGasToken(wallets[0]); } return { @@ -247,8 +258,11 @@ type SetupOptions = { /** Previously deployed contracts on L1 */ deployL1ContractsValues?: DeployL1Contracts; - /** Deploy protocol contracts */ - deployProtocolContracts?: boolean; + /** Deploy the gas token contract on L2 */ + deployGasToken?: boolean; + + /** Deploy gas portal on L1. This is used to bridge assets to the gas token contract */ + deployGasPortal?: boolean; } & Partial; /** Context for an end-to-end test as returned by the `setup` function */ @@ -308,11 +322,11 @@ export async function setup( if (PXE_URL) { // we are setting up against a remote environment, l1 contracts are assumed to already be deployed - return await setupWithRemoteEnvironment(hdAccount, config, logger, numberOfAccounts, opts.deployProtocolContracts); + return await setupWithRemoteEnvironment(hdAccount, config, logger, numberOfAccounts, opts.deployGasToken); } const deployL1ContractsValues = - opts.deployL1ContractsValues ?? (await setupL1Contracts(config.rpcUrl, hdAccount, logger)); + opts.deployL1ContractsValues ?? (await setupL1Contracts(config.rpcUrl, hdAccount, logger, opts.deployGasPortal)); config.publisherPrivateKey = `0x${publisherPrivKey!.toString('hex')}`; config.l1Contracts = deployL1ContractsValues.l1ContractAddresses; @@ -330,10 +344,10 @@ export async function setup( const { pxe, accounts, wallets } = await setupPXEService(numberOfAccounts, aztecNode!, pxeOpts, logger); - if (opts.deployProtocolContracts) { + if (opts.deployGasToken) { // this should be a neutral wallet, but the SignerlessWallet only accepts a single function call // and this needs two: one to register the class and another to deploy the instance - await deployPublicProtocolContracts(wallets[0]); + await deployCanonicalGasToken(wallets[0]); } const cheatCodes = CheatCodes.create(config.rpcUrl, pxe!); @@ -503,9 +517,10 @@ export async function expectMapping( /** * Deploy the protocol contracts to a running instance. */ -export async function deployPublicProtocolContracts(deployer: Wallet) { +export async function deployCanonicalGasToken(deployer: Wallet) { // "deploy" the Gas token as it contains public functions - const canonicalGasToken = getCanonicalGasToken(); + const gasPortalAddress = (await deployer.getNodeInfo()).l1ContractAddresses.gasPortalAddress; + const canonicalGasToken = getCanonicalGasToken(gasPortalAddress); if (await deployer.isContractClassPubliclyRegistered(canonicalGasToken.contractClass.id)) { return; diff --git a/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts b/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts index 4f34d8242ec7..67a31ca4fbe1 100644 --- a/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts @@ -10,9 +10,9 @@ import { deployL1Contract, sleep, } from '@aztec/aztec.js'; -import { GasPortalAbi, GasPortalBytecode, OutboxAbi, PortalERC20Abi, PortalERC20Bytecode } from '@aztec/l1-artifacts'; +import { GasPortalAbi, OutboxAbi, PortalERC20Abi, PortalERC20Bytecode } from '@aztec/l1-artifacts'; import { GasTokenContract } from '@aztec/noir-contracts.js'; -import { getCanonicalGasToken } from '@aztec/protocol-contracts/gas-token'; +import { getCanonicalGasToken, getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; import { Account, Chain, HttpTransport, PublicClient, WalletClient, getContract } from 'viem'; @@ -62,21 +62,21 @@ export async function deployAndInitializeTokenAndBridgeContracts( client: walletClient, }); - // deploy the gas portal - const gasPortalAddress = await deployL1Contract(walletClient, publicClient, GasPortalAbi, GasPortalBytecode); + // the gas portal should have been deployed already + // we need to initialize it though + const gasPortalAddress = (await wallet.getNodeInfo()).l1ContractAddresses.gasPortalAddress; + if (gasPortalAddress.isZero()) { + throw new Error('Gas portal not deployed on L1'); + } + const gasPortal = getContract({ address: gasPortalAddress.toString(), abi: GasPortalAbi, client: walletClient, }); - // deploy l2 token - const gasL2 = await GasTokenContract.deploy(wallet) - .send({ - portalContract: gasPortalAddress, - contractAddressSalt: getCanonicalGasToken().instance.salt, - }) - .deployed(); + // the gas token on L2 should have been deployed as part of bootstrap + const gasL2 = await GasTokenContract.at(getCanonicalGasTokenAddress(gasPortalAddress), wallet); // initialize portal await gasPortal.write.initialize( @@ -104,7 +104,7 @@ export class GasPortalTestingHarnessFactory { const gasL2 = await GasTokenContract.deploy(wallet) .send({ - contractAddressSalt: getCanonicalGasToken().instance.salt, + contractAddressSalt: getCanonicalGasToken(EthAddress.ZERO).instance.salt, }) .deployed(); return Promise.resolve(new MockGasBridgingTestHarness(gasL2)); diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index 3d05513b6211..42f0be9ae638 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -76,6 +76,10 @@ export interface L1ContractArtifactsForDeployment { * Rollup contract artifacts */ rollup: ContractArtifacts; + /** + * Gas portal contract artifacts. Optional for now as gas is not strictly enforced + */ + gasPortal?: ContractArtifacts; } /** @@ -160,12 +164,24 @@ export const deployL1Contracts = async ( { account }, ); + let gasPortalAddress = EthAddress.ZERO; + if (contractsToDeploy.gasPortal) { + // this contract remains uninitialized because at this point we don't know the address of the gas token on L2 + gasPortalAddress = await deployL1Contract( + walletClient, + publicClient, + contractsToDeploy.gasPortal.contractAbi, + contractsToDeploy.gasPortal.contractBytecode, + ); + } + const l1Contracts: L1ContractAddresses = { availabilityOracleAddress, rollupAddress, registryAddress, inboxAddress, outboxAddress, + gasPortalAddress, }; return { diff --git a/yarn-project/ethereum/src/l1_contract_addresses.ts b/yarn-project/ethereum/src/l1_contract_addresses.ts index be1c3af72fc3..4f87dbf83c42 100644 --- a/yarn-project/ethereum/src/l1_contract_addresses.ts +++ b/yarn-project/ethereum/src/l1_contract_addresses.ts @@ -6,6 +6,7 @@ export const l1ContractsNames = [ 'registryAddress', 'inboxAddress', 'outboxAddress', + 'gasPortalAddress', ] as const; /** diff --git a/yarn-project/protocol-contracts/src/gas-token/index.test.ts b/yarn-project/protocol-contracts/src/gas-token/index.test.ts index 68a239958580..3e17606291af 100644 --- a/yarn-project/protocol-contracts/src/gas-token/index.test.ts +++ b/yarn-project/protocol-contracts/src/gas-token/index.test.ts @@ -1,8 +1,9 @@ +import { EthAddress } from '@aztec/circuits.js'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; import omit from 'lodash.omit'; -import { GasTokenAddress, getCanonicalGasToken } from './index.js'; +import { getCanonicalGasToken } from './index.js'; describe('GasToken', () => { setupCustomSnapshotSerializers(expect); @@ -10,7 +11,7 @@ describe('GasToken', () => { // if you're updating the snapshots here then you'll also have to update CANONICAL_GAS_TOKEN_ADDRESS in // - noir-projects/noir-contracts/contracts/fpc_contract/src/main.nr // - noir-projects/noir-contracts/contracts/app_subscription_contract/src/main.nr - const contract = getCanonicalGasToken(); + const contract = getCanonicalGasToken(EthAddress.ZERO); expect(omit(contract, ['artifact', 'contractClass'])).toMatchSnapshot(); // bytecode is very large @@ -19,6 +20,5 @@ describe('GasToken', () => { // this contract has public bytecode expect(contract.contractClass.publicFunctions.map(x => omit(x, 'bytecode'))).toMatchSnapshot(); expect(contract.contractClass.packedBytecode.length).toBeGreaterThan(0); - expect(contract.address.toString()).toEqual(GasTokenAddress.toString()); }); }); diff --git a/yarn-project/protocol-contracts/src/gas-token/index.ts b/yarn-project/protocol-contracts/src/gas-token/index.ts index c3daa5dd96e7..2ecfe6c8ed15 100644 --- a/yarn-project/protocol-contracts/src/gas-token/index.ts +++ b/yarn-project/protocol-contracts/src/gas-token/index.ts @@ -1,11 +1,13 @@ -import { EthAddress, Point } from '@aztec/circuits.js'; +import { AztecAddress, EthAddress, Point } from '@aztec/circuits.js'; import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; import { GasTokenArtifact } from './artifact.js'; /** Returns the canonical deployment of the gas token. */ -export function getCanonicalGasToken(): ProtocolContract { - return getCanonicalProtocolContract(GasTokenArtifact, 1, [], Point.ZERO, EthAddress.ZERO); +export function getCanonicalGasToken(l1Bridge: EthAddress): ProtocolContract { + return getCanonicalProtocolContract(GasTokenArtifact, 1, [], Point.ZERO, l1Bridge); } -export const GasTokenAddress = getCanonicalGasToken().address; +export function getCanonicalGasTokenAddress(l1Bridge: EthAddress): AztecAddress { + return getCanonicalGasToken(l1Bridge).address; +} diff --git a/yarn-project/pxe/src/pxe_service/create_pxe_service.ts b/yarn-project/pxe/src/pxe_service/create_pxe_service.ts index a8c92374eadc..74d0213ad2a9 100644 --- a/yarn-project/pxe/src/pxe_service/create_pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/create_pxe_service.ts @@ -43,7 +43,11 @@ export async function createPXEService( const db = new KVPxeDatabase(await initStoreForRollup(AztecLmdbStore.open(pxeDbPath), l1Contracts.rollupAddress)); const server = new PXEService(keyStore, aztecNode, db, config, logSuffix); - await server.addContracts([getCanonicalClassRegisterer(), getCanonicalInstanceDeployer(), getCanonicalGasToken()]); + await server.addContracts([ + getCanonicalClassRegisterer(), + getCanonicalInstanceDeployer(), + getCanonicalGasToken(l1Contracts.gasPortalAddress), + ]); await server.start(); return server; diff --git a/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts b/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts index 01588b0e3ba6..cb2de1f9cd01 100644 --- a/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts +++ b/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts @@ -31,6 +31,7 @@ function createPXEService(): Promise { registryAddress: EthAddress.random(), inboxAddress: EthAddress.random(), outboxAddress: EthAddress.random(), + gasPortalAddress: EthAddress.random(), }; node.getL1ContractAddresses.mockResolvedValue(mockedContracts); diff --git a/yarn-project/sequencer-client/src/config.ts b/yarn-project/sequencer-client/src/config.ts index e0e6a9c701ad..d3c07a800730 100644 --- a/yarn-project/sequencer-client/src/config.ts +++ b/yarn-project/sequencer-client/src/config.ts @@ -45,6 +45,7 @@ export function getConfigEnvVars(): SequencerClientConfig { REGISTRY_CONTRACT_ADDRESS, INBOX_CONTRACT_ADDRESS, OUTBOX_CONTRACT_ADDRESS, + GAS_PORTAL_CONTRACT_ADDRESS, COINBASE, FEE_RECIPIENT, ACVM_WORKING_DIRECTORY, @@ -63,6 +64,9 @@ export function getConfigEnvVars(): SequencerClientConfig { registryAddress: REGISTRY_CONTRACT_ADDRESS ? EthAddress.fromString(REGISTRY_CONTRACT_ADDRESS) : EthAddress.ZERO, inboxAddress: INBOX_CONTRACT_ADDRESS ? EthAddress.fromString(INBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, outboxAddress: OUTBOX_CONTRACT_ADDRESS ? EthAddress.fromString(OUTBOX_CONTRACT_ADDRESS) : EthAddress.ZERO, + gasPortalAddress: GAS_PORTAL_CONTRACT_ADDRESS + ? EthAddress.fromString(GAS_PORTAL_CONTRACT_ADDRESS) + : EthAddress.ZERO, }; return {