Skip to content

Latest commit

 

History

History
60 lines (42 loc) · 2.32 KB

README-gitpod.md

File metadata and controls

60 lines (42 loc) · 2.32 KB

Build status Gitpod Ready-to-Code

Hello world on Solana (Gitpod version)

This project demonstrates how to use the Solana Javascript API to build, deploy, and interact with programs on the Solana blockchain.

The project comprises of:

  • An on-chain hello world program
  • A client that can send a "hello" to an account and get back the number of times "hello" has been sent

Table of Contents

Quick Start

This example connects to the public Solana devnet cluster by default

Run the client to load and interact with the on-chain program:

$ npm run start

Expected output

Lets say hello to a Solana account...
Connection to cluster established: http://localhost:8899 { 'solana-core': '1.1.2' }
Loading hello world program...
Program loaded to account 47bZX1D1tdmw3KWTo5MfBrAwwHBJQQzQL4VnNGT7HtyQ
Creating account Eys1jdLHdZ2AE56QAKpfadbjziMZ6NAvpL7qsdtM6sbk to say hello to
Saying hello to Eys1jdLHdZ2AE56QAKpfadbjziMZ6NAvpL7qsdtM6sbk
Eys1jdLHdZ2AE56QAKpfadbjziMZ6NAvpL7qsdtM6sbk has been greeted 1 times
Success

Customizing the Program

To customize the example, make changes to the files under /src. If you change any files under /src/program you will need to rebuild the on-chain program

Now when you rerun npm run start, you should see the results of your changes.