mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 21:51:06 +00:00
Weights to u64 + Balances Weights (#5446)
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
@@ -118,7 +118,7 @@ decl_module! {
|
||||
/// Add a member `who` to the set.
|
||||
///
|
||||
/// May only be called from `AddOrigin` or root.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn add_member(origin, who: T::AccountId) {
|
||||
T::AddOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -137,7 +137,7 @@ decl_module! {
|
||||
/// Remove a member `who` from the set.
|
||||
///
|
||||
/// May only be called from `RemoveOrigin` or root.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn remove_member(origin, who: T::AccountId) {
|
||||
T::RemoveOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -159,7 +159,7 @@ decl_module! {
|
||||
/// May only be called from `SwapOrigin` or root.
|
||||
///
|
||||
/// Prime membership is *not* passed from `remove` to `add`, if extant.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn swap_member(origin, remove: T::AccountId, add: T::AccountId) {
|
||||
T::SwapOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -188,7 +188,7 @@ decl_module! {
|
||||
/// pass `members` pre-sorted.
|
||||
///
|
||||
/// May only be called from `ResetOrigin` or root.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn reset_members(origin, members: Vec<T::AccountId>) {
|
||||
T::ResetOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -211,7 +211,7 @@ decl_module! {
|
||||
/// May only be called from `Signed` origin of a current member.
|
||||
///
|
||||
/// Prime membership is passed from the origin account to `new`, if extant.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn change_key(origin, new: T::AccountId) {
|
||||
let remove = ensure_signed(origin)?;
|
||||
|
||||
@@ -239,7 +239,7 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Set the prime member. Must be a current member.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn set_prime(origin, who: T::AccountId) {
|
||||
T::PrimeOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -250,7 +250,7 @@ decl_module! {
|
||||
}
|
||||
|
||||
/// Remove the prime member if it exists.
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000)]
|
||||
#[weight = SimpleDispatchInfo::FixedNormal(50_000_000)]
|
||||
fn clear_prime(origin) {
|
||||
T::PrimeOrigin::try_origin(origin)
|
||||
.map(|_| ())
|
||||
@@ -315,6 +315,7 @@ mod tests {
|
||||
type Event = ();
|
||||
type BlockHashCount = BlockHashCount;
|
||||
type MaximumBlockWeight = MaximumBlockWeight;
|
||||
type DbWeight = ();
|
||||
type MaximumBlockLength = MaximumBlockLength;
|
||||
type AvailableBlockRatio = AvailableBlockRatio;
|
||||
type Version = ();
|
||||
|
||||
Reference in New Issue
Block a user