Coder Social home page Coder Social logo

solproprietor / solana-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from solana-boilerplate/solana-boilerplate

1.0 0.0 0.0 143 KB

Lightweight boilerplate for Solana dapps. Allows quick building and prototyping. Feel free to contribute or fork this repository. Make it yours! Leave us a ⭐️ if this repo helped you.

HTML 7.31% TypeScript 92.24% Shell 0.45%

solana-boilerplate's Introduction

Solana Boilerplate

Lightweight boilerplate for Solana dapps. Allows quick building and prototyping.

⭐️ Star us

If this repo helps you building your dapps on Solana - please ensure you leave us a star! This motivates and helps us a lot to bring more free code, templates and boilerplates to you.

🤝 Need help?

If you need help with setting up the boilerplate or have other questions - don't hesitate to write in our community forum and we will check asap. Forum link. The best thing about this boilerplate is the super active community ready to help at any time! We help each other.

🚀 Quick Start

📄 Clone or fork solana-boilerplate:

git clone https://github.com/solana-boilerplate/solana-boilerplate.git

💿 Install all dependencies:

cd solana-boilerplate
yarn install 

✏ Rename .env.example to .env in the main folder and provide your appId and serverUrl from Moralis (How to start Moralis Server) Example:

REACT_APP_MORALIS_APPLICATION_ID=xxxxxxxxxxxx
REACT_APP_MORALIS_SERVER_URL=https://xxxxxx.grandmoralis.com:2053/server

🚴‍♂️ Run your App:

yarn start

🧭 Table of contents

🏗 Solana Components

🧰 Solana Hooks

useSolana

Gets basic Solana information such as user's address.

Example

const { account } = useSolana();

useSolanaNativeTokenBalance

Gets Solana SOL token balance of an address.

Example

const { getSolanaNativeBalance, data, error, isLoading } = useSolanaNativeTokenBalance({
  network: "mainnet",
  address: "xxx"
});

useSPLTokenBalance

Gets Solana SPL token balance of an address.

Example

const { getSPLTokenBalance, data, error, isLoading } = useSPLTokenBalance({
  network: "mainnet",
  address: "xxx"
});

useSPLNFTBalance

Gets Solana NFT balance of an address.

Example

const { getSPLNFTBalance, data, error, isLoading } = useSPLNFTBalance({
  network: "mainnet",
  address: "xxx"
});

useSolanaPortfolio

Gets Solana portfolio (SOL, SPL token, SPL NFT) of an address.

Example

const { getSolanaPortfolio, data, error, isLoading } = useSolanaPortfolio({
  network: "mainnet",
  address: "xxx"
});

solana-boilerplate's People

Contributors

ivan-liljeqvist avatar yosephks avatar

Stargazers

 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.