bitbadgesjs-sdk - v0.27.2
    Preparing search index...

    Class VotingChallenge<T>

    VotingChallenge defines a rule for approval in the form of a voting/multi-sig challenge. Requires a weighted quorum threshold to be met through votes from specified voters. All challenges must be met with valid solutions for the transfer to be approved.

    IMPORTANT: Votes are stored separately and can be updated. The threshold is calculated as a percentage of total possible weight (all voters), not just voted weight. If you update the proposal ID, then the vote tracker will reset and start a new tally. We recommend using a unique proposal ID for each challenge to prevent overlap and unexpected behavior.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    customData?: string

    Arbitrary custom data associated with this voting challenge.

    proposalId: string

    The ID of this voting challenge for tracking votes (scoped like challengeTrackerId). Format: collectionId-approverAddress-approvalLevel-approvalId-challengeId

    quorumThreshold: T

    The quorum threshold as a percentage (0-100) of total possible weight that must vote "yes". Example: 50 means 50% of total voter weight must vote yes for approval.

    uri?: string

    The URI associated with this voting challenge.

    voters: Voter<T>[]

    List of voters with their weights. Each voter can cast a weighted vote.

    Methods