Foundry Tests TIP - Impersonate Accounts in Tests (vm.StartPrank)
Johnny Time
learningblockchain securitydefi securityhow to audit smart contractroadmapsmart contract auditsmart contract auditingsmart contract developersmart contract developmentsmart contract hackingsmart contract programmersmart contract programmingsmart contract securitysolidity auditingsolidity hackingsolidity securitytutorialweb3 bug bountiesweb3 hackingweb3 security
In Foundry, you can impersonate users using the vm.startPrank feature. This means that all transactions will be executed from the specified user's account. Foundry allows writing tests in Solidity rather than JavaScript. Instead of using traditional hardhat javascript methods like .connect(user), this feature simplifies transaction signing as the specified user.
Learn Smart Contract Hacking: https://johnnytime.xyz/smart-contract-hacker
Watch The Full Stream: https://www.youtube.com/watch?v=C-GRDhA9B9U ... https://www.youtube.com/watch?v=Yfdp7fMFcRw
2023-09-03
0.0 LBC
Copyrighted (contact publisher)
4162379 Bytes