feat: validate commitment existence in transformation entrypoints#502
Open
Glam26 wants to merge 1 commit into
Open
feat: validate commitment existence in transformation entrypoints#502Glam26 wants to merge 1 commit into
Glam26 wants to merge 1 commit into
Conversation
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.
I have implemented the cross-contract commitment validation in the
commitment_transformation contract and ensured that the entire test suite is
passing.
Changes Implemented
contracts/commitment_transformation/src/lib.rs to verify that a commitment
fetched from commitment_core has a status of "active". If the status is
different, it now fails with TransformationError::InvalidState.
and Validation, resolving import errors.
mocks in commitment_transformation.
ensuring compatibility with the contract's expected data types.
existing test assertions.
invalid_state_tests.rs setup helpers.
invalid_state_tests.rs to verify that transformations on non-active
commitments are rejected.
successfully.
status checks in the cross-contract call notes.
requirement for tranche creation.
Commit Summary
I have committed the changes to the feature/transformation-commitment-check
branch with the message:
feat: validate commitment existence in transformation entrypoints
All tests can be verified by running:
1 cargo test -p commitment_transformation --lib
closes #474