View Source Ethers.Contracts.ERC721 (Ethers v0.0.6)
ERC721 token interface
More info: https://ethereum.org/en/developers/docs/standards/tokens/erc-721/
Summary
Functions
Executes approve(address to, uint256 tokenId)
on the contract.
Same as approve/3
but raises Ethers.ExecutionError
on errors.
Executes balanceOf(address owner)
on the contract.
Same as balance_of/2
but raises Ethers.ExecutionError
on errors.
Prepares contract constructor values.
Default address of the contract. Returns nil
if not specified.
Executes getApproved(uint256 tokenId)
on the contract.
Same as get_approved/2
but raises Ethers.ExecutionError
on errors.
Executes isApprovedForAll(address owner, address operator)
on the contract.
Same as is_approved_for_all/3
but raises Ethers.ExecutionError
on errors.
Executes name()
on the contract.
Same as name/1
but raises Ethers.ExecutionError
on errors.
Executes ownerOf(uint256 tokenId)
on the contract.
Same as owner_of/2
but raises Ethers.ExecutionError
on errors.
Executes safeTransferFrom(address from, address to, uint256 tokenId)
on the contract.
Executes safeTransferFrom(address from, address to, uint256 tokenId, bytes data)
on the contract.
Same as safe_transfer_from/4
but raises Ethers.ExecutionError
on errors.
Same as safe_transfer_from/5
but raises Ethers.ExecutionError
on errors.
Executes setApprovalForAll(address operator, bool _approved)
on the contract.
Same as set_approval_for_all/3
but raises Ethers.ExecutionError
on errors.
Executes supportsInterface(bytes4 interfaceId)
on the contract.
Same as supports_interface/2
but raises Ethers.ExecutionError
on errors.
Executes symbol()
on the contract.
Same as symbol/1
but raises Ethers.ExecutionError
on errors.
Executes tokenURI(uint256 tokenId)
on the contract.
Same as token_uri/2
but raises Ethers.ExecutionError
on errors.
Executes totalSupply()
on the contract.
Same as total_supply/1
but raises Ethers.ExecutionError
on errors.
Executes transferFrom(address from, address to, uint256 tokenId)
on the contract.
Same as transfer_from/4
but raises Ethers.ExecutionError
on errors.
Functions
@spec approve(Ethers.Types.t_address(), non_neg_integer(), Keyword.t()) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes approve(address to, uint256 tokenId)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
@spec approve!(Ethers.Types.t_address(), non_neg_integer(), Keyword.t()) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as approve/3
but raises Ethers.ExecutionError
on errors.
@spec balance_of(Ethers.Types.t_address(), Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes balanceOf(address owner)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- owner:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
{:uint, 256}
@spec balance_of!(Ethers.Types.t_address(), Keyword.t()) :: [non_neg_integer()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as balance_of/2
but raises Ethers.ExecutionError
on errors.
@spec constructor() :: binary()
Prepares contract constructor values.
To deploy a contracts see Ethers.deploy/3
.
Parameters
@spec default_address() :: Ethers.Types.t_address() | nil
Default address of the contract. Returns nil
if not specified.
To specify a default address see Ethers.Contract
@spec get_approved(non_neg_integer(), Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes getApproved(uint256 tokenId)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:address
@spec get_approved!(non_neg_integer(), Keyword.t()) :: [Ethers.Types.t_address()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as get_approved/2
but raises Ethers.ExecutionError
on errors.
@spec is_approved_for_all( Ethers.Types.t_address(), Ethers.Types.t_address(), Keyword.t() ) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes isApprovedForAll(address owner, address operator)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- owner:
:address
- operator:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:bool
@spec is_approved_for_all!( Ethers.Types.t_address(), Ethers.Types.t_address(), Keyword.t() ) :: [boolean()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as is_approved_for_all/3
but raises Ethers.ExecutionError
on errors.
@spec name(Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes name()
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:string
@spec name!(Keyword.t()) :: [String.t()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as name/1
but raises Ethers.ExecutionError
on errors.
@spec owner_of(non_neg_integer(), Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes ownerOf(uint256 tokenId)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:address
@spec owner_of!(non_neg_integer(), Keyword.t()) :: [Ethers.Types.t_address()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as owner_of/2
but raises Ethers.ExecutionError
on errors.
@spec safe_transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes safeTransferFrom(address from, address to, uint256 tokenId)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
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_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes safeTransferFrom(address from, address to, uint256 tokenId, bytes data)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- data:
:bytes
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
@spec safe_transfer_from!( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as safe_transfer_from/4
but raises Ethers.ExecutionError
on errors.
@spec safe_transfer_from!( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), binary(), Keyword.t() ) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as safe_transfer_from/5
but raises Ethers.ExecutionError
on errors.
@spec set_approval_for_all(Ethers.Types.t_address(), boolean(), Keyword.t()) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes setApprovalForAll(address operator, bool _approved)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- operator:
:address
- _approved:
:bool
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
@spec set_approval_for_all!(Ethers.Types.t_address(), boolean(), Keyword.t()) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as set_approval_for_all/3
but raises Ethers.ExecutionError
on errors.
@spec supports_interface(<<_::32>> | <<_::80>>, Keyword.t()) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes supportsInterface(bytes4 interfaceId)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- interfaceId:
{:bytes, 4}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:bool
@spec supports_interface!(<<_::32>> | <<_::80>>, Keyword.t()) :: [boolean()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as supports_interface/2
but raises Ethers.ExecutionError
on errors.
@spec symbol(Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes symbol()
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:string
@spec symbol!(Keyword.t()) :: [String.t()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as symbol/1
but raises Ethers.ExecutionError
on errors.
@spec token_uri(non_neg_integer(), Keyword.t()) :: {:ok, [String.t()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes tokenURI(uint256 tokenId)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
:string
@spec token_uri!(non_neg_integer(), Keyword.t()) :: [String.t()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as token_uri/2
but raises Ethers.ExecutionError
on errors.
@spec total_supply(Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes totalSupply()
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
{:uint, 256}
@spec total_supply!(Keyword.t()) :: [non_neg_integer()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as total_supply/1
but raises Ethers.ExecutionError
on errors.
@spec transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes transferFrom(address from, address to, uint256 tokenId)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
Parameters
- from:
:address
- to:
:address
- tokenId:
{:uint, 256}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
Return Types
@spec transfer_from!( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as transfer_from/4
but raises Ethers.ExecutionError
on errors.