pub struct MockCep78OperatorHostRef { /* private fields */ }Expand description
MockCep78Operator Host Ref.
Implementations§
Source§impl MockCep78OperatorHostRef
impl MockCep78OperatorHostRef
pub fn set_address(&mut self, nft_contract: &Address)
pub fn mint(&mut self, token_metadata: String, is_reverse_lookup_enabled: bool)
pub fn mint_with_hash(&mut self, token_metadata: String, token_hash: String)
pub fn burn(&mut self, token_id: u64)
pub fn mint_for(&mut self, token_owner: Address, token_metadata: String)
pub fn transfer(&mut self, token_id: u64, target: Address)
pub fn transfer_from(&mut self, token_id: u64, source: Address, target: Address)
pub fn approve(&mut self, spender: Address, token_id: u64)
pub fn revoke(&mut self, token_id: u64)
Source§impl MockCep78OperatorHostRef
impl MockCep78OperatorHostRef
Sourcepub fn try_set_address(&mut self, nft_contract: &Address) -> OdraResult<()>
pub fn try_set_address(&mut self, nft_contract: &Address) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_mint(
&mut self,
token_metadata: String,
is_reverse_lookup_enabled: bool,
) -> OdraResult<()>
pub fn try_mint( &mut self, token_metadata: String, is_reverse_lookup_enabled: bool, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_mint_with_hash(
&mut self,
token_metadata: String,
token_hash: String,
) -> OdraResult<()>
pub fn try_mint_with_hash( &mut self, token_metadata: String, token_hash: String, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_burn(&mut self, token_id: u64) -> OdraResult<()>
pub fn try_burn(&mut self, token_id: u64) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_mint_for(
&mut self,
token_owner: Address,
token_metadata: String,
) -> OdraResult<()>
pub fn try_mint_for( &mut self, token_owner: Address, token_metadata: String, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_transfer(&mut self, token_id: u64, target: Address) -> OdraResult<()>
pub fn try_transfer(&mut self, token_id: u64, target: Address) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_transfer_from(
&mut self,
token_id: u64,
source: Address,
target: Address,
) -> OdraResult<()>
pub fn try_transfer_from( &mut self, token_id: u64, source: Address, target: Address, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_approve(&mut self, spender: Address, token_id: u64) -> OdraResult<()>
pub fn try_approve(&mut self, spender: Address, token_id: u64) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_revoke(&mut self, token_id: u64) -> OdraResult<()>
pub fn try_revoke(&mut self, token_id: u64) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl EntryPointsCallerProvider for MockCep78OperatorHostRef
impl EntryPointsCallerProvider for MockCep78OperatorHostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Returns an EntryPointsCaller for the given host environment.
Source§impl HasIdent for MockCep78OperatorHostRef
impl HasIdent for MockCep78OperatorHostRef
Source§impl HostRef for MockCep78OperatorHostRef
impl HostRef for MockCep78OperatorHostRef
Source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Creates a new host side reference to a contract.
Source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Creates a new host reference with attached tokens, based on the current instance. Read more
Source§fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
Returns the n-th event emitted by the contract. Read more
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Returns a detailed information about the last call of the contract.
Auto Trait Implementations§
impl Freeze for MockCep78OperatorHostRef
impl !RefUnwindSafe for MockCep78OperatorHostRef
impl !Send for MockCep78OperatorHostRef
impl !Sync for MockCep78OperatorHostRef
impl Unpin for MockCep78OperatorHostRef
impl !UnwindSafe for MockCep78OperatorHostRef
Blanket Implementations§
Source§impl<T> Addressable for Twhere
T: HostRef,
impl<T> Addressable for Twhere
T: HostRef,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more