Solidity undefined
Asked Answered
T

1

5

I have a question when I use solidity to compile a simple contract. It like that:

> web3.eth.getCompilers()
["Solidity"]
> source = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }"
"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }"
> source
"contract test { function multiply(uint a) returns(uint d) { return a * 7; } }"
> clientContract = eth.compile.solidity(source).test
undefined

I don't know why the result is "undefined", what is wrong? I'm using it on the mac os.

Tempting answered 6/2, 2017 at 6:23 Comment(1)
Also have the same question in Ubuntu.Tempting
M
7

According to Greeter variables are all undefined and contract doesn't run undefined in JavaScript isn't a bad thing. Variable declarations always return undefined, its nothing to worry about.

So to answer your question, nothing is wrong, just proceed with your compiled clientContract and ignore the undefined return message.

Madeup answered 27/2, 2017 at 20:26 Comment(1)
Thanks for your answer. I solve this question. That is not a wrong, is the solidity version change.Tempting

© 2022 - 2024 — McMap. All rights reserved.