Commit graph

1046 commits

Author SHA1 Message Date
fanghr
6647fdf7e6
allow multiple outputs to the proposal validator
... upon creation of the proposal. Don't know if this is intended or
not.
2022-05-06 17:09:32 +08:00
fanghr
342bedfdd8
naming 2022-05-06 17:09:31 +08:00
fanghr
ce52bce9fd
ensure that the token name of GST is empty 2022-05-06 17:09:31 +08:00
fanghr
a8249fdd4a
simplify code
Co-authored-by: Emily Martins <emi@haskell.fyi>
2022-05-06 17:09:30 +08:00
fanghr
fdbafcce89
apply naming suggestions by @emiflake 2022-05-06 17:09:30 +08:00
fanghr
3dacc932ca
fix some typos :) 2022-05-06 17:09:29 +08:00
fanghr
03c8009e27
clean up; apply hlint suggestions; format 2022-05-06 17:09:28 +08:00
fanghr
430f5ba427
properly check state datum when creat a proposal 2022-05-06 17:09:28 +08:00
fanghr
ba19962448
support more than two effect groups/vote outcomes 2022-05-06 17:09:27 +08:00
fanghr
18dce71f72
doc string for util functions 2022-05-06 17:09:27 +08:00
fanghr
cda1edeffc
rewrite the doc for governor components
... also explain what GST is
2022-05-06 17:09:26 +08:00
fanghr
ab0151cbd2
expose util function gatSymbol 2022-05-06 17:09:25 +08:00
fanghr
1e965a7363
fix compilation erros; format && lint
Co-authored-by: Emily Martins <emi@haskell.fyi>
2022-05-06 17:09:25 +08:00
fanghr
3ba0abb179
consistent naming 2022-05-06 17:09:24 +08:00
fanghr
4ec55eb81a
fix missing documentation for governorValidator 2022-05-06 17:09:24 +08:00
fanghr
d7b171ff90
yeet containsSingleCurrencySymbol; clean things up 2022-05-06 17:09:23 +08:00
fanghr
9eed91ff61
update doc string for the 'governorValidator' 2022-05-06 17:09:23 +08:00
fanghr
2b0027f4e4
check proposal state is draft while creating a proposal 2022-05-06 17:09:22 +08:00
fanghr
aba2bb7bd0
remove all unnecessary mint only one kind of token checks 2022-05-06 17:09:21 +08:00
fanghr
7c50b10309
allow GST has a custom name 2022-05-06 17:09:21 +08:00
fanghr
8da0a1b016
ensure the proposal is in executable state while minting GATs 2022-05-06 17:09:20 +08:00
fanghr
be05643f13
add executable state for the proposal 2022-05-06 17:09:19 +08:00
fanghr
529525f5c8
some error message improvement 2022-05-06 17:09:19 +08:00
fanghr
6f1c6f0aef
ensure that the proposal state token is sent back 2022-05-06 17:09:18 +08:00
Hongrui Fang
f1f0405e98
check input/output proposal status while minting GATs 2022-05-06 17:09:18 +08:00
fanghr
3f871123b7
correct validation logic for proposals
* simplify using newly added util functions
* check vote thresholds
* Anything else to check here?
2022-05-06 17:09:17 +08:00
fanghr
6daebba414
add mustBePJust and mustBePDJust util functions 2022-05-06 17:09:16 +08:00
fanghr
ed465b114c
allow other components to know the assetclass of GST 2022-05-06 17:09:16 +08:00
fanghr
7c4ae9313a
add validation logic for GAT minting; add doc string for MintGATs 2022-05-06 17:09:15 +08:00
fanghr
455bd3e01c
remove redundant imports 2022-05-06 17:09:14 +08:00
fanghr
5a7c1dd16d
getting start with GAT minting validation 2022-05-06 17:09:14 +08:00
fanghr
920286f656
calculate GAT's symbol based on gov parameters 2022-05-06 17:09:13 +08:00
fanghr
b282795efe
make authorityTokenPolicy a ClosedTerm PMintingPolicy 2022-05-06 17:09:13 +08:00
Hongrui Fang
dfbbb4aea3
plet proposal symbol; clean up stuff a little bit 2022-05-06 17:09:12 +08:00
Hongrui Fang
175d4aa319
handle proposal creation 2022-05-06 17:09:11 +08:00
fanghr
0e397d2a89
add doc string for governorValidator and pnextProposalId 2022-05-06 17:09:11 +08:00
fanghr
70a5b8ca18
convert all "datum NFT" to "state token" in the messages
in order to avoid confusion
2022-05-06 17:09:10 +08:00
fanghr
c562f6ae87
implement governor state token minting policy
* parameterize the policy and the validator with a utxo
2022-05-06 17:09:09 +08:00
fanghr
6e0373c6e5
apply hlint suggestions; fix the ci 2022-05-06 17:09:08 +08:00
fanghr
5adde420f3
apply naming suggestions from Emily and Seungheon
* `pid` -> `id`
*  `MutateParams` -> `MutateGovernor`
2022-05-06 17:09:08 +08:00
fanghr
4c770abce6
get next proposal id from pnextProposalId 2022-05-06 17:09:07 +08:00
fanghr
4b5875923c
handle effects that mutate params of the governor 2022-05-06 17:09:07 +08:00
fanghr
1a17abccd6
add pisDJust util function
the counterpart of `pisJust`, for type `PMaybeData`
2022-05-06 17:09:06 +08:00
fanghr
7d644c383b
rename redeemer MutateDatum to MutateParams 2022-05-06 17:09:05 +08:00
fanghr
5e54861cd0
handle proposal creation
* check proposal id
2022-05-06 17:09:05 +08:00
fanghr
cd1f137c15
check that the datum nft always stays at the governor address 2022-05-06 17:09:04 +08:00
fanghr
872b4d60fc
export PGovernorRedeemer 2022-05-06 17:09:03 +08:00
fanghr
60001f45f2
add corresponding plutarch-level redeemer and datum
* lift them as well
2022-05-06 17:09:03 +08:00
fanghr
3b94062dbb
modify GovernorRedeemer and Governor
* add `MutateDatum` redeemer
* add `datumNFT` to `Governor` so that we can identify the datum
* Lift `GovernorDatum` and `GovernorRedeemer`
2022-05-06 17:09:02 +08:00
Jack Hodgkinson
35763b4e57 Merge branch 'master' of github.com:Liqwid-Labs/agora into jhodgdev/treasury-tests 2022-05-06 09:35:23 +01:00