tronprotocol / tron-grid

10 stars 13 forks source link

Pagination compatibility #9

Closed hiendv closed 5 years ago

hiendv commented 5 years ago

Hi, I'm trying to get a list of events with pagination support. Because tron-grid does not support page and local event server does not support _fingerprint. I'm asking for a pagination method to use in both local and tron-grid server.

hiendv commented 5 years ago

ping @sullof

sullof commented 5 years ago

To have next page, just add the fingerprint to next request. In TronWeb, you can add the property to the options object passed to getEventResult.

hiendv commented 5 years ago

@sullof Well, the thing is, local tron event server (tron quickstart) does not support _fingerprint

hiendv commented 5 years ago

@sullof Please re-open the issue

sullof commented 5 years ago

That is not possible. The Eventron code uses Tron Quickstart for the test unit, and in the tests there are extensive tests about pagination.

sullof commented 5 years ago

Try to use the new format

http://localhost:9090/v1/contracts/[contract_address]/events
sullof commented 5 years ago

Even better, use the new TrongridJS lib https://github.com/TRON-US/trongrid-js Use it only for events because the account/asset API are in testing and require an accessCode

hiendv commented 5 years ago

@sullof So basically, I have to write different codes to paginate the events depending on the event server?

if (trongrid)
    use fingerprint
else
    use page
hiendv commented 5 years ago

The trongrid-js library is not public though.

manish8561 commented 3 years ago

nile test network fingerprint not working properly