wharfkit / antelope

Core types, client interfaces, and other tools for working with Antelope-based blockchains.
Other
44 stars 23 forks source link

get actions instead of traces #104

Closed dev-dantealighieri closed 9 months ago

dev-dantealighieri commented 9 months ago

i want to get only the actions created by the creator of the transaction but history api returns whole transaction to me,

im using the following code snippet to get the transaction

const transaction = await this.indexerRequest(
      EOS_INDEXER_API.V2.GET_TRANSACTION,
      {
        params: {
          id: transactionHash,
        },
        method: GET_METHOD,
      },
    );

example transaction

for example in here, i want to only filter the following actions, not traces, which are

image

how to filter correctly? i tried to use creator_action_ordinal but thats not what i was looking for

thanks, Dante

aaroncox commented 9 months ago

I believe you want to filter the traces where the receiver is the account you're interested in. Without knowing more though its hard to tell.

There was a conversation about 2 weeks ago in Telegram related to this:

https://t.me/antelopedevs/337237

I'd recommend bringing these kinds of questions up in Telegram, rather than here. This isn't a bug/issue with the Antelope library, but more of a question on understanding what the APIs are outputting and how to interpret it. You'll likely get faster responses as well 👍

dev-dantealighieri commented 9 months ago

i want to get only the actions created by creator of transaction, which is 5 in this case, all of them have creator_action_ordinal equal to 0 in the hyperion v1, but in the v2 they are not, that is weird, and i want to find a way to do the same that i can do in v1