Struct pallet_mixer::pallet::Pallet [−][src]
Implementations
impl<T: Config> Pallet<T>
[src]
pub fn deposit(
origin: OriginFor<T>,
mixer_id: T::GroupId,
data_points: Vec<ScalarData>
) -> DispatchResultWithPostInfo
[src]
origin: OriginFor<T>,
mixer_id: T::GroupId,
data_points: Vec<ScalarData>
) -> DispatchResultWithPostInfo
Deposits the fixed amount into the mixer with id of mixer_id
Multiple deposits can be inserted together since data_points
is an
array.
Fails in case the mixer is stopped or not initialized.
Weights:
-
Dependent on argument:
data_points
-
Base weight: 417_168_400_000
-
DB weights: 8 reads, 5 writes
-
Additional weights: 21_400_442_000 * data_points.len()
pub fn withdraw(
origin: OriginFor<T>,
withdraw_proof: WithdrawProof<T>
) -> DispatchResultWithPostInfo
[src]
origin: OriginFor<T>,
withdraw_proof: WithdrawProof<T>
) -> DispatchResultWithPostInfo
Withdraws a deposited amount from the mixer. Can only withdraw one deposit. Accepts proof of membership along with the mixer id.
Fails if the mixer is stopped or not initialized.
Weights:
-
Independent of the arguments.
-
Base weight: 1_078_562_000_000
-
DB weights: 9 reads, 3 writes
pub fn create_new(
origin: OriginFor<T>,
currency_id: CurrencyIdOf<T>,
size: BalanceOf<T>
) -> DispatchResultWithPostInfo
[src]
origin: OriginFor<T>,
currency_id: CurrencyIdOf<T>,
size: BalanceOf<T>
) -> DispatchResultWithPostInfo
pub fn set_stopped(
origin: OriginFor<T>,
stopped: bool
) -> DispatchResultWithPostInfo
[src]
origin: OriginFor<T>,
stopped: bool
) -> DispatchResultWithPostInfo
Stops the operation of all the mixers managed by the pallet. Can only be called by the admin or the root origin.
Weights:
-
Independent of the arguments.
-
Base weight: 36_000_000
-
DB weights: 6 reads, 4 writes
pub fn transfer_admin(
origin: OriginFor<T>,
to: T::AccountId
) -> DispatchResultWithPostInfo
[src]
origin: OriginFor<T>,
to: T::AccountId
) -> DispatchResultWithPostInfo
Transfers the admin from the caller to the specified to
account.
Can only be called by the current admin or the root origin.
Weights:
-
Independent of the arguments.
-
Base weight: 7_000_000
-
DB weights: 1 read, 1 write
impl<T: Config> Pallet<T>
[src]
pub fn initialised() -> bool
[src]
Flag indicating if the mixer is initialized
impl<T: Config> Pallet<T>
[src]
pub fn mixer_groups<KArg>(k: KArg) -> MixerInfo<T> where
KArg: EncodeLike<T::GroupId>,
[src]
KArg: EncodeLike<T::GroupId>,
The map of mixer groups to their metadata
impl<T: Config> Pallet<T>
[src]
pub fn mixer_group_ids() -> Vec<T::GroupId>
[src]
The vector of group ids
impl<T: Config> Pallet<T>
[src]
pub fn admin() -> T::AccountId
[src]
Administrator of the mixer pallet. This account that can stop/start operations of the mixer
impl<T: Config> Pallet<T>
[src]
pub fn total_value_locked<KArg>(k: KArg) -> BalanceOf<T> where
KArg: EncodeLike<T::GroupId>,
[src]
KArg: EncodeLike<T::GroupId>,
The TVL per group
impl<T: Config> Pallet<T>
[src]
pub fn account_id() -> T::AccountId
[src]
pub fn get_mixer(mixer_id: T::GroupId) -> Result<MixerInfo<T>, DispatchError>
[src]
pub fn initialize() -> DispatchResult
[src]
Trait Implementations
impl<T: Config> Callable<T> for Pallet<T>
[src]
impl<T> Clone for Pallet<T>
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T> Debug for Pallet<T>
[src]
impl<T> Eq for Pallet<T>
[src]
impl<T: Config> GetPalletVersion for Pallet<T>
[src]
fn current_version() -> PalletVersion
[src]
fn storage_version() -> Option<PalletVersion>
[src]
impl<T: Config> Hooks<<T as Config>::BlockNumber> for Pallet<T>
[src]
fn on_initialize(_n: BlockNumberFor<T>) -> Weight
[src]
fn on_finalize(_n: BlockNumberFor<T>)
[src]
pub fn on_runtime_upgrade() -> u64
[src]
pub fn offchain_worker(_n: BlockNumber)
[src]
pub fn integrity_test()
[src]
impl<T: Config> IntegrityTest for Pallet<T>
[src]
fn integrity_test()
[src]
impl<T: Config> ModuleErrorMetadata for Pallet<T>
[src]
fn metadata() -> &'static [ErrorMetadata]
[src]
impl<T: Config> OffchainWorker<<T as Config>::BlockNumber> for Pallet<T>
[src]
fn offchain_worker(n: <T as Config>::BlockNumber)
[src]
impl<T: Config> OnFinalize<<T as Config>::BlockNumber> for Pallet<T>
[src]
fn on_finalize(n: <T as Config>::BlockNumber)
[src]
impl<T: Config> OnGenesis for Pallet<T>
[src]
fn on_genesis()
[src]
impl<T: Config> OnInitialize<<T as Config>::BlockNumber> for Pallet<T>
[src]
fn on_initialize(n: <T as Config>::BlockNumber) -> Weight
[src]
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
[src]
fn on_runtime_upgrade() -> Weight
[src]
impl<T> PartialEq<Pallet<T>> for Pallet<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Pallet<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Pallet<T> where
T: Send,
T: Send,
impl<T> Sync for Pallet<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Pallet<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Pallet<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CheckedConversion for T
[src]
pub fn checked_from<T>(t: T) -> Option<Self> where
Self: TryFrom<T>,
[src]
Self: TryFrom<T>,
pub fn checked_into<T>(self) -> Option<T> where
Self: TryInto<T>,
[src]
Self: TryInto<T>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IsType<T> for T
[src]
pub fn from_ref(t: &T) -> &T
[src]
pub fn into_ref(&self) -> &T
[src]
pub fn from_mut(t: &mut T) -> &mut T
[src]
pub fn into_mut(&mut self) -> &mut T
[src]
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
Get a mutable reference to the inner from the outer.
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Member for T where
T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug,
[src]
T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatedConversion for T
pub fn saturated_from<T>(t: T) -> Self where
Self: UniqueSaturatedFrom<T>,
Self: UniqueSaturatedFrom<T>,
pub fn saturated_into<T>(self) -> T where
Self: UniqueSaturatedInto<T>,
Self: UniqueSaturatedInto<T>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
pub fn to_subset(&self) -> Option<SS>
pub fn is_in_subset(&self) -> bool
pub fn to_subset_unchecked(&self) -> SS
pub fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
impl<T, S> UniqueSaturatedInto<T> for S where
T: Bounded,
S: TryInto<T>,
T: Bounded,
S: TryInto<T>,
pub fn unique_saturated_into(self) -> T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,