Hierarchy

  • default
    • LiquidGovernance

Constructors

Properties

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

Methods

  • Add new proposal or vote on existing proposal

    Parameters

    • governorAddress: string

      the EVM style address of the AutoGovernor

    • proposalType: ProposalType

      the ProposalType for the contract

    • proposalAddress: string

      the EVM style address of the proposed DGP proxy contract

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get this contract balance

    Returns Promise<bigint>

    the satoshi balance of this contract

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Create a new governor by providing DGP collateral

    Parameters

    • collateral: undefined | string = '0'
    • gasLimit: undefined | number = 1340393

      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

  • Get the gMRX contract address

    Returns Promise<string>

    the EVM style address of the gMRX contract

  • Get the Metrix DGP Governance contract address

    Returns Promise<string>

    the EVM style address of the Metrix DGP Governance contract

  • Get the MNSRegistry contract address

    Returns Promise<string>

    the EVM style address of the MNSRegistry contract

  • Get the wMRX contract address

    Returns Promise<string>

    the EVM style address of the wMRX contract

  • Ping the DGP as the AutoGovernor

    Parameters

    • governorAddress: string

      the EVM style address of the AutoGovernor

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Get the MetrixLGP:Pool contract address

    Returns Promise<string>

    the EVM style address of the MetrixLGP:Pool contract

  • 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

  • Start a new Budget proposal

    Parameters

    • governorAddress: string

      the EVM style address of the AutoGovernor

    • title: string

      title of the proposal

    • description: string

      a short description of the proposal

    • url: string

      a url that can be visited for more information on the proposal

    • requested: bigint

      the amount of MRX requested as satoshi

    • duration: bigint

      the duration in months of the proposal

    • collateral: undefined | string = '0'

      the collateral to submit the proposal

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Unenroll from the DGP as the AutoGovernor burning g token from the sender

    Parameters

    • governorAddress: string

      the EVM style address of the AutoGovernor

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects

  • Vote on a Metrix DGP Budget proposal

    Parameters

    • governorAddress: string

      the EVM style address of the AutoGovernor

    • proposalId: bigint

      the id of the proposal

    • vote: Vote

      the Vote to be cast

    • gasLimit: undefined | number = 250000

      the optional limit for gas units that can be consumed

    Returns Promise<Transaction>

    an array of TransactionReceipt objects