mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Smash serai-client so the processors don't need the entire lib to access their specific code
We prior controlled this with feature flags. It's just better to define their own crates.
This commit is contained in:
@@ -39,7 +39,8 @@ alloy-simple-request-transport = { path = "../../networks/ethereum/alloy-simple-
|
||||
alloy-rpc-client = { version = "1", default-features = false }
|
||||
alloy-provider = { version = "1", default-features = false }
|
||||
|
||||
serai-client = { path = "../../substrate/client", default-features = false, features = ["ethereum"] }
|
||||
serai-primitives = { path = "../../substrate/primitives", default-features = false, features = ["std"] }
|
||||
serai-client-ethereum = { path = "../../substrate/client/ethereum", default-features = false }
|
||||
|
||||
zalloc = { path = "../../common/zalloc" }
|
||||
log = { version = "0.4", default-features = false, features = ["std"] }
|
||||
|
||||
@@ -41,7 +41,8 @@ ethereum-primitives = { package = "serai-processor-ethereum-primitives", path =
|
||||
ethereum-deployer = { package = "serai-processor-ethereum-deployer", path = "../deployer", default-features = false }
|
||||
erc20 = { package = "serai-processor-ethereum-erc20", path = "../erc20", default-features = false }
|
||||
|
||||
serai-client = { path = "../../../substrate/client", default-features = false, features = ["ethereum"] }
|
||||
serai-primitives = { path = "../../../substrate/primitives", default-features = false, features = ["std"] }
|
||||
serai-client-ethereum = { path = "../../../substrate/client/ethereum", default-features = false }
|
||||
|
||||
futures-util = { version = "0.3", default-features = false, features = ["std"] }
|
||||
|
||||
|
||||
@@ -21,9 +21,8 @@ use alloy_rpc_types_eth::{BlockId, Log, Filter, TransactionInput, TransactionReq
|
||||
use alloy_transport::{TransportErrorKind, RpcError};
|
||||
use alloy_provider::{Provider, RootProvider};
|
||||
|
||||
use serai_client::{
|
||||
primitives::instructions::RefundableInInstruction, networks::ethereum::Address as SeraiAddress,
|
||||
};
|
||||
use serai_primitives::instructions::RefundableInInstruction;
|
||||
use serai_client_ethereum::Address as SeraiAddress;
|
||||
|
||||
use ethereum_primitives::LogIndex;
|
||||
use ethereum_schnorr::{PublicKey, Signature};
|
||||
|
||||
@@ -5,9 +5,9 @@ use alloy_sol_types::SolCall;
|
||||
|
||||
use alloy_consensus::{TxLegacy, Signed};
|
||||
|
||||
use serai_client::{
|
||||
primitives::SeraiAddress,
|
||||
primitives::instructions::{InInstruction as SeraiInInstruction, RefundableInInstruction},
|
||||
use serai_primitives::{
|
||||
address::SeraiAddress,
|
||||
instructions::{InInstruction as SeraiInInstruction, RefundableInInstruction},
|
||||
};
|
||||
|
||||
use ethereum_primitives::LogIndex;
|
||||
@@ -17,8 +17,8 @@ use crate::{InInstruction, tests::*};
|
||||
impl Test {
|
||||
pub(crate) fn in_instruction() -> RefundableInInstruction {
|
||||
RefundableInInstruction {
|
||||
origin: None,
|
||||
instruction: SeraiInInstruction::Transfer(SeraiAddress([0xff; 32])),
|
||||
return_address: None,
|
||||
instruction: SeraiInInstruction::Transfer { to: SeraiAddress([0xff; 32]) },
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ async fn test_erc20_router_in_instruction() {
|
||||
input: crate::abi::inInstructionCall::new((
|
||||
coin.into(),
|
||||
amount,
|
||||
borsh::to_vec(shorthand).unwrap().into(),
|
||||
borsh::to_vec(&shorthand).unwrap().into(),
|
||||
))
|
||||
.abi_encode()
|
||||
.into(),
|
||||
|
||||
@@ -20,7 +20,7 @@ use alloy_provider::{
|
||||
|
||||
use alloy_node_bindings::{Anvil, AnvilInstance};
|
||||
|
||||
use serai_client::networks::ethereum::{ContractDeployment, Address as SeraiEthereumAddress};
|
||||
use serai_client_ethereum::{ContractDeployment, Address as SeraiEthereumAddress};
|
||||
|
||||
use ethereum_schnorr::{PublicKey, Signature};
|
||||
use ethereum_deployer::Deployer;
|
||||
|
||||
@@ -14,7 +14,7 @@ use alloy_simple_request_transport::SimpleRequest;
|
||||
use alloy_rpc_client::ClientBuilder;
|
||||
use alloy_provider::{Provider, RootProvider};
|
||||
|
||||
use serai_client::primitives::validator_sets::Session;
|
||||
use serai_primitives::validator_sets::Session;
|
||||
|
||||
use serai_env as env;
|
||||
use serai_db::{Get, DbTxn, create_db};
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::collections::HashMap;
|
||||
use ciphersuite::*;
|
||||
use ciphersuite_kp256::Secp256k1;
|
||||
|
||||
use serai_client::networks::ethereum::Address;
|
||||
use serai_client_ethereum::Address;
|
||||
|
||||
use primitives::{ReceivedOutput, EventualityTracker};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use alloy_core::primitives::{FixedBytes, Address};
|
||||
|
||||
use serai_client::primitives::balance::Amount;
|
||||
use serai_primitives::balance::Amount;
|
||||
|
||||
pub(crate) mod output;
|
||||
pub(crate) mod transaction;
|
||||
|
||||
@@ -7,14 +7,12 @@ use alloy_core::primitives::U256;
|
||||
|
||||
use borsh::{BorshSerialize, BorshDeserialize};
|
||||
|
||||
use serai_client::{
|
||||
primitives::{
|
||||
network_id::ExternalNetworkId,
|
||||
coin::ExternalCoin,
|
||||
balance::{Amount, ExternalBalance},
|
||||
},
|
||||
networks::ethereum::Address,
|
||||
use serai_primitives::{
|
||||
network_id::ExternalNetworkId,
|
||||
coin::ExternalCoin,
|
||||
balance::{Amount, ExternalBalance},
|
||||
};
|
||||
use serai_client_ethereum::Address;
|
||||
|
||||
use primitives::{OutputType, ReceivedOutput};
|
||||
use ethereum_router::{Coin as EthereumCoin, InInstruction as EthereumInInstruction};
|
||||
|
||||
@@ -5,7 +5,7 @@ use frost::dkg::ThresholdKeys;
|
||||
|
||||
use alloy_core::primitives::{U256, Address as EthereumAddress};
|
||||
|
||||
use serai_client::networks::ethereum::Address;
|
||||
use serai_client_ethereum::Address;
|
||||
|
||||
use scheduler::SignableTransaction;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use alloy_rpc_types_eth::{Header, BlockNumberOrTag};
|
||||
use alloy_transport::{RpcError, TransportErrorKind};
|
||||
use alloy_provider::{Provider, RootProvider};
|
||||
|
||||
use serai_client::primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::Amount};
|
||||
use serai_primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::Amount};
|
||||
|
||||
use tokio::task::JoinSet;
|
||||
|
||||
|
||||
@@ -2,10 +2,8 @@ use std::collections::HashMap;
|
||||
|
||||
use alloy_core::primitives::U256;
|
||||
|
||||
use serai_client::{
|
||||
primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::ExternalBalance},
|
||||
networks::ethereum::Address,
|
||||
};
|
||||
use serai_primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::ExternalBalance};
|
||||
use serai_client_ethereum::Address;
|
||||
|
||||
use serai_db::Db;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user