forked from Nunobrazz/xchain-real-estate-tokenization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
51 lines (43 loc) · 1.44 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
require("@nomicfoundation/hardhat-toolbox");
// Ensure your configuration variables are set before executing the script
const { vars } = require("hardhat/config");
// Go to https://infura.io, sign up, create a new API key
// in its dashboard, and add it to the configuration variables
const PRIVATE_KEY_FUJI = vars.get("PRIVATE_KEY_FUJI");
// Add your Sepolia account private key to the configuration variables
// To export your private key from Coinbase Wallet, go to
// Settings > Developer Settings > Show private key
// To export your private key from Metamask, open Metamask and
// go to Account Details > Export Private Key
// Beware: NEVER put real Ether into testing accounts
const SEPOLIA_PRIVATE_KEY = vars.get("SEPOLIA_PRIVATE_KEY");
const API_URL = vars.get("API_URL");
task("balance", "Prints an account's balance")
.addParam("account", "The account's address")
.setAction(async (taskArgs) => {
const balance = await ethers.provider.getBalance(taskArgs.account);
console.log(ethers.formatEther(balance), "ETH");
});
module.exports = {
solidity : {
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
fuji: {
url: "https://api.avax-test.network/ext/bc/C/rpc",
gasPrice: 225000000000,
chainId: 43113,
accounts: [PRIVATE_KEY_FUJI],
},
sepolia: {
url: API_URL,
accounts: [SEPOLIA_PRIVATE_KEY],
},
},
};