An open API service indexing awesome lists of open source software.

https://github.com/xandkar/solana-ping-pong

Illustrates a protocoled communication between client and program. Client in Rust.
https://github.com/xandkar/solana-ping-pong

Last synced: 7 months ago
JSON representation

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

Awesome Lists containing this project

README

          

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