1

I have a private blockchain deployed on one machine and Mist & Ethereum Wallet on another machine. Both the machines are connected through RPC. I have made a simple smart contract which adds two numbers.

I submit a transaction through Mist which gets sent to the blockchain.

Suppose, my inputs are 4 & 5, where are these inputs stored in the blockchain? Where is the output stored? Can I access these logs?

1

On the machine, where your geth node is running, you can call geth attach ipc:<PATH_TO_IPC_FILE> to open the console of the node. The IPC file is usually located at datadir/geth.ipc.

Via the console you can fetch the transactions, transaction receipts and storage values using the web3 0.2x.x API (->https://github.com/ethereum/wiki/wiki/JavaScript-API).

Examples:

  • eth.getTransaction(<TRANSACTION_HASH>)
  • eth.getTransactionReceipt(<TRANSACTION_HASH>)
  • eth.getStorageAt(<CONTRACT_ADDR>, <POSITION>)

However, all data is in the encoded form, so it will not be very readable. it can be decoded if you have the ABI (interface) of the contract. -> "How to decode input data from a transaction?"

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.