Hierarchy

  • default
    • WrappedMetrix

Implements

  • IERC20Metadata

Constructors

Properties

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

Methods

  • Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom. This is zero by default. This value changes when approve or transferFrom are called.

    Parameters

    • owner: string
    • spender: string

    Returns Promise<bigint>

  • Sets amount as the allowance of spender over the caller's tokens.

    Emits an Approval event.

    Parameters

    • spender: string
    • amount: bigint
    • gasLimit: undefined | number = 48690

    Returns Promise<Transaction>

  • Get this contract balance

    Returns Promise<bigint>

    the satoshi balance of this contract

  • Returns the amount of tokens owned by account.

    Parameters

    • owner: string

    Returns Promise<bigint>

  • Destroys amount tokens from the caller.

    Parameters

    • amount: bigint

      the uint256 id of the token

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Destroys amount tokens from account, deducting from the caller's allowance.

    Parameters

    • account: string
    • amount: bigint
    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Returns the decimals places of the token.

    Returns Promise<number>

  • Deposits MRX to wrap into wMRX

    Parameters

    • amount: undefined | string = '0'
    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get receipts from a transaction

    Returns Promise<EventLogs>

    an EventLogs object

  • Returns the name of the token.

    Returns Promise<string>

  • 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

  • Returns the symbol of the token.

    Returns Promise<string>

  • Returns the amount of tokens in existence.

    Returns Promise<bigint>

  • Moves amount tokens from the caller's account to recipient.

    Emits a Transfer event.

    Parameters

    • recipient: string
    • amount: bigint
    • gasLimit: undefined | number = 250000

    Returns Promise<Transaction>

  • Moves amount tokens from sender to recipient using the allowance mechanism. amount is then deducted from the caller's allowance.

    Emits a Transfer event.

    Parameters

    • sender: string
    • recipient: string
    • amount: bigint
    • gasLimit: undefined | number = 250000

    Returns Promise<Transaction>

  • Destroys amount tokens from the caller witdrawing the amount from the contract's MRX balance.

    Parameters

    • amount: bigint
    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects