0:00 - Intro 1:00 - Test setup 1:52 - Passing test 3:52 - Test for error 5:37 - Expect revert 6:36 - Test dec 7:17 - Test verbosity 8:31 - Gas report Code github.com/t4sk/hello-foundry Book book.getfoundry.sh/ Solidity by Example solidity-by-example.org/ Take a course www.smartcontract.engineer/
@redbeet4772 Жыл бұрын
There is an error "undeclare identifier" when writing "vm.expectRevert(stdError.arithmeticError)". It seems like the foundry doesn't recognize this, do you know why?
@MatoPrimaB Жыл бұрын
Awesome work, really looking forward to this foundry content
@formularyzer Жыл бұрын
I watched your video again. I got it now, thanks for showing me integer flow!
@IssaNana-k4d9 ай бұрын
Thank you so much for this series
Жыл бұрын
Great content! I really appreciate! Thank you!
@meka4996 Жыл бұрын
Very good! Thank you
@jstechlead Жыл бұрын
Great video! Quick question - can you please provide list of all vscode extensions, which you're using in VScode?
@smartcontractprogrammer Жыл бұрын
Prettier Solidity (Nomic Foundation)
@kiMANIM.1111 Жыл бұрын
@@smartcontractprogrammer is their something special about solidity by nomic foundation that is not in solidity by juan blanco
@JustinBishop2 ай бұрын
Where can i find the built in functions that foundry has? im writing a test for a tutorial hack contract that will interact with the target contract.
@smartcontractprogrammer2 ай бұрын
book.getfoundry.sh/
@kevinnzeng7081 Жыл бұрын
Terrific 💯 Thanks so much 🎉
@ramamuge3380 Жыл бұрын
I'm also getting the same error of Undeclared Identifier when using the vm.expectRevert(stdError.arithmeticError)...can someone advice on the solution?
@smartcontractprogrammer Жыл бұрын
Maybe Foundry removed it in their latest version?
@UrosOgnjenovic9 ай бұрын
import {Test, stdError, console} from "forge-std/Test.sol";
@SijoyThomas Жыл бұрын
which ide is that? Visual Studio Code?
@smartcontractprogrammer Жыл бұрын
yes
@thurendous Жыл бұрын
I was wondering why dec() cost much less gas than inc(). Why?
@MrCoreyTexas4 ай бұрын
Great question, I have no idea either. I guess if you were writing a for loop to do something 10 times, it'd use less gas to go from 10 to 1 than from 1 to 10?
@MrCoreyTexas4 ай бұрын
I did this test and found the opposite result, going from 1 to 10 was cheaper than going from 10 to 1. I really don't know why dec() costs so little gas according to foundry.
@Okeh1899 ай бұрын
why do we write failing tests in foundry?
@smartcontractprogrammer9 ай бұрын
Test that smart contract fails under certain conditions for example - revert if msg.sender is not authorized
@Okeh1899 ай бұрын
@@smartcontractprogrammer btw bro u know solidity well, do u work somewhere? or taking youtube as full time?
@MehreenMunsif Жыл бұрын
There is an error "undeclare identifier" when writing "vm.expectRevert(stdError.arithmeticError)". It seems like the foundry doesn't recognize this and says "Undeclared Identifier" for Do you know why?
@UrosOgnjenovic9 ай бұрын
import {Test, stdError, console} from "forge-std/Test.sol";