mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Update to latest substrate (#723)
* Bump substrate deps. * Bump scale. * Bump ethabi. * Remove inherent from aura. * Migrate to construct_runtime * cargo fmt --all
This commit is contained in:
committed by
Bastian Köcher
parent
32342bf6e5
commit
7aa51f8d30
@@ -38,7 +38,6 @@ sc-keystore = { git = "https://github.com/paritytech/substrate.git", branch = "m
|
|||||||
sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sc-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sc-transaction-pool = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sc-telemetry = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
|
||||||
sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-consensus = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-consensus-aura = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ pub use sc_executor::NativeExecutor;
|
|||||||
use sc_finality_grandpa::SharedVoterState;
|
use sc_finality_grandpa::SharedVoterState;
|
||||||
use sc_keystore::LocalKeystore;
|
use sc_keystore::LocalKeystore;
|
||||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||||
use sc_telemetry::TelemetrySpan;
|
|
||||||
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
||||||
use sp_inherents::InherentDataProviders;
|
use sp_inherents::InherentDataProviders;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -71,7 +70,6 @@ pub fn new_partial(
|
|||||||
AuraPair,
|
AuraPair,
|
||||||
>,
|
>,
|
||||||
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
|
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
|
||||||
Option<TelemetrySpan>,
|
|
||||||
),
|
),
|
||||||
>,
|
>,
|
||||||
ServiceError,
|
ServiceError,
|
||||||
@@ -81,7 +79,7 @@ pub fn new_partial(
|
|||||||
}
|
}
|
||||||
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
||||||
|
|
||||||
let (client, backend, keystore_container, task_manager, telemetry_span) =
|
let (client, backend, keystore_container, task_manager) =
|
||||||
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||||
let client = Arc::new(client);
|
let client = Arc::new(client);
|
||||||
|
|
||||||
@@ -89,6 +87,7 @@ pub fn new_partial(
|
|||||||
|
|
||||||
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
|
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
|
||||||
config.transaction_pool.clone(),
|
config.transaction_pool.clone(),
|
||||||
|
config.role.is_authority().into(),
|
||||||
config.prometheus_registry(),
|
config.prometheus_registry(),
|
||||||
task_manager.spawn_handle(),
|
task_manager.spawn_handle(),
|
||||||
client.clone(),
|
client.clone(),
|
||||||
@@ -120,7 +119,7 @@ pub fn new_partial(
|
|||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
other: (aura_block_import, grandpa_link, telemetry_span),
|
other: (aura_block_import, grandpa_link),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +141,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
other: (block_import, grandpa_link, telemetry_span),
|
other: (block_import, grandpa_link),
|
||||||
} = new_partial(&config)?;
|
} = new_partial(&config)?;
|
||||||
|
|
||||||
if let Some(url) = &config.keystore_remote {
|
if let Some(url) = &config.keystore_remote {
|
||||||
@@ -276,7 +275,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
config,
|
config,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if role.is_authority() {
|
if role.is_authority() {
|
||||||
@@ -356,7 +354,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
|
|
||||||
/// Builds a new service for a light client.
|
/// Builds a new service for a light client.
|
||||||
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||||
let (client, backend, keystore_container, mut task_manager, on_demand, telemetry_span) =
|
let (client, backend, keystore_container, mut task_manager, on_demand) =
|
||||||
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||||
|
|
||||||
config
|
config
|
||||||
@@ -425,7 +423,6 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
network,
|
network,
|
||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
network_starter.start_network();
|
network_starter.start_network();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
hex-literal = "0.3"
|
hex-literal = "0.3"
|
||||||
serde = { version = "1.0.123", optional = true, features = ["derive"] }
|
serde = { version = "1.0.123", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ construct_runtime!(
|
|||||||
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
||||||
Aura: pallet_aura::{Module, Config<T>, Inherent},
|
Aura: pallet_aura::{Module, Config<T>},
|
||||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
|
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
|
||||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ pub use sc_executor::NativeExecutor;
|
|||||||
use sc_finality_grandpa::SharedVoterState;
|
use sc_finality_grandpa::SharedVoterState;
|
||||||
use sc_keystore::LocalKeystore;
|
use sc_keystore::LocalKeystore;
|
||||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||||
use sc_telemetry::TelemetrySpan;
|
|
||||||
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
|
||||||
use sp_inherents::InherentDataProviders;
|
use sp_inherents::InherentDataProviders;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
@@ -71,7 +70,6 @@ pub fn new_partial(
|
|||||||
AuraPair,
|
AuraPair,
|
||||||
>,
|
>,
|
||||||
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
|
sc_finality_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
|
||||||
Option<TelemetrySpan>,
|
|
||||||
),
|
),
|
||||||
>,
|
>,
|
||||||
ServiceError,
|
ServiceError,
|
||||||
@@ -81,7 +79,7 @@ pub fn new_partial(
|
|||||||
}
|
}
|
||||||
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
let inherent_data_providers = sp_inherents::InherentDataProviders::new();
|
||||||
|
|
||||||
let (client, backend, keystore_container, task_manager, telemetry_span) =
|
let (client, backend, keystore_container, task_manager) =
|
||||||
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||||
let client = Arc::new(client);
|
let client = Arc::new(client);
|
||||||
|
|
||||||
@@ -89,6 +87,7 @@ pub fn new_partial(
|
|||||||
|
|
||||||
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
|
let transaction_pool = sc_transaction_pool::BasicPool::new_full(
|
||||||
config.transaction_pool.clone(),
|
config.transaction_pool.clone(),
|
||||||
|
config.role.is_authority().into(),
|
||||||
config.prometheus_registry(),
|
config.prometheus_registry(),
|
||||||
task_manager.spawn_handle(),
|
task_manager.spawn_handle(),
|
||||||
client.clone(),
|
client.clone(),
|
||||||
@@ -120,7 +119,7 @@ pub fn new_partial(
|
|||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
other: (aura_block_import, grandpa_link, telemetry_span),
|
other: (aura_block_import, grandpa_link),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +141,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
select_chain,
|
select_chain,
|
||||||
transaction_pool,
|
transaction_pool,
|
||||||
inherent_data_providers,
|
inherent_data_providers,
|
||||||
other: (block_import, grandpa_link, telemetry_span),
|
other: (block_import, grandpa_link),
|
||||||
} = new_partial(&config)?;
|
} = new_partial(&config)?;
|
||||||
|
|
||||||
if let Some(url) = &config.keystore_remote {
|
if let Some(url) = &config.keystore_remote {
|
||||||
@@ -276,7 +275,6 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
config,
|
config,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if role.is_authority() {
|
if role.is_authority() {
|
||||||
@@ -356,7 +354,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
|
|
||||||
/// Builds a new service for a light client.
|
/// Builds a new service for a light client.
|
||||||
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError> {
|
||||||
let (client, backend, keystore_container, mut task_manager, on_demand, telemetry_span) =
|
let (client, backend, keystore_container, mut task_manager, on_demand) =
|
||||||
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
sc_service::new_light_parts::<Block, RuntimeApi, Executor>(&config)?;
|
||||||
|
|
||||||
config
|
config
|
||||||
@@ -425,7 +423,6 @@ pub fn new_light(mut config: Configuration) -> Result<TaskManager, ServiceError>
|
|||||||
network,
|
network,
|
||||||
network_status_sinks,
|
network_status_sinks,
|
||||||
system_rpc_tx,
|
system_rpc_tx,
|
||||||
telemetry_span,
|
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
network_starter.start_network();
|
network_starter.start_network();
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
hex-literal = "0.3"
|
hex-literal = "0.3"
|
||||||
libsecp256k1 = { version = "0.3.4", optional = true, default-features = false, features = ["hmac"] }
|
libsecp256k1 = { version = "0.3.4", optional = true, default-features = false, features = ["hmac"] }
|
||||||
serde = { version = "1.0.123", optional = true, features = ["derive"] }
|
serde = { version = "1.0.123", optional = true, features = ["derive"] }
|
||||||
|
|||||||
@@ -484,7 +484,7 @@ construct_runtime!(
|
|||||||
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
||||||
Aura: pallet_aura::{Module, Config<T>, Inherent},
|
Aura: pallet_aura::{Module, Config<T>},
|
||||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
|
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event},
|
||||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
ed25519-dalek = { version = "1.0", default-features = false, optional = true }
|
ed25519-dalek = { version = "1.0", default-features = false, optional = true }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
|
|
||||||
# Bridge dependencies
|
# Bridge dependencies
|
||||||
|
|
||||||
@@ -24,6 +24,7 @@ sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "ma
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-io = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
|
serde = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ where
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use frame_support::{impl_outer_dispatch, impl_outer_event, impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{parameter_types, weights::Weight};
|
||||||
use frame_system::{EventRecord, Phase};
|
use frame_system::{EventRecord, Phase};
|
||||||
use sp_core::H256;
|
use sp_core::H256;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
@@ -405,9 +405,6 @@ mod tests {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type AccountId = u64;
|
type AccountId = u64;
|
||||||
type CallDispatch = Module<TestRuntime>;
|
|
||||||
type System = frame_system::Module<TestRuntime>;
|
|
||||||
|
|
||||||
type MessageId = [u8; 4];
|
type MessageId = [u8; 4];
|
||||||
|
|
||||||
#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq)]
|
#[derive(Debug, Encode, Decode, Clone, PartialEq, Eq)]
|
||||||
@@ -440,28 +437,19 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
mod call_dispatch {
|
use crate as call_dispatch;
|
||||||
pub use crate::Event;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl_outer_event! {
|
frame_support::construct_runtime! {
|
||||||
pub enum TestEvent for TestRuntime {
|
pub enum TestRuntime where
|
||||||
frame_system<T>,
|
Block = Block,
|
||||||
call_dispatch<T>,
|
NodeBlock = Block,
|
||||||
}
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
}
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
impl_outer_origin! {
|
CallDispatch: call_dispatch::{Module, Call, Event<T>},
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl_outer_dispatch! {
|
|
||||||
pub enum Call for TestRuntime where origin: Origin {
|
|
||||||
frame_system::System,
|
|
||||||
call_dispatch::CallDispatch,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,10 +470,10 @@ mod tests {
|
|||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = Header;
|
type Header = Header;
|
||||||
type Event = TestEvent;
|
type Event = Event;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
@@ -498,7 +486,7 @@ mod tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config for TestRuntime {
|
impl Config for TestRuntime {
|
||||||
type Event = TestEvent;
|
type Event = Event;
|
||||||
type MessageId = MessageId;
|
type MessageId = MessageId;
|
||||||
type SourceChainAccountId = AccountId;
|
type SourceChainAccountId = AccountId;
|
||||||
type TargetChainAccountPublic = TestAccountPublic;
|
type TargetChainAccountPublic = TestAccountPublic;
|
||||||
@@ -586,7 +574,7 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageVersionSpecMismatch(
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageVersionSpecMismatch(
|
||||||
bridge,
|
bridge,
|
||||||
id,
|
id,
|
||||||
TEST_SPEC_VERSION,
|
TEST_SPEC_VERSION,
|
||||||
@@ -614,7 +602,7 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageWeightMismatch(
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageWeightMismatch(
|
||||||
bridge, id, 1973000, 0,
|
bridge, id, 1973000, 0,
|
||||||
)),
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
@@ -642,7 +630,9 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageSignatureMismatch(bridge, id)),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageSignatureMismatch(
|
||||||
|
bridge, id
|
||||||
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -662,7 +652,7 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageRejected(bridge, id)),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageRejected(bridge, id)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -686,7 +676,9 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageCallDecodeFailed(bridge, id)),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageCallDecodeFailed(
|
||||||
|
bridge, id
|
||||||
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -711,7 +703,7 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageCallRejected(bridge, id)),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageCallRejected(bridge, id)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -732,7 +724,11 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageDispatched(bridge, id, Ok(()))),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageDispatched(
|
||||||
|
bridge,
|
||||||
|
id,
|
||||||
|
Ok(())
|
||||||
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -755,7 +751,11 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageDispatched(bridge, id, Ok(()))),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageDispatched(
|
||||||
|
bridge,
|
||||||
|
id,
|
||||||
|
Ok(())
|
||||||
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -778,7 +778,11 @@ mod tests {
|
|||||||
System::events(),
|
System::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::call_dispatch(Event::<TestRuntime>::MessageDispatched(bridge, id, Ok(()))),
|
event: Event::call_dispatch(call_dispatch::Event::<TestRuntime>::MessageDispatched(
|
||||||
|
bridge,
|
||||||
|
id,
|
||||||
|
Ok(())
|
||||||
|
)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
# Bridge dependencies
|
# Bridge dependencies
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ fn prepare_deposit_details<T: Config<I>, I: Instance>(
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use bp_currency_exchange::LockFundsTransaction;
|
use bp_currency_exchange::LockFundsTransaction;
|
||||||
use frame_support::{assert_noop, assert_ok, impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{assert_noop, assert_ok, construct_runtime, parameter_types, weights::Weight};
|
||||||
use sp_core::H256;
|
use sp_core::H256;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::Header,
|
testing::Header,
|
||||||
@@ -313,11 +313,19 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq)]
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
|
use crate as pallet_bridge_currency_exchange;
|
||||||
|
|
||||||
impl_outer_origin! {
|
construct_runtime! {
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
pub enum TestRuntime where
|
||||||
|
Block = Block,
|
||||||
|
NodeBlock = Block,
|
||||||
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Exchange: pallet_bridge_currency_exchange::{Module},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -330,7 +338,7 @@ mod tests {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
@@ -340,7 +348,7 @@ mod tests {
|
|||||||
type Event = ();
|
type Event = ();
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
@@ -362,8 +370,6 @@ mod tests {
|
|||||||
type DepositInto = DummyDepositInto;
|
type DepositInto = DummyDepositInto;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Exchange = Module<TestRuntime>;
|
|
||||||
|
|
||||||
fn new_test_ext() -> sp_io::TestExternalities {
|
fn new_test_ext() -> sp_io::TestExternalities {
|
||||||
let t = frame_system::GenesisConfig::default()
|
let t = frame_system::GenesisConfig::default()
|
||||||
.build_storage::<TestRuntime>()
|
.build_storage::<TestRuntime>()
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
ethereum-types = "0.11.0"
|
ethereum-types = "0.11.0"
|
||||||
finality-grandpa = "0.12.3"
|
finality-grandpa = "0.13.0"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"], optional = true }
|
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"], optional = true }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ pub use crate::test_utils::{insert_header, validator_utils::*, validators_change
|
|||||||
pub use bp_eth_poa::signatures::secret_to_address;
|
pub use bp_eth_poa::signatures::secret_to_address;
|
||||||
|
|
||||||
use crate::validators::{ValidatorsConfiguration, ValidatorsSource};
|
use crate::validators::{ValidatorsConfiguration, ValidatorsSource};
|
||||||
use crate::{AuraConfiguration, ChainTime, Config, GenesisConfig, PruningStrategy};
|
use crate::{AuraConfiguration, ChainTime, Config, GenesisConfig as CrateGenesisConfig, PruningStrategy};
|
||||||
use bp_eth_poa::{Address, AuraHeader, H256, U256};
|
use bp_eth_poa::{Address, AuraHeader, H256, U256};
|
||||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{parameter_types, weights::Weight};
|
||||||
use secp256k1::SecretKey;
|
use secp256k1::SecretKey;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::Header as SubstrateHeader,
|
testing::Header as SubstrateHeader,
|
||||||
@@ -30,11 +30,20 @@ use sp_runtime::{
|
|||||||
|
|
||||||
pub type AccountId = u64;
|
pub type AccountId = u64;
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq, Debug)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
impl_outer_origin! {
|
use crate as pallet_ethereum;
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
|
||||||
|
frame_support::construct_runtime! {
|
||||||
|
pub enum TestRuntime where
|
||||||
|
Block = Block,
|
||||||
|
NodeBlock = Block,
|
||||||
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Ethereum: pallet_ethereum::{Module, Call},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -47,17 +56,17 @@ parameter_types! {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = SubstrateHeader;
|
type Header = SubstrateHeader;
|
||||||
type Event = ();
|
type Event = Event;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
@@ -134,7 +143,7 @@ pub fn run_test_with_genesis<T>(
|
|||||||
let validators = validators(total_validators);
|
let validators = validators(total_validators);
|
||||||
let addresses = validators_addresses(total_validators);
|
let addresses = validators_addresses(total_validators);
|
||||||
sp_io::TestExternalities::new(
|
sp_io::TestExternalities::new(
|
||||||
GenesisConfig {
|
CrateGenesisConfig {
|
||||||
initial_header: genesis.clone(),
|
initial_header: genesis.clone(),
|
||||||
initial_difficulty: 0.into(),
|
initial_difficulty: 0.into(),
|
||||||
initial_validators: addresses.clone(),
|
initial_validators: addresses.clone(),
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
finality-grandpa = { version = "0.12.3", default-features = false }
|
finality-grandpa = { version = "0.13.0", default-features = false }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
# Bridge Dependencies
|
# Bridge Dependencies
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
use crate::pallet::{BridgedHeader, Config};
|
use crate::pallet::{BridgedHeader, Config};
|
||||||
use bp_runtime::{BlockNumberOf, Chain};
|
use bp_runtime::{BlockNumberOf, Chain};
|
||||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{construct_runtime, parameter_types, weights::Weight};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::{Header, H256},
|
testing::{Header, H256},
|
||||||
traits::{BlakeTwo256, IdentityLookup},
|
traits::{BlakeTwo256, IdentityLookup},
|
||||||
@@ -27,11 +27,21 @@ pub type AccountId = u64;
|
|||||||
pub type TestHeader = BridgedHeader<TestRuntime>;
|
pub type TestHeader = BridgedHeader<TestRuntime>;
|
||||||
pub type TestNumber = BlockNumberOf<<TestRuntime as Config>::BridgedChain>;
|
pub type TestNumber = BlockNumberOf<<TestRuntime as Config>::BridgedChain>;
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq, Debug)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
impl_outer_origin! {
|
use crate as finality_verifier;
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
|
||||||
|
construct_runtime! {
|
||||||
|
pub enum TestRuntime where
|
||||||
|
Block = Block,
|
||||||
|
NodeBlock = Block,
|
||||||
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Bridge: pallet_substrate_bridge::{Module},
|
||||||
|
FinalityVerifier: finality_verifier::{Module},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -44,7 +54,7 @@ parameter_types! {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
@@ -54,7 +64,7 @@ impl frame_system::Config for TestRuntime {
|
|||||||
type Event = ();
|
type Event = ();
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
@@ -74,9 +84,9 @@ parameter_types! {
|
|||||||
pub const MaxRequests: u32 = 2;
|
pub const MaxRequests: u32 = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl crate::pallet::Config for TestRuntime {
|
impl finality_verifier::Config for TestRuntime {
|
||||||
type BridgedChain = TestBridgedChain;
|
type BridgedChain = TestBridgedChain;
|
||||||
type HeaderChain = pallet_substrate_bridge::Module<TestRuntime>;
|
type HeaderChain = pallet_substrate_bridge::Module<Self>;
|
||||||
type AncestryProof = Vec<<Self::BridgedChain as Chain>::Header>;
|
type AncestryProof = Vec<<Self::BridgedChain as Chain>::Header>;
|
||||||
type AncestryChecker = Checker<<Self::BridgedChain as Chain>::Header, Self::AncestryProof>;
|
type AncestryChecker = Checker<<Self::BridgedChain as Chain>::Header, Self::AncestryProof>;
|
||||||
type MaxRequests = MaxRequests;
|
type MaxRequests = MaxRequests;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
num-traits = { version = "0.2", default-features = false }
|
num-traits = { version = "0.2", default-features = false }
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
|
|||||||
@@ -821,9 +821,9 @@ fn verify_and_decode_messages_proof<Chain: SourceHeaderChain<Fee>, Fee, Dispatch
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::mock::{
|
use crate::mock::{
|
||||||
message, run_test, Origin, TestEvent, TestMessageDeliveryAndDispatchPayment, TestMessagesDeliveryProof,
|
message, run_test, Event as TestEvent, Origin, TestMessageDeliveryAndDispatchPayment,
|
||||||
TestMessagesProof, TestPayload, TestRuntime, PAYLOAD_REJECTED_BY_TARGET_CHAIN, REGULAR_PAYLOAD, TEST_LANE_ID,
|
TestMessagesDeliveryProof, TestMessagesProof, TestPayload, TestRuntime, PAYLOAD_REJECTED_BY_TARGET_CHAIN,
|
||||||
TEST_RELAYER_A, TEST_RELAYER_B,
|
REGULAR_PAYLOAD, TEST_LANE_ID, TEST_RELAYER_A, TEST_RELAYER_B,
|
||||||
};
|
};
|
||||||
use bp_message_lane::UnrewardedRelayersState;
|
use bp_message_lane::UnrewardedRelayersState;
|
||||||
use frame_support::{assert_noop, assert_ok};
|
use frame_support::{assert_noop, assert_ok};
|
||||||
@@ -847,7 +847,7 @@ mod tests {
|
|||||||
System::<TestRuntime>::events(),
|
System::<TestRuntime>::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::message_lane(RawEvent::MessageAccepted(TEST_LANE_ID, 1)),
|
event: TestEvent::pallet_message_lane(RawEvent::MessageAccepted(TEST_LANE_ID, 1)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
@@ -876,7 +876,7 @@ mod tests {
|
|||||||
System::<TestRuntime>::events(),
|
System::<TestRuntime>::events(),
|
||||||
vec![EventRecord {
|
vec![EventRecord {
|
||||||
phase: Phase::Initialization,
|
phase: Phase::Initialization,
|
||||||
event: TestEvent::message_lane(RawEvent::MessagesDelivered(TEST_LANE_ID, 1, 1)),
|
event: TestEvent::pallet_message_lane(RawEvent::MessagesDelivered(TEST_LANE_ID, 1, 1)),
|
||||||
topics: vec![],
|
topics: vec![],
|
||||||
}],
|
}],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ use bp_message_lane::{
|
|||||||
};
|
};
|
||||||
use bp_runtime::Size;
|
use bp_runtime::Size;
|
||||||
use codec::{Decode, Encode};
|
use codec::{Decode, Encode};
|
||||||
use frame_support::{impl_outer_event, impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{parameter_types, weights::Weight};
|
||||||
use sp_core::H256;
|
use sp_core::H256;
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::Header as SubstrateHeader,
|
testing::Header as SubstrateHeader,
|
||||||
@@ -49,25 +49,23 @@ impl sp_runtime::traits::Convert<H256, AccountId> for AccountIdConverter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq, Debug)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
mod message_lane {
|
use crate as pallet_message_lane;
|
||||||
pub use crate::Event;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl_outer_event! {
|
frame_support::construct_runtime! {
|
||||||
pub enum TestEvent for TestRuntime {
|
pub enum TestRuntime where
|
||||||
frame_system<T>,
|
Block = Block,
|
||||||
pallet_balances<T>,
|
NodeBlock = Block,
|
||||||
message_lane<T>,
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Balances: pallet_balances::{Module, Call, Event<T>},
|
||||||
|
MessageLane: pallet_message_lane::{Module, Call, Event<T>},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl_outer_origin! {
|
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
|
||||||
}
|
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const BlockHashCount: u64 = 250;
|
pub const BlockHashCount: u64 = 250;
|
||||||
pub const MaximumBlockWeight: Weight = 1024;
|
pub const MaximumBlockWeight: Weight = 1024;
|
||||||
@@ -78,17 +76,17 @@ parameter_types! {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
type AccountId = AccountId;
|
type AccountId = AccountId;
|
||||||
type Lookup = IdentityLookup<Self::AccountId>;
|
type Lookup = IdentityLookup<Self::AccountId>;
|
||||||
type Header = SubstrateHeader;
|
type Header = SubstrateHeader;
|
||||||
type Event = TestEvent;
|
type Event = Event;
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = pallet_balances::AccountData<Balance>;
|
type AccountData = pallet_balances::AccountData<Balance>;
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
@@ -108,7 +106,7 @@ impl pallet_balances::Config for TestRuntime {
|
|||||||
type MaxLocks = ();
|
type MaxLocks = ();
|
||||||
type Balance = Balance;
|
type Balance = Balance;
|
||||||
type DustRemoval = ();
|
type DustRemoval = ();
|
||||||
type Event = TestEvent;
|
type Event = Event;
|
||||||
type ExistentialDeposit = ExistentialDeposit;
|
type ExistentialDeposit = ExistentialDeposit;
|
||||||
type AccountStore = frame_system::Module<TestRuntime>;
|
type AccountStore = frame_system::Module<TestRuntime>;
|
||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
@@ -121,7 +119,7 @@ parameter_types! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Config for TestRuntime {
|
impl Config for TestRuntime {
|
||||||
type Event = TestEvent;
|
type Event = Event;
|
||||||
type WeightInfo = ();
|
type WeightInfo = ();
|
||||||
type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce;
|
type MaxMessagesToPruneAtOnce = MaxMessagesToPruneAtOnce;
|
||||||
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
|
type MaxUnrewardedRelayerEntriesAtInboundLane = MaxUnrewardedRelayerEntriesAtInboundLane;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
|
|
||||||
@@ -20,6 +20,7 @@ sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "master
|
|||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
|
serde = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -93,16 +93,23 @@ mod tests {
|
|||||||
traits::{BlakeTwo256, ConvertInto, IdentityLookup},
|
traits::{BlakeTwo256, ConvertInto, IdentityLookup},
|
||||||
Perbill, RuntimeAppPublic,
|
Perbill, RuntimeAppPublic,
|
||||||
};
|
};
|
||||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight, BasicExternalities};
|
use frame_support::{parameter_types, weights::Weight, BasicExternalities};
|
||||||
use sp_core::H256;
|
use sp_core::H256;
|
||||||
|
|
||||||
type AccountId = u64;
|
type AccountId = u64;
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
impl_outer_origin! {
|
frame_support::construct_runtime! {
|
||||||
pub enum Origin for TestRuntime {}
|
pub enum TestRuntime where
|
||||||
|
Block = Block,
|
||||||
|
NodeBlock = Block,
|
||||||
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Session: pallet_session::{Module},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -115,7 +122,7 @@ mod tests {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
@@ -125,7 +132,7 @@ mod tests {
|
|||||||
type Event = ();
|
type Event = ();
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
finality-grandpa = { version = "0.12.3", default-features = false }
|
finality-grandpa = { version = "0.13.0", default-features = false }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
use crate::{BridgedBlockHash, BridgedBlockNumber, BridgedHeader, Config};
|
use crate::{BridgedBlockHash, BridgedBlockNumber, BridgedHeader, Config};
|
||||||
use bp_runtime::Chain;
|
use bp_runtime::Chain;
|
||||||
use frame_support::{impl_outer_origin, parameter_types, weights::Weight};
|
use frame_support::{parameter_types, weights::Weight};
|
||||||
use sp_runtime::{
|
use sp_runtime::{
|
||||||
testing::{Header, H256},
|
testing::{Header, H256},
|
||||||
traits::{BlakeTwo256, IdentityLookup},
|
traits::{BlakeTwo256, IdentityLookup},
|
||||||
@@ -34,11 +34,20 @@ pub type TestHeader = BridgedHeader<TestRuntime>;
|
|||||||
pub type TestNumber = BridgedBlockNumber<TestRuntime>;
|
pub type TestNumber = BridgedBlockNumber<TestRuntime>;
|
||||||
pub type TestHash = BridgedBlockHash<TestRuntime>;
|
pub type TestHash = BridgedBlockHash<TestRuntime>;
|
||||||
|
|
||||||
#[derive(Clone, Eq, PartialEq, Debug)]
|
type Block = frame_system::mocking::MockBlock<TestRuntime>;
|
||||||
pub struct TestRuntime;
|
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
|
||||||
|
|
||||||
impl_outer_origin! {
|
use crate as pallet_substrate;
|
||||||
pub enum Origin for TestRuntime where system = frame_system {}
|
|
||||||
|
frame_support::construct_runtime! {
|
||||||
|
pub enum TestRuntime where
|
||||||
|
Block = Block,
|
||||||
|
NodeBlock = Block,
|
||||||
|
UncheckedExtrinsic = UncheckedExtrinsic,
|
||||||
|
{
|
||||||
|
System: frame_system::{Module, Call, Config, Storage, Event<T>},
|
||||||
|
Substrate: pallet_substrate::{Module, Call},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
@@ -51,7 +60,7 @@ parameter_types! {
|
|||||||
impl frame_system::Config for TestRuntime {
|
impl frame_system::Config for TestRuntime {
|
||||||
type Origin = Origin;
|
type Origin = Origin;
|
||||||
type Index = u64;
|
type Index = u64;
|
||||||
type Call = ();
|
type Call = Call;
|
||||||
type BlockNumber = u64;
|
type BlockNumber = u64;
|
||||||
type Hash = H256;
|
type Hash = H256;
|
||||||
type Hashing = BlakeTwo256;
|
type Hashing = BlakeTwo256;
|
||||||
@@ -61,7 +70,7 @@ impl frame_system::Config for TestRuntime {
|
|||||||
type Event = ();
|
type Event = ();
|
||||||
type BlockHashCount = BlockHashCount;
|
type BlockHashCount = BlockHashCount;
|
||||||
type Version = ();
|
type Version = ();
|
||||||
type PalletInfo = ();
|
type PalletInfo = PalletInfo;
|
||||||
type AccountData = ();
|
type AccountData = ();
|
||||||
type OnNewAccount = ();
|
type OnNewAccount = ();
|
||||||
type OnKilledAccount = ();
|
type OnKilledAccount = ();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
ethbloom = { version = "0.10.0", default-features = false, features = ["rlp"] }
|
ethbloom = { version = "0.10.0", default-features = false, features = ["rlp"] }
|
||||||
fixed-hash = { version = "0.7", default-features = false }
|
fixed-hash = { version = "0.7", default-features = false }
|
||||||
hash-db = { version = "0.15.2", default-features = false }
|
hash-db = { version = "0.15.2", default-features = false }
|
||||||
@@ -16,7 +16,7 @@ impl-serde = { version = "0.3.1", optional = true }
|
|||||||
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
|
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
|
||||||
parity-bytes = { version = "0.1", default-features = false }
|
parity-bytes = { version = "0.1", default-features = false }
|
||||||
plain_hasher = { version = "0.2.2", default-features = false }
|
plain_hasher = { version = "0.2.2", default-features = false }
|
||||||
primitive-types = { version = "0.8", default-features = false, features = ["codec", "rlp"] }
|
primitive-types = { version = "0.9", default-features = false, features = ["codec", "rlp"] }
|
||||||
rlp = { version = "0.5", default-features = false }
|
rlp = { version = "0.5", default-features = false }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
serde-big-array = { version = "0.2", optional = true }
|
serde-big-array = { version = "0.2", optional = true }
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
finality-grandpa = { version = "0.12.3", default-features = false }
|
finality-grandpa = { version = "0.13.0", default-features = false }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bp-runtime = { path = "../runtime", default-features = false }
|
bp-runtime = { path = "../runtime", default-features = false }
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["std"]
|
default = ["std"]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false, features = ["derive"] }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
|
||||||
|
|
||||||
# Bridge dependencies
|
# Bridge dependencies
|
||||||
|
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ bp-message-lane = { path = "../message-lane", default-features = false }
|
|||||||
bp-runtime = { path = "../runtime", default-features = false }
|
bp-runtime = { path = "../runtime", default-features = false }
|
||||||
fixed-hash = { version = "0.7.0", default-features = false }
|
fixed-hash = { version = "0.7.0", default-features = false }
|
||||||
hash256-std-hasher = { version = "0.15.2", default-features = false }
|
hash256-std-hasher = { version = "0.15.2", default-features = false }
|
||||||
impl-codec = { version = "0.4.2", default-features = false }
|
impl-codec = { version = "0.5.0", default-features = false }
|
||||||
impl-serde = { version = "0.3.1", optional = true }
|
impl-serde = { version = "0.3.1", optional = true }
|
||||||
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
|
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
|
||||||
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
serde = { version = "1.0.101", optional = true, features = ["derive"] }
|
||||||
|
|
||||||
# Substrate Based Dependencies
|
# Substrate Based Dependencies
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.1", default-features = false }
|
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
|
||||||
num-traits = { version = "0.2", default-features = false }
|
num-traits = { version = "0.2", default-features = false }
|
||||||
|
|
||||||
# Substrate Dependencies
|
# Substrate Dependencies
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
finality-grandpa = { version = "0.12.3" }
|
finality-grandpa = { version = "0.13.0" }
|
||||||
bp-header-chain = { path = "../header-chain" }
|
bp-header-chain = { path = "../header-chain" }
|
||||||
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-finality-grandpa = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "master" }
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
|
bp-eth-poa = { path = "../../primitives/ethereum-poa" }
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
headers-relay = { path = "../headers-relay" }
|
headers-relay = { path = "../headers-relay" }
|
||||||
hex-literal = "0.3"
|
hex-literal = "0.3"
|
||||||
jsonrpsee = { git = "https://github.com/svyatonik/jsonrpsee.git", branch = "shared-client-in-rpc-api", default-features = false, features = ["http"] }
|
jsonrpsee = { git = "https://github.com/svyatonik/jsonrpsee.git", branch = "shared-client-in-rpc-api", default-features = false, features = ["http"] }
|
||||||
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
|
libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] }
|
||||||
log = "0.4.11"
|
log = "0.4.11"
|
||||||
relay-utils = { path = "../utils" }
|
relay-utils = { path = "../utils" }
|
||||||
web3 = { version = "0.15", default-features = false }
|
web3 = { version = "0.15", git = "https://github.com/tomusdrw/rust-web3.git", branch ="td-ethabi", default-features = false }
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ ansi_term = "0.12"
|
|||||||
async-std = "1.9.0"
|
async-std = "1.9.0"
|
||||||
async-trait = "0.1.42"
|
async-trait = "0.1.42"
|
||||||
clap = { version = "2.33.3", features = ["yaml"] }
|
clap = { version = "2.33.3", features = ["yaml"] }
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
env_logger = "0.8.2"
|
env_logger = "0.8.2"
|
||||||
ethabi = "13.0"
|
ethabi = { git = "https://github.com/paritytech/ethabi.git", branch = "td-eth-types-11" }
|
||||||
ethabi-contract = "11.0"
|
ethabi-contract = { git = "https://github.com/paritytech/ethabi.git", branch = "td-eth-types-11" }
|
||||||
ethabi-derive = "13.0"
|
ethabi-derive = { git = "https://github.com/paritytech/ethabi.git", branch = "td-eth-types-11" }
|
||||||
futures = "0.3.12"
|
futures = "0.3.12"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
hex-literal = "0.3"
|
hex-literal = "0.3"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
headers-relay = { path = "../headers-relay" }
|
headers-relay = { path = "../headers-relay" }
|
||||||
relay-substrate-client = { path = "../substrate-client" }
|
relay-substrate-client = { path = "../substrate-client" }
|
||||||
relay-utils = { path = "../utils" }
|
relay-utils = { path = "../utils" }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
headers-relay = { path = "../headers-relay" }
|
headers-relay = { path = "../headers-relay" }
|
||||||
relay-substrate-client = { path = "../substrate-client" }
|
relay-substrate-client = { path = "../substrate-client" }
|
||||||
relay-utils = { path = "../utils" }
|
relay-utils = { path = "../utils" }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
headers-relay = { path = "../headers-relay" }
|
headers-relay = { path = "../headers-relay" }
|
||||||
relay-substrate-client = { path = "../substrate-client" }
|
relay-substrate-client = { path = "../substrate-client" }
|
||||||
relay-utils = { path = "../utils" }
|
relay-utils = { path = "../utils" }
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
headers-relay = { path = "../headers-relay" }
|
headers-relay = { path = "../headers-relay" }
|
||||||
relay-substrate-client = { path = "../substrate-client" }
|
relay-substrate-client = { path = "../substrate-client" }
|
||||||
relay-utils = { path = "../utils" }
|
relay-utils = { path = "../utils" }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = "1.6.5"
|
async-std = "1.6.5"
|
||||||
async-trait = "0.1.40"
|
async-trait = "0.1.40"
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
jsonrpsee = { git = "https://github.com/svyatonik/jsonrpsee.git", branch = "shared-client-in-rpc-api", default-features = false, features = ["ws"] }
|
jsonrpsee = { git = "https://github.com/svyatonik/jsonrpsee.git", branch = "shared-client-in-rpc-api", default-features = false, features = ["ws"] }
|
||||||
log = "0.4.11"
|
log = "0.4.11"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ impl ToString for Error {
|
|||||||
match self {
|
match self {
|
||||||
Self::WsConnectionError(e) => e.to_string(),
|
Self::WsConnectionError(e) => e.to_string(),
|
||||||
Self::Request(e) => e.to_string(),
|
Self::Request(e) => e.to_string(),
|
||||||
Self::ResponseParseFailed(e) => e.what().to_string(),
|
Self::ResponseParseFailed(e) => e.to_string(),
|
||||||
Self::UninitializedBridgePallet => "The Substrate bridge pallet has not been initialized yet.".into(),
|
Self::UninitializedBridgePallet => "The Substrate bridge pallet has not been initialized yet.".into(),
|
||||||
Self::AccountDoesNotExist => "Account does not exist on the chain".into(),
|
Self::AccountDoesNotExist => "Account does not exist on the chain".into(),
|
||||||
Self::ClientNotSynced(health) => format!("Substrate client is not synced: {}", health),
|
Self::ClientNotSynced(health) => format!("Substrate client is not synced: {}", health),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
async-std = "1.9.0"
|
async-std = "1.9.0"
|
||||||
async-trait = "0.1.42"
|
async-trait = "0.1.42"
|
||||||
codec = { package = "parity-scale-codec", version = "1.3.4" }
|
codec = { package = "parity-scale-codec", version = "2.0.0" }
|
||||||
futures = "0.3.12"
|
futures = "0.3.12"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
log = "0.4.14"
|
log = "0.4.14"
|
||||||
|
|||||||
Reference in New Issue
Block a user