Skip to content

xandkar/solana-ping-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

solana ping pong
================

In hello-world[1], the program simply logs that it has received something from
the client, but does nothing else, for any instruction data whatsoever.

Here is a slight escalation in complexity, where the program reads the
specifics of the client request and writes a response into the client-provided
buffer account, which the client proceeds to read.

Client sends a ping and the program responds with a pong, ad infinitum.

If all goes well, you should see output like this:

    airdrop requesting.
    airdrop confirming .....
    airdrop done
    buffer account creating
    buffer account done
    Ping(0) > < Pong(1)
    Ping(2) > < Pong(3)
    Ping(4) > < Pong(5)
    Ping(6) > < Pong(7)
    Ping(8) > < Pong(9)
    Ping(10) > < Pong(11)
    Ping(12) > < Pong(13)
    Ping(14) > < Pong(15)
    Ping(16) > < Pong(17)
    Ping(18) > < Pong(19)
    ...

[1]: https://github.com/xandkar/solana-hello-world/

build
-----

    make build

run
---

### local

    $ solana-test-validator&
    $ make all

### devnet

    $ CLUSTER=dev make all

### testnet

    $ CLUSTER=test make all

About

Illustrates a protocoled communication between client and program. Client in Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published