Skip to content

Commit

Permalink
update configs
Browse files Browse the repository at this point in the history
  • Loading branch information
invocamanman committed Jun 30, 2023
1 parent 8a3cc69 commit dd2d061
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 151 deletions.
301 changes: 151 additions & 150 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,158 +17,159 @@ const DEFAULT_MNEMONIC = 'test test test test test test test test test test test
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
dependencyCompiler: {
paths: [
'@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol',
'@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol',
'@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol'
]//,
//keep: true
},
solidity: {
compilers: [
{
version: "0.8.17",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
},
{
version: "0.6.11",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
},
{
version: "0.5.12",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
},
{
version: "0.5.16",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
}
]
},
networks: {
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
dependencyCompiler: {
paths: [
'@openzeppelin/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol',
'@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol',
'@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol',
], // ,
// keep: true
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
solidity: {
compilers: [
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
{
version: '0.6.11',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
{
version: '0.5.12',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
{
version: '0.5.16',
settings: {
optimizer: {
enabled: true,
runs: 999999,
},
},
},
],
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
networks: {
mainnet: {
url: process.env.MAINNET_PROVIDER ? process.env.MAINNET_PROVIDER : `https://mainnet.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
ropsten: {
url: process.env.ROPSTEN_PROVIDER ? process.env.ROPSTEN_PROVIDER : `https://ropsten.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
goerli: {
url: process.env.GOERLI_PROVIDER ? process.env.GOERLI_PROVIDER : `https://goerli.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
rinkeby: {
url: process.env.RINKEBY_PROVIDER ? process.env.RINKEBY_PROVIDER : `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
localhost: {
url: 'http://127.0.0.1:8545',
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
hardhat: {
initialDate: '0',
allowUnlimitedContractSize: true,
initialBaseFeePerGas: '0',
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
polygonZKEVMTestnet: {
url: 'https://rpc.public.zkevm-test.net',
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
polygonZKEVMMainnet: {
url: 'https://zkevm-rpc.com',
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_PROJECT_ID}`,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
gasReporter: {
enabled: !!process.env.REPORT_GAS,
outputFile: process.env.REPORT_GAS_FILE ? './gas_report.md' : null,
noColors: !!process.env.REPORT_GAS_FILE,
},
localhost: {
url: 'http://127.0.0.1:8545',
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
etherscan: {
apiKey: {
polygonZKEVMTestnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
polygonZKEVMMainnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
goerli: `${process.env.ETHERSCAN_API_KEY}`,
mainnet: `${process.env.ETHERSCAN_API_KEY}`,
},
customChains: [
{
network: 'polygonZKEVMMainnet',
chainId: 1101,
urls: {
apiURL: 'https://api-zkevm.polygonscan.com/api',
browserURL: 'https://zkevm.polygonscan.com/',
},
},
{
network: 'polygonZKEVMTestnet',
chainId: 1442,
urls: {
apiURL: 'https://api-testnet-zkevm.polygonscan.com/api',
browserURL: 'https://testnet-zkevm.polygonscan.com/',
},
},
],
},
hardhat: {
initialDate: '0',
allowUnlimitedContractSize: true,
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
polygonZKEVMTestnet: {
url: "https://rpc.public.zkevm-test.net",
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
polygonZKEVMMainnet: {
url: "https://zkevm-rpc.com",
accounts: {
mnemonic: process.env.MNEMONIC || DEFAULT_MNEMONIC,
path: "m/44'/60'/0'/0",
initialIndex: 0,
count: 20,
},
},
},
gasReporter: {
enabled: !!process.env.REPORT_GAS,
outputFile: process.env.REPORT_GAS_FILE ? "./gas_report.md" : null,
noColors: process.env.REPORT_GAS_FILE ? true : false
},
etherscan: {
apiKey: {
polygonZKEVMTestnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
polygonZKEVMMainnet: `${process.env.ETHERSCAN_ZKEVM_API_KEY}`,
goerli: `${process.env.ETHERSCAN_API_KEY}`,
mainnet: `${process.env.ETHERSCAN_API_KEY}`
},
customChains: [
{
network: "polygonZKEVMMainnet",
chainId: 1101,
urls: {
apiURL: "https://api-zkevm.polygonscan.com/api",
browserURL: "https://zkevm.polygonscan.com/"
}
},
{
network: "polygonZKEVMTestnet",
chainId: 1442,
urls: {
apiURL: "https://api-testnet-zkevm.polygonscan.com/api",
browserURL: "https://testnet-zkevm.polygonscan.com/"
}
}
]
},
};
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@
"update:genesis": "node deployment/1_createGenesis.js && node deployment/1_createGenesis.js --test --input ../docker/scripts/deploy_parameters_docker.json --out ../docker/scripts/genesis_docker.json",
"coverage": "npx hardhat coverage",
"gas:report": "REPORT_GAS=true npx hardhat test",
"gas:report:file": "rm -f .openzeppelin/unknown-31337.json && REPORT_GAS=true REPORT_GAS_FILE=true npx hardhat test"
"gas:report:file": "rm -f .openzeppelin/unknown-31337.json && REPORT_GAS=true REPORT_GAS_FILE=true npx hardhat test",
"deploy:testnet:ZkEVM:test:goerli": "npm run prepare:testnet:ZkEVM:goerli && npm run deploy:ZkEVM:test:goerli",
"deploy:ZkEVM:test:goerli": "node deployment/1_createGenesis.js --test && npx hardhat run deployment/3_deployContracts.js --network goerli && npm run saveDeployment:goerli"
}
}

0 comments on commit dd2d061

Please sign in to comment.