Skip to content

Commit

Permalink
Support user-provided origins in Call-dispatch module (paritytech#355)
Browse files Browse the repository at this point in the history
* call dispatch origin

* Update modules/call-dispatch/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* cargo fmt --all

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
  • Loading branch information
2 people authored and serban300 committed Apr 9, 2024
1 parent ea50c1e commit c2677bc
Show file tree
Hide file tree
Showing 3 changed files with 305 additions and 47 deletions.
5 changes: 4 additions & 1 deletion bridges/bin/millau-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use sp_runtime::traits::{
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult, MultiSignature,
ApplyExtrinsicResult, MultiSignature, MultiSigner,
};
use sp_std::prelude::*;
#[cfg(feature = "std")]
Expand Down Expand Up @@ -222,6 +222,9 @@ impl pallet_bridge_call_dispatch::Trait for Runtime {
type Event = Event;
type MessageId = (bp_message_lane::LaneId, bp_message_lane::MessageNonce);
type Call = Call;
type SourceChainAccountPublic = MultiSigner;
type TargetChainAccountPublic = MultiSigner;
type TargetChainSignature = MultiSignature;
}

impl pallet_grandpa::Trait for Runtime {
Expand Down
5 changes: 4 additions & 1 deletion bridges/bin/rialto-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use sp_runtime::traits::{
use sp_runtime::{
create_runtime_str, generic, impl_opaque_keys,
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult, MultiSignature,
ApplyExtrinsicResult, MultiSignature, MultiSigner,
};
use sp_std::prelude::*;
#[cfg(feature = "std")]
Expand Down Expand Up @@ -271,6 +271,9 @@ impl pallet_bridge_call_dispatch::Trait for Runtime {
type Event = Event;
type MessageId = (bp_message_lane::LaneId, bp_message_lane::MessageNonce);
type Call = Call;
type SourceChainAccountPublic = MultiSigner;
type TargetChainAccountPublic = MultiSigner;
type TargetChainSignature = MultiSignature;
}

pub struct DepositInto;
Expand Down
Loading

0 comments on commit c2677bc

Please sign in to comment.