当我想从以下智能合约中调用函数greet()时,我不断收到此错误:BigNumber Error: new BigNumber() not a base 16 number
:
contract Greeter {
string greeting;
function Greeter(string _greeting) public {
greeting = _greeting;
}
function greet() constant returns (string) {
return greeting;
}
}
这是脚本:
var contractAddress = process.argv[2];
//var contractAddress = '0x21967ce2eb8c5fa2e9bac524e83f116c0fe989ca;
var contractInstance = GreeterContract.at(contractAddress);
contractInstance.greet.call().then(function(result) {
console.log('contract greeter: '+result);