1

I have a smart contract which I am invoking through webjs. Everything works well untill I am on Windows. Recently i had to move to Linux Mint. Now when i compile the contract. I get stdin in the compiled code. Becuase of this, I am not able to access the value of code. I verified the issue by running a simple smart contract on the command line, as follows-

>eth.getCompilers()
["Solidity"]
> var testSource='contract Test {  function double(int a) constant returns(int) { return 2*a; } }';
undefined
> var testCompiled = web3.eth.compile.solidity(testSource);
undefined
> testCompiled
{
  <stdin>:Test: {
    code: "0x60606040523415600b57fe5b5b60788061001a6000396000f300606060405263ffffffff60e060020a6000350416636ffa1caa81146020575bfe5b3415602757fe5b60306004356042565b60408051918252519081900360200190f35b600281025b9190505600a165627a7a72305820bf2f987fd5895006a3af08154264d6de5a6d35b25eb3f85572f8264ab26db1b70029",
    info: {
      abiDefinition: [{...}],
      compilerOptions: "--combined-json bin,abi,userdoc,devdoc --add-std --optimize",
      compilerVersion: "0.4.9",
      developerDoc: {
        methods: {}
      },
      language: "Solidity",
      languageVersion: "0.4.9",
      source: "contract Test {  function double(int a) constant returns(int) { return 2*a; } }",
      userDoc: {
        methods: {}
      }
    }
  }
}

Note I have tried compiling this with both with stable solc version for Linux and latest dev version of Solc with same results.

marked as duplicate by Richard Horrocks, The Officious BokkyPooBah, Matthew Schmidt, niksmac, Community Feb 9 '17 at 4:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.