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

Handle MsgExec and process inner transactions for specific types: MsgCyberlink, MsgSend #26

Open
3 tasks
dasein108 opened this issue Apr 6, 2024 · 0 comments

Comments

@dasein108
Copy link
Member

dasein108 commented Apr 6, 2024

In case if user grant rights for some transaction execution to third-aprty account(using autz), cyberindex should put that transaction into indexer tables.
Example of transaction:

{
  "@type": "/cosmos.authz.v1beta1.MsgExec",
  grantee: "bostrom1jstcnxs65r7jvuaaktq3dvpfer0dg200xzknev",
  msgs: [
    {
      "@type": "/cyber.graph.v1beta1.MsgCyberlink",
      neuron: "bostrom1959r3zp37k9yuz8kjtc4feayyfkkxpcv43mu0w",
      links: [
        {
          from: "QmR7zZv2PNo477ixpKBVYVUoquxLVabsde2zTfgqgwNzna",
          to: "QmZdKqcYqYGy88QpUGZpqjmDUkwm6gZBhygxtSHbCKzbAV",
        },
      ],
    },
  ],
},

Potential solution(ex. cyberlinks):
https://github.com/cybercongress/cyberindex/blob/main/modules/graph/handle_msg.go
Apply custom handler that filter MsgExec and perform save action for inner transactions same was as for regular transactions.

Should be done for types

  • MsgCyberlink
  • MsgSend

As result data should be able inside GraphQL

  • paticles
  • cyberlinks
  • messages*
  • to be discussed: transactions executed behind neuron with third-party(grantee) account, should be listed as neuron(granter) transactions. for example if grantee executed some MsgCyberlink, it's should appears inside messages_by_address query transactions
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

No branches or pull requests

1 participant