mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Rename Primitive Crates (#271)
* Rename Ethereum PoA primitives crate The "sp" prefix comes from Substrate primitives, since this crate originated in that repo. However, it is not part of Substrate anymore and its name should be updated to reflect that. * Rename currency exchange primitives * Rust Fmt * Update import in benchmarking module * Rust Fmt * Split pub and no-pub * Sort toml files. Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
This commit is contained in:
committed by
Bastian Köcher
parent
868814e4b6
commit
9f6bd28384
@@ -11,6 +11,8 @@ async-std = "1.6.2"
|
||||
async-stream = "0.2.0"
|
||||
async-trait = "0.1.36"
|
||||
backoff = "0.2"
|
||||
bp-currency-exchange = { path = "../../primitives/currency-exchange" }
|
||||
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
|
||||
clap = { version = "2.33.1", features = ["yaml"] }
|
||||
codec = { package = "parity-scale-codec", version = "1.3.1" }
|
||||
env_logger = "0.7.0"
|
||||
@@ -30,8 +32,6 @@ rustc-hex = "2.0.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0.57"
|
||||
sysinfo = "0.15"
|
||||
sp-currency-exchange = { path = "../../primitives/currency-exchange" }
|
||||
sp-bridge-eth-poa = { path = "../../primitives/ethereum-poa" }
|
||||
time = "0.2"
|
||||
web3 = "0.13"
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ use crate::substrate_types::into_substrate_ethereum_receipt;
|
||||
use crate::sync_types::HeaderId;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use bp_currency_exchange::MaybeLockFundsTransaction;
|
||||
use bridge_node_runtime::exchange::EthereumTransactionInclusionProof;
|
||||
use sp_currency_exchange::MaybeLockFundsTransaction;
|
||||
use std::time::Duration;
|
||||
|
||||
/// Interval at which we ask Ethereum node for updates.
|
||||
@@ -240,7 +240,7 @@ impl TargetClient<EthereumToSubstrateExchange> for SubstrateTransactionsTarget {
|
||||
}
|
||||
|
||||
// now let's check if transaction is successful
|
||||
match sp_bridge_eth_poa::Receipt::is_successful_raw_receipt(raw_tx_receipt) {
|
||||
match bp_eth_poa::Receipt::is_successful_raw_receipt(raw_tx_receipt) {
|
||||
Ok(true) => (),
|
||||
_ => return Ok(false),
|
||||
}
|
||||
|
||||
@@ -20,11 +20,11 @@ use crate::ethereum_client::{EthereumConnectionParams, EthereumRpcClient, Ethere
|
||||
use crate::ethereum_types::{CallRequest, U256};
|
||||
use crate::rpc::EthereumRpc;
|
||||
|
||||
use bridge_node_runtime::exchange::LOCK_FUNDS_ADDRESS;
|
||||
use sp_bridge_eth_poa::{
|
||||
use bp_eth_poa::{
|
||||
signatures::{SecretKey, SignTransaction},
|
||||
UnsignedTransaction,
|
||||
};
|
||||
use bridge_node_runtime::exchange::LOCK_FUNDS_ADDRESS;
|
||||
|
||||
/// Ethereum exchange transaction params.
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -35,7 +35,7 @@ use crate::substrate_types::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use sp_bridge_eth_poa::Header as SubstrateEthereumHeader;
|
||||
use bp_eth_poa::Header as SubstrateEthereumHeader;
|
||||
|
||||
type Result<T> = result::Result<T, RpcError>;
|
||||
type GrandpaAuthorityList = Vec<u8>;
|
||||
|
||||
@@ -22,12 +22,12 @@ use crate::substrate_types::{Hash, Header as SubstrateHeader, Number, SignedBloc
|
||||
use crate::sync_types::{HeaderId, SubmittedHeaders};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use bp_eth_poa::Header as SubstrateEthereumHeader;
|
||||
use codec::{Decode, Encode};
|
||||
use jsonrpsee::raw::RawClient;
|
||||
use jsonrpsee::transport::http::HttpTransportClient;
|
||||
use jsonrpsee::Client;
|
||||
use num_traits::Zero;
|
||||
use sp_bridge_eth_poa::Header as SubstrateEthereumHeader;
|
||||
use sp_core::crypto::Pair;
|
||||
use sp_runtime::traits::IdentifyAccount;
|
||||
use std::collections::VecDeque;
|
||||
@@ -142,7 +142,7 @@ impl SubstrateRpc for SubstrateRpcClient {
|
||||
let data = Bytes(Vec::new());
|
||||
|
||||
let encoded_response = Substrate::state_call(&self.client, call, data, None).await?;
|
||||
let decoded_response: (u64, sp_bridge_eth_poa::H256) = Decode::decode(&mut &encoded_response.0[..])?;
|
||||
let decoded_response: (u64, bp_eth_poa::H256) = Decode::decode(&mut &encoded_response.0[..])?;
|
||||
|
||||
let best_header_id = HeaderId(decoded_response.0, decoded_response.1);
|
||||
Ok(best_header_id)
|
||||
@@ -153,7 +153,7 @@ impl SubstrateRpc for SubstrateRpcClient {
|
||||
let data = Bytes(Vec::new());
|
||||
|
||||
let encoded_response = Substrate::state_call(&self.client, call, data, None).await?;
|
||||
let decoded_response: (u64, sp_bridge_eth_poa::H256) = Decode::decode(&mut &encoded_response.0[..])?;
|
||||
let decoded_response: (u64, bp_eth_poa::H256) = Decode::decode(&mut &encoded_response.0[..])?;
|
||||
|
||||
let best_header_id = HeaderId(decoded_response.0, decoded_response.1);
|
||||
Ok(best_header_id)
|
||||
|
||||
@@ -19,7 +19,8 @@ use crate::ethereum_types::{
|
||||
};
|
||||
use crate::sync_types::{HeaderId, HeadersSyncPipeline, QueuedHeader, SourceHeader};
|
||||
use codec::Encode;
|
||||
pub use sp_bridge_eth_poa::{
|
||||
|
||||
pub use bp_eth_poa::{
|
||||
Address, Bloom, Bytes, Header as SubstrateEthereumHeader, LogEntry as SubstrateEthereumLogEntry,
|
||||
Receipt as SubstrateEthereumReceipt, TransactionOutcome as SubstrateEthereumTransactionOutcome, H256, U256,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user