View Source Ethers.Contracts.ENS (Ethers v0.0.3)
Ethereum Name Service (ENS) Contract
Link to this section Summary
Functions
Prepares contract constructor values.
Default address of the contract. Returns nil
if not specified.
Executes isApprovedForAll(address owner, address operator)
on the contract.
Same as is_approved_for_all/3
but raises Ethers.ExecutionError
on errors.
Executes old()
on the contract.
Same as old/1
but raises Ethers.ExecutionError
on errors.
Executes owner(bytes32 node)
on the contract.
Same as owner/2
but raises Ethers.ExecutionError
on errors.
Executes recordExists(bytes32 node)
on the contract.
Same as record_exists/2
but raises Ethers.ExecutionError
on errors.
Executes resolver(bytes32 node)
on the contract.
Same as resolver/2
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 setOwner(bytes32 node, address owner)
on the contract.
Same as set_owner/3
but raises Ethers.ExecutionError
on errors.
Executes setRecord(bytes32 node, address owner, address resolver, uint64 ttl)
on the contract.
Same as set_record/5
but raises Ethers.ExecutionError
on errors.
Executes setResolver(bytes32 node, address resolver)
on the contract.
Same as set_resolver/3
but raises Ethers.ExecutionError
on errors.
Executes setSubnodeOwner(bytes32 node, bytes32 label, address owner)
on the contract.
Same as set_subnode_owner/4
but raises Ethers.ExecutionError
on errors.
Executes setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl)
on the contract.
Same as set_subnode_record/6
but raises Ethers.ExecutionError
on errors.
Executes setTTL(bytes32 node, uint64 ttl)
on the contract.
Same as set_ttl/3
but raises Ethers.ExecutionError
on errors.
Executes ttl(bytes32 node)
on the contract.
Same as ttl/2
but raises Ethers.ExecutionError
on errors.
Link to this section Functions
@spec constructor(Ethers.Types.t_address()) :: binary()
Prepares contract constructor values.
To deploy a contracts see Ethers.deploy/3
.
parameters
Parameters
- _old:
:address
@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 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
Parameters
- owner:
:address
- operator:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
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 old(Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes old()
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
:address
@spec old!(Keyword.t()) :: [Ethers.Types.t_address()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as old/1
but raises Ethers.ExecutionError
on errors.
@spec owner(<<_::256>> | <<_::528>>, Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes owner(bytes32 node)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
:address
@spec owner!(<<_::256>> | <<_::528>>, Keyword.t()) :: [Ethers.Types.t_address()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as owner/2
but raises Ethers.ExecutionError
on errors.
@spec record_exists(<<_::256>> | <<_::528>>, Keyword.t()) :: {:ok, [boolean()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes recordExists(bytes32 node)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
:bool
@spec record_exists!(<<_::256>> | <<_::528>>, Keyword.t()) :: [boolean()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as record_exists/2
but raises Ethers.ExecutionError
on errors.
@spec resolver(<<_::256>> | <<_::528>>, Keyword.t()) :: {:ok, [Ethers.Types.t_address()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes resolver(bytes32 node)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
:address
@spec resolver!(<<_::256>> | <<_::528>>, Keyword.t()) :: [Ethers.Types.t_address()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as resolver/2
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
Parameters
- operator:
:address
- approved:
:bool
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
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 set_owner(<<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t()) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes setOwner(bytes32 node, address owner)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- owner:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
@spec set_owner!(<<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t()) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as set_owner/3
but raises Ethers.ExecutionError
on errors.
@spec set_record( <<_::256>> | <<_::528>>, 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 setRecord(bytes32 node, address owner, address resolver, uint64 ttl)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- owner:
:address
- resolver:
:address
- ttl:
{:uint, 64}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
@spec set_record!( <<_::256>> | <<_::528>>, 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 set_record/5
but raises Ethers.ExecutionError
on errors.
@spec set_resolver(<<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t()) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes setResolver(bytes32 node, address resolver)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- resolver:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
@spec set_resolver!(<<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t()) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as set_resolver/3
but raises Ethers.ExecutionError
on errors.
@spec set_subnode_owner( <<_::256>> | <<_::528>>, <<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t() ) :: {:ok, [<<_::256>> | <<_::528>>]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes setSubnodeOwner(bytes32 node, bytes32 label, address owner)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- label:
{:bytes, 32}
- owner:
:address
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
{:bytes, 32}
@spec set_subnode_owner!( <<_::256>> | <<_::528>>, <<_::256>> | <<_::528>>, Ethers.Types.t_address(), Keyword.t() ) :: [<<_::256>> | <<_::528>>] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as set_subnode_owner/4
but raises Ethers.ExecutionError
on errors.
set_subnode_record(node, label, owner, resolver, ttl, overrides \\ [])
View Source@spec set_subnode_record( <<_::256>> | <<_::528>>, <<_::256>> | <<_::528>>, 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 setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- label:
{:bytes, 32}
- owner:
:address
- resolver:
:address
- ttl:
{:uint, 64}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
set_subnode_record!(node, label, owner, resolver, ttl, overrides \\ [])
View Source@spec set_subnode_record!( <<_::256>> | <<_::528>>, <<_::256>> | <<_::528>>, 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 set_subnode_record/6
but raises Ethers.ExecutionError
on errors.
@spec set_ttl(<<_::256>> | <<_::528>>, non_neg_integer(), Keyword.t()) :: {:ok, [[]]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes setTTL(bytes32 node, uint64 ttl)
on the contract.
Default action for this function is :send
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- ttl:
{:uint, 64}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
@spec set_ttl!(<<_::256>> | <<_::528>>, non_neg_integer(), Keyword.t()) :: [[]] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as set_ttl/3
but raises Ethers.ExecutionError
on errors.
@spec ttl(<<_::256>> | <<_::528>>, Keyword.t()) :: {:ok, [non_neg_integer()]} | {:ok, Ethers.Types.t_hash()} | {:ok, Ethers.Contract.t_function_output()} | {:error, term()}
Executes ttl(bytes32 node)
on the contract.
Default action for this function is :call
.
To override default action see Execution Options in Ethers.Contract
.
parameters
Parameters
- node:
{:bytes, 32}
- overrides: Overrides and options for the call. See Execution Options in
Ethers.Contract
.
return-types
Return Types
{:uint, 64}
@spec ttl!(<<_::256>> | <<_::528>>, Keyword.t()) :: [non_neg_integer()] | Ethers.Types.t_hash() | Ethers.Contract.t_function_output() | no_return()
Same as ttl/2
but raises Ethers.ExecutionError
on errors.