Closed nzarambaelisa closed 1 year ago
Question? i'm trying to deploy a mockERC20 contract, but it is throwing an error getNamedAcccounts is not a function. how do solve the problem? here is the deployment of the contract
getNamedAcccounts is not a function
const { network } = require("hardhat") const { developmentChains } = require("../helper-hardhat-config") module.exports = async ({ getNamedAcccounts, deployments }) => { const { deploy } = deployments const { deployer } = await getNamedAcccounts() const chainId = network.config.chainId if (chainId == 31337) { log("Local network detected! Deploying mocks...") await deploy("RewardToken", { from: deployer, log: true, args: [], }) log("Mocks deployed!") log("-------------------------------------------") } } module.exports.tags = ["all", "token"]
Can you:
Thanks!
Question? i'm trying to deploy a mockERC20 contract, but it is throwing an error
getNamedAcccounts is not a function
. how do solve the problem? here is the deployment of the contract