How to fetch all custom SPL tokens and NFTs from the wallet address
1 min readOct 19, 2022
In this article, we are going to fetch data of custom tokens like DUST, USDC, GARI and NFTs with their metaData from the wallet address using solana web3.js using react.js.
Before going to code & explanation —
Please install these dependencies or specify in your package.json
"dependencies": {"@metaplex-foundation/js": "^0.15.0","@metaplex/js": "^4.12.0","@project-serum/anchor": "^0.25.0","@project-serum/serum": "^0.13.64","@solana/spl-token": "^0.3.5","@solana/spl-token-registry": "^0.2.4574","@solana/web3.js": "^1.62.1","assert": "^2.0.0","axios": "^1.1.2","react": "^17.0.2",}
Explanation and its Code —
Above code is purely based on react.js and solana web3.js, If any improvement needed please let us know…
I hope you like it…
References —