
There’s two ways to accomplish this: Make 3 individual requests or we can use Javascript’s like a boss 😎 and take full advantage of parallel requests!
You can view the complete responses in ! But for now I’ll highlight the key data fields we need for this example.
Transactions
We need to get the hash and value from the response:
Logs
For logs, we are looking for the topics and transactionHash fields:
Functions
With functions, we want the transactionHash and the input fields:
Step 3: Get Contract Functions (Conditionally)
In the first step we determine the type of the address. If it is a contract then we want to match the full hexadecimal signatures of the function with the human readable name.
Turning this 0xa9059cbb0000000000000000000000000a23...
…into this: transfer(address,uint...
That’s how we are able to display the method name like so:
That’s it!
Give it a try! Add an activity feed into your dApp or project! If you integrate, send us a link and we’ll showcase your integration!
This is just one of many ways you can build using the . In the coming weeks we will be sharing more tutorials, stay tuned!
That’s it for this tutorial, share with colleagues, friends and on social!
We’d love to hear your thoughts in the comments below.
Previous Tutorial:
For more information about Amberdata.io:
- Website:
- Twitter:
Published at Fri, 26 Apr 2019 18:05:25 +0000