Skip to content
Merged
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: 8 additions & 3 deletions src/deploy/002_settlement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ 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 @@ -46,10 +48,13 @@ const deploySettlement: DeployFunction = async function ({
>;
const vaultDeployment = vaultNetworks[chainId];
if (vaultDeployment === undefined) {
throw new Error(`Vault not deployed on chain ${chainId}`);
console.warn(
`Vault not deployed on chain ${chainId}, using default address.`,
);
vaultAddress = DEFAULT_VAULT_ADDRESS;
} else {
vaultAddress = vaultDeployment.address;
}

vaultAddress = vaultDeployment.address;
}

await deploy(settlement, {
Expand Down
Loading