2
it("TEST", async function () {
    let instanceOne = await ethers.getContractAt("IERC20", TOKEN_IN);
    let instanceTwo = await ethers.getContractAt("IERC20", TOKEN_OUT);
    let addr = contract.address;

    // error
    let val = await instanceOne.approve(addr, AMOUNT_IN, { from: WHALE });

Error: Contract with a signer cannot override from (operation="overrides.from", code=UNSUPPORTED_OPERATION, version=contracts/5.5.0)

Petr Hejda
  • 40,554
  • 8
  • 72
  • 100

0 Answers0