Skip to content

Commit

Permalink
Merge pull request #109 from Ellipsis-Labs/export-pda-tx
Browse files Browse the repository at this point in the history
Export PDA Tx
  • Loading branch information
ngundotra authored Dec 18, 2024
2 parents 8f7c260 + 88e2231 commit 74facb5
Show file tree
Hide file tree
Showing 5 changed files with 434 additions and 158 deletions.
35 changes: 27 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ solana-client = "=1.18.23"
solana-sdk = "=1.18.23"
tokio = { version = "1.29.1", features = ["full"] }
solana-account-decoder = "1.18.23"
bincode = "1.3.3"
bs58 = "0.5.1"
base64 = "0.22.1"
solana-transaction-status = "=1.18.23"

[dependencies.uuid]
version = "1.2.2"
Expand Down
12 changes: 4 additions & 8 deletions src/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use reqwest::{Client, Response};
use serde_json::json;
use solana_client::rpc_client::RpcClient;
use solana_sdk::pubkey::Pubkey;
use std::sync::atomic::{Ordering};
use std::sync::atomic::Ordering;
use std::thread;
use std::time::{Duration, Instant};

Expand Down Expand Up @@ -190,7 +190,7 @@ pub async fn handle_submission_response(
break; // Exit the loop and continue with normal error handling
}

let status = check_job_status(&client, &request_id).await?;
let status = check_job_status(client, &request_id).await?;
match status.status {
JobStatus::InProgress => {
if SIGNAL_RECEIVED.load(Ordering::Relaxed) {
Expand Down Expand Up @@ -266,7 +266,7 @@ pub async fn handle_submission_response(
async fn check_job_status(client: &Client, request_id: &str) -> anyhow::Result<JobResponse> {
// Get /job/:id
let response = client
.get(&format!("{}/job/{}", REMOTE_SERVER_URL, request_id))
.get(format!("{}/job/{}", REMOTE_SERVER_URL, request_id))
.send()
.await
.unwrap();
Expand Down Expand Up @@ -309,11 +309,7 @@ pub async fn get_remote_status(program_id: Pubkey) -> anyhow::Result<()> {
.build()?;

let response = client
.get(format!(
"{}/status-all/{}",
REMOTE_SERVER_URL,
program_id.to_string()
))
.get(format!("{}/status-all/{}", REMOTE_SERVER_URL, program_id,))
.send()
.await?;

Expand Down
Loading

0 comments on commit 74facb5

Please sign in to comment.