Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WethZapper and GasCompZapper to the deployment context & env vars #424

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion contracts/utils/deploy-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,20 +209,22 @@ Deploying Liquity contracts with the following settings:
const { deployer, ...safeOptions } = options;

const protocolContracts = {
WETHTester: deploymentManifest.branches[0].collToken as string,
BoldToken: deploymentManifest.boldToken as string,
CollateralRegistry: deploymentManifest.collateralRegistry as string,
HintHelpers: deploymentManifest.hintHelpers as string,
MultiTroveGetter: deploymentManifest.multiTroveGetter as string,
WETHTester: deploymentManifest.branches[0].collToken as string,
};

const collateralContracts = (deploymentManifest.branches as any[]).map((branch) => ({
activePool: branch.activePool as string,
borrowerOperations: branch.borrowerOperations as string,
gasCompZapper: branch.gasCompZapper as string,
sortedTroves: branch.sortedTroves as string,
stabilityPool: branch.stabilityPool as string,
token: branch.collToken as string,
troveManager: branch.troveManager as string,
wethZapper: branch.wethZapper as string,
}));

// write env file
Expand Down
6 changes: 6 additions & 0 deletions contracts/utils/deployment-artifacts-to-app-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ const ZDeploymentContext = z.object({
z.object({
activePool: ZAddress,
borrowerOperations: ZAddress,
gasCompZapper: ZAddress,
sortedTroves: ZAddress,
stabilityPool: ZAddress,
token: ZAddress,
troveManager: ZAddress,
wethZapper: ZAddress,
}),
),
protocolContracts: z.object({
Expand Down Expand Up @@ -169,6 +171,10 @@ function contractNameToAppEnvVariable(contractName: string, prefix: string = "")
return `${prefix}_TOKEN`;
case "troveManager":
return `${prefix}_TROVE_MANAGER`;
case "wethZapper":
return `${prefix}_WETH_ZAPPER`;
case "gasCompZapper":
return `${prefix}_GAS_COMP_ZAPPER`;
}
return null;
}
Expand Down
Loading