Skip to content

Quickstart template for Solana development with wallet-adapter and CRA

Notifications You must be signed in to change notification settings

2501babe/solana-react-quickstart

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Run

yarn start

or

npm run start

How do I sign transactions??

Create your transaction as usual and use wallet.signTransaction():

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

About

Quickstart template for Solana development with wallet-adapter and CRA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 62.7%
  • HTML 24.2%
  • CSS 13.1%