-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
77 lines (71 loc) · 2.07 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
72
73
74
75
76
77
require("dotenv").config();
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-waffle");
require("hardhat-gas-reporter");
const deploy = require("./scripts/deploy");
const mint = require("./scripts/mint");
const mintFromCsv = require("./scripts/mintFromCsv");
const {
ALCHEMY_RINKEBY_URL,
ALCHEMY_MAINNET_URL,
MAINNET_PRIVATE_KEY,
MNEMONIC,
COINMARKET_CAP_API_KEY,
} = process.env;
task("deploy-lucite-contract", "Deploy the Lucite Token contract").setAction(
async () => {
return await deploy.deployLuciteContract();
}
);
task("mint-lucite", "Mint a single Lucite token")
.addParam("recipient", "Address of the Lucite recipient")
.addParam("id", "ID the token will be given. Must not be already assigned!")
.addParam("uri", "URI pointing to the metadata JSON associated with token")
.addOptionalParam(
"contract",
"Address of the deployed contract that performs minting. Defaults to value set in .env"
)
.setAction(async ({ recipient, id, uri, contract }) => {
await mint.mintLucite(recipient, id, uri, contract);
});
task("mint-lucites-from-csv", "Mint Lucite Tokens in batch from a CSV")
.addParam("csv", "Path to the CSV file")
.addOptionalParam(
"contract",
"Address of the deployed contract that performs minting. Defaults to value set in .env"
)
.setAction(async ({ csv, contract }) => {
await mintFromCsv.mintInvestorTokensFromCsv(csv, contract);
});
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
gasReporter: {
enabled: process.env.REPORT_GAS ? true : false,
currency: "USD",
token: "ETH",
gasPriceApi:
"https://api.etherscan.io/api?module=proxy&action=eth_gasPrice",
coinmarketcap: COINMARKET_CAP_API_KEY,
},
networks: {
mainnet: {
url: ALCHEMY_MAINNET_URL,
accounts: [`${MAINNET_PRIVATE_KEY}`],
},
rinkeby: {
url: ALCHEMY_RINKEBY_URL,
accounts: { mnemonic: MNEMONIC },
},
},
};