2021-10-19 11:16:38 +02:00
|
|
|
/* eslint-disable indent, no-undef */
|
2021-08-21 14:23:17 +02:00
|
|
|
require('@typechain/hardhat')
|
|
|
|
require('@nomiclabs/hardhat-ethers')
|
2021-06-03 20:56:46 +02:00
|
|
|
require('@nomiclabs/hardhat-waffle')
|
2021-12-11 11:40:27 +01:00
|
|
|
require('@nomiclabs/hardhat-etherscan')
|
2021-06-03 20:56:46 +02:00
|
|
|
require('dotenv').config()
|
|
|
|
|
2021-10-19 11:16:38 +02:00
|
|
|
task('hasher', 'Compile Poseidon hasher', () => {
|
|
|
|
require('./scripts/compileHasher')
|
|
|
|
})
|
|
|
|
|
2021-06-03 20:56:46 +02:00
|
|
|
const config = {
|
|
|
|
solidity: {
|
2021-09-29 21:39:30 +02:00
|
|
|
compilers: [
|
|
|
|
{
|
|
|
|
version: '0.4.24',
|
|
|
|
settings: {
|
|
|
|
optimizer: {
|
|
|
|
enabled: true,
|
|
|
|
runs: 200,
|
|
|
|
},
|
|
|
|
},
|
2021-06-03 20:56:46 +02:00
|
|
|
},
|
2022-02-11 21:53:36 +01:00
|
|
|
{
|
|
|
|
version: '0.6.2',
|
|
|
|
settings: {
|
|
|
|
optimizer: {
|
|
|
|
enabled: true,
|
|
|
|
runs: 200,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-10-06 16:51:46 +02:00
|
|
|
{
|
|
|
|
version: '0.7.5',
|
|
|
|
settings: {
|
|
|
|
optimizer: {
|
|
|
|
enabled: true,
|
|
|
|
runs: 200,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-09-29 21:39:30 +02:00
|
|
|
{
|
|
|
|
version: '0.7.6',
|
|
|
|
settings: {
|
|
|
|
optimizer: {
|
|
|
|
enabled: true,
|
|
|
|
runs: 200,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2021-07-06 23:11:30 +02:00
|
|
|
},
|
2021-06-03 20:56:46 +02:00
|
|
|
networks: {
|
2022-02-11 21:53:36 +01:00
|
|
|
hardhat: {
|
|
|
|
forking: {
|
|
|
|
url: `https://eth-mainnet.alchemyapi.io/v2/${process.env.ALCHEMY_KEY}`,
|
|
|
|
blockNumber: 13685625,
|
|
|
|
},
|
|
|
|
chainId: 1,
|
|
|
|
initialBaseFeePerGas: 5,
|
|
|
|
loggingEnabled: false,
|
|
|
|
allowUnlimitedContractSize: false,
|
|
|
|
blockGasLimit: 50000000,
|
|
|
|
},
|
|
|
|
rinkeby: {
|
|
|
|
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_API_KEY}`,
|
|
|
|
accounts: [process.env.PRIVATE_KEY],
|
|
|
|
},
|
2021-09-30 20:32:49 +02:00
|
|
|
xdai: {
|
2021-09-30 20:43:56 +02:00
|
|
|
url: process.env.ETH_RPC || 'https://rpc.xdaichain.com/',
|
2021-09-30 20:32:49 +02:00
|
|
|
accounts: process.env.PRIVATE_KEY
|
|
|
|
? [process.env.PRIVATE_KEY]
|
|
|
|
: {
|
|
|
|
mnemonic: 'test test test test test test test test test test test junk',
|
|
|
|
},
|
2021-10-04 13:18:55 +02:00
|
|
|
gasPrice: 25000000000,
|
2021-09-30 20:32:49 +02:00
|
|
|
},
|
2021-10-04 12:22:13 +02:00
|
|
|
bsc: {
|
|
|
|
url: process.env.ETH_RPC || 'https://bsc-dataseed.binance.org/',
|
|
|
|
accounts: process.env.PRIVATE_KEY
|
|
|
|
? [process.env.PRIVATE_KEY]
|
|
|
|
: {
|
|
|
|
mnemonic: 'test test test test test test test test test test test junk',
|
|
|
|
},
|
|
|
|
},
|
2021-10-18 10:39:19 +02:00
|
|
|
mainnet: {
|
|
|
|
url: process.env.ETH_RPC || '',
|
|
|
|
accounts: process.env.PRIVATE_KEY
|
|
|
|
? [process.env.PRIVATE_KEY]
|
|
|
|
: {
|
|
|
|
mnemonic: 'test test test test test test test test test test test junk',
|
|
|
|
},
|
|
|
|
},
|
2021-06-03 20:56:46 +02:00
|
|
|
},
|
2021-12-11 11:40:27 +01:00
|
|
|
etherscan: {
|
|
|
|
apiKey: process.env.ETHERSCAN_KEY,
|
|
|
|
},
|
2021-06-03 20:56:46 +02:00
|
|
|
mocha: {
|
|
|
|
timeout: 600000000,
|
|
|
|
},
|
2021-08-21 14:23:17 +02:00
|
|
|
typechain: {
|
|
|
|
outDir: 'src/types',
|
|
|
|
},
|
2021-06-03 20:56:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = config
|