View Source Ethers.Contract.ERC777 (Ethers v0.0.1-dev)
ERC777 token interface
More info: https://ethereum.org/en/developers/docs/standards/tokens/erc-777/
Link to this section Summary
Functions
Executes allowance(address holder, address spender)
on the contract.
Executes approve(address spender, uint256 value)
on the contract.
Executes authorizeOperator(address operator)
on the contract.
Executes balanceOf(address tokenHolder)
on the contract.
Executes burn(uint256 amount, bytes data)
on the contract.
Prepares contract constructor values. To deploy contracts use Ethers.deploy/3
.
Executes decimals()
on the contract.
Executes defaultOperators()
on the contract.
Executes granularity()
on the contract.
Executes isOperatorFor(address operator, address tokenHolder)
on the contract.
Executes name()
on the contract.
Executes operatorBurn(address account, uint256 amount, bytes data, bytes operatorData)
on the contract.
Executes operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData)
on the contract.
Executes revokeOperator(address operator)
on the contract.
Executes send(address recipient, uint256 amount, bytes data)
on the contract.
Executes symbol()
on the contract.
Executes totalSupply()
on the contract.
Executes transfer(address recipient, uint256 amount)
on the contract.
Executes transferFrom(address holder, address recipient, uint256 amount)
on the contract.
Link to this section Functions
@spec allowance(Ethers.Types.t_address(), Ethers.Types.t_address(), Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes allowance(address holder, address spender)
on the contract.
parameters
Parameters
- holder:
:address
- spender:
: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 approve(Ethers.Types.t_address(), non_neg_integer(), Keyword.t()) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes approve(address spender, uint256 value)
on the contract.
parameters
Parameters
- spender:
:address
- value:
{: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
:bool
@spec authorize_operator(Ethers.Types.t_address(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes authorizeOperator(address operator)
on the contract.
parameters
Parameters
- 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::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 tokenHolder)
on the contract.
parameters
Parameters
- tokenHolder:
: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 burn(non_neg_integer(), binary(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes burn(uint256 amount, bytes data)
on the contract.
parameters
Parameters
- amount:
{: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 constructor(String.t(), String.t(), [Ethers.Types.t_address()]) :: binary()
Prepares contract constructor values. To deploy contracts use Ethers.deploy/3
.
parameters
Parameters
- name_:
:string
- symbol_:
:string
- defaultOperators_:
{:array, :address}
@spec decimals(Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes decimals()
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, 8}
@spec default_operators(Keyword.t()) :: {:ok, [[Ethers.Types.t_address()]]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes defaultOperators()
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
{:array, :address}
@spec granularity(Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes granularity()
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 is_operator_for(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 isOperatorFor(address operator, address tokenHolder)
on the contract.
parameters
Parameters
- operator:
:address
- tokenHolder:
: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
operator_burn(account, amount, data, operator_data, overrides \\ [])
View Source@spec operator_burn( Ethers.Types.t_address(), non_neg_integer(), binary(), binary(), Keyword.t() ) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes operatorBurn(address account, uint256 amount, bytes data, bytes operatorData)
on the contract.
parameters
Parameters
- account:
:address
- amount:
{:uint, 256}
- data:
:bytes
- operatorData:
: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
operator_send(sender, recipient, amount, data, operator_data, overrides \\ [])
View Source@spec operator_send( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), binary(), binary(), Keyword.t() ) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes operatorSend(address sender, address recipient, uint256 amount, bytes data, bytes operatorData)
on the contract.
parameters
Parameters
- sender:
:address
- recipient:
:address
- amount:
{:uint, 256}
- data:
:bytes
- operatorData:
: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 revoke_operator(Ethers.Types.t_address(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes revokeOperator(address operator)
on the contract.
parameters
Parameters
- 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::send
.:rpc_opts
: Options to pass to the RCP client e.g.:url
.
return-types
Return Types
@spec send(Ethers.Types.t_address(), non_neg_integer(), binary(), Keyword.t()) :: {:ok, []} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes send(address recipient, uint256 amount, bytes data)
on the contract.
parameters
Parameters
- recipient:
:address
- amount:
{: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 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 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(Ethers.Types.t_address(), non_neg_integer(), Keyword.t()) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes transfer(address recipient, uint256 amount)
on the contract.
parameters
Parameters
- recipient:
:address
- amount:
{: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
:bool
@spec transfer_from( Ethers.Types.t_address(), Ethers.Types.t_address(), non_neg_integer(), Keyword.t() ) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_transaction_hash()} | {:ok, Ethers.Contract.t_function_output()}
Executes transferFrom(address holder, address recipient, uint256 amount)
on the contract.
parameters
Parameters
- holder:
:address
- recipient:
:address
- amount:
{: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
:bool