How can I fund an EOA inside a test case with Foundry.
Assume I have an NFT contract, want to test the minting functionality and I want to have an EOA that owns enough ether to mint, since users have to send ether to mint it.
Let's say I have
contract NFTCollectionTest is Test {
...
function testMint() public {
address someRandomUser = vm.addr(1);
vm.prank(someRandomUser);
nftCollection.mint{value: 0.01 ether}();
...
}
}
But the test case failed. When I run the foundry test with more verbosity -vvvv
I can see that "EvmError: OutOfFund"