forked from Predictify-org/predictify-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathissue_305.json
More file actions
1 lines (1 loc) · 1.29 KB
/
issue_305.json
File metadata and controls
1 lines (1 loc) · 1.29 KB
1
{"body":"**Description:**\n\nAdd gas cost tracking (e.g., ledger budget used) for key operations and optional hooks or limits to support optimization and cost caps.\n\n**Requirements and Context:**\n\n- Must be secure, tested, and documented\n- Should track or expose gas/budget usage for place_bet, resolve, payout, create_event\n- Should document optimization guidelines in code\n- Optional: admin-set gas budget cap per call (abort if exceeded)\n- Should not change business logic; observability only unless caps are required\n- Must be efficient (minimal overhead)\n\n**Suggested Execution:**\n\n1. Fork the repo and create a branch\n ```bash\n git checkout -b feature/gas-tracking\n ```\n\n2. Implement changes\n - Write contract: add tracking or hooks in key entrypoints\n - Add gas module or extend existing: `src/gas.rs` or docs\n - Add documentation and NatSpec-style comments\n\n3. Test and commit\n - Run tests; cover tracking accuracy or cap behavior\n - Include test output and gas notes\n\n**Example Commit Message:**\n```\nfeat: implement gas cost tracking and optimization hooks for key operations\n```\n\n**Guidelines:**\n\n- Minimum 95 percent test coverage\n- Clear documentation\n- Timeframe: 48 hours","title":"feat: implement gas cost tracking and optimization hooks for key operations"}