MCPcopy Create free account

hub / github.com/Bonfida/dex-v4 / functions

Functions259 in github.com/Bonfida/dex-v4

↓ 31 callersFunctionsign_send_instructions
( ctx: &mut ProgramTestContext, instructions: Vec<Instruction>, signers: Vec<&Keypair>, )
program/tests/common/utils.rs:17
↓ 29 callersFunctioncheck_account_key
Safety verification functions
program/src/utils.rs:12
↓ 29 callersFunctionrandom
(min: number, max: number, int?: boolean)
js/tests/utils/random.ts:1
↓ 28 callersMethodretrieve
(connection: Connection, market: PublicKey)
js/src/state.ts:115
↓ 22 callersFunctioncheck_account_owner
( account: &AccountInfo, owner: &Pubkey, error: DexError, )
program/src/utils.rs:23
↓ 19 callersFunctionplaceOrder
( market: Market, side: Side, limitPrice: number, size: number, type: OrderType, selfTradeBehaviou
js/src/bindings.ts:174
↓ 14 callersMethodfrom
(e: DexError)
program/src/error.rs:63
↓ 12 callersFunctioncomputeFp32Price
(market: Market, uiPrice: number)
js/src/utils.ts:47
↓ 12 callersFunctioncreate_associated_token
( prg_test_ctx: &mut ProgramTestContext, mint: &Pubkey, owner: &Pubkey, )
program/tests/common/utils.rs:32
↓ 12 callersMethodload
* * @param connection The solana connection object to the RPC node * @param address Address of the Serum market to load * @param programId Pr
js/src/market.ts:160
↓ 11 callersFunctionprocess
( program_id: &Pubkey, accounts: &[AccountInfo], instruction_data: &[u8], )
program/src/processor/swap.rs:163
↓ 10 callersMethodgetInstruction
( programId: PublicKey, splTokenProgram: PublicKey, systemProgram: PublicKey, market: PublicKe
js/src/raw_instructions.ts:727
↓ 9 callersFunctionsettle
( market: Market, owner: PublicKey, destinationBaseAccount: PublicKey, destinationQuoteAccount: Public
js/src/bindings.ts:315
↓ 7 callersFunctioncheck_signer
(account: &AccountInfo)
program/src/utils.rs:34
↓ 7 callersFunctioncreateContext
( connection: Connection, feePayer: Keypair, tickSize: BN, minBaseOrderSize: BN, baseDecimals: numbe
js/tests/utils/context.ts:21
↓ 6 callersFunctioncomputeTakerFee
(orderSize: BN)
js/tests/utils/fee.ts:4
↓ 6 callersFunctionconsumeEvents
( market: Market, rewardTarget: PublicKey, userAccounts: PublicKey[], maxIterations: BN, noOpErr: BN
js/src/bindings.ts:356
↓ 6 callersFunctioncreate_serum_dex_account
( pgr_test_ctx: &ProgramTestContext, serum_program_id: Pubkey, unpadded_len: usize, )
program/tests/common/performance_test_utils.rs:381
↓ 6 callersFunctionsimpleTrade
( connection: Connection, feePayer: Keypair, baseDecimals: number, quoteDecimals: number, minPrice:
js/tests/simple-trade.ts:26
↓ 5 callersMethod_sendTransaction
* * @param connection The solana connection object to the RPC node * @param transaction The transaction to sign and send * @param signers The
js/src/market.ts:521
↓ 5 callersFunctioncheckTokenBalances
( connection: Connection, tokenAccount: PublicKey, expected: BN )
js/tests/utils/token-balances.ts:6
↓ 5 callersFunctioninitializeAccount
( market: PublicKey, owner: PublicKey, maxOrders = 20, feePayer?: PublicKey, programId = DEX_ID )
js/src/bindings.ts:281
↓ 5 callersFunctioninitializeTraders
( connection: Connection, base: TokenMint, quote: TokenMint, Alice: Keypair, Bob: Keypair, feePaye
js/tests/utils/context.ts:125
↓ 5 callersMethodloadAsks
* * @param connection The solana connection object to the RPC node * @returns The decoded asks of the market
js/src/market.ts:336
↓ 5 callersMethodloadBids
* * @param connection The solana connection object to the RPC node * @returns The decoded bids of the market
js/src/market.ts:326
↓ 5 callersMethodparseAsksSlab
(slab: Slab, depth: number)
js/src/market.ts:774
↓ 5 callersMethodparseBidsSlab
(slab: Slab, depth: number)
js/src/market.ts:777
↓ 5 callersMethodtaker_fee
(self, quote_qty: u64)
program/src/state.rs:417
↓ 4 callersFunctioncancelOrder
( market: Market, owner: PublicKey, orderId: BN, orderIndex?: BN, clientOrderId?: BN )
js/src/bindings.ts:243
↓ 4 callersFunctioncloseAccount
( market: PublicKey, owner: PublicKey, programId = DEX_ID )
js/src/bindings.ts:381
↓ 4 callersFunctiondivideBnToNumber
(numerator: BN, denominator: BN)
js/src/utils.ts:39
↓ 4 callersFunctionfp32_mul
a is fp0, b is fp32 and result is a*b fp0
program/src/utils.rs:51
↓ 4 callersFunctionmint_bootstrap
( address: Option<&str>, decimals: u8, program_test: &mut ProgramTest, mint_authority: &Pubkey
program/tests/common/utils.rs:48
↓ 4 callersFunctionnew_order
( program_id: Pubkey, accounts: new_order::Accounts<Pubkey>, params: new_order::Params, )
program/src/instruction_auto.rs:167
↓ 4 callersMethodreferral_fee
(self, quote_qty: u64)
program/src/state.rs:428
↓ 4 callersFunctionswapTest
( connection: Connection, feePayer: Keypair, baseDecimals: number, quoteDecimals: number, minPrice:
js/tests/swap.ts:18
↓ 3 callersFunctioncheck_metadata_account
(account: &AccountInfo, mint: &Pubkey)
program/src/utils.rs:66
↓ 3 callersFunctionconsume_events
Crank the processing of DEX events.
program/src/instruction_auto.rs:191
↓ 3 callersFunctiongetMetadataKeyFromMint
(mint: PublicKey)
js/src/metadata.ts:8
↓ 3 callersFunctionorderbookTest
( connection: Connection, feePayer: Keypair, baseDecimals: number, quoteDecimals: number, minPrice:
js/tests/orderbook.ts:22
↓ 3 callersMethodtaker_rate
(self)
program/src/state.rs:391
↓ 3 callersFunctionthrowIfNull
( value: T | null, message = "account not found" )
js/src/utils.ts:5
↓ 3 callersMethodunscale_order_summary
(&self, order_summary: &mut OrderSummary)
program/src/state.rs:129
↓ 2 callersMethod_parseSlab
(slab: Slab, depth: number, increasing: boolean)
js/src/market.ts:761
↓ 2 callersFunctioncheck_vault_account_and_get_mint
( account: &AccountInfo, market_signer: &Pubkey, )
program/src/processor/create_market.rs:211
↓ 2 callersFunctioncloseMarket
(market: Market, target: PublicKey)
js/src/bindings.ts:454
↓ 2 callersFunctionclose_account
Close an inactive and fully settled account
program/src/instruction_auto.rs:223
↓ 2 callersFunctioncomputeUiPrice
(market: Market, fp32Price: BN)
js/src/utils.ts:65
↓ 2 callersFunctioncreate_aob_market_and_accounts
Creates the accounts needed for the AAOB market testing and returns the address of the market.
program/tests/common/utils.rs:88
↓ 2 callersFunctioncreate_market
Create a new DEX market The asset agnostic orderbook must be properly initialized beforehand.
program/src/instruction_auto.rs:159
↓ 2 callersMethodfilterForOpenOrdersFromSlab
* * @param slab Slab to extract open orders from * @param openOrders Open orders account * @returns
js/src/market.ts:720
↓ 2 callersFunctiongetFeeTier
(msrmBalance: number, srmBalance: number)
js/src/fees.ts:55
↓ 2 callersFunctiongetMintDecimals
( connection: Connection, mint: PublicKey )
js/src/utils.ts:15
↓ 2 callersFunctioninitialize_account
Initialize a new user account
program/src/instruction_auto.rs:207
↓ 2 callersMethodloadSlab
* * @param connection The solana connection object to the RPC node * @param slabAddress The address of the Slab * @returns A deserialized Sla
js/src/orderbook.ts:61
↓ 2 callersMethodmakeCancelOrderInstruction
* * @param orderIndex The index of the order in the open order account * @param owner The owner of the order * @returns
js/src/market.ts:545
↓ 2 callersMethodparse
( program_id: &Pubkey, accounts: &'a [AccountInfo<'b>], has_discount_token_account: bo
program/src/processor/swap.rs:109
↓ 2 callersMethodremove_order
(&mut self, order_index: usize)
program/src/state.rs:260
↓ 2 callersMethodremove_taker_fee
(self, quote_qty: u64)
program/src/state.rs:412
↓ 2 callersMethodscale_base_amount
(&self, raw_base_amount: u64)
program/src/state.rs:117
↓ 2 callersMethodscale_quote_amount
(&self, raw_quote_amount: u64)
program/src/state.rs:113
↓ 2 callersFunctionsweepFees
( connection: Connection, market: Market, destination: PublicKey, feePayer: PublicKey )
js/src/bindings.ts:479
↓ 2 callersMethodunscale_base_amount
(&self, scaled_base_amount: u64)
program/src/state.rs:125
↓ 2 callersFunctionverify_metadata
(creators: &[Creator])
program/src/utils.rs:97
↓ 1 callersFunctionabortTx
()
js/tests/self-trade.ts:150
↓ 1 callersMethodadd_order
(&mut self, order: Order)
program/src/state.rs:272
↓ 1 callersFunctionaob_dex_new_order
( pgr_test_ctx: &mut ProgramTestContext, dex_test_ctx: &AobDexTestContext, side: asset_agnostic_or
program/tests/common/performance_test_utils.rs:399
↓ 1 callersMethodbaseSplSizeToNumber
Returns the base token multiplier
js/src/market.ts:312
↓ 1 callersFunctioncheck_accounts
( program_id: &Pubkey, market_state: &DexState, accounts: &Accounts<AccountInfo>, )
program/src/processor/close_market.rs:206
↓ 1 callersFunctioncheck_accounts
(market_state: &DexState, accounts: &Accounts<AccountInfo>)
program/src/processor/new_order.rs:437
↓ 1 callersFunctioncheck_accounts
( program_id: &Pubkey, market_state: &DexState, accounts: &Accounts<AccountInfo>, )
program/src/processor/swap.rs:390
↓ 1 callersFunctioncheck_accounts
(market_state: &DexState, accounts: &Accounts<AccountInfo>)
program/src/processor/cancel_order.rs:204
↓ 1 callersFunctioncheck_accounts
( program_id: &Pubkey, market_state: &DexState, accounts: &Accounts<AccountInfo>, )
program/src/processor/settle.rs:172
↓ 1 callersFunctioncheck_accounts
( program_id: &Pubkey, market_state: &DexState, accounts: &Accounts<AccountInfo>, )
program/src/processor/sweep_fees.rs:186
↓ 1 callersFunctioncheck_accounts
(market_state: &DexState, accounts: &Accounts<AccountInfo>)
program/src/processor/consume_events.rs:147
↓ 1 callersFunctioncheck_rent
(accounts: &Accounts<'a, AccountInfo>)
program/src/processor/create_market.rs:227
↓ 1 callersFunctioncomputeRoyalties
(orderSize: BN, royalties: BN)
js/tests/utils/fee.ts:10
↓ 1 callersFunctionconsume_event
( accounts: &[AccountInfo], event: EventRef<CallBackInfo>, market_state: &mut DexState, )
program/src/processor/consume_events.rs:156
↓ 1 callersMethodconsume_events_iteration
( &self, connection: &RpcClient, orderbook: &MarketState, market_state: &DexSt
cranker/src/lib.rs:62
↓ 1 callersMethodcrank
(self)
cranker/src/lib.rs:40
↓ 1 callersFunctioncreateMarket
( connection: Connection, baseMint: PublicKey, quoteMint: PublicKey, minBaseOrderSize: BN, feePayer:
js/src/bindings.ts:56
↓ 1 callersFunctioncreateMarketTest
( connection: Connection, feePayer: Keypair )
js/tests/create-market.ts:13
↓ 1 callersFunctioncreate_aob_dex
Creates an aob dex market along with all needed accounts Returns Dex market state pubkey, user account key, and test context
program/tests/common/performance_test_utils.rs:63
↓ 1 callersFunctiondev
()
js/src/test.ts:26
↓ 1 callersFunctionerror
(connection: Connection, feePayer: Keypair)
js/tests/error.ts:18
↓ 1 callersFunctionfailCloseAccount
()
js/tests/error.ts:122
↓ 1 callersFunctionfailConsumeEvent
()
js/tests/error.ts:77
↓ 1 callersFunctionfailOrder
()
js/tests/error.ts:50
↓ 1 callersFunctionfailPostOnly
()
js/tests/error.ts:105
↓ 1 callersMethodfilterForOpenOrders
* * @param orderbook The orderbook of the market * @param openOrder The openOrder that owns the orders * @returns
js/src/market.ts:745
↓ 1 callersMethodfindOpenOrdersAccountForOwner
* Fetch the open order account of the owner * @param owner The public key of the owner * @returns The public key of the open order account
js/src/market.ts:393
↓ 1 callersMethodfind_order_id_and_index_by_client_id
( &self, client_order_id: u128, )
program/src/state.rs:295
↓ 1 callersMethodfind_order_index
(&self, order_id: u128)
program/src/state.rs:283
↓ 1 callersFunctionfp32_div
a is fp0, b is fp32 and result is a/b fp0
program/src/utils.rs:44
↓ 1 callersMethodget
( account_info: &'a AccountInfo<'b>, )
program/src/state.rs:96
↓ 1 callersFunctiongetFilter
(mint: string)
js/src/test.ts:9
↓ 1 callersFunctiongetTokenBalance
( connection: Connection, address: PublicKey )
js/src/utils.ts:27
↓ 1 callersMethodget_quote_from_base
( &self, raw_base_amount: u64, scaled_price_fp32: u64, )
program/src/state.rs:137
↓ 1 callersFunctioninitializePayer
( connection: Connection )
js/tests/utils/validator.ts:25
↓ 1 callersFunctioninitialize_serum_market_accounts
( pgr_test_ctx: &mut ProgramTestContext, aob_dex_test_ctx: &AobDexTestContext, serum_dex_program_i
program/tests/common/performance_test_utils.rs:268
next →1–100 of 259, ranked by callers