0

I use the following code:

        augur.api.Market.getShareToken({
            _outcome: "0x1",
            tx: { to: _market },
        }, function (error, shareToken) { 
            console.log(error, shareToken); 
        });

This returns:

Error: invalid argument 0: json: cannot unmarshal hex string of odd length into Go struct field CallArgs.to of type common.Address at parseEthereumResponse (/Users/jasperdegooijer/Documents/flux/initial-testing/augur-client/node_modules/ethrpc/src/decode-response/parse-ethereum-response.js:8:47)

This is the exact same code that's showed in the augur documentation: https://docs.augur.net/#market-call-api

I'm linking to a YesNoMarket address, maybe that's what causing the error? If so how'd I get the ShareToken addresses of a YesNoMarket? I also tried adding from to the tx object but this didn't help.

0

Solved this by creating a new market and the exact same code worked like a charm..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.