Commit graph

397 commits

Author SHA1 Message Date
fanghr
27e3033b3b add subcommand lint_haskell to lint haskell code 2022-05-06 17:11:09 +08:00
fanghr
b361ad7aa7 check if the UTXO carries a valid datum while minting GST 2022-05-06 17:11:09 +08:00
fanghr
6a96d68e01 run formatter and linter 2022-05-06 17:11:08 +08:00
fanghr
c404cef850 add samples: proposalCreation, mutateState and mintGAT 2022-05-06 17:11:07 +08:00
fanghr
63c87667c3 add templates for samples and tests of governor 2022-05-06 17:11:07 +08:00
fanghr
e5ab13d874 ensure GTs are in the stake being checked 2022-05-06 17:11:06 +08:00
fanghr
dd2bc5c0d6 add descriptions for available make subcommands 2022-05-06 17:11:05 +08:00
fanghr
89dd30b1d8 fix broken tests 2022-05-06 17:11:05 +08:00
fanghr
1387cd19df add stakeSTAssetClassFromGovernor 2022-05-06 17:11:04 +08:00
fanghr
f62189c38d refactor Spec.Sample.Shared with bridges 2022-05-06 17:11:03 +08:00
fanghr
62bd2dee28 parameterize PST policy only with assetclass of GST
...to resolve the cyclic reference between SST and PST
2022-05-06 17:11:03 +08:00
fanghr
afa8c7c542 fix a typo 2022-05-06 17:11:02 +08:00
fanghr
86877236de fix compilation errors :) 2022-05-06 17:11:01 +08:00
fanghr
b44a007e72 use new utils to construct record 2022-05-06 17:11:01 +08:00
fanghr
8ef9506cd6 apply hlint suggestions 2022-05-06 17:11:00 +08:00
fanghr
926b1f3727 fix compilation errors introduced by new util functions
... and export a bunch of bridge functions from the governor
2022-05-06 17:10:53 +08:00
fanghr
07a498641c move governor scripts from Agora.Governor to Agora.Governor.Scripts 2022-05-06 17:09:39 +08:00
fanghr
65a8e9f92c remove hasOnlyOneTokenOfAssetClass' 2022-05-06 17:09:38 +08:00
fanghr
750761ed0d reimplement mustFindDatum' with PTryFrom 2022-05-06 17:09:37 +08:00
fanghr
3da721b876 add PTryFrom instances for PGovernorDatum and PGovernorDatum 2022-05-06 17:09:37 +08:00
fanghr
c47d0ca857 get rid of pownCurrencySymbol 2022-05-06 17:09:36 +08:00
fanghr
8630b7190d move pgetNextProposalId from Proposal module to Governor module 2022-05-06 17:09:36 +08:00
fanghr
62c359aac3 fix typos/grammar/docstrings, suggested by @jhodgdev
Co-authored-by: Jack Hodgkinson <30505104+jhodgdev@users.noreply.github.com>
2022-05-06 17:09:35 +08:00
fanghr
836ec5e9cf remove executable state of the proposal
revert 45a09e8 and 8ffc430
2022-05-06 17:09:35 +08:00
Emily Martins
31716e573c remove redundant checks in hasOnlyOneTokenOfAssetClass' 2022-05-06 17:09:34 +08:00
fanghr
70d79e8971 apply hlint suggestions; format 2022-05-06 17:09:33 +08:00
fanghr
c67a4ea81b check stake upon the creation of a proposal
...documentation is updated as well
2022-05-06 17:09:33 +08:00
fanghr
ec0c53db99 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
14b8d30d57 naming 2022-05-06 17:09:31 +08:00
fanghr
13c72a6180 ensure that the token name of GST is empty 2022-05-06 17:09:31 +08:00
fanghr
7294c01ebb simplify code
Co-authored-by: Emily Martins <emi@haskell.fyi>
2022-05-06 17:09:30 +08:00
fanghr
4dc311d370 apply naming suggestions by @emiflake 2022-05-06 17:09:30 +08:00
fanghr
0874571d89 fix some typos :) 2022-05-06 17:09:29 +08:00
fanghr
01d3be029d clean up; apply hlint suggestions; format 2022-05-06 17:09:28 +08:00
fanghr
15414aeda4 properly check state datum when creat a proposal 2022-05-06 17:09:28 +08:00
fanghr
a4d55f221a support more than two effect groups/vote outcomes 2022-05-06 17:09:27 +08:00
fanghr
1cd5a8eb3c doc string for util functions 2022-05-06 17:09:27 +08:00
fanghr
9e85a7a004 rewrite the doc for governor components
... also explain what GST is
2022-05-06 17:09:26 +08:00
fanghr
c6cdb3ac31 expose util function gatSymbol 2022-05-06 17:09:25 +08:00
fanghr
54b58ad937 fix compilation erros; format && lint
Co-authored-by: Emily Martins <emi@haskell.fyi>
2022-05-06 17:09:25 +08:00
fanghr
a5c461700e consistent naming 2022-05-06 17:09:24 +08:00
fanghr
b84ed61356 fix missing documentation for governorValidator 2022-05-06 17:09:24 +08:00
fanghr
4a645af531 yeet containsSingleCurrencySymbol; clean things up 2022-05-06 17:09:23 +08:00
fanghr
1b8d322cf4 update doc string for the 'governorValidator' 2022-05-06 17:09:23 +08:00
fanghr
d3c05c1dc2 check proposal state is draft while creating a proposal 2022-05-06 17:09:22 +08:00
fanghr
74b5e714da remove all unnecessary mint only one kind of token checks 2022-05-06 17:09:21 +08:00
fanghr
12a0e3046e allow GST has a custom name 2022-05-06 17:09:21 +08:00
fanghr
8ec958646c ensure the proposal is in executable state while minting GATs 2022-05-06 17:09:20 +08:00
fanghr
0f2be417a7 add executable state for the proposal 2022-05-06 17:09:19 +08:00
fanghr
9e724fb75a some error message improvement 2022-05-06 17:09:19 +08:00