View Source Ethers.Contracts.ERC721 (Ethers v0.5.4)

ERC721 token interface

More info: https://eips.ethereum.org/EIPS/eip-721

Summary

Functions

Default address of the contract. Returns nil if not specified.

Prepares approve(address to, uint256 tokenId) call parameters on the contract.

Prepares balanceOf(address owner) call parameters on the contract.

Prepares contract constructor values for deployment.

Prepares getApproved(uint256 tokenId) call parameters on the contract.

Prepares isApprovedForAll(address owner, address operator) call parameters on the contract.

Prepares name() call parameters on the contract.

Prepares ownerOf(uint256 tokenId) call parameters on the contract.

Prepares safeTransferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

Prepares safeTransferFrom(address from, address to, uint256 tokenId, bytes data) call parameters on the contract.

Prepares setApprovalForAll(address operator, bool approved) call parameters on the contract.

Prepares supportsInterface(bytes4 interfaceId) call parameters on the contract.

Prepares symbol() call parameters on the contract.

Prepares tokenURI(uint256 tokenId) call parameters on the contract.

Prepares transferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

Functions

@spec __default_address__() :: nil

Default address of the contract. Returns nil if not specified.

To specify a default address see Ethers.Contract

Prepares approve(address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

@spec balance_of(Ethers.Types.t_address()) :: Ethers.TxData.t()

Prepares balanceOf(address owner) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • owner: :address

Return Types (when called with Ethers.call/2)

  • {:uint, 256}
@spec constructor() :: binary()

Prepares contract constructor values for deployment.

To deploy a contracts use Ethers.deploy/2 and pass the result of this function as :encoded_constructor option.

Parameters

@spec get_approved(non_neg_integer()) :: Ethers.TxData.t()

Prepares getApproved(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :address
Link to this function

is_approved_for_all(owner, operator)

View Source
@spec is_approved_for_all(Ethers.Types.t_address(), Ethers.Types.t_address()) ::
  Ethers.TxData.t()

Prepares isApprovedForAll(address owner, address operator) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • owner: :address
  • operator: :address

Return Types (when called with Ethers.call/2)

  • :bool
@spec name() :: Ethers.TxData.t()

Prepares name() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :string
@spec owner_of(non_neg_integer()) :: Ethers.TxData.t()

Prepares ownerOf(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :address
Link to this function

safe_transfer_from(from, to, token_id)

View Source

Prepares safeTransferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

safe_transfer_from(from, to, token_id, data)

View Source

Prepares safeTransferFrom(address from, address to, uint256 tokenId, bytes data) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}
  • data: :bytes

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

set_approval_for_all(operator, approved)

View Source
@spec set_approval_for_all(Ethers.Types.t_address(), boolean()) :: Ethers.TxData.t()

Prepares setApprovalForAll(address operator, bool approved) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • operator: :address
  • approved: :bool

Return Types (when called with Ethers.call/2)

This function does not return any values!

Link to this function

supports_interface(interface_id)

View Source
@spec supports_interface(<<_::32>>) :: Ethers.TxData.t()

Prepares supportsInterface(bytes4 interfaceId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • interfaceId: {:bytes, 4}

Return Types (when called with Ethers.call/2)

  • :bool
@spec symbol() :: Ethers.TxData.t()

Prepares symbol() call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Return Types (when called with Ethers.call/2)

  • :string
@spec token_uri(non_neg_integer()) :: Ethers.TxData.t()

Prepares tokenURI(uint256 tokenId) call parameters on the contract.

This function should only be called for result and never in a transaction on its own. (Use Ethers.call/2)

State mutability: view

Function Parameter Types

  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

  • :string
Link to this function

transfer_from(from, to, token_id)

View Source

Prepares transferFrom(address from, address to, uint256 tokenId) call parameters on the contract.

This function can be used for a transaction or additionally called for results (Use Ethers.send/2). No amount of Ether can be sent with this function.

State mutability: non_payable

Function Parameter Types

  • from: :address
  • to: :address
  • tokenId: {:uint, 256}

Return Types (when called with Ethers.call/2)

This function does not return any values!