pub struct Erc1155Token { /* private fields */ }Expand description
Trait Implementations§
Source§impl HasEntrypoints for Erc1155Token
impl HasEntrypoints for Erc1155Token
Source§fn entrypoints() -> Vec<Entrypoint>
fn entrypoints() -> Vec<Entrypoint>
Returns the list of contract’s entrypoints.
Source§impl HasEvents for Erc1155Token
impl HasEvents for Erc1155Token
Source§impl Module for Erc1155Token
impl Module for Erc1155Token
Source§fn new(env: Rc<ContractEnv>) -> Self
fn new(env: Rc<ContractEnv>) -> Self
Creates a new instance of the module with the given contract environment.
Source§fn env(&self) -> Rc<ContractEnv>
fn env(&self) -> Rc<ContractEnv>
Returns the contract environment associated with the module.
Source§impl OdraContract for Erc1155Token
impl OdraContract for Erc1155Token
Source§type HostRef = Erc1155TokenHostRef
type HostRef = Erc1155TokenHostRef
The host reference type.
Source§type ContractRef = Erc1155TokenContractRef
type ContractRef = Erc1155TokenContractRef
The contract reference type.
Source§type UpgradeArgs = NoArgs
type UpgradeArgs = NoArgs
The upgrade args type.
Source§impl OwnedErc1155 for Erc1155Token
impl OwnedErc1155 for Erc1155Token
Source§fn balance_of(&self, owner: &Address, id: &U256) -> U256
fn balance_of(&self, owner: &Address, id: &U256) -> U256
Returns the amount of tokens of token type
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>
Batched version of Erc1155::balance_of. Read more
Source§fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
fn set_approval_for_all(&mut self, operator: &Address, approved: bool)
Allows or denials the
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
Checks if the
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>, )
Batched version of Erc1155::safe_transfer_from. Read more
Source§fn renounce_ownership(&mut self)
fn renounce_ownership(&mut self)
If the contract’s owner chooses to renounce their ownership, the contract
will no longer have an owner. This means that any functions that can only
be accessed by the owner will no longer be available. Read more
Source§fn transfer_ownership(&mut self, new_owner: &Address)
fn transfer_ownership(&mut self, new_owner: &Address)
Transfers ownership of the module to
new_owner. This function can only
be accessed by the current contract owner. Read moreSource§impl SchemaCustomTypes for Erc1155Token
Available on non-WebAssembly only.
impl SchemaCustomTypes for Erc1155Token
Available on non-WebAssembly only.
Source§fn schema_types() -> Vec<Option<CustomType>>
fn schema_types() -> Vec<Option<CustomType>>
Returns a vector of optional CustomTypes.
Source§impl SchemaEntrypoints for Erc1155Token
Available on non-WebAssembly only.
impl SchemaEntrypoints for Erc1155Token
Available on non-WebAssembly only.
Source§fn schema_entrypoints() -> Vec<Entrypoint>
fn schema_entrypoints() -> Vec<Entrypoint>
Returns a vector of Entrypoints.
Source§impl SchemaErrors for Erc1155Token
Available on non-WebAssembly only.
impl SchemaErrors for Erc1155Token
Available on non-WebAssembly only.
Source§impl SchemaEvents for Erc1155Token
Available on non-WebAssembly only.
impl SchemaEvents for Erc1155Token
Available on non-WebAssembly only.
Source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Returns a vector of CustomTypes. Read more
Auto Trait Implementations§
impl !Freeze for Erc1155Token
impl !RefUnwindSafe for Erc1155Token
impl !Send for Erc1155Token
impl !Sync for Erc1155Token
impl Unpin for Erc1155Token
impl !UnwindSafe for Erc1155Token
Blanket Implementations§
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
Source§impl<R> Deployer<R> for Rwhere
R: OdraContract,
impl<R> Deployer<R> for Rwhere
R: OdraContract,
Source§fn deploy(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
) -> <R as OdraContract>::HostRef
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>
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(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
cfg: InstallConfig,
) -> <R as OdraContract>::HostRef
fn deploy_with_cfg( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: InstallConfig, ) -> <R as OdraContract>::HostRef
Deploys a contract with given init args and configuration. Read more
Source§fn try_deploy_with_cfg(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
cfg: InstallConfig,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_deploy_with_cfg( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: InstallConfig, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to deploy a contract with given init args and configuration. Read more
Source§fn try_upgrade(
env: &HostEnv,
contract_to_upgrade: Address,
upgrade_args: <R as OdraContract>::UpgradeArgs,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_upgrade( env: &HostEnv, contract_to_upgrade: Address, upgrade_args: <R as OdraContract>::UpgradeArgs, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to upgrade a contract with given init args.
Source§fn try_upgrade_with_cfg(
env: &HostEnv,
contract_to_upgrade: Address,
upgrade_args: <R as OdraContract>::UpgradeArgs,
cfg: UpgradeConfig,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_upgrade_with_cfg( env: &HostEnv, contract_to_upgrade: Address, upgrade_args: <R as OdraContract>::UpgradeArgs, cfg: UpgradeConfig, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to upgrade a contract with given init args and configuration
Source§impl<T> HostRefLoader<<T as OdraContract>::HostRef> for Twhere
T: OdraContract,
impl<T> HostRefLoader<<T as OdraContract>::HostRef> for Twhere
T: OdraContract,
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>
Converts
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>
Converts
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