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

/cosmos/tx/v1beta1/txs endpoint's pagination issue #10511

Closed
4 tasks
BenWolfaardt opened this issue Nov 9, 2021 · 2 comments
Closed
4 tasks

/cosmos/tx/v1beta1/txs endpoint's pagination issue #10511

BenWolfaardt opened this issue Nov 9, 2021 · 2 comments
Assignees
Labels

Comments

@BenWolfaardt
Copy link

Summary of Bug

When searching for transactions above a certain height, as recommended in issue #10448, the resulting limit is applied, however, the pagination isn't working as the "next_key": null which is not the expected return.

If you could please kindly take a look at this it'll be greatly appreciated.

Request

GET https://api.cosmos.network/cosmos/tx/v1beta1/txs?events=tx.height>=8294900&pagination.limit=10&order_by=ORDER_BY_DESC

Response

{
  "txs": [
    ...
  ],
  "tx_responses": [
    ...
  ],
   "pagination": {
        "next_key": null,
        "total": "220"
    }
}

Similar Issues

Version

Cosmos SDK v0.42.6 (Gaia v5.0.2 / cosmoshub-4)

Steps to Reproduce

Perform the above-outlined steps.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@aleem1314
Copy link
Contributor

Try pagination.offset=10 instead of pagination.key. The SDK simply proxies /cosmos/tx/v1beta1/txs request to Tendermint and it only supports pagination with offset.

@BenWolfaardt
Copy link
Author

Thank you @aleem1314 for your suggestions. We've been able to successfully implement them and achieve that which we wanted to.

Kind regards,

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

No branches or pull requests

3 participants