On the comments here: https://ethereum.stackexchange.com/a/6011/4575

For a transaction to a contract, the contract vm instructions will execute and the steps are shown in the status.structLogs, so status.structLogs.length will always be > 0. For a transaction to another non-contract account, status.structLogs.length will be 0.

I have called a function on my contract account:

> myContractInstance.createCluster(128, "hello" , {from: web3.eth.accounts[0], gas: 1999999 } )

> eth.getTransactionReceipt("0x93705fa9c6d240351045ed33505ec714965ce3698b879c94a43ac9b96a9c30b9")
  blockHash: "0x72b97812c160c4a1b4995925d31648df1cfe0a391a3ec4a9a9d6f2ffd7cccf17",
  blockNumber: 1029605,
  contractAddress: null,
  cumulativeGasUsed: 22168,
  from: "0x75a4c787c5c18c587b284a904165ff06a269b48c",
  gasUsed: 22168,
  logs: [],
  logsBloom: "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  root: "0x4239343552f216d8d2063c90364340b875590fb85b24218bf3e94ee3cdf8f916",
  to: "0xaf9cac40ab2bb30ff54bba692ed4eb2a9cc46c24",
  transactionHash: "0x93705fa9c6d240351045ed33505ec714965ce3698b879c94a43ac9b96a9c30b9",
  transactionIndex: 0

[Q] After transaction has been deployed, debug.traceTransaction() returns a empty structLogs: []. What might be the reason?

> status = web3.debug.traceTransaction("0x93705fa9c6d240351045ed33505ec714965ce3698b879c94a43ac9b96a9c30b9")
  gas: 22616,
  returnValue: "",
  structLogs: []

Please note that I have followed following guide: https://ethereum.stackexchange.com/a/11031/4575. I guess the issue is related how I imported the libraries. When libraries and the contract on the same file I was able to deploy my contract but when I have used import "localPath/LinkedList.sol"; the problem I mentioned occurred.

  • I just checked on etherscan.io for mainnet, kovan, and ropsten. The transaction hash you reference doesn't show up on any of those chains. Are you on a private chain or something? Apr 8 '17 at 22:56
  • Oh I am sorry to mention, yes I am on private chain. @Thomas Jay Rush
    – alper
    Apr 9 '17 at 7:04

Your Answer

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

Browse other questions tagged or ask your own question.