Skip to content

Add unit coverage for protocol config and supply reads#86

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
davedumto:test/protocol-read-coverage
Mar 28, 2026
Merged

Add unit coverage for protocol config and supply reads#86
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
davedumto:test/protocol-read-coverage

Conversation

@davedumto

@davedumto davedumto commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds focused unit coverage for the internal read paths behind protocol config lookup and creator supply lookup.

The new tests stay scoped to helper and read behavior only:

  • verify the shared creator supply read helper returns the stored supply for an existing creator
  • verify the shared creator supply read helper returns 0 when the creator does not exist
  • verify the shared protocol config read path returns the stored config values
  • verify protocol fee basis points can be read correctly from stored config

Implementation Notes

The new unit tests were added in creator-keys/src/test.rs and use env.as_contract(...) so the helper functions are exercised in a valid contract-storage context.

Snapshot fixtures generated for the new unit tests were included alongside the test changes.

Why This Matches The Issues

  • keeps assertions focused on read/helper behavior
  • covers both success and missing-creator cases for creator supply reads
  • covers a successful protocol fee bps lookup
  • introduces no contract behavior changes outside test coverage

Testing

  • cargo test --workspace

Closes #80
Closes #81
Closes #83
Closes #85

@drips-wave

drips-wave Bot commented Mar 28, 2026

Copy link
Copy Markdown

@davedumto 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

@Chucks1093 Chucks1093 merged commit 21587b2 into accesslayerorg:main Mar 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants