I volunteered to challenge functional questions for a meetup where we simulate Ethereum by the use of Post-Its. I want to stay as close to the technical reality as possible. Would you be willing to offer your expertise for checking my assumptions?

We simulate the creation of a new Smart Contract. Is it safe to say:

  • Some properties of the Transaction (such as its Id and Gas usage) is added to the new block.
  • As such it is possible to check if the Transaction was a success by passing the Transaction id to a tool like etherscan.io/txs.
  • Etherscan may inspect the Blockchain or trace its events to retrieve the details of the Transaction.

The posts that I found are contradicting. For instance "Can a contract view details of a TX" says "no", whereas "Need for Merkle path of a transaction" says "yes".

I am sorry if I am duplicating. I could not bring things together so I will be most happy if you could indicate if my assumption is correct.


The contradiction you're perceiving is because there are two different vantage points involved:

  1. What can a contract during execution see?
  2. What can someone examining the Ethereum blockchain and associated data see?

The details of a transaction are not available to a smart contract during its execution. But the details are fully available to anyone who has downloaded the data of the blockchain, e.g. Etherscan.

Although not directly related, this post of mine explains those two vantage points: Making Smart Contracts With Public Variables.

For more about how contract deployment works, see How Smart Contract Deployment Works and perhaps How Ethereum Transactions Work.

  • That clarifies a lot. My thx to smarx. Jan 21 '18 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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