Skip to content

Commit 41635c1

Browse files
committed
chore: add readme and final touches
1 parent 622cb22 commit 41635c1

File tree

4 files changed

+49
-16
lines changed

4 files changed

+49
-16
lines changed

lazer/solana-anchor/Cargo.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lazer/solana-anchor/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Solana Anchor Example Program for Pyth Lazer
2+
3+
This is a simple Solana program built using the Anchor framework that uses Pyth Lazer prices and stores them on-chain.
4+
5+
## Prerequisites
6+
7+
- [Rust](https://rustup.rs/)
8+
- [Solana CLI Tools](https://docs.solana.com/cli/install-solana-cli-tools)
9+
- [Anchor Framework](https://www.anchor-lang.com/docs/installation)
10+
- [Node.js](https://nodejs.org/) and [pnpm](https://pnpm.io/)
11+
12+
## Project Structure
13+
14+
```
15+
solana-anchor/
16+
├── programs/ # Solana program source code
17+
├── tests/ # Test files
18+
└── fixtures/ # Lazer Program artifacts
19+
```
20+
21+
## Setup
22+
23+
1. Install dependencies:
24+
```bash
25+
pnpm install
26+
```
27+
28+
2. Build the program:
29+
```bash
30+
anchor build
31+
```
32+
33+
## Testing
34+
35+
Run the test suite:
36+
```bash
37+
pnpm test:anchor
38+
```
39+
40+
## Development
41+
42+
- The program is configured to run on Localnet by default
43+
- Program ID: `FpmpVrP57C6ADT8d4dQp9TkM1vmxohZJ5WEQQc9RGLPY`
44+
- Uses Pyth Lazer with address: `pytd2yyk641x7ak7mkaasSJVXh6YYZnC7wTmtgAyxPt`

lazer/solana-anchor/migrations/deploy.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

lazer/solana-anchor/programs/solana-anchor/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@ idl-build = ["anchor-lang/idl-build"]
1818

1919
[dependencies]
2020
anchor-lang = "0.30.1"
21-
# pyth-lazer-solana-contract = { version = "0.4.1", features = ["no-entrypoint", "cpi"] }
22-
pyth-lazer-solana-contract = { git = "https://github.com/pyth-network/pyth-crosschain.git", branch = "lazer/add-writable-annotation-anchor", features = ["no-entrypoint", "cpi"] }
21+
pyth-lazer-solana-contract = { version = "0.4.2", features = ["no-entrypoint", "cpi"] }

0 commit comments

Comments
 (0)