嘿,我正在开发一个简单的关于solidity的智能合约,我遇到了一个问题。每次尝试运行setWord函数时,我都会收到一个错误“transact to HelloWorldContract.setWord errored:error encoding arguments:SyntaxError:JSON中位置2的意外标记h”可能是什么问题?
pragma solidity ^0.4.0;
contract HelloWorldContract{
string word = "Hello World";
address issuer;
function HelloWorldContract(){
issuer = msg.sender;
}
function getWord() constant returns(string) {
return word;
}
function setWord(string newWord) returns(string) {
if(issuer != msg.sender){
return "this is not the creator!";
}
else{
word = newWord;
return "this is the creator!";
}
}
}