diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs index 7c9bb685ae..b34cbb8554 100644 --- a/bridges/bin/runtime-common/src/messages.rs +++ b/bridges/bin/runtime-common/src/messages.rs @@ -156,16 +156,24 @@ pub trait BridgedChainWithMessages: ChainWithMessages { fn transaction_payment(transaction: MessageTransaction>) -> BalanceOf; } -pub(crate) type ThisChain = ::ThisChain; -pub(crate) type BridgedChain = ::BridgedChain; -pub(crate) type HashOf = ::Hash; -pub(crate) type AccountIdOf = ::AccountId; -pub(crate) type SignerOf = ::Signer; -pub(crate) type SignatureOf = ::Signature; -pub(crate) type WeightOf = ::Weight; -pub(crate) type BalanceOf = ::Balance; - -pub(crate) type CallOf = ::Call; +/// This chain in context of message bridge. +pub type ThisChain = ::ThisChain; +/// Bridged chain in context of message bridge. +pub type BridgedChain = ::BridgedChain; +/// Hash used on the chain. +pub type HashOf = ::Hash; +/// Account id used on the chain. +pub type AccountIdOf = ::AccountId; +/// Public key of the chain account that may be used to verify signature. +pub type SignerOf = ::Signer; +/// Signature type used on the chain. +pub type SignatureOf = ::Signature; +/// Type of weight that used on the chain. +pub type WeightOf = ::Weight; +/// Type of balances that is used on the chain. +pub type BalanceOf = ::Balance; +/// Type of call that is used on this chain. +pub type CallOf = ::Call; /// Raw storage proof type (just raw trie nodes). type RawStorageProof = Vec>; @@ -260,12 +268,15 @@ pub mod source { #[derive(RuntimeDebug)] pub struct FromThisChainMessageVerifier(PhantomData); - pub(crate) const OUTBOUND_LANE_DISABLED: &str = "The outbound message lane is disabled."; - pub(crate) const TOO_MANY_PENDING_MESSAGES: &str = "Too many pending messages at the lane."; - pub(crate) const BAD_ORIGIN: &str = - "Unable to match the source origin to expected target origin."; - pub(crate) const TOO_LOW_FEE: &str = - "Provided fee is below minimal threshold required by the lane."; + /// The error message returned from LaneMessageVerifier when outbound lane is disabled. + pub const OUTBOUND_LANE_DISABLED: &str = "The outbound message lane is disabled."; + /// The error message returned from LaneMessageVerifier when too many pending messages at the + /// lane. + pub const TOO_MANY_PENDING_MESSAGES: &str = "Too many pending messages at the lane."; + /// The error message returned from LaneMessageVerifier when call origin is mismatch. + pub const BAD_ORIGIN: &str = "Unable to match the source origin to expected target origin."; + /// The error message returned from LaneMessageVerifier when the message fee is too low. + pub const TOO_LOW_FEE: &str = "Provided fee is below minimal threshold required by the lane."; impl LaneMessageVerifier< diff --git a/bridges/relays/utils/src/error.rs b/bridges/relays/utils/src/error.rs index 2e4128feb0..26f1d0cace 100644 --- a/bridges/relays/utils/src/error.rs +++ b/bridges/relays/utils/src/error.rs @@ -26,7 +26,7 @@ pub enum Error { /// Failed to parse the response from HTTP service. #[error("Failed to parse HTTP service response: {0:?}. Response: {1:?}")] ParseHttp(serde_json::Error, String), - /// Failed to select response value from the JSON response. + /// Failed to select response value from the Json response. #[error("Failed to select value from response: {0:?}. Response: {1:?}")] SelectResponseValue(jsonpath_lib::JsonPathError, String), /// Failed to parse float value from the selected value.