Commit Graph

12 Commits

Author SHA1 Message Date
Connor O'Hara 3ef766d249 Added the required CHECK docs from Anchor 2022-12-22 09:21:35 +01:00
Christian Kamm eb46a030d1 Upgrade anchor to 0.24.2 2022-05-04 13:50:50 +02:00
microwavedcola1 2105e1b173
fix clippy warnings and some other deprecations (#33)
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-02-04 09:32:55 +01:00
Christian Kamm decdd1230c Address unaligned references, add padding
- Make Registrar zero-copy. While it was using borsh for serialization,
  the array of voting mint configs couldn't be serialized without
  unaligned references.
- Reorganize all zero_copy fields such that switching to repr(C) would
  not make a difference. (just for safety in case that happens)
- Add static asserts on the sizes of all account structs, so any changes
  are visible very early.
- Add padding to structs that didn't have it yet.
2021-12-09 11:59: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
microwavedcola1 317b7168eb Remove instruction name logs since they would be redundant with next anchor release
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-07 19:12:56 +01:00
Christian Kamm 3374f6c09c Rename ExchangeRate -> VotingMintConfig 2021-12-03 20:49:34 +01:00
Christian Kamm 9d9ebff1c1 Common code for finding exchange rate index 2021-12-03 13:03:16 +01:00
Christian Kamm 0612a3f918 Simplify state:: use 2021-12-03 09:52:48 +01:00
Christian Kamm 3f158f1f0b Drop unused use 2021-12-02 20:28:03 +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 f5ea3180d1 Move all instructions to separate files 2021-12-02 16:28:12 +01:00