You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
397 B
14 lines
397 B
const { ethers } = require('hardhat');
|
|
const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers');
|
|
|
|
// Hardhat default balance
|
|
const DEFAULT_BALANCE = 10000n * ethers.WeiPerEther;
|
|
|
|
async function impersonate(account, balance = DEFAULT_BALANCE) {
|
|
await impersonateAccount(account);
|
|
await setBalance(account, balance);
|
|
}
|
|
|
|
module.exports = {
|
|
impersonate,
|
|
};
|
|
|