-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
41 lines (34 loc) 路 1.12 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
require('module-alias/register');
const {
debugLog,
loadInfinityMint,
prepareConfig,
saveGlobalSessionFile,
readGlobalSession,
hasNodeModule,
} = require('infinitymint/dist/app/helpers');
//create the default pipe
const { createDefaultFactory } = require('infinitymint/dist/app/pipes');
//set as javascript session
let session = readGlobalSession();
session.environment.javascript = true;
saveGlobalSessionFile(session);
//Create Default Factory
createDefaultFactory();
//require dotenv if it exists
if (hasNodeModule('dotenv')) {
logDirect('馃П Loading .env file');
require('dotenv').config({
override: false, //will not override already established environment variables
});
}
//import our hardhat plugins
require('@nomicfoundation/hardhat-toolbox');
require('@nomiclabs/hardhat-ethers');
require('hardhat-change-network'); //allows hre.changeNetwork to occur
//load infinitymint
loadInfinityMint(true);
//return the infinitymint config file
let config = prepareConfig();
debugLog('loaded hardhat.config.js');
module.exports = config.hardhat; //export the infinity mint configuration file