在solana web3中使用getTokenSupply,我能够获得数量和小数,如何获得令牌的名称和其他元数据?
let from_pairs = new anchor.web3.PublicKey("DUru78GcRB8Ucg24Gy6WNTyufuyBhqcL5wppZJkckQHz")
const NETWORK = anchor.web3.clusterApiUrl('devnet');
const Connection = new anchor.web3.Connection(NETWORK);
const data = await Connection.getTokenSupply(from_pairs)
console.log(data, data2)
输出
发布于 2021-10-18 17:24:34
如果需要令牌的名称和其他元数据片段,则可能需要查询Solana token-list
。请访问https://github.com/solana-labs/token-list查看回购
https://stackoverflow.com/questions/69618496
复制相似问题