Then switched over to Ethernaut and fully solved the first challenge. Instead of using the browser console I wrote the deployment script and unit tests myself in VS Code
Day 60: Becoming a top Web3 security researcher
⏳ Hours worked: 2 hrs 52 mins
Wrote a large test and then realized it wouldn't work in a forked environment,so refactored it. Got stuck on an error likely due to VRF version mismatches.Wasted some time debugging with no luck
Day 59: Becoming a top Web3 security researcher
⏳ Hours worked: 4 hrs 1 min
Wrote tests from scratch for checkUpkeep and performUpkeep functions, covered the basics of stateless fuzz testing and also wrote the one big test which will be a baseline for integration test
Day 58: Becoming a top Web3 security researcher
⏳ Hours worked: 2 hrs 26 mins
Learned how to write test functions specifically for event type data structures and how to handle expectRevert when a custom error includes parameters.
Also learned about forge coverage debug which generates a report showing all the untested functions, lines and branches really useful for spotting gaps and boosting overall test coverage.
Took it light today since it was the weekend.
Day 37: Becoming a top Web3 security researcher
⏳ Hours worked: 1 hr 16 mins
Practiced on Ethernaut today. It was my first time, so the majority of the time went into figuring things out and getting used to the setup.
Day 56: Becoming a top Web3 security researcher
⏳ Hours worked: 2 hrs 36 mins
Learned how to programmatically create and fetch a subscriptionId from Chainlink VRF and also Wrote deployment scripts to fund the subscription and automatically add the consumer contract.
Day 55: Becoming a top Web3 security researcher
⏳ Hours worked: 4 hrs 27 mins
1.Learned how to programmatically fetch a subscriptionId from Chainlink VRF.
2.Wrote the subscription script and its corresponding tests from scratch.
3.Understood vm.roll and vm.warp cheatcodes , vm.warp teleports the EVM clock forward and it's always good practice to pair it with vm.roll to advance the block number alongside time!
Day 54: Becoming a top Web3 security researcher
⌛ Hours worked: 2 hrs 15 mins
1.Started off with writing unit tests for the Raffle contract.
2.Learned that you can target specific custom error selectors inside vm.expectRevert.
Day 53: Becoming a top Web3 security researcher
⌛ Hours worked: 3 hrs 21 mins
Wrote everything from scratch and deployed the Raffle contract! Tomorrow onwards, gonna start writing tests.
Day 52: Becoming a top Web3 security researcher
⏳ Hours worked: 2 hrs 24 mins
1.Learnt how to write HelperConfig considering Chainlink VRF.
2.Done with the actual core smart contract logic.
3.Not gonna lie, section 4 of Foundry Fundamentals is pretty interesting!