Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contracts-bedrock: integrate GovernanceToken with Alligator #11168

Merged
merged 11 commits into from
Jul 22, 2024

Conversation

0xfuturistic
Copy link
Contributor

This PR implements the specs for GovernanceToken as defined in ethereum-optimism/specs#233.
Concretely, this allows accounts to be migrated to the Alligator, which holds the state and implements the advanced delegation logic on behalf of the GovernanceToken.

Copy link
Contributor

semgrep-app bot commented Jul 16, 2024

Semgrep found 1 sol-style-return-arg-fmt finding:

  • packages/contracts-bedrock/src/governance/Alligator.sol

Named return arguments to functions must be appended with an underscore (_)

Ignore this finding from sol-style-return-arg-fmt.

Semgrep found 1 sol-style-input-arg-fmt finding:

  • packages/contracts-bedrock/src/governance/Alligator.sol

Inputs to functions must be prepended with an underscore (_)

Ignore this finding from sol-style-input-arg-fmt.

Copy link
Contributor

semgrep-app bot commented Jul 17, 2024

Semgrep found 3 sol-style-notice-over-dev-natspec findings:

Prefer @notice over @dev in natspec comments

Ignore this finding from sol-style-notice-over-dev-natspec.

Semgrep found 1 sol-style-input-arg-fmt finding:

  • packages/contracts-bedrock/src/governance/Alligator.sol

Inputs to functions must be prepended with an underscore (_)

Ignore this finding from sol-style-input-arg-fmt.

@0xfuturistic 0xfuturistic force-pushed the feat/gov-token-advanced-delegation branch from 932f02b to 00d772c Compare July 17, 2024 18:01
Copy link
Contributor

semgrep-app bot commented Jul 17, 2024

Semgrep found 1 ban_non_wraparound_modifiers finding:

  • packages/contracts-bedrock/src/governance/Alligator.sol

Modifiers that don't do something before and after execution are banned.

Ignore this finding from ban_non_wraparound_modifiers.

@0xfuturistic 0xfuturistic force-pushed the feat/gov-token-advanced-delegation branch from 00d772c to 1dd6a83 Compare July 17, 2024 18:12
Comment on lines +22 to +26
bytes32 private constant _DELEGATION_TYPEHASH =
keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

Check failure

Code scanning / Slither

State variable shadowing High

@0xfuturistic 0xfuturistic force-pushed the feat/gov-token-advanced-delegation branch from dd51d86 to f46c1fd Compare July 17, 2024 18:25

address to;
SubdelegationRules memory subdelegationRules;
uint256 votesCastFactor;

Check warning

Code scanning / Slither

Uninitialized local variables Medium

@0xfuturistic 0xfuturistic force-pushed the feat/gov-token-advanced-delegation branch from bca7e51 to c756097 Compare July 17, 2024 19:27
Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.44%. Comparing base (4e20306) to head (c756097).

Additional details and impacted files
@@                 Coverage Diff                 @@
##           feat/gov-alligator   #11168   +/-   ##
===================================================
  Coverage               16.44%   16.44%           
===================================================
  Files                       8        8           
  Lines                     535      535           
  Branches                   71       71           
===================================================
  Hits                       88       88           
  Misses                    447      447           
Flag Coverage Δ
chain-mon-tests 27.14% <ø> (ø)
sdk-tests 16.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@0xfuturistic 0xfuturistic removed their assignment Jul 18, 2024
@cairoeth cairoeth marked this pull request as ready for review July 22, 2024 14:44
@cairoeth cairoeth requested a review from a team as a code owner July 22, 2024 14:44
@cairoeth cairoeth requested review from mds1 and removed request for a team July 22, 2024 14:44
@cairoeth
Copy link

merging to #11167 so that it's easier to test both Alligator and GovernanceToken.

@cairoeth cairoeth merged commit a0afc38 into feat/gov-alligator Jul 22, 2024
54 of 59 checks passed
@cairoeth cairoeth deleted the feat/gov-token-advanced-delegation branch July 22, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants