-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d43f263
commit f0808d0
Showing
5 changed files
with
131 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "Compound WETH", | ||
"symbol": "cWETHv3", | ||
"baseToken": "WETH", | ||
"baseTokenAddress": "0x4200000000000000000000000000000000000006", | ||
"borrowMin": "0.000001e18", | ||
"pauseGuardian": "0xBA5e81fD6811E2699b478d1Bcde62a585bC9b6f7", todo | ||
"storeFrontPriceFactor": 0.5, todo | ||
"targetReserves": "5000e18", | ||
"rates": { | ||
"supplyKink": 0.9, | ||
"supplySlopeLow": 0.0283824, | ||
"supplySlopeHigh": 0.6066567706, | ||
"supplyBase": 0, | ||
"borrowKink": 0.9, | ||
"borrowSlopeLow": 0.05171500002, | ||
"borrowSlopeHigh": 0.5171500339, | ||
"borrowBase": 0.009945209674 | ||
}, | ||
"tracking": { | ||
"indexScale": "1e15", | ||
"baseSupplySpeed": "0e15", | ||
"baseBorrowSpeed": "0e15", | ||
"baseMinForRewards": "100e18" todo | ||
}, | ||
"assets": { | ||
"cbETH": { todo | ||
"address": "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2", | ||
"priceFeed": "0xcD2A119bD1F7DF95d706DE6F2057fDD45A0503E2", | ||
"decimals": "18", | ||
"borrowCF": 0.90, | ||
"liquidateCF": 0.93, | ||
"liquidationFactor": 0.95, | ||
"supplyCap": "1000e18" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Deployed, DeploymentManager } from '../../../plugins/deployment_manager'; | ||
import { DeploySpec, deployComet, exp } from '../../../src/deploy'; | ||
|
||
export default async function deploy(deploymentManager: DeploymentManager, deploySpec: DeploySpec): Promise<Deployed> { | ||
const deployed = await deployContracts(deploymentManager, deploySpec); | ||
return deployed; | ||
} | ||
|
||
async function deployContracts( | ||
deploymentManager: DeploymentManager, | ||
deploySpec: DeploySpec | ||
): Promise<Deployed> { | ||
const trace = deploymentManager.tracer(); | ||
|
||
// Deploy constant price feed for WETH | ||
const wethConstantPriceFeed = await deploymentManager.deploy( | ||
'WETH:priceFeed', | ||
'pricefeeds/ConstantPriceFeed.sol', | ||
[ | ||
8, // decimals | ||
exp(1, 8) // constantPrice | ||
] | ||
); | ||
|
||
// Deploy scaling price feed for cbETH | ||
// TODO update price feed address | ||
const cbETHScalingPriceFeed = await deploymentManager.deploy( | ||
'cbETH:priceFeed', | ||
'ScalingPriceFeed.sol', | ||
[ | ||
'0xcD2A119bD1F7DF95d706DE6F2057fDD45A0503E2', // TODO // cbETH / ETH price feed | ||
8 // decimals | ||
] | ||
); | ||
|
||
// Import shared contracts from cUSDCv3 | ||
const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'base', 'usdc'); | ||
const cometFactory = await deploymentManager.fromDep('cometFactory', 'base', 'usdc'); | ||
const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'base', 'usdc'); | ||
const configurator = await deploymentManager.fromDep('configurator', 'base', 'usdc'); | ||
const rewards = await deploymentManager.fromDep('rewards', 'base', 'usdc'); | ||
const bulker = await deploymentManager.fromDep('bulker', 'base', 'usdc'); | ||
const fauceteer = await deploymentManager.fromDep('fauceteer', 'base', 'usdc'); | ||
const l2CrossDomainMessenger = await deploymentManager.fromDep('l2CrossDomainMessenger', 'base', 'usdc'); | ||
const l2StandardBridge = await deploymentManager.fromDep('l2StandardBridge', 'base', 'usdc'); | ||
const localTimelock = await deploymentManager.fromDep('timelock', 'base', 'usdc'); | ||
const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'base', 'usdc'); | ||
|
||
// Deploy Comet | ||
const deployed = await deployComet(deploymentManager, deploySpec); | ||
|
||
// XXX We will need to deploy a new bulker only if need to support wstETH | ||
|
||
return { | ||
...deployed, | ||
bridgeReceiver, | ||
l2CrossDomainMessenger, // TODO: don't have to part of roots. can be pulled via relations | ||
l2StandardBridge, | ||
bulker | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import baseRelationConfig from '../../relations'; | ||
|
||
export default { | ||
...baseRelationConfig, | ||
governor: { | ||
artifact: 'contracts/bridges/optimism/OptimismBridgeReceiver.sol:OptimismBridgeReceiver' | ||
}, | ||
|
||
l2CrossDomainMessenger: { | ||
delegates: { | ||
field: { | ||
slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' | ||
} | ||
} | ||
}, | ||
|
||
l2StandardBridge: { | ||
delegates: { | ||
field: { | ||
slot: '0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc' | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters