Solana and Anchor template for Create React App. This template generates Scaffold to develop Solana/Anchor Dapp frontend in React. It has built in utils for developing an efficient web3 frontend on react.
Note: We are currently testing this template, you might encounter some bugs. Please open an issue if you do so, We will get to you ASAP.
useConfig | Gives the programmed/global configurations object that you have set up in config.ts |
---|---|
useApi | Gives the four basic API methods (GET, POST, PUT, DEL) wrapped with axios and useAuth and all basic headers |
useAuth | Gives the functions to login and logout while storing the auth token in localStorage |
useLocalStorage | Works as useState while storing the state in localStorage |
useRpc | Select, Store and Retrieve rpc from localStorage and the list setup in config.ts |
---|---|
useProvider | Gives the AnchorProvider, Connection and Wallet object along with some necessory functions such as sendAllTransactionsInBatches |
useAnchorPagination | Allows you to paginate through the accounts, loads the chain data faster |
MerkleTree | Sometimes it's hard to verify large amount of data on-chain, that's where MerkleTree helps |
---|
While developing a web3 app, there are a lot of errors that can be avoided by using the right tools. This template has built in tools to avoid some of the common errors.
Create your app with create-react-app command
yarn create react-app my-app --template solana
yarn start
Contributions, issues and feature requests are welcome.
Give a ⭐️ if this project helped you!