feat(smart_contracts): add contract registry validation - #181
Open
alez04 wants to merge 4 commits into
Open
Conversation
| for from_epoch, to_epoch in sortable_ranges: | ||
| if previous_to is not None: | ||
| require(from_epoch > previous_to, errors, f"contract {contract_index} has overlapping ABI ranges") | ||
| if to_epoch is not None: |
Contributor
There was a problem hiding this comment.
Would it be better if we treat null end = open ended?
For example:
previous_to = float("inf") if to_epoch is None else to_epoch
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.
Summary
qubic-typescriptsync workflow after production static deploys, so typed contract packages can be regenerated from static-owned data.Why
This prepares
staticto become the canonical public source for current and historical contract registry data.The validator gives us guardrails before generated registry data starts landing in
static, and the deploy dispatch letsqubic-typescriptupdate@qubic.org/registryand@qubic.org/contractsafterstaticaccepts and deploys new registry data.Validation
python3 scripts/validate_contract_data.pyqubic-typescriptexport into thestaticlayout.Notes
qubic-typescriptPR.qubic-typescriptworkflow depends onstatic/scripts/validate_contract_data.pyand the contract schemas added here.QUBIC_TYPESCRIPT_REPO_TOKENin thestaticrepository before expecting deploys to trigger package syncs automatically.QUBIC_TYPESCRIPT_REPO_TOKENis missing, the deploy workflow skips the dispatch instead of failing the deployment.Required secret
In
qubic/staticThis token must be able to create
repository_dispatchevents inqubic/qubic-typescript.