diff --git a/makefile b/makefile index 02f46d9..64eb985 100644 --- a/makefile +++ b/makefile @@ -303,4 +303,22 @@ docs: ## Generate documentation docs-serve: docs ## Serve documentation locally @echo "$(BLUE)🌐 Serving documentation at http://localhost:3000$(RESET)" - forge doc --serve --port 3000 \ No newline at end of file + forge doc --serve --port 3000 + +# ================================================================ +# GAS OPTIMIZATION +# ================================================================ + +gas-snapshot: ## Create gas usage snapshot + @echo "$(BLUE)📊 Creating gas snapshot...$(RESET)" + forge snapshot + +gas-diff: ## Compare gas usage with snapshot + @echo "$(BLUE)📊 Comparing gas usage...$(RESET)" + forge snapshot --diff + +gas-report: ## Generate detailed gas report + @echo "$(BLUE)⛽ Generating gas report...$(RESET)" + mkdir -p $(REPORTS_DIR) + forge test --gas-report > $(REPORTS_DIR)/gas-report.txt + @echo "$(GREEN)✅ Gas report saved to $(REPORTS_DIR)/gas-report.txt$(RESET)"