Skip to content

Commit 5214d18

Browse files
authored
Guibescos/executor cli (#309)
* Add tests to CI * Fix yaml format * Update pythnet address * Checkpoint * Format * Reorder args * Update executor contract * Checkpoint * Deployment address and fix deser bug * Cli cleanup * Format * Get wormhole sdk from git * Format * Fix some bugs * Non-emtpy lib
1 parent 0a1f31a commit 5214d18

File tree

7 files changed

+463
-8
lines changed

7 files changed

+463
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
- id: cargo-fmt-executor
1313
name: Cargo format executor
1414
language: "rust"
15-
entry: cargo +nightly fmt --manifest-path ./pythnet/remote-executor/Cargo.toml
15+
entry: cargo +nightly fmt --manifest-path ./pythnet/remote-executor/Cargo.toml --all
1616
pass_filenames: false
1717
- id: cargo-clippy-executor
1818
name: Cargo clippy executor

pythnet/remote-executor/Cargo.lock

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

pythnet/remote-executor/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
22
members = [
3-
"programs/*"
3+
"programs/*",
4+
"cli/"
45
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[package]
2+
name = "remote-executor-cli"
3+
version = "0.1.0"
4+
edition = "2018"
5+
6+
[lib]
7+
name = "remote_executor_cli"
8+
9+
[dependencies]
10+
clap = {version ="3.2.22", features = ["derive"]}
11+
remote-executor = {path = "../programs/remote-executor/"}
12+
solana-program = "1.10.31"
13+
solana-client = "1.10.31"
14+
solana-sdk = "1.10.31"
15+
anchor-client = "0.25.0"
16+
shellexpand = "2.1.2"
17+
anyhow = "1.0.65"
18+
base64 = "0.13.0"
19+
wormhole-solana = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana"}
20+
wormhole-core = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana"}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//! CLI options
2+
use clap::{
3+
Parser,
4+
Subcommand,
5+
};
6+
use solana_sdk::commitment_config::CommitmentConfig;
7+
8+
#[derive(Parser, Debug)]
9+
#[clap(
10+
about = "A cli for the remote executor",
11+
author = "Pyth Network Contributors"
12+
)]
13+
pub struct Cli {
14+
#[clap(long, default_value = "confirmed")]
15+
pub commitment: CommitmentConfig,
16+
#[clap(subcommand)]
17+
pub action: Action,
18+
}
19+
20+
#[derive(Subcommand, Debug)]
21+
pub enum Action {
22+
#[clap(about = "Post a VAA and execute it through the remote executor")]
23+
PostAndExecute {
24+
#[clap(short = 'v', long = "vaa")]
25+
vaa: String,
26+
#[clap(
27+
long,
28+
default_value = "~/.config/solana/id.json",
29+
help = "Keypair file the funder of the transaction"
30+
)]
31+
keypair: String,
32+
},
33+
#[clap(about = "Send test VAA from solana")]
34+
SendTestVAA {
35+
#[clap(
36+
long,
37+
default_value = "~/.config/solana/id.json",
38+
help = "Keypair file the funder of the transaction"
39+
)]
40+
keypair: String,
41+
},
42+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mod cli;

0 commit comments

Comments
 (0)