Commit ee2f4b1
feat: duplicated proposals check (#378)
* feat: add initial interface and logic
* refactor: remove installed governor submodule
* chore: remove xERC20
* feat: add proposal routing full flow
* feat: check voting power and required proposals
* refactor: rename to ProposalValidator
* feat: add EAS validation for certain Proposal Types
* feat: add duplicated proposals validation
* chore: fix attestation schema approved address naming
Co-authored-by: 0xOneTony <[email protected]>
Signed-off-by: Chiin <[email protected]>
* chore: remove management functions
* chore: run pre-pr
* refacto: follow style guide for function parameters and return variables
* docs: add natspec, remove unused errors
* chore: remove management functions from interface
* chore: make voting token immutable
* perf: make governor immutable
* feat: add validator management functions
* chore: add comments for imports in ProposalValidator
* test: add unit tests
* chore: run pre-pr
* fix: semgrep warnings
* chore: rename MaintenanceUpgradeProposals --> MaintenanceUpgrade
* chore(semgrep): add excluded governance files
* chore: fix coding style
* chore: add ImmutableProposalTypeData
* chore: improve errors naming
* docs: improve natspec
Co-authored-by: 0xOneTony <[email protected]>
Signed-off-by: Chiin <[email protected]>
* docs: add technical explanation on attestation validation function
* feat: add _proposalTypeData mapping
* chore: keep private functions consistency
* chore: improve required attestation naming
* chore: run pre-pr
* chore: more descriptive errors
* chore: confusing error name in submitProposal
---------
Signed-off-by: Chiin <[email protected]>
Co-authored-by: 0xOneTony <[email protected]>1 parent 76e6bc2 commit ee2f4b1
File tree
5 files changed
+241
-163
lines changed- packages/contracts-bedrock
- interfaces/governance
- snapshots
- abi
- storageLayout
- src/governance
- test/governance
5 files changed
+241
-163
lines changedLines changed: 17 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 19 | | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| 77 | + | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
84 | 89 | | |
85 | 90 | | |
86 | 91 | | |
| |||
Lines changed: 50 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
178 | 193 | | |
179 | 194 | | |
180 | 195 | | |
| |||
292 | 307 | | |
293 | 308 | | |
294 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
295 | 315 | | |
296 | 316 | | |
297 | 317 | | |
| |||
301 | 321 | | |
302 | 322 | | |
303 | 323 | | |
304 | | - | |
305 | | - | |
306 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
307 | 327 | | |
308 | 328 | | |
309 | 329 | | |
| |||
404 | 424 | | |
405 | 425 | | |
406 | 426 | | |
407 | | - | |
408 | | - | |
409 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
410 | 430 | | |
411 | 431 | | |
412 | 432 | | |
| |||
423 | 443 | | |
424 | 444 | | |
425 | 445 | | |
426 | | - | |
427 | | - | |
428 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
429 | 449 | | |
430 | 450 | | |
431 | 451 | | |
| |||
442 | 462 | | |
443 | 463 | | |
444 | 464 | | |
445 | | - | |
446 | | - | |
447 | | - | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
448 | 468 | | |
449 | 469 | | |
450 | 470 | | |
| |||
481 | 501 | | |
482 | 502 | | |
483 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
484 | 510 | | |
485 | 511 | | |
486 | 512 | | |
| |||
521 | 547 | | |
522 | 548 | | |
523 | 549 | | |
524 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
525 | 556 | | |
526 | 557 | | |
527 | 558 | | |
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 49 | + | |
57 | 50 | | |
58 | 51 | | |
0 commit comments