Skip to content

Contract 11 charge history public#558

Open
TheCreatorNode wants to merge 14 commits into
SiLioLabs:masterfrom
TheCreatorNode:contract-11-charge-history-public
Open

Contract 11 charge history public#558
TheCreatorNode wants to merge 14 commits into
SiLioLabs:masterfrom
TheCreatorNode:contract-11-charge-history-public

Conversation

@TheCreatorNode

Copy link
Copy Markdown
Contributor

closes #467

TheCreatorNode and others added 10 commits June 27, 2026 01:11
…ib.rs

Restores publish_paused, publish_resumed,
publish_subscription_amount_updated, publish_subscription_interval_updated,
publish_merchant_withdrawal, publish_merchant_history_cleared,
publish_referred, publish_admin_transferred, publish_fee_proposed,
publish_fee_committed, publish_merchant_added/removed/frozen/unfrozen,
publish_grace_period_proposed/committed, and publish_min_interval_updated.

These were accidentally removed when adding publish_subscription_paused.
cargo check passes with 0 errors.
- Add batch_pause_subscriptions(env, users) admin-only function
- Add BatchSizeExceeded error variant (SiLioLabs#21)
- Add publish_subscription_paused event
- Max 25 items per batch to prevent ledger size issues
- Skip non-existent and already-paused entries without panic
- Extend TTL for already-paused entries for idempotency
- Fix redundant admin auth in propose_fee/commit_fee/propose_grace_period/commit_grace_period
- Fix pre-existing test syntax errors and event name assertions
- Add tests: mixed inputs, non-admin panic, max size panic
- Make clear_charge_history admin-only (was user-auth)
- Add extend_ttl to ChargeHistory entries in record_charge
- Add tests for get_charge_history, get_charge_history_page, clear_charge_history
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

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

@orunganiekan

Copy link
Copy Markdown
Contributor

kindly resolve merge conflicts

- Resolved all merge conflicts in errors.rs, events.rs, lib.rs
- Took --ours for test.rs (clean version from branch)
- Fixed map_or vs is_none_or conflicts (used map_or for compatibility)
- Fixed subscription_history.rs get_charge_history_ttl (removed invalid Persistent::get_ttl call)
- Updated batch pause test error assertions from SiLioLabs#25 to SiLioLabs#21
- Added admin setup to migration tests
- All 192 tests passing
Resolved merge conflicts (master had new commits since last merge):
- events.rs: fixed ordering conflict, kept all functions
- lib.rs: map_or vs is_none_or (kept map_or)
- subscription_history.rs: fixed get_charge_history_ttl conflict
- test.rs: took --ours
- Snapshot JSON files: took --theirs (regenerated by tests)
- Frontend files: took --theirs (no contract-side changes)
All 192 tests passing
@orunganiekan

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

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-11] Expose get_charge_history and get_charge_history_page as Public Contract Functions

2 participants