-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhardhat.config.js
43 lines (38 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
42
43
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.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.24",
settings: {
optimizer: {
enabled: true,
runs: 1,
},
},
networks: {
'shimmerevm-testnet': {
url: 'https://json-rpc.evm.testnet.shimmer.network',
chainId: 1073,
accounts: [process.env.PRIVATE_KEY],
}
}
};