pub struct Erc1155TokenHostRef { /* private fields */ }Expand description
Erc1155Token Host Ref.
Implementations§
Source§impl Erc1155TokenHostRef
impl Erc1155TokenHostRef
Sourcepub fn try_init(&mut self) -> OdraResult<()>
pub fn try_init(&mut self) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_balance_of(&self, owner: &Address, id: &U256) -> OdraResult<U256>
pub fn try_balance_of(&self, owner: &Address, id: &U256) -> OdraResult<U256>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_balance_of_batch(
&self,
owners: Vec<Address>,
ids: Vec<U256>,
) -> OdraResult<Vec<U256>>
pub fn try_balance_of_batch( &self, owners: Vec<Address>, ids: Vec<U256>, ) -> OdraResult<Vec<U256>>
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_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_safe_transfer_from(
&mut self,
from: &Address,
to: &Address,
id: &U256,
amount: &U256,
data: &Option<Bytes>,
) -> OdraResult<()>
pub fn try_safe_transfer_from( &mut self, from: &Address, to: &Address, id: &U256, amount: &U256, data: &Option<Bytes>, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_safe_batch_transfer_from(
&mut self,
from: &Address,
to: &Address,
ids: Vec<U256>,
amounts: Vec<U256>,
data: &Option<Bytes>,
) -> OdraResult<()>
pub fn try_safe_batch_transfer_from( &mut self, from: &Address, to: &Address, ids: Vec<U256>, amounts: Vec<U256>, data: &Option<Bytes>, ) -> OdraResult<()>
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,
id: &U256,
amount: &U256,
data: &Option<Bytes>,
) -> OdraResult<()>
pub fn try_mint( &mut self, to: &Address, id: &U256, amount: &U256, data: &Option<Bytes>, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_mint_batch(
&mut self,
to: &Address,
ids: Vec<U256>,
amounts: Vec<U256>,
data: &Option<Bytes>,
) -> OdraResult<()>
pub fn try_mint_batch( &mut self, to: &Address, ids: Vec<U256>, amounts: Vec<U256>, data: &Option<Bytes>, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_burn(
&mut self,
from: &Address,
id: &U256,
amount: &U256,
) -> OdraResult<()>
pub fn try_burn( &mut self, from: &Address, id: &U256, amount: &U256, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_burn_batch(
&mut self,
from: &Address,
ids: Vec<U256>,
amounts: Vec<U256>,
) -> OdraResult<()>
pub fn try_burn_batch( &mut self, from: &Address, ids: Vec<U256>, amounts: Vec<U256>, ) -> OdraResult<()>
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl EntryPointsCallerProvider for Erc1155TokenHostRef
impl EntryPointsCallerProvider for Erc1155TokenHostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Source§impl HasIdent for Erc1155TokenHostRef
impl HasIdent for Erc1155TokenHostRef
Source§impl HostRef for Erc1155TokenHostRef
impl HostRef for Erc1155TokenHostRef
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 OwnedErc1155 for Erc1155TokenHostRef
impl OwnedErc1155 for Erc1155TokenHostRef
Source§fn balance_of(&self, owner: &Address, id: &U256) -> U256
fn balance_of(&self, owner: &Address, id: &U256) -> U256
id owned by owner.Source§fn balance_of_batch(&self, owners: Vec<Address>, ids: Vec<U256>) -> Vec<U256>
fn balance_of_batch(&self, owners: Vec<Address>, ids: Vec<U256>) -> Vec<U256>
Source§fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
operator to transfer the caller’s tokens. 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 approved to transfer owner’s tokens.Source§fn safe_transfer_from(
&mut self,
from: &Address,
to: &Address,
id: &U256,
amount: &U256,
data: &Option<Bytes>,
)
fn safe_transfer_from( &mut self, from: &Address, to: &Address, id: &U256, amount: &U256, data: &Option<Bytes>, )
Source§fn safe_batch_transfer_from(
&mut self,
from: &Address,
to: &Address,
ids: Vec<U256>,
amounts: Vec<U256>,
data: &Option<Bytes>,
)
fn safe_batch_transfer_from( &mut self, from: &Address, to: &Address, ids: Vec<U256>, amounts: Vec<U256>, data: &Option<Bytes>, )
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 Erc1155TokenHostRef
impl !RefUnwindSafe for Erc1155TokenHostRef
impl !Send for Erc1155TokenHostRef
impl !Sync for Erc1155TokenHostRef
impl Unpin for Erc1155TokenHostRef
impl !UnwindSafe for Erc1155TokenHostRef
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