1

I get a reference to my contract on Rinkeby like this:

const MyContract = web3.eth.contract(MyContractABI)
  myContract = MyContract.at(contractAddress)

I can call this function fine:

myContract.functionOne(addressParamater, function(err, res) {
    console.log(res)
  });

But when I call :

myContract.functionTwo(addressParamater, function(err, res) {
    console.log(res)
  });

I get this error:

Unhandled Rejection (Error): invalid address

I'm passing an address as a paramater to both functions, and I know its well formated since when I do this:

web3.isAddress(addressParamater); 

I get true

Any idea what could be going on?

Thanks!

  • can we have the contract functions implementation by any chance? – mirg Mar 19 '18 at 2:35

Your Answer

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

Browse other questions tagged or ask your own question.