Skip to content

Commit

Permalink
Add zkSync Era support
Browse files Browse the repository at this point in the history
  • Loading branch information
TomiOhl committed Feb 6, 2024
1 parent 4d71e55 commit e63d411
Show file tree
Hide file tree
Showing 13 changed files with 1,309 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules
artifacts
cache
artifacts*
cache*
coverage
*.js
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ coverage.json
typechain

#Hardhat files
cache
artifacts
cache*
artifacts*
7 changes: 4 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
node_modules
artifacts
cache
artifacts*
cache*
coverage*
gasReporterOutput.json
docs/contracts
docs/templates
.openzeppelin
.openzeppelin
.upgradable
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Networks can be configured in _[hardhat.config.ts](hardhat.config.ts)_. We've pr
- `arbitrum` (Arbitrum One (Mainnet))
- `base` (Base Mainnet)
- `optimism` (Optimism Mainnet)
- `zksync` (zkSync Era Mainnet)
- `cronos` (Cronos Mainnet)
- `mantle` (Mantle Network Mainnet)
- `ontology` (Ontology EVM Mainnet)
Expand Down
53 changes: 39 additions & 14 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import "@matterlabs/hardhat-zksync-deploy";
import "@matterlabs/hardhat-zksync-solc";
import "@matterlabs/hardhat-zksync-upgradable";
import "@matterlabs/hardhat-zksync-verify";
import "@nomicfoundation/hardhat-chai-matchers";
import "@nomicfoundation/hardhat-ethers";
import "@nomicfoundation/hardhat-verify";
Expand All @@ -21,59 +25,80 @@ const config: HardhatUserConfig = {
hardhat: {},
ethereum: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
sepolia: {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_ID}`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
bsc: {
url: `https://bsc-dataseed1.binance.org`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
bsctest: {
url: `https://data-seed-prebsc-1-s1.binance.org:8545`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
polygon: {
url: `https://polygon-rpc.com`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
mumbai: {
url: `https://polygon-testnet.public.blastapi.io`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
gnosis: {
url: `https://rpc.gnosischain.com`,
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
arbitrum: {
url: "https://arbitrum.blockpi.network/v1/rpc/public",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
base: {
url: "https://base-mainnet.public.blastapi.io",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
optimism: {
url: "https://optimism-mainnet.public.blastapi.io",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
zksync: {
url: "https://mainnet.era.zksync.io",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
ethNetwork: "ethereum",
verifyURL: "https://zksync2-mainnet-explorer.zksync.io/contract_verification",
zksync: true
},
cronos: {
url: "https://cronos-evm.publicnode.com",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
mantle: {
url: "https://rpc.mantle.xyz",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
},
ontology: {
url: "https://dappnode2.ont.io:10339",
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : []
accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
zksync: false
}
},
gasReporter: {
Expand Down
Loading

0 comments on commit e63d411

Please sign in to comment.