API Wrapper for CollectiveGovernance contract

Hierarchy

  • CollectiveGovernance

Implements

Constructors

Properties

contract: Contract
contractAbi: any[]
contractAddress: string
logger: Logger = ...
stratAbi: any[]
strategy: Contract
web3: default
ABI_NAME: string = 'Governance.json'
STRAT_NAME: string = 'VoteStrategy.json'

Methods

  • set a choice for the choice vote

    Parameters

    • proposalId: number

      The id of the vote

    • name: string

      The name for the choice

    • description: string

      The choice description

    • transactionId: number

      The transaction id to associate with the choice. This transaction will execute if the given choice wins.

    Returns Promise<number>

  • attach a transaction to the vote

    Parameters

    • proposalId: number

      The id of the vote to attach to

    • target: string

      target address for the call

    • value: number

      value to be specified for the transaction, may be 0

    • signature: string

      function signature for the call

    • calldata: string

      abi encoded calldata for the transaction call

    • etaOfLock: number

      expected time when execution will be triggered for this transaction

    Returns Promise<number>

    number - The id of the attached transaction

  • configure a vote with delay settings

    Parameters

    • proposalId: number

      The id of the vote

    • quorum: number

      The minimum quorum for the vote

    • requiredDelay: number

      The minimum required vote delay

    • requiredDuration: number

      The minimum required vote duration

    Returns Promise<void>

  • vote in favor with all shares

    Parameters

    • proposalId: number

      the id of the choice vote

    • choiceId: number

      the id of the choice on the vote

    Returns Promise<void>

Generated using TypeDoc