MoralisWeb3 / issue-tracker

25 stars 7 forks source link

Web3 API v2 POST /{address}/function fails with error 500 #97

Closed pasevin closed 3 years ago

pasevin commented 3 years ago
curl -X 'POST' \
  'https://deep-index.moralis.io/api/v2/0xFC206f429d55c71cb7294EfF40c6ADb20dC21508/function?chain=bsc&function_name=totalCirculatingSupply' \
  -H 'accept: application/json' \
  -H 'X-API-Key:  REMOVED\
  -H 'Content-Type: application/json' \
  -d '{
    "inputs": [],
    "name": "totalCirculatingSupply",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }'

This just throws error 500 with an empty object.

Y0moo commented 3 years ago

You need to provide a full ABI of the Contract

pasevin commented 3 years ago

Thanks, I've tried before, it didn't work. Then you did an update and I forgot to try with full ABI.