multiversx_sc_modules::subscription

Trait SubscriptionModule

Source
pub trait SubscriptionModule: ContractBase + Sized {
    // Required method
    fn subscription_update_event(
        &self,
        token_id: &ManagedBuffer<Self::Api>,
        token_nonce: u64,
        expiration: u64,
    );

    // Provided methods
    fn create_subscription_nft<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        token_id: &TokenIdentifier<Self::Api>,
        amount: &BigUint<Self::Api>,
        name: &ManagedBuffer<Self::Api>,
        royalties: &BigUint<Self::Api>,
        hash: &ManagedBuffer<Self::Api>,
        duration: u64,
        attributes: T,
        uris: &ManagedVec<Self::Api, ManagedBuffer<Self::Api>>,
    ) -> u64 { ... }
    fn update_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        id: &TokenIdentifier<Self::Api>,
        nonce: u64,
        attributes: T,
    ) { ... }
    fn get_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        id: &TokenIdentifier<Self::Api>,
        nonce: u64,
    ) -> T { ... }
    fn renew_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        id: &TokenIdentifier<Self::Api>,
        nonce: u64,
        duration: u64,
    ) { ... }
    fn cancel_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        id: &TokenIdentifier<Self::Api>,
        nonce: u64,
    ) { ... }
    fn get_subscription<T: NestedEncode + NestedDecode + TypeAbi>(
        &self,
        id: &TokenIdentifier<Self::Api>,
        nonce: u64,
    ) -> u64 { ... }
}

Required Methods§

Source

fn subscription_update_event( &self, token_id: &ManagedBuffer<Self::Api>, token_nonce: u64, expiration: u64, )

Provided Methods§

Source

fn create_subscription_nft<T: NestedEncode + NestedDecode + TypeAbi>( &self, token_id: &TokenIdentifier<Self::Api>, amount: &BigUint<Self::Api>, name: &ManagedBuffer<Self::Api>, royalties: &BigUint<Self::Api>, hash: &ManagedBuffer<Self::Api>, duration: u64, attributes: T, uris: &ManagedVec<Self::Api, ManagedBuffer<Self::Api>>, ) -> u64

Source

fn update_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, attributes: T, )

Source

fn get_subscription_attributes<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, ) -> T

Source

fn renew_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, duration: u64, )

Source

fn cancel_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, )

Source

fn get_subscription<T: NestedEncode + NestedDecode + TypeAbi>( &self, id: &TokenIdentifier<Self::Api>, nonce: u64, ) -> u64

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> SubscriptionModule for C
where C: AutoImpl,