I use Parity's trace facility extensively to help me account for all transactions on individual accounts. I've been able to get almost complete accuracy (off-chain) of account balances for each block, but I'm having trouble with suicide
calls.
This contract...
pragma solidity 0.4;
contract BadIdea {
address recipient;
function BadIdea(address _r) { recipient = _r; }
function () payable {}
function kill() { suicide(recipient); }
}
...which is admittedly ridiculous--it accepts money from anyone and sends it to recipient
--helps me ask my question. The transaction of a 'kill' call to this contract looks something like this:
Transaction:
=============
{
"date": "2017-03-15 20:43:44 UTC",
"block": 3189912,
"from": "0xb970..."
"to": "0xd450aa..."
"input": "0xdaf3450000000..."
....
}
and the trace generated by Parity looks like this:
Trace:
=============
{
"blockHash": "0x9ee74ad...",
"blockNumber": 3189912,
"subtraces": 0,
"traceAddress": [],
"transactionHash": "0x8324490c...",
"transactionPosition": 7,
"type": "suicide",
"action": {
"from": "0x0",
"gas": 0,
"to": "0x0",
"value": 0
},
"result": {
"gasUsed": 0
}
}
The transaction tells us which contract is suiciding (the transaction's 'to' value), but I don't see any way (from the perspective of the trace alone) of finding out what address the balance of the contract was sent to.
Of course, we know that the value was sent to recipient
, but because I want to account off-chain (and I want to do so totally ignorant of the source code), I need something that indicates which account received the balance from the suicide. It does not appear to be included in the trace.
Question: Is there any way to tell which account receives the value from a suiciding contract from the RPC retrieved transaction and/or trace data alone?