2

I'm using etherscan, polygonscan API to get all the transactions from a contract. My goal is to calculate how much money was transacted between sellers and buyers for a certain collection.

At the moment, when I use the API, I only get the value parameter, but there are some transactions where the value is 0 there were tokens sent from the buyer's account to the seller account, open-sea fee account, and project fee account. (see the picture below).

Using the API, how can I get those values?

(I believe that when the value is 0, it means that the tokens used to pay the transaction is from another chain, in this case, WETH. Is this conclusion right?)

Thanks

enter image description here

1 Answer 1

1

You should try to get the past events (or listen them in real time) that are triggered from that specific contract in the operation you are willing to monitor.

You have an explanation and working samples here: https://moralis.io/how-to-listen-to-smart-contract-events-using-ethers-js/

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.