Skip to content

VM Exception while processing transaction: reverted with reason string 'ERC20: transfer amount exceeds balance' #42

Open
@elleerrorlogs

Description

It seems I cannot get past this issue, steps are outlined below. I have set the ALCHEMY_POLYGON_RPC_URL environment variable and left the PRIVATE_KEY environment variable blank in order to use the test configs.

This may be unrelated but I changed the WETH_WHALE in addresses.ts to 0x3fd939b017b31eaadf9ae50c7ff7fa5c0661d47c since the address assigned in main branch was not actually a WETH whale. Nothing else was changed.

The failure seems to occur during the transfer function of token.ts on line 28 in the main branch.

--

yarn test test/access.test.ts

`No need to generate any newer typings.

Access
Withdraw
1) "before each" hook for "should withdraw tokens"

0 passing (5s)
1 failing

  1. Access
    "before each" hook for "should withdraw tokens":
    Error: VM Exception while processing transaction: reverted with reason string 'ERC20: transfer amount exceeds balance'
    at . (0x2791bca1f2de4661ed88a30c99a7a9449aa84174)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async HardhatNode._mineBlockWithPendingTxs (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:1650:23)
    at async HardhatNode.mineBlock (node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:459:16)
    at async EthModule._sendTransactionAndReturnHash (node_modules/hardhat/src/internal/hardhat-network/provider/mod
    `

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions