agora-0.1.0
Maintaineremi@haskell.fyi
Safe HaskellSafe-Inferred
LanguageHaskell2010

Agora.Proposal.Scripts

Description

Plutus Scripts for Proposals.

Synopsis

Documentation

proposalValidator :: Proposal -> ClosedTerm PValidator Source #

The validator for Proposals.

The documentation for various of the redeemers lives at ProposalRedeemer.

What this validator does

Voting/unlocking

When voting and unlocking, the proposal must witness a state transition occuring in the relevant Stake. This transition must place a lock on the stake that is tagged with the right ResultTag, and ProposalId.

Periods

Most redeemers are time-sensitive.

A list of all time-sensitive redeemers and their requirements:

Since: 0.1.0

proposalPolicy Source #

Arguments

:: AssetClass

The assetclass of GST, see governorPolicy.

-> ClosedTerm PMintingPolicy 

Policy for Proposals.

What this policy does

For minting:

  • Governor is happy with mint.
  • The governor must do most of the checking for the validity of the transaction. For example, the governor must check that the datum is correct, and that the ST is correctly paid to the right validator.
  • Exactly 1 token is minted.

For burning:

  • This policy cannot be burned.

Since: 0.1.0