Solidity Custom Errors vs Require Strings: A Migration Checklist
Custom errors replace require strings with typed revert data in Solidity 0.8.4+, but require tooling support to decode.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Custom errors replace require strings with typed revert data in Solidity 0.8.4+, but require tooling support to decode.
Debug smart contracts faster using Hardhat Network's built-in console.log() functionality. This guide shows how to add logging to Solidity code, verify it works in tests, and remove it before production deployment.
Vyper’s fixed‑point <code>decimal</code> type lets you write ratios like 0.05 directly, eliminating 1e18 scaling hacks. This blog walks through a liquidation‑threshold example, compares decimal vs. integer math, and gives practical guidance on when to use each.
Use Solidity immutable for configuration values fixed at deployment. They live in bytecode, not storage, so every read avoids an SLOAD gas cost.
Use CEI ordering and nonReentrant guards to prevent reentrancy in Solidity payout functions that send ETH to untrusted recipients.
Prevent reentrancy attacks in Solidity by implementing the Checks-Effects-Interactions pattern. Learn how to order state changes to secure funds and optimize gas.
Custom errors in Solidity 0.8.4+ save deployment gas and carry typed revert data. Learn when to use them and how to decode them off-chain.
Solidity custom errors replace costly revert strings with 4-byte selectors, cutting bytecode size and making reverts easier to decode off-chain.
A diagnostic guide for Solidity reentrancy caused by state-change-after-external-call. Map calls, check ordering, apply Checks-Effects-Interactions and reentrancy guards, with checks and escalation criteria.