Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d31f5bb
implement `send_raw_tx*` functions for solana
onur-ozkan Sep 16, 2025
c3f52f2
implement withdraw RPC for Solana
onur-ozkan Sep 16, 2025
dbe6033
handle solana fee details
onur-ozkan Sep 17, 2025
0b699ef
add TODO
onur-ozkan Sep 17, 2025
751085c
implement withdraw for solana tokens
onur-ozkan Sep 17, 2025
e91089e
disable enable-solana feature
onur-ozkan Sep 17, 2025
076ca39
handle fee on received_by_me
onur-ozkan Sep 18, 2025
4800d4e
disable token check temporarily
onur-ozkan Sep 18, 2025
3c7603a
rename test module for tendermint
onur-ozkan Sep 18, 2025
ab1f3a5
add coverage on sol activation, withdraw and send_raw_transaction
onur-ozkan Sep 18, 2025
853db91
feature gate solana_tests module
onur-ozkan Sep 18, 2025
6748484
add another TODO
onur-ozkan Sep 18, 2025
cc75fad
extend calculate_withdraw_amount
onur-ozkan Oct 7, 2025
7094fcb
resolve solana_token todo
onur-ozkan Oct 7, 2025
ab565df
Merge branch 'dev' of github.com:KomodoPlatform/komodo-defi-framework…
onur-ozkan Oct 7, 2025
903336d
handle non-existent token accounts
onur-ozkan Oct 7, 2025
82d7a3a
handle token programs on token init
onur-ozkan Oct 7, 2025
974ac57
bump spl-token
onur-ozkan Oct 9, 2025
b13eb91
use token transfer with proper token id
onur-ozkan Oct 9, 2025
755e712
use token address on token transfer_checked
onur-ozkan Oct 9, 2025
3dbc4b8
add missing items to untagged deser
onur-ozkan Oct 13, 2025
84ac433
minor improvements
onur-ozkan Oct 14, 2025
dd8eccf
update received_by_me and spent_by_me, my_balance_change
onur-ozkan Oct 16, 2025
d41ea99
some nit fixes
onur-ozkan Oct 23, 2025
dfe4a0e
better program id usage
onur-ozkan Oct 23, 2025
6ec2ee7
re-write calculate_withdraw_and_fee_amount
onur-ozkan Oct 23, 2025
e1d1582
handle rent amounts
onur-ozkan Oct 23, 2025
03b006c
add TODO
onur-ozkan Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 115 additions & 20 deletions Cargo.lock

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

10 changes: 10 additions & 0 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ enable-sia = [
"dep:sia-rust"
]
enable-solana = [
"dep:bincode",
"dep:solana-bincode",
"dep:solana-keypair",
"dep:solana-pubkey",
"dep:solana-rpc-client-types",
"dep:solana-rpc-client",
"dep:solana-signer",
"dep:solana-system-transaction",
"dep:solana-transaction",
"dep:spl-associated-token-account-client",
"dep:spl-token",
]
default = []
run-docker-tests = []
Expand Down Expand Up @@ -125,12 +130,17 @@ zcash_extras.workspace = true
zcash_primitives.workspace = true

# Solana
bincode = { version = "1.3", default-features = false, optional = true }
solana-bincode = { version = "2.2", default-features = false, optional = true }
solana-keypair = { version = "2.2", default-features = false, optional = true }
solana-pubkey = { version = "2.4", default-features = false, optional = true }
solana-rpc-client = { version = "2.3", default-features = false, optional = true }
solana-rpc-client-types= { version = "2.3", default-features = false, optional = true }
solana-signer = { version = "2.2", default-features = false, optional = true }
solana-system-transaction = { version = "2.2", default-features = false, optional = true }
solana-transaction = { version = "2.2", default-features = false, optional = true }
spl-associated-token-account-client = { version = "2.0", default-features = false, optional = true }
spl-token = { version = "8", default-features = false, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
blake2b_simd.workspace = true
Expand Down
10 changes: 10 additions & 0 deletions mm2src/coins/lp_coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,8 @@ use z_coin::{ZCoin, ZcoinProtocolInfo};

#[cfg(feature = "enable-solana")]
pub mod solana;
#[cfg(feature = "enable-solana")]
use crate::solana::SolanaFeeDetails;

pub type TransactionFut = Box<dyn Future<Item = TransactionEnum, Error = TransactionErr> + Send>;
pub type TransactionResult = Result<TransactionEnum, TransactionErr>;
Expand Down Expand Up @@ -2440,6 +2442,8 @@ pub enum TxFeeDetails {
Qrc20(Qrc20FeeDetails),
Slp(SlpFeeDetails),
Tendermint(TendermintFeeDetails),
#[cfg(feature = "enable-solana")]
Solana(SolanaFeeDetails),
}

/// Deserialize the TxFeeDetails as an untagged enum.
Expand All @@ -2454,14 +2458,20 @@ impl<'de> Deserialize<'de> for TxFeeDetails {
Utxo(UtxoFeeDetails),
Eth(EthTxFeeDetails),
Qrc20(Qrc20FeeDetails),
Slp(SlpFeeDetails),
Tendermint(TendermintFeeDetails),
#[cfg(feature = "enable-solana")]
Solana(SolanaFeeDetails),
}

match Deserialize::deserialize(deserializer)? {
TxFeeDetailsUnTagged::Utxo(f) => Ok(TxFeeDetails::Utxo(f)),
TxFeeDetailsUnTagged::Eth(f) => Ok(TxFeeDetails::Eth(f)),
TxFeeDetailsUnTagged::Qrc20(f) => Ok(TxFeeDetails::Qrc20(f)),
TxFeeDetailsUnTagged::Slp(f) => Ok(TxFeeDetails::Slp(f)),
TxFeeDetailsUnTagged::Tendermint(f) => Ok(TxFeeDetails::Tendermint(f)),
#[cfg(feature = "enable-solana")]
TxFeeDetailsUnTagged::Solana(f) => Ok(TxFeeDetails::Solana(f)),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions mm2src/coins/solana/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod solana_coin;
mod solana_token;

pub use solana_coin::RpcNode;
pub use solana_coin::SolanaFeeDetails;
pub use solana_coin::{SolanaCoin, SolanaProtocolInfo};
pub use solana_coin::{SolanaInitError, SolanaInitErrorKind};
pub use solana_token::{SolanaToken, SolanaTokenProtocolInfo};
Expand Down
Loading
Loading