Abstract class implementation based on a ABI specification

Hierarchy

Implements

  • PBuilder

Constructors

Properties

contract: Contract
contractAbi: any[]
contractAddress: string
gas: number
gasPriceGwei: string
logger: Logger = ...
web3: default
ABI_NAME: string = 'ProposalBuilder.json'

Methods

  • reset the proposal builder for this address

    Returns Promise<PBuilder>

    Builder - this contract

  • Build the proposal with the configured settings.

    Returns Promise<number>

    number - The proposal id of the created proposal

  • get the contract name

    Returns Promise<string>

    string - contract anme

  • get the contract version

    Returns Promise<number>

    number - the version

  • Add a choice to the proposal

    Parameters

    • name: string

      choice name

    • description: string

      choice description

    • transactionId: number

      id of transaction to execute for choice

    Returns Promise<PBuilder>

    Builder - this contract

  • set the delay for this proposal

    Parameters

    • delay: number

      the delay to start voting

    Returns Promise<PBuilder>

    Builder - this contract

  • set the proposal description

    Parameters

    • description: string
    • url: string

    Returns Promise<PBuilder>

    Builder - this contract

  • set the duration for this proposal

    Parameters

    • duration: number

      the delay to start voting

    Returns Promise<PBuilder>

    Builder - this contract

  • attach metadata to the proposal

    Parameters

    • name: string

      the name for metadata

    • value: string

      the value for metadata

    Returns Promise<PBuilder>

    Builder - this contract

  • set the quorum required for this proposal

    Parameters

    • quorum: number

      the quorum required

    Returns Promise<PBuilder>

    Builder - this contract

  • Add a transaction to the proposal

    Parameters

    • target: string

      the address to execute

    • value: number

      the amount to transfer

    • signature: string

      the contract function signature

    • _calldata: string

      the calldata to pass to the executing signature

    • scheduleTime: number

      the time to execute the transaction

    Returns Promise<PBuilder>

    Builder - this contract

Generated using TypeDoc