Skip to content

Commit

Permalink
add op network
Browse files Browse the repository at this point in the history
  • Loading branch information
killroy192 committed Mar 20, 2024
1 parent 1331ba9 commit c788c3d
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 9 deletions.
17 changes: 14 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ PRIVATE_KEY=

## Arbitrum
### key
ABISCAN_API_KEY=
### arbitrum-sepolia rpc
ARBISCAN_API_KEY=
### arbitrumSepolia rpc
ARBITRUM_SEPOLIA_RPC=

## Localhost
## BASE
### key
BASE_API_KEY=
### baseSepolia rpc
BASE_SEPOLIA_RPC=

## Optimism
### key
OP_API_KEY=
### baseSepolia rpc
OP_SEPOLIA_RPC=

### rpc
RPC_URL=http://localhost:8545
14 changes: 13 additions & 1 deletion deployment.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,19 @@ module.exports = {
config: config,
},
localhost: { lockFile: "./local.deployment-lock.json", config: config },
"arbitrum-sepolia": {
arbitrumSepolia: {
lockFile: "./deployment-lock.json",
verify: true,
plugins: [VerifyPlugin],
config: config,
},
baseSepolia: {
lockFile: "./deployment-lock.json",
verify: true,
plugins: [VerifyPlugin],
config: config,
},
opSepolia: {
lockFile: "./deployment-lock.json",
verify: true,
plugins: [VerifyPlugin],
Expand Down
38 changes: 33 additions & 5 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,53 @@ module.exports = {
localhost: {
deployment: deployments.localhost,
},
"arbitrum-sepolia": {
url: config?.RPC_URL || DEFAULT_RPC,
arbitrumSepolia: {
url: config?.ARBITRUM_SEPOLIA_RPC || DEFAULT_RPC,
accounts: deployerAccounts,
deployment: deployments["arbitrum-sepolia"],
deployment: deployments.arbitrumSepolia,
},
baseSepolia: {
url: config?.parsed?.BASE_SEPOLIA_RPC || DEFAULT_RPC,
accounts: deployerAccounts,
deployment: deployments.baseSepolia,
},
opSepolia: {
url: config?.parsed?.OP_SEPOLIA_RPC || DEFAULT_RPC,
accounts: deployerAccounts,
deployment: deployments.opSepolia,
},
},
etherscan: {
apiKey: {
"arbitrum-sepolia": config?.parsed?.ABISCAN_API_KEY,
baseSepolia: config?.parsed?.BASE_API_KEY,
arbitrumSepolia: config?.parsed?.ARBISCAN_API_KEY,
opSepolia: config?.parsed?.OP_API_KEY,
},
customChains: [
{
network: "arbitrum-sepolia",
network: "arbitrumSepolia",
chainId: 421614,
urls: {
apiURL: "https://api-sepolia.arbiscan.io/api",
browserURL: "https://sepolia-explorer.arbitrum.io",
},
},
{
network: "baseSepolia",
chainId: 84532,
urls: {
apiURL: "https://api-sepolia.basescan.org/api",
browserURL: "https://sepolia.basescan.org/",
},
},
{
network: "opSepolia",
chainId: 11155420,
urls: {
apiURL: "​https://api-sepolia-optimistic.etherscan.io/api​",
browserURL: "https://sepolia-optimistic.etherscan.io",
},
},
],
},
};

0 comments on commit c788c3d

Please sign in to comment.