Git Product home page Git Product logo

solgsn's Introduction

SolGSN: Solana Gas Station โ›ฝ

It is an Gas Station implementation for Solana blockchain. The smart contract program is written in Rust programming language.
This platform/network will allow users to do gas-less transactions. This network will allow Dapps on Solana to pay the gas fee of their users. A single user can also use this network. Using this platform, One can pay transaction fee in other solana supported token as well. For eg. One can top-up account using USDC token instead of SOL.


  • A relayer will be used to publish the signed transaction and, the executor on relayer will pay the fee. The execution and fee deduction will be done through smart contract only. The consumer/user will first top-up their account using SOL or any SLP token. On a successful transaction execution, the fee will get deducted from top-up credit and get added to the executor (fee-payer).
  • The executor can claim their earned fee anytime directly from the smart contract. We will include governance in future for changing fees etc.
  • Also, the Dapp & User can withdraw their topup anytime if they want. The topup credit will be associated with account. The amount will be stored in the program account or smart contract.

Note: This project is developed during Solana Wormhole Hackathon in 15 days. It's a basic version of whole idea. Please have a look at Pitch Deck ๐Ÿ“” submitted for the hackathon.

Running Project Locally

  1. Prerequisites: Make sure you've installed [Node.js] and [Rust with correct target][rust]. You will also need solana installed.
  2. Install dependencies: npm install
  3. Start Solana on Localner: sudo npm run localnet:up
  4. Build SolGSN program: npm run build
  5. Execute program: npm run start

You will see output something like this:

Exploring The Code

  1. The "program" (smart contract) code lives in the /src/program-rust folder. This code gets deployed to the Solana blockchain when you run npm run build. This sort of code-that-runs-on-a-blockchain is called a "program". The best file to start with the program is lib.rs.

  2. The client code for loading & testing lives in the /src/client folder. /src/main.js is a great place to start exploring. Note that it loads in /src/index.js, where you can see all the program function getting executed synchronusly.

solgsn's People

Contributors

princesinha19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.