Interface Standards
This page is a collection of methods that a resolver MAY implement
Usage | Interface ID |
---|---|
Read Ethereum Address | addr(bytes32 node) view returns (address) |
Read Multicoin Address | addr(bytes32 node, uint coinType) view returns (byte memory) |
Read Content Hash | contenthash(bytes32 node) view returns (bytes memory) |
Read Text Record | text(bytes32 node, string key) view returns (string memory) |
Read Contract ABI | ABI(bytes32 node, uint256 contentTypes) view returns (uint256, bytes memory) |
Read Public Key | pubkey(bytes32 node) view returns (bytes32 x, bytes32 y) |
Read Name (for reverse records) | name(bytes32 node) view returns (string memory) |
Write Ethereum Adress | setAddr(bytes32 node, address addr) |
Set Multicoin Address | setAddr(bytes32 node, uint coinType, bytes calldata a) |
Write Content Hash | setContenthash(bytes32 node, bytes calldata hash) |
Write Text Record | setText(bytes32 node, string calldata key, string calldata value) |
Write Contract ABI | setABI(bytes32 node, uint256 contentType, bytes calldata data) |
Write Public Key | setPubkey(bytes32 node, bytes32 x, bytes32 y) |
Write Name (for reverse records) | setName(bytes32 node, string calldata name) |
Batch Read/Write | multicall(bytes[] calldata data) view returns (bytes[] memory results) |
function supportsInterface(bytes4 interfaceID) external pure returns (bool)
addr(bytes32 node) view returns (address)
Interface ID is 0x3b3b57de
ENSIP-1 / EIP-137Ethereum address or the zero address if no address is set.
addr(bytes32 node, uint coinType) view returns (byte memory)
Interface ID is 0xf1cb7e06
ENSIP-9 / [EIP-2304](https://eips.ethereum.org/EIPS/eip-2304)Cryptocurrency address in its native binary format. For example, the Bitcoin address `1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa` base58check decodes to the 21 bytes `0062e907b15cbf27d5425399ebf6f0fb50ebb88f18` then scriptPubkey encodes to 25 bytes `76a91462e907b15cbf27d5425399ebf6f0fb50ebb88f1888ac` whereas the BNB address `bnb1grpf0955h0ykzq3ar5nmum7y6gdfl6lxfn46h2` Bech32 decodes to the binary representation `40c2979694bbc961023d1d27be6fc4d21a9febe6`. A zero-length string ("") will be returned if the specified coin type is not set.
contenthash(bytes32 node) view returns (bytes memory)
Interface ID is 0xbc1c58d1
ENSIP-7 / EIP-1577text(bytes32 node, string key) view returns (string memory)
Interface ID is 0x59d1d43c
ENSIP-5 / EIP-634The value of the text record associated with key, or the empty string if no such record exists.
ABI(bytes32 node, uint256 contentTypes) view returns (uint256, bytes memory)
Interface ID is 0x2203ab56
ENSIP-4 / EIP-205ABI returns a two-tuple of the content type ID and the ABI data. If no data of the appropriate content type ID was found, 0 is returned for the content type ID, and the ABI data will be the empty string.
pubkey(bytes32 node) view returns (bytes32 x, bytes32 y)
Interface ID is 0xc8690233
ENSIP- / EIP-619The ECDSA SECP256k1 public key for node, as a 2-tuple (x, y). If no public key is set, (0, 0) is returned.
name(bytes32 node) view returns (string memory)
Interface ID is 0x691f3431
Implemented by Public ResolversetAddr(bytes32 node, address addr)
Interface ID is 0x3b3b57de
Implemented by Public ResolversetAddr(bytes32 node, uint coinType, bytes calldata a)
Interface ID is 0x8b95dd71
Implemented by Public ResolversetContenthash(bytes32 node, bytes calldata hash)
Interface ID is 0x304e6ade
Implemented by Public ResolversetText(bytes32 node, string calldata key, string calldata value)
Interface ID is 0xa4d3fbb2
Implemented by Public ResolversetABI(bytes32 node, uint256 contentType, bytes calldata data)
Interface ID is 0x623195b0
Implemented by Public ResolversetPubkey(bytes32 node, bytes32 x, bytes32 y)
Interface ID is 0x29cd62ea
Implemented by Public ResolversetName(bytes32 node, string calldata name)
Interface ID is 0x77372213
Implemented by Public Resolver