Hi,
I’m trying to get transaction logs for a particular wallet address on the sepolia netwok, but the response I get is empty. This is the response {“jsonrpc”:“2.0”,“id”:1,“result”:}
I’m a bit of a newbie, so I’m probably missing something obvious. Any help greatly appreciated.
This is the curl that I’m using
curl --request POST
–url https://sepolia.infura.io/v3/MYINFURAKEY
–header ‘accept: application/json’
–header ‘content-type: application/json’
–data ’
{
“method”: “eth_getLogs”,
“params”: [
{
“fromBlock”: “earliest”,
“address”: “0xBae5dBF845BC41c7DEa8534a2dAC80927134FD50”
}
],
“id”: 1,
“jsonrpc”: “2.0”
}’
Thank you very much indeed. That was very helpful for me. I was able to get a log and I can parse out the stuff I need.
If I wanted to get a trace of all transactions for a given wallet address how should I tackle that?
Steve
It depends if you want to track new incoming transactions or look at historical data:
for historical data
Typically you’d fetch the block range you’d need and then for each block you’d list the transactions and then filter the address you need. Tt takes a fair amount of requests, the alternative is to use an enhanced API that gives such data from one(ish) shot ex Get native transactions by wallet | Moralis Web3 Documentation