Skip to content

Commit

Permalink
fix: devnet bootstrap use universal deploy (#8036)
Browse files Browse the repository at this point in the history
title
  • Loading branch information
sklppy88 authored Aug 16, 2024
1 parent 65583e3 commit 91efec3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions yarn-project/cli/src/cmds/devnet/bootstrap_network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,12 @@ async function deployToken(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - Importing noir-contracts.js even in devDeps results in a circular dependency error. Need to ignore because this line doesn't cause an error in a dev environment
const { TokenContract, TokenBridgeContract } = await import('@aztec/noir-contracts.js');
const devCoin = await TokenContract.deploy(wallet, wallet.getAddress(), 'DevCoin', 'DEV', 18).send().deployed();
const bridge = await TokenBridgeContract.deploy(wallet, devCoin.address, l1Portal).send().deployed();
const devCoin = await TokenContract.deploy(wallet, wallet.getAddress(), 'DevCoin', 'DEV', 18).send({
universalDeploy: true,
}).deployed();
const bridge = await TokenBridgeContract.deploy(wallet, devCoin.address, l1Portal).send({
universalDeploy: true,
}).deployed();

await new BatchCall(wallet, [
devCoin.methods.set_minter(bridge.address, true).request(),
Expand Down Expand Up @@ -197,7 +201,9 @@ async function deployFPC(wallet: Wallet, tokenAddress: AztecAddress): Promise<Co
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - Importing noir-contracts.js even in devDeps results in a circular dependency error. Need to ignore because this line doesn't cause an error in a dev environment
const { FPCContract } = await import('@aztec/noir-contracts.js');
const fpc = await FPCContract.deploy(wallet, tokenAddress).send().deployed();
const fpc = await FPCContract.deploy(wallet, tokenAddress).send({
universalDeploy: true,
}).deployed();
const info: ContractDeploymentInfo = {
address: fpc.address,
initHash: fpc.instance.initializationHash,
Expand All @@ -210,7 +216,9 @@ async function deployCounter(wallet: Wallet): Promise<ContractDeploymentInfo> {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore - Importing noir-contracts.js even in devDeps results in a circular dependency error. Need to ignore because this line doesn't cause an error in a dev environment
const { CounterContract } = await import('@aztec/noir-contracts.js');
const counter = await CounterContract.deploy(wallet, 1, wallet.getAddress(), wallet.getAddress()).send().deployed();
const counter = await CounterContract.deploy(wallet, 1, wallet.getAddress(), wallet.getAddress()).send({
universalDeploy: true,
}).deployed();
const info: ContractDeploymentInfo = {
address: counter.address,
initHash: counter.instance.initializationHash,
Expand Down

0 comments on commit 91efec3

Please sign in to comment.