8000 Add USDC, USDT and WETH markets on Linea by MishaShWoof · Pull Request #953 · compound-finance/comet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add USDC, USDT and WETH markets on Linea #953

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

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
bba7d99
feat: create comet with extended asset list
MishaShWoof Aug 9, 2024
fc16ae0
feat: move new cometExt to its own contract
MishaShWoof Aug 12, 2024
6b62ee6
fix: clean up
MishaShWoof Aug 12, 2024
d06a3f6
fix: gas optimization
MishaShWoof Aug 12, 2024
d2873ad
fix: more gas optimization
MishaShWoof Aug 12, 2024
5e867a0
fix: linter fix
MishaShWoof Aug 12, 2024
8ab1786
fix: natspec
MishaShWoof Aug 12, 2024
171eb7a
fix: more natspec
MishaShWoof Aug 12, 2024
53f1513
Update index.ts
MishaShWoof Aug 23, 2024
8df38e6
fix: remove unused iterface
MishaShWoof Aug 26, 2024
70e8a73
feat: add prepare and enact for simulation
MishaShWoof Aug 26, 2024
4c0a8f4
fix: fix to workflow
MishaShWoof Aug 26, 2024
c29f4b9
Update enact-migration.yaml
MishaShWoof Aug 26, 2024
cf08c19
fix: reverse
MishaShWoof Aug 26, 2024
71fee7b
feat: add prepare and enact workflow
MishaShWoof Aug 26, 2024
57d04f7
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
f0c33a1
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
df2d152
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
92937aa
feat: update enact migration script
dmitriy-woof-software Aug 26, 2024
b72092c
fix: remove verification from simulatative migration
MishaShWoof Aug 27, 2024
ea15450
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Sep 17, 2024
dfe98c9
feat: fixes after audit
MishaShWoof Sep 19, 2024
4f2ba04
fix: working tests
MishaShWoof Sep 19, 2024
e641f95
fix: no network issue resolved
MishaShWoof Dec 13, 2024
986efa2
Merge branch 'main' into woof-software/collateral-extension
MishaShWoof Dec 20, 2024
5c75787
fix: audit fixes
MishaShWoof Dec 23, 2024
4e41a94
fix
MishaShWoof Dec 23, 2024
547e934
Merge branch 'woof-software/fix-to-no-network' of github.com:woof-sof…
MishaShWoof Dec 23, 2024
6635049
feat: working scenarios
MishaShWoof Dec 26, 2024
4ba3b92
feat: migrations and working scenarios
MishaShWoof Dec 27, 2024
c792011
fix
MishaShWoof Dec 27, 2024
9d67b33
fix: secret fix for scroll
MishaShWoof Dec 27, 2024
978dec0
fix: increase arbitrary number
MishaShWoof Dec 27, 2024
b6fb6a2
fix: scroll scan fix
MishaShWoof Dec 27, 2024
6a7f18a
feat: migrations and descriptions
MishaShWoof Jan 6, 2025
d7d9c2c
fix
MishaShWoof Jan 6, 2025
3e41981
wip
MishaShWoof Jan 9, 2025
262fb3b
update descriptions
dmitriy-woof-software Jan 14, 2025
9150602
wip
MishaShWoof Jan 14, 2025
1b4307b
fix
MishaShWoof Jan 14, 2025
2381830
fix: review fix
MishaShWoof Jan 14, 2025
40e0370
fix: naming fix
MishaShWoof Jan 14, 2025
fb9f9b5
fix: optimizer
MishaShWoof Jan 14, 2025
f4860cf
fix: second optimizer fix
MishaShWoof Jan 14, 2025
f37c5dd
feat: linea-usdc
MishaShWoof Jan 14, 2025
94131ad
fix: optimization
MishaShWoof Jan 15, 2025
2741196
Merge branch 'woof-software/collateral-extension-audit-fix' of github…
MishaShWoof Jan 15, 2025
ce624e5
feat: usdt
MishaShWoof Jan 15, 2025
9945de5
feat: weth market
MishaShWoof Jan 16, 2025
543944c
fix: tmp
MishaShWoof Jan 16, 2025
1922b02
fix: prepare for deployment
MishaShWoof Jan 16, 2025
6934f90
Merge branch 'woof-software/collateral-extension' of github.com:woof-…
MishaShWoof Jan 16, 2025
ce16633
fix: update workflows
MishaShWoof Jan 17, 2025
2941e18
fix: merge fix
MishaShWoof Jan 17, 2025
b6ff78e
Merge pull request #100 from woof-software/woof-software/collateral-e…
MishaShWoof Jan 17, 2025
5fe26a2
fix: merge fix
MishaShWoof Jan 17, 2025
c2cfbbc
fix: new amounts
MishaShWoof Jan 17, 2025
029bff2
fix: fixes after review
MishaShWoof Jan 23, 2025
d3522dc
fix: extension delegate fix and linter fix
MishaShWoof Jan 23, 2025
d8ac7a5
feat: add force push for ext deployment
dmitriy-woof-software Jan 28, 2025
370f22a
fix: clean up debug
MishaShWoof Jan 28, 2025
4351754
Modified migration from GitHub Actions
Jan 28, 2025
928efdd
Trigger re-run of actions
dmitriy-woof-software Jan 28, 2025
ad17b12
Collateral extension commits
MishaShWoof Jan 29, 2025
6f5a539
Merge branch 'woof-software/collateral-extension' of github.com:woof-…
MishaShWoof Jan 29, 2025
73051d0
Merge branch 'woof-software/squash-linea-usdc-usdt-weth' of github.co…
MishaShWoof Jan 29, 2025
cd8abbd
fix
MishaShWoof Jan 29, 2025
13a9d5e
fix: scenario fixes
MishaShWoof Jan 29, 2025
3bd402a
fix: linter and test fixes
MishaShWoof Jan 29, 2025
116c112
Modified deployment roots from GitHub Actions
Jan 29, 2025
b8aaf31
feat: post-deployment update
dmitriy-woof-software Jan 29, 2025
0ac7f82
update to a new version
MishaShWoof Feb 7, 2025
436dd53
feat: update lines usdc proposal description and update ENS payload
dmitriy-woof-software Feb 11, 2025
07fca04
feat: # Initialize cUSDTv3 on Linea network\n\n
dmitriy-woof-software Feb 11, 2025
85fca0a
feat: update USDS Base ENS comet address to correct one
dmitriy-woof-software Feb 11, 2025
452d32d
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
dmitriy-woof-software Mar 7, 2025
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
5 changes: 3 additions & 2 deletions .github/workflows/deploy-market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- base
- optimism
- mantle
- linea
- scroll
deployment:
description: Deployment Name (e.g. "usdc")
Expand Down Expand Up @@ -45,7 +46,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"https://rpc.ankr.com/linea/${ANKR_KEY}\",\"mantle\":\"https://rpc.ankr.com/mantle/${ANKR_KEY}\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://rpc.ankr.com/eth/${ANKR_KEY}\",\"sepolia\":\"https://rpc.ankr.com/eth_sepolia/${ANKR_KEY}\",\"polygon\":\"https://rpc.ankr.com/polygon/${ANKR_KEY}\",\"arbitrum\":\"https://rpc.ankr.com/arbitrum/${ANKR_KEY}\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down Expand Up @@ -87,4 +88,4 @@ jobs:
git config user.email "<>"
git add deployments/\*/roots.json
git commit -m "Modified deployment roots from GitHub Actions"
git push origin
git push origin
13 changes: 8 additions & 5 deletions .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- arbitrum
- base
- optimism
- linea
- mantle
- scroll
deployment:
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
- name: Get governance network
run: |
case ${{ github.event.inputs.network }} in
polygon | arbitrum | base | optimism | mantle | scroll)
polygon | arbitrum | base | optimism | mantle | linea | scroll)
echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;;
sepolia)
echo "GOV_NETWORK=sepolia" >> $GITHUB_ENV ;;
Expand All @@ -73,18 +74,20 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"https://rpc.ankr.com/linea/${ANKR_KEY}\",\"mantle\":\"https://rpc.ankr.com/mantle/${ANKR_KEY}\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://rpc.ankr.com/eth/${ANKR_KEY}\",\"sepolia\":\"https://rpc.ankr.com/eth_sepolia/${ANKR_KEY}\",\"polygon\":\"https://rpc.ankr.com/polygon/${ANKR_KEY}\",\"arbitrum\":\"https://rpc.ankr.com/arbitrum/${ANKR_KEY}\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

