Hierarchy

  • default
    • LiquidGovernorMRX

Implements

  • ERC20

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 = 48659

    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 satoshi amount 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

      the EVM style address of the account to burn from

    • amount: bigint

      the uint256 amount 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

  • 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>

  • Atomically decreases the allowance granted to spender by the caller.

    This is an alternative to approve that can be used as a mitigation for problems described in approve.

    Emits an Approval event indicating the updated allowance.

    Requirements:

    • spender cannot be the zero address.
    • spender must have allowance for the caller of at least amount.

    Parameters

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

    Returns Promise<Transaction>

  • Returns the fee applied when doing flash loans. This function calls the {_flashFee} function which returns the fee applied when doing flash loans.

    Parameters

    • token: string

      The token to be flash loaned.

    • amount: bigint

      The amount of tokens to be loaned.

    Returns Promise<bigint>

    The fees applied to the corresponding flash loan.

  • Performs a flash loan. New tokens are minted and sent to the receiver, who is required to implement the {IERC3156FlashBorrower} interface. By the end of the flash loan, the receiver is expected to own amount + fee tokens and have them approved back to the token contract itself so they can be burned.

    Parameters

    • receiver: string

      The receiver of the flash loan. Should implement the {IERC3156FlashBorrower-onFlashLoan} interface.

    • token: string

      The token to be flash loaned. Only address(this) is supported.

    • amount: bigint

      The amount of tokens to be loaned.

    • data: string

      An arbitrary datafield that is passed to the receiver.

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get receipts from a transaction

    Returns Promise<EventLogs>

    an EventLogs object

  • Atomically increases the allowance granted to spender by the caller.

    This is an alternative to approve that can be used as a mitigation for problems described in approve.

    Emits an Approval event indicating the updated allowance.

    Requirements:

    • spender cannot be the zero address.

    Parameters

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

    Returns Promise<Transaction>

  • Returns the maximum amount of tokens available for loan.

    Parameters

    • token: string

      The address of the token that is requested.

    Returns Promise<bigint>

    The amount of token that can be loaned.

  • Mints amount tokens to to

    Parameters

    • to: string

      the EVM style address of the account to mint to

    • amount: bigint

      the uint256 amount of the token

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get the contract owner

    Returns Promise<string>

    the EVM style address of the owner of this contract

  • Renounce ownership of this contract

    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

    • 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 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>

  • Transfer ownership of this contract

    Parameters

    • address: string

      the EVM adddress of the receiver

    Returns Promise<Transaction>

    an array of TransactionReceipt objects