Skip to content

Commit

Permalink
App env: update contracts names
Browse files Browse the repository at this point in the history
- Renamed CONTRACT_PRICE_FEED_TESTNET to CONTRACT_PRICE_FEED (PriceFeedTestnet)
- Add CONTRACT_INTEREST_ROUTER (MockInterestRouter)
- Add CONTRACT_COLL_TOKEN (ERC20Faucet)
  • Loading branch information
bpierre committed Apr 13, 2024
1 parent 47eceff commit ccf56da
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion contracts/utils/deployment-artifacts-to-app-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,14 @@ function contractNameToAppEnvVariable(contractName: string) {
return "NEXT_PUBLIC_CONTRACT_COLL_SURPLUS_POOL";
case "DefaultPool":
return "NEXT_PUBLIC_CONTRACT_DEFAULT_POOL";
case "ERC20Faucet":
return "NEXT_PUBLIC_CONTRACT_COLL_TOKEN";
case "GasPool":
return "NEXT_PUBLIC_CONTRACT_GAS_POOL";
case "MockInterestRouter":
return "NEXT_PUBLIC_CONTRACT_INTEREST_ROUTER";
case "PriceFeedTestnet":
return "NEXT_PUBLIC_CONTRACT_PRICE_FEED_TESTNET";
return "NEXT_PUBLIC_CONTRACT_PRICE_FEED";
case "SortedTroves":
return "NEXT_PUBLIC_CONTRACT_SORTED_TROVES";
case "StabilityPool":
Expand Down
4 changes: 3 additions & 1 deletion frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ NEXT_PUBLIC_CHAIN_RPC_URL=http://127.0.0.1:8545
NEXT_PUBLIC_CONTRACT_ACTIVE_POOL=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_BOLD_TOKEN=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_BORROWER_OPERATIONS=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_COLL_TOKEN=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_COLL_SURPLUS_POOL=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_DEFAULT_POOL=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_FUNCTION_CALLER=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_GAS_POOL=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_HINT_HELPERS=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_PRICE_FEED_TESTNET=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_INTEREST_ROUTER=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_PRICE_FEED=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_SORTED_TROVES=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_STABILITY_POOL=0x0000000000000000000000000000000000000000
NEXT_PUBLIC_CONTRACT_TROVE_MANAGER=0x0000000000000000000000000000000000000000
12 changes: 9 additions & 3 deletions frontend/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ export const EnvSchema = z.object({
CONTRACT_BOLD_TOKEN: zAddress(),
CONTRACT_BORROWER_OPERATIONS: zAddress(),
CONTRACT_COLL_SURPLUS_POOL: zAddress(),
CONTRACT_COLL_TOKEN: zAddress(),
CONTRACT_DEFAULT_POOL: zAddress(),
CONTRACT_FUNCTION_CALLER: zAddress(),
CONTRACT_GAS_POOL: zAddress(),
CONTRACT_HINT_HELPERS: zAddress(),
CONTRACT_PRICE_FEED_TESTNET: zAddress(),
CONTRACT_INTEREST_ROUTER: zAddress(),
CONTRACT_PRICE_FEED: zAddress(),
CONTRACT_SORTED_TROVES: zAddress(),
CONTRACT_STABILITY_POOL: zAddress(),
CONTRACT_TROVE_MANAGER: zAddress(),
Expand All @@ -50,11 +52,13 @@ const parsedEnv = EnvSchema.parse({
CONTRACT_BOLD_TOKEN: process.env.NEXT_PUBLIC_CONTRACT_BOLD_TOKEN,
CONTRACT_BORROWER_OPERATIONS: process.env.NEXT_PUBLIC_CONTRACT_BORROWER_OPERATIONS,
CONTRACT_COLL_SURPLUS_POOL: process.env.NEXT_PUBLIC_CONTRACT_COLL_SURPLUS_POOL,
CONTRACT_COLL_TOKEN: process.env.NEXT_PUBLIC_CONTRACT_COLL_TOKEN,
CONTRACT_DEFAULT_POOL: process.env.NEXT_PUBLIC_CONTRACT_DEFAULT_POOL,
CONTRACT_FUNCTION_CALLER: process.env.NEXT_PUBLIC_CONTRACT_FUNCTION_CALLER,
CONTRACT_GAS_POOL: process.env.NEXT_PUBLIC_CONTRACT_GAS_POOL,
CONTRACT_HINT_HELPERS: process.env.NEXT_PUBLIC_CONTRACT_HINT_HELPERS,
CONTRACT_PRICE_FEED_TESTNET: process.env.NEXT_PUBLIC_CONTRACT_PRICE_FEED_TESTNET,
CONTRACT_INTEREST_ROUTER: process.env.NEXT_PUBLIC_CONTRACT_INTEREST_ROUTER,
CONTRACT_PRICE_FEED: process.env.NEXT_PUBLIC_CONTRACT_PRICE_FEED,
CONTRACT_SORTED_TROVES: process.env.NEXT_PUBLIC_CONTRACT_SORTED_TROVES,
CONTRACT_STABILITY_POOL: process.env.NEXT_PUBLIC_CONTRACT_STABILITY_POOL,
CONTRACT_TROVE_MANAGER: process.env.NEXT_PUBLIC_CONTRACT_TROVE_MANAGER,
Expand All @@ -76,11 +80,13 @@ export const {
CONTRACT_BOLD_TOKEN,
CONTRACT_BORROWER_OPERATIONS,
CONTRACT_COLL_SURPLUS_POOL,
CONTRACT_COLL_TOKEN,
CONTRACT_DEFAULT_POOL,
CONTRACT_FUNCTION_CALLER,
CONTRACT_GAS_POOL,
CONTRACT_HINT_HELPERS,
CONTRACT_PRICE_FEED_TESTNET,
CONTRACT_INTEREST_ROUTER,
CONTRACT_PRICE_FEED,
CONTRACT_SORTED_TROVES,
CONTRACT_STABILITY_POOL,
CONTRACT_TROVE_MANAGER,
Expand Down

0 comments on commit ccf56da

Please sign in to comment.