-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhardhat.config.js
70 lines (65 loc) · 1.85 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
require("@nomicfoundation/hardhat-toolbox");
require('dotenv').config();
task("faucet", "Sends ETH and tokens to an address")
.addPositionalParam("receiver", "The address that will receive them")
.setAction(async ({ receiver }, { ethers }) => {
if (network.name === "hardhat") {
console.warn(
"You are running the faucet task with Hardhat network, which" +
"gets automatically created and destroyed every time. Use the Hardhat" +
" option '--network localhost'"
);
}
const [sender] = await ethers.getSigners();
const tx2 = await sender.sendTransaction({
to: receiver,
value: ethers.constants.WeiPerEther,
});
let rc = await tx2.wait();
console.log(rc)
console.log(`Transferred 1 ETH to ${receiver}`);
});
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.18",
settings: {
optimizer: {
enabled: true,
runs: 1,
},
},
networks: {
'shimmerevm-testnet': {
url: 'https://json-rpc.evm.testnet.shimmer.network',
chainId: 1073,
accounts: [process.env.PRIVATE_KEY_ISSUER],
},
'hardhat-issuer': {
url: 'http://127.0.0.1:8545/',
chainId: 31337,
gas: 2100000,
gasPrice: 8000000000,
accounts: [process.env.PRIVATE_KEY_ISSUER],
},
'sepolia': {
url: `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY}`,
chainId: 11155111,
accounts: [process.env.PRIVATE_KEY_ISSUER]
}
},
etherscan: {
apiKey: {
'shimmerevm-testnet': 'ABCDE12345ABCDE12345ABCDE123456789'
},
customChains: [
{
network: 'shimmerevm-testnet',
chainId: 1072,
urls: {
apiURL: 'https://explorer.evm.testnet.shimmer.network/api',
browserURL: 'https://explorer.evm.testnet.shimmer.network/'
}
}
]
}
};