Skip to content

test(contracts): add DataKey storage layout regression tests#283

Open
collinsezedike wants to merge 1 commit into
Miracle656:mainfrom
collinsezedike:feat/storage-layout-regression-tests
Open

test(contracts): add DataKey storage layout regression tests#283
collinsezedike wants to merge 1 commit into
Miracle656:mainfrom
collinsezedike:feat/storage-layout-regression-tests

Conversation

@collinsezedike
Copy link
Copy Markdown

Summary

  • Creates contracts/invisible_wallet/src/storage/tests.rs with one test per DataKey variant
  • An exhaustive match on DataKey causes a compile error if any variant is added without updating the tests
  • Unit variants are asserted against an exact ScVal::Vec([Symbol("Name")]) — any rename breaks the assertion
  • Signer(BytesN<65>) is tested with a deterministic byte vector; Allowance(AllowanceKey) pins both the discriminant symbol and the inner map field order (spendertoken)

Closes #259

Test plan

  • cargo build -p invisible-wallet passes (CI gate)
  • Renaming any DataKey variant causes a test assertion failure
  • Adding a new variant without updating _cover_all_variants causes a compile error

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@collinsezedike is attempting to deploy a commit to the miracle656's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@collinsezedike Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contract storage layout regression tests

1 participant