Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET contract doesn't return total supply #6

Open
nickpater opened this issue Jan 24, 2020 · 1 comment
Open

GET contract doesn't return total supply #6

nickpater opened this issue Jan 24, 2020 · 1 comment

Comments

@nickpater
Copy link

Expected Behavior

When making a request to https://qtum.info/api/contract/fe59cbc1704e89a698571413a81f0de9d8f00c69 I would suspect the qrc20 object to contain the totalSupply.

Current Behavior

The end-point returns only the name and symbol in the qrc20 object.

Steps to Reproduce

  1. Go to this end-point https://qtum.info/api/contract/fe59cbc1704e89a698571413a81f0de9d8f00c69
  2. Compare the result with the documentation https://github.com/qtumproject/qtuminfo-api/blob/master/doc/contract.md#contract-information

Context (Environment)

I'm trying to get up-to-date total supplies for tokens on QTUM. For example INK.

Detailed Description

The GET /contract/:contract end-point doesn't return all the information that is stated in the documentation. It only returns the name and symbol of a QRC20 token, while the documentation says that it would also return the decimals, totalSupply, version, holders and transactions.

@sobelman
Copy link

sobelman commented Mar 9, 2021

Same hit here!

Thanks.

https://qtum.info/api/contract/f2033ede578e17fa6231047265010445bca8cf1c

{"address":"f2033ede578e17fa6231047265010445bca8cf1c","addressHex":"f2033ede578e17fa6231047265010445bca8cf1c","vm":"evm","type":"qrc20","createHeight":52790,"createTransactionId":"bfe7fbcc9296e02231be44d7989a7fe10853540f2b43f8a872e829e873993691","createOutputIndex":0,"createBy":"QQ62cKBCqqfdS849QnHFt97xyXT2cEUtzb","destructHeight":null,"qrc20":{"name":"QCASH","symbol":"QC"},"balance":"0","totalReceived":"100000000","totalSent":"100000000","unconfirmed":"0","qrc20Balances":[],"qrc721Balances":[],"transactionCount":185295}

Expected:

{
  "address": "6b8bf98ff497c064e8f0bde13e0c4f5ed5bf8ce7",
  "addressHex": "6b8bf98ff497c064e8f0bde13e0c4f5ed5bf8ce7",
  "vm": "evm",
  "type": "qrc20",
  "qrc20": {
    "name": "Bodhi Token",
    "symbol": "BOT",
    "decimals": 8,
    "totalSupply": "10000000000000000",
    "version": null,
    "holders": 33219,
    "transactions": 49622
  },
  "balance": "0",
  "totalReceived": "1086500002",
  "totalSent": "1086500002",
  "unconfirmed": "0",
  "qrc20Balances": [],
  "qrc721Balances": [],
  "transactionCount": 20572
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants