Lockin.wtf [[email protected] TICKET #2057]
Lockin.wtf is a decentralized application (dApp) that allows you to view and manage your token holdings on the Solana blockchain.
Easily connect any Solana wallet supported by @solana/wallet-adapter, such as Phantom and Backpack. The dApp auto-connects to your wallet if it has been previously approved, enhancing user convenience.
To ensure security, the dApp requests a signature to validate wallet ownership upon connection. This signature process is client-side and safe, with no blockchain interaction.
Once your wallet is connected, the dApp fetches and displays detailed information about the tokens in your wallet. This includes:
- Fetching and parsing token accounts
- Retrieving token metadata, including name, symbol, and logo
- Calculating the USD value of your tokens using Jupiter Swap prices
- Displaying the tokens in a user-friendly interface
All actions are performed using official Solana libraries such as @solana/web3.js and the Metaplex library.
To handle rate limits and ensure smooth operation, the dApp uses Bottleneck for rate limiting API calls to Solana RPC endpoints and other services.
The dApp uses Tailwind CSS and daisyUI for a flexible and rapid development experience. You can easily customize the theme by modifying the daisy.themes
setting in ./tailwind.config.js
and setting the data-theme
attribute in the <html>
tag. Additionally, a theme switcher is provided for users to toggle between dark and light modes.
For feedback on on-chain actions, the dApp integrates react-hot-toast.
- Get an RPC URL from Helius to fetch wallet details.
- Add a
.env.local
file with your Helius API key: - Get an API key from Simplehash to fetch token metadata.
NEXT_PUBLIC_RPC_URL=https://mainnet.helius-rpc.com/?api-key=<your key>
UNKNOWN_IMAGE_URL=https://s3.coinmarketcap.com/static-gravity/image/5cc0b99a8dd84fbfa4e150d84b5531f2.png
SIMPLEHASH_API_KEY=<your key>
- Run
yarn dev
to start the development server. - Make changes and have fun!
- Run
yarn build
locally to ensure everything compiles correctly. - Use
https://favicon.io/favicon-converter/
to generate favicons. - Link your preferred server provider to your repository (e.g., Vercel for the demo).
- Push to the
main
branch to automatically deploy a new version.
This project is built on the foundation of the Create dApp Solana Next template.