Cyfrin / foundry-smart-contract-lottery-cu

47 stars 38 forks source link

ERROR forge::runner: setUp failed reason="ERC20: transfer amount exceeds balance" #19

Closed blagoichelovek closed 7 months ago

blagoichelovek commented 1 year ago

After compile with forge test --fork-url $SEPOLIA_RPC_URL --via-ir it throws me wierd error: Running 1 test for test/unit/RaffleTest.t.sol:RaffleTest [FAIL. Reason: Setup failed: ERC20: transfer amount exceeds balance] setUp() (gas: 0) Test result: FAILED. 0 passed; 1 failed; finished in 9.33s

Failing tests: Encountered 1 failing test in test/unit/RaffleTest.t.sol:RaffleTest [FAIL. Reason: Setup failed: ERC20: transfer amount exceeds balance] setUp() (gas: 0)

ungureanuu commented 1 year ago

try to add more SepoliaETH (https://sepoliafaucet.com/) to the account that you have the privite key inside .env

howellsy commented 11 months ago

Along the same lines, I had to add some more LINK (https://faucets.chain.link/) to my account from .env to fix this error.

PatrickAlphaC commented 7 months ago

Nice, great fixes all