Struct TestCep78

Source
pub struct TestCep78 { /* private fields */ }

Implementations§

Source§

impl TestCep78

Source

pub fn get_whitelist_mode(&self) -> WhitelistMode

Source

pub fn get_collection_name(&self) -> String

Source

pub fn get_collection_symbol(&self) -> String

Source

pub fn is_minting_allowed(&self) -> bool

Source

pub fn is_operator_burn_mode(&self) -> bool

Source

pub fn get_total_supply(&self) -> u64

Source

pub fn get_minting_mode(&self) -> MintingMode

Source

pub fn get_holder_mode(&self) -> NFTHolderMode

Source

pub fn get_number_of_minted_tokens(&self) -> u64

Source

pub fn get_page(&self, page_number: u64) -> Vec<bool>

Source

pub fn get_page_by_token_id(&self, token_id: u64) -> Vec<bool>

Source

pub fn get_page_by_token_hash(&self, token_hash: String) -> Vec<bool>

Source

pub fn get_page_table(&self) -> Vec<bool>

Source

pub fn get_metadata_by_kind( &self, kind: NFTMetadataKind, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> String

Source

pub fn get_token_issuer( &self, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> Address

Source

pub fn token_burned( &self, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> bool

Source

pub fn init( &mut self, collection_name: String, collection_symbol: String, total_token_supply: u64, ownership_mode: OwnershipMode, nft_kind: NFTKind, identifier_mode: NFTIdentifierMode, nft_metadata_kind: NFTMetadataKind, metadata_mutability: MetadataMutability, receipt_name: String, allow_minting: Maybe<bool>, minting_mode: Maybe<MintingMode>, holder_mode: Maybe<NFTHolderMode>, whitelist_mode: Maybe<WhitelistMode>, acl_whitelist: Maybe<Vec<Address>>, json_schema: Maybe<String>, burn_mode: Maybe<BurnMode>, operator_burn_mode: Maybe<bool>, owner_reverse_lookup_mode: Maybe<OwnerReverseLookupMode>, events_mode: Maybe<EventsMode>, transfer_filter_contract_contract: Maybe<Address>, additional_required_metadata: Maybe<Vec<NFTMetadataKind>>, optional_metadata: Maybe<Vec<NFTMetadataKind>>, )

Delegated. See self.token.init() for details.

Source

pub fn set_variables( &mut self, allow_minting: Maybe<bool>, acl_whitelist: Maybe<Vec<Address>>, operator_burn_mode: Maybe<bool>, )

Delegated. See self.token.set_variables() for details.

Source

pub fn mint( &mut self, token_owner: Address, token_meta_data: String, token_hash: Maybe<String>, )

Delegated. See self.token.mint() for details.

Source

pub fn burn(&mut self, token_id: Maybe<u64>, token_hash: Maybe<String>)

Delegated. See self.token.burn() for details.

Source

pub fn transfer( &mut self, token_id: Maybe<u64>, token_hash: Maybe<String>, source_key: Address, target_key: Address, )

Delegated. See self.token.transfer() for details.

Source

pub fn approve( &mut self, spender: Address, token_id: Maybe<u64>, token_hash: Maybe<String>, )

Delegated. See self.token.approve() for details.

Source

pub fn revoke(&mut self, token_id: Maybe<u64>, token_hash: Maybe<String>)

Delegated. See self.token.revoke() for details.

Source

pub fn set_approval_for_all(&mut self, approve_all: bool, operator: Address)

Delegated. See self.token.set_approval_for_all() for details.

Source

pub fn is_approved_for_all( &mut self, token_owner: Address, operator: Address, ) -> bool

Delegated. See self.token.is_approved_for_all() for details.

Source

pub fn owner_of( &self, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> Address

Delegated. See self.token.owner_of() for details.

Source

pub fn get_approved( &mut self, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> Option<Address>

Delegated. See self.token.get_approved() for details.

Source

pub fn metadata( &self, token_id: Maybe<u64>, token_hash: Maybe<String>, ) -> String

Delegated. See self.token.metadata() for details.

Source

pub fn set_token_metadata( &mut self, token_id: Maybe<u64>, token_hash: Maybe<String>, token_meta_data: String, )

Delegated. See self.token.set_token_metadata() for details.

Source

pub fn balance_of(&self, token_owner: Address) -> u64

Delegated. See self.token.balance_of() for details.

Source

pub fn register_owner(&mut self, token_owner: Maybe<Address>) -> String

Delegated. See self.token.register_owner() for details.

Source

pub fn is_whitelisted(&self, address: &Address) -> bool

Delegated. See self.token.is_whitelisted() for details.

Trait Implementations§

Source§

impl HasEntrypoints for TestCep78

Source§

fn entrypoints() -> Vec<Entrypoint>

Returns the list of contract’s entrypoints.
Source§

impl HasEvents for TestCep78

Source§

fn events() -> Vec<Event>

Returns a list of Events used by the contract.
Source§

fn event_schemas() -> BTreeMap<String, Schema>

Returns a map of event schemas used by the contract.
Source§

impl HasIdent for TestCep78

Source§

fn ident() -> String

Returns the contract’s ident.
Source§

impl Module for TestCep78

Source§

fn new(env: Rc<ContractEnv>) -> Self

Creates a new instance of the module with the given contract environment.
Source§

fn env(&self) -> Rc<ContractEnv>

Returns the contract environment associated with the module.
Source§

impl OdraContract for TestCep78

Source§

type HostRef = TestCep78HostRef

The host reference type.
Source§

type ContractRef = TestCep78ContractRef

The contract reference type.
Source§

type InitArgs = TestCep78InitArgs

The init args type.
Source§

impl SchemaCustomTypes for TestCep78

Source§

fn schema_types() -> Vec<Option<CustomType>>

Returns a vector of optional CustomTypes.
Source§

impl SchemaEntrypoints for TestCep78

Source§

fn schema_entrypoints() -> Vec<Entrypoint>

Returns a vector of Entrypoints.
Source§

impl SchemaErrors for TestCep78

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of UserErrors.
Source§

impl SchemaEvents for TestCep78

Source§

fn schema_events() -> Vec<Event>

Returns a vector of Events.
Source§

fn custom_types() -> Vec<Option<CustomType>>

Returns a vector of CustomTypes. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<R> Deployer<R> for R
where R: OdraContract,

Source§

fn deploy( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, ) -> <R as OdraContract>::HostRef

Deploys a contract with given init args. Read more
Source§

fn try_deploy( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, ) -> Result<<R as OdraContract>::HostRef, OdraError>

Tries to deploy a contract with given init args. Read more
Source§

fn deploy_with_cfg<T>( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: T, ) -> <R as OdraContract>::HostRef
where T: OdraConfig,

Deploys a contract with given init args and configuration. Read more
Source§

fn try_deploy_with_cfg<T>( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: T, ) -> Result<<R as OdraContract>::HostRef, OdraError>
where T: OdraConfig,

Tries to deploy a contract with given init args and configuration. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> HostRefLoader<<T as OdraContract>::HostRef> for T
where T: OdraContract,

Source§

fn load(env: &HostEnv, address: Address) -> <T as OdraContract>::HostRef

Loads an existing contract from the host environment.
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Revertible for T
where T: Module,

Source§

fn revert<E>(&self, error: E) -> !
where E: Into<OdraError>,

Reverts the contract execution with the given error.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.