1

I am creating an application which aims to visualize ethereum transactions, so far getting data from geth I have noticed that there are never outgoing transactions from a contract account, and whenever i look at etherscan i cannot find any outgoing transactions either, why is this the case?

I noticed that some contract execution created further contracts as internal transaction, does that mean these new contracts are deleted once the execution of the contract is finished, if not then why are they not recorded as a new transaction from the creating contract? one such contract is https://etherscan.io/address/0xf0160428a8552ac9bb7e050d90eeade4ddd52843 (DigixCrowdSale).

If possible can someone please give an example of a contract issuing a transaction which is recorded on the blockchain, since i have been unable to find any.

3
  • My understanding of transactions is that a transaction changes the world state, thus it is called a transaction and needed to be recorded on the blockchain. So if internal transactions are changing the world state by sending ether and creating contracts, why would they not be recorded as normal transaction? hence my question does that mean all of those call and create function affects are reverted at the end of code execution?
    – Athaheer
    Commented May 20, 2017 at 21:43
  • 1
    A user sends a transaction to a contract which executes its code, and probably change the state as a result. If the contract sends ethers to another user, their balance will increase in the next block, but they won't have an incoming transaction. There is only one transaction which is initiated by the user, and the cumulative fee of all the subsequent "transactions" need to be paid by the transaction sender. Also see tx.origin
    – jeff
    Commented May 21, 2017 at 10:20
  • Thanks for your comment, I was under the impression any transfer of value from a contract code will be considered as a new transaction. So that means a contract code cannot issue a transaction with it own hash, unless the owner of the contract issues a transaction manually
    – Athaheer
    Commented May 21, 2017 at 17:34

1 Answer 1

1

In terms of solidity a contract can send a transaction using:

address.send(amount);
2
  • Would address.send(amount) be recorded as internal transaction or real transaction with a TxHash?
    – Athaheer
    Commented May 20, 2017 at 21:34
  • Should be a normal transaction from the contract of the specified amount. Commented May 21, 2017 at 21:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.