Repository navigation
Commit a5a2c30
feat(contracts): restrict dispute_milestone to active states and rese… (#1759)
- Restrict dispute_milestone to vaults in Active status (Error::NotActive)
- Reject disputing while vault is paused (Error::Paused)
- Reject disputing milestones already released (Error::MilestoneAlreadyReleased)
- Require check-in record for dispute; reject missing records with Error::MilestoneNotDisputable
- Clear DataKey::MilestoneApprovals(index) and DataKey::CheckIn(index) on dispute to reset M-of-N round
- Emit milestone_disputed event with milestone index and cleared approvals count
- Bundle destinations into Destinations struct to adhere to Soroban 10-parameter limit
- Add comprehensive 2-of-3 threshold unit tests covering dispute and re-approval
- Document dispute invariants, re-approval workflow, and dispute capping decision in README.md
Co-authored-by: 1nonlypiece <1nonlypiece@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent fcd6869 commit a5a2c30
4 files changed
Lines changed: 362 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
48 | 71 | | |
49 | 72 | | |
50 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
109 | 117 | | |
110 | | - | |
111 | 118 | | |
112 | 119 | | |
113 | | - | |
114 | | - | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
118 | 128 | | |
119 | 129 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
295 | 297 | | |
296 | 298 | | |
297 | 299 | | |
| |||
1192 | 1194 | | |
1193 | 1195 | | |
1194 | 1196 | | |
1195 | | - | |
| 1197 | + | |
1196 | 1198 | | |
1197 | | - | |
1198 | | - | |
1199 | | - | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1200 | 1203 | | |
1201 | 1204 | | |
1202 | 1205 | | |
| |||
1205 | 1208 | | |
1206 | 1209 | | |
1207 | 1210 | | |
| 1211 | + | |
1208 | 1212 | | |
1209 | 1213 | | |
1210 | 1214 | | |
1211 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
1212 | 1222 | | |
1213 | 1223 | | |
1214 | 1224 | | |
| |||
1217 | 1227 | | |
1218 | 1228 | | |
1219 | 1229 | | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1220 | 1233 | | |
1221 | 1234 | | |
1222 | 1235 | | |
| |||
1225 | 1238 | | |
1226 | 1239 | | |
1227 | 1240 | | |
1228 | | - | |
| 1241 | + | |
1229 | 1242 | | |
1230 | 1243 | | |
1231 | 1244 | | |
1232 | 1245 | | |
1233 | | - | |
| 1246 | + | |
1234 | 1247 | | |
1235 | 1248 | | |
1236 | 1249 | | |
| |||
1242 | 1255 | | |
1243 | 1256 | | |
1244 | 1257 | | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1245 | 1271 | | |
1246 | 1272 | | |
1247 | | - | |
| 1273 | + | |
1248 | 1274 | | |
1249 | 1275 | | |
1250 | 1276 | | |
| |||
0 commit comments