Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Automatically decode XDR structures for Server.getEvents #156

Merged
merged 6 commits into from
Oct 9, 2023

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Oct 6, 2023

This makes the following changes to the expected schema for getEvents endpoint:

-   contractId: string;
+   contractId: Contract;
-   topic: string[];
+   topic: xdr.ScVal[];
-   value: {
-     xdr: string;
-   };
+   value: xdr.ScVal;

In particular,

  • events[i].contractId is now an instance of Contract
  • events[i].topic is now a list of decoded xdr.ScVal instances
  • events[i].value.xdr is now remapped directly to events.value
  • events[i].value is a decoded xdr.ScVal instance

Related: #128.

@Shaptic Shaptic requested a review from sreuland October 6, 2023 21:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants