I'm analyzing interactions between accounts in Ethereum. I started by external transactions (sent from accounts), but wanted to extend the analysis to external ones (resulting from smart contract execution). For instances, if there's a transaction invoking a smart contract function paying several accounts (from an internal contract list), I'd like to extract those accounts. E.g., in this contract, I'd like to extract the accounts being paid in transaction invoking payAll().
Following this thread, I set up Parity in archive mode (--pruning=archive) and tried to use traceReplayTransaction in different modes. However, I'm still not able to get the accounts from the output.
I've also tried ethereum-input-decoder, but it only provides me with accounts provided as as arguments to smart contract functions.
This paper suggests that I should extract CREATE, CALL, CALL-CODE, DELEGATE-CALL and SELFDESTRUCT EVM operations, but I'm not sure what's the easiest way to do that.
Any help will be highly appreciated!
EDIT:
Thank you for all the answers. To get the required information, I've set up parity in archive mode (--pruning archive) and called trace_replayTransaction in stateDiff mode on each transaction. This method should work on other clients as long as they implement the RPC call. An important note when running parity in dev mode is that, in my case, it was not showing the last submitted transaction, so make sure that you submit a new transaction after the one you want to observe.
E.g., if in a contract, I call a function without any parameters and it executes
some_address.transfer(), willsome_addressbe shown in the action block?When using VMTrace mode, I see a lot of data in the ops section, also including some address-like strings (0x + 64 chars), but not sure if those are actual address that I should extract using some regular expressions.
– harnen Mar 31 '21 at 08:32inputfield will catch only accounts submitted in the transaction, but will omit accounts that are already in the contract (say set up in the constructor, or submitted before)? In any case, tomorrow I plan to set up a custom smart contract with all the possible ways of storing and interacting with the accounts and see whether I can grab everything fromtrace_replayTransaction. The next thing I do, is to come here to report and (hopefully) mark as resolved :) – harnen Apr 08 '21 at 08:13