contracts-bedrock: create `GovernanceDelegation` predeploy and connect with `GovernanceToken`
This PR implements the specs for GovernanceDelegation as defined in https://github.com/ethereum-optimism/specs/pull/247, and implements GovernanceTokenInterop to connect the GovernanceToken with GovernanceDelegation.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 84.98%. Comparing base (
4c211fa) to head (91bb84f). Report is 3 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #11167 +/- ##
========================================
Coverage 84.98% 84.98%
========================================
Files 36 36
Lines 2784 2784
========================================
Hits 2366 2366
Misses 350 350
Partials 68 68
| Flag | Coverage Δ | |
|---|---|---|
| cannon-go-tests | 84.98% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Semgrep found 1 sol-style-return-arg-fmt finding:
Named return arguments to functions must be appended with an underscore (_)
Semgrep found 1 golang_fmt_errorf_no_params finding:
No fmt.Errorf invocations without fmt arguments allowed
Semgrep found 1 todos_require_linear finding:
Please create a GitHub ticket for this TODO.
Ignore this finding from todos_require_linear.
GovernanceToken ready for review. Alligator WIP.
GovernanceToken ready for review. Alligator WIP.
Do you want the individual contracts reviewed on their own? If so, its better to have them in their own PRs. We cannot merged in WIP alligator as part of this PR. I recommend checking our https://graphite.dev/blog/stacked-prs, this is how we handle coupled features
Semgrep found 3 sol-style-doc-comment findings:
- packages/contracts-bedrock/src/governance/Alligator.sol
Javadoc-style comments are not allowed. Use /// style doc comments instead.
Semgrep found 1 todos_require_linear finding:
Please create a GitHub ticket for this TODO.
Ignore this finding from todos_require_linear.
Semgrep found 1 golang_fmt_errorf_no_params finding:
No fmt.Errorf invocations without fmt arguments allowed
Semgrep found 2 todos_require_linear findings:
- packages/chain-mon/src/wd-mon/constants.ts
- packages/chain-mon/src/faultproof-wd-mon/constants.ts
Please create a GitHub ticket for this TODO.
Ignore this finding from todos_require_linear.Semgrep found 1 detect-child-process finding:
Detected calls to child_process from a function argument account. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
View Dataflow Graph
flowchart LR
classDef invis fill:white, stroke: none
classDef default fill:#e7f5ff, color:#1c7fd6, stroke: none
subgraph File0["<b>packages/chain-mon/internal/multisig-mon/service.ts</b>"]
direction LR
%% Source
subgraph Source
direction LR
v0["<a href=https://github.com/ethereum-optimism/optimism/blob/f6a0841ad9067ad667f04ea0f3182847ca47f804/packages/chain-mon/internal/multisig-mon/service.ts#L152 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 152] account</a>"]
end
%% Intermediate
subgraph Traces0[Traces]
direction TB
v2["<a href=https://github.com/ethereum-optimism/optimism/blob/f6a0841ad9067ad667f04ea0f3182847ca47f804/packages/chain-mon/internal/multisig-mon/service.ts#L152 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 152] account</a>"]
end
%% Sink
subgraph Sink
direction LR
v1["<a href=https://github.com/ethereum-optimism/optimism/blob/f6a0841ad9067ad667f04ea0f3182847ca47f804/packages/chain-mon/internal/multisig-mon/service.ts#L160 target=_blank style='text-decoration:none; color:#1c7fd6'>[Line: 160] `OP_SERVICE_ACCOUNT_TOKEN=${this.options.onePassServiceToken} op item list --format json --vault="${account.vault}"</a>"]
end
end
%% Class Assignment
Source:::invis
Sink:::invis
Traces0:::invis
File0:::invis
%% Connections
Source --> Traces0
Traces0 --> Sink
Semgrep found 1 sol-style-input-arg-fmt finding:
Inputs to functions must be prepended with an underscore (_)