Skip to content
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

Base Sepolia Comet Deployments #834

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
03e470e
part way through sepolia base deployment dev
ajb413 Mar 18, 2024
320e6e6
config setup for base sepolia usdc
ajb413 Mar 19, 2024
ee96377
Merge branch 'main' into ajb413/base-sepolia-deploys
ajb413 Mar 19, 2024
dfb2a69
updates
ajb413 Mar 19, 2024
f47d243
set up usdc config migration
ajb413 Mar 19, 2024
2aaf56a
fix hh config
ajb413 Mar 19, 2024
37d4adc
Fix adam branch (#835)
kevincheng96 Mar 21, 2024
72336ec
update seacrest commit
ajb413 Mar 21, 2024
a6fd4c0
Modified deployment roots from GitHub Actions
Mar 21, 2024
63a6f25
interfaces for unverified sepolia bridge contracts
ajb413 Mar 22, 2024
b86366e
relations interfaces for bridge contracts
ajb413 Mar 22, 2024
3af8efb
still undefined l1 bridge contracts
ajb413 Mar 22, 2024
e409d2e
Small fix to migration task; fix relations for Base Sepolia USDC (#836)
kevincheng96 Mar 22, 2024
48e539d
remove ens part
ajb413 Mar 22, 2024
1f42fd7
appease linter
ajb413 Mar 22, 2024
0a87301
appease linter
ajb413 Mar 22, 2024
ca90ee4
Fix Base Sepolia hardhat config; dont write enacted if simulating (#837)
kevincheng96 Mar 25, 2024
ae42ead
fixes
ajb413 Mar 26, 2024
79ef7b1
fix gov network in migration actions env
ajb413 Mar 26, 2024
76a7de2
fix gov network in migration actions env
ajb413 Mar 26, 2024
2d0f500
Modified migration from GitHub Actions
Mar 26, 2024
6c31c3c
Sepolia-Base cWETHv3 Deployment
ajb413 Mar 27, 2024
7e171e1
remove mistaken roots
ajb413 Mar 27, 2024
2b1a868
updated config
ajb413 Mar 27, 2024
4a55e7f
fix cbeth address
ajb413 Mar 27, 2024
0a9cd05
rewards config
ajb413 Mar 27, 2024
cfe9f37
Modified deployment roots from GitHub Actions
Mar 27, 2024
f7c7352
redo for clean deploy
ajb413 Mar 27, 2024
2e0ae9d
wrote initialization migration for base sepolia cWETHv3
ajb413 Mar 27, 2024
7bf53e1
redo config for new deploy
ajb413 Mar 27, 2024
6252101
Modified deployment roots from GitHub Actions
Mar 27, 2024
8edb9c7
updates for migration to initialize cWETHv3
ajb413 Mar 28, 2024
07c8f68
final touches on initialization migration
ajb413 Mar 28, 2024
b0d7456
Modified migration from GitHub Actions
Mar 28, 2024
22f5838
Merge branch 'main' into ajb413/base-sepolia-deploys
ajb413 Mar 29, 2024
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 @@ -16,6 +16,7 @@ on:
- arbitrum-goerli
- base
- base-goerli
- base-sepolia
- linea-goerli
deployment:
description: Deployment Name (e.g. "usdc")
Expand All @@ -40,11 +41,11 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
uses: hayesgm/seacrest@1dc2d6e3750d5f5589173555220695a09b913071
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"base-sepolia\":\"https://clean-spring-wind.base-sepolia.discover.quiknode.pro/$QUICKNODE_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/enact-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- arbitrum-goerli
- base
- base-goerli
- base-sepolia
- linea-goerli
deployment:
description: Deployment Name (e.g. "usdc")
Expand Down Expand Up @@ -52,23 +53,23 @@ jobs:
case ${{ github.event.inputs.network }} in
polygon | arbitrum | base)
echo "GOV_NETWORK=mainnet" >> $GITHUB_ENV ;;
mumbai | arbitrum-goerli | base-goerli | linea-goerli)
mumbai | arbitrum-goerli | base-goerli | base-sepolia | linea-goerli)
echo "GOV_NETWORK=goerli" >> $GITHUB_ENV ;;
*)
echo "No governance network for selected network" ;;
esac

- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
uses: hayesgm/seacrest@1dc2d6e3750d5f5589173555220695a09b913071
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"base-sepolia\":\"https://clean-spring-wind.base-sepolia.discover.quiknode.pro/$QUICKNODE_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
port: 8585
if: github.event.inputs.eth_pk == ''

