|
| 1 | +# Pull Request Template |
| 2 | + |
| 3 | +## 📋 Pull Request Checklist |
| 4 | + |
| 5 | +Please check if your PR fulfills the following requirements: |
| 6 | + |
| 7 | +- [ ] Tests for the changes have been added/updated (required for bug fixes/features) |
| 8 | +- [ ] Documentation has been reviewed and updated if needed |
| 9 | +- [ ] Build (`forge build`) succeeds locally |
| 10 | +- [ ] Tests (`forge test`) pass locally |
| 11 | +- [ ] Code formatting (`forge fmt --check`) passes |
| 12 | +- [ ] Gas snapshots (`forge snapshot`) are updated if gas usage changed |
| 13 | +- [ ] No new security warnings from `slither` or `forge coverage` |
| 14 | + |
| 15 | +## 🎯 Pull Request Type |
| 16 | + |
| 17 | +Please check the type of change your PR introduces: |
| 18 | + |
| 19 | +- [ ] Bugfix (non-breaking change fixing an issue) |
| 20 | +- [ ] Feature (non-breaking change adding functionality) |
| 21 | +- [ ] Breaking change (fix or feature that breaks existing functionality) |
| 22 | +- [ ] Gas optimization (improves gas efficiency without changing logic) |
| 23 | +- [ ] Documentation update only |
| 24 | +- [ ] Code style/refactoring (no functional changes) |
| 25 | +- [ ] Test improvement (adding/modifying tests) |
| 26 | +- [ ] Security fix |
| 27 | + |
| 28 | +## 🔗 Related Issue |
| 29 | + |
| 30 | +**Issue Number:** # (e.g., #42) |
| 31 | + |
| 32 | +**Relation:** |
| 33 | +- [ ] Fixes the issue |
| 34 | +- [ ] Contributes to the issue |
| 35 | +- [ ] Related to the issue |
| 36 | + |
| 37 | +## 📝 Description |
| 38 | + |
| 39 | +**What changes does this PR introduce?** |
| 40 | + |
| 41 | +<!-- Describe your changes in detail --> |
| 42 | + |
| 43 | +**Why are these changes necessary?** |
| 44 | + |
| 45 | +<!-- Explain the motivation and context --> |
| 46 | + |
| 47 | +**How does this PR solve the problem?** |
| 48 | + |
| 49 | +<!-- Technical explanation of the solution --> |
| 50 | + |
| 51 | +## 🧪 Testing |
| 52 | + |
| 53 | +### Test Configuration |
| 54 | + |
| 55 | +| Component | Version | |
| 56 | +|-----------|---------| |
| 57 | +| Foundry | `forge --version` | |
| 58 | +| Solidity | `^0.8.20` | |
| 59 | +| Network (if deployed) | Sepolia / Mainnet | |
| 60 | + |
| 61 | +### Test Coverage |
| 62 | + |
| 63 | +- [ ] Unit tests added/updated |
| 64 | +- [ ] Integration tests added/updated (if applicable) |
| 65 | +- [ ] Fuzz tests added (for critical functions) |
| 66 | + |
| 67 | +**Test Results:** |
| 68 | + |
| 69 | +```bash |
| 70 | +# Run this command and paste output |
| 71 | +forge test -vvv |
| 72 | +``` |
| 73 | + |
| 74 | +**Coverage Report:** |
| 75 | + |
| 76 | +```bash |
| 77 | +# Run this command and paste output |
| 78 | +forge coverage |
| 79 | +``` |
| 80 | + |
| 81 | +### Test Steps for Reviewer |
| 82 | + |
| 83 | +1. |
| 84 | +2. |
| 85 | +3. |
| 86 | + |
| 87 | +## 📊 Gas Impact |
| 88 | + |
| 89 | +| Function | Before (gas) | After (gas) | Change | |
| 90 | +|----------|--------------|-------------|--------| |
| 91 | +| `transfer` | | | | |
| 92 | +| `delegate` | | | | |
| 93 | +| `vote` | | | | |
| 94 | + |
| 95 | +- [ ] Gas usage increased (explain why) |
| 96 | +- [ ] Gas usage decreased |
| 97 | +- [ ] No significant gas change |
| 98 | + |
| 99 | +## 🔒 Security Considerations |
| 100 | + |
| 101 | +- [ ] No reentrancy vulnerabilities introduced |
| 102 | +- [ ] Access control properly implemented |
| 103 | +- [ ] Input validation added for all external functions |
| 104 | +- [ ] No unchecked blocks that could overflow |
| 105 | +- [ ] Events emitted for all state changes |
| 106 | +- [ ] Slither analysis passes |
| 107 | + |
| 108 | +**Slither Output:** |
| 109 | + |
| 110 | +```bash |
| 111 | +# Run slither and paste relevant output |
| 112 | +slither . |
| 113 | +``` |
| 114 | + |
| 115 | +## 💥 Breaking Changes |
| 116 | + |
| 117 | +Does this PR introduce breaking changes? |
| 118 | + |
| 119 | +- [ ] Yes |
| 120 | +- [ ] No |
| 121 | + |
| 122 | +**If yes, please describe:** |
| 123 | + |
| 124 | +| Changed Component | Old Behavior | New Behavior | Migration Path | |
| 125 | +|------------------|--------------|--------------|----------------| |
| 126 | +| | | | | |
| 127 | + |
| 128 | +## 📚 Documentation Updates |
| 129 | + |
| 130 | +- [ ] NatSpec comments added/updated for all public/external functions |
| 131 | +- [ ] README.md updated (if applicable) |
| 132 | +- [ ] Deployment instructions updated (if applicable) |
| 133 | +- [ ] Examples added/updated (if applicable) |
| 134 | + |
| 135 | +**Files updated:** |
| 136 | + |
| 137 | +- `src/` |
| 138 | +- `README.md` |
| 139 | +- `docs/` |
| 140 | + |
| 141 | +## 🧾 Commit Format |
| 142 | + |
| 143 | +Please ensure commits follow [Conventional Commits](https://www.conventionalcommits.org/) format: |
| 144 | + |
| 145 | +``` |
| 146 | +<type>(<scope>): <subject> |
| 147 | +
|
| 148 | +<body> |
| 149 | +
|
| 150 | +<footer> |
| 151 | +``` |
| 152 | + |
| 153 | +**Type used in this PR:** |
| 154 | +- [ ] `feat` - New feature |
| 155 | +- [ ] `fix` - Bug fix |
| 156 | +- [ ] `docs` - Documentation |
| 157 | +- [ ] `style` - Code style/formatting |
| 158 | +- [ ] `refactor` - Code refactoring |
| 159 | +- [ ] `perf` - Gas/performance optimization |
| 160 | +- [ ] `test` - Testing |
| 161 | +- [ ] `chore` - Maintenance |
| 162 | + |
| 163 | +**Example commit from this PR:** |
| 164 | + |
| 165 | +``` |
| 166 | +feat(voting): add delegation timelock |
| 167 | +
|
| 168 | +Implement timelock mechanism for delegate changes |
| 169 | +to prevent immediate voting power manipulation. |
| 170 | +
|
| 171 | +- Add TimelockController integration |
| 172 | +- Emit DelegateScheduled event |
| 173 | +- Update tests for timelock behavior |
| 174 | +
|
| 175 | +Gas impact: +500 gas for delegate() function |
| 176 | +``` |
| 177 | + |
| 178 | +## 📦 Dependencies |
| 179 | + |
| 180 | +**New dependencies added:** |
| 181 | +```toml |
| 182 | +# Add to foundry.toml or lib/ |
| 183 | +``` |
| 184 | + |
| 185 | +**Dependencies removed:** |
| 186 | +```toml |
| 187 | +``` |
| 188 | + |
| 189 | +**Dependencies updated:** |
| 190 | +| Dependency | Old Version | New Version | Reason | |
| 191 | +|------------|-------------|-------------|--------| |
| 192 | +| forge-std | | | | |
| 193 | + |
| 194 | +## 🌐 Deployment Information (if applicable) |
| 195 | + |
| 196 | +**Network:** (e.g., Sepolia, Mainnet) |
| 197 | + |
| 198 | +**Deployment Address:** `0x...` |
| 199 | + |
| 200 | +**Verification:** |
| 201 | +- [ ] Verified on Etherscan |
| 202 | +- [ ] Verification command: `forge verify-contract` |
| 203 | + |
| 204 | +**Initial Parameters:** |
| 205 | +```json |
| 206 | +{ |
| 207 | + "name": "", |
| 208 | + "symbol": "", |
| 209 | + "initialSupply": "" |
| 210 | +} |
| 211 | +``` |
| 212 | + |
| 213 | +## 📸 Evidence (if applicable) |
| 214 | + |
| 215 | +**Screenshots/Logs:** |
| 216 | + |
| 217 | +<!-- Attach relevant terminal output, test results, or verification screenshots --> |
| 218 | + |
| 219 | +## ✅ PR Submission Checklist |
| 220 | + |
| 221 | +**Before submitting, confirm:** |
| 222 | + |
| 223 | +- [ ] I have read the [CONTRIBUTING.md](CONTRIBUTING.md) guide |
| 224 | +- [ ] My PR title follows the Conventional Commits format |
| 225 | +- [ ] My branch is rebased on the latest `main` branch |
| 226 | +- [ ] I have resolved all merge conflicts |
| 227 | +- [ ] All CI checks pass on my branch |
| 228 | +- [ ] I have requested at least one reviewer |
| 229 | + |
| 230 | +## 👀 Reviewer Focus |
| 231 | + |
| 232 | +**Please pay special attention to:** |
| 233 | + |
| 234 | +1. |
| 235 | +2. |
| 236 | +3. |
| 237 | + |
| 238 | +--- |
| 239 | + |
| 240 | +## 📌 Additional Context |
| 241 | + |
| 242 | +<!-- Any other information that would help reviewers --> |
| 243 | + |
| 244 | +--- |
| 245 | + |
| 246 | +**Thank you for contributing to Metarang Governance!** 🏛️ |
| 247 | + |
| 248 | +*For security issues, please email security@metarang.com instead of creating a PR.* |
| 249 | + |
| 250 | +--- |
| 251 | + |
| 252 | +## 🏷️ Auto-label Suggestions |
| 253 | + |
| 254 | +<!-- These will be automatically added by GitHub Actions --> |
| 255 | +/label ~"needs review" |
| 256 | +/cc @maintainers |
| 257 | +``` |
| 258 | +
|
| 259 | +**END OF PULL REQUEST TEMPLATE** |
0 commit comments