Repository navigation
Conversation
OpenZeppelin AI AuditorWarning Review skipped for commit ℹ️ Review info
|
|
No actionable comments were generated in the recent review. WalkthroughThe changes clarify signer requirements for account policies and add native test utilities for custom policies. Tests use the new harness to check required signers and the combination of spending-limit and threshold policies. ChangesPolicy signer requirements
Policy test utilities
Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant Test
participant PolicyTestHarness
participant TestAccount
participant TestEd25519Verifier
participant do_check_auth
Test->>PolicyTestHarness: new(env, context_type, signer_seeds, policies)
PolicyTestHarness->>TestAccount: register account and install context rule
PolicyTestHarness->>TestEd25519Verifier: register verifier
Test->>PolicyTestHarness: try_check_auth(context, signer_indices)
PolicyTestHarness->>TestAccount: invoke authorization hook
TestAccount->>do_check_auth: delegate __check_auth
do_check_auth-->>PolicyTestHarness: return authorization result
Suggested reviewers: Merge Risk:
|
Fixes #975
Document that attached policies decide which signers are required, including how to pair
spending_limitwithsimple_thresholdfor a multi-signer rule.Add
stellar-accounts/testutilsso policy authors can install a policy and run the real__check_authwith selected Ed25519 signers. The tests cover signer identity, unsigned attempts, and spending-limit composition with a threshold.The companion site changes are in OpenZeppelin/docs#270.
PR Checklist
Summary by CodeRabbit