repo_id stringclasses 563
values | file_path stringlengths 40 166 | content stringlengths 1 2.94M | __index_level_0__ int64 0 0 |
|---|---|---|---|
solana_public_repos/orca-so/whirlpools/rust-sdk/macros | solana_public_repos/orca-so/whirlpools/rust-sdk/macros/src/lib.rs | mod wasm_const;
mod wasm_enum;
mod wasm_fn;
mod wasm_struct;
use proc_macro::TokenStream;
use syn::{parse::Nothing, parse2, Item, Result};
#[proc_macro_attribute]
pub fn wasm_expose(attr: TokenStream, item: TokenStream) -> TokenStream {
match wasm_expose_impl(attr, item) {
Ok(expanded) => expanded,
... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/macros | solana_public_repos/orca-so/whirlpools/rust-sdk/macros/src/wasm_const.rs | use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use syn::{parse::Nothing, Expr, ExprUnary, ItemConst, Lit, Result, UnOp};
// FIXME: also add the rustdoc comment to the generated ts constant
pub fn wasm_const_impl(item: ItemConst, _attr: Nothing) -> Result<TokenStream> {
let const_name = format_ide... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/macros | solana_public_repos/orca-so/whirlpools/rust-sdk/macros/src/wasm_fn.rs | use proc_macro2::TokenStream;
use quote::{format_ident, quote};
use syn::{parse::Nothing, Ident, ItemFn, Result};
pub fn wasm_fn_impl(item: ItemFn, _attr: Nothing) -> Result<TokenStream> {
let js_name = to_js_name(item.clone().sig.ident);
let expanded = quote! {
#[::wasm_bindgen::prelude::wasm_bindgen... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/Cargo.toml | [package]
name = "orca_whirlpools"
version = "0.1.0"
description = "Orca's high-level rust sdk to interact with Orca's on-chain Whirlpool program."
include = ["src/*"]
documentation = "https://orca-so.github.io/whirlpools/"
homepage = "https://orca.so"
repository = "https://github.com/orca-so/whirlpools"
license = "Apa... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/package.json | {
"name": "@orca-so/whirlpools-rust",
"version": "0.0.1",
"scripts": {
"build": "cargo build",
"test": "cargo test --lib",
"format": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt",
"lint": "cargo clippy && cargo fmt --check",
"clean": "cargo clean"
},
"devDependencies": {
... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/swap.rs | use std::{error::Error, iter::zip};
use orca_whirlpools_client::{
get_oracle_address, get_tick_array_address, AccountsType, RemainingAccountsInfo,
RemainingAccountsSlice, SwapV2, SwapV2InstructionArgs, TickArray, Whirlpool,
};
use orca_whirlpools_core::{
get_tick_array_start_tick_index, swap_quote_by_input... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/decrease_liquidity.rs | use std::{
collections::HashSet,
error::Error,
time::{SystemTime, UNIX_EPOCH},
};
use orca_whirlpools_client::{
get_position_address, get_tick_array_address, Position, TickArray, Whirlpool,
};
use orca_whirlpools_client::{
ClosePosition, ClosePositionWithTokenExtensions, CollectFeesV2, CollectFeesV... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/config.rs | use std::{error::Error, sync::Mutex};
use orca_whirlpools_client::get_whirlpools_config_extension_address;
use solana_program::pubkey::Pubkey;
/// The Whirlpools program's config account address for Solana Mainnet.
const SOLANA_MAINNET_WHIRLPOOLS_CONFIG_ADDRESS: Pubkey = Pubkey::new_from_array([
19, 228, 65, 248,... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/token.rs | use orca_whirlpools_core::TransferFee;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_sdk::account::Account as SolanaAccount;
use solana_sdk::hash::hashv;
use solana_sdk::program_error::ProgramError;
use solana_sdk::signature::Keypair;
use solana_sdk::signer::Signer;
use solana_sdk::system_instructio... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/increase_liquidity.rs | use std::error::Error;
use std::str::FromStr;
use orca_whirlpools_client::{
get_position_address, get_tick_array_address, InitializeTickArray,
InitializeTickArrayInstructionArgs, OpenPositionWithTokenExtensions,
OpenPositionWithTokenExtensionsInstructionArgs, Position, TickArray, Whirlpool,
};
use orca_whi... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/lib.rs | mod account;
mod config;
mod create_pool;
mod decrease_liquidity;
mod harvest;
mod increase_liquidity;
mod pool;
mod position;
mod swap;
mod token;
#[cfg(test)]
mod e2e;
#[cfg(test)]
mod tests;
pub use account::*;
pub use config::*;
pub use create_pool::*;
pub use decrease_liquidity::*;
pub use harvest::*;
pub use i... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/account.rs | use serde::Deserialize;
use serde_json::from_value;
use solana_account_decoder::UiAccountData;
use solana_client::{nonblocking::rpc_client::RpcClient, rpc_request::TokenAccountsFilter};
use solana_program::pubkey::Pubkey;
use solana_sdk::rent::Rent;
use solana_sdk::sysvar::SysvarId;
use std::{error::Error, str::FromStr... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/create_pool.rs | use std::collections::HashSet;
use std::error::Error;
use orca_whirlpools_client::{
get_fee_tier_address, get_tick_array_address, get_token_badge_address, get_whirlpool_address,
};
use orca_whirlpools_client::{
InitializePoolV2, InitializePoolV2InstructionArgs, InitializeTickArray,
InitializeTickArrayInstr... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/pool.rs | use std::error::Error;
use orca_whirlpools_client::{
fetch_all_fee_tier_with_filter, get_fee_tier_address, get_whirlpool_address, FeeTier,
FeeTierFilter, Whirlpool, WhirlpoolsConfig,
};
use orca_whirlpools_core::sqrt_price_to_price;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_program::pu... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/harvest.rs | use std::{
collections::HashSet,
error::Error,
time::{SystemTime, UNIX_EPOCH},
};
use orca_whirlpools_client::{
get_position_address, get_tick_array_address, Position, TickArray, Whirlpool,
};
use orca_whirlpools_client::{
CollectFeesV2, CollectFeesV2InstructionArgs, CollectRewardV2, CollectRewardV... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/position.rs | use std::{collections::HashMap, error::Error};
use orca_whirlpools_client::{
fetch_all_position_with_filter, get_bundled_position_address, get_position_address,
get_position_bundle_address, DecodedAccount, Position, PositionBundle, PositionFilter,
};
use orca_whirlpools_core::POSITION_BUNDLE_SIZE;
use solana_c... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/e2e.rs | use std::error::Error;
use orca_whirlpools_client::{get_position_address, Position, Whirlpool};
use serial_test::serial;
use solana_program_test::tokio::{self};
use solana_sdk::{program_pack::Pack, pubkey::Pubkey, signer::Signer};
use spl_token_2022::state::Account;
use crate::{
close_position_instructions, creat... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/token_extensions.rs | use solana_sdk::{
pubkey::Pubkey,
signer::{keypair::Keypair, Signer},
system_instruction,
};
use spl_associated_token_account::{
get_associated_token_address_with_program_id,
instruction::create_associated_token_account_idempotent,
};
use spl_token_2022::{
extension::{
transfer_fee::inst... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/token.rs | use std::error::Error;
use solana_sdk::{
program_pack::Pack,
pubkey::Pubkey,
signer::Signer,
system_instruction::{create_account, transfer},
};
use spl_associated_token_account::{
get_associated_token_address_with_program_id,
instruction::create_associated_token_account_idempotent,
};
use spl_t... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/anchor.rs | use std::{env::set_var, error::Error, fs::read_to_string, path::PathBuf, str::FromStr};
use solana_sdk::pubkey::Pubkey;
use toml::Table;
pub fn anchor_programs(path: String) -> Result<Vec<(String, Pubkey)>, Box<dyn Error>> {
let mut programs: Vec<(String, Pubkey)> = Vec::new();
let mut sbf_out_dir: PathBuf = ... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/mod.rs | mod anchor;
mod program;
mod rpc;
mod token;
mod token_extensions;
pub use anchor::*;
pub use program::*;
pub use rpc::*;
pub use token::*;
pub use token_extensions::*;
| 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/program.rs | use solana_sdk::{pubkey::Pubkey, signer::Signer, system_program};
use std::error::Error;
use orca_whirlpools_client::{
get_fee_tier_address, get_token_badge_address, get_whirlpool_address, InitializePoolV2,
InitializePoolV2InstructionArgs,
};
use orca_whirlpools_core::{price_to_sqrt_price, tick_index_to_sqrt_p... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src | solana_public_repos/orca-so/whirlpools/rust-sdk/whirlpool/src/tests/rpc.rs | use std::sync::atomic::{AtomicUsize, Ordering};
use std::{error::Error, str::FromStr};
use async_trait::async_trait;
use orca_whirlpools_client::{
get_fee_tier_address, FEE_TIER_DISCRIMINATOR, WHIRLPOOLS_CONFIG_DISCRIMINATOR, WHIRLPOOL_ID,
};
use serde_json::{from_value, to_value, Value};
use solana_account_decode... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk | solana_public_repos/orca-so/whirlpools/rust-sdk/client/Cargo.toml | [package]
name = "orca_whirlpools_client"
version = "0.1.0"
description = "Rust client to interact with Orca's on-chain Whirlpool program."
include = ["src/*"]
documentation = "https://orca-so.github.io/whirlpools/"
homepage = "https://orca.so"
repository = "https://github.com/orca-so/whirlpools"
license = "Apache-2.0"... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk | solana_public_repos/orca-so/whirlpools/rust-sdk/client/codama.js | import { createFromRoot } from "codama";
import { renderVisitor } from "@codama/renderers-rust";
import { rootNodeFromAnchor } from "@codama/nodes-from-anchor";
import { readFileSync } from "fs";
const idl = JSON.parse(readFileSync("../../target/idl/whirlpool.json", "utf8"));
const node = rootNodeFromAnchor(idl);
cons... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk | solana_public_repos/orca-so/whirlpools/rust-sdk/client/package.json | {
"name": "@orca-so/whirlpools-rust-client",
"version": "0.0.1",
"type": "module",
"scripts": {
"build": "node ./codama.js && cargo build",
"test": "cargo test --lib",
"format": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt",
"lint": "cargo clippy && cargo fmt --check",
"clea... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/lib.rs | #[rustfmt::skip]
mod generated;
mod pda;
#[cfg(feature = "fetch")]
mod gpa;
#[cfg(feature = "core-types")]
mod core_types;
pub use generated::accounts::*;
pub use generated::errors::*;
pub use generated::instructions::*;
pub use generated::programs::WHIRLPOOL_ID as ID;
pub use generated::programs::*;
pub use genera... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/token_badge.rs | use std::error::Error;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_client::rpc_filter::{Memcmp, RpcFilterType};
use solana_program::pubkey::Pubkey;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
use crate::TokenBadge;
pub const TOKEN_BADGE_DISCRIMINATOR: &[u8] = &[116, 219,... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/tick_array.rs | use std::error::Error;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_client::rpc_filter::{Memcmp, RpcFilterType};
use solana_program::pubkey::Pubkey;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
use crate::TickArray;
pub const TICK_ARRAY_DISCRIMINATOR: &[u8] = &[69, 97, 189... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/whirlpools_config.rs | use std::error::Error;
use solana_client::{
nonblocking::rpc_client::RpcClient,
rpc_filter::{Memcmp, RpcFilterType},
};
use solana_sdk::pubkey::Pubkey;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
use crate::WhirlpoolsConfig;
pub const WHIRLPOOLS_CONFIG_DISCRIMINATOR: &[u8] = &[157, 20... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/whirlpool.rs | use std::error::Error;
use solana_client::{
nonblocking::rpc_client::RpcClient,
rpc_filter::{Memcmp, RpcFilterType},
};
use solana_sdk::pubkey::Pubkey;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
use crate::Whirlpool;
pub const WHIRLPOOL_DISCRIMINATOR: &[u8] = &[63, 149, 209, 12, 225,... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/mod.rs | mod fee_tier;
mod position;
mod position_bundle;
mod tick_array;
mod token_badge;
mod utils;
mod whirlpool;
mod whirlpools_config;
mod whirlpools_config_extension;
// FIXME: Discriminators for accounts are not yet added to codama-rust,
// here they are added in such a way that if they are added to codama-rust,
// we c... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/whirlpools_config_extension.rs | use std::error::Error;
use solana_client::{
nonblocking::rpc_client::RpcClient,
rpc_filter::{Memcmp, RpcFilterType},
};
use solana_sdk::pubkey::Pubkey;
use crate::WhirlpoolsConfigExtension;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
pub const WHIRLPOOLS_CONFIG_EXTENSION_DISCRIMINATO... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/fee_tier.rs | use solana_client::nonblocking::rpc_client::RpcClient;
use solana_client::rpc_filter::Memcmp;
use solana_client::rpc_filter::RpcFilterType;
use solana_program::pubkey::Pubkey;
use std::error::Error;
use crate::FeeTier;
use super::utils::fetch_decoded_program_accounts;
use super::utils::DecodedAccount;
pub const FEE_... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/position_bundle.rs | use std::error::Error;
use solana_client::nonblocking::rpc_client::RpcClient;
use solana_client::rpc_filter::Memcmp;
use solana_client::rpc_filter::RpcFilterType;
use solana_program::pubkey::Pubkey;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
use crate::PositionBundle;
pub const POSITION_BUND... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/position.rs | use std::error::Error;
use solana_client::{
nonblocking::rpc_client::RpcClient,
rpc_filter::{Memcmp, RpcFilterType},
};
use solana_sdk::pubkey::Pubkey;
use crate::Position;
use super::utils::{fetch_decoded_program_accounts, DecodedAccount};
pub const POSITION_DISCRIMINATOR: &[u8] = &[170, 188, 143, 228, 122... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/gpa/utils.rs | use std::error::Error;
use borsh::BorshDeserialize;
use solana_account_decoder::UiAccountEncoding;
use solana_client::{
nonblocking::rpc_client::RpcClient,
rpc_config::{RpcAccountInfoConfig, RpcProgramAccountsConfig},
rpc_filter::RpcFilterType,
};
use solana_program::pubkey::Pubkey;
use solana_sdk::account... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/token_badge.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_token_badge_address(
whirlpools_config: &Pubkey,
token_mint: &Pubkey,
) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[
b"token_badge",
whirlp... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/tick_array.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_tick_array_address(
whirlpool: &Pubkey,
start_tick_index: i32,
) -> Result<(Pubkey, u8), ProgramError> {
let start_tick_index_str = start_tick_index.to_string();
... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/whirlpool.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_whirlpool_address(
whirlpools_config: &Pubkey,
token_mint_a: &Pubkey,
token_mint_b: &Pubkey,
tick_spacing: u16,
) -> Result<(Pubkey, u8), ProgramError> {
let... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/mod.rs | mod fee_tier;
mod oracle;
mod position;
mod position_bundle;
mod tick_array;
mod token_badge;
mod whirlpool;
mod whirlpools_config_extension;
pub use fee_tier::*;
pub use oracle::*;
pub use position::*;
pub use position_bundle::*;
pub use tick_array::*;
pub use token_badge::*;
pub use whirlpool::*;
pub use whirlpools_... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/oracle.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_oracle_address(whirlpool: &Pubkey) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[b"oracle", whirlpool.as_ref()];
Pubkey::try_find_program_address(seeds, &WHIRLP... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/whirlpools_config_extension.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_whirlpools_config_extension_address(
whirlpools_config: &Pubkey,
) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[b"config_extension", whirlpools_config.as_ref()]... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/fee_tier.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_fee_tier_address(
whirlpools_config: &Pubkey,
tick_spacing: u16,
) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[
b"fee_tier",
whirlpools_con... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/position_bundle.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_position_bundle_address(position_mint: &Pubkey) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[b"position_bundle", position_mint.as_ref()];
Pubkey::try_find_prog... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/pda/position.rs | use crate::generated::programs::WHIRLPOOL_ID;
use solana_program::program_error::ProgramError;
use solana_program::pubkey::Pubkey;
pub fn get_position_address(position_mint: &Pubkey) -> Result<(Pubkey, u8), ProgramError> {
let seeds = &[b"position", position_mint.as_ref()];
Pubkey::try_find_program_address(se... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/core_types/tick_array.rs | use orca_whirlpools_core::{TickArrayFacade, TickFacade};
use crate::{Tick, TickArray};
impl From<TickArray> for TickArrayFacade {
fn from(val: TickArray) -> Self {
TickArrayFacade {
start_tick_index: val.start_tick_index,
ticks: val.ticks.map(|tick| tick.into()),
}
}
}
... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/core_types/whirlpool.rs | use orca_whirlpools_core::{WhirlpoolFacade, WhirlpoolRewardInfoFacade};
use crate::{Whirlpool, WhirlpoolRewardInfo};
impl From<Whirlpool> for WhirlpoolFacade {
fn from(val: Whirlpool) -> Self {
WhirlpoolFacade {
tick_spacing: val.tick_spacing,
fee_rate: val.fee_rate,
pr... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/core_types/mod.rs | mod position;
mod tick_array;
mod tick_range;
mod whirlpool;
| 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/core_types/position.rs | use orca_whirlpools_core::{PositionFacade, PositionRewardInfoFacade};
use crate::{Position, PositionRewardInfo};
impl From<Position> for PositionFacade {
fn from(val: Position) -> Self {
PositionFacade {
liquidity: val.liquidity,
tick_lower_index: val.tick_lower_index,
... | 0 |
solana_public_repos/orca-so/whirlpools/rust-sdk/client/src | solana_public_repos/orca-so/whirlpools/rust-sdk/client/src/core_types/tick_range.rs | use orca_whirlpools_core::TickRange;
use crate::Position;
impl From<Position> for TickRange {
fn from(val: Position) -> Self {
TickRange {
tick_lower_index: val.tick_lower_index,
tick_upper_index: val.tick_upper_index,
}
}
}
| 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/rust/Cargo.toml | [package]
name = "orca_whirlpools_docs"
version = "0.1.0"
publish = false
edition = "2021"
[dependencies]
orca_whirlpools_core = { path = "../../rust-sdk/core", features = ["floats"] }
orca_whirlpools_client = { path = "../../rust-sdk/client", features = ["anchor", "core-types"] }
orca_whirlpools = { path = "../../rus... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/rust/package.json | {
"name": "@orca-so/whirlpools-docs-rust",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "cargo doc --lib --no-deps && cp -rf target/doc/. dist",
"start": "cargo doc --lib --no-deps --open",
"clean": "rimraf dist"
},
"devDependencies": {
"@orca-so/whirlpools-rust": "*",
"@or... | 0 |
solana_public_repos/orca-so/whirlpools/docs/rust | solana_public_repos/orca-so/whirlpools/docs/rust/src/lib.rs | #![doc = include_str!("../README.md")]
pub mod orca_whirlpools_core {
#![doc = include_str!("../../../rust-sdk/core/README.md")]
pub use orca_whirlpools_core::*;
}
pub mod orca_whirlpools_client {
#![doc = include_str!("../../../rust-sdk/client/README.md")]
pub use orca_whirlpools_client::*;
}
pub mo... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/legacy/package.json | {
"name": "@orca-so/whirlpools-docs-legacy",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "typedoc",
"start": "typedoc && open dist/legacy/index.html",
"clean": "rimraf dist"
},
"devDependencies": {
"@orca-so/whirlpools-sdk": "*",
"typedoc": "^0.27.4",
"typescript": "^5... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/legacy/typedoc.json | {
"entryPoints": ["../../legacy-sdk/whirlpool/src/index.ts"],
"entryPointStrategy": "resolve",
"githubPages": false,
"skipErrorChecking": true,
"out": "dist/legacy"
}
| 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/package.json | {
"name": "@orca-so/whirlpools-docs",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "docusaurus build --out-dir dist",
"start": "docusaurus start",
"clean": "rimraf dist .docusaurus"
},
"dependencies": {
"@docusaurus/core": "^3.6.3",
"@docusaurus/preset-classic": "^3.6.3",
... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docusaurus.config.js | import { themes } from "prism-react-renderer";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
export default {
title: "Whirlpools",
tagline: "Open source concentrated liquidity AMM contract on Solana",
favicon: "https://orca.so/favicon.ico",
url: "https://orca-so.github.io/",
... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/tsconfig.json | {
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
}
| 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/sidebars.js | export default {
sidebar: [{ type: "autogenerated", dirName: "." }],
};
| 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/01-Welcome.mdx | ---
sidebar_position: 1
slug: /
---
import DocCard from '@theme/DocCard';
# Welcome
On both the Solana and Eclipse networks, the Whirlpool Program runs as an open-sourced concentrated liquidity automated market maker (CLAMM). The program enables advanced DeFi operations such as creating liquidity pools and swapping.
... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/08-Errors.mdx | import DocCard from '@theme/DocCard';
# Errors
Whirlpool errors are emitted as a hexadecimal number (ex. 0x1771).
Convert this value back to decimal to determine where the error is coming from.
## Anchor Errors (error code < 6000)
Anchor
- \>= 100 Instruction error codes
- \>= 1000 IDL error codes
- \>= 2000 const... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/06-PubkeySollet.mdx | import DocCard from '@theme/DocCard';
# PubkeySollet
When interacting with Whirlpool, it is very useful to observe the transactions generated by Orca's UI.
The transaction dump function provided by PubkeySollet allows you to know the data and accounts without executing a transaction.
 file provides a standardized JSON file describing the program's instructions and accounts. This file simplifies the process of integrating your on-chain program with client applications.
To interact with the program, we highly recomme... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/01-A Note for Python Devs.mdx | import DocCard from '@theme/DocCard';
# A Note for Python Devs
Python developers are able to interact with Whirlpool through Whirlpool Essential library!
<DocCard item={{
type: 'link',
href: 'https://pypi.org/project/whirlpool-essentials/',
label: 'Whirlpool Essentials',
description: 'https://pypi.org/projec... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/07-Whirlpool Replayer.mdx | import DocCard from '@theme/DocCard';
# Whirlpool Replayer
Extracting Whirlpool related transactions, from Solana's vast transaction history, and recovering historical states from that data has been an insurmountable problem.
However, developers using Whirlpool can use the whirlpool-replayer library to get the state ... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/04-API.mdx | ---
sidebar-label: API
---
import DocCard from '@theme/DocCard';
# API Endpoints
<DocCard item={{
type: 'link',
href: 'https://api.mainnet.orca.so/v1/whirlpool/list',
label: 'Whirlpool List',
description: 'https://api.mainnet.orca.so/v1/whirlpool/list'
}} />
<DocCard item={{
type: 'link',
href: 'https://... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/02-A Note for Unity Devs.mdx | ---
sidebar_label: A Note for C#/Unity Devs
---
import DocCard from '@theme/DocCard';
# A Note for Unity/C# Devs
Today, Unity/C# developers will have smooth access to Solana applications, including Whirlpool!
## Solana.Unity-SDK
Garbles Labs is developing Solana.Unity-Core and Solana.Unity-SDK.
Solana.Unity-SDK is t... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/05-More Resources/05-Account Microscope.mdx | import DocCard from '@theme/DocCard';
# Account microscope
When developing with Whirlpool, it is often necessary to check the state of accounts and to obtain a list of whirlpools and positions. And sometimes we want to do hexdump and download accounts to clone Whirlpool.
🔬 Account microscope have been designed to ... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK/05-Tutorial: Tour de Whirlpool/01-Overview.mdx | import DocCard from '@theme/DocCard';
# Tutorial: Tour de Whirlpool
## Overview
### What is Tour de Whirlpool?
Tour de Whirlpool explains how to create programs that interact with Orca Whirlpools. In this tutorial you will learn how to perform the following operations programmatically.
- Check balances for SOL and t... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK/05-Tutorial: Tour de Whirlpool/03-Obtain Sol and Tokens.mdx | import DocCard from '@theme/DocCard';
# Obtain SOL and Tokens
Let's obtain the SOL and tokens we will use in the tutorial.
You can obtain SOL on Devnet through airdrops, and you can mint your own tokens if you have SOL. However, for this tutorial, all of the tokens you need can be obtained from the site below.
<Doc... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK/01-Basic Usage/03-Building Transactions.mdx | import DocCard from '@theme/DocCard';
# Building Transactions
The Typescript SDK provides multiple ways for you to create the transaction needed to execute specific actions on the Whirlpool contract.
## 1. Composing your own Transaction
Use the TransactionBuilder class to construct and compose your own Transactions ... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/04-Legacy SDK/01-Basic Usage/04-Important Util Helpers.mdx | import DocCard from '@theme/DocCard';
# Important Util helpers
Reference the following utility types to help you interact with the Whirlpool protocol.
## PDAUtil
Utility class to help you derive the PDA for Whirlpool accounts
<DocCard item={{
type: 'link',
href: 'https://orca-so.github.io/whirlpools/legacy/class... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/02-Whirlpools Core.mdx | ---
sidebar_label: Whirlpools Core
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Orca Whirlpools Core SDK
This package provides developers with advanced functionalities for interacting with the Whirlpool Program on Solana. Originally written in Rust, it has been compiled to WebAssembly (W... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/03-Whirlpools Client.mdx | ---
sidebar_label: Whirlpools Client
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Orca Whirlpools Client SDK
## Overview
This SDK provides developers with low-level functionalities for interacting with the Whirlpool Program on Solana. It serves as a foundational tool that allows develop... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/05-Trade.mdx | ---
sidebar_label: Trade
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Executing a Token Swap
You can use the SDK to execute a token swap on Orca. Whether you're swapping a specific amount of input tokens or looking to receive a precise amount of output tokens, this function handles the p... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/02-Environment Setup.mdx | import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Environment setup
This document covers the essential setup required to start building on Orca’s SDK using the Whirlpools protocol. It includes wallet setup, RPC client configuration, airdropping tokens for testing, and the basics of interacting wi... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/03-Whirlpool Management/02-Fetch Pools.mdx | ---
sidebar_label: Fetch Liquidity Pools
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Fetching Liquidity Pools on Orca
Monitoring and fetching details about liquidity pools on Orca is crucial for understanding their current state, whether you want to gather insights in a Splash Pool, a C... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/03-Whirlpool Management/01-Create Pool.mdx | ---
sidebar_label: Create Liquidity Pools
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Creating Liquidity Pools on Orca
Creating liquidity pools on Orca is an essential step for launching your token and enabling trading. In this guide, we'll explore two types of liquidity pools availabl... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/04-Position Management/01-Open Position.mdx | ---
sidebar_label: Open a position
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Opening a Position
Opening a position in liquidity pools on Orca is a fundamental step for providing liquidity and earning fees. In this guide, we'll explore how to open a position in both **Splash Pools** an... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/04-Position Management/05-Close Position.mdx | ---
sidebar_label: Close Position
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Close a Position
Once you've provided liquidity in a pool, there may come a time when you want to close your position entirely. The SDK allows you to fully remove liquidity from the pool, collect any outstandi... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/04-Position Management/03-Adjust Liquidity.mdx | ---
sidebar_label: Adjust Liquidity
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Adjusting Liquidity in Your Positions
Once you’ve opened a position in an Orca Whirlpool, you may need to adjust the amount of liquidity you've provided to align with market conditions or your strategy. Whet... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/04-Position Management/02-Fetch Positions.mdx | ---
sidebar_label: Fetch Positions
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Fetching Positions
Retrieving details about positions held in liquidity pools is an essential part of managing your liquidity and monitoring performance. This guide explains how to use the SDK to gather infor... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/03-Whirlpools SDKs/01-Whirlpools/04-Position Management/04-Harvest.mdx | ---
sidebar_label: Harvest
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Harvesting a Position
Harvesting a position in Orca Whirlpools allows you to collect any accumulated fees and rewards without closing the position. This process is useful when you want to claim your earnings while ke... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs | solana_public_repos/orca-so/whirlpools/docs/whirlpool/docs/02-Architecture Overview/06-Whirlpool Parameters.mdx | ---
sidebar_label: Whirlpools Parameters
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Orca Whirlpool Parameters
Orca Whirlpools uses the Whirlpools program to host liquidity for token pairs. Below are the set of constants Orca uses to host their program.
<Tabs>
<TabItem value="mainnet... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool | solana_public_repos/orca-so/whirlpools/docs/whirlpool/static/index.css | :root {
--ifm-background-color: #F0F2FF;
--ifm-background-surface-color: #EBEDFF;
--ifm-color-primary: #4755EB;
--ifm-color-primary-dark: #3E4DEA;
--ifm-color-primary-darker: #3544E9;
--ifm-color-primary-darkest: #2B3CE8;
--ifm-color-primary-light: #505EEC;
--ifm-color-primary-lighter: #5966ED;
--ifm-... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/src | solana_public_repos/orca-so/whirlpools/docs/whirlpool/src/theme/Root.js | import React, { useState } from "react";
import Script from "next/script";
export default function Root({ children }) {
const [isHovered, setIsHovered] = useState(false);
const buttonStyle = {
padding: "10px 20px",
backgroundColor: "#FFD15C",
color: "#13174D",
fontSize: "18px",
fontWeight: "50... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/src/theme | solana_public_repos/orca-so/whirlpools/docs/whirlpool/src/theme/DocCard/styles.module.css | .cardContainer {
--ifm-link-color: var(--ifm-color-emphasis-800);
--ifm-link-hover-color: var(--ifm-color-emphasis-700);
--ifm-link-hover-decoration: none;
margin-bottom: var(--ifm-paragraph-margin-bottom);
box-shadow: 0 1.5px 3px 0 rgb(0 0 0 / 15%);
border: 1px solid var(--ifm-color-emphasis-200);
trans... | 0 |
solana_public_repos/orca-so/whirlpools/docs/whirlpool/src/theme | solana_public_repos/orca-so/whirlpools/docs/whirlpool/src/theme/DocCard/index.js | import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import {
useDocById,
findFirstSidebarItemLink,
} from "@docusaurus/plugin-content-docs/client";
import { usePluralForm } from "@docusaurus/theme-common";
import isInternalUrl from "@docusaurus/isInternalUrl";
import { translate... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/ts/package.json | {
"name": "@orca-so/whirlpools-docs-ts",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "typedoc",
"start": "typedoc && open dist/ts/index.html",
"clean": "rimraf dist"
},
"devDependencies": {
"@orca-so/whirlpools": "*",
"@orca-so/whirlpools-client": "*",
"@orca-so/whirlp... | 0 |
solana_public_repos/orca-so/whirlpools/docs | solana_public_repos/orca-so/whirlpools/docs/ts/typedoc.json | {
"entryPoints": [
"../../ts-sdk/core",
"../../ts-sdk/client",
"../../ts-sdk/whirlpool"
],
"entryPointStrategy": "packages",
"githubPages": false,
"skipErrorChecking": true,
"out": "dist/ts",
"readme": "./README.md"
}
| 0 |
solana_public_repos/orca-so/whirlpools/programs | solana_public_repos/orca-so/whirlpools/programs/whirlpool/Cargo.toml | [package]
name = "whirlpool"
version = "0.3.2"
publish = false
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]
[features]
no-entrypoint = []
no-idl = []
cpi = ["no-entrypoint"]
default = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = { version = "=0.29.0" }
anchor... | 0 |
solana_public_repos/orca-so/whirlpools/programs | solana_public_repos/orca-so/whirlpools/programs/whirlpool/package.json | {
"name": "@orca-so/whirlpools-program",
"version": "0.0.0",
"private": true,
"scripts": {
"build": "anchor build -p whirlpool",
"test": "cargo test -p whirlpool --lib",
"format": "cargo clippy -p whirlpool --fix --allow-dirty --allow-staged && cargo fmt -p whirlpool",
"lint": "cargo clippy -p w... | 0 |
solana_public_repos/orca-so/whirlpools/programs | solana_public_repos/orca-so/whirlpools/programs/whirlpool/Xargo.toml | [target.bpfel-unknown-unknown.dependencies.std]
features = []
| 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/security.rs | use solana_security_txt::security_txt;
#[cfg(not(feature = "no-entrypoint"))]
security_txt! {
name: "Orca Whirlpool program",
project_url: "https://orca.so",
contacts: "discord:https://discord.orca.so/,twitter:https://twitter.com/orca_so",
policy: "https://immunefi.com/bounty/orca/",
source_code: "... | 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/lib.rs | use anchor_lang::prelude::*;
declare_id!("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc");
#[doc(hidden)]
pub mod constants;
#[doc(hidden)]
pub mod errors;
#[doc(hidden)]
pub mod instructions;
#[doc(hidden)]
pub mod manager;
#[doc(hidden)]
pub mod math;
#[doc(hidden)]
pub mod security;
pub mod state;
#[doc(hidden)]
pub... | 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/errors.rs | use std::num::TryFromIntError;
use anchor_lang::prelude::*;
#[error_code]
#[derive(PartialEq)]
pub enum ErrorCode {
#[msg("Enum value could not be converted")]
InvalidEnum, // 0x1770 (6000)
#[msg("Invalid start tick index provided.")]
InvalidStartTick, // 0x1771 (6001)
#[msg("Tick-array already ex... | 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/instructions/initialize_reward.rs | use anchor_lang::prelude::*;
use anchor_spl::token::{self, Mint, Token, TokenAccount};
use crate::state::Whirlpool;
#[derive(Accounts)]
#[instruction(reward_index: u8)]
pub struct InitializeReward<'info> {
#[account(address = whirlpool.reward_infos[reward_index as usize].authority)]
pub reward_authority: Sign... | 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/instructions/update_fees_and_rewards.rs | use anchor_lang::prelude::*;
use crate::{
manager::liquidity_manager::calculate_fee_and_reward_growths, state::*, util::to_timestamp_u64,
};
#[derive(Accounts)]
pub struct UpdateFeesAndRewards<'info> {
#[account(mut)]
pub whirlpool: Account<'info, Whirlpool>,
#[account(mut, has_one = whirlpool)]
... | 0 |
solana_public_repos/orca-so/whirlpools/programs/whirlpool/src | solana_public_repos/orca-so/whirlpools/programs/whirlpool/src/instructions/open_bundled_position.rs | use anchor_lang::prelude::*;
use anchor_spl::token::TokenAccount;
use crate::{state::*, util::verify_position_bundle_authority};
#[derive(Accounts)]
#[instruction(bundle_index: u16)]
pub struct OpenBundledPosition<'info> {
#[account(init,
payer = funder,
space = Position::LEN,
seeds = [
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.