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: {
|
2023-04-13 23:03:12 +03:00
|
|
|
url: process.env.MAINNET_RPC_URL,
|
2023-04-14 22:16:26 +03:00
|
|
|
//blockNumber: 14250000,
|
2023-04-13 23:03:12 +03:00
|
|
|
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: {
|
2023-04-13 23:03:12 +03:00
|
|
|
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' },
|
2023-04-13 23:03:12 +03:00
|
|
|
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: {
|
2023-04-13 23:03:12 +03:00
|
|
|
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' },
|
2023-04-13 23:03:12 +03:00
|
|
|
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: {
|
2023-04-13 23:03:12 +03:00
|
|
|
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' },
|
2023-04-13 23:03:12 +03:00
|
|
|
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
|
|
|
},
|
2023-04-13 23:03:12 +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}`,
|
|
|
|
},
|
|
|
|
}
|