Skip to content

Commit

Permalink
Added new() function for SovereignConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Andrei Baltariu <[email protected]>
  • Loading branch information
andreiblt1304 committed Dec 19, 2024
1 parent ce60191 commit 1518ac2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions common/transaction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,22 @@ pub struct SovereignConfig<M: ManagedTypeApi> {
pub opt_additional_stake_required: Option<ManagedVec<M, StakeArgs<M>>>,
}

impl<M: ManagedTypeApi> SovereignConfig<M> {
pub fn new(
min_validators: u64,
max_validators: u64,
min_stake: BigUint<M>,
opt_additional_stake_required: Option<ManagedVec<M, StakeArgs<M>>>,
) -> Self {
SovereignConfig {
min_validators,
max_validators,
min_stake,
opt_additional_stake_required,
}
}
}

#[type_abi]
#[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, ManagedVecItem, Clone)]
pub struct Operation<M: ManagedTypeApi> {
Expand Down

0 comments on commit 1518ac2

Please sign in to comment.