A registrar that controls '.mrx' names

Hierarchy

  • default
    • MrxRegistrar

Implements

  • IERC721Enumerable

Constructors

Properties

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

Methods

  • Gives permission to to to transfer tokenId token to another account. The approval is cleared when the token is transferred.

    Only a single account can be approved at a time, so approving the zero address clears previous approvals.

    Requirements:

    • The caller must own the token or be an approved operator.
    • tokenId must exist.

    Emits an Approval event.

    Parameters

    • to: string
    • tokenId: bigint

    Returns Promise<Transaction>

  • Get this contract balance

    Returns Promise<bigint>

    the satoshi balance of this contract

  • Returns the number of tokens in owner's account.

    Parameters

    • owner: string

    Returns Promise<bigint>

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Returns the account approved for tokenId token.

    Requirements:

    • tokenId must exist.

    Parameters

    • tokenId: bigint

    Returns Promise<string>

  • Get receipts from a transaction

    Returns Promise<EventLogs>

    an EventLogs object

  • Returns if the operator is allowed to manage all of the assets of owner.

    See setApprovalForAll

    Parameters

    • owner: string
    • operator: string

    Returns Promise<boolean>

  • Returns the owner of the tokenId token.

    Requirements:

    • tokenId must exist.

    Parameters

    • tokenId: bigint

    Returns Promise<string>

  • Reclaim ownership of a name in MNS, if you own it in the registrar.

    Parameters

    • id: string
    • owner: string

    Returns Promise<Transaction>

  • Safely transfers tokenId token from from to to, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must exist and be owned by from.
    • If the caller is not from, it must be have been allowed to move this token by either approve or setApprovalForAll.
    • If to refers to a smart contract, it must implement IERC721Receiver-onERC721Received, which is called upon a safe transfer.

    Emits a Transfer event.

    Parameters

    • from: string
    • to: string
    • tokenId: bigint

    Returns Promise<Transaction>

  • Safely transfers tokenId token from from to to.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must exist and be owned by from.
    • If the caller is not from, it must be approved to move this token by either approve or setApprovalForAll.
    • If to refers to a smart contract, it must implement IERC721Receiver-onERC721Received, which is called upon a safe transfer.

    Emits a Transfer event.

    Parameters

    • from: string
    • to: string
    • tokenId: bigint
    • data: string

    Returns Promise<Transaction>

  • 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

  • Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.

    Requirements:

    • The operator cannot be the caller.

    Emits an ApprovalForAll event.

    Parameters

    • operator: string
    • approved: boolean

    Returns Promise<Transaction>

  • 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

  • Returns a token ID at a given index of all the tokens stored by the contract. Use along with totalSupply to enumerate all tokens.

    Parameters

    • index: bigint

    Returns Promise<string>

  • Returns a token ID owned by owner at a given index of its token list. Use along with balanceOf to enumerate all of owner's tokens.

    Parameters

    • owner: string
    • index: bigint

    Returns Promise<string>

  • Returns the Uniform Resource Identifier (URI) for tokenId token.

    Parameters

    • tokenId: bigint

    Returns Promise<string>

  • Returns the total amount of tokens stored by the contract.

    Returns Promise<bigint>

  • Transfers tokenId token from from to to.

    WARNING: Usage of this method is discouraged, use safeTransferFrom whenever possible.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must be owned by from.
    • If the caller is not from, it must be approved to move this token by either approve or setApprovalForAll.

    Emits a Transfer event.

    Parameters

    • from: string
    • to: string
    • tokenId: bigint

    Returns Promise<Transaction>