mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Expose some const value and type (#1186)
* change const value visable * Add docs * Update docs * Update docs 2 * Fix ci * Fix spell check
This commit is contained in:
@@ -156,16 +156,24 @@ pub trait BridgedChainWithMessages: ChainWithMessages {
|
|||||||
fn transaction_payment(transaction: MessageTransaction<WeightOf<Self>>) -> BalanceOf<Self>;
|
fn transaction_payment(transaction: MessageTransaction<WeightOf<Self>>) -> BalanceOf<Self>;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) type ThisChain<B> = <B as MessageBridge>::ThisChain;
|
/// This chain in context of message bridge.
|
||||||
pub(crate) type BridgedChain<B> = <B as MessageBridge>::BridgedChain;
|
pub type ThisChain<B> = <B as MessageBridge>::ThisChain;
|
||||||
pub(crate) type HashOf<C> = <C as ChainWithMessages>::Hash;
|
/// Bridged chain in context of message bridge.
|
||||||
pub(crate) type AccountIdOf<C> = <C as ChainWithMessages>::AccountId;
|
pub type BridgedChain<B> = <B as MessageBridge>::BridgedChain;
|
||||||
pub(crate) type SignerOf<C> = <C as ChainWithMessages>::Signer;
|
/// Hash used on the chain.
|
||||||
pub(crate) type SignatureOf<C> = <C as ChainWithMessages>::Signature;
|
pub type HashOf<C> = <C as ChainWithMessages>::Hash;
|
||||||
pub(crate) type WeightOf<C> = <C as ChainWithMessages>::Weight;
|
/// Account id used on the chain.
|
||||||
pub(crate) type BalanceOf<C> = <C as ChainWithMessages>::Balance;
|
pub type AccountIdOf<C> = <C as ChainWithMessages>::AccountId;
|
||||||
|
/// Public key of the chain account that may be used to verify signature.
|
||||||
pub(crate) type CallOf<C> = <C as ThisChainWithMessages>::Call;
|
pub type SignerOf<C> = <C as ChainWithMessages>::Signer;
|
||||||
|
/// Signature type used on the chain.
|
||||||
|
pub type SignatureOf<C> = <C as ChainWithMessages>::Signature;
|
||||||
|
/// Type of weight that used on the chain.
|
||||||
|
pub type WeightOf<C> = <C as ChainWithMessages>::Weight;
|
||||||
|
/// Type of balances that is used on the chain.
|
||||||
|
pub type BalanceOf<C> = <C as ChainWithMessages>::Balance;
|
||||||
|
/// Type of call that is used on this chain.
|
||||||
|
pub type CallOf<C> = <C as ThisChainWithMessages>::Call;
|
||||||
|
|
||||||
/// Raw storage proof type (just raw trie nodes).
|
/// Raw storage proof type (just raw trie nodes).
|
||||||
type RawStorageProof = Vec<Vec<u8>>;
|
type RawStorageProof = Vec<Vec<u8>>;
|
||||||
@@ -260,12 +268,15 @@ pub mod source {
|
|||||||
#[derive(RuntimeDebug)]
|
#[derive(RuntimeDebug)]
|
||||||
pub struct FromThisChainMessageVerifier<B>(PhantomData<B>);
|
pub struct FromThisChainMessageVerifier<B>(PhantomData<B>);
|
||||||
|
|
||||||
pub(crate) const OUTBOUND_LANE_DISABLED: &str = "The outbound message lane is disabled.";
|
/// The error message returned from LaneMessageVerifier when outbound lane is disabled.
|
||||||
pub(crate) const TOO_MANY_PENDING_MESSAGES: &str = "Too many pending messages at the lane.";
|
pub const OUTBOUND_LANE_DISABLED: &str = "The outbound message lane is disabled.";
|
||||||
pub(crate) const BAD_ORIGIN: &str =
|
/// The error message returned from LaneMessageVerifier when too many pending messages at the
|
||||||
"Unable to match the source origin to expected target origin.";
|
/// lane.
|
||||||
pub(crate) const TOO_LOW_FEE: &str =
|
pub const TOO_MANY_PENDING_MESSAGES: &str = "Too many pending messages at the lane.";
|
||||||
"Provided fee is below minimal threshold required by 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<B>
|
impl<B>
|
||||||
LaneMessageVerifier<
|
LaneMessageVerifier<
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ pub enum Error {
|
|||||||
/// Failed to parse the response from HTTP service.
|
/// Failed to parse the response from HTTP service.
|
||||||
#[error("Failed to parse HTTP service response: {0:?}. Response: {1:?}")]
|
#[error("Failed to parse HTTP service response: {0:?}. Response: {1:?}")]
|
||||||
ParseHttp(serde_json::Error, String),
|
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:?}")]
|
#[error("Failed to select value from response: {0:?}. Response: {1:?}")]
|
||||||
SelectResponseValue(jsonpath_lib::JsonPathError, String),
|
SelectResponseValue(jsonpath_lib::JsonPathError, String),
|
||||||
/// Failed to parse float value from the selected value.
|
/// Failed to parse float value from the selected value.
|
||||||
|
|||||||
Reference in New Issue
Block a user