Skip to content

Commit becf76c

Browse files
authored
feat(lazer): add governance instructions protocol (#2654)
* feat(lazer): add governance instructions protocol * feat(lazer): more governance improvements * feat(lazer): add DynamicValue conversions, add source to GovernanceInstruction * chore: fix ci * chore(lazer): silence generated doc errors
1 parent 157c756 commit becf76c

File tree

8 files changed

+612
-32
lines changed

8 files changed

+612
-32
lines changed

.github/workflows/ci-lazer-rust.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@ jobs:
2121
submodules: recursive
2222
- uses: actions-rust-lang/setup-rust-toolchain@v1
2323
with:
24-
toolchain: 1.81.0
24+
toolchain: 1.82.0
25+
components: clippy,rustfmt
2526
- uses: Swatinem/rust-cache@v2
2627
with:
2728
workspaces: "lazer -> target"
29+
- name: Install Protoc
30+
uses: arduino/setup-protoc@v3
31+
with:
32+
version: "30.2"
2833
- name: Install Foundry
2934
uses: foundry-rs/foundry-toolchain@v1
30-
- name: install extra tools
31-
run: |
32-
cargo install --locked [email protected]
33-
sudo apt-get update && sudo apt-get install -y protobuf-compiler
35+
- name: install taplo
36+
run: cargo install --locked [email protected]
3437
- name: Install Solana Cli
3538
run: |
3639
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"

lazer/Cargo.lock

Lines changed: 55 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
syntax = "proto3";
2+
3+
import "google/protobuf/timestamp.proto";
4+
import "google/protobuf/duration.proto";
5+
6+
package pyth_lazer_transaction;
7+
8+
// A dynamically typed value similar to `google.protobuf.Value`
9+
// but supporting more types.
10+
message DynamicValue {
11+
message List {
12+
repeated DynamicValue items = 1;
13+
}
14+
message MapItem {
15+
// [required] Must be unique.
16+
optional string key = 1;
17+
// [required]
18+
optional DynamicValue value = 2;
19+
}
20+
message Map {
21+
repeated MapItem items = 1;
22+
}
23+
24+
oneof value {
25+
string string_value = 1;
26+
double double_value = 2;
27+
uint64 uint_value = 3;
28+
sint64 int_value = 4;
29+
bool bool_value = 5;
30+
bytes bytes_value = 6;
31+
google.protobuf.Duration duration_value = 7;
32+
google.protobuf.Timestamp timestamp_value = 8;
33+
List list = 9;
34+
Map map = 10;
35+
}
36+
}

0 commit comments

Comments
 (0)