RUST
For successful transaction processing, please include a system transfer tip to one of our designated tip addresses
async fn submit_solana_transaction(base64_tx: &str) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
let client = reqwest::Client::new();
let response = client
.post("http://lon.block0.wtf/")
.header("Content-Type", "application/json")
.json(&serde_json::json!({
"base64_tx": base64_tx
}))
.send()
.await?;
if !response.status().is_success() {
return Err(format!("Request failed with status {}", response.status()).into());
}
let response_text = response.text().await?;
Ok(response_text)
}
If you're sending with blockhash in your TX, please ensure to use commitment level finalized.
Last updated