MS
Size: a a a
MS
RK
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require("@nomiclabs/hardhat-ethers");
task('getAccountBalance', `Get account's balance`)
.addParam('account', `The account's address`)
.setAction(async ({ account }, hre) => {
const { ethers } = hre;
console.log(account);
console.log(await ethers.provider.getBalance(account));
});
module.exports = {
solidity: "0.7.3",
};
RK
RK
RK
npx hardhat getAccountBalance --account 0xcbd6832ebc203e49e2b771897067fce3c58575ac
RK
npx hardhat node --fork https://eth-mainnet.alchemyapi.io/v2/OtDYU2Hed2atLVgJDavL2izx6FjMRXlcя так понимаю когда я запускаю getAccountBalance, он ничего не знает о моем форке? как заставить его увидеть?
RK
PK

b
I
А
A
А
A
А
I

B
А
AC
AC