Added more text to AccountScout descriptions.
This commit is contained in:
parent
3d6f24aee9
commit
081ca5d599
|
@ -2,7 +2,7 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "strange-sugar",
|
||||
"id": "signal-latter",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# ⚠ Warning\n",
|
||||
|
@ -12,19 +12,32 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "flexible-sector",
|
||||
"id": "manual-williams",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# 🥭 AccountScout [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/OpinionatedGeek%2Fmango-explorer/HEAD?filepath=AccountScout.ipynb)\n",
|
||||
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gl/OpinionatedGeek%2Fmango-explorer/HEAD?filepath=AccountScout.ipynb)\n",
|
||||
"# 🥭 AccountScout\n",
|
||||
"\n",
|
||||
"_🏃♀️ To run this notebook press the ⏩ icon in the toolbar above._\n",
|
||||
"\n",
|
||||
"If you want to run this code to check a user account, skip down to the **Running** section below and follow the instructions there.\n",
|
||||
"\n",
|
||||
"(A 'user account' here is the root SOL account for a user - the one you have the private key for, and the one that owns sub-accounts.)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "advised-surgery",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Required Accounts\n",
|
||||
"\n",
|
||||
"Mango Markets code expects some accounts to be present, and if they're not present some actions can fail.\n",
|
||||
"\n",
|
||||
"From Daffy on Discord:\n",
|
||||
"```\n",
|
||||
"You need an open orders account for each of the spot markets Mango. And you need a token account for each of the tokens.\n",
|
||||
"```\n",
|
||||
"From [Daffy on Discord](https://discord.com/channels/791995070613159966/820390560085835786/834024719958147073):\n",
|
||||
"\n",
|
||||
"> You need an open orders account for each of the spot markets Mango. And you need a token account for each of the tokens.\n",
|
||||
"\n",
|
||||
"This notebook (and the `AccountScout` class) can be used to check the required accounts are present and maybe in future set up all the required accounts.\n",
|
||||
"\n",
|
||||
"(There's no reason not to write the code to fix problems and create any missing accounts. It just hasn't been done yet.)\n"
|
||||
|
@ -33,7 +46,7 @@
|
|||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "capital-vegetable",
|
||||
"id": "multiple-knife",
|
||||
"metadata": {
|
||||
"jupyter": {
|
||||
"source_hidden": true
|
||||
|
@ -53,16 +66,18 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "stretch-check",
|
||||
"id": "detected-prairie",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# AccountScout class"
|
||||
"# ScoutReport class\n",
|
||||
"\n",
|
||||
"The `ScoutReport` class is built up by the `AccountScout` to report errors, warnings and details pertaining to a user account."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "pointed-cologne",
|
||||
"id": "hungry-bridal",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -120,8 +135,28 @@
|
|||
"»\"\"\"\n",
|
||||
"\n",
|
||||
" def __repr__(self) -> str:\n",
|
||||
" return f\"{self}\"\n",
|
||||
" return f\"{self}\"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "better-forge",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# AccountScout class\n",
|
||||
"\n",
|
||||
"The `AccountScout` class aims to run various checks against a user account to make sure it is in a position to run the liquidator.\n",
|
||||
"\n",
|
||||
"Passing all checks here with no errors will be a precondition on liquidator startup."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "variable-season",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"class AccountScout:\n",
|
||||
" def __init__(self):\n",
|
||||
" pass\n",
|
||||
|
@ -193,12 +228,12 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "listed-bundle",
|
||||
"id": "careful-miniature",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Running\n",
|
||||
"\n",
|
||||
"You can run the following cell to check any account to make sure it has the proper sub-accounts set up and available.\n",
|
||||
"You can run the following cell to check any user account to make sure it has the proper sub-accounts set up and available.\n",
|
||||
"\n",
|
||||
"Enter the public key of the account you want to verify in the value for `ACCOUNT_TO_VERIFY` in the box below, between the double-quote marks. Then run the notebook by choosing 'Run > Run All Cells' from the notebook menu at the top of the page."
|
||||
]
|
||||
|
@ -206,7 +241,7 @@
|
|||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "social-intermediate",
|
||||
"id": "formal-accreditation",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -216,7 +251,7 @@
|
|||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ideal-defeat",
|
||||
"id": "coupled-worship",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
|
Loading…
Reference in New Issue