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

Deployment to Optimism Sepolia #19

Merged
merged 10 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/verify-bytecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup node.js version
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18

- name: Cache node_modules
id: cache-node-modules
Expand Down
2 changes: 2 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ INFURA_KEY=""

# Optional Etherscan key, for automatize the verification of the contracts at Etherscan
ETHERSCAN_KEY=""
OPTIMISTIC_ETHERSCAN_KEY=""
ARBISCAN_KEY=""

# Optional, if you plan to use Tenderly scripts
TENDERLY_USERNAME=""
Expand Down
35 changes: 24 additions & 11 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,26 @@ const hardhatConfig: HardhatUserConfig = {
apiKey: {
optimisticEthereum: OPTIMISTIC_ETHERSCAN_KEY,
arbitrumOne: ARBISCAN_KEY,
"optimism-testnet": OPTIMISTIC_ETHERSCAN_KEY,
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
},
customChains: [
{
network: 'sepolia',
chainId: 11155111,
urls: {
apiURL: 'https://api-sepolia.etherscan.io/api',
browserURL: 'https://sepolia.etherscan.io',
},
},
{
network: 'optimism-testnet',
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimism.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io',
},
},
],
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
},
tenderly: {
project: TENDERLY_PROJECT,
Expand All @@ -122,16 +141,10 @@ const hardhatConfig: HardhatUserConfig = {
timeout: 100000,
},
networks: {
kovan: {
...getCommonNetworkConfig(eEthereumNetwork.kovan, 42),
sepolia: {
...getCommonNetworkConfig(eEthereumNetwork.sepolia, 11155111),
companionNetworks: {
optimism: eOptimismNetwork.testnet,
},
},
ropsten: getCommonNetworkConfig(eEthereumNetwork.ropsten, 3),
rinkeby: {
...getCommonNetworkConfig(eEthereumNetwork.rinkeby, 4),
companionNetworks: {
arbitrum: eArbitrumNetwork.arbitrumTestnet,
},
},
Expand All @@ -151,14 +164,14 @@ const hardhatConfig: HardhatUserConfig = {
[eArbitrumNetwork.arbitrumTestnet]: {
...getCommonNetworkConfig(eArbitrumNetwork.arbitrumTestnet, 421611),
companionNetworks: {
l1: 'rinkeby',
l1: 'sepolia',
},
},
[eOptimismNetwork.main]: getCommonNetworkConfig(eOptimismNetwork.main, 10),
[eOptimismNetwork.testnet]: {
...getCommonNetworkConfig(eOptimismNetwork.testnet, 69),
...getCommonNetworkConfig(eOptimismNetwork.testnet, 11155420),
companionNetworks: {
l1: 'kovan',
l1: 'sepolia',
},
},
hardhat: {
Expand Down
16 changes: 5 additions & 11 deletions helper-hardhat-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ const ALCHEMY_KEY = process.env.ALCHEMY_KEY || '';
const TENDERLY_FORK = process.env.TENDERLY_FORK || '';

export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
[eEthereumNetwork.kovan]: ALCHEMY_KEY
? `https://eth-kovan.alchemyapi.io/v2/${ALCHEMY_KEY}`
: `https://kovan.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.ropsten]: ALCHEMY_KEY
? `https://eth-ropsten.alchemyapi.io/v2/${ALCHEMY_KEY}`
: `https://ropsten.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.rinkeby]: ALCHEMY_KEY
? `https://eth-rinkeby.alchemyapi.io/v2/${ALCHEMY_KEY}`
: `https://rinkeby.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.sepolia]: ALCHEMY_KEY
? `https://eth-sepolia.alchemyapi.io/v2/${ALCHEMY_KEY}`
: `https://sepolia.infura.io/v3/${INFURA_KEY}`,
[eEthereumNetwork.goerli]: ALCHEMY_KEY
? `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_KEY}`
: `https://goerli.infura.io/v3/${INFURA_KEY}`,
Expand All @@ -34,7 +28,7 @@ export const NETWORKS_RPC_URL: iParamsPerNetwork<string> = {
[ePolygonNetwork.matic]: 'https://rpc-mainnet.matic.network',
[eXDaiNetwork.xdai]: 'https://rpc.xdaichain.com/',
[eArbitrumNetwork.arbitrum]: `https://arb1.arbitrum.io/rpc`,
[eArbitrumNetwork.arbitrumTestnet]: `https://rinkeby.arbitrum.io/rpc`,
[eArbitrumNetwork.arbitrumTestnet]: `https://sepolia-rollup.arbitrum.io/rpc`,
[eOptimismNetwork.main]: `https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}`,
[eOptimismNetwork.testnet]: `https://opt-kovan.g.alchemy.com/v2/${ALCHEMY_KEY}`,
[eOptimismNetwork.testnet]: "https://sepolia.optimism.io",
};
3 changes: 1 addition & 2 deletions helpers/etherscan-verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ const unableVerifyError = 'Fail - Unable to verify';

export const SUPPORTED_ETHERSCAN_NETWORKS = [
'main',
'ropsten',
'kovan',
'sepolia',
'goerli',
'matic',
'mumbai',
Expand Down
18 changes: 13 additions & 5 deletions helpers/gov-constants.ts
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
export const ADDRESSES = {
INBOX_MAIN: '0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f',
INBOX_RINKEBY: '0x578BAde599406A8fE3d24Fd7f7211c0911F5B29e',
OVM_L1_MESSENGER_KOVAN: '0x4361d0F75A0186C05f971c566dC6bEa5957483fD',
OVM_L1_MESSENGER_MAIN: '0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1',
OVM_L2_MESSENGER: '0x4200000000000000000000000000000000000007',
// The deployment process includes testing the deployed governance bridge via calling the
// 'updateEthereumGovernanceExecutor' method. As the initial value for EthereumGovExecutor
// is used test instance of Aragon Agent on mainnet. It will be replaced with the official
// Lido Aragon Agent before usage.

// Common
ETHEREUM_GOV_EXECUTOR: '0x184d39300f2fa4419d04998e9c58cb5de586d879',
kovalgek marked this conversation as resolved.
Show resolved Hide resolved

// Optimism
// https://docs.optimism.io/chain/addresses
OVM_L1_MESSENGER_SEPOLIA: '0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef',
OVM_GUARDIAN: '0x0000000000000000000000000000000000000000',
OVM_L2_MESSENGER: '0x4200000000000000000000000000000000000007',

OVM_L1_MESSENGER_MAIN: '0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1',
kovalgek marked this conversation as resolved.
Show resolved Hide resolved

// Arbitrum
ARB_GUARDIAN: '0x0000000000000000000000000000000000000000',
RETRYABLE_TICKET_TX_ADDRESS: '0x000000000000000000000000000000000000006E',
INBOX_MAIN: '0x4Dbd4fc535Ac27206064B68FfCf827b0A60BAB3f',
INBOX_RINKEBY: '0x578BAde599406A8fE3d24Fd7f7211c0911F5B29e',
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
kovalgek marked this conversation as resolved.
Show resolved Hide resolved
};

export const CONSTANTS = {
Expand Down
12 changes: 3 additions & 9 deletions helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ export type eNetwork =
| eOptimismNetwork;

export enum eEthereumNetwork {
kovan = 'kovan',
ropsten = 'ropsten',
rinkeby = 'rinkeby',
goerli = 'goerli',
main = 'main',
coverage = 'coverage',
hardhat = 'hardhat',
tenderlyMain = 'tenderlyMain',
sepolia = 'sepolia',
}

export enum ePolygonNetwork {
Expand All @@ -40,14 +38,12 @@ export enum eOptimismNetwork {
}

export enum EthereumNetworkNames {
kovan = 'kovan',
ropsten = 'ropsten',
rinkeby = 'rinkeby',
goerli = 'goerli',
main = 'main',
matic = 'matic',
mumbai = 'mumbai',
xdai = 'xdai',
sepolia = 'sepolia',
}

export type tEthereumAddress = string;
Expand All @@ -66,9 +62,7 @@ export interface iParamsPerNetworkAll<T>

export interface iEthereumParamsPerNetwork<eNetwork> {
[eEthereumNetwork.coverage]: eNetwork;
[eEthereumNetwork.kovan]: eNetwork;
[eEthereumNetwork.ropsten]: eNetwork;
[eEthereumNetwork.rinkeby]: eNetwork;
[eEthereumNetwork.sepolia]: eNetwork;
[eEthereumNetwork.goerli]: eNetwork;
[eEthereumNetwork.main]: eNetwork;
[eEthereumNetwork.hardhat]: eNetwork;
Expand Down
Loading
Loading