Skip to content

Commit

Permalink
Merge pull request #8 from ComposableFi/solana_execution_atomic
Browse files Browse the repository at this point in the history
Execute Solana transactions atomically using Jito bundles
  • Loading branch information
doradelta authored Jan 24, 2025
2 parents cf8d6a0 + feb9a75 commit 5be8fb4
Show file tree
Hide file tree
Showing 7 changed files with 660 additions and 478 deletions.
1 change: 1 addition & 0 deletions example_solver/Cargo.lock

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

1 change: 1 addition & 0 deletions example_solver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ethers = { version = "2.0.14", default-features = true, features = ["ws","abigen
hex = "0.4.3"
spl-associated-token-account = { version = "3.0.2", default-features = false, features = ["no-entrypoint"] }
spl-token = { version = "3.2.0", default-features = false, features = ["no-entrypoint"] }
spl-token-2022 = { version = "0.9.0", features = ["no-entrypoint"] }
solana-client = "1.8.3"
anchor-client = { version = "0.29.0" }
solana-sdk = "1.17.30"
Expand Down
11 changes: 4 additions & 7 deletions example_solver/src/chains/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ pub mod ethereum;
pub mod mantis;
pub mod solana;

use lazy_static::lazy_static;
use std::collections::HashMap;

use crate::env;
use ethers::prelude::*;
use ethers::signers::LocalWallet;
use ethers::utils::hash_message;
use ethers::utils::keccak256;
use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use solana::solana_chain;
use std::collections::HashMap;
use std::error::Error;
use std::str::FromStr;
use std::sync::Arc;
Expand Down Expand Up @@ -117,10 +117,7 @@ lazy_static! {
Blockchain::Ethereum,
"0xdAC17F958D2ee523a2206206994597C13D831ec7",
);
usdt_addresses.insert(
Blockchain::Solana,
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
);
usdt_addresses.insert(Blockchain::Solana, solana_chain::USDT_ADDRESS);
m.insert(
Token::USDT,
TokenInfo {
Expand Down
Loading

0 comments on commit 5be8fb4

Please sign in to comment.