mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 19:51:02 +00:00
Token-swap-over-bridge pallet (#944)
* token swap pallet * token swap type (replay protection) * post-merge fixes * post-merge fix * Update modules/token-swap/src/lib.rs Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * Update modules/token-swap/src/lib.rs Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * add missing comment part * Update modules/token-swap/src/lib.rs Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com> * starting claim after lock period is over is forbidden * move spec_version and weight to arguments Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
f86d101d7c
commit
eba80f42a9
@@ -135,6 +135,22 @@ pub trait MessageDeliveryAndDispatchPayment<AccountId, Balance> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Messages bridge API to be used from other pallets.
|
||||
pub trait MessagesBridge<AccountId, Balance, Payload> {
|
||||
/// Error type.
|
||||
type Error: Debug;
|
||||
|
||||
/// Send message over the bridge.
|
||||
///
|
||||
/// Returns unique message nonce or error if send has failed.
|
||||
fn send_message(
|
||||
sender: AccountId,
|
||||
lane: LaneId,
|
||||
message: Payload,
|
||||
delivery_and_dispatch_fee: Balance,
|
||||
) -> Result<MessageNonce, Self::Error>;
|
||||
}
|
||||
|
||||
/// Handler for messages delivery confirmation.
|
||||
pub trait OnDeliveryConfirmed {
|
||||
/// Called when we receive confirmation that our messages have been delivered to the
|
||||
|
||||
Reference in New Issue
Block a user