- name: Seacrest (governance network)
uses: hayesgm/seacrest@42330b57a0554d5b9f4b47b186d483b5e18addbf
uses: hayesgm/seacrest@5d8e5e3023669e93d197963273ae159ecda9d2b2
env:
GOV_NETWORK: ${{ env.GOV_NETWORK }}
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ env.GOV_NETWORK }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\"}')[env.GOV_NETWORK] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"https://rpc.ankr.com/linea/${ANKR_KEY}\",\"mantle\":\"https://rpc.ankr.com/mantle/${ANKR_KEY}\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://rpc.ankr.com/eth/${ANKR_KEY}\",\"sepolia\":\"https://rpc.ankr.com/eth_sepolia/${ANKR_KEY}\",\"polygon\":\"https://rpc.ankr.com/polygon/${ANKR_KEY}\",\"arbitrum\":\"https://rpc.ankr.com/arbitrum/${ANKR_KEY}\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.sc F438 roll.io\"}')[env.GOV_NETWORK] }}"
port: 8685
if: github.event.inputs.eth_pk == '' && env.GOV_NETWORK != '' && github.event.inputs.impersonateAccount == ''
if: github.event.inputs.eth_pk == '' && github.event.inputs.impersonateAccount == ''

- name: Checkout repository
uses: actions/checkout@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/prepare-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
- base
- optimism
- mantle
- linea
- scroll
deployment:
description: Deployment Name (e.g. "usdc")
Expand Down Expand Up @@ -48,7 +49,7 @@ jobs:
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"mantle\":\"https://mantle-mainnet.infura.io/v3/$INFURA_KEY\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"linea\":\"https://rpc.ankr.com/linea/${ANKR_KEY}\",\"mantle\":\"https://rpc.ankr.com/mantle/${ANKR_KEY}\",\"optimism\":\"https://rpc.ankr.com/optimism/$ANKR_KEY\",\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://rpc.ankr.com/eth/${ANKR_KEY}\",\"sepolia\":\"https://rpc.ankr.com/eth_sepolia/${ANKR_KEY}\",\"polygon\":\"https://rpc.ankr.com/polygon/${ANKR_KEY}\",\"arbitrum\":\"https://rpc.ankr.com/arbitrum/${ANKR_KEY}\",\"base\":\"https://rpc.ankr.com/base/$ANKR_KEY\",\"scroll\":\"https://rpc.scroll.io\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-scenarios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
bases: [ development, mainnet, mainnet-weth, mainnet-wbtc, mainnet-usdt, mainnet-wsteth, mainnet-usds, sepolia-usdc, sepolia-weth, fuji, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, base-usdbc, base-weth, base-usdc, base-aero, base-usds, optimism-usdc, optimism-usdt, optimism-weth, mantle-usde, scroll-usdc]
bases: [ development, mainnet, mainnet-weth, mainnet-usdt, mainnet-wbtc, mainnet-wsteth, mainnet-usds, sepolia-usdc, sepolia-weth, fuji, polygon, polygon-usdt, arbitrum-usdc.e, arbitrum-usdc, arbitrum-weth, arbitrum-usdt, base-usdbc, base-weth, base-usdc, base-aero, optimism-usdc, base-usds, optimism-usdt, optimism-weth, mantle-usde, linea-usdc, linea-usdt, linea-weth, scroll-usdc]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
Expand Down
5 changes: 4 additions & 1 deletion contracts/CometInterface.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ import "./CometExtInterface.sol";
* @notice An efficient monolithic money market protocol
* @author Compound
*/
abstract contract CometInterface is CometMainInterface, CometExtInterface {}
abstract contract CometInterface is CometMainInterface, CometExtInterface {
function assetListFactory() external view virtual returns (address);
function assetList() external view virtual returns (address);
}
2 changes: 1 addition & 1 deletion deployments/arbitrum/usdt/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default async function deploy(deploymentManager: DeploymentManager, deplo
const bridgeReceiver = await deploymentManager.fromDep('bridgeReceiver', 'arbitrum', 'usdc.e');

// Deploy Comet
const deployed = await deployComet(deploymentManager, deploySpec);
const deployed = await deployComet(deploymentManager, deploySpec, {}, true);

return {
...deployed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ export default migration('1722937909_update_wsteth_and_weeth_price_feeds_on_arbi
newWeETHToETHPriceFeed = weETHToETHPriceFeed;
newWstETHToUSDPriceFeed = wstETHToUSDPriceFeed;

console.log('wstETHToETHPriceFeed', wstETHToETHPriceFeed);
console.log('weETHToETHPriceFeed', weETHToETHPriceFeed);
console.log('wstETHToUSDPriceFeed', wstETHToUSDPriceFeed);

const updateAssetPriceFeedCalldataWstETHToWETHComet = ethers.utils.defaultAbiCoder.encode(
['address', 'address', 'address'],
[comet.address, wstETH.address, wstETHToETHPriceFeed]
Expand Down
55 changes: 55 additions & 0 deletions deployments/linea/usdc/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "Compound USDC",
"symbol": "cUSDCv3",
"baseToken": "USDC",
"baseTokenAddress": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff",
"baseTokenPriceFeed": "0xAADAa473C1bDF7317ec07c915680Af29DeBfdCb5",
"pauseGuardian": "0x5A1e5d7E09cA94506084a26304d53A138145bF52",
"borrowMin": "1e6",
"storeFrontPriceFactor": 0.6,
"targetReserves": "20_000_000e6",
"rates": {
"supplyKink": 0.9,
"supplySlopeLow": 0.054,
"supplySlopeHigh": 3.034,
"supplyBase": 0,
"borrowKink": 0.9,
"borrowSlopeLow": 0.05,
"borrowSlopeHigh": 3.4,
"borrowBase": 0.015
},
"tracking": {
"indexScale": "1e15",
"baseSupplySpeed": "46296296296e0",
"baseBorrowSpeed": "34722222222e0",
"baseMinForRewards": "1000e6"
},
"assets": {
"WETH": {
"address": "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
"priceFeed": "0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA",
"decimals": "18",
"borrowCF": 0.83,
"liquidateCF": 0.9,
"liquidationFactor": 0.95,
"supplyCap": "530e18"
},
"wstETH": {
"address": "0xB5beDd42000b71FddE22D3eE8a79Bd49A568fC8F",
"decimals": "18",
"borrowCF": 0.82,
"liquidateCF": 0.87,
"liquidationFactor": 0.95,
"supplyCap": "340e18"
},
"WBTC": {
"address": "0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4",
"priceFeed": "0x7A99092816C8BD5ec8ba229e3a6E6Da1E628E1F9",
"decimals": "8",
"borrowCF": 0.8,
"liquidateCF": 0.85,
"liquidationFactor": 0.9,
"supplyCap": "18e8"
}
}
}
141 changes: 141 additions & 0 deletions deployments/linea/usdc/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import {
Deployed,
DeploymentManager,
} from '../../../plugins/deployment_manager';
import { DeploySpec, deployComet } from '../../../src/deploy';

const HOUR = 60 * 60;
const DAY = 24 * HOUR;

const MAINNET_TIMELOCK = '0x6d903f6003cca6255d85cca4d3b5e5146dc33925';

const WSTETH_TO_STETH_PRICE_FEED = '0x3C8A95F2264bB3b52156c766b738357008d87cB7';
const ETH_TO_USD_PRICE_FEED = '0x3c6Cd9Cc7c7a4c2Cf5a82734CD249D7D593354dA';

const L2MESSAGE_SERVICE_ADDRESS = '0x508Ca82Df566dCD1B0DE8296e70a96332cD644ec';
const L2STANDARD_BRIDGE_ADDRESS = '0x353012dc4a9A6cF55c941bADC267f82004A8ceB9';
const L2USDC_BRIDGE_ADDRESS = '0xA2Ee6Fce4ACB62D95448729cDb781e3BEb62504A';

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();

// Pull in existing assets
const USDC = await deploymentManager.existing(
'USDC',
'0x176211869cA2b568f2A7D4EE941E073a821EE1ff',
'linea'
);
const WETH = await deploymentManager.existing(
'WETH',
'0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',
'linea'
);
const WBTC = await deploymentManager.existing(
'WBTC',
'0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4',
'linea'
);

const wstETH = await deploymentManager.existing(
'wstETH',
'0xB5beDd42000b71FddE22D3eE8a79Bd49A568fC8F',
'linea'
);

const wstETHtoUsdPriceFeed = await deploymentManager.deploy(
'wstETH:priceFeed',
'pricefeeds/MultiplicativePriceFeed.sol',
[
WSTETH_TO_STETH_PRICE_FEED, // wstETH / stETH price feed
ETH_TO_USD_PRICE_FEED, // ETH / USD price feed (we consider stETH / ETH as 1:1)
8, // decimals
'wstETH / USD price feed' // description
]
);


const l2MessageService = await deploymentManager.existing(
'l2MessageService',
L2MESSAGE_SERVICE_ADDRESS,
'linea'
);

const l2StandardBridge = await deploymentManager.existing(
'l2StandardBridge',
L2STANDARD_BRIDGE_ADDRESS,
'linea'
);

const l2USDCBridge = await deploymentManager.existing(
'l2USDCBridge',
L2USDC_BRIDGE_ADDRESS,
'linea'
);

// Deploy LineaBridgeReceiver
const bridgeReceiver = await deploymentManager.deploy(
'bridgeReceiver',
'bridges/linea/LineaBridgeReceiver.sol',
[l2MessageService.address]
);

// Deploy Local Timelock
const localTimelock = await deploymentManager.deploy(
'timelock',
'vendor/Timelock.sol',
[
bridgeReceiver.address, // admin
1 * DAY, // delay
14 * DAY, // grace period
12 * HOUR, // minimum delay
30 * DAY, // maxiumum delay
]
);

// Initialize OptimismBridgeReceiver
await deploymentManager.idempotent(
async () => !(await bridgeReceiver.initialized()),
async () => {
trace(`Initializing BridgeReceiver`);
await bridgeReceiver.initialize(
MAINNET_TIMELOCK, // govTimelock
localTimelock.address // localTimelock
);
trace(`BridgeReceiver initialized`);
}
);

// Deploy Comet
const deployed = await deployComet(deploymentManager, deploySpec, {}, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployComet should not have 2 last args. Why do we have them?

const { comet } = deployed;

// Deploy Bulker
const bulker = await deploymentManager.deploy(
'bulker',
'bulkers/BaseBulker.sol',
[
await comet.governor(), // admin
WETH.address, // weth
]
);

return {
...deployed,
bridgeReceiver,
l2MessageService,
l2StandardBridge,
l2USDCBridge,
bulker,
};
}
Loading
0