forked from ensdomains/offchain-resolver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
71 lines (68 loc) · 1.77 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
// const { task } = require('hardhat/config');
require('@nomiclabs/hardhat-etherscan');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-waffle');
require('hardhat-deploy');
require('hardhat-deploy-ethers');
real_accounts = undefined;
if (process.env.DEPLOYER_KEY && process.env.OWNER_KEY) {
real_accounts = [process.env.OWNER_KEY, process.env.DEPLOYER_KEY];
}
const gatewayurl =
'https://offchain-resolver-example.uc.r.appspot.com/{sender}/{data}.json';
let devgatewayurl = 'http://localhost:8080/{sender}/{data}.json';
if (process.env.REMOTE_GATEWAY) {
devgatewayurl =
`${process.env.REMOTE_GATEWAY}/{sender}/{data}.json`;
}
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: '0.8.10',
networks: {
hardhat: {
throwOnCallFailures: false,
gatewayurl: devgatewayurl,
},
ropsten: {
url: `https://ropsten.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 3,
accounts: real_accounts,
gatewayurl,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 4,
accounts: real_accounts,
gatewayurl,
},
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['test', 'demo'],
chainId: 5,
accounts: real_accounts,
gatewayurl,
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
tags: ['demo'],
chainId: 1,
accounts: real_accounts,
gatewayurl,
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
namedAccounts: {
signer: {
default: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
},
deployer: {
default: 1,
},
},
};