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

fix(governance): add check for strict Multisig threshold validation #177

Merged
merged 16 commits into from
Jul 3, 2024

Conversation

blockchainguyy
Copy link
Contributor

@blockchainguyy blockchainguyy commented Jun 26, 2024

Strict Weighted Multisig threshold validation

This PR adds a check to revert if there are any leftover signatures, when threshold is crossed to make the threshold validation strict.

  • add error and check in smart contract for strict validation.
  • remove positive test for signatures exceeding required signatures.
  • add negative test to revert in case of signatures exceeding required signatures.
  • add comment stating operator is an optional param in setup, which can be removed in the future
  • remove check for transferring operator role to address 0.

Jira Ticket

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.69%. Comparing base (ddff2f9) to head (082794d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #177   +/-   ##
=======================================
  Coverage   98.68%   98.69%           
=======================================
  Files          48       48           
  Lines         763      764    +1     
  Branches      160      160           
=======================================
+ Hits          753      754    +1     
  Misses          1        1           
  Partials        9        9           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@milapsheth
Copy link
Member

Rename PR to fix(governance): .. since it's a non breaking fix in the governance contract folder

contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
contracts/interfaces/IBaseWeightedMultisig.sol Outdated Show resolved Hide resolved
contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
test/governance/BaseWeightedMultisig.js Outdated Show resolved Hide resolved
@blockchainguyy blockchainguyy changed the title feat: add check for strict Multisig threshold validation fix(governance): add check for strict Multisig threshold validation Jun 26, 2024
@blockchainguyy blockchainguyy marked this pull request as ready for review June 26, 2024 12:59
@blockchainguyy blockchainguyy requested a review from a team as a code owner June 26, 2024 12:59
contracts/gateway/AxelarAmplifierGateway.sol Outdated Show resolved Hide resolved
contracts/gateway/AxelarAmplifierGateway.sol Outdated Show resolved Hide resolved
contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
contracts/governance/BaseWeightedMultisig.sol Outdated Show resolved Hide resolved
@milapsheth milapsheth merged commit 1db893b into main Jul 3, 2024
5 checks passed
@milapsheth milapsheth deleted the feat/strict-signatures-validation branch July 3, 2024 06:17
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.

3 participants