Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvcrn/solana-react-quickstart
Quickstart template for Solana development with wallet-adapter and CRA
https://github.com/dvcrn/solana-react-quickstart
react solana web3
Last synced: 3 months ago
JSON representation
Quickstart template for Solana development with wallet-adapter and CRA
- Host: GitHub
- URL: https://github.com/dvcrn/solana-react-quickstart
- Owner: dvcrn
- Created: 2021-10-22T01:44:20.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T13:49:57.000Z (almost 2 years ago)
- Last Synced: 2023-03-13T10:55:32.013Z (almost 2 years ago)
- Topics: react, solana, web3
- Language: TypeScript
- Homepage:
- Size: 10.5 MB
- Stars: 43
- Watchers: 1
- Forks: 17
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Solana React Quickstart
This is a simple CRA app with TypeScript and Solana wallet connection through wallet-adapter
Includes:
- Typescript
- CRA
- Solana wallet adapter![screenshot](./screenshot.jpg)
## Run
```
yarn start
```or
```
npm run start
```## How do I sign transactions??
Create your transaction as usual and use `wallet.signTransaction()`:
```typescript
const transaction = new web3.Transaction({ feePayer: wallet.publicKey });
transaction.add(instruction1);
transaction.add(instruction2);await wallet.signTransaction(transaction);
const transactionHash = await web3.sendAndConfirmRawTransaction(
connection,
transaction.serialize()
);
```## If you use anchor
swap out `useWallet` with `useAnchorWallet` in `MyWallet.tsx`
## License
MIT