VIS-2 / taobank-04-24

0 stars 0 forks source link

Revert strings are less gas-efficient than custom errors #26

Open 0xMilenov opened 4 months ago

0xMilenov commented 4 months ago

Description

Consider opting for custom errors as they offer a more gas-efficient method to explain to users why an operation failed (~ 50 gas saved for each instance). Utilizing custom errors is also more cost-effective during deployment and allows for the inclusion of values like address, tokenID, and msg.value within its parentheses. Furthermore, custom errors enhance debugging capabilities and facilitate a detailed analysis of DApp reverts, especially on platforms like Tenderly.