Phương thức RPC getTokenSupply
Trả về tổng cung của một loại Token SPL.
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getTokenSupply",> "params": [> "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",> {> "commitment": "finalized"> }> ]> }> '
params
stringrequired
Pubkey của token Mint cần truy vấn, dưới dạng chuỗi mã hóa base-58
objectoptional
Đối tượng cấu hình chứa các trường sau:
result
Response
{"jsonrpc": "2.0","result": {"context": { "slot": 1114 },"value": {"amount": "100000","decimals": 2,"uiAmount": 1000,"uiAmountString": "1000"}},"id": 1}
object
Một đối tượng JSON chứa:
Is this page helpful?