79604589

Date: 2025-05-03 10:29:39
Score: 5
Natty:
Report link

The problem somehow lied in the fixtures

async function deployToken() {
    const Token = await ethers.getContractFactory("Token");
    const token = await Token.deploy();
    await token.waitForDeployment();
    const tokenAddr = await token.getAddress();
    return { token, tokenAddr };
  }
async function deployFundedToken() {
    const Token = await ethers.getContractFactory("Token");
    const token = await Token.deploy();
    await token.waitForDeployment();
    const tokenAddr = await token.getAddress();
    const oneEth = ethers.parseEther("1");
    await setBalance(tokenAddr, oneEth);
    return { token, tokenAddr };
  }

I had these two fixtures. When I deleted the funded one and just started to fund when I needed to the balanceOf func and all the other ones became callable. Does anyone know why though?

Reasons:
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (2): Does anyone know
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: TheCodeSommelier