repo_id
stringclasses
279 values
file_path
stringlengths
43
179
content
stringlengths
1
4.18M
__index_level_0__
int64
0
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/state/fee_tier.rs
use crate::state::WhirlpoolsConfig; use crate::{errors::ErrorCode, math::MAX_FEE_RATE}; use anchor_lang::prelude::*; #[account] pub struct FeeTier { pub whirlpools_config: Pubkey, pub tick_spacing: u16, pub default_fee_rate: u16, } impl FeeTier { pub const LEN: usize = 8 + 32 + 4; pub fn initiali...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/state/position_bundle.rs
use crate::errors::ErrorCode; use anchor_lang::prelude::*; pub const POSITION_BITMAP_USIZE: usize = 32; pub const POSITION_BUNDLE_SIZE: u16 = 8 * POSITION_BITMAP_USIZE as u16; #[account] #[derive(Default)] pub struct PositionBundle { pub position_bundle_mint: Pubkey, // 32 pub position_bitmap: [u8; POSITION_B...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/state/position.rs
use anchor_lang::prelude::*; use crate::{errors::ErrorCode, math::FULL_RANGE_ONLY_TICK_SPACING_THRESHOLD, state::NUM_REWARDS}; use super::{Tick, Whirlpool}; #[derive(AnchorSerialize, AnchorDeserialize, Clone, Default, Copy)] pub struct OpenPositionBumps { pub position_bump: u8, } #[derive(AnchorSerialize, Ancho...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/state/tick.rs
use crate::errors::ErrorCode; use crate::state::NUM_REWARDS; use anchor_lang::prelude::*; use super::Whirlpool; // Max & min tick index based on sqrt(1.0001) & max.min price of 2^64 pub const MAX_TICK_INDEX: i32 = 443636; pub const MIN_TICK_INDEX: i32 = -443636; // We have two consts because most of our code uses it...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/swap_math.rs
use std::convert::TryInto; use crate::errors::ErrorCode; use crate::math::*; pub const NO_EXPLICIT_SQRT_PRICE_LIMIT: u128 = 0u128; #[derive(PartialEq, Debug)] pub struct SwapStepComputation { pub amount_in: u64, pub amount_out: u64, pub next_price: u128, pub fee_amount: u64, } pub fn compute_swap( ...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/tick_math.rs
use crate::math::u256_math::*; use std::convert::TryInto; // Max/Min sqrt_price derived from max/min tick-index pub const MAX_SQRT_PRICE_X64: u128 = 79226673515401279992447579055; pub const MIN_SQRT_PRICE_X64: u128 = 4295048016; const LOG_B_2_X32: i128 = 59543866431248i128; const BIT_PRECISION: u32 = 14; const LOG_B_...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/token_math.rs
use crate::errors::ErrorCode; use crate::math::{Q64_MASK, Q64_RESOLUTION}; use super::{ div_round_up_if, div_round_up_if_u256, mul_u256, U256Muldiv, MAX_SQRT_PRICE_X64, MIN_SQRT_PRICE_X64, }; // Fee rate is represented as hundredths of a basis point. // Fee amount = total_amount * fee_rate / 1_000_000. // Max...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/mod.rs
pub mod bit_math; pub mod bn; pub mod liquidity_math; pub mod swap_math; pub mod tick_math; pub mod token_math; pub mod u256_math; pub use bit_math::*; pub use bn::*; pub use liquidity_math::*; pub use swap_math::*; pub use tick_math::*; pub use token_math::*; pub use u256_math::*;
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/bit_math.rs
use crate::errors::ErrorCode; use super::U256Muldiv; pub const Q64_RESOLUTION: u8 = 64; pub const Q64_MASK: u128 = 0xFFFF_FFFF_FFFF_FFFF; pub const TO_Q64: u128 = 1u128 << Q64_RESOLUTION; pub fn checked_mul_div(n0: u128, n1: u128, d: u128) -> Result<u128, ErrorCode> { checked_mul_div_round_up_if(n0, n1, d, false...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/bn.rs
#![allow(clippy::assign_op_pattern)] #![allow(clippy::ptr_offset_with_cast)] #![allow(clippy::manual_range_contains)] /// The following code is referenced from drift-labs: /// https://github.com/drift-labs/protocol-v1/blob/3da78f1f03b66a273fc50818323ac62874abd1d8/programs/clearing_house/src/math/bn.rs /// /// Based on...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/u256_math.rs
use std::{ cmp::Ordering, fmt::{Display, Formatter, Result as FmtResult}, str::from_utf8_unchecked, }; use crate::errors::ErrorCode; const NUM_WORDS: usize = 4; #[derive(Copy, Clone, Debug)] pub struct U256Muldiv { pub items: [u64; NUM_WORDS], } impl U256Muldiv { pub fn new(h: u128, l: u128) -> ...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/math/liquidity_math.rs
use crate::errors::ErrorCode; // Adds a signed liquidity delta to a given integer liquidity amount. // Errors on overflow or underflow. pub fn add_liquidity_delta(liquidity: u128, delta: i128) -> Result<u128, ErrorCode> { if delta == 0 { return Ok(liquidity); } if delta > 0 { liquidity ...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/tick_manager.rs
use crate::{ errors::ErrorCode, math::add_liquidity_delta, state::{Tick, TickUpdate, WhirlpoolRewardInfo, NUM_REWARDS}, }; pub fn next_tick_cross_update( tick: &Tick, fee_growth_global_a: u128, fee_growth_global_b: u128, reward_infos: &[WhirlpoolRewardInfo; NUM_REWARDS], ) -> Result<TickUpd...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/liquidity_manager.rs
use super::{ position_manager::next_position_modify_liquidity_update, tick_manager::{ next_fee_growths_inside, next_reward_growths_inside, next_tick_modify_liquidity_update, }, whirlpool_manager::{next_whirlpool_liquidity, next_whirlpool_reward_infos}, }; use crate::{ errors::ErrorCode, ...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/mod.rs
pub mod liquidity_manager; pub mod position_manager; pub mod swap_manager; pub mod tick_manager; pub mod whirlpool_manager;
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/whirlpool_manager.rs
use crate::errors::ErrorCode; use crate::math::{add_liquidity_delta, checked_mul_div}; use crate::state::*; // Calculates the next global reward growth variables based on the given timestamp. // The provided timestamp must be greater than or equal to the last updated timestamp. pub fn next_whirlpool_reward_infos( ...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/position_manager.rs
use crate::{ errors::ErrorCode, math::{add_liquidity_delta, checked_mul_shift_right}, state::{Position, PositionUpdate, NUM_REWARDS}, }; pub fn next_position_modify_liquidity_update( position: &Position, liquidity_delta: i128, fee_growth_inside_a: u128, fee_growth_inside_b: u128, reward...
0
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/manager/swap_manager.rs
use solana_program::msg; use crate::{ errors::ErrorCode, manager::{ tick_manager::next_tick_cross_update, whirlpool_manager::next_whirlpool_reward_infos, }, math::*, state::*, util::SwapTickSequence, }; use anchor_lang::prelude::*; use std::convert::TryInto; #[derive(Debug)] pub struct...
0
solana_public_repos/orca-so/whirlpools
solana_public_repos/orca-so/whirlpools/examples/README.md
# Whirlpools SDK Examples This directory contains example projects showcasing how to use the Whirlpools SDK suite in different environments. Each project demonstrates specific functionalities, providing a starting point for developers. ## Building the Examples To build the examples, run the following commands from th...
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/next.config.js
import NextBundleAnalyzer from "@next/bundle-analyzer"; import CopyWebpackPlugin from "copy-webpack-plugin"; const nextConfig = { serverExternalPackages: ["@orca-so/whirlpools-core"], webpack(config, { isServer }) { config.experiments.asyncWebAssembly = true; // Copy `orca_whirlpools_core_js_bindings_bg.w...
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/next-env.d.ts
/// <reference types="next" /> /// <reference types="next/image-types/global" /> // NOTE: This file should not be edited // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/README.md
# Whirlpools Next.js Example This example demonstrates how to use the Whirlpools SDK in a Next.js application. Since the Orca SDK suite uses WebAssembly, the `experiments.asyncWebAssembly` feature of webpack must be enabled and `@orca-so/whirlpools-core` needs to be added as a `serverExternalPackages`. See `next.confi...
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/package.json
{ "name": "@orca-so/whirlpools-example-ts-next", "version": "0.1.0", "type": "module", "scripts": { "start": "next dev", "build": "next build", "clean": "rimraf .next" }, "dependencies": { "@orca-so/whirlpools": "*", "@solana/web3.js": "^2.0.0", "next": "^15.1.0", "react": "^18.3...
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/tsconfig.json
{ "extends": "../../../tsconfig.json", "compilerOptions": { "outDir": "./dist", "jsx": "preserve", "plugins": [ { "name": "next" } ], "noEmit": true, "incremental": true }, "include": ["next-env.d.ts", ".next/types/**/*.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node...
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/app/layout.tsx
import { ReactNode } from "react"; export default function RootLayout({ children }: { children: ReactNode }) { return ( <html lang="en"> <body>{children}</body> </html> ); }
0
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next
solana_public_repos/orca-so/whirlpools/examples/ts-sdk/next/app/page.tsx
"use client"; import { fetchPositionsForOwner, PositionOrBundle } from "@orca-so/whirlpools"; import { tickIndexToSqrtPrice } from "@orca-so/whirlpools-core"; import { useCallback, useMemo, useState } from "react"; import { createSolanaRpc, mainnet, address, devnet } from "@solana/web3.js"; export default function Pag...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/Cargo.toml
[package] name = "whirlpool_repositioning_bot" version = "0.1.0" edition = "2021" [dependencies] clap = { version = "^4.5.21", features = ["derive"] } colored = { version = "^2.0" } orca_whirlpools = { path = '../../../rust-sdk/whirlpool' } orca_whirlpools_client = { path = '../../../rust-sdk/client' } orca_whirlpools...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/README.md
# Whirlpool Repositioning Bot A Rust-based CLI bot for interacting with the Orca Whirlpools program on Solana. This bot monitors and rebalances a liquidity position by closing and reopening positions when price deviations exceed a user-defined threshold. --- ## Features - **Automated Position Monitoring**: Monitors p...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/.env.template
RPC_URL="https://api.mainnet-beta.solana.com"
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/package.json
{ "name": "@orca-so/whirlpools-example-rust-repositioning-bot", "version": "0.0.1", "scripts": { "build": "cargo build", "format": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt", "lint": "cargo clippy && cargo fmt --check", "clean": "cargo clean" }, "devDependencies": { "@o...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/src/wallet.rs
use solana_sdk::{signature::Keypair, signer::Signer}; use std::fs; pub fn load_wallet() -> Box<dyn Signer> { let wallet_string = fs::read_to_string("wallet.json").unwrap(); let keypair_bytes: Vec<u8> = serde_json::from_str(&wallet_string).unwrap(); let wallet = Keypair::from_bytes(&keypair_bytes).unwrap();...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/src/main.rs
mod cli; mod position_manager; mod utils; mod wallet; use clap::Parser; use cli::Args; use colored::Colorize; use dotenv::dotenv; use orca_whirlpools::{set_funder, set_whirlpools_config_address, WhirlpoolsConfigInput}; use orca_whirlpools_client::get_position_address; use position_manager::run_position_manager; use so...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/src/position_manager.rs
use crate::{ cli::Args, utils::{ display_position_balances, display_wallet_balances, fetch_position, fetch_whirlpool, send_transaction, }, }; use colored::Colorize; use orca_whirlpools::{ close_position_instructions, open_position_instructions, IncreaseLiquidityParam, }; use orca_whirlpo...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/src/utils.rs
use clap::ValueEnum; use orca_whirlpools::close_position_instructions; use orca_whirlpools_client::{Position, Whirlpool}; use solana_client::nonblocking::rpc_client::RpcClient; use solana_client::rpc_config::RpcSendTransactionConfig; use solana_sdk::commitment_config::CommitmentLevel; use solana_sdk::compute_budget::Co...
0
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot
solana_public_repos/orca-so/whirlpools/examples/rust-sdk/whirlpool_repositioning_bot/src/cli.rs
use clap::Parser; use crate::utils::PriorityFeeTier; #[derive(Parser, Debug)] #[command(author, version, about, long_about = None)] pub struct Args { #[arg( short = 'p', long, help = "The position mint address to monitor and rebalance." )] pub position_mint_address: String, #[...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/README.md
# Setting up your script environment ```bash yarn ``` # Set your RPC and wallet ```bash export ANCHOR_PROVIDER_URL=<RPC URL> export ANCHOR_WALLET=<WALLET JSON PATH> ``` Example: ```bash export ANCHOR_PROVIDER_URL=http://localhost:8899 export ANCHOR_WALLET=~/.config/solana/id.json ``` # Supported commands Token-2022 ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/package.json
{ "name": "@orca-so/whirlpools-sdk-cli", "private": true, "version": "1.0.0", "type": "module", "scripts": { "build": "tsc --noEmit", "start": "tsx src/index.ts" }, "dependencies": { "@coral-xyz/anchor": "0.29.0", "@orca-so/common-sdk": "0.6.4", "@orca-so/orca-sdk": "0.2.0", "@orca...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/tsconfig.json
{ "extends": "../../tsconfig.json", "compilerOptions": { "module": "ESNext", "outDir": "./dist" }, "include": ["./src/**/*.ts"] }
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/index.ts
import { readdirSync } from "fs"; import { promptChoice } from "./utils/prompt"; import { toSnakeCase } from "js-convert-case"; const commands = readdirSync("./src/commands") .filter((file) => file.endsWith(".ts")) .map((file) => file.replace(".ts", "")) .map((file) => ({ title: file, value: () => import...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/utils/transaction_sender.ts
import type { Keypair, VersionedTransaction } from "@solana/web3.js"; import { ComputeBudgetProgram, LAMPORTS_PER_SOL } from "@solana/web3.js"; import { DecimalUtil, TransactionBuilder, estimateComputeBudgetLimit, } from "@orca-so/common-sdk"; import Decimal from "decimal.js"; import base58 from "bs58"; import { ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/utils/prompt.ts
import prompt from "prompts"; export async function promptText( message: string, initial?: string, ): Promise<string> { const response = (await prompt({ type: "text", name: "text", message, initial, })) as { text: string }; if (Object.keys(response).length === 0) { throw new Error("Prompt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/utils/deposit_ratio.ts
import { PriceMath } from "@orca-so/whirlpools-sdk"; import BN from "bn.js"; export function calcDepositRatio( currSqrtPriceX64: BN, lowerSqrtPriceX64: BN, upperSqrtPriceX64: BN, decimalsA: number, decimalsB: number, ): [number, number] { const clampedSqrtPriceX64 = BN.min( BN.max(currSqrtPriceX64, low...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/utils/provider.ts
import { AnchorProvider } from "@coral-xyz/anchor"; import { ORCA_WHIRLPOOL_PROGRAM_ID, WhirlpoolContext, } from "@orca-so/whirlpools-sdk"; // export ANCHOR_PROVIDER_URL=http://localhost:8899 // export ANCHOR_WALLET=~/.config/solana/id.json export const provider = AnchorProvider.env(); console.info("connection en...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_token_badge.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../uti...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/collect_rewards.ts
import { PublicKey } from "@solana/web3.js"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, TickArrayUtil, PoolUtil, collectRewardsQuote, } from "@orca-so/whirlpools-sdk"; import { DecimalUtil, TransactionBuilder } from "@orca-so/common-sdk"; import { getAssociatedTokenAddressSync } from "@solana...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_config_extension.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptText } from "../utils/prompt"; co...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_default_protocol_fee_rate.ts
import { TransactionBuilder } from "@orca-so/common-sdk"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { PublicKey } from "@solana/web3.js"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptText } from "../utils/prompt"; const whirl...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_reward_authority.ts
import { PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../utils/prompt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_fee_tier.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptText } from "../utils/prompt"; co...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/delete_token_badge.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../uti...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_collect_protocol_fees_authority.ts
import { PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../utils/prompt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_reward_emissions_super_authority.ts
import { PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../utils/prompt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_config.ts
import { Keypair, PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptText } from "../utils/prompt"; co...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_tick_array.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx, PriceMath, TickUtil, TICK_ARRAY_SIZE, IGNORE_CACHE, } from "@orca-so/whirlpools-sdk"; import type { PDA } from "@orca-so/common-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import type Decimal from "decimal.js"; i...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/push_price.ts
import { PublicKey } from "@solana/web3.js"; import type { SwapV2Params } from "@orca-so/whirlpools-sdk"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, PriceMath, TICK_ARRAY_SIZE, MAX_TICK_INDEX, MIN_TICK_INDEX, SwapUtils, IGNORE_CACHE, swapQuoteWithParams, TokenExtensionUtil, PREFER...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/open_position.ts
import { Keypair, PublicKey } from "@solana/web3.js"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, PriceMath, TickUtil, } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { getAssociatedTokenAddressSync, TOKEN_2022_PROGRAM_ID, } from "@solana/sp...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_reward.ts
import { PublicKey, Keypair } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx, PoolUtil } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { TOKEN_2022_PROGRAM_ID } from "@solana/spl-token"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/initialize_whirlpool.ts
import { Keypair, PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx, PoolUtil, PriceMath, } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { TOKEN_2022_PROGRAM_ID } from "@solana/spl-token"; import { sendTransaction } from "../utils/transaction_s...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_token_badge_authority.ts
import { PublicKey } from "@solana/web3.js"; import { PDAUtil, WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../uti...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/collect_fees.ts
import { PublicKey } from "@solana/web3.js"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, collectFeesQuote, TickArrayUtil, } from "@orca-so/whirlpools-sdk"; import { DecimalUtil, TransactionBuilder } from "@orca-so/common-sdk"; import { getAssociatedTokenAddressSync } from "@solana/spl-token"; im...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/decrease_liquidity.ts
import { PublicKey } from "@solana/web3.js"; import type { DecreaseLiquidityQuote } from "@orca-so/whirlpools-sdk"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, PoolUtil, PriceMath, IGNORE_CACHE, decreaseLiquidityQuoteByLiquidityWithParams, } from "@orca-so/whirlpools-sdk"; import { Decimal...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/increase_liquidity.ts
import { PublicKey } from "@solana/web3.js"; import type { IncreaseLiquidityQuote } from "@orca-so/whirlpools-sdk"; import { ORCA_WHIRLPOOL_PROGRAM_ID, PDAUtil, WhirlpoolIx, PoolUtil, PriceMath, increaseLiquidityQuoteByInputTokenWithParams, IGNORE_CACHE, } from "@orca-so/whirlpools-sdk"; import { Decima...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/close_position.ts
import { PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { getAssociatedTokenAddressSync, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import { sendTransaction } from "../utils/trans...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/set_fee_authority.ts
import { PublicKey } from "@solana/web3.js"; import { WhirlpoolIx } from "@orca-so/whirlpools-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { sendTransaction } from "../utils/transaction_sender"; import { ctx } from "../utils/provider"; import { promptConfirm, promptText } from "../utils/prompt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/todo/initializeTickArrayRange
import type { PDA} from "@orca-so/common-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import type { AccountFetcher, WhirlpoolData} from "@orca-so/whirlpools-sdk"; import { MAX_TICK_INDEX, MIN_TICK_INDEX, ORCA_WHIRLPOOL_PROGRAM_ID, PriceMath, TickArrayUtil, TickUtil, TICK_ARRAY_SIZE,...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands
solana_public_repos/orca-so/whirlpools/legacy-sdk/cli/src/commands/todo/initializeWhirlpoolReward
import { Provider } from "@project-serum/anchor"; import { OrcaNetwork, OrcaWhirlpoolClient } from "@orca-so/whirlpool-sdk"; const SOLANA_NETWORK_URL = "https://api.devnet.solana.com"; async function run() { // @ts-expect-error this script doesn't work with latest anchor version const provider = Provider.local(SO...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/README.md
# Legacy Whirlpools SDK Whirpools is an open-source concentrated liquidity AMM contract on the Solana blockchain. The legacy Whirlpools Typescript SDK (`@orca-so/whirlpools-sdk`) allows for easy interaction with a deployed Whirlpools program and is a solid choice if you are working the Solana Web3.js \<v2. The contr...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/package.json
{ "name": "@orca-so/whirlpools-sdk", "version": "0.13.9", "description": "Typescript SDK to interact with Orca's Whirlpool program.", "license": "Apache-2.0", "main": "dist/index.js", "types": "dist/index.d.ts", "peerDependencies": { "@coral-xyz/anchor": "~0.29.0", "@orca-so/common-sdk": "0.6.4", ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tsconfig.json
{ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist" }, "include": ["./src/**/*.ts", "./src/artifacts/whirlpool.json"] }
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/open_position_with_token_extensions.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { ExtensionType, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, createMintToInstruction, getAssociatedTokenAddressSync, getExtensionData, getExtensionType...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_fee_rate.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { IGNORE_CACHE } from "../../src/network/public/fetcher"; import { TickSpacing } from "../utils"; import { defaultConfirm...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/get_pool_prices.test.ts
import * as anchor from "@coral-xyz/anchor"; import { MathUtil } from "@orca-so/common-sdk"; import type { PublicKey } from "@solana/web3.js"; import * as assert from "assert"; import BN from "bn.js"; import Decimal from "decimal.js"; import type { GetPricesConfig, GetPricesThresholdConfig } from "../../src"; import { ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/collect_reward.test.ts
import * as anchor from "@coral-xyz/anchor"; import { BN } from "@coral-xyz/anchor"; import { MathUtil } from "@orca-so/common-sdk"; import * as assert from "assert"; import Decimal from "decimal.js"; import { buildWhirlpoolClient, collectRewardsQuote, NUM_REWARDS, toTx, WhirlpoolContext, WhirlpoolIx, } fro...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_fee_authority.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolsConfigData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { defaultConfirmOptions } from "../utils/const"; import { generateDefaultConfigParams } from "../utils/test-builde...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/close_bundled_position.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { Percentage } from "@orca-so/common-sdk"; import * as assert from "assert"; import BN from "bn.js"; import type { InitPoolParams, PositionBundleData } from "../../src"; import { POSITION_BUNDLE_SIZE, WhirlpoolContex...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_config.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { InitConfigParams, WhirlpoolsConfigData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { ONE_SOL, systemTransferTx } from "../utils"; import { defaultConfirmOptions } from "../utils/c...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/two_hop_swap.test.ts
import * as anchor from "@coral-xyz/anchor"; import { Percentage, U64_MAX } from "@orca-so/common-sdk"; import { PublicKey } from "@solana/web3.js"; import * as assert from "assert"; import BN from "bn.js"; import type { InitPoolParams } from "../../src"; import { buildWhirlpoolClient, MIN_SQRT_PRICE_BN, NO_TOKEN...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle_with_metadata.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import type { Account, Mint } from "@solana/spl-token"; import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import type { PublicKey } from "@solana/web3.js"; ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { Account, Mint } from "@solana/spl-token"; import { ASSOCIATED_TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import type { PublicKey } from "@solana/web3.js"; import { Keypair, LAMPORTS_PER_SOL, SystemProgra...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_default_fee_rate.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { InitPoolParams, WhirlpoolData } from "../../src"; import { PDAUtil, toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { TickSpacing } from "../utils"; import { defaultConfirmOptions } from "../utils/const"; import ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/open_bundled_position.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import type { PublicKey } from "@solana/web3.js"; import { SystemProgram } from "@solana/web3.js"; import * as assert from "assert"; impo...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_reward_emissions_super_authority.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolsConfigData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { defaultConfirmOptions } from "../utils/const"; import { generateDefaultConfigParams } from "../utils/test-builde...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_reward_authority.test.ts
import * as anchor from "@coral-xyz/anchor"; import { TransactionBuilder } from "@orca-so/common-sdk"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { NUM_REWARDS, toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { TickSpacing } from "../utils"; import { defaultC...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_pool.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { MathUtil } from "@orca-so/common-sdk"; import * as assert from "assert"; import Decimal from "decimal.js"; import type { InitPoolParams, WhirlpoolData } from "../../src"; import { IGNORE_CACHE, MAX_SQRT_PRICE, MI...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_default_protocol_fee_rate.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { InitPoolParams, WhirlpoolData } from "../../src"; import { PDAUtil, toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { TickSpacing } from "../utils"; import { defaultConfirmOptions } from "../utils/const"; import ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_reward.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { IGNORE_CACHE } from "../../src/network/public/fetcher"; import { createMint, ONE_SOL, systemTransferTx, TickSpacing } f...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/open_position.test.ts
import * as anchor from "@coral-xyz/anchor"; import { web3 } from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { getAccount, getAssociatedTokenAddressSync } from "@solana/spl-token"; import type { Keypair } from "@solana/web3.js"; import * as assert from "assert"; import type { InitPool...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/close_position.test.ts
import * as anchor from "@coral-xyz/anchor"; import { AuthorityType } from "@solana/spl-token"; import * as assert from "assert"; import { toTx, WhirlpoolIx } from "../../src"; import { WhirlpoolContext } from "../../src/context"; import { approveToken, createAndMintToTokenAccount, createTokenAccount, setAuthor...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_protocol_fee_rate.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { IGNORE_CACHE } from "../../src/network/public/fetcher"; import { TickSpacing } from "../utils"; import { defaultConfirm...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_fee_tier.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { FeeTierData } from "../../src"; import { PDAUtil, toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { ONE_SOL, systemTransferTx, TickSpacing } from "../utils"; import { defaultConfirmOptions } from "../utils/const"...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_reward_authority_by_super_authority.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { TickSpacing } from "../utils"; import { defaultConfirmOptions } from "../utils/const"; import { initTestPool } from ".....
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/close_position_with_token_extensions.test.ts
import * as anchor from "@coral-xyz/anchor"; import { AuthorityType, createCloseAccountInstruction, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, } from "@solana/spl-token"; import * as assert from "assert"; import { IGNORE_CACHE, increaseLiquidityQuoteByLiquidityWithParams, NO_TOKEN_EXTENSION_CONTEXT, PDAUt...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_collect_protocol_fee_authority.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolsConfigData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { defaultConfirmOptions } from "../utils/const"; import { generateDefaultConfigParams } from "../utils/test-builde...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/decrease_liquidity.test.ts
import * as anchor from "@coral-xyz/anchor"; import { MathUtil, Percentage } from "@orca-so/common-sdk"; import * as assert from "assert"; import BN from "bn.js"; import Decimal from "decimal.js"; import type { PositionData, TickArrayData, WhirlpoolData } from "../../src"; import { WhirlpoolContext, WhirlpoolIx, toTx }...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/collect_fees.test.ts
import * as anchor from "@coral-xyz/anchor"; import { BN } from "@coral-xyz/anchor"; import { MathUtil } from "@orca-so/common-sdk"; import * as assert from "assert"; import Decimal from "decimal.js"; import type { PositionData, TickArrayData, WhirlpoolData } from "../../src"; import { collectFeesQuote, PDAUtil, ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/open_position_with_metadata.test.ts
import * as anchor from "@coral-xyz/anchor"; import { web3 } from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { TransactionBuilder } from "@orca-so/common-sdk"; import { TOKEN_PROGRAM_ID, getAccount, getAssociatedTokenAddressSync, } from "@solana/spl-token"; import { Keypair, Publi...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/collect_protocol_fees.test.ts
import * as anchor from "@coral-xyz/anchor"; import { BN } from "@coral-xyz/anchor"; import { MathUtil } from "@orca-so/common-sdk"; import * as assert from "assert"; import Decimal from "decimal.js"; import type { WhirlpoolData } from "../../src"; import { PDAUtil, toTx, WhirlpoolContext, WhirlpoolIx } from "../../src...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/initialize_tick_array.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { InitPoolParams, InitTickArrayParams, TickArrayData, } from "../../src"; import { TICK_ARRAY_SIZE, WhirlpoolContext, WhirlpoolIx, toTx, } from "../../src"; import { ONE_SOL, TickSpacing, systemTransferTx } from ".....
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/set_reward_emissions.test.ts
import * as anchor from "@coral-xyz/anchor"; import * as assert from "assert"; import type { WhirlpoolData } from "../../src"; import { toTx, WhirlpoolContext, WhirlpoolIx } from "../../src"; import { IGNORE_CACHE } from "../../src/network/public/fetcher"; import { createAndMintToTokenAccount, mintToDestination, ...
0
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests
solana_public_repos/orca-so/whirlpools/legacy-sdk/whirlpool/tests/integration/delete_position_bundle.test.ts
import * as anchor from "@coral-xyz/anchor"; import type { PDA } from "@orca-so/common-sdk"; import { ASSOCIATED_TOKEN_PROGRAM_ID } from "@solana/spl-token"; import { Keypair } from "@solana/web3.js"; import * as assert from "assert"; import type { InitPoolParams, PositionBundleData } from "../../src"; import { POSITIO...
0