Covalent plugin - getBlockTokenHolders error

Trying to use this function, i would ideally like to just pass the chain id, contract address and paging parameters, to return all token holders.

However, it is asking for a startingBlock parameter, i have tried adding this in (even though its not in the documentation) and setting it to 0, but its still asking for it.

error - Error: Something went wrong
[
  {
    "code": 400006,
    "message": "The parameter `startingBlock` is not present"
  }
]

I am running the latest version available from npm.

Any ideas?

Thank you.

1 Like

Anyone have any ideas about this? I can’t even investigate further because the code for this plugin isn’t public.

Thank you.

1 Like

Hey @phinett10

The issue has been fixed.
Please update your plugins to v 0.0.10 and try again.

    <script>
      // connect to Moralis server
      async function start() {
        await Moralis.start({
          appId: '',
          serverUrl: '',
        });
        Moralis.initPlugins();
        const result = await Moralis.Plugins.covalent.getBlockTokenHolders({
          chainId: 1,
          contractAddress: '0x3883f5e181fccaf8410fa61e12b59bad963fb645'
        })
        console.log(result)
      }
      start();
    </script>

If blockHeight is omitted, the latest block is now used by default.

Thanks for reporting

1 Like