- name: Seacrest (governance network)
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
uses: hayesgm/seacrest@1dc2d6e3750d5f5589173555220695a09b913071
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ env.GOV_NETWORK }}"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/prepare-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- arbitrum-goerli
- base
- base-goerli
- base-sepolia
deployment:
description: Deployment Name (e.g. "usdc")
required: true
Expand All @@ -42,11 +43,11 @@ jobs:
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
steps:
- name: Seacrest
uses: hayesgm/seacrest@5748b3a066f517973ca2ca03d0af39bbf2b82d10
uses: hayesgm/seacrest@1dc2d6e3750d5f5589173555220695a09b913071
with:
wallet_connect_project_id: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
requested_network: "${{ inputs.network }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[inputs.network] }}"
ethereum_url: "${{ fromJSON('{\"fuji\":\"https://api.avax-test.network/ext/bc/C/rpc\",\"mainnet\":\"https://mainnet.infura.io/v3/$INFURA_KEY\",\"goerli\":\"https://goerli.infura.io/v3/$INFURA_KEY\",\"sepolia\":\"https://sepolia.infura.io/v3/$INFURA_KEY\",\"mumbai\":\"https://polygon-mumbai.infura.io/v3/$INFURA_KEY\",\"polygon\":\"https://polygon-mainnet.infura.io/v3/$INFURA_KEY\",\"arbitrum-goerli\":\"https://arbitrum-goerli.infura.io/v3/$INFURA_KEY\",\"arbitrum\":\"https://arbitrum-mainnet.infura.io/v3/$INFURA_KEY\",\"base\":\"https://clean-spring-wind.base-mainnet.discover.quiknode.pro/$QUICKNODE_KEY\",\"base-goerli\":\"https://base-goerli.infura.io/v3/$INFURA_KEY\",base-sepolia\":\"https://clean-spring-wind.base-sepolia.discover.quiknode.pro/$QUICKNODE_KEY\",\"linea-goerli\":\"https://linea-goerli.infura.io/v3/$INFURA_KEY\"}')[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, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, arbitrum-usdc.e, arbitrum-usdc, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-goerli, base-goerli-weth, linea-goerli]
bases: [ development, mainnet, mainnet-weth, goerli, goerli-weth, sepolia-usdc, sepolia-weth, fuji, mumbai, polygon, arbitrum-usdc.e, arbitrum-usdc, arbitrum-goerli-usdc, arbitrum-goerli-usdc.e, base-usdbc, base-weth, base-usdc, base-goerli, base-goerli-weth, base-sepolia, linea-goerli]
name: Run scenarios
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
Expand Down
74 changes: 74 additions & 0 deletions contracts/bridges/optimism/IL1CrossDomainMessenger.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;

interface IL1CrossDomainMessenger {
event FailedRelayedMessage(bytes32 indexed msgHash);
event Initialized(uint8 version);
event RelayedMessage(bytes32 indexed msgHash);
event SentMessage(
address target,
address sender,
bytes message,
uint256 messageNonce,
uint256 gasLimit
);
Fixed Show fixed Hide fixed
event SentMessageExtension1(address indexed sender, uint256 value);

function MESSAGE_VERSION() external view returns (uint16);

Check warning on line 17 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function MIN_GAS_CALLDATA_OVERHEAD() external view returns (uint64);

Check warning on line 19 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR()

Check warning on line 21 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase
external
view
returns (uint64);

function MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR()

Check warning on line 26 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase
external
view
returns (uint64);

function OTHER_MESSENGER() external view returns (address);

Check warning on line 31 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function PORTAL() external view returns (address);

Check warning on line 33 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function RELAY_CALL_OVERHEAD() external view returns (uint64);

Check warning on line 35 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function RELAY_CONSTANT_OVERHEAD() external view returns (uint64);

Check warning on line 37 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function RELAY_GAS_CHECK_BUFFER() external view returns (uint64);

Check warning on line 39 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function RELAY_RESERVED_GAS() external view returns (uint64);

Check warning on line 41 in contracts/bridges/optimism/IL1CrossDomainMessenger.sol

View workflow job for this annotation

GitHub Actions / Contract linter

Function name must be in mixedCase

function baseGas(bytes memory _message, uint32 _minGasLimit)
external
pure
returns (uint64);

function failedMessages(bytes32) external view returns (bool);

function initialize() external;

function messageNonce() external view returns (uint256);

function relayMessage(
uint256 _nonce,
address _sender,
address _target,
uint256 _value,
uint256 _minGasLimit,
bytes memory _message
) external payable;

function sendMessage(
address _target,
bytes memory _message,
uint32 _minGasLimit
) external payable;

function successfulMessages(bytes32) external view returns (bool);

function version() external view returns (string memory);

function xDomainMessageSender() external view returns (address);
}
161 changes: 161 additions & 0 deletions contracts/bridges/optimism/IL1StandardBridge.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.15;

