Closed shaswatsaloni closed 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
delegate(address)
is 0x5c19a95c (you can get these 4 bytes by looking at the original input date of other delegate transactions or using cast command in foundry (https://book.getfoundry.sh/getting-started/installation), cast sig "delegate(address)"
)to
field in the returned information of step 1, make sure it is Ronin Staking address (0x545edb750eb8769c868429be9586f5857a768758)data
field of returned information of step 1, make sure it is 0x5c19a95cFor 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.
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.
Thanks, Saloni.
These function selectors look correct.
Okay, thanks for confirmation.
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.