Hierarchy

  • default
    • DGP

Constructors

  • Parameters

    • address: string
    • provider: Provider

    Returns DGP

Properties

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

Methods

  • Add new proposal or vote on existing proposal

    Parameters

    • proposalType: ProposalType

      type of proposal ProposalType

    • proposalAddress: string

      the EVM style address of the proposed contract

    • gasLimit: undefined | number = 250000

    Returns Promise<Transaction>

  • Get this contract balance

    Returns Promise<bigint>

    the satoshi balance of this contract

  • Get the blockGasLimit contract address

    Returns Promise<string>

    the EVM style address of the blockGasLimit contract

  • Get the blockSizeAddress contract address

    Returns Promise<string>

    the EVM style address of the blockSizeAddress contract

  • Get the budgetFeeAddress contract address

    Returns Promise<string>

    the EVM style address of the budgetFeeAddress contract

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Get the default block gas limit

    Returns Promise<bigint>

    the block gas limit as units of gas

  • Get the default block size

    Returns Promise<bigint>

    the default block size

  • Get the default budget fee

    Returns Promise<bigint>

    the default budget fee

  • Get the default dust relay fee

    Returns Promise<bigint>

    the default dust relay fee

  • Get the default governance collateral

    Returns Promise<bigint>

    the default governance collateral

  • Get the default incremental relay fee

    Returns Promise<bigint>

    the default incremental relay fee

  • Get the default minumum gas price

    Returns Promise<bigint>

    the default minumum gas price

  • Get the default minumum relay tx fee

    Returns Promise<bigint>

    the default minumum relay tx fee

  • Get the gasScheduleAddress contract address

    Returns Promise<string>

    the EVM style address of the gasScheduleAddress contract

  • Get the current block gas limit

    Returns Promise<[limit: bigint]>

    the block gas limit

  • Get the current block size

    Returns Promise<[size: bigint]>

    the block size

  • Get the current budget fee

    Returns Promise<[fee: bigint]>

    the budget fee

  • Get receipts from a transaction

    Returns Promise<EventLogs>

    an EventLogs object

  • Get the current governance collateral

    Returns Promise<[fee: bigint]>

    the governace collateral

  • Get the current minimum gas price

    Returns Promise<[min: bigint]>

    the minimum gas price

  • Get the current transaction fee rates

    Returns Promise<[relayTxFee: bigint, incrementalRelayFee: bigint, dustRelayFee: bigint]>

    the transaction fee rates

  • Get the Governance contract address

    Returns Promise<string>

    the EVM style address of the Governance contract

  • Get the governanceCollateralAddress contract address

    Returns Promise<string>

    the EVM style address of the governanceCollateralAddress contract

  • Get the max block gas limit

    Returns Promise<bigint>

    the max block gas limit as units of gas

  • Get the max block size

    Returns Promise<bigint>

    the max block size

  • Get the max budget fee

    Returns Promise<bigint>

    the max budget fee

  • Get the max dust relay fee

    Returns Promise<bigint>

    the max dust relay fee

  • Get the max governance collateral

    Returns Promise<bigint>

    the max governance collateral

  • Get the incremental relay fee

    Returns Promise<bigint>

    the max incremental relay fee

  • Get the max minimum gas price

    Returns Promise<bigint>

    the max minimum gas price

  • Get the max minimum relay transaction fee

    Returns Promise<bigint>

    the max minimum relay transaction fee

  • Get the max block gas limit

    Returns Promise<bigint>

    the max block gas limit

  • Get the minimum block size

    Returns Promise<bigint>

    the minimum block size

  • Get the minGasPriceAddress contract address

    Returns Promise<string>

    the EVM style address of the minGasPriceAddress 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

  • Get the transactionFeeRatesAddress contract address

    Returns Promise<string>

    the EVM style address of the transactionFeeRatesAddress contract