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(protocol-kit): considering the SafeVersion in the isL1Contract check in SafeBaseContract #878

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

DaniSomoza
Copy link
Contributor

@DaniSomoza DaniSomoza commented Jun 20, 2024

What it solves

This PR updates the logic used to determine if a contract is L1 or L2 version. Previously, the check only considered if the chainId was mainnet or if it was manually flagged as an isL1SafeSingleton=true by the user.

Now we also considers whether the Safe version does not have the SAFE_L2_CONTRACTS feature (safeVersion >= 1.3.0)

How this PR fixes it

    const isL1Contract =
      safeDeploymentsL1ChainIds.includes(chainId) ||
      isL1SafeSingleton ||
      !hasSafeFeature(SAFE_FEATURES.SAFE_L2_CONTRACTS, safeVersion)

@coveralls
Copy link

coveralls commented Jun 20, 2024

Pull Request Test Coverage Report for Build 9599068430

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.864%

Totals Coverage Status
Change from base Build 9594154831: 0.0%
Covered Lines: 783
Relevant Lines: 933

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 21, 2024

Pull Request Test Coverage Report for Build 9610349188

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.864%

Totals Coverage Status
Change from base Build 9594154831: 0.0%
Covered Lines: 783
Relevant Lines: 933

💛 - Coveralls

@dasanra dasanra merged commit 5176837 into development Jun 21, 2024
19 of 20 checks passed
@dasanra dasanra deleted the fix-safe-L1-contract-check branch June 21, 2024 08:48
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants