Add contract release checker#192
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Introduces a contract “release version” model per network and adds helper functions to check whether a vault (regular / genesis / meta) meets the minimum contract release requirements (including Pectra as release V4).
Changes:
- Added
sw_utils/release.pywithis_vault_upgraded_to_release(...)and related helpers. - Extended
BaseNetworkConfigwithCONTRACTS_RELEASESand added V4/V5 release thresholds for MAINNET/HOODI/GNOSIS. - Removed the legacy
sw_utils/pectra.pyhelper and bumped the package version.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sw_utils/release.py | New public helpers to check vault upgrade status against per-network contract releases. |
| sw_utils/pectra.py | Removes the old Pectra-specific vault-version helper module. |
| sw_utils/networks.py | Defines release version enum/model and adds per-network release thresholds. |
| sw_utils/init.py | Re-exports the new release-checker helpers. |
| pyproject.toml | Bumps package version to v0.12.16. |
Comments suppressed due to low confidence (1)
sw_utils/pectra.py:1
sw_utils/pectra.pyis removed, which is a breaking change for any downstream code that importssw_utils.pectra/get_pectra_vault_version. If this removal is intentional, consider keeping a thin compatibility wrapper (e.g.,get_pectra_vault_versiondelegating to the new release-based logic) and/or doing a major version bump with a deprecation period instead of removing the module outright in a patch release.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tsudmi
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.