View Source Ethers.Contract.ERC721 (Ethers v0.0.1-dev)
ERC721 token interface
More info: https://ethereum.org/en/developers/docs/standards/tokens/erc-721/
Link to this section Summary
Functions
Executes approve(address to, uint256 tokenId)
on the contract.
Executes balanceOf(address owner)
on the contract.
Executes getApproved(uint256 tokenId)
on the contract.
Executes isApprovedForAll(address owner, address operator)
on the contract.
Executes name()
on the contract.
Executes ownerOf(uint256 tokenId)
on the contract.
Executes safeTransferFrom(address from, address to, uint256 tokenId)
on the contract.
Executes safeTransferFrom(address from, address to, uint256 tokenId, bytes data)
on the contract.
Executes setApprovalForAll(address operator, bool _approved)
on the contract.
Executes supportsInterface(bytes4 interfaceId)
on the contract.
Executes symbol()
on the contract.
Executes tokenURI(uint256 tokenId)
on the contract.
Executes totalSupply()
on the contract.
Executes transferFrom(address from, address to, uint256 tokenId)
on the contract.
Link to this section Functions
@spec approve(Ethers.Types.t_address(), non_neg_integer(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes approve(address to, uint256 tokenId)
on the contract.
parameters
Parameters
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
@spec balance_of(Ethers.Types.t_address(), Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes balanceOf(address owner)
on the contract.
parameters
Parameters
- owner:
:address
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
{:uint, 256}
@spec get_approved(non_neg_integer(), Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes getApproved(uint256 tokenId)
on the contract.
parameters
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:address
@spec is_approved_for_all( Ethers.Types.t_address(), Ethers.Types.t_address(), Keyword.t() ) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes isApprovedForAll(address owner, address operator)
on the contract.
parameters
Parameters
- owner:
:address
- operator:
:address
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:bool
@spec name(Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes name()
on the contract.
parameters
Parameters
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:string
@spec owner_of(non_neg_integer(), Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes ownerOf(uint256 tokenId)
on the contract.
parameters
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:address
@spec safe_transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes safeTransferFrom(address from, address to, uint256 tokenId)
on the contract.
parameters
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
@spec safe_transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), binary(), Keyword.t() ) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes safeTransferFrom(address from, address to, uint256 tokenId, bytes data)
on the contract.
parameters
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- data:
:bytes
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
@spec set_approval_for_all(Ethers.Types.t_address(), boolean(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes setApprovalForAll(address operator, bool _approved)
on the contract.
parameters
Parameters
- operator:
:address
- _approved:
:bool
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
@spec supports_interface(<<_::32>>, Keyword.t()) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes supportsInterface(bytes4 interfaceId)
on the contract.
parameters
Parameters
- interfaceId:
{:bytes, 4}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:bool
@spec symbol(Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes symbol()
on the contract.
parameters
Parameters
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:string
@spec token_uri(non_neg_integer(), Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes tokenURI(uint256 tokenId)
on the contract.
parameters
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
:string
@spec total_supply(Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes totalSupply()
on the contract.
parameters
Parameters
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::call
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
{:uint, 256}
@spec transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes transferFrom(address from, address to, uint256 tokenId)
on the contract.
parameters
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call.
:to
: The address of the recipient contract. (Required):action
: Type of action for this function (:call
,:send
or:prepare
) Default::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.