稳固性返回对象数组



im试图从合同中返回样本对象,但数据始终为空白。我正在使用BlockApps WebAPI完成工作(http://blockapps.net/documentation)。它总是返回一个空白的逗号分开的字符串。有帮助吗?

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;
    }
}

我可能是错误的,但我认为无法返回struct Arrays:http://solity.readthedocs.io/en/develop/frequance/frequally-questions-questions.html和https://github.com/ethereum/cpp-ethereum/issues/1788

最新更新