Export base and quote wallet key indexes for settle funds instruction (#16)

Export base and quote wallet key indexes for settle funds instruction
This commit is contained in:
philippe-ftx 2020-09-11 16:47:34 +02:00 committed by GitHub
parent e40e0c8c99
commit 8153795ba2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,10 @@
export { Market, Orderbook, OpenOrders } from './market';
export { DexInstructions, decodeInstruction } from './instructions';
export {
DexInstructions,
decodeInstruction,
SETTLE_FUNDS_BASE_WALLET_INDEX,
SETTLE_FUNDS_QUOTE_WALLET_INDEX,
} from './instructions';
export { TOKEN_MINTS, MARKETS } from './tokens_and_markets';
export { decodeEventQueue, decodeRequestQueue } from './queue';
export * as TokenInstructions from './token-instructions';

View File

@ -10,6 +10,10 @@ import {
import { SYSVAR_RENT_PUBKEY, TransactionInstruction } from '@solana/web3.js';
import { TOKEN_PROGRAM_ID } from './token-instructions';
// NOTE: Update these if the position of arguments for the settleFunds instruction changes
export const SETTLE_FUNDS_BASE_WALLET_INDEX = 5;
export const SETTLE_FUNDS_QUOTE_WALLET_INDEX = 6;
export const INSTRUCTION_LAYOUT = new VersionedLayout(
0,
union(u32('instruction')),