Git Product home page Git Product logo

burnspl's Introduction

Work in Progress. Project is beta. Use at your own risk. Burning tokens is irreversible.

BURN SPL (Mainnet)

  • /program - Solana Program Source and IDL (ProgramId: FiRESpaNzgYUiba5vkb44CZJLZjrux1AUECdfwPRsNkg)
  • /app - Front end deployment using NextJS

The program allows users to create a tracking count seeded by wallet and mint so a user can have many token burn accounts. All future burns wiht that token will be logged in that PDA (so communities can track burn leaderboards and reward top burners).

This front end will allow users to navigate to /mint/[MINT_ADDRESS] to pull the leaderboard for the MINT_ADDRESS token. The front end will filter high scores only for desired tokens and facilitate burns just for that token.

PRs, issues, feedback welcome. Thanks! ๐Ÿ™

Getting Started (Front End)

cd app
npm install
#or
yarn

Create.env. Add NEXT_PUBLIC_RPCwith your RPC (free ones available at QuickNode) Update app\utils\constants.ts if you fork/deploy your own program.

  • Also make sure reference to .env is correct in SOLANA_RPC

If deploying your own site, make sure to update HomeView component with your metadata

Run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

////

Program: FiRESpaNzgYUiba5vkb44CZJLZjrux1AUECdfwPRsNkg Creator/Authority: MiLZAcWZgMYvFnZqzJ6XRj4h5r47bgX64Vt5gRnBvqv (will probably remove authority after some additional testing/feedback)

burnspl's People

Contributors

amilz avatar beeman avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

burnspl's Issues

To Do List

  • Integrate Solana Token Registry
  • Add "known" tokens list (allow custom background color, etc)
  • Add some more navigational tools
  • Add some explanatory details
  • Improve CSS
  • Error handling ux
  • Update navbar token balance on burn (w/o flooding rpc)
  • Clean up custom CSS tooling for KNOWN_TOKENS (e.g., better solution than the star set up)

Improve Mobile UI

Some devices have a mobile rendering issue on search page:
image

The Title appears to be getting the media query correctly. So need to check out what's going on w/ the search bar.
While at it... i think the mobile search bar and content could be a little bigger
image

Program Struct V2

Issue

Program struct for burn accounts is:

pub struct BurnScore {
    pub burned_tokens: u64,
    pub pyro_key: Pubkey,
    pub num_burns: u64,
    pub user_name: String,
    pub mint: Pubkey
}

Unfortunately the way mmecp filters work, I can't filter on mint b/c it's after a variable byte-length string. So each program query looks up all accounts and then we filter for mint on front end. Fine now but won't scale if we get more users.

Proposed Solution

Create a new struct, e.g..:

pub struct BurnScore {
    pub acct_version: u8,
    pub mint: Pubkey,
    pub pyro_key: Pubkey,
    pub burned_tokens: u64,
    pub num_burns: u64,
    pub user_name: String,
}

Create a migration function.

Note: if we start to get higher volume of users before we implement a fix, we may want to useLocalStorage for our account query and store the results rather than calling it each page (only really an issue if somebody is navigating around multiple mints)

Resources:

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.