Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigNumber Error when fetching Thing #24

Open
DurandA opened this issue Mar 31, 2017 · 1 comment
Open

BigNumber Error when fetching Thing #24

DurandA opened this issue Mar 31, 2017 · 1 comment

Comments

@DurandA
Copy link

DurandA commented Mar 31, 2017

When running the Consumer example in the README example a BigNumber Error is thrown.

Example snippet:

var Provider = require('open-registry-sdk');
var contracts = {registrarAddress: '0xd76bc6a9eac205734b6fa2f72383db8f0ddecf64', registryAddress: '0x885ef67217954b7fd5d9cd7e79f3aba1599cffe0'};
var sdk = new Provider('http://localhost:8545', 'consumer', null, contracts);

sdk.getThing('ble:1.0:00112233').then(function(thing) {
    console.log(thing);
});

I'm running geth 1.5.9-stable-a07539fb and [email protected] with node v6.10.1. My node is fully synchronized. I saw some open issues about this with web3.js but usually this is due to a node not synced, which is not the case. I tried with both the ropsten testnet and the main testnet.

Call stack:

BigNumber Error: new BigNumber() not a base 16 number: 
    at raise (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:81:351)
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:81:8066
    at new BigNumber (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:80:29002)
    at SolidityTypeDynamicBytes.formatOutputDynamicBytes [as _outputFormatter] (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:234:4913)
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:234:12752
    at SolidityTypeDynamicBytes.SolidityType.decode (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:234:12842)
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:234:754
    at Array.map (native)
    at SolidityCoder.decodeParams (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:234:701)
    at SolidityFunction.unpackOutput (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:215:16230)
    at Object.callback (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:215:16739)
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:12:31838
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:216:2030
    at Web3ProviderEngine._inspectResponseForNewBlock (/usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:214:15732)
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:214:13520
    at /usr/lib/node_modules/open-registry-sdk/build/open-registry-sdk.js:88:304
@DurandA
Copy link
Author

DurandA commented Mar 31, 2017

It seems that the registryAddress in the example was the contract address created in the old morden testnet. I replaced it with 0xDc3A9Db694BCdd55EBaE4A89B22aC6D12b3F0c24 which I found on the Registry Explorer.
Now I get a Unhandled rejection Thing is not existing error when querying against ble:1.0:f0a99e6a93c1 which is because I don't have the registrar address.

What is the address of the chronicled registrar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant