Labels: good-first-issue, solidity, gas-saving, gasguard
Difficulty: Easy
Module: contracts/core/
🧠 Concept
Replace string revert messages in contract constructors (require(initValue != 0, "Zero init")) with custom error declarations (error ZeroInit()).
⚠️ Problem
Revert strings in constructors permanently inflate deployment bytecode size, increasing contract deployment gas costs on every deployment.
📁 Implementation Scope
contracts/core/GasGuardFactory.sol
test/core/GasGuardFactory.test.ts
🛠️ Requirements
- Define custom error declarations for constructor setup checks.
- Replace all
require(condition, "string") calls in constructors with if (!condition) revert CustomError().
🎯 Acceptance Criteria
Labels:
good-first-issue,solidity,gas-saving,gasguardDifficulty: Easy
Module:
contracts/core/🧠 Concept
Replace string revert messages in contract constructors (
require(initValue != 0, "Zero init")) with custom error declarations (error ZeroInit()).Revert strings in constructors permanently inflate deployment bytecode size, increasing contract deployment gas costs on every deployment.
📁 Implementation Scope
contracts/core/GasGuardFactory.soltest/core/GasGuardFactory.test.ts🛠️ Requirements
require(condition, "string")calls in constructors withif (!condition) revert CustomError().🎯 Acceptance Criteria