multiversx_sc_modules::bonding_curve::utils::storage

Trait StorageModule

Source
pub trait StorageModule: ContractBase + Sized {
    // Required methods
    fn token_details(
        &self,
        token: &TokenIdentifier<Self::Api>,
    ) -> SingleValueMapper<Self::Api, TokenOwnershipData<Self::Api>>;
    fn bonding_curve(
        &self,
        token: &TokenIdentifier<Self::Api>,
    ) -> SingleValueMapper<Self::Api, ManagedBuffer<Self::Api>>;
    fn owned_tokens(
        &self,
        owner: &ManagedAddress<Self::Api>,
    ) -> SetMapper<Self::Api, TokenIdentifier<Self::Api>>;
    fn nonce_amount(
        &self,
        identifier: &TokenIdentifier<Self::Api>,
        nonce: u64,
    ) -> SingleValueMapper<Self::Api, BigUint<Self::Api>>;
}

Required Methods§

Source

fn token_details( &self, token: &TokenIdentifier<Self::Api>, ) -> SingleValueMapper<Self::Api, TokenOwnershipData<Self::Api>>

Source

fn bonding_curve( &self, token: &TokenIdentifier<Self::Api>, ) -> SingleValueMapper<Self::Api, ManagedBuffer<Self::Api>>

Source

fn owned_tokens( &self, owner: &ManagedAddress<Self::Api>, ) -> SetMapper<Self::Api, TokenIdentifier<Self::Api>>

Source

fn nonce_amount( &self, identifier: &TokenIdentifier<Self::Api>, nonce: u64, ) -> SingleValueMapper<Self::Api, BigUint<Self::Api>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C> StorageModule for C
where C: AutoImpl,