microwavedcola1
38d7b03735
ts client
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-10 10:13:08 +01:00
microwavedcola1
55c788cdc2
delete js/ts related things, cli and client both have separate repos
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-09 08:01:41 +01:00
microwavedcola1
9762d88986
Update README.md
2022-01-05 20:26:49 +01:00
microwavedcola1
f8e6219d87
update anchor types file
2022-01-05 20:24:22 +01:00
microwavedcola1
e90692d45e
fix types file
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-05 20:24:03 +01:00
microwavedcola1
8b6775595d
script for generating types
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-01-05 20:23:27 +01:00
Christian Kamm
284a7ee2a5
Adjust some CI job names
2022-01-05 14:04:58 +01:00
Christian Kamm
a4d06a90f8
Cargo audit: Enable dependency tree
...
Good to know where a dependency with an issue is pulled in.
2022-01-05 14:02:00 +01:00
silas
007dc64d3d
Add cargo-audit action and update existing CI job to include Soteria ( #19 )
2022-01-05 14:01:12 +01:00
Christian Kamm
18edcd602e
Overflow checking in vested vote power computation
2021-12-29 10:01:36 +01:00
Christian Kamm
1574f53a65
Overflow check when accumulating voter weight
2021-12-29 10:01:36 +01:00
microwavedcola1
4c3215c9b0
Merge pull request #17 from blockworks-foundation/ci
...
github instead of travis for ci tests
2021-12-20 12:01:41 +01:00
microwavedcola1
1477c29a0f
linter-fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-20 11:09:51 +01:00
microwavedcola1
f43c715539
remove redundant cmds
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-20 11:07:45 +01:00
microwavedcola1
4568430232
github instead of travis for ci tests
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-20 11:04:40 +01:00
Christian Kamm
bb4c3f85ea
Remove separate clawback_authority ( #15 )
...
Just use the realm authority instead.
2021-12-20 11:01:23 +01:00
Christian Kamm
0e45b0d8a4
Prefer Pubkey::default() over manual init
2021-12-18 14:24:58 +01:00
Christian Kamm
150e67990e
README: Add note about devnet deployment
2021-12-18 14:23:33 +01:00
microwavedcola1
bfab92e534
fix-comment
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-18 14:22:22 +01:00
microwavedcola1
332f1f76fc
remove unused, was added for ts tests, which we not longer maintain
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-18 14:09:20 +01:00
microwavedcola1
6ba0788e48
comment
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-18 14:06:08 +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
9c8dd35ba6
Grant/CreateDeposit: Allow control of start timestamp
2021-12-17 07:51:06 +01:00
Christian Kamm
ae7dea95eb
Create voter requires authority signature
...
and can only be called once for each voter_authority.
Now that there's a separate "Grant" instruction, there's no longer a
need for CreateVoter to be idempotent and be callable on foreign
accounts.
Calling create voter manually on a PDA account could have allowed
automation.
2021-12-17 07:51:06 +01:00
Christian Kamm
a5659f6666
Use specific size of VoterWeightRecord in initialization
2021-12-17 07:51:06 +01:00
Christian Kamm
5aa1114beb
Make VotingMintConfig::in_use based on the mint
2021-12-17 07:51:06 +01:00
Christian Kamm
b937452f51
Increase default voting_mints size to 4.
2021-12-17 07:51:06 +01:00
microwavedcola1
be92028d59
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-15 10:35:31 +01:00
microwavedcola1
b51a7a5b68
sample cli
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-15 10:21:11 +01:00
Christian Kamm
d877eae443
Upgrade spl-governance dependency to current master
2021-12-14 13:46:38 +01:00
Christian Kamm
3071c1edcf
Update program ids for devnet deployment
2021-12-14 12:47:12 +01:00
Christian Kamm
a7dd5684c3
Update anchor dependency
...
The previous version didn't include the fix needed to use init_if_needed
with the voter weight record.
2021-12-14 12:25:03 +01:00
microwavedcola1
b987fb225d
Update README.md
2021-12-14 12:17:39 +01:00
microwavedcola1
24bedd7628
Update README.md
2021-12-14 12:17:09 +01:00
microwavedcola1
24b5db0ef5
Update README.md
2021-12-14 12:16:53 +01:00
microwavedcola1
36859e5c92
Update README.md
2021-12-14 12:14:27 +01:00
microwavedcola1
73fc3aa224
update lockfile
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-12-14 11:37:28 +01:00
Christian Kamm
49e137eb51
Add constant-maturity lockup
...
Adds LockupKind::Constant, extends the reset_lockup instruction and
adds the internal_transfer instruction to allow working with constant
maturity lockups.
2021-12-14 10:19:47 +01:00
Christian Kamm
b41dfae916
Grant instruction: Add separate "payer" signer
...
The governance PDAs can't pay.
2021-12-10 18:06:52 +01:00
Christian Kamm
8f3af93f99
Change assert() to require()
...
So these assumption-guaranteeing checks aren't removed.
2021-12-10 16:22:43 +01:00
Christian Kamm
9a5182d317
Fix a bug where start_ts could become > end_ts
...
Previously period_current() could exceed periods_total().
2021-12-10 16:22:43 +01:00
Christian Kamm
89f5954961
Allow changing of voting mint config parameters
...
Previously the configure_voting_mint() instruction could only be run
once per index. Now it's allowed to call it again to change a mint's
parameters.
This will directly be useful for Mango, which will likely start out
configuring the MNGO voting mint without lockup vote scaling and then
later enable it, when the ui is ready.
2021-12-10 09:26:30 +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
Armani Ferrante
2f5e133648
Fix conversion_factor comment
2021-12-07 18:11:32 +01:00
Christian Kamm
fea2c9a0cd
Apply review suggestions
2021-12-07 09:26:47 +01:00
Christian Kamm
e8b0a1f50a
Fix vote power computation for monthly vesting
...
- The vote power decay now has second resolution.
- Monthly and daily vesting behave exactly like multiple cliff locked
deposits.
- In particular, monthly vesting deposits lock-up power decays during
the month, making it smooth over time.
- Gain vote power even if start_ts is in the future (shouldn't happen)
2021-12-06 16:11:32 +01:00
Christian Kamm
573305f789
Test: Check placing something in all deposits
...
And reduce the compute limit in tests to half the current live limit.
2021-12-06 07:29:50 +01:00