interface IL1StandardBridge {
event ERC20BridgeFinalized(
address localToken,
address remoteToken,
address from,
address to,
uint256 amount,
bytes extraData
);
Fixed Show fixed Hide fixed
event ERC20BridgeInitiated(
address localToken,
address remoteToken,
address from,
address to,
uint256 amount,
bytes extraData
);
Fixed Show fixed Hide fixed
event ERC20DepositInitiated(
address l1Token,
address l2Token,
address from,
address to,
uint256 amount,
bytes extraData
);
Fixed Show fixed Hide fixed
event ERC20WithdrawalFinalized(
address l1Token,
address l2Token,
address from,
address to,
uint256 amount,
bytes extraData
);
Fixed Show fixed Hide fixed
event ETHBridgeFinalized(
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);
event ETHBridgeInitiated(
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);
event ETHDepositInitiated(
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);
event ETHWithdrawalFinalized(
address indexed from,
address indexed to,
uint256 amount,
bytes extraData
);

function MESSENGER() external view returns (address);

function OTHER_BRIDGE() external view returns (address);

function bridgeERC20(
address _localToken,
address _remoteToken,
uint256 _amount,
uint32 _minGasLimit,
bytes memory _extraData
) external;

function bridgeERC20To(
address _localToken,
address _remoteToken,
address _to,
uint256 _amount,
uint32 _minGasLimit,
bytes memory _extraData
) external;

function bridgeETH(uint32 _minGasLimit, bytes memory _extraData)
external
payable;

function bridgeETHTo(
address _to,
uint32 _minGasLimit,
bytes memory _extraData
) external payable;

function depositERC20(
address _l1Token,
address _l2Token,
uint256 _amount,
uint32 _minGasLimit,
bytes memory _extraData
) external;

function depositERC20To(
address _l1Token,
address _l2Token,
address _to,
uint256 _amount,
uint32 _minGasLimit,
bytes memory _extraData
) external;

function depositETH(uint32 _minGasLimit, bytes memory _extraData)
external
payable;

function depositETHTo(
address _to,
uint32 _minGasLimit,
bytes memory _extraData
) external payable;

function deposits(address, address) external view returns (uint256);

function finalizeBridgeERC20(
address _localToken,
address _remoteToken,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) external;

function finalizeBridgeETH(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) external payable;

function finalizeERC20Withdrawal(
address _l1Token,
address _l2Token,
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) external;

function finalizeETHWithdrawal(
address _from,
address _to,
uint256 _amount,
bytes memory _extraData
) external payable;

function l2TokenBridge() external view returns (address);

function messenger() external view returns (address);

function version() external view returns (string memory);

receive() external payable;
}
48 changes: 48 additions & 0 deletions deployments/base-sepolia/usdc/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "Compound USDC",
"symbol": "cUSDCv3",
"baseToken": "USDC",
"baseTokenAddress": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"baseTokenPriceFeed": "",
"pauseGuardian": "0x6106DA3AcFdEB341808f4DC3D2483eC67c98E728",
"borrowMin": "1e0",
"storeFrontPriceFactor": 0.5,
"targetReserves": "5000000e6",
"rates": {
"supplyKink": 0.85,
"supplySlopeLow": 0.048,
"supplySlopeHigh": 1.6,
"supplyBase": 0,
"borrowKink": 0.85,
"borrowSlopeLow": 0.053,
"borrowSlopeHigh": 1.7,
"borrowBase": 0.015
},
"tracking": {
"indexScale": "1e15",
"baseSupplySpeed": "0.000011574074074074073e15",
"baseBorrowSpeed": "0.0011458333333333333e15",
"baseMinForRewards": "100e6"
},
"rewardToken": "COMP",
"assets": {
"cbETH": {
"address": "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2",
"priceFeed": "",
"decimals": "18",
"borrowCF": 0.75,
"liquidateCF": 0.8,
"liquidationFactor": 0.93,
"supplyCap": "800e18"
},
"WETH": {
"address": "0x4200000000000000000000000000000000000006",
"priceFeed": "",
"decimals": "18",
"borrowCF": 0.775,
"liquidateCF": 0.825,
"liquidationFactor": 0.95,
"supplyCap": "1000e18"
}
}
}
Loading
Loading