Skip to content

Add infinite event streaming pagination example - #1380

Merged
Shaptic merged 7 commits into
mainfrom
sdk-examples
Mar 11, 2025
Merged

Shaptic merged 7 commits into
mainfrom
sdk-examples

Conversation

@Shaptic

@Shaptic Shaptic commented Mar 7, 2025 •

Copy link
Copy Markdown
Contributor

The main purpose is to highlight humanizeEvents but it's a little hard to shoe-horn in without a fuller example.

Closes part of #471.

Direct link to page in preview.

@Shaptic
Shaptic requested review from a team and ElliotFriend March 7, 2025 21:27
`ContractEvents` are emitted in Stellar Core's `TransactionMeta`. You can see in the [TransactionMetaV3] XDR below that there is a list of `OperationEvents` called `events`. Each `OperationEvent` corresponds to an operation in a transaction, and itself contains a list of `ContractEvents`. Note that `events` will only be populated if the transaction succeeds.

[transactionmetav3]: #transactionmetav3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below this there is a line which says:

An event also contains a data object of any value or type including types defined by contracts using #[contracttype]

I don't think it's clear that #[contracttype] is referring to a rust macro. Is there a page we can link to which describes how #[contracttype] is used in soroban smart contracts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Added a cross-reference to the page on Custom Types!

1 similar comment
@Shaptic
Shaptic merged commit 2f4a49b into main Mar 11, 2025
@Shaptic
Shaptic deleted the sdk-examples branch March 11, 2025 18:22
@stellar-jenkins

Copy link
Copy Markdown

Something went wrong with PR preview build please check

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.

3 participants