sbv2-solana/programs/anchor-buffer-parser/README.md

1.5 KiB

sbv2-solana / anchor-buffer-parser

An example program written in Anchor demonstrating how to deserialize and read a Switchboard buffer relayer on Solana.

Crates.io

Discord Twitter

Sbv2 Solana SDK: github.com/switchboard-xyz/sbv2-solana

Usage

Build the example program

anchor build

Get your program ID and update Anchor.toml and src/lib.rs with your pubkey

export ANCHOR_BUFFER_PARSER_PUBKEY=$(solana-keygen pubkey target/deploy/anchor_buffer_parser-keypair.json)
sed -i '' s/96punQGZDShZGkzsBa3SsfTxfUnwu4XGpzXbhF7NTgcP/"$ANCHOR_BUFFER_PARSER_PUBKEY"/g Anchor.toml
sed -i '' s/96punQGZDShZGkzsBa3SsfTxfUnwu4XGpzXbhF7NTgcP/"$ANCHOR_BUFFER_PARSER_PUBKEY"/g src/lib.rs

Then run Anchor test

anchor test