Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.4 #246

Merged
merged 121 commits into from
Oct 11, 2024
Merged

v0.4 #246

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
3cc8d29
Add `Question` and `NewConditionalVault` structs
metaproph3t Aug 18, 2024
a097a9b
Get the vault test working
metaproph3t Aug 19, 2024
09b68db
Add `initialize_question`
metaproph3t Aug 19, 2024
c02abd6
Initialize a new conditional vault
metaproph3t Aug 20, 2024
aff3f59
Add `resolve_question`
metaproph3t Aug 20, 2024
0b1ee51
Clean up tests and start `split_tokens`
metaproph3t Aug 21, 2024
09c81c3
Add multiple test cases for initializing conditional vault
metaproph3t Aug 21, 2024
bbbc488
Add `split_tokens`
metaproph3t Aug 21, 2024
0b36a4c
Add `merge_tokens`
metaproph3t Aug 22, 2024
2b58099
Add `redeem_tokens`
metaproph3t Aug 22, 2024
d3cbddc
Add redeem tests
metaproph3t Aug 22, 2024
c9bd65f
Use updated versions of packages
metaproph3t Aug 23, 2024
64e8065
Remove `metadata` folder
metaproph3t Aug 23, 2024
0b83432
Clean up `tests`
metaproph3t Aug 23, 2024
df0697a
Restructure existing tests into `programs` folder
metaproph3t Aug 23, 2024
9d9efd8
Structure the tests under program folders
metaproph3t Aug 23, 2024
4d773d8
Structure tests in a new way
metaproph3t Aug 23, 2024
5c8c92f
Migrate all conditional vault unit tests over
metaproph3t Aug 23, 2024
229e46b
Start on conditional vault integration test
metaproph3t Aug 23, 2024
c0c379a
Get start of integration test working
metaproph3t Aug 23, 2024
cc52383
Add merging to the integration test
metaproph3t Aug 23, 2024
9759483
Complete integration tests for conditional vault
metaproph3t Aug 23, 2024
ef44028
Put `Question` in its own file
metaproph3t Aug 23, 2024
5188457
Add conditional mint checks
metaproph3t Aug 23, 2024
b2a8966
Add back invariant checks to `split_tokens`
metaproph3t Aug 24, 2024
87e9c7c
Add invariants to `redeem_tokens`
metaproph3t Aug 24, 2024
596b668
Add asserts to `merge_tokens`
metaproph3t Aug 24, 2024
b02ed7a
Add an assets >= liabilities invariant
metaproph3t Aug 24, 2024
f7ece54
Add amm unit tests
metaproph3t Aug 24, 2024
4a42961
Update SDK version
metaproph3t Aug 24, 2024
4c6cb24
Remove some old deps
metaproph3t Aug 24, 2024
fdd1c54
Add autocrat tests
metaproph3t Aug 24, 2024
99996c5
Migrate autocrat to new version of conditional vault
metaproph3t Aug 24, 2024
9e180b7
Update to 0.3.0-14 SDK
metaproph3t Aug 24, 2024
2ce1c80
Final removes & lints
metaproph3t Aug 25, 2024
37dcb8f
v0.3.0-alpha.15
metaproph3t Aug 24, 2024
6d1fe8a
Update to v15 SDK
metaproph3t Aug 24, 2024
009a8f9
Start with metadata
metaproph3t Aug 26, 2024
d2ad266
Complete the adding of metadata
metaproph3t Aug 26, 2024
74f9855
v0.3.0-alpha.16
metaproph3t Aug 26, 2024
64f8f87
Update sdk version in deps
metaproph3t Aug 26, 2024
8ba3cd7
Test all conditional vault failure cases
metaproph3t Aug 26, 2024
875db4e
First stab at separating the SDK into verions
metaproph3t Aug 28, 2024
5826b1a
Use new sdk version
metaproph3t Aug 28, 2024
e5c6dc7
Add v0.3
metaproph3t Aug 28, 2024
6345671
Fix metadata URI
metaproph3t Aug 28, 2024
ff49479
v0.4.0-alpha.1
metaproph3t Aug 28, 2024
1d2ff18
Use new version of SDK
metaproph3t Aug 28, 2024
19cfd1f
Use `require!` over `assert!`
metaproph3t Aug 29, 2024
105dd6f
Update amm verifiable build
github-actions[bot] Aug 30, 2024
f1b0628
Update autocrat verifiable build
github-actions[bot] Aug 30, 2024
5791ab5
Update program IDs
metaproph3t Aug 29, 2024
ceff87c
Add Devnet script
metaproph3t Aug 30, 2024
070168a
Update SDK types
metaproph3t Sep 5, 2024
8eaac1c
Add umi deps
metaproph3t Sep 5, 2024
c989bc6
v0.4.0-alpha.3
metaproph3t Sep 5, 2024
47228f4
Use `PASS_INDEX` and `FAIL_INDEX` consts
metaproph3t Sep 6, 2024
cb931af
Add a 9-option prediction market integration test
metaproph3t Sep 6, 2024
3c71d59
Add mint-and-swap test
metaproph3t Sep 6, 2024
a7a2529
Make SDK browser-compatible
metaproph3t Sep 7, 2024
014a952
v0.4.0-alpha.4
metaproph3t Sep 7, 2024
e8fa4d7
v0.4.0-alpha.5
metaproph3t Sep 7, 2024
92c1fe4
Fix observation invariants
metaproph3t Sep 7, 2024
fc97fe6
Add deserialization to SDK
metaproph3t Sep 8, 2024
1850f34
v0.4.0-alpha.6
metaproph3t Sep 8, 2024
1d60dbf
Add CPI event to swap
metaproph3t Sep 11, 2024
f0be6c3
v0.4.0-alpha.7
metaproph3t Sep 10, 2024
72ba006
v0.4.0-alpha.8
metaproph3t Sep 11, 2024
3467491
Add events to `amm`
metaproph3t Sep 11, 2024
2b08a00
Add events to `conditional_vault`
metaproph3t Sep 11, 2024
dc6fd27
Update program IDs
metaproph3t Sep 11, 2024
6dbf319
v0.4.0-alpha.9
metaproph3t Sep 11, 2024
e4fe8f4
Change `num_conditions` -> `num_outcomes`
metaproph3t Sep 12, 2024
043a6e1
Update setup devnet script
metaproph3t Sep 13, 2024
e81755a
Add `QuestionAlreadyResolved` check
metaproph3t Sep 13, 2024
1cc9c4b
Fix question bug in `finalize_proposal`
metaproph3t Sep 13, 2024
99323d9
Replace `create_account` with `transfer`, `assign`, and `allocate`
metaproph3t Sep 13, 2024
f2e8459
Cast to `u128` on conditional vault invariant
metaproph3t Sep 13, 2024
cf2e21a
Remove some loose comments in autocrat
metaproph3t Sep 13, 2024
7874c7a
Administrative stuff
metaproph3t Sep 19, 2024
ca2ae35
Add `seq_num` to AMM
metaproph3t Sep 19, 2024
dbe9bd3
Add `crank_that_twap` test
metaproph3t Sep 19, 2024
9bfb2cf
Lint
metaproph3t Sep 19, 2024
285e500
Add `seq_num` to conditional vault
metaproph3t Sep 19, 2024
306d858
Update program IDs
metaproph3t Sep 19, 2024
63e24f2
v0.4.0-alpha.12
metaproph3t Sep 19, 2024
d11c7f5
Add swap event types
metaproph3t Sep 19, 2024
8525784
v0.4.0-alpha.13
metaproph3t Sep 19, 2024
da2c154
Add v0.3 to SDK
metaproph3t Sep 19, 2024
795c659
v0.4.0-alpha.14
metaproph3t Sep 19, 2024
4edf390
Add `calculateOptimalSwapAndMerge`
metaproph3t Sep 27, 2024
79b1236
Add `getDownAndUpMintAddrs`
metaproph3t Sep 27, 2024
a590ab7
consecutive split, merge, redeem tests
advaith101 Oct 1, 2024
5b98a0c
v0.4.0-alpha.15
metaproph3t Sep 27, 2024
8d0e19f
v0.4.0-alpha.16
metaproph3t Sep 27, 2024
0a46925
wip
advaith101 Oct 1, 2024
74a1372
scalarMarketsTest
advaith101 Oct 1, 2024
442510b
Add calculate optimal swap for merge
metaproph3t Oct 1, 2024
9745c8a
testing with different scalars
advaith101 Oct 1, 2024
e20028e
added withdraw liquidity
advaith101 Oct 1, 2024
3597544
uncommented stuff
advaith101 Oct 1, 2024
dc349da
Remove unnecessary function
metaproph3t Oct 1, 2024
455202d
v0.4.0-alpha.17
metaproph3t Oct 1, 2024
8d7a45c
closed form solution for optimal swap
advaith101 Oct 2, 2024
76581c4
one more
advaith101 Oct 2, 2024
d45be4b
explain math
advaith101 Oct 2, 2024
e8994e4
Test the optimal swap and merge
metaproph3t Oct 2, 2024
c4aef57
v0.4.0-alpha.18
metaproph3t Oct 2, 2024
a00e367
Optimize `calculateOptimalSwapForMerge`
metaproph3t Oct 2, 2024
0d5fa90
tests weird amounts for swap/merge optimal amt
advaith101 Oct 2, 2024
95e094b
whoops. smol fix
advaith101 Oct 2, 2024
7b8b360
removed console.logs
advaith101 Oct 2, 2024
21852ab
Remove old math for `calculateOptimalSwapForMerge`
metaproph3t Oct 2, 2024
808f901
v0.4.0-alpha.19
metaproph3t Oct 2, 2024
ab2404d
slippage
advaith101 Oct 2, 2024
40de26a
v0.4.0-alpha.20
metaproph3t Oct 2, 2024
cb2b3b5
Use latest SDK version from tests
metaproph3t Oct 11, 2024
f8cf589
Bump autocrat to v0.4
metaproph3t Oct 11, 2024
96ac995
Get rid of unnecessary `console.log`s
metaproph3t Oct 11, 2024
e5243ec
Update autocrat version
metaproph3t Oct 11, 2024
817ea2e
Update autocrat program ID
metaproph3t Oct 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ target
node_modules
test-ledger
scripts/*.js
.env
30 changes: 16 additions & 14 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
[scripts]
test = "npx mocha --import=tsx tests/main.test.ts"
propose = "yarn run ts-node scripts/initializeProposal.ts"
initialize-dao = "yarn run ts-node scripts/initializeDao.ts"
finalize = "yarn run ts-node scripts/finalizeProposal.ts"
metadata = "yarn run ts-node scripts/uploadMetadata.ts"
send-tokens = "yarn run ts-node scripts/sendTokens.ts"
crank = "yarn run ts-node scripts/crankTwap.ts"
attach-metadata = "yarn run ts-node scripts/attachMetadata.ts"
reclaim-tokens = "yarn run ts-node scripts/reclaimTokens.ts"
merge-tokens = "yarn run ts-node scripts/mergeTokens.ts"
setup-devnet = "yarn run tsx scripts/setupDevnet.ts"

[toolchain]

[features]
seeds = false
skip-lint = false

[programs.localnet]
amm = "AMM5G2nxuKUwCLRYTW7qqEwuoqCtNSjtbipwEmm2g8bH"
amm = "AMMyu265tkBpRW21iGQxKGLaves3gKm2JcMUqfXNSpqD"
autocrat_migrator = "MigRDW6uxyNMDBD8fX2njCRyJC4YZk2Rx9pDUZiAESt"
autocrat = "autoQP9RmUNkzzKRXsMkWicDVZ3h29vvyMDcAYjCxxg"
conditional_vault = "VAU1T7S5UuEHmMvXtXMVmpEoQtZ2ya7eRb7gcN47wDp"
autocrat = "autowMzCbM29YXMgVG3T62Hkgo7RcyrvgQQkd54fDQL"
conditional_vault = "VLTX1ishMBbcX3rdBWGssxawAo1Q2X2qxYFYqiGodVg"
optimistic_timelock = "tiME1hz9F5C5ZecbvE5z6Msjy8PKfTqo1UuRYXfndKF"

[registry]
Expand All @@ -18,17 +31,6 @@ url = "https://api.apr.dev"
cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
propose = "yarn run ts-node scripts/initializeProposal.ts"
initialize-dao = "yarn run ts-node scripts/initializeDao.ts"
finalize = "yarn run ts-node scripts/finalizeProposal.ts"
metadata = "yarn run ts-node scripts/uploadMetadata.ts"
send-tokens = "yarn run ts-node scripts/sendTokens.ts"
crank = "yarn run ts-node scripts/crankTwap.ts"
attach-metadata = "yarn run ts-node scripts/attachMetadata.ts"
reclaim-tokens = "yarn run ts-node scripts/reclaimTokens.ts"
merge-tokens = "yarn run ts-node scripts/mergeTokens.ts"
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/*.ts"

[test]
startup_wait = 5000
Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ where `P_URI` and `F_URI` are replaced with their respective values.

| program | tag | program ID |
| ----------------- | ---- | -------------------------------------------- |
| autocrat | v0.4 | autowMzCbM29YXMgVG3T62Hkgo7RcyrvgQQkd54fDQL |
| amm | v0.4 | AMMyu265tkBpRW21iGQxKGLaves3gKm2JcMUqfXNSpqD |
| conditional_vault | v0.4 | VLTX1ishMBbcX3rdBWGssxawAo1Q2X2qxYFYqiGodVg |
| autocrat | v0.3 | autoQP9RmUNkzzKRXsMkWicDVZ3h29vvyMDcAYjCxxg |
| amm | v0.3 | AMM5G2nxuKUwCLRYTW7qqEwuoqCtNSjtbipwEmm2g8bH |
| conditional_vault | v0.3 | VAU1T7S5UuEHmMvXtXMVmpEoQtZ2ya7eRb7gcN47wDp |
Expand Down
Loading
Loading