Skip to content

feat: emit buy-key event with payment amount#26

Merged
Chucks1093 merged 5 commits into
accesslayerorg:mainfrom
JamesVictor-O:feat/issue-15-buy-key-event-payment
Mar 26, 2026
Merged

feat: emit buy-key event with payment amount#26
Chucks1093 merged 5 commits into
accesslayerorg:mainfrom
JamesVictor-O:feat/issue-15-buy-key-event-payment

Conversation

@JamesVictor-O

@JamesVictor-O JamesVictor-O commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #15

  • Updated buy_key event data from a single supply: u32 to a (supply, payment) tuple so indexers and off-chain consumers can observe the exact payment amount used in each transaction
  • Event topics (buy, creator, buyer) remain unchanged

Test plan

  • test_buy_key_event_includes_payment_amount — event data contains correct supply and payment values
  • test_buy_key_event_topics_include_creator_and_buyer — topics still carry buy symbol, creator, and buyer addresses
  • All pre-existing buy_key tests continue to pass

JamesVictor-O and others added 3 commits March 26, 2026 00:44
- Update buy_key event data from `supply` to `(supply, payment)` tuple
  so indexers can observe the exact payment used in each transaction
- Add tests verifying event data includes payment amount and that
  topics still carry the buy symbol, creator, and buyer addresses

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reformat events().publish() call in buy_key to multi-line style
- Sort use imports alphabetically in buy_key_event tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Mar 26, 2026

Copy link
Copy Markdown

@JamesVictor-O 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

Copy link
Copy Markdown
Contributor

@JamesVictor-O Fix the CI

JamesVictor-O and others added 2 commits March 26, 2026 22:14
…y_key

- Move balance_key update before event publish to avoid borrow-after-move
- Remove duplicate event publish introduced during merge
- Update test_buy_key_event_data_is_new_supply to expect (supply, payment) tuple
@JamesVictor-O

Copy link
Copy Markdown
Contributor Author

@Chucks1093 please review pr, Cl now passing

@Chucks1093 Chucks1093 merged commit b394bf6 into accesslayerorg:main Mar 26, 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

Development

Successfully merging this pull request may close these issues.

Emit buy-key event with payment amount

2 participants