New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to list contract/internal transactions via JSON-RPC API #3128
Comments
Use the management api, specifically |
Is there any sample code anywhere for this? It's basically decoding assembly language. |
Bump. As times goes on and people use contracts more it is vital we are able to see and process these internal transactions; even telling people not to send from contracts we have to manually adjust balances and send refunds from these on a daily basis since they don't pay attention or don't know any better. |
Has there been any movement on this, either through an issue or fork? I am currently working on a project that might require this, don't mind taking a crack at extending the library. |
So, there are two ways to do it. Tracing
That example stores the argument to This type of usage is good if you want to be able to analyze transactions programatically in-depth. If you are a programmer, and knows the VM. ExternallyIf you are interested in e.g. deposits, and maintain balances, the tracing API might not be for you. There are potential pitfalls, for example - Tx A, invokes If not, I would recommend using |
Usually that means you don't have state enabled and/or that block was fast synced. |
That query though... it would return all modified accounts between genesis and 51K blocks -- meaning 1) that it needs to be a full sync and 2) it will be a humongous list. |
@Crypto2 I tried to restart my geth node but still got the error. would you mind pointing out what might be the issue ? For your information, the geth node is for a private net and there's only one node (itself) in this private net. The command to start geth is geth --datadir "~/eth-private" \
--identity "Private" \
--networkid 15 \
--nodiscover \
--maxpeers 0 \
--rpc \
--rpcaddr "0.0.0.0" \
--rpccorsdomain "*" \ //just for testing
--gcmode=archive \
--syncmode full \
--mine |
Hmm, in theory you should have state for it then (although I'm no expert) |
OK, so MyEtherWallet knows what tokens I have. I plugged in my Trezor and there the tokens were. I did a trace with fiddler, and I can see the JSON RPC call to get the token's balance. I can make that call and replicate the value. But, how did MyEtherWallet know that the token was there without there being a call to get the transactions at an address? |
How do you list contract/internal transactions via JSON-RPC API? Preferably all of them in an entire block or not as efficient for a specific address?
For example: https://etherscan.io/address/0x00e41ddeb656788dc150956b6ffe175b54b61d8a#internaltx
The text was updated successfully, but these errors were encountered: