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

How to get Token Metadata on Devnet? #223

Open
lreiner opened this issue Jun 24, 2023 · 1 comment
Open

How to get Token Metadata on Devnet? #223

lreiner opened this issue Jun 24, 2023 · 1 comment

Comments

@lreiner
Copy link

lreiner commented Jun 24, 2023

Hi how can i receive token metadata like symbol, icon and name from dev net:
https://explorer.solana.com/address/Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr?cluster=devnet

the function i use is the following:

let accounts = try await connection!.action.getTokenWallets(account: account!.publicKey.description)

which gives me the balance yes but not metadata provided:

Solana.Wallet(pubkey: "5v1hgkjCSee7LqMmghNk4Rq6szmmzu78hPKfDNeprdnc", ammount: Optional(Solana.TokenAmount(amount: "2000000000", decimals: 6, uiAmount: 2000.0, uiAmountString: "2000")), token: Optional(Solana.Token(chainId: nil, address: "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr", symbol: nil, name: nil, logoURI: nil, extensions: nil, tags: Optional([]), isNative: false)), liquidity: Optional(false))

so how can i get this information:
symbol: nil, name: nil, logoURI: nil,

@ajamaica
Copy link
Contributor

ajamaica commented Jul 1, 2023

You need to provide the list on the initialize

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