Geth query specific information for a transaction

Source: Internet
Author: User
Contract code

pragma solidity ^0.4.6;
 Contract simplestorage{
UINT Storeddata;
function set (UINT x) {
   storeddata=x;
        }
 function get () constant returns (UINT RetVal) {
 return storeddata;
    }
}  


Deployment contract
haha@ubuntu:~/trufflecode$ Truffle compile
compiling simplestorage.sol ...
Writing artifacts to./build/contracts
haha@ubuntu:~/trufflecode$ Truffle migrate
Running migration:1_ Initial_migration.js
  deploying Simplestorage
  ... Simplestorage:0xbcba93b7c51a42e4b4d9ff498f64272338715e80
Saving Successful migration to network
... Saving artifacts ...

The Geth end will output

I1215 17:22:45.321097 internal/ethapi/api.go:940] Tx ( 0XFD6A8480A0E819C7E15599DA2CBDB19F510C639434A499CA7CC0A40EF8156AE3) Created: 0x40d76916b1782b70f5b922719ca4f779a7b2b1eb

which chunk the query contract is deployed in

>eth.gettransaction (' 0xfd6a8480a0e819c7e15599da2cbdb19f510c639434a499ca7cc0a40ef8156ae3 ')
{
  Blockhash: "0x1bfe4bc92817d44843d03712351d2e6b4d79629f8f6bc41bef944d6c3c632e1d",
  blocknumber:8035,
  from : "0x414d9703aa1c26115dc2cdabe225db3bedc7a91f",
  gas:4712388,
  gasprice:100000000000,
  hash: " 0xfd6a8480a0e819c7e15599da2cbdb19f510c639434a499ca7cc0a40ef8156ae3 ",
  input:" 0x6060604052346000575b6061806100166000396000f3606060405260e060020a600035046360fe47b1811460265780636d4ce63c146035575b60005 65b3460005760336004356051565b005b34600057603f605a565b60408051918252519081900360200190f35b60008190555b50565b6000545b9056 ",
  Nonce:12,
  r:" 0x1565976644674d077973e15ebbbfd9816aa16534ec572f71d0ffe5954f6976d1 ",
  S:" 0x6d93f9f0ba07651db19d220fcaa445a8932cbc2a95bc5887211b137ba67713f4 ",
  to:null,
  transactionindex:0,
  V: "0x1c",
  value:0
}
Simple = Eth.contract (ABI). at (' 0x40d76916b1782b70f5b922719ca4f779a7b2beb ')

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.