Skip to content

Commit

Permalink
refactor 100 basis point tier out to prepare for more
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrent committed Oct 22, 2024
1 parent f80b5a9 commit 1893208
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 18 deletions.
8 changes: 7 additions & 1 deletion common/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,20 @@ export interface ITokens {
USDM?: string
wUSDM?: string

// Demurrage collateral
PAXG?: string
cbBTC?: string
EURC?: string
}

export type ITokensKeys = Array<keyof ITokens>

export interface IDemurrageCollateral {
DMR100PAXG?: string
DMR100cbBTC?: string
DMR100EURC?: string
DMR100ARB?: string
}

export interface IFeeds {
stETHETH?: string
stETHUSD?: string
Expand Down
9 changes: 5 additions & 4 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function main() {
'phase2-assets/assets/deploy_crv.ts',
'phase2-assets/assets/deploy_cvx.ts',
'phase2-assets/collaterals/deploy_pyusd.ts',
'phase2-assets/collaterals/deploy_paxg.ts'
'phase2-assets/collaterals/deploy_paxg_100.ts'
)
} else if (chainId == '8453' || chainId == '84531') {
// Base L2 chains
Expand All @@ -104,8 +104,8 @@ async function main() {
'phase2-assets/collaterals/deploy_aave_v3_usdc.ts',
'phase2-assets/collaterals/deploy_lido_wsteth_collateral.ts',
'phase2-assets/collaterals/deploy_cbeth_collateral.ts',
'phase2-assets/collaterals/deploy_cbbtc.ts',
'phase2-assets/collaterals/deploy_eurc.ts',
'phase2-assets/collaterals/deploy_cbbtc_100.ts',
'phase2-assets/collaterals/deploy_eurc_100.ts',
'phase2-assets/assets/deploy_stg.ts'
)
} else if (chainId == '42161' || chainId == '421614') {
Expand All @@ -120,7 +120,8 @@ async function main() {
'phase2-assets/collaterals/deploy_convex_crvusd_usdc_collateral.ts',
'phase2-assets/collaterals/deploy_convex_crvusd_usdt_collateral.ts',
'phase2-assets/collaterals/deploy_usdm.ts',
'phase2-assets/assets/deploy_arb.ts'
'phase2-assets/assets/deploy_arb.ts',
'phase2-assets/assets/deploy_arb_100.ts'
)
}

Expand Down
12 changes: 9 additions & 3 deletions scripts/deployment/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import fs from 'fs'
import { ITokens, IComponents, IImplementations, IPools } from '../../common/configuration'
import {
IDemurrageCollateral,
ITokens,
IComponents,
IImplementations,
IPools,
} from '../../common/configuration'

// This file is intended to have minimal imports, so that it can be used from tasks if necessary

Expand Down Expand Up @@ -32,8 +38,8 @@ export interface IDeployments {

export interface IAssetCollDeployments {
assets: ITokens
collateral: ITokens & IPools
erc20s: ITokens & IPools
collateral: ITokens & IPools & IDemurrageCollateral
erc20s: ITokens & IPools & IDemurrageCollateral
}

export interface IRTokenDeployments {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ async function main() {
await (await collateral.refresh()).wait()
expect(await collateral.status()).to.equal(CollateralStatus.SOUND)

assetCollDeployments.collateral.cbBTC = collateral.address
assetCollDeployments.erc20s.cbBTC = networkConfig[chainId].tokens.cbBTC
assetCollDeployments.collateral.DMR100cbBTC = collateral.address
assetCollDeployments.erc20s.DMR100cbBTC = networkConfig[chainId].tokens.cbBTC
deployedCollateral.push(collateral.address.toString())

fs.writeFileSync(assetCollDeploymentFilename, JSON.stringify(assetCollDeployments, null, 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ async function main() {
await (await collateral.refresh()).wait()
expect(await collateral.status()).to.equal(CollateralStatus.SOUND)

assetCollDeployments.collateral.EURC = collateral.address
assetCollDeployments.erc20s.EURC = networkConfig[chainId].tokens.EURC
assetCollDeployments.collateral.DMR100EURC = collateral.address
assetCollDeployments.erc20s.DMR100EURC = networkConfig[chainId].tokens.EURC
deployedCollateral.push(collateral.address.toString())

fs.writeFileSync(assetCollDeploymentFilename, JSON.stringify(assetCollDeployments, null, 2))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ async function main() {
await (await collateral.refresh()).wait()
expect(await collateral.status()).to.equal(CollateralStatus.SOUND)

assetCollDeployments.collateral.PAXG = collateral.address
assetCollDeployments.erc20s.PAXG = networkConfig[chainId].tokens.PAXG
assetCollDeployments.collateral.DMR100PAXG = collateral.address
assetCollDeployments.erc20s.DMR100PAXG = networkConfig[chainId].tokens.PAXG
deployedCollateral.push(collateral.address.toString())

fs.writeFileSync(assetCollDeploymentFilename, JSON.stringify(assetCollDeployments, null, 2))
Expand Down
9 changes: 5 additions & 4 deletions scripts/verify_etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ async function main() {
'collateral-plugins/verify_ethx.ts',
'collateral-plugins/verify_apxeth.ts',
'collateral-plugins/verify_USDe.ts',
'collateral-plugins/verify_pyusd.ts',
'collateral-plugins/verify_paxg.ts'
'collateral-plugins/verify_pyusd_100.ts',
'collateral-plugins/verify_paxg_100.ts'
)
} else if (chainId == '8453' || chainId == '84531') {
// Base L2 chains
Expand All @@ -92,7 +92,7 @@ async function main() {
'collateral-plugins/verify_cbeth.ts',
'assets/verify_stg.ts',
'collateral-plugins/verify_cbbtc.ts',
'collateral-plugins/verify_eurc.ts'
'collateral-plugins/verify_eurc_100.ts'
)
} else if (chainId == '42161' || chainId == '421614') {
// Arbitrum One
Expand All @@ -101,7 +101,8 @@ async function main() {
'collateral-plugins/verify_cusdcv3.ts',
'collateral-plugins/verify_convex_crvusd_usdc.ts',
'collateral-plugins/verify_convex_crvusd_usdt.ts',
'collateral-plugins/verify_usdm.ts'
'collateral-plugins/verify_usdm.ts',
'collateral-plugins/verify_arb_100.ts'
)
}

Expand Down

0 comments on commit 1893208

Please sign in to comment.