当我使用solidity来编译一个简单的合约时,我有一个问题。是这样的:
> 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
Run Code Online (Sandbox Code Playgroud)
我不知道为什么结果是“未定义”,有什么问题?我在 mac os 上使用它。