Add contract events for TTL extension and protocol fee recipient updates - #642
Open
JamesVictor-O wants to merge 1 commit into
Open
Conversation
Both admin/lifecycle events previously carried minimal or no field data, leaving indexers without a stable schema to parse. TTL extension now emits creator_id, extended_at_ledger, and new_expiry_ledger; the fee recipient update event gains an updated_at_ledger field. Adds a shared assert_event test helper so future event tests can assert topics+data in one call instead of hand-rolled filtering. Closes accesslayerorg#573
Contributor
|
I see what you have done here, tracking TTL extensions and fee recipient changes as distinct events makes the history easier to audit. Nice work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TtlExtendedEventon TTL extension withcreator_id,extended_at_ledger, andnew_expiry_ledgerfields (previously the event carried only a bareu32expiry value).updated_at_ledgerfield toProtocolFeeRecipientUpdatedEvent, emitted from bothset_protocol_fee_recipientandupdate_protocol_fee_recipient.assert_event(env, contract_id, topics, expected_data)test helper incontract_test_envthat finds the most recent event matching a contract id + topics tuple and asserts the decoded data, with a clear mismatch message naming the contract, topics, and expected/actual payloads.test_snapshotsfixtures to reflect the new event payload shapes.Test plan
cargo test --workspace(143 test result blocks, all passing)cargo fmt --all -- --checkCloses #573