Commit graph

196 commits

Author SHA1 Message Date
fanghr
75c236db01
remove allOutputs 2022-05-23 18:20:49 +08:00
fanghr
02bf6f49cc
remove anyInput 2022-05-23 18:11:32 +08:00
fanghr
db92986c6d
pull own output filtering out of the pmatch block 2022-05-20 21:51:03 +08:00
fanghr
9549fae0df
fix misleading assert messages && add some comments 2022-05-20 21:51:02 +08:00
fanghr
dfe4bba15f
ensure the new proposal lock is placed on the stake 2022-05-20 03:35:31 +08:00
fanghr
82201a6e1f
add sample test && fix broken tests 2022-05-20 03:35:31 +08:00
fanghr
b4ca574757
ensure that the voting op is within a valid period 2022-05-20 03:35:30 +08:00
fanghr
e8b87654f3
store starting time of the proposal in its datum
... hardcoded to 0 upon creation for now
2022-05-20 03:35:30 +08:00
fanghr
92c64f8d7a
store timing config in the proposal datum
.... and mock the value upon creation for now
2022-05-20 03:35:29 +08:00
fanghr
cf51d47a0d
validation logic for voting 2022-05-20 03:35:28 +08:00
fanghr
11743e0aac
PEq instances for a bunch of on-chain structures 2022-05-20 03:35:28 +08:00
fanghr
80496430ab
add uitls to update a PMap on-chain 2022-05-20 03:35:23 +08:00
fanghr
6548105719
apply Emily's suggestions 2022-05-16 19:59:11 +08:00
fanghr
768652deb2
docs for utils; refactor tests; rewrite pnubSortBy 2022-05-16 18:11:14 +08:00
fanghr
06d4fcd428
add tests for pmsort, pmerge and phalve 2022-05-14 19:57:01 +08:00
fanghr
cbf14337ff
Merge branch 'master' into connor/governor 2022-05-14 00:40:26 +08:00
fanghr
b363b326f3
add make ps_bridge subcommand 2022-05-13 20:23:10 +08:00
fanghr
538e809d2c
add all agora types 2022-05-13 20:03:17 +08:00
fanghr
bb45319fd6
merge master; use TermCont every where
fixes #73 partially
2022-05-12 21:21:48 +08:00
Emily Martins
1bd6030855 remove all instances of P.do in favour of TermCont. 2022-05-12 13:54:31 +02:00
fanghr
cee0f4a67a
Merge branch 'master' into connor/governor 2022-05-11 17:40:38 +08:00
fanghr
057da75101
add someee comments; consistent naming 2022-05-10 19:55:41 +08:00
fanghr
e67dd21d06
use validatorHashToTokenName 2022-05-06 17:13:32 +08:00
fanghr
2a993ae777
run linter 2022-05-06 17:12:47 +08:00
fanghr
38e5611c3f
fix wired issue introduced by punsafeCoerce 2022-05-06 17:11:15 +08:00
Hongrui Fang
b653d85265
actually check GAT 2022-05-06 17:11:14 +08:00
fanghr
d9a2a467bb
fix seralization issues 2022-05-06 17:11:14 +08:00
fanghr
5c7d226a29
remove incorrect votes check 2022-05-06 17:11:11 +08:00
fanghr
15d4dd03d9
implement merge sort to imporve perf of some utils 2022-05-06 17:11:11 +08:00
fanghr
15fd232874
check if the UTXO carries a valid datum while minting GST 2022-05-06 17:11:09 +08:00
fanghr
41da2dd534
run formatter and linter 2022-05-06 17:11:08 +08:00
fanghr
473deeb08f
add samples: proposalCreation, mutateState and mintGAT 2022-05-06 17:11:07 +08:00
fanghr
cfac755380
ensure GTs are in the stake being checked 2022-05-06 17:11:06 +08:00
fanghr
7cfd80298a
add stakeSTAssetClassFromGovernor 2022-05-06 17:11:04 +08:00
fanghr
e50e5d6f36
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
327b2ed244
fix a typo 2022-05-06 17:11:02 +08:00
fanghr
f59cfc3f56
use new utils to construct record 2022-05-06 17:11:01 +08:00
fanghr
2210722c2a
apply hlint suggestions 2022-05-06 17:11:00 +08:00
fanghr
45d91b5aeb
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
fb6f2085c6
move governor scripts from Agora.Governor to Agora.Governor.Scripts 2022-05-06 17:09:39 +08:00
fanghr
0e6369030e
remove hasOnlyOneTokenOfAssetClass' 2022-05-06 17:09:38 +08:00
fanghr
1e2b20dfef
reimplement mustFindDatum' with PTryFrom 2022-05-06 17:09:37 +08:00
fanghr
d0b70d5b43
add PTryFrom instances for PGovernorDatum and PGovernorDatum 2022-05-06 17:09:37 +08:00
fanghr
9c79585c7c
get rid of pownCurrencySymbol 2022-05-06 17:09:36 +08:00
fanghr
c3a10f8bbd
move pgetNextProposalId from Proposal module to Governor module 2022-05-06 17:09:36 +08:00
fanghr
c1976b86fc
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
c7bfe116d5
remove executable state of the proposal
revert 45a09e8 and 8ffc430
2022-05-06 17:09:35 +08:00
Emily Martins
067d69d8f6
remove redundant checks in hasOnlyOneTokenOfAssetClass' 2022-05-06 17:09:34 +08:00
fanghr
d3b5f6c416
apply hlint suggestions; format 2022-05-06 17:09:33 +08:00
fanghr
5ee0a40435
check stake upon the creation of a proposal
...documentation is updated as well
2022-05-06 17:09:33 +08:00