axieinfinity / ronin

A DPoS blockchain.
GNU Lesser General Public License v3.0
67 stars 30 forks source link

Ronin Delegate, stake and rewards APIs. #429

Closed shaswatsaloni closed 6 months ago

shaswatsaloni commented 7 months ago

Hi All,

Can anyone provide me with the API to get the transactions based on transaction hash, where we are able to get the Transaction type also that if it is normal transfer, delegate, stake or rewards?

Thanks, Saloni.

minh-bq commented 6 months ago

As far as I know, currently, we don't officially support any API to do that. However, you can try to write a small script based on your requirements. For example, you get the transaction hash and want to know if that transaction is delegate

For other kinds of transaction, the process is the same. For the transfer case, it depends on your requirement. Does calling a contract with value != 0 count as a transfer in your requirement?

Hope it helps.

shaswatsaloni commented 6 months ago

Yes, @minh-bq it was really helpful, thanks. I did some analysis from my end and analyzed some of the transaction types. It would be really helpful if you can verify this. Is it safe to say that as you mentioned above, I analyzed the input we get in the API response.

image

Thanks, Saloni.

minh-bq commented 6 months ago

These function selectors look correct.

shaswatsaloni commented 6 months ago

Okay, thanks for confirmation.