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

[Question]: Why is Transaction API Not Working with cosmos-sdk v0.50 (gaiad >= v19.x) #3347

Open
1 task done
mayank-daga opened this issue Sep 18, 2024 · 1 comment
Open
1 task done

Comments

@mayank-daga
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

A bug happened!

Gaia Version

v19.1.0

How to reproduce?

Hi,
I am using to get particular event transactions but it is giving me following response:

{
"code": 13,
"message": "query cannot be empty",
"details": []
}

API: http:///cosmos/tx/v1beta1/txs?events=message.sender='cosmos1w5jleaknx4qhh8exw86eea0ckpeqzuu68kca3l'&page=1&limit=10

It was working with earlier versions

@mayank-daga mayank-daga added status: waiting-triage This issue/PR has not yet been triaged by the team. type: bug Issues that need priority attention -- something isn't working labels Sep 18, 2024
@MSalopek MSalopek added general questions and removed type: bug Issues that need priority attention -- something isn't working status: waiting-triage This issue/PR has not yet been triaged by the team. labels Sep 18, 2024
@MSalopek MSalopek changed the title [Bug]: Transaction API Not Working [Question]: Why is Transaction API Not Working with cosmos-sdk v0.50 (gaiad >= v19.x) Sep 18, 2024
@MSalopek
Copy link
Contributor

Use /txs?query= instead of /txs?events=

https://cosmos-api.polkachu.com/cosmos/tx/v1beta1/txs?query=message.sender=%27cosmos1w5jleaknx4qhh8exw86eea0ckpeqzuu68kca3l%27&page=1&limit=10
-<URL>/cosmos/tx/v1beta1/txs?query=message.sender=...
+<URL>/cosmos/tx/v1beta1/txs?events=message.sender=...

Example:
https://cosmos-api.polkachu.com/cosmos/tx/v1beta1/txs?query=message.sender=%27cosmos1w5jleaknx4qhh8exw86eea0ckpeqzuu68kca3l%27&page=1&limit=10

RPC docs:
https://docs.cosmos.network/api#tag/Service/operation/GetTxsEvent

Relevant section:

Array of strings
events is the list of transaction event type. Deprecated: post v0.47.x use query instead, which should contain a valid events query.
--

string
query defines the transaction event query that is proxied to Tendermint's TxSearch RPC method. The query must be valid.
--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👍 F4: Assessment
Development

No branches or pull requests

2 participants