Ethereum 返回实体中的对象数组
我试图从合同中返回一个示例对象,但数据始终为空。我正在使用BlockApps WebApi来完成这项工作()。它总是返回一个逗号分隔的空字符串。有什么帮助吗Ethereum 返回实体中的对象数组,ethereum,solidity,Ethereum,Solidity,我试图从合同中返回一个示例对象,但数据始终为空。我正在使用BlockApps WebApi来完成这项工作()。它总是返回一个逗号分隔的空字符串。有什么帮助吗 contract TrackingManager { Hit[] hits; function createHit(string _url, string _referrer) { hits.push(new Hit(_url, _referrer)); } function getHit
contract TrackingManager {
Hit[] hits;
function createHit(string _url, string _referrer) {
hits.push(new Hit(_url, _referrer));
}
function getHits() returns (Hit[]) {
return hits;
}
}
contract Hit {
string public url;
string public referrer;
function Hit(string _url, string _referrer) {
url = _url;
referrer = _referrer;
}
}
我可能错了,但我认为还不可能返回结构数组:而且