Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Transaction status within tm2 / bank package: About #std.Emit() and output #2056

Closed
thinhnx-var opened this issue May 8, 2024 · 2 comments

Comments

@thinhnx-var
Copy link
Contributor

Description

As mentioned in #1653 , when users maketx, with a realm includes this:

std.Emit("t", "k", "v")

Output:

[{"type":"t","pkg_path":"gno.land/r/demo/emit","func":"funcName","attrs":[{"key":"k","value":"v"}]}]

Use Case:
Sender should know the progress of the transactions
Current Status:
std.Emit() will public an event where is contructed in GnoVM and attached on SDK.EventLogger() without any store / filter / listen feature to these step.

In order to give users more informations, with the specific tm2 / bank module, I think EventLogger machine should have:

  • Filters logic
  • Subscribe / Listen logic
  • Unsubscribe logic

This will help monitoring the eventLogs, give user useful information about transaction.

Related Knowledge

I found events package implemented with same ideas. Can we pipe the event emissions in GnoCode following this events?

If it makes sense to consider, or I miss-understand, lets discuss!
Thanks <3

@thinhnx-var thinhnx-var changed the title Transaction status with bank bussiness: About #std.Emit() and output Transaction status within tm2 / bank package: About #std.Emit() and output May 8, 2024
@thinhnx-var thinhnx-var changed the title Transaction status within tm2 / bank package: About #std.Emit() and output Proposal: Transaction status within tm2 / bank package: About #std.Emit() and output May 8, 2024
@zivkovicmilos
Copy link
Member

Hey @thinhnx-var,

The functionality you're proposing here is already a WIP on the tx-indexer.

We want to keep any specific indexing / subscribing / filtering logic outside of TM2

@zivkovicmilos
Copy link
Member

You can also see the transaction status using the tx-indexer - check out our GraphQL API

I'm closing this issue 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants