Coder Social home page Coder Social logo

leo-shi-dacheng / lockin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jongan69/lockin

0.0 0.0 0.0 580 KB

A Nextjs Application for swapping from coins to $lockin using Jupiter swap api and closing associated token accounts for retrieving rent

Home Page: https://lock.wtf

License: MIT License

JavaScript 0.62% TypeScript 45.01% CSS 1.77% HTML 52.60%

lockin's Introduction

Lockin.wtf [[email protected] TICKET #2057]

Lockin.wtf Logo

Lockin.wtf is a decentralized application (dApp) that allows you to view and manage your token holdings on the Solana blockchain.

Features

๐Ÿ—๏ธ Connect and Validate Solana Wallet

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.

๐Ÿ”— Retrieve Token Data

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.

๐Ÿ”Œ Rate Limiting for API Calls

To handle rate limits and ensure smooth operation, the dApp uses Bottleneck for rate limiting API calls to Solana RPC endpoints and other services.

๐ŸŽจ Customizable UI

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.

Getting Started

  1. Get an API key from Helius to fetch wallet details.
  2. Add a .env.local file with your Helius API key:
HELIUS_API_KEY=<your key>
NEXT_PUBLIC_SOLANA_RPC_ENDPOINT=https://mainnet.helius-rpc.com/?api-key=<your key>
UNKNOWN_IMAGE_URL=https://s3.coinmarketcap.com/static-gravity/image/5cc0b99a8dd84fbfa4e150d84b5531f2.png
  1. Run yarn dev to start the development server.
  2. Make changes and have fun!

Deploying

  1. Run yarn build locally to ensure everything compiles correctly.
  2. Use https://favicon.io/favicon-converter/ to generate favicons.
  3. Link your preferred server provider to your repository (e.g., Vercel for the demo).
  4. 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.

lockin's People

Contributors

jongan69 avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.