cleaned up package json
This commit is contained in:
parent
f728a4f64f
commit
f5b63351e0
|
@ -31,7 +31,7 @@
|
||||||
"typescript": "^4.0.5"
|
"typescript": "^4.0.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mango/client": "git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#srm_account",
|
"@blockworks-foundation/mango-client": "^0.1.4",
|
||||||
"@project-serum/serum": "^0.13.20",
|
"@project-serum/serum": "^0.13.20",
|
||||||
"@solana/spl-token": "0.0.13",
|
"@solana/spl-token": "0.0.13",
|
||||||
"@solana/web3.js": "^0.90.0",
|
"@solana/web3.js": "^0.90.0",
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
import { IDS, MangoClient, MarginAccount, NUM_TOKENS } from '@mango/client';
|
import { IDS, MangoClient, MarginAccount, NUM_MARKETS } from '@blockworks-foundation/mango-client';
|
||||||
|
|
||||||
import { Account, Connection, PublicKey, TransactionSignature } from '@solana/web3.js';
|
import { Account, Connection, PublicKey } from '@solana/web3.js';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import { Market } from '@project-serum/serum';
|
import { Market } from '@project-serum/serum';
|
||||||
import { NUM_MARKETS } from '@mango/client/lib/layout';
|
|
||||||
import { sleep } from './utils';
|
import { sleep } from './utils';
|
||||||
|
|
||||||
async function setupMarginAccounts() {
|
async function setupMarginAccounts() {
|
||||||
|
|
|
@ -1,23 +1,20 @@
|
||||||
// TODO make sure funds in liquidatable account can actually be withdrawn
|
|
||||||
// -- can't be withdrawn if total deposits == total_borrows
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
findLargestTokenAccountForOwner,
|
||||||
getMultipleAccounts,
|
getMultipleAccounts,
|
||||||
IDS,
|
IDS,
|
||||||
MangoClient,
|
MangoClient,
|
||||||
MangoGroup,
|
MangoGroup,
|
||||||
MarginAccount,
|
MarginAccount,
|
||||||
MarginAccountLayout, nativeToUi,
|
nativeToUi,
|
||||||
NUM_TOKENS, parseTokenAccountData,
|
NUM_MARKETS,
|
||||||
findLargestTokenAccountForOwner,
|
NUM_TOKENS,
|
||||||
} from '@mango/client';
|
parseTokenAccountData,
|
||||||
import { Account, Connection, LAMPORTS_PER_SOL, PublicKey, TransactionSignature } from '@solana/web3.js';
|
} from '@blockworks-foundation/mango-client';
|
||||||
|
import { Account, Connection, PublicKey, TransactionSignature } from '@solana/web3.js';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { Market, OpenOrders } from '@project-serum/serum';
|
import { Market } from '@project-serum/serum';
|
||||||
import { NUM_MARKETS } from '@mango/client/lib/layout';
|
import { sleep } from './utils';
|
||||||
import { getUnixTs, sleep } from './utils';
|
import { homedir } from 'os';
|
||||||
import { homedir } from 'os'
|
|
||||||
import { TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
|
||||||
|
|
||||||
|
|
||||||
async function drainAccount(
|
async function drainAccount(
|
||||||
|
|
19
src/test.ts
19
src/test.ts
|
@ -1,25 +1,28 @@
|
||||||
import {
|
import {
|
||||||
findLargestTokenAccountForOwner,
|
createAccountInstruction,
|
||||||
|
encodeMangoInstruction,
|
||||||
|
findLargestTokenAccountForOwner, getFilteredProgramAccounts,
|
||||||
IDS,
|
IDS,
|
||||||
MangoClient,
|
MangoClient,
|
||||||
MangoGroup,
|
MangoGroup,
|
||||||
MarginAccount,
|
MarginAccount,
|
||||||
MarginAccountLayout, nativeToUi,
|
MarginAccountLayout,
|
||||||
|
nativeToUi, NUM_MARKETS,
|
||||||
NUM_TOKENS,
|
NUM_TOKENS,
|
||||||
} from '@mango/client';
|
} from '@blockworks-foundation/mango-client';
|
||||||
import {
|
import {
|
||||||
Account,
|
Account,
|
||||||
Connection, LAMPORTS_PER_SOL,
|
Connection,
|
||||||
|
LAMPORTS_PER_SOL,
|
||||||
PublicKey,
|
PublicKey,
|
||||||
SYSVAR_RENT_PUBKEY,
|
SYSVAR_RENT_PUBKEY,
|
||||||
Transaction,
|
Transaction,
|
||||||
TransactionInstruction, TransactionSignature,
|
TransactionInstruction,
|
||||||
|
TransactionSignature,
|
||||||
} from '@solana/web3.js';
|
} from '@solana/web3.js';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import { getUnixTs, sleep } from './utils';
|
import { getUnixTs, sleep } from './utils';
|
||||||
import { createAccountInstruction, getFilteredProgramAccounts } from '@mango/client/lib/utils';
|
import { AccountLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
||||||
import { encodeMangoInstruction, NUM_MARKETS } from '@mango/client/lib/layout';
|
|
||||||
import { Token, MintLayout, AccountLayout, TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
|
||||||
import { homedir } from 'os';
|
import { homedir } from 'os';
|
||||||
import { Market } from '@project-serum/serum';
|
import { Market } from '@project-serum/serum';
|
||||||
|
|
||||||
|
|
25
yarn.lock
25
yarn.lock
|
@ -314,6 +314,19 @@
|
||||||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
|
||||||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
|
||||||
|
|
||||||
|
"@blockworks-foundation/mango-client@^0.1.4":
|
||||||
|
version "0.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-client/-/mango-client-0.1.4.tgz#76e2905696249626a79f67e4c6b81dc3513dc03e"
|
||||||
|
integrity sha512-vpXNWVQtJheezyWNqUXTSUwtcXnSlW4iPhbMJxWHl0Njz9bZFKEtEItWEiaNpxxA8FUDEwL5wKPiIioMvorg1w==
|
||||||
|
dependencies:
|
||||||
|
"@project-serum/serum" "^0.13.20"
|
||||||
|
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
||||||
|
"@solana/spl-token" "0.0.13"
|
||||||
|
"@solana/web3.js" "^0.90.0"
|
||||||
|
bn.js "^5.1.2"
|
||||||
|
borsh "https://github.com/defactojob/borsh-js#field-mapper"
|
||||||
|
buffer-layout "^1.2.0"
|
||||||
|
|
||||||
"@cnakazawa/watch@^1.0.3":
|
"@cnakazawa/watch@^1.0.3":
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a"
|
||||||
|
@ -524,18 +537,6 @@
|
||||||
"@types/yargs" "^15.0.0"
|
"@types/yargs" "^15.0.0"
|
||||||
chalk "^4.0.0"
|
chalk "^4.0.0"
|
||||||
|
|
||||||
"@mango/client@git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#srm_account":
|
|
||||||
version "0.1.2"
|
|
||||||
resolved "git+ssh://git@github.com:blockworks-foundation/mango-client-ts.git#ed8ef6c0f6740667f1f457107512f3c4ae505ff2"
|
|
||||||
dependencies:
|
|
||||||
"@project-serum/serum" "^0.13.20"
|
|
||||||
"@project-serum/sol-wallet-adapter" "^0.1.4"
|
|
||||||
"@solana/spl-token" "0.0.13"
|
|
||||||
"@solana/web3.js" "^0.90.0"
|
|
||||||
bn.js "^5.1.2"
|
|
||||||
borsh "https://github.com/defactojob/borsh-js#field-mapper"
|
|
||||||
buffer-layout "^1.2.0"
|
|
||||||
|
|
||||||
"@nodelib/fs.scandir@2.1.4":
|
"@nodelib/fs.scandir@2.1.4":
|
||||||
version "2.1.4"
|
version "2.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69"
|
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69"
|
||||||
|
|
Loading…
Reference in New Issue