Treasury Withdrawal Effect simple Haddock comment

This commit is contained in:
Seungheon Oh 2022-04-16 00:33:23 -05:00
parent 4d2c3af2ba
commit 1e4d6e554d
No known key found for this signature in database
GPG key ID: 9B0E12D357369B66

View file

@ -62,6 +62,20 @@ deriving via
instance
(PConstant TreasuryWithdrawalDatum)
{- | Withdraws given list of values to specific target addresses.
It can be evoked by burning GAT. The transaction should have correct
outputs to the users and any left overs should be paid back to the treasury.
The validator does not accept any Redeemer as all "parameters" are provided
via encoded Datum.
Note:
It should check...
1. Transaction outputs should contain all of what Datum specified
2. Left over assests should be redirected back to Treasury
It can be more flexiable over...
- The number of outputs themselves
-}
treasuryWithdrawalValidator :: forall {s :: S}. CurrencySymbol -> Term s PValidator
treasuryWithdrawalValidator currSymbol = makeEffect currSymbol $
\_cs (datum' :: Term _ PTreasuryWithdrawalDatum) txOutRef' txInfo' -> P.do