-
Notifications
You must be signed in to change notification settings - Fork 148
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
Showing
5 changed files
with
161 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"name": "Compound WETH", | ||
"symbol": "cWETHv3", | ||
"baseToken": "WETH", | ||
"baseTokenAddress": "0x4200000000000000000000000000000000000006", | ||
"baseTokenPriceFeed": "", | ||
"pauseGuardian": "0x6106DA3AcFdEB341808f4DC3D2483eC67c98E728", | ||
"borrowMin": "1e0", | ||
"storeFrontPriceFactor": 1, | ||
"targetReserves": "5000e18", | ||
"rates": { | ||
"supplyKink": 0.9, | ||
"supplySlopeLow": 0.0283824, | ||
"supplySlopeHigh": 0.6066567706, | ||
"supplyBase": 0, | ||
"borrowKink": 0.9, | ||
"borrowSlopeLow": 0.037, | ||
"borrowSlopeHigh": 0.5171500339, | ||
"borrowBase": 0.009945209674 | ||
}, | ||
"tracking": { | ||
"indexScale": "1e15", | ||
"baseSupplySpeed": "231_481_481_481e0", | ||
"baseBorrowSpeed": "0e15", | ||
"baseMinForRewards": "100e18" | ||
}, | ||
"rewardToken": "COMP", | ||
"assets": { | ||
"cbETH": { | ||
"address": "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2", | ||
"decimals": "18", | ||
"borrowCF": 0.90, | ||
"liquidateCF": 0.93, | ||
"liquidationFactor": 0.975, | ||
"supplyCap": "7500e18" | ||
} | ||
} | ||
} |
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,70 @@ | ||
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 | ||
// XXX There is no cbETH / ETH pricefeed on testnet. Remember to change this for mainnet. | ||
// const cbETHScalingPriceFeed = await deploymentManager.deploy( | ||
// 'cbETH:priceFeed', | ||
// 'ScalingPriceFeed.sol', | ||
// [ | ||
// '0xcD2A119bD1F7DF95d706DE6F2057fDD45A0503E2', // cbETH / ETH price feed | ||
// 8 // decimals | ||
// ] | ||
// ); | ||
const cbETHConstantPriceFeed = await deploymentManager.deploy( | ||
'cbETH:priceFeed', | ||
'pricefeeds/ConstantPriceFeed.sol', | ||
[ | ||
8, // decimals | ||
exp(1, 8) // constantPrice | ||
] | ||
); | ||
|
||
// Import shared contracts from cUSDCv3 | ||
const cometAdmin = await deploymentManager.fromDep('cometAdmin', 'base-sepolia', 'usdc'); | ||
const cometFactory = await deploymentManager.fromDep('cometFactory', 'base-sepolia', 'usdc'); | ||
const $configuratorImpl = await deploymentManager.fromDep('configurator:implementation', 'base-sepolia', 'usdc'); | ||
const configurator = await deploymentManager.fromDep('configurator', 'base-sepolia', 'usdc'); | ||
const rewards = await deploymentManager.fromDep('rewards', 'base-sepolia', 'usdc'); | ||
const bulker = await deploymentManager.fromDep('bulker', 'base-sepolia', 'usdc'); | ||
const fauceteer = await deploymentManager.fromDep('fauceteer', 'base-sepolia', 'usdc'); | ||
const l2CrossDomainMessenger = await deploymentManager.fromDep('l2CrossDomainMessenger', 'base-sepolia', 'usdc'); | ||
const l2StandardBridge = await deploymentManager.fromDep('l2StandardBridge', 'base-sepolia', 'usdc'); | ||
const localTimelock = await deploymentManager.fromDep('timelock', 'base-sepolia', 'usdc'); | ||
const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'base-sepolia', '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, | ||
l2StandardBridge, | ||
bulker, | ||
fauceteer | ||
}; | ||
} |
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,34 @@ | ||
import baseRelationConfig from '../../relations'; | ||
|
||
export default { | ||
...baseRelationConfig, | ||
governor: { | ||
artifact: 'contracts/bridges/optimism/OptimismBridgeReceiver.sol:OptimismBridgeReceiver' | ||
}, | ||
|
||
// cbETH | ||
'0x774ed9edb0c5202df9a86183804b5d9e99dc6ca3': { | ||
artifact: 'contracts/ERC20.sol:ERC20', | ||
}, | ||
|
||
// COMP | ||
'0x2f535da74048c0874400f0371fba20df983a56e2': { | ||
artifact: 'contracts/ERC20.sol:ERC20', | ||
}, | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"comet": "0x571621Ce60Cebb0c1D442B5afb38B1663C6Bf017", | ||
"configurator": "0x090a2b1fc84d0b5141d5D5608b12Db19201aE5a6", | ||
"rewards": "0x3394fa1baCC0b47dd0fF28C8573a476a161aF7BC", | ||
"bridgeReceiver": "0x80c116493DB619560e3380D0fF195e749D8857D7", | ||
"l2CrossDomainMessenger": "0x4200000000000000000000000000000000000007", | ||
"l2StandardBridge": "0x4200000000000000000000000000000000000010", | ||
"bulker": "0x7D25b2AecF07B5CB87B05e17Aa5cecbA8BCfDBD1", | ||
"fauceteer": "0xD76cB57d8B097B80a6eE4D1b4d5ef872bfBa6051" | ||
} |
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