| Maintainer | seungheon.ooh@gmail.com |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Agora.Effect.TreasuryWithdrawal
Description
An Effect that withdraws treasury deposit
Synopsis
- data TreasuryWithdrawalDatum = TreasuryWithdrawalDatum {
- receivers :: [(Credential, Value)]
- treasuries :: [Credential]
- newtype PTreasuryWithdrawalDatum (s :: S) = PTreasuryWithdrawalDatum (Term s (PDataRecord '["receivers" := PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive))), "treasuries" := PBuiltinList (PAsData PCredential)]))
- treasuryWithdrawalValidator :: forall {s :: S}. CurrencySymbol -> Term s PValidator
Documentation
data TreasuryWithdrawalDatum Source #
Datum that encodes behavior of Treasury Withdrawal effect.
Note: This Datum acts like a "predefined redeemer". Which is to say that it encodes the properties a redeemer would, but is locked in-place until spend.
Since: 0.1.0
Constructors
| TreasuryWithdrawalDatum | |
Fields
| |
Instances
newtype PTreasuryWithdrawalDatum (s :: S) Source #
Haskell-level version of TreasuryWithdrawalDatum.
Since: 0.1.0
Constructors
| PTreasuryWithdrawalDatum (Term s (PDataRecord '["receivers" := PBuiltinList (PAsData (PTuple PCredential (PValue 'Sorted 'Positive))), "treasuries" := PBuiltinList (PAsData PCredential)])) |
Instances
treasuryWithdrawalValidator :: forall {s :: S}. CurrencySymbol -> Term s PValidator Source #
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...
- Transaction outputs should contain all of what Datum specified
- Left over assets should be redirected back to Treasury
It can be more flexiable over...
- The number of outputs themselves
Since: 0.1.0