Struct pallet_mixer::pallet::Pallet[][src]

pub struct Pallet<T>(_);

Implementations

impl<T: Config> Pallet<T>[src]

pub fn deposit(
    origin: OriginFor<T>,
    mixer_id: T::GroupId,
    data_points: Vec<ScalarData>
) -> DispatchResultWithPostInfo
[src]

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]

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]

pub fn set_stopped(
    origin: OriginFor<T>,
    stopped: bool
) -> DispatchResultWithPostInfo
[src]

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]

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]

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]

The TVL per group

impl<T: Config> Pallet<T>[src]

Trait Implementations

impl<T: Config> Callable<T> for Pallet<T>[src]

type Call = Call<T>

impl<T> Clone for Pallet<T>[src]

impl<T> Debug for Pallet<T>[src]

impl<T> Eq for Pallet<T>[src]

impl<T: Config> GetPalletVersion for Pallet<T>[src]

impl<T: Config> Hooks<<T as Config>::BlockNumber> for Pallet<T>[src]

impl<T: Config> IntegrityTest for Pallet<T>[src]

impl<T: Config> ModuleErrorMetadata for Pallet<T>[src]

impl<T: Config> OffchainWorker<<T as Config>::BlockNumber> for Pallet<T>[src]

impl<T: Config> OnFinalize<<T as Config>::BlockNumber> for Pallet<T>[src]

impl<T: Config> OnGenesis for Pallet<T>[src]

impl<T: Config> OnInitialize<<T as Config>::BlockNumber> for Pallet<T>[src]

impl<T: Config> OnRuntimeUpgrade for Pallet<T>[src]

impl<T> PartialEq<Pallet<T>> for Pallet<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Pallet<T> where
    T: RefUnwindSafe

impl<T> Send for Pallet<T> where
    T: Send

impl<T> Sync for Pallet<T> where
    T: Sync

impl<T> Unpin for Pallet<T> where
    T: Unpin

impl<T> UnwindSafe for Pallet<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CheckedConversion for T[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IsType<T> for T[src]

impl<T, Outer> IsWrappedBy<Outer> for T where
    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

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeRefUnwindSafe for T where
    T: RefUnwindSafe

impl<T> Member for T where
    T: 'static + Clone + PartialEq<T> + Eq + Send + Sync + Debug
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatedConversion for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T> UncheckedInto<T> for S where
    T: UncheckedFrom<S>, 

impl<T, S> UniqueSaturatedInto<T> for S where
    T: Bounded,
    S: TryInto<T>, 

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,