0

Lets say I have the following contract.

contract sendEther {
    function sendEther() payable {
        address to =  <Address2>;
        to.send(this.balance);
    }
}

If address1 deploys this contract with 100 ether. This contract deployment transaction will be recorded on the blockchain. However, the .send function results in an internal transaction. Where will this internal transaction sending the ether to address2 be recorded ?

harmanw
  • 147
  • 1
  • 4
  • What you have is old way of doing constructor, and that code runs douring step up(first time contract is initialized). The above code would not even run properly because balance may not be accessible this period – user618677 Jun 08 '19 at 10:29

1 Answers1

1

"Internal transaction" is a bit of a misnomer. The "internal transaction" is not directly recorded anywhere. It's just part of the execution of the transaction.

user94559
  • 59,196
  • 6
  • 103
  • 103