-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
50 lines (48 loc) · 1.45 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
require("@nomicfoundation/hardhat-toolbox");
require('dotenv').config({path: '.env'});
task("getAllNnft", "")
.setAction(async (taskArgs) => {
const Main = await ethers.getContractFactory("Main")
const main = Main.attach("0xe2fcb7d8cfec06af22f7173db77d3eb2504302f2");
const getAllNnft = await main.getAllNnft();
console.log('getAllNnft', getAllNnft);
});
task("properties", "")
.setAction(async (taskArgs) => {
const Main = await ethers.getContractFactory("Main")
const main = Main.attach("0xe2fcb7d8cfec06af22f7173db77d3eb2504302f2");
const getAllNnft = await main.getAllNnft();
for (let i in getAllNnft) {
const nftAddr = getAllNnft[i];
const NFT = await main.properties(nftAddr);
console.log(nftAddr, NFT);
}
});
module.exports = {
solidity: {
compilers: [
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 200
},
},
},
],
},
networks: {
hardhat: {
blockGasLimit: 12_450_000,
hardfork: "london"
},
localhost: {
url: 'http://localhost:8545',
},
cro: {
url: 'https://cronosrpc-1.xstaking.sg',
accounts: [`${process.env.PRIVATE_KEY}`]
},
},
};