instances/hardhat.config.js

105 lines
3.0 KiB
JavaScript
Raw Normal View History

2023-04-08 21:43:42 +03:00
require('dotenv').config()
require('@nomiclabs/hardhat-waffle')
require('@nomiclabs/hardhat-etherscan')
require('hardhat-log-remover')
require('solidity-coverage')
require('hardhat-contract-sizer')
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: '0.6.2',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: '0.7.6',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
networks: {
hardhat: {
forking: {
url: process.env.MAINNET_RPC_URL,
2023-04-14 22:16:26 +03:00
//blockNumber: 14250000,
httpHeaders: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0' },
2023-04-08 21:43:42 +03:00
},
chainId: 1,
2023-04-14 22:16:26 +03:00
//initialBaseFeePerGas: 5,
2023-04-08 21:43:42 +03:00
loggingEnabled: false,
allowUnlimitedContractSize: false,
2023-04-14 22:16:26 +03:00
//blockGasLimit: 50000000,
2023-04-08 21:43:42 +03:00
},
rinkeby: {
url: process.env.RINKEBY_RPC_URL,
2023-04-08 21:43:42 +03:00
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: { mnemonic: 'test test test test test junk' },
httpHeaders: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0' },
2023-04-08 21:43:42 +03:00
},
goerli: {
url: process.env.GOERLI_RPC_URL,
2023-04-08 21:43:42 +03:00
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: { mnemonic: 'test test test test test junk' },
httpHeaders: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0' },
},
sepolia: {
url: process.env.SEPOLIA_RPC_URL,
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: { mnemonic: 'test test test test test junk' },
httpHeaders: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0' },
2023-04-08 21:43:42 +03:00
},
mainnet: {
url: process.env.MAINNET_RPC_URL,
2023-04-08 21:43:42 +03:00
accounts: process.env.PRIVATE_KEY
? [process.env.PRIVATE_KEY]
: { mnemonic: 'test test test test test junk' },
httpHeaders: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/102.0' },
2023-04-08 21:43:42 +03:00
},
// What the fuck is this
// ...(typeof process.env.FORKNET_RPC_URL === 'string' && {
// forknet: {
// url: process.env.FORKNET_RPC_URL,
// accounts: process.env.PRIVATE_KEY
// ? [process.env.PRIVATE_KEY]
// : { mnemonic: 'test test test test test junk' },
// },
// }),
},
mocha: {
timeout: 9999999999 /* The following simply does not work: ignore: ["factory.with.registry.test.js", "sidechain.instance.factory.test.js"] */,
2023-04-08 21:43:42 +03:00
},
spdxLicenseIdentifier: {
overwrite: true,
runOnCompile: true,
},
etherscan: {
apiKey: `${process.env.ETHERSCAN_KEY}`,
},
}