sui icon indicating copy to clipboard operation
sui copied to clipboard

Is there an api to getAllTransactions by time?

Open Wangmmx opened this issue 3 years ago • 6 comments

Hi, I want to get all transaction by time range, the sui_getTransactionsInRange can get transactions by sequence, but I can not get the sequence in transaction details, It is inconvenient for me to check whether past transactions have been verified. And the sui_getEventsByTimeRange only get transfer SUI transactions, if the transaction type is Pay, I can not get this either, so I missed a lot transactions

Wangmmx avatar Oct 31 '22 08:10 Wangmmx

With the new transaction query API you can query transactions with cursor if you have the last know transaction digest. We will be deprecating sui_getTransactionsInRange soon as it can be replaced by the new sui_getTransactions method.

Missing events from the new Pay transaction is an known issue and its fixed by this PR https://github.com/MystenLabs/sui/pull/5289, should be available after next devnet update.

patrickkuo avatar Oct 31 '22 09:10 patrickkuo

Thanks for your fast reply, then I will continue to use the sui_getEventsByTimeRange method and wait for the next upgrade, thanks again, closing the issue now

Wangmmx avatar Oct 31 '22 10:10 Wangmmx

Hi, I found sui_getEventsByTimeRange is deprecated? I need to get all transactions by time, sui_getTransactions can not replace the api I want, will the sui_getEventsByTimeRange added again? Or is that possible to add a new one like sui_getTransactionsByTimeRange?

Wangmmx avatar Nov 07 '22 09:11 Wangmmx

Hi, I found sui_getEventsByTimeRange is deprecated? I need to get all transactions by time, sui_getTransactions can not replace the api I want, will the sui_getEventsByTimeRange added again? Or is that possible to add a new one like sui_getTransactionsByTimeRange?

It still works, only disappear in docs :)

Wangmmx avatar Nov 07 '22 09:11 Wangmmx

sui_getEventsByTimeRange is deprecated, method not found now, any other apis to replace it? I need to get transactions by time, thanks a lot

Wangmmx avatar Nov 09 '22 05:11 Wangmmx

the sui_getTransactions method is complicated with the page params, I need to scan txs from time, so the deprecated one sui_getEventsByTimeRange is ok for me to get all events with a time, because of the large amount of events, I had spent a lot of time optimizing the code, but now it can not work. Is it possible to add an api like get transactions by time range? I really need it, thanks again

Wangmmx avatar Nov 09 '22 05:11 Wangmmx