Commit Graph

26 Commits

Author SHA1 Message Date
Geoff Taylor 888994424d Improved reporting of TokenValue and BalanceSheet, in line with V2 changes. 2021-06-26 18:24:07 +01:00
Geoff Taylor aac32ba716 Wallet can now be loaded from environment.
* Centralised configuration of Wallet from command-line
* Added loading Wallet from environment variables
* Improved command-line handling of many commands
2021-06-17 12:06:39 +01:00
Geoff Taylor 7078ef4722 Removed default context objects - now have static method on Context object: Context.default(). 2021-06-17 11:18:35 +01:00
Geoff Taylor 616d929e90 Removed context from Group, added name. Price lookups must now pass the context they want to use. 2021-06-08 08:17:37 +01:00
Geoff Taylor 5e59d8a7e3 Moved library code to .py files instead of notebooks.
* This is a big change that touched most files in the project.
* Library code is now an actual package, in /mango.
* Pure .py files used for shared code - easier to edit/debug, and should ease move to installable package later.
* Removed many notebooks. The remaining notebooks are useful 'display'/'show' notebooks for investigating Mango objects.
* More tests! The test story is now much improved, but more unit tests are still needed.
* There's now a Makefile for project operations.
2021-06-07 15:10:18 +01:00
Geoff Taylor f79315201d Added TransactionScout to show Mango transaction details. 2021-05-13 20:32:23 +01:00
Geoff Taylor 45d1599286 Fixed type in description text. 2021-05-12 15:02:18 +01:00
Geoff Taylor 4cfc87d420 Split BasketTokenMetadata up. Improved linting.
* Split BasketTokenMetadata into BasketToken and Token.
* Improved linting and mypy so it worked across files.
2021-05-11 19:24:02 +01:00
Geoff Taylor fb52fe3671 Tidied up reporting of balances before and after a liquidation. 2021-05-10 14:20:08 +01:00
Geoff Taylor fab0d909c2 Added 'dry run' option to commands that perform transactions. 2021-05-06 15:27:25 +01:00
Geoff Taylor 3db09e922c Added wallet balancing. Big changes throughout to support this. 2021-05-06 14:21:40 +01:00
Geoff Taylor 9ff7619985 Fixed problem with logging messages and token dereference. 2021-05-02 14:36:16 +01:00
Geoff Taylor 9881f5f3dc Removed debug cell from Liquidation notebook. 2021-05-01 10:17:23 +01:00
Geoff Taylor 6083eca622 Fixed linting problems with RPCErrors. 2021-04-29 17:20:46 +01:00
Geoff Taylor feda91156b Fixed problem where OpenOrders could show the wrong program ID in some circumstances. 2021-04-29 12:11:28 +01:00
Geoff Taylor f8738770f5 Expanded liquidation process and steps. 2021-04-28 18:36:48 +01:00
Geoff Taylor 1370e924f3 Added AccountLiquidator page and classes, separated out from Liquidation page. 2021-04-27 12:02:05 +01:00
Geoff Taylor acf2ff5da6 Renamed Classes.ipynb to BaseModel.ipynb. Adjusted all imports of it. 2021-04-27 09:41:22 +01:00
Geoff Taylor 1c6c81cc0d Added logging objects to classes. 2021-04-26 16:43:40 +01:00
Geoff Taylor add7f5648c Trying to be clearer about liquidation balances. 2021-04-26 16:02:53 +01:00
Geoff Taylor 5079995361 Pre-alpha: now tries to send PartialLiquidate transaction.
In addition:
* Fixed problem calculating balances
* Added References section to README
* Added user account test to AccountScout
* Tidied up Pandas DataFrame output
* Added balance output to ShowMyAccount
2021-04-23 18:15:44 +01:00
Geoff Taylor e067e4a988 Added running emoji (🏃) to Running headers. 2021-04-23 09:46:43 +01:00
Geoff Taylor 12c4dd1281 Added support links to every notebook. 2021-04-23 09:28:09 +01:00
Geoff Taylor 158e263242 Now builds Force Cancel and Partial Liquidate instructions. 2021-04-22 20:03:34 +01:00
Geoff Taylor 3928331cc3 Reformatted some header text and added TOC on all pages. 2021-04-22 14:28:32 +01:00
Geoff Taylor 3d6f24aee9 Working through liquidation, adding instructions.
- Moved AccountInfo to Context.ipynb to avoid dependency problems from Context to AccountInfo when Classes depends on Context
- Moved AccountInfo.load() operation into Context
- Expanded use of BalanceSheet - can now get a BalanceSheet for each token, either in native token ints or using current prices. Previous get_balance_sheet is now get_balance_sheet_totals()
- Changed Context's fetch_token_balance() to sum all token accounts with that mint and owner, not just pick the first one.
- Added Context.fetch_largest_token_account_for_owner() to efficiently pick a single token account from all those with the same owner and mint.
- Changed wallet file format and default filename to be more consistent with other Solana programs.
- Added an AccountScout notebook to verify an account has been setup properly for using the liquidator. It can print out a nice report as well.
- Added an Instructions notebook to gather the builders for the underlying instructions that will be sent to Solana.
- Added a Liquidation notebook to gather information about the liquidation process and as a place to add liquidation code in the future. (This is very rough.)
2021-04-22 13:19:34 +01:00