fix: Add auth-context tests for reflector [b#018] - #943
Closed
Jenks00 wants to merge 1 commit into
Closed
Conversation
Closes #1108
Contributor
|
Closing this as invalid — it doesn't link to a DripsWave-assigned issue or the PR author isn't the current assignee. To contribute: apply on DripsWave, wait for assignment, then open a PR with |
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.
Description
This PR addresses issue #1108 for the GrantFox FWC26 campaign. It implements a simplified
reflectorcontract alongside comprehensive tests verifying Soroban's authentication workflows, specifically capturing the signer's identity under multiple auth harnesses.Changes Included
callora-reflectorpackage with a singlereflect_authentrypoint.require_auth()is enforced on the state-changing entrypoint, capturing the caller'sAddressin Instance storage (StorageKey::LastSigner). Nounwrap()on fallible paths.contracts/reflector/tests/auth.rs):test_mock_all_auths: Verifies state mutations process cleanly usingenv.mock_all_auths().test_strict_auth_harness: Usesenv.mock_auths()with an exactMockAuthInvokepayload to rigorously verify the signer identity is captured correctly.test_missing_auth_panics: Confirms the contract triggers a host-level auth error when no authorization is provided./// rustdocinline documentation on all public items.Verification
cargo test -p callora-reflectorpasses with 3/3 tests passing, no failures.Closes #1108