Skip to content

Ledger/Registry/Asset Endpoints#642

Draft
jforseth-figure wants to merge 6 commits into
mainfrom
jforseth/new-module-parsing
Draft

Ledger/Registry/Asset Endpoints#642
jforseth-figure wants to merge 6 commits into
mainfrom
jforseth/new-module-parsing

Conversation

@jforseth-figure

@jforseth-figure jforseth-figure commented Aug 25, 2025

Copy link
Copy Markdown
Contributor

Description

This PR is meant to provide endpoints for more detailed asset information in Pulse.

closes: #XXXX


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

fun saveLedger(txInfo: TxData, tx: ServiceOuterClass.GetTxResponse, txUpdate: TxUpdate) {
for (message in tx.tx.body.messagesList) {
logger.info("Message type: ${message.typeUrl}")
if (!message.typeUrl.contains("ledger")) {

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.

Do a starts with match on the "provenance.ledger"

}
}
for (event in tx.txResponse.eventsList) {
if (!event.type.contains("ledger")) { continue }

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.

same - do a startsWith provenance.ledger

if (!event.type.contains("ledger")) { continue }
logger.info("Event type: ${event.type}")
when (event.type) {
"provenance.ledger.v1.EventLedgerCreated" -> {

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.

there could be a ton of these event types - do we need to know each of them individually? i think the events table has a column for the type so it may not be necessary to parse them out individually

@jforseth-figure jforseth-figure deleted the jforseth/new-module-parsing branch August 25, 2025 21:34
This reverts commit 8ef81b9.
Chain message parsing appears to already handle this. No additional
`save____()` functions are needed.
@jforseth-figure

Copy link
Copy Markdown
Contributor Author

Currently doesn't work because it can't decode the "provenance.registry.v1.MsgGrantRole" messages. Once 1.26 is released and we have the protos, it should work?

@jforseth-figure jforseth-figure changed the title New module parsing Ledger/Registry/Asset information Aug 26, 2025
@jforseth-figure jforseth-figure changed the title Ledger/Registry/Asset information Ledger/Registry/Asset Endpoints Aug 26, 2025
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.

2 participants