Closed lucasmenendez closed 8 months ago
CodeRabbit
This update introduces enhanced error handling and retry mechanisms for RPC calls, along with improved logging for better debugging. It also refactors address handling in the ERC20 provider for consistency and adds logic to reset the creation block based on reference values.
File(s) | Summary |
---|---|
scanner/providers/web3/const.go , scanner/providers/web3/web3_provider.go |
Introduced a new constant RetryWeb3Cooldown set to 500 milliseconds. Enhanced RPC error handling, added retry mechanisms for RPC calls, and improved error logging for better debugging. |
scanner/providers/web3/erc20_provider.go |
Refactored the code to consistently use p.address for address handling. Added logic to reset p.creationBlock based on the reference's value. |
🐰💻
In the land of code where the shadows lie, A rabbit hopped forth, his gaze held high. With each line changed, he danced and spun, Celebrating the battles fought and won.
Errors tamed, retries in place, Logging improved, no trace of haste. Address handled with consistent grace, Creation block reset, no memory space.
So here's to the code, ever so bright, To the rabbit coder, working through the night! 🌙🎉
Uplevel your code reviews with CodeRabbit Pro
### CodeRabbit Pro If you like this project, please support us by purchasing the [Pro version](https://coderabbit.ai). The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.
New RPC error responses about range limits exceeds to handle.
Fix creation block issues.
Retry RPC calls if the creation block calculation fails.
Summary by CodeRabbit
Bug Fix: Improved error handling and retry mechanisms for RPC calls, enhancing system resilience and stability.
Refactor: Streamlined address handling in ERC20 provider for consistency and reliability.
New Feature: Added logic to dynamically reset the creation block based on reference values, improving flexibility in transaction tracking.