View Source Ethers.Contracts.ENS (Ethers v0.0.6)

Ethereum Name Service (ENS) Contract

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.

Executes old() on the contract.

Same as old/1 but raises Ethers.ExecutionError on errors.

Executes owner(bytes32 node) on the contract.

Executes recordExists(bytes32 node) on the contract.

Executes resolver(bytes32 node) on the contract.

Executes setApprovalForAll(address operator, bool approved) on the contract.

Executes setOwner(bytes32 node, address owner) on the contract.

Executes setRecord(bytes32 node, address owner, address resolver, uint64 ttl) on the contract.

Executes setResolver(bytes32 node, address resolver) on the contract.

Executes setSubnodeOwner(bytes32 node, bytes32 label, address owner) on the contract.

Executes setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl) on the contract.

Executes setTTL(bytes32 node, uint64 ttl) on the contract.

Executes ttl(bytes32 node) on the contract.

Functions

@spec constructor(Ethers.Types.t_address()) :: binary()

Prepares contract constructor values.

To deploy a contracts see Ethers.deploy/3.

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

Link to this function

is_approved_for_all(owner, operator, overrides \\ [])

View Source
@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
Link to this function

is_approved_for_all!(owner, operator, overrides \\ [])

View Source

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

  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • :address

Same as old/1 but raises Ethers.ExecutionError on errors.

Link to this function

owner(node, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • :address
Link to this function

owner!(node, overrides \\ [])

View Source
@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.

Link to this function

record_exists(node, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • :bool
Link to this function

record_exists!(node, overrides \\ [])

View Source
@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.

Link to this function

resolver(node, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • :address
Link to this function

resolver!(node, overrides \\ [])

View Source
@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.

Link to this function

set_approval_for_all(operator, approved, overrides \\ [])

View Source
@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

Link to this function

set_approval_for_all!(operator, approved, overrides \\ [])

View Source

Same as set_approval_for_all/3 but raises Ethers.ExecutionError on errors.

Link to this function

set_owner(node, owner, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • owner: :address
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

Link to this function

set_owner!(node, owner, overrides \\ [])

View Source
@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.

Link to this function

set_record(node, owner, resolver, ttl, overrides \\ [])

View Source
@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

  • 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

Link to this function

set_record!(node, owner, resolver, ttl, overrides \\ [])

View Source

Same as set_record/5 but raises Ethers.ExecutionError on errors.

Link to this function

set_resolver(node, resolver, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • resolver: :address
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

Link to this function

set_resolver!(node, resolver, overrides \\ [])

View Source
@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.

Link to this function

set_subnode_owner(node, label, owner, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • label: {:bytes, 32}
  • owner: :address
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • {:bytes, 32}
Link to this function

set_subnode_owner!(node, label, owner, overrides \\ [])

View Source
@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.

Link to this function

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

  • 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

Link to this function

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.

Link to this function

set_ttl(node, ttl, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • ttl: {:uint, 64}
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

Link to this function

set_ttl!(node, ttl, overrides \\ [])

View Source
@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.

Link to this function

ttl(node, overrides \\ [])

View Source
@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

  • node: {:bytes, 32}
  • overrides: Overrides and options for the call. See Execution Options in Ethers.Contract.

Return Types

  • {:uint, 64}
Link to this function

ttl!(node, overrides \\ [])

View Source
@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.