Downloading all "Transfer" transactions of a BSC token from a date

Hi guys, hopefully it’s a quick one, please be gentle as I’m a total noob.

I’m doing some investigatory work and need to export to CSV all transactions from a BSC token, with a few parameters:

Token address: 0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3
Token name: Safemoon

On BSCScan, you can see the “Method” has a few names - I want to only exclude “Migrate” - so I’m only looking for “Transfer” or “Swap exact tokens for ETH” (or others)

And I’d like to only see records from AFTER 2021-12-29 15:59:59 UTC

Based on estimations, this should result in some 60,000 or so records.

I’d like to see the BSC / USD equivalent of the Safemoon tokens that were transferred.

My reasoning for this is that the Safemoon team enacted a 100% tax after the above date and so anybody that transferred tokens had them effectively confiscated with no route to recover them.

This is what I have so far:

query MyQuery {
ethereum(network: bsc) {
smartContractCalls(
smartContractAddress: {is: “0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3”}
time: {since: “2021-12-29T16:00:00”}
smartContractMethod: {is: “transfer”}

) {
  count
}

}
}

This results in 68,605 records which sounds right, but I want to list them all individually and export them rather than a count.

Thank you!

The total count is a lot higher

query MyQuery {
  ethereum(network: bsc) {
    smartContractCalls(
      smartContractAddress: {is: "0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3"}
      time: {since: "2021-12-29T16:00:00"}
      smartContractMethod: {not: "Migrate"}
    ) {
      count
    }
  }
}

image

I am attaching some links that could help you:
1, Tabular Data Available and it's downloadable in CSV
2. safemoon smartcontract

You can check articles on community and graphql queries on https://graphql.bitquery.io/

Hope this helps

1 Like

Hi, I think there’s an issue with the “not” because when you remove it, the total is still

“count”: 1161317

So if I say "not: “migrate”, or just remove it entirely, the count is still 1,161,317 (actually it’s 1,161,318)

For that reason I’m sticking to just “transfer” for now, but I’ll need to do an additional transaction to get swap exact eth for tokens because I’ll need to log purchases as well as transfers.