2017-02-06 4 views
1

단순 계약을 컴파일 할 때 견고성을 사용할 때 질문이 있습니다. 그런 그것은 :고결함 정의되지 않음

> 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 

나는 결과가 "정의되지 않은"왜 몰라, 무슨 일입니까? 나는 맥 오에스에서 그것을 사용하고 있습니다.

+0

또한 우분투에서 같은 질문이 있습니다. –

답변

2

에 따르면 JavaScript의 Greeter variables are all undefined and contract doesn't runundefined은 나쁜 것이 아닙니다. 변수 선언은 항상 undefined을 반환하므로 걱정할 필요가 없습니다.

귀하의 질문에 답변하려면 아무 것도 잘못되었습니다. 그냥 clientContract으로 컴파일하고 undefined 답장 메시지는 무시하십시오.

+0

답변 해 주셔서 감사합니다. 나는이 질문을 해결한다. 그건 틀린 것이 아니며, 견고성 버전이 바뀌는 것입니다. –