Hierarchy (view full)

Constructors

Properties

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

Methods

  • Approve a token for trade on the inbuilt auctions

    Parameters

    • assetAddress: string

      the token address

    • approved: boolean

      whether to approve

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Check if a token is an approved token

    Parameters

    • tokenAddress: string

      the EVM address to check

    Returns Promise<boolean>

    is token approve

  • Get the current auction controller

    Returns Promise<string>

    the MRC721AuctionController address

  • Get the current auction fee this number is divided by 10000 to get the percent.

    Returns Promise<bigint>

    the current auction fee pecent

  • Get the BurnableMRC721 factory address

    Returns Promise<string>

    the address of the MRC721Factory

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Checks if a given address is a controller

    Parameters

    • operator: string

    Returns Promise<boolean>

    if the operator is a controller

  • Create an MRC721 token

    Parameters

    • name: string

      the name of the token

    • symbol: string

      the symbol of the token

    • baseURI: string

      the baseURI of the token

    • burnable: boolean

      if the token is burnable

    • royalty: bigint

      the royalty of the token

    • beneficiary: string

      the inital royalty beneficiary

    • signature: string

      the signed message see permissionSlip

    • gasLimit: undefined | number = 2500000

      this 2500000 and 3500000

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get the royalty for an auction or sale at a given price

    Parameters

    • price: bigint

      the price that the token sold at

    Returns Promise<bigint>

    the royalty that should be charged

  • Checks if a given address is a controller

    Parameters

    • operator: string

    Returns Promise<boolean>

    if the operator is a controller

  • Check if a token is an internal token

    Parameters

    • tokenAddress: string

      the EVM address to check

    Returns Promise<boolean>

    is token internal

  • Get the address of an internal token by it's index

    Parameters

    • index: bigint

      the uint256 index of the token

    Returns Promise<string>

    the address of the token or address 0 if it is not set

  • Check if a token is an approved token

    Parameters

    • tokenAddress: string

      the EVM address to check

    Returns Promise<boolean>

    is token approve

  • Check if a token is an internal token

    Parameters

    • tokenAddress: string

      the EVM address to check

    Returns Promise<boolean>

    is token internal

  • Get the nonce of the given address

    Parameters

    • sender: string

      the address to get the nonce of

    Returns Promise<bigint>

    the nonce of the address

  • Hash parameters which can be signed by a MetriverseController to allow an account to create an MRC721 from one of the factories

    Parameters

    • info: string

      a keccak256 hash of the token info see tokenInfo

    • royalty: bigint

      a uint96 royalty rate

    • burnable: boolean

      if the token will be burnable

    • nonce: bigint

      the nonce of the token creator

    • beneficiary: string

      the beneficiary of the token royalties

    Returns Promise<string>

    a keccak256 hash of the parameters

  • Perform sendtocontract

    Parameters

    • method: string

      The contract method to send to

    • args: any[]

      The arguments to use

    • value: undefined | string = '0'

      The amount to send to the contract

    • gasLimit: undefined | number = 250000

      The amount of gas units allowed

    • gasPrice: undefined | number = 5000

      The satoshi price per gas

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

    see Result

  • Allow or disallow a controller of this contract, controllers are able to call the sign for the createMRC721 function.

    Parameters

    • operator: string
    • controller: boolean

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Parameters

    • name: string

      the name of the token

    • symbol: string

      the symbol of the token

    • baseURI: string

      the base uri of the token

    Returns Promise<string>

    a keccak256 hash of the data