Contract code:

function getAddressDnaIds(address owner) external view returns(uint256[])
        return addressDnaIds[owner];

Code causing the error:

var dna = await this.airdrop.methods.getAddressDnaIds(this.address)
      .call({ from: this.address })

Someone know what is the cause of this error or how to fix it?

  • Just a guess, but maybe this.airdrop isn't pointing to the right address on the right blockchain. (This type of error is common when calling into a non-contract.) – user19510 Mar 20 '19 at 22:25
  • I was suspecting this as well because there are duplicate contracts on mainnet. I will check on the testnet where this resides. – Eddie Mar 20 '19 at 23:56
  • 1
    I'm voting to close this question as off-topic because both pieces of code (on-chain and off-chain) are insufficient for answering it, and are incomplete by themselves (cannot be compiled and/or executed). – goodvibration Mar 21 '19 at 10:26
  • The first comment actually answered it. Might want to leave the question until the error message is improved in web3. – Eddie Mar 21 '19 at 20:43

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.