Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into eth-maker-tpu-v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	mm2src/coins/lp_coins.rs
  • Loading branch information
laruh committed Sep 5, 2024
2 parents e53c028 + ffed860 commit 3815d08
Show file tree
Hide file tree
Showing 22 changed files with 428 additions and 1,212 deletions.
28 changes: 28 additions & 0 deletions Cargo.lock

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

6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ codegen-units = 1
# lto = true
panic = "abort"

[profile.test]
# required to avoid a long running process of librustcash additional chain validation that is enabled with debug assertions
debug-assertions = false

[profile.dev]
opt-level = 0
debug = 1
Expand All @@ -74,4 +70,4 @@ incremental = true
codegen-units = 256

[profile.release.package.mocktopus]
opt-level = 1 # TODO: MIR fails on optimizing this dependency, remove that..
opt-level = 1 # TODO: MIR fails on optimizing this dependency, remove that..
11 changes: 8 additions & 3 deletions mm2src/coins/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ enable-solana = [
]
enable-sia = [
"dep:reqwest",
"blake2b_simd"
"dep:blake2b_simd",
"dep:sia-rust"
]
default = []
run-docker-tests = []
Expand All @@ -41,13 +42,14 @@ byteorder = "1.3"
bytes = "0.4"
cfg-if = "1.0"
chain = { path = "../mm2_bitcoin/chain" }
chrono = { version = "0.4.23", "features" = ["serde"] }
common = { path = "../common" }
cosmrs = { version = "0.14.0", default-features = false }
crossbeam = "0.8"
crypto = { path = "../crypto" }
db_common = { path = "../db_common" }
derive_more = "0.99"
ed25519-dalek = "1.0.1"
ed25519-dalek = { version = "1.0.1", features = ["serde"] }
enum_derives = { path = "../derives/enum_derives" }
ethabi = { version = "17.0.0" }
ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
Expand All @@ -69,13 +71,14 @@ jsonrpc-core = "18.0.0"
keys = { path = "../mm2_bitcoin/keys" }
lazy_static = "1.4"
libc = "0.2"
nom = "6.1.2"
mm2_core = { path = "../mm2_core" }
mm2_err_handle = { path = "../mm2_err_handle" }
mm2_event_stream = { path = "../mm2_event_stream" }
mm2_git = { path = "../mm2_git" }
mm2_io = { path = "../mm2_io" }
mm2_metrics = { path = "../mm2_metrics" }
mm2_net = { path = "../mm2_net" }
mm2_net = { path = "../mm2_net", features = ["p2p"] }
mm2_number = { path = "../mm2_number"}
mm2_rpc = { path = "../mm2_rpc" }
mm2_state_machine = { path = "../mm2_state_machine" }
Expand All @@ -101,8 +104,10 @@ ser_error_derive = { path = "../derives/ser_error_derive" }
serde = "1.0"
serde_derive = "1.0"
serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
serde_with = "1.14.0"
serialization = { path = "../mm2_bitcoin/serialization" }
serialization_derive = { path = "../mm2_bitcoin/serialization_derive" }
sia-rust = { git = "https://github.com/KomodoPlatform/sia-rust", rev = "9f188b80b3213bcb604e7619275251ce08fae808", optional = true }
spv_validation = { path = "../mm2_bitcoin/spv_validation" }
sha2 = "0.10"
sha3 = "0.9"
Expand Down
9 changes: 9 additions & 0 deletions mm2src/coins/hd_wallet/pubkey.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#[cfg(feature = "enable-sia")]
use crate::siacoin::sia_hd_wallet::Ed25519ExtendedPublicKey;
use crate::CoinProtocol;

use super::*;
Expand Down Expand Up @@ -30,6 +32,13 @@ impl ExtendedPublicKeyOps for Secp256k1ExtendedPublicKey {
fn to_string(&self, prefix: Prefix) -> String { self.to_string(prefix) }
}

#[cfg(feature = "enable-sia")]
impl ExtendedPublicKeyOps for Ed25519ExtendedPublicKey {
fn derive_child(&self, child_number: ChildNumber) -> Result<Self, Bip32Error> { self.derive_child(child_number) }

fn to_string(&self, prefix: Prefix) -> String { self.to_string(prefix) }
}

/// This trait should be implemented for coins
/// to support extracting extended public keys from any depth.
/// The extraction can be from either an internal or external wallet.
Expand Down
8 changes: 4 additions & 4 deletions mm2src/coins/lp_coins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ use coin_errors::{MyAddressError, ValidatePaymentError, ValidatePaymentFut, Vali
pub mod coins_tests;

pub mod eth;
use eth::eth_swap_v2::{PaymentStatusErr, PrepareTxDataError, ValidatePaymentV2Err};
use eth::GetValidEthWithdrawAddError;
use eth::{eth_coin_from_conf_and_request, get_eth_address, EthCoin, EthGasDetailsErr, EthTxFeeDetails,
GetEthAddressError, SignedEthTx};
Expand Down Expand Up @@ -276,6 +277,9 @@ pub use test_coin::TestCoin;

pub mod tx_history_storage;

#[cfg(feature = "enable-sia")] pub mod siacoin;
#[cfg(feature = "enable-sia")] use siacoin::SiaCoin;

#[doc(hidden)]
#[allow(unused_variables)]
#[cfg(all(
Expand Down Expand Up @@ -318,10 +322,6 @@ use script::Script;
pub mod z_coin;
use crate::coin_balance::{BalanceObjectOps, HDWalletBalanceObject};
use z_coin::{ZCoin, ZcoinProtocolInfo};
#[cfg(feature = "enable-sia")] pub mod sia;
use eth::eth_swap_v2::PrepareTxDataError;
use eth::eth_swap_v2::{PaymentStatusErr, ValidatePaymentV2Err};
#[cfg(feature = "enable-sia")] use sia::SiaCoin;

pub type TransactionFut = Box<dyn Future<Item = TransactionEnum, Error = TransactionErr> + Send>;
pub type TransactionResult = Result<TransactionEnum, TransactionErr>;
Expand Down
167 changes: 0 additions & 167 deletions mm2src/coins/sia/address.rs

This file was deleted.

Loading

0 comments on commit 3815d08

Please sign in to comment.