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

Ethereum Name Service (ENS) Contract

Summary

Functions

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

Prepares contract constructor values for deployment.

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

Prepares old() call parameters on the contract.

Prepares owner(bytes32 node) call parameters on the contract.

Prepares recordExists(bytes32 node) call parameters on the contract.

Prepares resolver(bytes32 node) call parameters on the contract.

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

Prepares setOwner(bytes32 node, address owner) call parameters on the contract.

Prepares setRecord(bytes32 node, address owner, address resolver, uint64 ttl) call parameters on the contract.

Prepares setResolver(bytes32 node, address resolver) call parameters on the contract.

Prepares setSubnodeOwner(bytes32 node, bytes32 label, address owner) call parameters on the contract.

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

Prepares setTTL(bytes32 node, uint64 ttl) call parameters on the contract.

Prepares ttl(bytes32 node) call parameters on the contract.

Functions

@spec __default_address__() :: Ethers.Types.t_address()

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

To specify a default address see Ethers.Contract

@spec constructor(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

  • _old: :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 old() :: Ethers.TxData.t()

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

  • :address
@spec owner(<<_::256>>) :: Ethers.TxData.t()

Prepares owner(bytes32 node) 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

  • node: {:bytes, 32}

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

  • :address
@spec record_exists(<<_::256>>) :: Ethers.TxData.t()

Prepares recordExists(bytes32 node) 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

  • node: {:bytes, 32}

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

  • :bool
@spec resolver(<<_::256>>) :: Ethers.TxData.t()

Prepares resolver(bytes32 node) 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

  • node: {:bytes, 32}

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

  • :address
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!

@spec set_owner(<<_::256>>, Ethers.Types.t_address()) :: Ethers.TxData.t()

Prepares setOwner(bytes32 node, address owner) 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

  • node: {:bytes, 32}
  • owner: :address

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

This function does not return any values!

Link to this function

set_record(node, owner, resolver, ttl)

View Source
@spec set_record(
  <<_::256>>,
  Ethers.Types.t_address(),
  Ethers.Types.t_address(),
  non_neg_integer()
) ::
  Ethers.TxData.t()

Prepares setRecord(bytes32 node, address owner, address resolver, uint64 ttl) 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

  • node: {:bytes, 32}
  • owner: :address
  • resolver: :address
  • ttl: {:uint, 64}

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

This function does not return any values!

Link to this function

set_resolver(node, resolver)

View Source
@spec set_resolver(<<_::256>>, Ethers.Types.t_address()) :: Ethers.TxData.t()

Prepares setResolver(bytes32 node, address resolver) 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

  • node: {:bytes, 32}
  • resolver: :address

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

This function does not return any values!

Link to this function

set_subnode_owner(node, label, owner)

View Source
@spec set_subnode_owner(<<_::256>>, <<_::256>>, Ethers.Types.t_address()) ::
  Ethers.TxData.t()

Prepares setSubnodeOwner(bytes32 node, bytes32 label, address owner) 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

  • node: {:bytes, 32}
  • label: {:bytes, 32}
  • owner: :address

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

  • {:bytes, 32}
Link to this function

set_subnode_record(node, label, owner, resolver, ttl)

View Source
@spec set_subnode_record(
  <<_::256>>,
  <<_::256>>,
  Ethers.Types.t_address(),
  Ethers.Types.t_address(),
  non_neg_integer()
) :: Ethers.TxData.t()

Prepares setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl) 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

  • node: {:bytes, 32}
  • label: {:bytes, 32}
  • owner: :address
  • resolver: :address
  • ttl: {:uint, 64}

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

This function does not return any values!

@spec set_ttl(<<_::256>>, non_neg_integer()) :: Ethers.TxData.t()

Prepares setTTL(bytes32 node, uint64 ttl) 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

  • node: {:bytes, 32}
  • ttl: {:uint, 64}

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

This function does not return any values!

@spec ttl(<<_::256>>) :: Ethers.TxData.t()

Prepares ttl(bytes32 node) 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

  • node: {:bytes, 32}

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

  • {:uint, 64}