diff --git a/pallets/common/src/traits/settlement.rs b/pallets/common/src/traits/settlement.rs index e41f0c79f8..ef68492b23 100644 --- a/pallets/common/src/traits/settlement.rs +++ b/pallets/common/src/traits/settlement.rs @@ -1,6 +1,7 @@ use frame_support::decl_event; use frame_support::dispatch::DispatchError; use frame_support::weights::Weight; +use sp_std::collections::btree_set::BTreeSet; use sp_std::vec::Vec; use polymesh_primitives::settlement::{ @@ -83,6 +84,9 @@ decl_event!( /// An instruction affirmation has been withdrawn by a mediator. /// Parameters: [`IdentityId`] of the mediator and [`InstructionId`] of the instruction. MediatorAffirmationWithdrawn(IdentityId, InstructionId), + /// An instruction with mediators has been created. + /// Parameters: [`InstructionId`] of the instruction and the [`IdentityId`] of all mediators. + InstructionMediators(InstructionId, BTreeSet), } ); diff --git a/pallets/settlement/src/lib.rs b/pallets/settlement/src/lib.rs index f136605309..84cb94b431 100644 --- a/pallets/settlement/src/lib.rs +++ b/pallets/settlement/src/lib.rs @@ -1037,6 +1037,14 @@ impl Module { legs, memo, )); + + if !instruction_info.mediators().is_empty() { + Self::deposit_event(RawEvent::InstructionMediators( + instruction_id, + instruction_info.mediators().clone(), + )); + } + Ok(instruction_id) }