Web3.js: Error: new BigNumber() not a base 16 number:

Created on 10 Aug 2018  路  1Comment  路  Source: ChainSafe/web3.js

I am trying to run this simple contract from geth console

contract StoreContract {
mapping(string => string) private store;
function setValue(string key, string value) public{
store[key] = value;
}
function getValue(string key) public constant returns (string) {
return store [key];
}
}

after deploying this contract, I try to run the following commands

contractInstance.setValue("key", "123");
"0x4f7391aeb4d6bb6b5875bbcb5c6c640ce6dd7904a5e533d0e1916ea38c1186da"
contractInstance.getValue("key");
Error: new BigNumber() not a base 16 number:
at L (bignumber.js:3:2876)
at bignumber.js:3:8435
at a (bignumber.js:3:389)
at web3.js:1110:23
at web3.js:1634:20
at web3.js:826:16
at map ()
at web3.js:825:12
at web3.js:4080:18

any idea why?
Thanks

Most helpful comment

This issue was cause by the

contractInstance

object the address was "undefined"

Closing the issue

>All comments

This issue was cause by the

contractInstance

object the address was "undefined"

Closing the issue

Was this page helpful?
0 / 5 - 0 ratings