microwavedcola1
2479107d9a
Prepare serum3 release ( #206 )
2022-09-01 10:18:47 +02:00
microwavedcola1
a889e6c206
Fix scripts
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 09:56:17 +02:00
microwavedcola1
5ff181d01d
Merge branch 'dev'
2022-09-01 09:52:29 +02:00
microwavedcola1
5f62f15549
mc/i80F48 in-place cleanups ( #203 )
...
* ts: use in place I80F48 wherever applicable
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* ts: dont overwrite I80F48 constants
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* Fix script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-09-01 09:48:23 +02:00
tjs
8296d660d8
return mangoAccount after reloading
2022-08-31 15:33:07 -04:00
microwavedcola1
0c6cc16023
ts: serum display function for max leverage ( #202 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 14:37:45 +02:00
microwavedcola1
cec0fcab99
patch script for strictness
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 13:55:15 +02:00
microwavedcola1
5e33c00ec8
Merge branch 'main' into dev
2022-08-31 11:55:54 +02:00
tjshipe
263bc6ff1f
turn on strict null checks and fix issues ( #201 )
2022-08-31 11:41:12 +02:00
microwavedcola1
42f22003d8
deployment script for vanity ( #184 )
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 11:40:39 +02:00
microwavedcola1
c66dd882b6
ts: Additional serum3 support ( #196 )
...
* get bids and asks for a user on a serum3 market
* get orderbook for a market
* get max bid or ask that a user can place for a market
* simulate health if a bid or ask were to be placed
misc:
* fix remaining accounts list for health when placing perp bids
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
format
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
remove testing code
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Fixes from review
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
script adjustment
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
comments
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-31 11:36:44 +02:00
microwavedcola1
4a1865be6c
Merge branch 'main' into dev
2022-08-31 11:35:19 +02:00
microwavedcola1
2fb569cc75
make script net agnostic
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-30 17:01:17 +02:00
Christian Kamm
e0437305ee
SerumPlaceOrder: Only pass the payer bank/vault
2022-08-30 12:05:07 +02:00
Christian Kamm
36723792a1
SerumRegister: Block using the same market index twice
2022-08-30 12:05:07 +02:00
tjs
ff7638f04b
throw error when reloading account if simulation fails
2022-08-27 03:55:55 -04:00
tjs
a12457eeb5
log in getTokenVaultBalanceByMint
2022-08-27 01:58:20 -04:00
tjs
b35bca95a1
improve transaction confirmation
2022-08-26 15:42:10 -04:00
tjs
2e88889043
remove async and unused arg in getTokenVaultBalanceByMint
2022-08-26 13:54:14 -04:00
microwavedcola1
4025624738
Merge branch 'main' into dev
2022-08-26 10:45:56 +02:00
microwavedcola1
177770c580
small updates to debug scripts, also log vault balance in ui and native, filter mango accounts by name instead of pubkeys
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-26 10:45:50 +02:00
microwavedcola1
7fbf2b592a
fix imports
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-26 10:10:33 +02:00
microwavedcola1
3e44dde696
Merge branch 'main' into dev
2022-08-26 10:09:52 +02:00
microwavedcola1
ab4c0e3de5
reset script
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-26 10:09:36 +02:00
microwavedcola1
b9a69bf59c
extend debugging script to just take mango accounts directly
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-26 10:08:45 +02:00
microwavedcola1
453248bbe5
token_deregister: remove redundant token index and add doc ( #192 )
...
* token_deregister: remove redundant token index
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix test
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-25 19:25:56 +02:00
Christian Kamm
38b349a401
Rename PerpOpenOrders -> PerpOpenOrder, since it's a single one
2022-08-24 15:22:55 +02:00
microwavedcola1
b65fb0f630
Merge branch 'main' into dev
2022-08-24 10:17:22 +02:00
microwavedcola1
aae3c32c78
mc/switchboard ts support ( #182 )
...
* switchboard oracle v2 parsing
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
* fix
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-24 10:16:43 +02:00
Christian Kamm
2d2cef35a0
Add HealthRegion instructions
...
You can do
- HealthRegionBegin
- ... mango instructions ...
- HealthRegionEnd
and the account health will only be checked at the start and end
instead of for every instruction.
2022-08-24 10:07:45 +02:00
microwavedcola1
430e7469c4
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 16:23:20 +02:00
microwavedcola1
4c4a9cbb73
Small changes for consistency
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 16:21:05 +02:00
microwavedcola1
5947698af8
make functions consistent, always return positive values for deposits or borrows
...
provide ui alternative functions for many functions
provide a way to grab total vault balance for a token on a group
improve getMaxWithdrawWithBorrowForToken and getMaxSourceForTokenSwap and simHealthRatioWithTokenPositionUiChanges
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 13:47:08 +02:00
microwavedcola1
026a58d856
fixes from review
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 13:39:32 +02:00
microwavedcola1
53b43bfdd1
fixes from review
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 13:33:47 +02:00
microwavedcola1
6bde327a9e
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 11:57:32 +02:00
microwavedcola1
8a460352a0
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 11:51:45 +02:00
microwavedcola1
363d7a306c
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 11:43:25 +02:00
microwavedcola1
7321df31be
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 09:42:00 +02:00
microwavedcola1
7f2fb0c04c
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 09:20:03 +02:00
microwavedcola1
2f8436d8f7
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-23 08:34:44 +02:00
microwavedcola1
50e9f39b76
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 20:09:31 +02:00
microwavedcola1
2f5436d239
fix
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 20:01:36 +02:00
microwavedcola1
844bca622d
debugging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 19:20:47 +02:00
microwavedcola1
b6b22ce903
debugging
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 19:09:22 +02:00
microwavedcola1
f273129b59
testing
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 18:56:40 +02:00
microwavedcola1
357710dc24
ts: Fix getMaxWithdrawWithBorrowForToken and add getGroupTokenVaultBalanceByMint
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 13:02:43 +02:00
microwavedcola1
9aa0a94794
make consistent, always return positive values for deposits or borrows
...
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-08-22 12:39:34 +02:00
Christian Kamm
fef0f746ff
ts: Change target health ratio in getMaxSourceForTokenSwap ( #187 )
2022-08-20 12:20:34 +02:00
Christian Kamm
1132853aab
Merge remote-tracking branch 'origin/main' into dev
2022-08-20 11:13:55 +02:00