-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathhardhat.config.js
71 lines (67 loc) · 1.79 KB
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
require("@nomiclabs/hardhat-waffle");
require('@ensdomains/ens');
require('@ensdomains/resolver');
require("@nomiclabs/hardhat-etherscan");
const dotenv = require("dotenv")
dotenv.config()
const CONTRACTS = {
'ropsten': '0x5bBFe410e18DCcaebbf5fD7A00844d4255615258',
'rinkeby': '0x196eC7109e127A353B709a20da25052617295F6f',
'goerli': '0x333Fc8f550043f239a2CF79aEd5e9cF4A20Eb41e',
'mainnet': '0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C'
}
const {
MNEMONIC = '',
INFURA_ID = '',
ETHERSCANKEY = ''
} = process.env
task("names", "query reverse records")
.addParam("addresses", "List of accounts, comma delimited")
.setAction(async (taskArgs, hre) => {
const addresses = taskArgs.addresses.split(',')
const reverseRecords = await hre.ethers.getContractAt('ReverseRecords', CONTRACTS[hre.network.name])
console.log(await reverseRecords.getNames(addresses))
});
module.exports = {
networks: {
localhost: {
url: "http://127.0.0.1:8545"
},
hardhat: {
},
ropsten: {
url: `https://ropsten.infura.io/v3/${INFURA_ID}`,
chainId: 3,
gasPrice: 20000000000, // 20 gwei
accounts: {mnemonic: MNEMONIC}
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${INFURA_ID}`,
chainId: 4,
gasPrice: 20000000000, // 20 gwei
accounts: {mnemonic: MNEMONIC}
},
goerli: {
url: `https://goerli.infura.io/v3/${INFURA_ID}`,
chainId: 5,
gasPrice: 20000000000, // 20 gwei
accounts: {mnemonic: MNEMONIC}
},
mainnet: {
url: `https://mainnet.infura.io/v3/${INFURA_ID}`,
chainId: 1,
gasPrice: 120000000000, // 120 gwei
accounts: {mnemonic: MNEMONIC}
}
},
etherscan: {
apiKey: ETHERSCANKEY
},
solidity: {
compilers: [
{
version: "0.7.4"
}
]
}
}