pub struct Erc721TokenHostRef { /* private fields */ }Expand description
Erc721Token Host Ref.
Implementations§
Source§impl Erc721TokenHostRef
impl Erc721TokenHostRef
Sourcepub fn try_init(
&mut self,
name: String,
symbol: String,
base_uri: String,
) -> OdraResult<()>
pub fn try_init( &mut self, name: String, symbol: String, base_uri: String, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_name(&self) -> OdraResult<String>
pub fn try_name(&self) -> OdraResult<String>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_symbol(&self) -> OdraResult<String>
pub fn try_symbol(&self) -> OdraResult<String>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_base_uri(&self) -> OdraResult<String>
pub fn try_base_uri(&self) -> OdraResult<String>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_balance_of(&self, owner: &Address) -> OdraResult<U256>
pub fn try_balance_of(&self, owner: &Address) -> OdraResult<U256>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_owner_of(&self, token_id: &U256) -> OdraResult<Address>
pub fn try_owner_of(&self, token_id: &U256) -> OdraResult<Address>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_safe_transfer_from(
&mut self,
from: &Address,
to: &Address,
token_id: &U256,
) -> OdraResult<()>
pub fn try_safe_transfer_from( &mut self, from: &Address, to: &Address, token_id: &U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_safe_transfer_from_with_data(
&mut self,
from: &Address,
to: &Address,
token_id: &U256,
data: &Bytes,
) -> OdraResult<()>
pub fn try_safe_transfer_from_with_data( &mut self, from: &Address, to: &Address, token_id: &U256, data: &Bytes, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_transfer_from(
&mut self,
from: &Address,
to: &Address,
token_id: &U256,
) -> OdraResult<()>
pub fn try_transfer_from( &mut self, from: &Address, to: &Address, token_id: &U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_approve(
&mut self,
approved: &Option<Address>,
token_id: &U256,
) -> OdraResult<()>
pub fn try_approve( &mut self, approved: &Option<Address>, token_id: &U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_set_approval_for_all(
&mut self,
operator: &Address,
approved: bool,
) -> OdraResult<()>
pub fn try_set_approval_for_all( &mut self, operator: &Address, approved: bool, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_get_approved(&self, token_id: &U256) -> OdraResult<Option<Address>>
pub fn try_get_approved(&self, token_id: &U256) -> OdraResult<Option<Address>>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_is_approved_for_all(
&self,
owner: &Address,
operator: &Address,
) -> OdraResult<bool>
pub fn try_is_approved_for_all( &self, owner: &Address, operator: &Address, ) -> OdraResult<bool>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_renounce_ownership(&mut self) -> OdraResult<()>
pub fn try_renounce_ownership(&mut self) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_transfer_ownership(&mut self, new_owner: &Address) -> OdraResult<()>
pub fn try_transfer_ownership(&mut self, new_owner: &Address) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_owner(&self) -> OdraResult<Address>
pub fn try_owner(&self) -> OdraResult<Address>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_mint(&mut self, to: &Address, token_id: &U256) -> OdraResult<()>
pub fn try_mint(&mut self, to: &Address, token_id: &U256) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_burn(&mut self, token_id: &U256) -> OdraResult<()>
pub fn try_burn(&mut self, token_id: &U256) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl EntryPointsCallerProvider for Erc721TokenHostRef
impl EntryPointsCallerProvider for Erc721TokenHostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Source§impl HostRef for Erc721TokenHostRef
impl HostRef for Erc721TokenHostRef
Source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Source§fn contract_address(&self) -> Address
fn contract_address(&self) -> Address
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,
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Source§impl OwnedErc721WithMetadata for Erc721TokenHostRef
impl OwnedErc721WithMetadata for Erc721TokenHostRef
Source§fn balance_of(&self, owner: &Address) -> U256
fn balance_of(&self, owner: &Address) -> U256
owner.Source§fn safe_transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)
fn safe_transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)
token_id token from from to to, checking the recipient contract uses
Erc721Receiver. Read moreSource§fn safe_transfer_from_with_data(
&mut self,
from: &Address,
to: &Address,
token_id: &U256,
data: &Bytes,
)
fn safe_transfer_from_with_data( &mut self, from: &Address, to: &Address, token_id: &U256, data: &Bytes, )
token_id token from from to to, checking the recipient contract uses
Erc721Receiver, passes additional data. Read moreSource§fn approve(&mut self, approved: &Option<Address>, token_id: &U256)
fn approve(&mut self, approved: &Option<Address>, token_id: &U256)
approved to transfer token_id token. The approval is cleared when the token is transferred. Read moreSource§fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
transfer_from or safe_transfer_from for all
tokens owned by the caller. Read moreSource§fn get_approved(&self, token_id: &U256) -> Option<Address>
fn get_approved(&self, token_id: &U256) -> Option<Address>
token_id token. Read moreSource§fn is_approved_for_all(&self, owner: &Address, operator: &Address) -> bool
fn is_approved_for_all(&self, owner: &Address, operator: &Address) -> bool
operator is allowed to manage all of the tokens of owner.Source§fn renounce_ownership(&mut self)
fn renounce_ownership(&mut self)
Source§fn transfer_ownership(&mut self, new_owner: &Address)
fn transfer_ownership(&mut self, new_owner: &Address)
new_owner. This function can only
be accessed by the current contract owner. Read moreAuto Trait Implementations§
impl Freeze for Erc721TokenHostRef
impl !RefUnwindSafe for Erc721TokenHostRef
impl !Send for Erc721TokenHostRef
impl !Sync for Erc721TokenHostRef
impl Unpin for Erc721TokenHostRef
impl !UnwindSafe for Erc721TokenHostRef
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more