Interface that represent an ABI Resolver

interface ABIResolver {
    ABI(node: string, contentType: bigint): Promise<[contentType: bigint, data: string]>;
    setABI(node: string, contentType: bigint, data: string): Promise<Transaction>;
    supportsInterface(interfaceId: string): Promise<boolean>;
}

Hierarchy

  • IERC165
    • ABIResolver

Implemented by

Methods

  • Returns the ABI associated with an MNS node. Defined in EIP205.

    Parameters

    • node: string

      The MNS node to query

    • contentType: bigint

      A bitwise OR of the ABI formats accepted by the caller.

    Returns Promise<[contentType: bigint, data: string]>

    [contentType,data] The content type of the return data value

  • Sets the ABI associated with an MNS node. Nodes may have one ABI of each content type. To remove an ABI, set it to the empty string.

    Parameters

    • node: string

      The node to update.

    • contentType: bigint

      The content type of the ABI

    • data: string

      The ABI data.

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Returns true if this contract implements the interface defined by interfaceId. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.

    This function call must use less than 30 000 gas. Defined in EIP181.

    Parameters

    • interfaceId: string

      The MNS node to query.

    Returns Promise<boolean>

    if the interface is supported