Hierarchy (view full)

Constructors

Properties

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

Methods

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Cancels an MRC721 sale

    Parameters

    • assetAddress: string

      the EVM adddress of the MRC721 contract

    • tokenId: bigint

      the uint256 id of the token

    • gasLimit: undefined | number = 300000

      optionally the maximum units of gas which can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Create a new MRC721 sale

    Parameters

    • assetAddress: string

      the EVM adddress of the MRC721 contract

    • tokenId: bigint

      the uint256 id of the token

    • price: bigint

      the price in satoshi MRX

    • beneficiaryAddress: string

      the EVM adddress which the proceeds will go to

    • gasLimit: undefined | number = 300000

      optionally the maximum units of gas which can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get a sale object from the contract state

    Parameters

    • assetAddress: string

      the EVM adddress of the MRC721 contract

    • tokenId: bigint

      the uint256 id of the token

    Returns Promise<[tokenId: bigint, price: bigint, beneficiaryAddress: string]>

    the Auction object

  • Purchase an MRC721 token which is for sale.

    Parameters

    • assetAddress: string

      the EVM adddress of the MRC721 contract

    • tokenId: bigint

      the uint256 id of the token

    • price: undefined | string = '0'

      the amount in MRX as a string

    • gasLimit: undefined | number = 300000

      optionally the maximum units of gas which can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • 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