View Source Ethers.Contracts.ERC777 (Ethers v0.4.5)

ERC777 token interface

More info: https://ethereum.org/en/developers/docs/standards/tokens/erc-777/

Summary

Functions

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

Prepares allowance(address holder, address spender) call parameters on the contract.

Prepares approve(address spender, uint256 value) call parameters on the contract.

Prepares authorizeOperator(address operator) call parameters on the contract.

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

Prepares burn(uint256 amount, bytes data) call parameters on the contract.

Prepares contract constructor values for deployment.

Prepares decimals() call parameters on the contract.

Prepares defaultOperators() call parameters on the contract.

Prepares granularity() call parameters on the contract.

Prepares isOperatorFor(address operator, address tokenHolder) call parameters on the contract.

Prepares name() call parameters on the contract.

Prepares operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) call parameters on the contract.

Prepares operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) call parameters on the contract.

Prepares revokeOperator(address operator) call parameters on the contract.

Prepares send(address recipient, uint256 amount, bytes data) call parameters on the contract.

Prepares symbol() call parameters on the contract.

Prepares totalSupply() call parameters on the contract.

Prepares transfer(address recipient, uint256 amount) call parameters on the contract.

Prepares transferFrom(address holder, address recipient, uint256 amount) 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

Link to this function

allowance(holder, spender)

View Source

Prepares allowance(address holder, address spender) 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

  • holder: :address
  • spender: :address

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

  • {:uint, 256}

Prepares approve(address spender, uint256 value) 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

  • spender: :address
  • value: {:uint, 256}

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

  • :bool
Link to this function

authorize_operator(operator)

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

Prepares authorizeOperator(address operator) 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

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

This function does not return any values!

Link to this function

balance_of(token_holder)

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

Prepares balanceOf(address tokenHolder) 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

  • tokenHolder: :address

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

  • {:uint, 256}
@spec burn(non_neg_integer(), binary()) :: Ethers.TxData.t()

Prepares burn(uint256 amount, 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

  • amount: {:uint, 256}
  • data: :bytes

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

This function does not return any values!

Link to this function

constructor(name_, symbol_, default_operators_)

View Source
@spec constructor(String.t(), String.t(), [Ethers.Types.t_address()]) :: 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

  • name_: :string
  • symbol_: :string
  • defaultOperators_: {:array, :address}
@spec decimals() :: Ethers.TxData.t()

Prepares decimals() 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: pure

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

  • {:uint, 8}
@spec default_operators() :: Ethers.TxData.t()

Prepares defaultOperators() 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)

  • {:array, :address}
@spec granularity() :: Ethers.TxData.t()

Prepares granularity() 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)

  • {:uint, 256}
Link to this function

is_operator_for(operator, token_holder)

View Source

Prepares isOperatorFor(address operator, address tokenHolder) 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

  • operator: :address
  • tokenHolder: :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
Link to this function

operator_burn(account, amount, data, operator_data)

View Source
@spec operator_burn(Ethers.Types.t_address(), non_neg_integer(), binary(), binary()) ::
  Ethers.TxData.t()

Prepares operatorBurn(address account, uint256 amount, bytes data, bytes operatorData) 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

  • account: :address
  • amount: {:uint, 256}
  • data: :bytes
  • operatorData: :bytes

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

This function does not return any values!

Link to this function

operator_send(sender, recipient, amount, data, operator_data)

View Source

Prepares operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData) 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

  • sender: :address
  • recipient: :address
  • amount: {:uint, 256}
  • data: :bytes
  • operatorData: :bytes

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

This function does not return any values!

Link to this function

revoke_operator(operator)

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

Prepares revokeOperator(address operator) 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

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

This function does not return any values!

Link to this function

send(recipient, amount, data)

View Source

Prepares send(address recipient, uint256 amount, 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

  • recipient: :address
  • amount: {:uint, 256}
  • data: :bytes

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

This function does not return any values!

@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 total_supply() :: Ethers.TxData.t()

Prepares totalSupply() 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)

  • {:uint, 256}
Link to this function

transfer(recipient, amount)

View Source

Prepares transfer(address recipient, uint256 amount) 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

  • recipient: :address
  • amount: {:uint, 256}

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

  • :bool
Link to this function

transfer_from(holder, recipient, amount)

View Source

Prepares transferFrom(address holder, address recipient, uint256 amount) 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

  • holder: :address
  • recipient: :address
  • amount: {:uint, 256}

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

  • :bool