offset and count queries not supported
99Kies opened this issue · 5 comments
99Kies commented
this is my cosmwasm version:
github.com/CosmWasm/wasmd v0.43.0
github.com/CosmWasm/wasmvm v1.5.0 // indirect
github.com/cometbft/cometbft v0.37.2
github.com/cometbft/cometbft-db v0.8.0
github.com/cosmos/cosmos-sdk v0.47.5
url: https://vota-testnet-rest.dorafactory.org/cosmwasm/wasm/v1/code?pagination.limit=20&pagination.count_total=true
error log:
{
"code": 3,
"message": "offset and count queries not supported",
"details": [
]
}
99Kies commented
I found that I need to remove the pagination for the query to succeed, why is that? (This is not consistent with the parameter requirements of the other rest methods)
https://vota-testnet-rest.dorafactory.org/cosmwasm/wasm/v1/code?limit=20&count_total=true
alpe commented
The offset/ count implementations are very inefficient in the SDK. Just use the normal token pagination
alpe commented
when the next key is null, then you have reached the last page.