Lesson 7: testWithdrawWithSingleFunder #1451
-
when i run this test (testWithdrawWithSingleFunder) FundMeTest.t.sol
DeployFundMe.s.sol
FundMe.sol
This output comes [PASS] testWithdrawWithSingleFunder() (gas: 92064) How startingOwnerBalance is 79228162514264337593543950335? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hey @codeplay22 please show your |
Beta Was this translation helpful? Give feedback.
-
Hey @codeplay22 , so i asked that you show me your So in your Tested it on my end it the same value |
Beta Was this translation helpful? Give feedback.
Hey @codeplay22 , so i asked that you show me your
DeployFundMe.s.sol
so i can figure out who is the owner of the contract, what i have observed is whenever you put a transaction call between avm.startBroadcast()
andvm.stopBroadcast()
foundry has a default address which it always use to send those transactions and that default address always have a default balance of79228162514264337593543950335
So in your
DeployFundMe.s.sol
you placed the transaction that deploy yourFundMe
contract betweenvm.startBroadcast()
andvm.stopBroadcast()
so foundry would use the default address it uses to send transaction0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38
which then make it so the address is the …