Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/deploy/002_settlement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import Vault from "../../balancer/Vault.json";
import BALANCER_NETWORKS from "../../balancer/networks.json";
import { CONTRACT_NAMES, SALT } from "../ts/deploy";

const DEFAULT_VAULT_ADDRESS = "0xBA12222222228d8Ba445958a75a0704d566BF2C8";

const deploySettlement: DeployFunction = async function ({
deployments,
ethers,
Expand Down Expand Up @@ -48,13 +46,12 @@ const deploySettlement: DeployFunction = async function ({
>;
const vaultDeployment = vaultNetworks[chainId];
if (vaultDeployment === undefined) {
console.warn(
`Vault not deployed on chain ${chainId}, using default address.`,
throw new Error(
`Vault not validated on chain ${chainId}. Make sure the Balancer deployment is safe to use first, then add it to the networks.json file`,
);
vaultAddress = DEFAULT_VAULT_ADDRESS;
} else {
vaultAddress = vaultDeployment.address;
}

vaultAddress = vaultDeployment.address;
}

await deploy(settlement, {
Expand Down
Loading