sbv2-solana/programs/anchor-history-parser
Conner Gallagher 786d9d65e6 wip 2023-05-12 11:10:27 -06:00
..
src uprev switchboard deps 2022-11-26 15:15:13 -07:00
tests fix: removed oracle import from solana.js for browser compatibility 2023-03-23 09:28:41 -06:00
.gitignore uprev switchboard deps 2022-11-26 15:15:13 -07:00
.prettierignore added anchor-history-parser example 2022-10-18 18:57:57 -06:00
Anchor.toml fix: removed oracle import from solana.js for browser compatibility 2023-03-23 09:28:41 -06:00
Cargo.toml chore(rust-sdk): published v0.1.23 2023-03-16 16:36:45 -06:00
README.md wip 2023-05-12 11:10:27 -06:00
Xargo.toml added anchor-history-parser example 2022-10-18 18:57:57 -06:00
package.json js-sdk: uprev 2.1.10 2023-04-19 11:16:34 -06:00
tsconfig.json updated program examples 2023-01-18 20:17:40 -07:00

README.md

Switchboard Logo

anchor-history-parser

An example program written in Anchor demonstrating how to deserialize and read a Switchboard data feed's history buffer on Solana.

Anchor Test Status

Usage

Build the example program

anchor build

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

export ANCHOR_HISTORY_PARSER_PUBKEY=$(solana-keygen pubkey target/deploy/anchor_history_parser-keypair.json)
sed -i '' s/C7rn1qJkq9FjTwV86RrY5Uih91NgymRVLdJ81rqLNXRS/"$ANCHOR_HISTORY_PARSER_PUBKEY"/g Anchor.toml
sed -i '' s/C7rn1qJkq9FjTwV86RrY5Uih91NgymRVLdJ81rqLNXRS/"$ANCHOR_HISTORY_PARSER_PUBKEY"/g src/lib.rs

Then run Anchor test

anchor test