[][src]Struct sunshine_bank_onchain::Module

pub struct Module<T: Trait>(_);

Implementations

impl<T: Trait + 'static> Module<T>[src]

pub fn bank_id_nonce() -> OnChainTreasuryID[src]

pub fn bank_associated_nonces<KArg1, KArg2>(k1: KArg1, k2: KArg2) -> u32 where
    KArg1: EncodeLike<OnChainTreasuryID>,
    KArg2: EncodeLike<BankMapID>, 
[src]

pub fn bank_stores<K: EncodeLike<OnChainTreasuryID>>(
    key: K
) -> Option<BankState<WithdrawalPermissions<T::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>>
[src]

Source of truth for OnChainTreasuryId uniqueness checks WARNING: do not append a prefix because the keyspace is used directly for checking uniqueness TODO: pre-reserve any known ModuleId's that could be accidentally generated that already exist elsewhere

pub fn deposits<KArg1, KArg2>(
    k1: KArg1,
    k2: KArg2
) -> Option<DepositInfo<T::AccountId, IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>> where
    KArg1: EncodeLike<OnChainTreasuryID>,
    KArg2: EncodeLike<u32>, 
[src]

pub fn spend_reservations<KArg1, KArg2>(
    k1: KArg1,
    k2: KArg2
) -> Option<ReservationInfo<IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, WithdrawalPermissions<T::AccountId>>> where
    KArg1: EncodeLike<OnChainTreasuryID>,
    KArg2: EncodeLike<u32>, 
[src]

pub fn spend_commitments<KArg1, KArg2>(
    k1: KArg1,
    k2: KArg2
) -> Option<CommitmentInfo<IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>> where
    KArg1: EncodeLike<BankTrackerIdentifier>,
    KArg2: EncodeLike<WithdrawalPermissions<T::AccountId>>, 
[src]

pub fn internal_transfers<KArg1, KArg2>(
    k1: KArg1,
    k2: KArg2
) -> Option<InternalTransferInfo<IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, WithdrawalPermissions<T::AccountId>>> where
    KArg1: EncodeLike<OnChainTreasuryID>,
    KArg2: EncodeLike<u32>, 
[src]

pub fn bank_tracker<KArg1, KArg2>(
    k1: KArg1,
    k2: KArg2
) -> Option<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> where
    KArg1: EncodeLike<BankTrackerIdentifier>,
    KArg2: EncodeLike<T::AccountId>, 
[src]

Trait Implementations

impl<T: Trait> BankDepositsAndSpends<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

type Bank = BankState<WithdrawalPermissions<T::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>

impl<T: Trait> BankReservations<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, Vec<u8>> for Module<T>[src]

impl<T: Trait> BankSpends<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

fn spend_from_free(
    from_bank_id: Self::TreasuryId,
    to: T::AccountId,
    amount: <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance
) -> DispatchResult
[src]

This method authenticates the spend by checking that the caller input follows the same shape as the bank's controller... => any method that calls this one will need to define local permissions for who can form the request as well as how to constrain the validity of that request based on their ownership/permissions ==> this will be called to liquidate free capital by burning bank controller ownership

fn spend_from_transfers(
    from_bank_id: Self::TreasuryId,
    id: u32,
    to: T::AccountId,
    amount: <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance
) -> Result<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, DispatchError>
[src]

Authenticates the spend within this method based on the identity of to in relation to the transfer_certificate. This is how most (almost all) withdrawals should occur

impl<T: Trait> BankStorageInfo<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

type DepositInfo = DepositInfo<T::AccountId, IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance>

type ReservationInfo = ReservationInfo<IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, WithdrawalPermissions<T::AccountId>>

type TransferInfo = InternalTransferInfo<IpfsReference, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, WithdrawalPermissions<T::AccountId>>

impl<T: Trait> Callable<T> for Module<T>[src]

type Call = Call<T>

impl<T: Trait> CheckBankBalances<<<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

impl<T: Clone + Trait> Clone for Module<T>[src]

impl<T: Trait> CommitAndTransfer<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, Vec<u8>> for Module<T>[src]

impl<T: Copy + Trait> Copy for Module<T>[src]

impl<T: Trait> Debug for Module<T> where
    T: Debug
[src]

impl<T: Trait> DepositIntoBank<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, Vec<u8>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

impl<T: Eq + Trait> Eq for Module<T>[src]

impl<T: Trait> GenerateUniqueID<OnChainTreasuryID> for Module<T>[src]

impl<T: Trait> IDIsAvailable<(OnChainTreasuryID, BankMapID, u32)> for Module<T>[src]

impl<T: Trait> IDIsAvailable<OnChainTreasuryID> for Module<T>[src]

impl<T: Trait> ModuleErrorMetadata for Module<T>[src]

impl<T: Trait> OffchainWorker<<T as Trait>::BlockNumber> for Module<T>[src]

impl<T: Trait> OnChainBank for Module<T>[src]

impl<T: Trait> OnFinalize<<T as Trait>::BlockNumber> for Module<T>[src]

impl<T: Trait> OnInitialize<<T as Trait>::BlockNumber> for Module<T>[src]

impl<T: Trait> OnRuntimeUpgrade for Module<T>[src]

impl<T: Trait> OwnershipProportionCalculations<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance, Permill> for Module<T>[src]

impl<T: PartialEq + Trait> PartialEq<Module<T>> for Module<T>[src]

impl<T: Trait> RegisterBankAccount<<T as Trait>::AccountId, WithdrawalPermissions<<T as Trait>::AccountId>, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

impl<T: Trait> SeededGenerateUniqueID<u32, (OnChainTreasuryID, BankMapID)> for Module<T>[src]

impl<T: Trait> StructuralEq for Module<T>[src]

impl<T: Trait> StructuralPartialEq for Module<T>[src]

impl<T: Trait> TermSheetExit<<T as Trait>::AccountId, <<T as Trait>::Currency as Currency<<T as Trait>::AccountId>>::Balance> for Module<T>[src]

Auto Trait Implementations

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

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

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

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

impl<T> UnwindSafe for Module<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> From<T> for T[src]

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

impl<T, Outer> IsWrappedBy<Outer> for T where
    Outer: AsRef<T> + AsMut<T> + From<T>,
    T: From<Outer>, 
[src]

fn from_ref(outer: &Outer) -> &T[src]

Get a reference to the inner from the outer.

fn from_mut(outer: &mut Outer) -> &mut T[src]

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<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>, 
[src]

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

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