I need to get transaction list within theDAO system. Is it possible or it's the same case of getting the internal transactions in Ethereum? I want to know if there is a mechanism within theDAO to get these transactions.
-
I'm not positive, but I think this might help: ethereum.stackexchange.com/questions/6320/…– Thomas Jay RushCommented Jun 20, 2016 at 14:37
-
Etherscan is able to get them, but I need to do it by code. By the way, TheDAO is currently dead so this feature can wait now.– Pablo YaboCommented Jun 21, 2016 at 16:08
2 Answers
you can find the internal transaction list in a block explorer like here for instance.
-
I need them by code, only interacting with a ethereum node, I mean without using any external web API. Commented May 20, 2016 at 16:15
-
I think you're looking to read events. Transactions are on the chain, and have the 'input' data field populated with the function name and parameters to the function. The events generated by the function calls (which may be many levels deep and recurse) are not direct transactions. But as the functions execute they may have been coded to make log entries (Events). I'm starting to think that this is what people mean by 'internal transactions.' I think this means the logs (events) generated during the function calls. Not 100% sure though. Commented Jun 22, 2016 at 17:13
I am not sure what you mean about "getting the internal transactions", but perhaps you have misunderstood how ethereum functions, so here is a quick primer.
Nothing changes, no variables are updated, and no code executes on their own. The ONLY time anything changes is when the following conditions have been met:
- A transaction is sent to the contract.
- The transaction is included in a block.
It is possible that a transaction is sent, but rejected by the contract, or not (yet) included by a miner into a block. Under those conditions the state of all the variables and data held in structures has not changed. Therefore there is no possibility that there are internal transactions that execute outside of these conditions.
Having said that it is possible that once you have executed a transaction the first contract calls another contract and that other contract might call others. If that happens, you will not see the intermediate "transactions" - they will not be recorded in the blockchain. Only the resuits of any state changes to variables and data are recorded from those other "transactions".
-
1Internal transactions are the ones that changes the balance within DAO but keeps the ethereum balance intact. Here: github.com/slockit/DAO/wiki/Understanding-the-DAO-accounting you can see that a lot of money movements occur within DAO and these transactions are not part of the blockchain, they exist in the blockchain but as code executed. Commented May 19, 2016 at 20:02
-
I didn't look at the source code, but didn't TheDao enable logging (Solidity Events) in their code?– Paul SCommented Jun 20, 2016 at 1:10