Christian Kamm
929c38f512
Withdraw: Never block withdraws of tokens without voting power
...
Previously being engaged in a proposal would prohibit these withdraws.
2022-02-09 10:31:06 +01:00
Christian Kamm
afa1e30269
Tests for starting time in deposit/grant
...
Including a bugfix to the Grant instruction
2021-12-17 10:44:11 +01:00
microwavedcola1
9d72320bdd
make vault per voter+mint instead of global per registrar+mint ( #14 )
2021-12-17 08:02:14 +01:00
Christian Kamm
ddf37c4de0
Configurable options for vote weight scaling factors ( #7 )
...
Configurable options for vote weight scaling and lockup saturation
Co-authored-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-09 11:58:15 +01:00
Christian Kamm
119bdffcec
Add grant instruction
2021-12-05 20:36:01 +01:00
Christian Kamm
05582700cf
Make create_voter permissionless
2021-12-05 14:34:03 +01:00
Christian Kamm
bae63655cc
Update voter weight record in withdraw
...
This avoids a security issue where three separate transactions in the
same slot may update the voter weight record, withdraw funds and then
vote with the stale voter weight record.
2021-12-05 11:58:56 +01:00
Christian Kamm
3374f6c09c
Rename ExchangeRate -> VotingMintConfig
2021-12-03 20:49:34 +01:00
Christian Kamm
0b049ad3f8
Add reset_lockup tests / add max period check
2021-12-03 11:38:45 +01:00
Christian Kamm
0612a3f918
Simplify state:: use
2021-12-03 09:52:48 +01:00
Christian Kamm
b91f9ba595
Pass deposit_entry_index to create_deposit_entry()
...
This allows create_deposit_entry() and deposit() to be in the same
transaction.
2021-12-03 09:48:10 +01:00
microwavedcola1
9823f282d4
split accounts.rs into state/*
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-02 20:05:43 +01:00
Christian Kamm
37a3ab9b0f
Rename CloseDeposit -> CloseDepositEntry
2021-12-02 11:08:18 +01:00
Christian Kamm
f5ecf79765
Rename UpdateDeposit -> Deposit
2021-12-02 11:06:15 +01:00
Christian Kamm
daf4609c41
Rename CreateDeposit -> CreateDepositEntry and make it separate
...
It doesn't implicitly call UpdateDeposit now
2021-12-02 11:01:14 +01:00
Christian Kamm
17a023fe6d
cargo fmt
2021-12-02 08:06:45 +01:00
Christian Kamm
0543f5fe20
Rename to voter-stake-registry
2021-12-01 13:28:38 +01:00