Uncaught (in promise) Error: invalid address
    at inputAddressFormatter (formatters.js:271)
    at inputTransactionFormatter (formatters.js:97)
    at method.js:89
    at Array.map (<anonymous>)
    at Method.formatInput (method.js:88)
    at Method.toPayload (method.js:114)
    at Eth.send [as sendTransaction] (method.js:139)
    at SolidityFunction.sendTransaction (function.js:136)
    at SolidityFunction.execute (function.js:219)
    at contract.js:188

code reference:https://github.com/dappuniversity/ipfs_image_uploader


this is the script to get account

 this.state.web3.eth.getAccounts((error, accounts) => {
     simpleStorage.deployed().then((instance) => {
        this.simpleStorageInstance = instance
        this.setState({ account: accounts[0] })
        // Get the value from the contract to prove it worked.
        return this.simpleStorageInstance.get.call(accounts[0]);

      }).then((ipfsHash) => {
        // Update state with the result.
        return this.setState({ ipfsHash })
  • can anyone clear this – Harry Jul 11 '19 at 9:48
  • sorry, I am new here and also to the technology.I am actually unable to understand the error. – Harry Jul 11 '19 at 10:01
  • Well what did you do to make it happen? What code are you running? What platform are you using? – goodvibration Jul 11 '19 at 10:24
  • i have provided the code reference above. I think the issue is in web3. The main code is in the src folder ...App.js – Harry Jul 11 '19 at 10:38
  • are you using Metamask or Ganache or Infura? – Majd TL Jul 11 '19 at 12: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.