-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.ts
63 lines (57 loc) · 1.71 KB
/
hardhat.config.ts
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
import "@nomicfoundation/hardhat-toolbox";
import '@nomicfoundation/hardhat-ethers';
import '@vechain/sdk-hardhat-plugin';
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-deploy';
import 'hardhat-deploy-ethers';
import 'dotenv/config';
if (!process.env.PRIVATE_KEY) {
throw new Error('Please set your PRIVATE_KEY in a .env file or in your environment variables');
}
const accounts = [
process.env.PRIVATE_KEY, // deployer
process.env.DEPLOYER_PRIVATE_KEY ?? process.env.PRIVATE_KEY, // proxyOwner
process.env.OWNER_PRIVATE_KEY ?? process.env.PRIVATE_KEY, // owner
];
// see https://github.com/wighawag/hardhat-deploy?tab=readme-ov-file#1-namedaccounts-ability-to-name-addresses
// references the index from the accounts list above, can be configured by network too
const namedAccounts = {
deployer: { default: 0 },
proxyOwner: { default: 1 },
owner: { default: 2 },
};
const config = {
solidity: "0.8.19",
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 1337,
gas: 10000000
},
vechain_testnet: {
url: "https://node-testnet.vechain.energy",
accounts,
restful: true,
gas: 'auto',
gasPrice: 'auto',
gasMultiplier: 1,
// optionally use fee delegation to let someone else pay the gas fees
// visit vechain.energy for a public fee delegation service
delegator: {
delegatorUrl: "https://sponsor-testnet.vechain.energy/by/90"
},
enableDelegation: true,
loggingEnabled: true,
},
vechain_mainnet: {
url: "https://node-mainnet.vechain.energy",
accounts,
restful: true,
gas: 'auto',
gasPrice: 'auto',
gasMultiplier: 1,
},
},
namedAccounts
};
export default config;