Error

Augur:當我嘗試執行任何事務 API 時,出現此錯誤:“錯誤:eth_call 未返回數據 (0x)”。有誰知道這裡發生了什麼?

  • January 29, 2019

根據 dev 的說法,該地址擁有 ETH 和 REP。我已連接到 Rinkeby 。

當我執行以下程式碼時會發生這種情況:

const owner = require('./.pvt.js').ADDRESS;
const daiAddress = require('./.pvt').DAIADDRESS;
const privateKey = require('./.pvt').PVT_KEY;

const init = require('./init');

var _extraInfo = {
 "test": "test",
 "2": [ "test1", "test" ],
 "test3": ""
};

const createMarket = (async () => {
   const { augur, connectionInfo } = await init();
   const { Universe } = connectionInfo.ethereumNode.contracts;

   augur.createMarket.createYesNoMarket({
       universe: Universe,
       _endTime: 1556300799,
       _feePerEthInWei: 1,
       _denominationToken: daiAddress,
       _designatedReporterAddress: owner,
       _topic: "stocks",
       _description: "hmm?",
       _extraInfo: JSON.stringify(_extraInfo),
       meta: {
           accountType: "privateKey",
           address: owner,
           signer: new Buffer.from(privateKey, 'hex'),
       },
       onSent: function (result) { console.log("sent", result); },
       onSuccess: function (result) { console.log("success", result); },
       onFailed: function (result) { console.log("failed", result); }
   });
})();

終於在文件的一個奇怪的地方發現了以下語句:

augur.api.Market.getDenominationToken(p, callback) 返回用於命名指定市場的代幣的乙太坊合約地址。面額代幣是 ERC-20 代幣,用作根據市場結果進行交易的貨幣。目前,此函式將始終返回 Cash 合約的地址;但是,Augur 最終將支持其他類型的面額代幣。

augur.api.Market.getDenominationToken將面額令牌更改為解決問題返回的值

引用自:https://ethereum.stackexchange.com/questions/66305