pub struct Erc721TokenContractRef { /* private fields */ }
Expand description

Erc721Token Contract Ref.

Trait Implementations§

source§

impl ContractRef for Erc721TokenContractRef

source§

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

Creates a new instance of the Contract Ref.
source§

fn address(&self) -> &Address

Returns the address of the contract.
source§

impl OwnedErc721WithMetadata for Erc721TokenContractRef

source§

fn init(&mut self, name: String, symbol: String, base_uri: String)

Initializes the module.
source§

fn name(&self) -> String

Returns the token collection name.
source§

fn symbol(&self) -> String

Returns the token collection symbol.
source§

fn base_uri(&self) -> String

Returns the base URI for the token collection.
source§

fn balance_of(&self, owner: &Address) -> U256

Returns the amount of tokens owned by owner.
source§

fn owner_of(&self, token_id: &U256) -> Address

Returns the owner of the token_id token. Read more
source§

fn safe_transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)

Safely transfers token_id token from from to to, checking the recipient contract uses Erc721Receiver. Read more
source§

fn safe_transfer_from_with_data( &mut self, from: &Address, to: &Address, token_id: &U256, data: &Bytes )

Safely transfers token_id token from from to to, checking the recipient contract uses Erc721Receiver, passes additional data. Read more
source§

fn transfer_from(&mut self, from: &Address, to: &Address, token_id: &U256)

Transfers a specific NFT tokenId from one account from to another to. Emits a Transfer event.
source§

fn approve(&mut self, approved: &Option<Address>, token_id: &U256)

Grants permission to approved to transfer token_id token. The approval is cleared when the token is transferred. Read more
source§

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

Approves or removes operator for the caller. Operators can call transfer_from or safe_transfer_from for all tokens owned by the caller. Read more
source§

fn get_approved(&self, token_id: &U256) -> Option<Address>

Returns the address approved for token_id token. Read more
source§

fn is_approved_for_all(&self, owner: &Address, operator: &Address) -> bool

Returns if the operator is allowed to manage all of the tokens of owner.
source§

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)

Transfers ownership of the module to new_owner. This function can only be accessed by the current contract owner. Read more
source§

fn owner(&self) -> Address

Returns the address of the current owner.
source§

fn mint(&mut self, to: &Address, token_id: &U256)

Mint a token and assigns it to to.
source§

fn burn(&mut self, token_id: &U256)

Burns token.

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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.