A registrar that allocates subdomains to the first person to claim them, but expires registrations a fixed period after they're initially claimed.

Hierarchy

  • default
    • TestRegistrar

Constructors

Properties

abi: any[]
address: string
bytecode: undefined | string
provider: Provider

Methods

  • Get this contract balance

    Returns Promise<bigint>

    the satoshi balance of this contract

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Get the expiry time of a label

    Parameters

    • label: string

      The hash of the label to register.

    Returns Promise<bigint>

    the expiry of the label

  • Get receipts from a transaction

    Returns Promise<EventLogs>

    an EventLogs object

  • Register a name that's not currently registered

    Parameters

    • label: string

      The hash of the label to register.

    • owner: string

      The address of the new owner.

    Returns Promise<Transaction>

    aTransaction object

  • Perform sendtocontract

    Parameters

    • method: string

      The contract method to send to

    • args: any[]

      The arguments to use

    • Optionalvalue: string

      The amount to send to the contract

    • OptionalgasLimit: number

      The amount of gas units allowed

    • OptionalgasPrice: number

      The satoshi price per gas

    Returns Promise<{
        hash160: string;
        sender: string;
        txid: string;
    }>

    see Result