Liqwid-Labs / agora

Governance modules for Cardano protocols

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Treasury withdrawal effect

emiflake opened this issue · comments

Arguably the simplest standalone effect script is one that simply withdraws some value from the treasury validator through a GAT burn.

A datum could look something like:

data TreasuryWithdrawal
  = TreasuryWithdrawal { amount :: Value, receivers :: [(Credential, Value)] }

The validator then just needs to check that a single GAT is burned succesfully. And that the treasury's updated value is correct. It's important to note that all "parameters" of an effect ought to be encoded in the Datum, rather than the Redeemer. The min ada also has to be retrieved back correctly.

I reckon we should put different types of effects and their datums in Agora.Effect.*.

Do we need amount field? Isn't it simply a sum of all values in receivers?

Yeah, I guess we don't.