├── id.json ├── programs └── token-2022-pumpfun │ ├── src │ ├── events │ │ ├── mod.rs │ │ └── events.rs │ ├── utils │ │ ├── mod.rs │ │ └── calc_swap_quote.rs │ ├── states │ │ ├── mod.rs │ │ ├── initialize_configuration.rs │ │ └── bonding_curve.rs │ ├── errors.rs │ ├── instructions │ │ ├── mod.rs │ │ ├── initialize.rs │ │ ├── proxy_initialize.rs │ │ ├── sell.rs │ │ ├── buy.rs │ │ ├── claim_user_reward.rs │ │ ├── transfer_migration_fee.rs │ │ ├── proxy_open_position.rs │ │ ├── lock_lp.rs │ │ ├── reward_distribute.rs │ │ ├── claim_cp_fee.rs │ │ └── create.rs │ ├── consts.rs │ └── lib.rs │ ├── Xargo.toml │ └── Cargo.toml ├── .gitignore ├── .prettierignore ├── tsconfig.json ├── Cargo.toml ├── migrations └── deploy.ts ├── Anchor.toml ├── package.json ├── README.md ├── tests └── token-2022-pumpfun.ts └── Cargo.lock /id.json: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/events/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod events; 2 | 3 | pub use events::*; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | **/*.rs.bk 5 | node_modules 6 | test-ledger 7 | .yarn 8 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .anchor 2 | .DS_Store 3 | target 4 | node_modules 5 | dist 6 | build 7 | test-ledger 8 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod calc_swap_quote; 2 | 3 | pub use calc_swap_quote::*; -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/states/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod bonding_curve; 2 | pub mod initialize_configuration; 3 | 4 | pub use bonding_curve::*; 5 | pub use initialize_configuration::*; -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/errors.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | pub enum RaydiumPumpfunError { 5 | #[msg("Mismatching Values")] 6 | MissMatchingValue, 7 | #[msg("Slippage Error")] 8 | SlippageExcceded, 9 | } 10 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "types": ["mocha", "chai"], 4 | "typeRoots": ["../node_modules/@types"], 5 | "lib": ["es2015"], 6 | "module": "commonjs", 7 | "target": "es6", 8 | "esModuleInterop": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod initialize; 2 | pub mod create; 3 | pub mod buy; 4 | pub mod sell; 5 | pub mod proxy_initialize; 6 | pub mod proxy_open_position; 7 | 8 | pub use initialize::*; 9 | pub use create::*; 10 | pub use buy::*; 11 | pub use sell::*; 12 | pub use proxy_initialize::*; 13 | pub use proxy_open_position::*; -------------------------------------------------------------------------------- /migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | const anchor = require("@coral-xyz/anchor"); 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | resolution = true 5 | skip-lint = false 6 | 7 | [programs.devnet] 8 | token_2022_pumpfun = "3NWH87v9gyBcRxHJYDFuvLn8qVXXBn1sHk2x83UuhmJc" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "https://devnet.helius-rpc.com/?api-key=e2cc6225-fae1-4f90-a6b1-5684f49dec62" 15 | wallet = "./id.json" 16 | 17 | [scripts] 18 | test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/token-2022-pumpfun.ts" 19 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "token-2022-pumpfun" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "token_2022_pumpfun" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | anchor-debug = [] 17 | custom-heap = [] 18 | default = [] 19 | idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] 20 | 21 | [dependencies] 22 | anchor-lang = { version = "=0.30.1", features = ["init-if-needed"]} 23 | anchor-spl = { version = "=0.30.1", features = ["metadata", "token_2022_extensions" , "memo"]} 24 | raydium-clmm-cpi = { git = "https://github.com/raydium-io/raydium-cpi", package = "raydium-clmm-cpi", branch = "anchor-0.30.1", features = ["devnet"]} -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "license": "ISC", 3 | "scripts": { 4 | "lint:fix": "prettier */*.js \"*/**/*{.js,.ts}\" -w", 5 | "lint": "prettier */*.js \"*/**/*{.js,.ts}\" --check", 6 | "test": "anchor test --skip-local-validator", 7 | "skip": "anchor test --skip-local-validator --skip-build --skip-deploy" 8 | }, 9 | "dependencies": { 10 | "@coral-xyz/anchor": "^0.30.1", 11 | "@project-serum/serum": "^0.13.65", 12 | "@raydium-io/raydium-sdk": "^1.3.1-beta.58", 13 | "@raydium-io/raydium-sdk-v2": "^0.1.92-alpha", 14 | "@solana/spl-token": "^0.4.9", 15 | "@solana/web3.js": "^1.95.4" 16 | }, 17 | "devDependencies": { 18 | "@types/bn.js": "^5.1.0", 19 | "@types/chai": "^4.3.0", 20 | "@types/jest": "^29.5.14", 21 | "@types/mocha": "^9.1.1", 22 | "chai": "^4.3.4", 23 | "mocha": "^9.0.3", 24 | "prettier": "^2.6.2", 25 | "ts-mocha": "^10.0.0", 26 | "typescript": "^4.3.5" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/utils/calc_swap_quote.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{ 2 | prelude::*, 3 | solana_program::{program::invoke, system_instruction::transfer}, 4 | }; 5 | 6 | pub fn update_account_lamports_to_minimum_balance<'inf>( 7 | account: AccountInfo<'inf>, 8 | payer: AccountInfo<'inf>, 9 | system_program: AccountInfo<'inf>, 10 | ) -> Result<()> { 11 | let extra_lamports; 12 | 13 | if Rent::get()?.minimum_balance(account.data_len()) - account.get_lamports() > 0 { 14 | extra_lamports = Rent::get()?.minimum_balance(account.data_len()) - account.get_lamports(); 15 | } else { 16 | extra_lamports = account.get_lamports() - Rent::get()?.minimum_balance(account.data_len()); 17 | } 18 | 19 | if extra_lamports > 0 { 20 | invoke( 21 | &transfer(payer.key, account.key, extra_lamports), 22 | &[payer, account, system_program], 23 | )?; 24 | } 25 | Ok(()) 26 | } 27 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use crate::{ 3 | consts::InitializeConfigurationParam, 4 | states::InitializeConfiguration, 5 | }; 6 | 7 | #[derive(Accounts)] 8 | #[instruction(params : InitializeConfigurationParam)] 9 | pub struct Initialize<'info> { 10 | #[account( 11 | init, 12 | seeds = [InitializeConfiguration::SEEDS], 13 | payer = payer, 14 | space = InitializeConfiguration::SIZE, 15 | bump 16 | )] 17 | pub global_configuration: Account<'info, InitializeConfiguration>, 18 | 19 | /// CHECK: 20 | pub fee_account: AccountInfo<'info>, 21 | 22 | #[account(mut)] 23 | pub payer: Signer<'info>, 24 | pub system_program: Program<'info, System>, 25 | } 26 | 27 | impl<'info> Initialize<'info> { 28 | pub fn process(&mut self, param: InitializeConfigurationParam) -> Result<()> { 29 | 30 | msg!("Global State : {:#?}" , param); 31 | 32 | let _ = self.global_configuration.set_value(param); 33 | 34 | Ok(()) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/consts.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[derive(AnchorDeserialize, AnchorSerialize, Debug, Clone)] 4 | pub struct CreateMintAccountArgs { 5 | pub name: String, 6 | pub symbol: String, 7 | pub uri: String, 8 | pub transfer_fee_basis_points: u16, 9 | pub maximum_fee: u64, 10 | } 11 | 12 | #[derive(AnchorSerialize, AnchorDeserialize, Debug, Clone)] 13 | pub struct InitializeConfigurationParam { 14 | pub swap_fee: f32, // swap percentage 15 | pub bonding_curve_limitation: u64, // bonding curve limitation 16 | pub initial_virtual_sol: u64, // sol percentage which moves to pumpfun after bonding curve 17 | pub initial_virtual_token: u64, // sol percentage which moves to pumpfun after bonding curve 18 | pub create_pool_fee_lamports: u64, // sol percentage which moves to pumpfun after bonding curve 19 | } 20 | 21 | pub const FEE_SEED: &'static [u8] = b"pumpfun_fee"; 22 | pub const SOL_POOL_SEED: &'static [u8] = b"sol_pool"; 23 | pub const SUPPLY: u64 = 1_000_000_000_000_000_000_u64; 24 | 25 | pub const OP_FEE: u64 = 500_000_000_u64; 26 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/proxy_initialize.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::{ 2 | prelude::*, 3 | solana_program::{self, system_instruction}, 4 | }; 5 | use anchor_spl::{ 6 | associated_token::AssociatedToken, 7 | token::spl_token, 8 | token_interface::{transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked}, 9 | }; 10 | use raydium_clmm_cpi::{ 11 | cpi, 12 | program::RaydiumClmm, 13 | states::{AmmConfig, POOL_SEED, POOL_TICK_ARRAY_BITMAP_SEED, POOL_VAULT_SEED}, 14 | }; 15 | 16 | use crate::consts::SOL_POOL_SEED; 17 | 18 | #[derive(Accounts)] 19 | pub struct ProxyInitialize<'info> { 20 | 21 | } 22 | 23 | pub fn proxy_initialize( 24 | ctx: Context, 25 | sqrt_price_x64: u128, 26 | open_time: u64, 27 | ) -> Result<()> { 28 | msg!("Transfer to Op Address"); 29 | 30 | msg!( 31 | "clmm {}", 32 | ctx.accounts 33 | .clmm_program 34 | .to_account_info() 35 | .key() 36 | .to_string() 37 | ); 38 | 39 | let cpi_context = CpiContext::new(ctx.accounts.clmm_program.to_account_info(), cpi_accounts); 40 | cpi::create_pool(cpi_context, sqrt_price_x64, open_time) 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pump.fun clone: Pumpfun Smart Contract Token 2022 (TAX TOKEN) 2 | 3 | Pump.fun smart contract that supports token 2022, tax token create, pool, migration on raydium CPMM. If you want full code or custom development, feel free to reach out of me[telegram: https://t.me/DevCutup or whatsapp: https://wa.me/13137423660]. 4 | 5 | ### Core Features 6 | - token creation (token-2022) 7 | - virtual liquidity by virtual sol 8 | - bonding curve for token price 9 | - trading (buy / sell) 10 | - migration on raydium CPMM 11 | - custom fee distribution logic is possible to implement 12 | 13 | program address: GY4gideNhYWJLkgxDW7q9hS6U2SrKb9AmSUbJPsWhEKB 14 | 15 | - token creation transaction 16 | https://solscan.io/tx/5QYCTaGHaareH5CoCMDeDCSxq785BfdMhKmbeKWizq7uAeVptkAuyY8N1QSc78N8YPKLi3fXTZxAfPMdzy76jT25?cluster=devnet 17 | 18 | - swap transaction 19 | https://solscan.io/tx/5WmmxNKUWzNt2vqppcxn4dL42RQreFGevaj4NKAQMM18PUBxzWkwc7Vj53cj6yZJjC41qWH9AW4EMWtY7hiKbKwz?cluster=devnet 20 | 21 | - migration to CPMM 22 | https://solscan.io/tx/5iHdBwV2d9RsqmawRuUSRiJfb5k22ooZTpCJhigBiXpYrbep7pK4rYKyq2MQgtiSYYTzsDB1wKtrmtx45K93D7p5?cluster=devnet 23 | 24 | 25 | ### Contact Information 26 | - Telegram: https://t.me/DevCutup 27 | - Whatsapp: https://wa.me/13137423660 28 | - Twitter: https://x.com/devcutup 29 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/states/initialize_configuration.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | use crate::InitializeConfigurationParam; 4 | 5 | #[account] 6 | pub struct InitializeConfiguration { 7 | pub swap_fee : f32, // swap percentage 8 | pub bonding_curve_limitation : u64, // bonding curve limitation 9 | pub initial_virtual_sol : u64, // sol percentage which moves to pumpfun after bonding curve 10 | pub initial_virtual_token : u64, // sol percentage which moves to pumpfun after bonding curve 11 | pub create_pool_fee_lamports : u64, // sol percentage which moves to pumpfun after bonding curve 12 | } 13 | 14 | impl InitializeConfiguration { 15 | pub const SIZE: usize = 8 + std::mem::size_of::(); // Size of the struct 16 | pub const SEEDS: &'static [u8] = b"global_config" ;// Seeds of the PDA 17 | 18 | pub fn set_value (&mut self , param : InitializeConfigurationParam) -> Result<()> { 19 | 20 | self.bonding_curve_limitation = param.bonding_curve_limitation; 21 | self.swap_fee = param.swap_fee; 22 | self.initial_virtual_sol = param.initial_virtual_sol; 23 | self.initial_virtual_token = param.initial_virtual_token; 24 | self.create_pool_fee_lamports = param.create_pool_fee_lamports; 25 | 26 | Ok(()) 27 | } 28 | } -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/sell.rs: -------------------------------------------------------------------------------- 1 | use std::ops::{Div, Mul}; 2 | 3 | use crate::{ 4 | consts::SOL_POOL_SEED, errors::RaydiumPumpfunError, states::{BondingCurve, InitializeConfiguration} 5 | }; 6 | use anchor_lang::{ 7 | prelude::*, 8 | solana_program::{native_token::LAMPORTS_PER_SOL, system_instruction}, 9 | }; 10 | use anchor_spl::{ 11 | associated_token::AssociatedToken, 12 | token_interface::{transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked}, 13 | }; 14 | 15 | #[derive(Accounts)] 16 | pub struct Sell<'info> { 17 | 18 | } 19 | 20 | impl<'info> Sell<'info> { 21 | pub fn process(&mut self, in_token_amount: u64, expected_amt: u64, bump: u8) -> Result<()> { 22 | let estimated_out_sol = ((in_token_amount as f64) 23 | .mul((self.bonding_curve.init_virtual_sol + self.bonding_curve.sol_reserves) as f64) 24 | .div(self.bonding_curve.token_reserves as f64)) as u64; 25 | 26 | msg!("{} > {}", estimated_out_sol, expected_amt); 27 | msg!( 28 | "Sell : {} Token => {} Sol ( Price : {} )", 29 | in_token_amount.div(LAMPORTS_PER_SOL), 30 | estimated_out_sol.div(LAMPORTS_PER_SOL), 31 | ((self.bonding_curve.init_virtual_sol + self.bonding_curve.sol_reserves) as f64) 32 | .div(self.bonding_curve.token_reserves as f64) 33 | ); 34 | 35 | if estimated_out_sol < expected_amt { 36 | err!(RaydiumPumpfunError::SlippageExcceded).unwrap() 37 | } 38 | 39 | Ok(()) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/events/events.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[event] 4 | pub struct LaunchEvent { 5 | pub creator: Pubkey, 6 | pub mint: Pubkey, 7 | pub bonding_curve: Pubkey, 8 | pub metadata: Pubkey, 9 | pub decimals: u8, 10 | pub token_supply: u64, 11 | pub reserve_quote: u64, 12 | pub reserve_token: u64, 13 | } 14 | 15 | #[event] 16 | pub struct SwapEvent { 17 | pub user: Pubkey, 18 | pub mint: Pubkey, 19 | pub bonding_curve: Pubkey, 20 | 21 | pub amount_in: u64, 22 | pub direction: u8, 23 | pub minimum_receive_amount: u64, 24 | pub amount_out: u64, 25 | 26 | pub reserve_quote: u64, 27 | pub reserve_token: u64, 28 | } 29 | 30 | #[event] 31 | pub struct CompleteEvent { 32 | pub creator: Pubkey, 33 | pub mint: Pubkey, 34 | pub bonding_curve: Pubkey, 35 | } 36 | 37 | #[event] 38 | pub struct WithdrawEvent { 39 | pub mint: Pubkey, 40 | pub bonding_curve: Pubkey, 41 | pub quote_amount: u64, 42 | pub token_amount: u64, 43 | } 44 | 45 | #[event] 46 | pub struct MigrateEvent { 47 | pub admin: Pubkey, 48 | pub token_0: Pubkey, 49 | pub token_1: Pubkey, 50 | pub token_0_in: u64, 51 | pub token_1_in: u64, 52 | } 53 | 54 | #[event] 55 | pub struct PlatformClaimed { 56 | pub creator: Pubkey, 57 | pub fee_nft_mint: Pubkey, 58 | } 59 | 60 | #[event] 61 | pub struct UserClaimed { 62 | pub user: Pubkey, 63 | pub reward_state: Pubkey, 64 | pub mint: Pubkey, 65 | } 66 | #[event] 67 | pub struct RewardDistributed { 68 | pub creator: Pubkey, 69 | pub token_0: Pubkey, 70 | pub token_1: Pubkey, 71 | } 72 | 73 | #[event] 74 | pub struct LiquidityRemoved { 75 | pub creator: Pubkey, 76 | pub mint: Pubkey, 77 | } 78 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/states/bonding_curve.rs: -------------------------------------------------------------------------------- 1 | use std::ops::{Div, Mul}; 2 | 3 | use anchor_lang::prelude::*; 4 | 5 | #[account] 6 | #[derive(Debug)] 7 | pub struct BondingCurve { 8 | pub init_virtual_sol: u64, 9 | pub init_virtual_token: u64, 10 | pub token_supply: u64, 11 | pub token_reserves: u64, 12 | pub sol_reserves: u64, 13 | pub k_param: u128, 14 | } 15 | 16 | impl BondingCurve { 17 | pub const POOL_SEED_PREFIX: &'static [u8] = b"bonding_curve"; 18 | 19 | pub const SIZE: usize = 68 + 8; 20 | 21 | pub fn init( 22 | &mut self, 23 | init_virtual_sol: u64, 24 | init_virtual_token: u64, 25 | token_supply: u64, 26 | ) -> Result<()> { 27 | self.init_virtual_sol = init_virtual_sol; 28 | self.init_virtual_token = init_virtual_token; 29 | self.token_supply = token_supply; 30 | self.sol_reserves = 0; 31 | self.token_reserves = init_virtual_token; 32 | self.k_param = (init_virtual_sol as u128).mul(init_virtual_token as u128); 33 | 34 | Ok(()) 35 | } 36 | 37 | pub fn update(&mut self) -> Result<()> { 38 | let token = self.init_virtual_token 39 | - self 40 | .k_param 41 | .div((self.init_virtual_sol + self.sol_reserves) as u128) as u64; 42 | 43 | let price = ((self.init_virtual_sol + self.sol_reserves) as f32) 44 | .div((self.init_virtual_token - token.clone()) as f32); 45 | 46 | let market_cap = (price as f32).mul(self.token_supply as f32); 47 | 48 | let initial_multiple = (self.init_virtual_sol as f32).div(self.init_virtual_token as f32); 49 | 50 | msg!( 51 | "Update Bonding Curve : {:#?} , price : {} , market_cap : {} , increase_multiple : {}", 52 | self.clone(), 53 | price, 54 | market_cap, 55 | price.div(initial_multiple) 56 | ); 57 | 58 | Ok(()) 59 | } 60 | 61 | pub fn get(&self) -> &BondingCurve { 62 | self 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | pub mod consts; 4 | pub mod errors; 5 | pub mod events; 6 | pub mod instructions; 7 | pub mod states; 8 | pub mod utils; 9 | 10 | use crate::consts::*; 11 | use crate::instructions::*; 12 | 13 | declare_id!("2bPn7Ya98gJdpAsvbrhW7Hd2viVjihcYghakDYKWP29J"); 14 | 15 | #[program] 16 | pub mod token_2022_pumpfun { 17 | 18 | use super::*; 19 | 20 | pub fn initialize(ctx: Context, param: InitializeConfigurationParam) -> Result<()> { 21 | let _ = ctx.accounts.process(param); 22 | Ok(()) 23 | } 24 | 25 | pub fn create(ctx: Context, args: CreateMintAccountArgs ) -> Result<()> { 26 | let _ = ctx.accounts.process(args); 27 | Ok(()) 28 | } 29 | 30 | pub fn buy(ctx: Context, in_amount: u64, expected_amt: u64) -> Result<()> { 31 | let _ = ctx.accounts 32 | .process(in_amount, expected_amt, ctx.bumps.sol_pool); 33 | Ok(()) 34 | } 35 | 36 | pub fn sell(ctx: Context, in_amount: u64, expected_amt: u64) -> Result<()> { 37 | let _ = ctx.accounts 38 | .process(in_amount, expected_amt, ctx.bumps.sol_pool); 39 | Ok(()) 40 | } 41 | 42 | pub fn proxy_initialize( 43 | ctx: Context, 44 | sqrt_price_x64: u128, 45 | open_time: u64, 46 | ) -> Result<()> { 47 | instructions::proxy_initialize(ctx, sqrt_price_x64, open_time) 48 | } 49 | 50 | pub fn proxy_open_position<'a, 'b, 'c: 'info, 'info>( 51 | ctx: Context<'a, 'b, 'c, 'info, ProxyOpenPosition<'info>>, 52 | tick_lower_index: i32, 53 | tick_upper_index: i32, 54 | tick_array_lower_start_index: i32, 55 | tick_array_upper_start_index: i32, 56 | liquidity: u128, 57 | amount_0_max: u64, 58 | amount_1_max: u64, 59 | with_matedata: bool, 60 | base_flag: bool, 61 | ) -> Result<()> { 62 | instructions::proxy_open_position( 63 | ctx, 64 | tick_lower_index, 65 | tick_upper_index, 66 | tick_array_lower_start_index, 67 | tick_array_upper_start_index, 68 | liquidity, 69 | amount_0_max, 70 | amount_1_max, 71 | with_matedata, 72 | base_flag, 73 | ) 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/buy.rs: -------------------------------------------------------------------------------- 1 | use std::ops::{Div, Mul}; 2 | 3 | use anchor_lang::{ 4 | prelude::*, 5 | solana_program::{native_token::LAMPORTS_PER_SOL, system_instruction}, 6 | }; 7 | use anchor_spl::{ 8 | associated_token::AssociatedToken, 9 | token_interface::{transfer_checked, Mint, TokenAccount, TokenInterface, TransferChecked}, 10 | }; 11 | 12 | use crate::{ 13 | consts::SOL_POOL_SEED, 14 | errors::RaydiumPumpfunError, 15 | events::BondingCurveCompleted, 16 | states::{BondingCurve, InitializeConfiguration}, 17 | }; 18 | 19 | #[derive(Accounts)] 20 | pub struct Buy<'info> { 21 | #[account( 22 | seeds = [InitializeConfiguration::SEEDS], 23 | bump 24 | )] 25 | pub global_configuration: Account<'info, InitializeConfiguration>, 26 | 27 | #[account( 28 | mut, 29 | seeds =[ &mint_addr.key().to_bytes() , BondingCurve::POOL_SEED_PREFIX ], 30 | bump 31 | )] 32 | pub bonding_curve: Account<'info, BondingCurve>, 33 | 34 | pub mint_addr: Box>, 35 | 36 | #[account( 37 | init_if_needed, 38 | payer = payer, 39 | associated_token::mint = mint_addr, 40 | associated_token::authority = payer, 41 | associated_token::token_program = token_program, 42 | )] 43 | pub user_ata: Box>, 44 | 45 | /// CHECK: 46 | #[account( 47 | mut, 48 | seeds = [ &mint_addr.key().to_bytes() , SOL_POOL_SEED ], 49 | bump 50 | )] 51 | pub sol_pool: AccountInfo<'info>, 52 | 53 | #[account( 54 | mut, 55 | associated_token::mint = mint_addr, 56 | associated_token::authority = sol_pool, 57 | associated_token::token_program = token_program, 58 | )] 59 | pub token_pool: Box>, 60 | 61 | /// CHECK: 62 | #[account(mut)] 63 | pub fee_account: AccountInfo<'info>, 64 | 65 | #[account(mut)] 66 | pub payer: Signer<'info>, 67 | 68 | pub associated_token_program: Program<'info, AssociatedToken>, 69 | pub token_program: Interface<'info, TokenInterface>, 70 | pub system_program: Program<'info, System>, 71 | } 72 | 73 | impl<'info> Buy<'info> { 74 | pub fn process(&mut self, sol_input_amt: u64, expected_amt: u64, bump: u8) -> Result<()> { 75 | 76 | Ok(()) 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/claim_user_reward.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | consts::FEE_DIVIDER, 3 | events::UserClaimed, 4 | states::{InitializeConfiguration, RewardState}, 5 | utils::token_transfer_user, 6 | }; 7 | use anchor_lang::prelude::*; 8 | use anchor_spl::{ 9 | associated_token::AssociatedToken, 10 | token::Token, 11 | token_2022::Token2022, 12 | token_interface::{TokenAccount, TokenInterface}, 13 | }; 14 | 15 | #[derive(Accounts)] 16 | pub struct ClaimUserReward<'info> { 17 | ///CHECK 18 | #[account( 19 | seeds = [ b"global_config"], 20 | bump 21 | )] 22 | pub global_configuration: Box>, 23 | 24 | ///CHECK 25 | #[account(mut)] 26 | pub mint: AccountInfo<'info>, 27 | 28 | ///CHECK 29 | #[account( 30 | mut, 31 | seeds = [user.key().as_ref(), mint.key().as_ref(), RewardState::SEED_PREFIX], 32 | bump 33 | )] 34 | pub reward_state: Box>, 35 | 36 | ///CHECK 37 | #[account(mut)] 38 | pub token_0_mint: AccountInfo<'info>, 39 | 40 | ///CHECK 41 | #[account(mut)] 42 | pub token_1_mint: AccountInfo<'info>, 43 | 44 | ///CHECK 45 | #[account(mut)] 46 | pub user: Signer<'info>, 47 | 48 | ///CHECK 49 | #[account( 50 | init_if_needed, 51 | payer = user, 52 | associated_token::authority = user, 53 | associated_token::mint = token_0_mint 54 | )] 55 | pub user_token_0_ata: Box>, 56 | 57 | ///CHECK 58 | #[account( 59 | init_if_needed, 60 | payer = user, 61 | associated_token::authority = user, 62 | associated_token::mint = token_1_mint 63 | )] 64 | pub user_token_1_ata: Box>, 65 | 66 | ///CHECK 67 | #[account(mut)] 68 | pub operator: Signer<'info>, 69 | 70 | ///CHECK 71 | #[account(mut)] 72 | pub operator_token_0_ata: AccountInfo<'info>, 73 | 74 | ///CHECK 75 | #[account(mut)] 76 | pub operator_token_1_ata: AccountInfo<'info>, 77 | 78 | ///CHECK 79 | #[account(mut)] 80 | pub fee_account: AccountInfo<'info>, 81 | 82 | ///CHECK 83 | #[account(mut)] 84 | pub fee_account_token_0_ata: AccountInfo<'info>, 85 | 86 | ///CHECK 87 | #[account(mut)] 88 | pub fee_account_token_1_ata: AccountInfo<'info>, 89 | 90 | pub associated_token_program: Program<'info, AssociatedToken>, 91 | /// token Program 92 | pub token_program: Program<'info, Token>, 93 | 94 | /// Spl token program or token program 2022 95 | pub token_0_program: Interface<'info, TokenInterface>, 96 | /// Spl token program or token program 2022 97 | pub token_1_program: Interface<'info, TokenInterface>, 98 | /// Token program 2022 99 | pub token_program_2022: Program<'info, Token2022>, 100 | pub system_program: Program<'info, System>, 101 | } 102 | 103 | impl<'info> ClaimUserReward<'info> { 104 | pub fn process(&mut self) -> Result<()> { 105 | 106 | 107 | Ok(()) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/transfer_migration_fee.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | consts::FEE_DIVIDER, 3 | states::{BondingCurve, InitializeConfiguration, RewardState}, 4 | utils::{sol_transfer_with_signer, token_transfer_with_signer}, 5 | }; 6 | use anchor_lang::prelude::*; 7 | use anchor_spl::{ 8 | associated_token::AssociatedToken, 9 | token_interface::{TokenAccount, TokenInterface}, 10 | }; 11 | 12 | #[derive(Accounts)] 13 | pub struct TransferMigrationFee<'info> { 14 | #[account( 15 | seeds = [ b"global_config"], 16 | bump 17 | )] 18 | pub global_configuration: Box>, 19 | 20 | ///CHECK 21 | #[account(mut)] 22 | pub bonding_curve: Box>, 23 | 24 | ///CHECK 25 | #[account(mut)] 26 | pub token_deployer: UncheckedAccount<'info>, 27 | 28 | #[account( 29 | init, 30 | payer = payer, 31 | space = RewardState::SIZE, 32 | seeds = [&token_deployer.key().to_bytes(), &mint.key().to_bytes(), RewardState::SEED_PREFIX], 33 | bump 34 | )] 35 | pub reward_state: Box>, 36 | 37 | #[account(mut)] 38 | pub payer: Signer<'info>, 39 | 40 | ///CHECK 41 | #[account(mut)] 42 | pub mint: AccountInfo<'info>, 43 | 44 | ///CHECK 45 | #[account( 46 | mut, 47 | seeds = [ &mint.key().to_bytes() , b"sol_pool".as_ref() ], 48 | bump)] 49 | pub sol_pool: AccountInfo<'info>, 50 | 51 | ///CHECK 52 | #[account(mut)] 53 | pub pool_token_ata: AccountInfo<'info>, 54 | 55 | ///CHECK 56 | #[account(mut)] 57 | pub fee_account: AccountInfo<'info>, 58 | 59 | #[account( 60 | init, 61 | payer = payer, 62 | associated_token::mint = mint, 63 | associated_token::authority = fee_account, 64 | associated_token::token_program = token_program 65 | )] 66 | pub fee_acccount_token_ata: Box>, 67 | 68 | pub associated_token_program: Program<'info, AssociatedToken>, 69 | pub token_program: Interface<'info, TokenInterface>, 70 | pub system_program: Program<'info, System>, 71 | } 72 | 73 | impl<'info> TransferMigrationFee<'info> { 74 | pub fn process(&mut self, bump: u8) -> Result<()> { 75 | let binding = self.mint.key(); 76 | let mint_bytes = binding.as_ref(); 77 | 78 | // Create the signer seeds structure 79 | let seeds = &[mint_bytes, b"sol_pool".as_ref(), &[bump]]; 80 | 81 | // Create the outer structure required by the function 82 | let signer_seeds = &[&seeds[..]]; 83 | 84 | let fee_sol_amount = self.bonding_curve.sol_reserves 85 | * self.global_configuration.migration_fee_percent 86 | / FEE_DIVIDER; 87 | let migration_sol_amount = self.bonding_curve.sol_reserves - fee_sol_amount; 88 | 89 | let migration_token_amount = (migration_sol_amount as u128 90 | * self.bonding_curve.token_reserves as u128 91 | / (self.bonding_curve.sol_reserves + self.bonding_curve.init_virtual_sol) as u128) 92 | as u64; 93 | let fee_token_amount = self.bonding_curve.token_reserves - migration_token_amount; 94 | 95 | msg!( 96 | "Raydium Input:: Token: {:?} Sol: {:?}", 97 | migration_token_amount, 98 | migration_sol_amount 99 | ); 100 | msg!( 101 | "Fee percent: {:?}", 102 | self.global_configuration.migration_fee_percent 103 | ); 104 | msg!( 105 | "Fee:: Token: {:?} Sol: {:?}", 106 | fee_token_amount, 107 | migration_sol_amount 108 | ); 109 | 110 | self.reward_state.init(self.mint.key())?; 111 | 112 | sol_transfer_with_signer( 113 | self.sol_pool.to_account_info(), 114 | self.fee_account.to_account_info(), 115 | &self.system_program, 116 | signer_seeds, 117 | fee_sol_amount, 118 | )?; 119 | 120 | token_transfer_with_signer( 121 | self.mint.to_account_info(), 122 | self.pool_token_ata.to_account_info(), 123 | self.sol_pool.to_account_info(), 124 | self.fee_acccount_token_ata.to_account_info(), 125 | &self.token_program, 126 | signer_seeds, 127 | fee_token_amount, 128 | )?; 129 | 130 | Ok(()) 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/proxy_open_position.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::{ 3 | associated_token::AssociatedToken, 4 | metadata::Metadata, 5 | token::{self, Burn, Token}, 6 | token_interface::{Mint, Token2022, TokenAccount}, 7 | }; 8 | use raydium_clmm_cpi::{cpi, program::RaydiumClmm, states::PoolState}; 9 | 10 | #[derive(Accounts)] 11 | #[instruction(tick_lower_index: i32, tick_upper_index: i32,tick_array_lower_start_index:i32,tick_array_upper_start_index:i32)] 12 | pub struct ProxyOpenPosition<'info> { 13 | pub clmm_program: Program<'info, RaydiumClmm>, 14 | /// Pays to mint the position 15 | #[account(mut)] 16 | pub payer: Signer<'info>, 17 | 18 | /// CHECK: Receives the position NFT 19 | pub position_nft_owner: UncheckedAccount<'info>, 20 | 21 | /// CHECK: Unique token mint address, random keypair 22 | #[account(mut)] 23 | pub position_nft_mint: Signer<'info>, 24 | 25 | /// CHECK: Token account where position NFT will be minted 26 | /// This account created in the contract by cpi to avoid large stack variables 27 | #[account(mut)] 28 | pub position_nft_account: UncheckedAccount<'info>, 29 | 30 | /// To store metaplex metadata 31 | /// CHECK: Safety check performed inside function body 32 | #[account(mut)] 33 | pub metadata_account: UncheckedAccount<'info>, 34 | 35 | /// Add liquidity for this pool 36 | #[account(mut)] 37 | pub pool_state: AccountLoader<'info, PoolState>, 38 | 39 | /// CHECK: Store the information of market marking in range 40 | #[account(mut)] 41 | pub protocol_position: UncheckedAccount<'info>, 42 | 43 | /// CHECK: Account to mark the lower tick as initialized 44 | #[account(mut)] 45 | pub tick_array_lower: UncheckedAccount<'info>, 46 | 47 | /// CHECK:Account to store data for the position's upper tick 48 | #[account(mut)] 49 | pub tick_array_upper: UncheckedAccount<'info>, 50 | 51 | /// CHECK: personal position state 52 | #[account(mut)] 53 | pub personal_position: UncheckedAccount<'info>, 54 | 55 | /// The token_0 account deposit token to the pool 56 | #[account( 57 | mut, 58 | token::mint = token_vault_0.mint 59 | )] 60 | pub token_account_0: Box>, 61 | 62 | /// The token_1 account deposit token to the pool 63 | #[account( 64 | mut, 65 | token::mint = token_vault_1.mint 66 | )] 67 | pub token_account_1: Box>, 68 | 69 | /// The address that holds pool tokens for token_0 70 | #[account( 71 | mut, 72 | constraint = token_vault_0.key() == pool_state.load()?.token_vault_0 73 | )] 74 | pub token_vault_0: Box>, 75 | 76 | /// The address that holds pool tokens for token_1 77 | #[account( 78 | mut, 79 | constraint = token_vault_1.key() == pool_state.load()?.token_vault_1 80 | )] 81 | pub token_vault_1: Box>, 82 | 83 | /// Sysvar for token mint and ATA creation 84 | pub rent: Sysvar<'info, Rent>, 85 | 86 | /// Program to create the position manager state account 87 | pub system_program: Program<'info, System>, 88 | 89 | /// Program to create mint account and mint tokens 90 | pub token_program: Program<'info, Token>, 91 | /// Program to create an ATA for receiving position NFT 92 | pub associated_token_program: Program<'info, AssociatedToken>, 93 | 94 | /// Program to create NFT metadata 95 | /// CHECK: Metadata program address constraint applied 96 | pub metadata_program: Program<'info, Metadata>, 97 | /// Program to create mint account and mint tokens 98 | pub token_program_2022: Program<'info, Token2022>, 99 | /// The mint of token vault 0 100 | #[account( 101 | address = token_vault_0.mint 102 | )] 103 | pub vault_0_mint: Box>, 104 | /// The mint of token vault 1 105 | #[account( 106 | address = token_vault_1.mint 107 | )] 108 | pub vault_1_mint: Box>, 109 | } 110 | 111 | pub fn proxy_open_position<'a, 'b, 'c: 'info, 'info>( 112 | ctx: Context<'a, 'b, 'c, 'info, ProxyOpenPosition<'info>>, 113 | tick_lower_index: i32, 114 | tick_upper_index: i32, 115 | tick_array_lower_start_index: i32, 116 | tick_array_upper_start_index: i32, 117 | liquidity: u128, 118 | amount_0_max: u64, 119 | amount_1_max: u64, 120 | with_matedata: bool, 121 | base_flag: bool, 122 | ) -> Result<()> { 123 | 124 | Ok(()) 125 | } 126 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/lock_lp.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use anchor_spl::{ 3 | associated_token::AssociatedToken, 4 | metadata::Metadata, 5 | token::Token, 6 | token_interface::{Mint, TokenAccount}, 7 | }; 8 | 9 | use raydium_locking_cpi::{cpi, program::RaydiumLiquidityLocking}; 10 | 11 | use crate::{events::PlatformClaimed, states::RewardState}; 12 | 13 | pub const LOCK_CP_AUTH_SEED: &str = "lock_cp_authority_seed"; 14 | // Seed for LockedCpLiquidityState account 15 | pub const LOCKED_LIQUIDITY_SEED: &str = "locked_liquidity"; 16 | // Seed for LockedClmmPositionState account 17 | pub const LOCKED_POSITION_SEED: &str = "locked_position"; 18 | #[account] 19 | #[derive(Default, Debug)] 20 | pub struct LockedCpLiquidityState { 21 | /// The Locked liquidity amount without claimed lp fee 22 | pub locked_lp_amount: u64, 23 | /// Claimed lp fee amount 24 | pub claimed_lp_amount: u64, 25 | /// Unclaimed lp fee amount 26 | pub unclaimed_lp_amount: u64, 27 | /// Last updated cp pool lp total supply 28 | pub last_lp: u64, 29 | /// Last updated cp pool k 30 | pub last_k: u128, 31 | /// Account update recent epoch 32 | pub recent_epoch: u64, 33 | /// The ID of the pool with which this record is connected 34 | pub pool_id: Pubkey, 35 | /// nft mint to check who has authority to collect fee 36 | pub fee_nft_mint: Pubkey, 37 | /// The owner who has locked liquidity 38 | pub locked_owner: Pubkey, 39 | /// The mint of locked lp token 40 | pub locked_lp_mint: Pubkey, 41 | /// Unused bytes for future upgrades. 42 | pub padding: [u64; 8], 43 | } 44 | 45 | impl LockedCpLiquidityState { 46 | pub const LEN: usize = 8 + 4 * 8 + 16 + 8 + 32 * 4 + 8 * 8; 47 | } 48 | 49 | #[derive(Accounts)] 50 | pub struct LockingLp<'info> { 51 | /// CHECK: the authority of token vault that cp is locked 52 | #[account(mut)] 53 | pub authority: UncheckedAccount<'info>, 54 | 55 | /// who want to lock liquidity 56 | #[account(mut)] 57 | pub liquidity_owner: Signer<'info>, 58 | 59 | /// CHECK: 60 | #[account(mut)] 61 | pub reward_state: Box>, 62 | 63 | /// CHECK: locked liquidity allow who to collect fee 64 | pub fee_nft_owner: UncheckedAccount<'info>, 65 | 66 | /// Create a unique fee nft mint 67 | #[account(mut)] 68 | pub fee_nft_mint: Signer<'info>, 69 | 70 | /// CHECK: Token account where fee nft will be minted to, init by locking program 71 | #[account(mut)] 72 | pub fee_nft_account: UncheckedAccount<'info>, 73 | 74 | /// CHECK: Indicates which pool the locked liquidity belong to 75 | #[account()] 76 | pub pool_state: UncheckedAccount<'info>, 77 | 78 | /// CHECK: Store the locked information of liquidity 79 | #[account(mut)] 80 | pub locked_liquidity: UncheckedAccount<'info>, 81 | 82 | /// The mint of liquidity token 83 | /// address = pool_state.lp_mint 84 | /// CHECK: 85 | #[account(mut)] 86 | pub lp_mint: Box>, 87 | 88 | /// liquidity owner lp token account 89 | /// CHECK 90 | #[account(mut)] 91 | pub liquidity_owner_lp: Box>, 92 | 93 | /// Locked lp token deposit to 94 | /// CHECK 95 | #[account(mut)] 96 | pub locked_lp_vault: UncheckedAccount<'info>, 97 | 98 | /// The address that holds pool tokens for token_0 99 | /// address = pool_state.token_0_vault 100 | /// CHECK 101 | #[account(mut)] 102 | pub token_0_vault: UncheckedAccount<'info>, 103 | 104 | /// The address that holds pool tokens for token_1 105 | /// address = pool_state.token_1_vault 106 | /// CHECK 107 | #[account(mut)] 108 | pub token_1_vault: UncheckedAccount<'info>, 109 | 110 | /// To store metaplex metadata 111 | /// CHECK: Safety check performed inside function body 112 | #[account(mut)] 113 | pub metadata_account: UncheckedAccount<'info>, 114 | 115 | /// Sysvar for token mint and ATA creation 116 | pub rent: Sysvar<'info, Rent>, 117 | 118 | /// Program to create the new account 119 | pub system_program: Program<'info, System>, 120 | 121 | /// Program to create/transfer mint/token account 122 | pub token_program: Program<'info, Token>, 123 | 124 | /// Program to create an ATA for receiving fee NFT 125 | pub associated_token_program: Program<'info, AssociatedToken>, 126 | 127 | /// Program to create NFT metadata accunt 128 | /// CHECK: Metadata program address constraint applied 129 | pub metadata_program: Program<'info, Metadata>, 130 | 131 | /// CHECK 132 | pub locking_program: Program<'info, RaydiumLiquidityLocking>, 133 | } 134 | 135 | pub fn lock_cp_liquidity_process<'info>(ctx: Context) -> Result<()> { 136 | 137 | 138 | Ok(()) 139 | } 140 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/reward_distribute.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | use anchor_spl::{ 4 | associated_token::AssociatedToken, 5 | token_interface::{TokenAccount, TokenInterface}, 6 | }; 7 | 8 | use crate::{ 9 | consts::FEE_DIVIDER, 10 | events::RewardDistributed, 11 | states::{InitializeConfiguration, RewardState}, 12 | utils::token_transfer_user, 13 | }; 14 | 15 | #[derive(Accounts)] 16 | pub struct RewardDistribute<'info> { 17 | #[account(mut)] 18 | pub operator: Signer<'info>, 19 | 20 | ///CHECK 21 | #[account()] 22 | pub creator: UncheckedAccount<'info>, 23 | 24 | /// CHECK 25 | #[account(mut)] 26 | pub global_configuration: Box>, 27 | 28 | /// CHECK 29 | #[account(mut)] 30 | pub reward_state: Box>, 31 | 32 | /// CHECK 33 | #[account(mut)] 34 | pub fee_account: AccountInfo<'info>, 35 | 36 | /// CHECK 37 | #[account(mut)] 38 | pub token_0_mint: AccountInfo<'info>, 39 | 40 | /// CHECK 41 | #[account(mut)] 42 | pub token_1_mint: AccountInfo<'info>, 43 | 44 | #[account( 45 | mut, 46 | associated_token::mint = token_0_mint, 47 | associated_token::authority = operator, 48 | associated_token::token_program = token_0_program, 49 | )] 50 | pub operator_token_0_account: Box>, 51 | 52 | #[account( 53 | mut, 54 | associated_token::mint = token_1_mint, 55 | associated_token::authority = operator, 56 | associated_token::token_program = token_1_program, 57 | )] 58 | pub operator_token_1_account: Box>, 59 | 60 | /// CHECK 61 | #[account(mut)] 62 | pub creator_token_0_account: Box>, 63 | 64 | /// CHECK 65 | #[account(mut)] 66 | pub creator_token_1_account: Box>, 67 | 68 | /// CHECK 69 | #[account( 70 | init_if_needed, 71 | payer = operator, 72 | associated_token::mint = token_0_mint, 73 | associated_token::authority = fee_account, 74 | associated_token::token_program = token_0_program 75 | )] 76 | pub fee_token_0_account: Box>, 77 | 78 | /// CHECK 79 | #[account( 80 | init_if_needed, 81 | payer = operator, 82 | associated_token::mint = token_1_mint, 83 | associated_token::authority = fee_account, 84 | associated_token::token_program = token_1_program 85 | )] 86 | pub fee_token_1_account: Box>, 87 | 88 | pub token_0_program: Interface<'info, TokenInterface>, 89 | pub token_1_program: Interface<'info, TokenInterface>, 90 | pub system_program: Program<'info, System>, 91 | pub associated_token_program: Program<'info, AssociatedToken>, 92 | } 93 | 94 | impl<'info> RewardDistribute<'info> { 95 | pub fn process(self) -> Result<()> { 96 | let creator_0_amount = self.creator_token_0_account.amount 97 | * self.global_configuration.user_reward_percent 98 | / FEE_DIVIDER; 99 | let fee_0_amount = self.creator_token_0_account.amount - creator_0_amount; 100 | token_transfer_user( 101 | self.token_0_mint.to_account_info(), 102 | self.operator_token_0_account.to_account_info(), 103 | &self.operator, 104 | self.creator_token_0_account.to_account_info(), 105 | &self.token_0_program, 106 | creator_0_amount, 107 | )?; 108 | msg!( 109 | "Reward Toknen0 transfered to the creator. {}", 110 | creator_0_amount 111 | ); 112 | 113 | token_transfer_user( 114 | self.token_0_mint.to_account_info(), 115 | self.operator_token_0_account.to_account_info(), 116 | &self.operator, 117 | self.fee_token_0_account.to_account_info(), 118 | &self.token_0_program, 119 | fee_0_amount, 120 | )?; 121 | 122 | msg!( 123 | "Reward Toknen0 transfered to the fee account. {}", 124 | fee_0_amount 125 | ); 126 | 127 | let creator_1_amount = self.creator_token_1_account.amount 128 | * self.global_configuration.user_reward_percent 129 | / FEE_DIVIDER; 130 | let fee_1_amount = self.creator_token_1_account.amount - creator_1_amount; 131 | token_transfer_user( 132 | self.token_1_mint.to_account_info(), 133 | self.operator_token_1_account.to_account_info(), 134 | &self.operator, 135 | self.creator_token_1_account.to_account_info(), 136 | &self.token_1_program, 137 | creator_1_amount, 138 | )?; 139 | 140 | msg!( 141 | "Reward Toknen1 transfered to the creator. {}", 142 | creator_1_amount 143 | ); 144 | 145 | token_transfer_user( 146 | self.token_1_mint.to_account_info(), 147 | self.operator_token_1_account.to_account_info(), 148 | &self.operator, 149 | self.fee_token_1_account.to_account_info(), 150 | &self.token_1_program, 151 | fee_1_amount, 152 | )?; 153 | 154 | msg!( 155 | "Reward Toknen1 transfered to the fee account. {}", 156 | fee_1_amount 157 | ); 158 | 159 | emit!(RewardDistributed { 160 | creator: self.creator.key(), 161 | token_0: self.token_0_mint.key(), 162 | token_1: self.token_1_mint.key() 163 | }); 164 | 165 | Ok(()) 166 | } 167 | } 168 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/claim_cp_fee.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | use anchor_spl::{ 4 | memo::Memo, 5 | token::Token, 6 | token_2022::Token2022, 7 | token_interface::{Mint, TokenAccount}, 8 | }; 9 | 10 | use raydium_cpmm_cpi::program::RaydiumCpmm; 11 | 12 | use raydium_locking_cpi::{cpi, program::RaydiumLiquidityLocking, states::LockedCpLiquidityState}; 13 | 14 | use crate::{ 15 | consts::FEE_DIVIDER, 16 | states::{InitializeConfiguration, RewardState}, 17 | }; 18 | 19 | #[derive(Accounts)] 20 | pub struct ClaimCpFee<'info> { 21 | #[account( 22 | seeds = [ b"global_config"], 23 | bump 24 | )] 25 | pub global_configuration: Box>, 26 | 27 | /// CHECK: the authority of token vault that cp is locked 28 | #[account(mut)] 29 | pub authority: UncheckedAccount<'info>, 30 | 31 | /// Fee nft owner who is allowed to receive fees 32 | pub fee_nft_owner: Signer<'info>, 33 | 34 | #[account(mut)] 35 | pub reward_state: Box>, 36 | 37 | /// Fee token account 38 | #[account( 39 | token::mint = locked_liquidity.fee_nft_mint, 40 | token::authority = fee_nft_owner, 41 | constraint = fee_nft_account.amount == 1 42 | )] 43 | pub fee_nft_account: Box>, 44 | 45 | /// Store the locked the information of liquidity 46 | #[account( 47 | mut, 48 | constraint = locked_liquidity.fee_nft_mint == fee_nft_account.mint 49 | )] 50 | pub locked_liquidity: Account<'info, LockedCpLiquidityState>, 51 | 52 | /// cpmm program 53 | pub cpmm_program: Program<'info, RaydiumCpmm>, 54 | 55 | /// CHECK: cp program vault and lp mint authority 56 | #[account( 57 | seeds = [ 58 | raydium_cpmm_cpi::AUTH_SEED.as_bytes(), 59 | ], 60 | bump, 61 | seeds::program = cpmm_program.key(), 62 | )] 63 | pub cp_authority: UncheckedAccount<'info>, 64 | 65 | /// CHECK: CPMM Pool state account 66 | #[account( 67 | mut, 68 | address = locked_liquidity.pool_id 69 | )] 70 | pub pool_state: UncheckedAccount<'info>, 71 | 72 | /// lp mint 73 | /// address = pool_state.lp_mint 74 | #[account(mut)] 75 | pub lp_mint: Box>, 76 | 77 | /// The token account for receive token_0 78 | #[account( 79 | mut, 80 | token::mint = token_0_vault.mint, 81 | )] 82 | pub recipient_token_0_account: Box>, 83 | 84 | /// The token account for receive token_1 85 | #[account( 86 | mut, 87 | token::mint = token_1_vault.mint, 88 | )] 89 | pub recipient_token_1_account: Box>, 90 | 91 | /// The address that holds pool tokens for token_0 92 | /// address = pool_state.token_0_vault 93 | #[account(mut)] 94 | pub token_0_vault: Box>, 95 | 96 | /// The address that holds pool tokens for token_1 97 | /// address = pool_state.token_1_vault 98 | #[account(mut)] 99 | pub token_1_vault: Box>, 100 | 101 | /// The mint of token_0 vault 102 | #[account( 103 | address = token_0_vault.mint 104 | )] 105 | pub vault_0_mint: Box>, 106 | 107 | /// The mint of token_1 vault 108 | #[account( 109 | address = token_1_vault.mint 110 | )] 111 | pub vault_1_mint: Box>, 112 | 113 | /// locked lp token account 114 | #[account( 115 | mut, 116 | associated_token::mint = lp_mint, 117 | associated_token::authority = authority, 118 | token::token_program = token_program, 119 | )] 120 | pub locked_lp_vault: Box>, 121 | 122 | /// token Program 123 | pub token_program: Program<'info, Token>, 124 | 125 | /// Token program 2022 126 | pub token_program_2022: Program<'info, Token2022>, 127 | 128 | /// memo program 129 | #[account()] 130 | pub memo_program: Program<'info, Memo>, 131 | 132 | /// CHECK 133 | pub locking_program: Program<'info, RaydiumLiquidityLocking>, 134 | } 135 | 136 | pub fn claim_cp_fee<'info>(ctx: Context) -> Result<()> { 137 | let fee_lp_amount = ctx.accounts.locked_lp_vault.amount; 138 | 139 | let cpi_accounts = cpi::accounts::CollectCpFee { 140 | authority: ctx.accounts.authority.to_account_info(), 141 | fee_nft_owner: ctx.accounts.fee_nft_owner.to_account_info(), 142 | fee_nft_account: ctx.accounts.fee_nft_account.to_account_info(), 143 | locked_liquidity: ctx.accounts.locked_liquidity.to_account_info(), 144 | cpmm_program: ctx.accounts.cpmm_program.to_account_info(), 145 | cp_authority: ctx.accounts.cp_authority.to_account_info(), 146 | pool_state: ctx.accounts.pool_state.to_account_info(), 147 | lp_mint: ctx.accounts.lp_mint.to_account_info(), 148 | recipient_token_0_account: ctx.accounts.recipient_token_0_account.to_account_info(), 149 | recipient_token_1_account: ctx.accounts.recipient_token_1_account.to_account_info(), 150 | token_0_vault: ctx.accounts.token_0_vault.to_account_info(), 151 | token_1_vault: ctx.accounts.token_1_vault.to_account_info(), 152 | vault_0_mint: ctx.accounts.vault_0_mint.to_account_info(), 153 | vault_1_mint: ctx.accounts.vault_1_mint.to_account_info(), 154 | locked_lp_vault: ctx.accounts.locked_lp_vault.to_account_info(), 155 | token_program: ctx.accounts.token_program.to_account_info(), 156 | token_program_2022: ctx.accounts.token_program_2022.to_account_info(), 157 | memo_program: ctx.accounts.memo_program.to_account_info(), 158 | }; 159 | 160 | let cpi_context = CpiContext::new(ctx.accounts.locking_program.to_account_info(), cpi_accounts); 161 | cpi::collect_cp_fees(cpi_context, fee_lp_amount)?; 162 | 163 | let token_0_fee = ctx.accounts.recipient_token_0_account.amount 164 | * ctx.accounts.global_configuration.user_reward_percent 165 | / FEE_DIVIDER; 166 | let token_1_fee = ctx.accounts.recipient_token_1_account.amount 167 | * ctx.accounts.global_configuration.user_reward_percent 168 | / FEE_DIVIDER; 169 | 170 | ctx.accounts 171 | .reward_state 172 | .site_claim(token_0_fee, token_1_fee) 173 | } 174 | -------------------------------------------------------------------------------- /programs/token-2022-pumpfun/src/instructions/create.rs: -------------------------------------------------------------------------------- 1 | use crate::{ 2 | states::{BondingCurve, InitializeConfiguration}, 3 | events::*, 4 | SUPPLY, CreateMintAccountArgs, 5 | }; 6 | use anchor_lang::{ 7 | prelude::*, 8 | solana_program::{entrypoint::ProgramResult, program::invoke, system_instruction}, 9 | system_program::{self}, 10 | }; 11 | use anchor_spl::{ 12 | associated_token::{ 13 | spl_associated_token_account::instruction::{self}, 14 | AssociatedToken, 15 | }, 16 | token_2022::{ 17 | self, 18 | spl_token_2022::{ 19 | self, 20 | extension::{ 21 | transfer_fee::TransferFeeConfig, BaseStateWithExtensions, ExtensionType, 22 | StateWithExtensions, 23 | }, 24 | state::Mint as MintState, 25 | }, 26 | Token2022, 27 | }, 28 | token_interface::{ 29 | self, initialize_mint2, mint_to, spl_pod::optional_keys::OptionalNonZeroPubkey, 30 | token_metadata_initialize, transfer_fee_initialize, InitializeMint2, MintTo, SetAuthority, 31 | TokenInterface, TokenMetadataInitialize, TransferFeeInitialize, 32 | }, 33 | }; 34 | 35 | #[derive(Accounts)] 36 | #[instruction(args: CreateMintAccountArgs)] 37 | pub struct Create<'info> { 38 | #[account( 39 | seeds = [ b"global_config"], 40 | bump 41 | )] 42 | pub global_configuration: Box>, 43 | 44 | #[account( 45 | init, 46 | payer = payer, 47 | seeds =[ &mint_addr.key().to_bytes() , BondingCurve::POOL_SEED_PREFIX ], 48 | space = BondingCurve::SIZE, 49 | bump 50 | )] 51 | pub bonding_curve: Box>, 52 | 53 | /// CHECK: 54 | #[account(mut)] 55 | pub mint_addr: Signer<'info>, 56 | 57 | /// CHECK: 58 | #[account( 59 | mut, 60 | seeds = [ &mint_addr.key().to_bytes() , b"sol_pool".as_ref() ], 61 | bump 62 | )] 63 | pub sol_pool: AccountInfo<'info>, 64 | 65 | /// CHECK: 66 | #[account(mut)] 67 | pub token_pool: AccountInfo<'info>, 68 | 69 | /// CHECK: 70 | #[account(mut)] 71 | pub fee_account: AccountInfo<'info>, 72 | 73 | #[account(mut)] 74 | pub payer: Signer<'info>, 75 | 76 | pub associated_token_program: Program<'info, AssociatedToken>, 77 | pub token_program: Interface<'info, TokenInterface>, 78 | pub system_program: Program<'info, System>, 79 | } 80 | 81 | impl<'info> Create<'info> { 82 | fn initialize_token_metadata( 83 | &self, 84 | name: String, 85 | symbol: String, 86 | uri: String, 87 | ) -> ProgramResult { 88 | let cpi_accounts = TokenMetadataInitialize { 89 | token_program_id: self.token_program.to_account_info(), 90 | mint: self.mint_addr.to_account_info(), 91 | metadata: self.mint_addr.to_account_info(), // metadata account is the mint, since data is stored in mint 92 | mint_authority: self.payer.to_account_info(), 93 | update_authority: self.payer.to_account_info(), 94 | }; 95 | let cpi_ctx = CpiContext::new(self.token_program.to_account_info(), cpi_accounts); 96 | token_metadata_initialize(cpi_ctx, name, symbol, uri)?; 97 | Ok(()) 98 | } 99 | 100 | fn set_freeze_authority(&self) -> ProgramResult { 101 | let cpi_accounts_frz = SetAuthority { 102 | current_authority: self.payer.to_account_info(), 103 | account_or_mint: self.mint_addr.to_account_info(), 104 | }; 105 | let cpi_ctx_frz = CpiContext::new(self.token_program.to_account_info(), cpi_accounts_frz); 106 | 107 | token_interface::set_authority( 108 | cpi_ctx_frz, 109 | token_interface::spl_token_2022::instruction::AuthorityType::FreezeAccount, 110 | None, 111 | )?; 112 | 113 | Ok(()) 114 | } 115 | 116 | fn set_mint_authority(&self) -> ProgramResult { 117 | let cpi_accounts_frz = SetAuthority { 118 | current_authority: self.payer.to_account_info(), 119 | account_or_mint: self.mint_addr.to_account_info(), 120 | }; 121 | let cpi_ctx_frz = CpiContext::new(self.token_program.to_account_info(), cpi_accounts_frz); 122 | 123 | token_interface::set_authority( 124 | cpi_ctx_frz, 125 | token_interface::spl_token_2022::instruction::AuthorityType::MintTokens, 126 | None, 127 | )?; 128 | 129 | Ok(()) 130 | } 131 | 132 | fn mint_tokens(&self, supply_arg: u64) -> ProgramResult { 133 | mint_to( 134 | CpiContext::new( 135 | self.token_program.to_account_info(), 136 | MintTo { 137 | authority: self.payer.to_account_info(), 138 | to: self.token_pool.to_account_info(), 139 | mint: self.mint_addr.to_account_info(), 140 | }, 141 | ), 142 | supply_arg, 143 | )?; 144 | Ok(()) 145 | } 146 | 147 | fn transfer_fee_to_fee_account(&self) -> ProgramResult { 148 | let transfer_instruction = system_instruction::transfer( 149 | &self.payer.to_account_info().key(), 150 | &self.fee_account.to_account_info().key(), 151 | self.global_configuration.create_pool_fee_lamports, 152 | ); 153 | 154 | anchor_lang::solana_program::program::invoke( 155 | &transfer_instruction, 156 | &[ 157 | self.payer.to_account_info(), 158 | self.fee_account.clone(), 159 | self.system_program.to_account_info(), 160 | ], 161 | )?; 162 | Ok(()) 163 | } 164 | 165 | pub fn check_mint_data(&self) -> Result<()> { 166 | let mint = &self.mint_addr.to_account_info(); 167 | let mint_data = mint.data.borrow(); 168 | let mint_with_extension = StateWithExtensions::::unpack(&mint_data)?; 169 | let extension_data = mint_with_extension.get_extension::()?; 170 | 171 | assert_eq!( 172 | extension_data.transfer_fee_config_authority, 173 | OptionalNonZeroPubkey::try_from(Some(self.payer.key()))? 174 | ); 175 | 176 | assert_eq!( 177 | extension_data.withdraw_withheld_authority, 178 | OptionalNonZeroPubkey::try_from(Some(self.payer.key()))? 179 | ); 180 | 181 | msg!("{:?}", extension_data); 182 | Ok(()) 183 | } 184 | 185 | pub fn process(&mut self, args: CreateMintAccountArgs) -> Result<()> { 186 | let space = ExtensionType::try_calculate_account_len::(&[ 187 | ExtensionType::MetadataPointer, 188 | ExtensionType::TransferFeeConfig, 189 | ]) 190 | .unwrap(); 191 | 192 | // This is the space required for the metadata account. 193 | // We put the meta data into the mint account at the end so we 194 | // don't need to create and additional account. 195 | let meta_data_space = 250; 196 | 197 | let lamports_required = (Rent::get()?).minimum_balance(space + meta_data_space); 198 | msg!( 199 | "Create Mint and metadata account size and cost: {} lamports: {}", 200 | space as u64, 201 | lamports_required 202 | ); 203 | 204 | emit!(LaunchEvent { 205 | creator: self.payer.key(), 206 | mint: self.mint_addr.key(), 207 | bonding_curve: self.bonding_curve.key(), 208 | metadata: self.mint_addr.key(), 209 | 210 | decimals: 9, 211 | token_supply: SUPPLY, 212 | reserve_quote: self.global_configuration.initial_virtual_sol, 213 | reserve_token: SUPPLY, 214 | }); 215 | Ok(()) 216 | } 217 | } 218 | -------------------------------------------------------------------------------- /tests/token-2022-pumpfun.ts: -------------------------------------------------------------------------------- 1 | import * as anchor from "@coral-xyz/anchor"; 2 | import { Program } from "@coral-xyz/anchor"; 3 | import { Token2022Pumpfun } from "../target/types/token_2022_pumpfun"; 4 | import { bs58 } from "@coral-xyz/anchor/dist/cjs/utils/bytes"; 5 | import { getAssociatedTokenAddress, getAssociatedTokenAddressSync, NATIVE_MINT, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from "@solana/spl-token"; 6 | import { AddressLookupTableProgram, ComputeBudgetProgram, Connection, Keypair, LAMPORTS_PER_SOL, PublicKey, sendAndConfirmTransaction, SystemProgram, SYSVAR_RENT_PUBKEY, TransactionMessage, VersionedTransaction } from "@solana/web3.js"; 7 | import { BN } from "bn.js"; 8 | import { getNftMetadataAddress, getOrcleAccountAddress, getPersonalPositionAddress, getPoolAddress, getPoolVaultAddress, getProtocolPositionAddress, getTickArrayAddress, getTickArrayBitmapAddress, i32ToBytes, initialize, openPosition, setupInitializeTest, waitFor } from "./utils"; 9 | import { DEVNET_PROGRAM_ID, SqrtPriceMath, TickUtils } from "@raydium-io/raydium-sdk-v2"; 10 | import { ClmmProgram, devConfigs } from "./config"; 11 | import { createAndSendV0Tx } from "./utils/transaction"; 12 | 13 | // Configure the client to use the local cluster. 14 | anchor.setProvider(anchor.AnchorProvider.env()); 15 | // const connection = new Connection("http://localhost:8899") 16 | export const connection = new Connection("https://devnet.helius-rpc.com/?api-key=e2cc6225-fae1-4f90-a6b1-5684f49dec62", { commitment: "finalized" }) 17 | 18 | const payer = Keypair.fromSecretKey(bs58.decode("5BrUQk416xSy4xbHZq6jXb2JcVA8iRnPNJJr3NZv2wukMhwB39ndpe9eaCXmuFLxzkVUYXbdCB9ydeJkhKCGhnkm")) 19 | const feeAccount = new PublicKey("3MQVpAwsccXHG7k6RvhwBVRCs3tfmHRW8VUYJUdyPBXd") 20 | const program = anchor.workspace.Token2022Pumpfun as Program; 21 | let mintAddr: Keypair; 22 | 23 | describe("token-2022-pumpfun", () => { 24 | it("Is initialized!", async () => { 25 | 26 | const initializeArgu = { 27 | bondingCurveLimitation: new BN(85 * LAMPORTS_PER_SOL), 28 | initialVirtualSol: new BN(40 * LAMPORTS_PER_SOL), 29 | initialVirtualToken: new BN(1030000000).mul(new BN(LAMPORTS_PER_SOL)), 30 | createPoolFeeLamports: new BN(0.05 * LAMPORTS_PER_SOL), 31 | swapFee: 2.0, 32 | } 33 | 34 | const tx = await program.methods 35 | .initialize(initializeArgu) 36 | .accounts({ feeAccount: feeAccount }) 37 | .signers([payer]) 38 | .transaction(); 39 | 40 | tx.feePayer = payer.publicKey 41 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 42 | 43 | console.log(await connection.simulateTransaction(tx)); 44 | const sig = await sendAndConfirmTransaction(connection, tx, [payer]); 45 | console.log(`https://solscan.io/tx/${sig}?cluster=devnet`); 46 | console.log(`https://solana.fm/tx/${sig}?cluster=devnet-solana`) 47 | }); 48 | 49 | it("create", async () => { 50 | mintAddr = Keypair.generate() 51 | const [solPool] = PublicKey.findProgramAddressSync([mintAddr.publicKey.toBuffer(), Buffer.from("sol_pool")], program.programId) 52 | const tokenPool = await getAssociatedTokenAddress(mintAddr.publicKey, solPool, true, TOKEN_2022_PROGRAM_ID) 53 | 54 | console.log("mintAddr : ", mintAddr.publicKey.toBase58()); 55 | 56 | const tx = await program.methods 57 | .create({ 58 | name: "wiz05.06", 59 | symbol: "wizSym", 60 | uri: "wizUri", 61 | transferFeeBasisPoints: 50, /// 0.005 % 62 | maximumFee: new BN(5000) 63 | }) // create Pool Fee 0.01 sol 64 | .accounts({ 65 | mintAddr: mintAddr.publicKey, 66 | tokenPool: tokenPool, 67 | feeAccount: feeAccount, 68 | tokenProgram: TOKEN_2022_PROGRAM_ID 69 | }) 70 | .signers([payer, mintAddr]) 71 | .transaction(); 72 | 73 | tx.feePayer = payer.publicKey 74 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 75 | 76 | console.log(await connection.simulateTransaction(tx)); 77 | 78 | const sig = await sendAndConfirmTransaction(connection, tx, [payer, mintAddr]); 79 | console.log(`https://solscan.io/tx/${sig}?cluster=devnet`) 80 | console.log(`https://solana.fm/tx/${sig}?cluster=devnet-solana`) 81 | }); 82 | 83 | it("buy", async () => { 84 | 85 | const buyQuote = await getBuyQuote(3 * 10 ** 9, 2) 86 | 87 | const tx = await program.methods 88 | .buy(new BN(3 * 10 ** 9), buyQuote) // buy 0.1 sol 89 | .accounts({ 90 | mintAddr: mintAddr.publicKey, 91 | feeAccount: feeAccount, 92 | tokenProgram: TOKEN_2022_PROGRAM_ID 93 | }) 94 | .signers([payer]) 95 | .transaction(); 96 | 97 | tx.feePayer = payer.publicKey 98 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 99 | 100 | console.log(await connection.simulateTransaction(tx)); 101 | 102 | const sig = await sendAndConfirmTransaction(connection, tx, [payer]); 103 | console.log(`https://solscan.io/tx/${sig}?cluster=devnet`) 104 | console.log(`https://solana.fm/tx/${sig}?cluster=devnet-solana`) 105 | }); 106 | 107 | it("sell", async () => { 108 | const sellQuote = await getSellQuote(10 ** 13, 2) 109 | 110 | // Add your test here. 111 | const tx = await program.methods 112 | .sell(new BN(10 ** 13), sellQuote) // buy amount / expected amount / slippage 113 | .accounts({ 114 | mintAddr: mintAddr.publicKey, 115 | feeAccount: feeAccount, 116 | tokenProgram: TOKEN_2022_PROGRAM_ID, 117 | }) 118 | .signers([payer]) 119 | .transaction(); 120 | 121 | tx.feePayer = payer.publicKey 122 | tx.recentBlockhash = (await connection.getLatestBlockhash()).blockhash 123 | 124 | console.log(await connection.simulateTransaction(tx)); 125 | 126 | const sig = await sendAndConfirmTransaction(connection, tx, [payer]); 127 | console.log(`https://solscan.io/tx/${sig}?cluster=devnet`) 128 | console.log(`https://solana.fm/tx/${sig}?cluster=devnet-solana`) 129 | }); 130 | 131 | it("raydium integrate", async () => { 132 | const sqrtPriceX64 = 0 133 | const openTime = 0 134 | 135 | const tickLowerIndex = -10 136 | const tickUpperIndex = 10 137 | const liquidity = new BN(1_000_000_000); 138 | const amount0Max = new BN(2_999_548_675); 139 | const amount1Max = new BN('922759999999995112'); 140 | const ammConfig = devConfigs[0] 141 | 142 | const opAddress = Keypair.generate() 143 | const positionNftMint = Keypair.generate(); 144 | 145 | console.log("opAddress.publicKey : ", opAddress.publicKey); 146 | 147 | const [poolAddress, _bump1] = await getPoolAddress( 148 | new PublicKey(ammConfig.id), 149 | NATIVE_MINT, 150 | mintAddr.publicKey, 151 | DEVNET_PROGRAM_ID.CLMM 152 | ); 153 | const [vault0, _bump2] = await getPoolVaultAddress( 154 | poolAddress, 155 | NATIVE_MINT, 156 | DEVNET_PROGRAM_ID.CLMM 157 | ); 158 | const [vault1, _bump3] = await getPoolVaultAddress( 159 | poolAddress, 160 | mintAddr.publicKey, 161 | DEVNET_PROGRAM_ID.CLMM 162 | ); 163 | const [observation, _bump5] = await getOrcleAccountAddress( 164 | poolAddress, 165 | DEVNET_PROGRAM_ID.CLMM 166 | ); 167 | 168 | const tickArrayLowerStartIndex = TickUtils.getTickArrayStartIndexByTick( 169 | tickLowerIndex, 170 | ammConfig.tickSpacing 171 | ); 172 | const [tickArrayLower] = await getTickArrayAddress( 173 | poolAddress, 174 | ClmmProgram, 175 | tickArrayLowerStartIndex 176 | ); 177 | const tickArrayUpperStartIndex = TickUtils.getTickArrayStartIndexByTick( 178 | tickUpperIndex, 179 | ammConfig.tickSpacing 180 | ); 181 | const [tickArrayUpper] = await getTickArrayAddress( 182 | poolAddress, 183 | ClmmProgram, 184 | tickArrayUpperStartIndex 185 | ); 186 | 187 | const positionANftAccount = getAssociatedTokenAddressSync( 188 | positionNftMint.publicKey, 189 | opAddress.publicKey 190 | ); 191 | 192 | const metadataAccount = ( 193 | await getNftMetadataAddress(positionNftMint.publicKey) 194 | )[0]; 195 | 196 | const [personalPosition] = await getPersonalPositionAddress( 197 | positionNftMint.publicKey, 198 | ClmmProgram 199 | ); 200 | 201 | const [protocolPosition] = await getProtocolPositionAddress( 202 | poolAddress, 203 | ClmmProgram, 204 | tickLowerIndex, 205 | tickUpperIndex 206 | ); 207 | 208 | const token0Account = getAssociatedTokenAddressSync( 209 | new PublicKey(NATIVE_MINT), 210 | opAddress.publicKey, 211 | false, 212 | TOKEN_PROGRAM_ID 213 | ); 214 | 215 | const token1Account = getAssociatedTokenAddressSync( 216 | new PublicKey(mintAddr.publicKey), 217 | opAddress.publicKey, 218 | false, 219 | TOKEN_2022_PROGRAM_ID 220 | ); 221 | 222 | const [lookupTableInst, lookupTableAddress] = 223 | AddressLookupTableProgram.createLookupTable({ 224 | authority: payer.publicKey, 225 | payer: payer.publicKey, 226 | recentSlot: await connection.getSlot() - 1, 227 | }); 228 | 229 | const addAddressesInstruction = AddressLookupTableProgram.extendLookupTable({ 230 | payer: payer.publicKey, 231 | authority: payer.publicKey, 232 | lookupTable: lookupTableAddress, 233 | addresses: [ 234 | new PublicKey(ammConfig.id), 235 | NATIVE_MINT, 236 | TOKEN_2022_PROGRAM_ID, 237 | TOKEN_PROGRAM_ID, 238 | metadataAccount, 239 | mintAddr.publicKey, 240 | observation, 241 | opAddress.publicKey, 242 | personalPosition, 243 | positionANftAccount, 244 | positionNftMint.publicKey, 245 | protocolPosition, 246 | poolAddress, 247 | tickArrayLower, 248 | tickArrayUpper, 249 | token0Account, 250 | token1Account, 251 | vault0, 252 | vault1, 253 | payer.publicKey 254 | ] 255 | }); 256 | 257 | console.log("waiting for confirming of creating LUT"); 258 | await createAndSendV0Tx(connection, payer, [lookupTableInst, addAddressesInstruction]) 259 | await waitFor(15000) 260 | 261 | const ix = await program.methods 262 | .proxyInitialize(SqrtPriceMath.getSqrtPriceX64FromTick(sqrtPriceX64), new BN(openTime)) 263 | .accounts({ 264 | observationState: observation, 265 | opAddress: opAddress.publicKey, 266 | ammConfig: new PublicKey(ammConfig.id), 267 | tokenMint0: NATIVE_MINT, 268 | tokenMint1: mintAddr.publicKey, 269 | tokenProgram0: TOKEN_PROGRAM_ID, 270 | tokenProgram1: TOKEN_2022_PROGRAM_ID, 271 | }) 272 | .signers([payer]) 273 | .instruction(); 274 | 275 | const openIx = await program.methods 276 | .proxyOpenPosition( 277 | tickLowerIndex, 278 | tickUpperIndex, 279 | tickArrayLowerStartIndex, 280 | tickArrayUpperStartIndex, 281 | liquidity, 282 | amount0Max, 283 | amount1Max, 284 | true, 285 | true 286 | ) 287 | .accounts({ 288 | payer: opAddress.publicKey, 289 | positionNftOwner: opAddress.publicKey, 290 | positionNftMint: positionNftMint.publicKey, 291 | positionNftAccount: positionANftAccount, 292 | metadataAccount, 293 | protocolPosition, 294 | tickArrayLower, 295 | tickArrayUpper, 296 | personalPosition, 297 | poolState: poolAddress, 298 | tokenAccount0: token0Account, 299 | tokenAccount1: token1Account, 300 | tokenVault0: vault0, 301 | tokenVault1: vault1, 302 | vault0Mint: NATIVE_MINT, 303 | vault1Mint: mintAddr.publicKey, 304 | }) 305 | .preInstructions([ 306 | ComputeBudgetProgram.setComputeUnitLimit({ units: 300_000 }) 307 | ]) 308 | .signers([positionNftMint]) 309 | .instruction(); 310 | 311 | const { value: lookupTable } = await connection.getAddressLookupTable(lookupTableAddress, { commitment: "finalized" }); 312 | 313 | console.log("lookupTable : ", lookupTable); 314 | 315 | const openIxmessageV0 = new TransactionMessage({ 316 | payerKey: payer.publicKey, 317 | recentBlockhash: (await connection.getLatestBlockhash()).blockhash, 318 | instructions: [ 319 | SystemProgram.transfer({ 320 | fromPubkey: payer.publicKey, 321 | toPubkey: opAddress.publicKey, 322 | lamports: 240_000_000 323 | }), 324 | ix, 325 | openIx, 326 | ] 327 | }).compileToV0Message([lookupTable]); 328 | 329 | const transaction = new VersionedTransaction(openIxmessageV0); 330 | 331 | // sign your transaction with the required `Signers` 332 | transaction.sign([opAddress, payer, positionNftMint]); 333 | 334 | const serialized = transaction.serialize() 335 | 336 | const size = serialized.length + 1 + (transaction.signatures.length * 64); 337 | 338 | console.log("size =======================> ", size); 339 | 340 | (await connection.simulateTransaction(transaction)).value.logs.forEach(ele => console.error(`${ele}`)); 341 | 342 | const txId = await connection.sendTransaction(transaction); 343 | console.log(`https://solscan.io/tx/${txId}?cluster=devnet`); 344 | console.log(`https://solana.fm/tx/${txId}?cluster=devnet-solana`) 345 | }) 346 | }); 347 | 348 | const getBuyQuote = async (lamport, slippage) => { 349 | const [bondingCurve] = PublicKey.findProgramAddressSync([mintAddr.publicKey.toBuffer(), Buffer.from("bonding_curve")], program.programId) 350 | const { initVirtualSol, solReserves, initVirtualToken, kParam } = await program.account.bondingCurve.fetch(bondingCurve) 351 | 352 | const initVirtualSolNew = Number(initVirtualSol) 353 | const solReservesNew = Number(solReserves) 354 | const initVirtualTokenNew = Number(initVirtualToken) 355 | const tokenNew = initVirtualTokenNew - (Number(kParam) / (initVirtualSolNew + solReservesNew)) 356 | 357 | let price = (initVirtualSolNew + solReservesNew) / (initVirtualTokenNew - tokenNew) 358 | 359 | return new BN(`${((1 - 0.01 * slippage) * lamport) / price}`) 360 | } 361 | 362 | const getSellQuote = async (token_amount, slippage) => { 363 | const [bondingCurve] = PublicKey.findProgramAddressSync([mintAddr.publicKey.toBuffer(), Buffer.from("bonding_curve")], program.programId) 364 | const { initVirtualSol, solReserves, initVirtualToken, kParam } = await program.account.bondingCurve.fetch(bondingCurve) 365 | 366 | const initVirtualSolNew = Number(initVirtualSol) 367 | const solReservesNew = Number(solReserves) 368 | const initVirtualTokenNew = Number(initVirtualToken) 369 | const tokenNew = initVirtualTokenNew - (Number(kParam) / (initVirtualSolNew + solReservesNew)) 370 | 371 | let price = (initVirtualSolNew + solReservesNew) / (initVirtualTokenNew - tokenNew) 372 | 373 | return new BN(`${Math.floor((1 - 0.01 * slippage) * token_amount * price)}`) 374 | } -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "aead" 7 | version = "0.4.3" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" 10 | dependencies = [ 11 | "generic-array", 12 | ] 13 | 14 | [[package]] 15 | name = "aes" 16 | version = "0.7.5" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" 19 | dependencies = [ 20 | "cfg-if", 21 | "cipher", 22 | "cpufeatures", 23 | "opaque-debug", 24 | ] 25 | 26 | [[package]] 27 | name = "aes-gcm-siv" 28 | version = "0.10.3" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" 31 | dependencies = [ 32 | "aead", 33 | "aes", 34 | "cipher", 35 | "ctr", 36 | "polyval", 37 | "subtle", 38 | "zeroize", 39 | ] 40 | 41 | [[package]] 42 | name = "ahash" 43 | version = "0.7.8" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" 46 | dependencies = [ 47 | "getrandom 0.2.15", 48 | "once_cell", 49 | "version_check", 50 | ] 51 | 52 | [[package]] 53 | name = "ahash" 54 | version = "0.8.11" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 57 | dependencies = [ 58 | "cfg-if", 59 | "once_cell", 60 | "version_check", 61 | "zerocopy", 62 | ] 63 | 64 | [[package]] 65 | name = "aho-corasick" 66 | version = "1.1.3" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 69 | dependencies = [ 70 | "memchr", 71 | ] 72 | 73 | [[package]] 74 | name = "anchor-attribute-access-control" 75 | version = "0.30.1" 76 | source = "registry+https://github.com/rust-lang/crates.io-index" 77 | checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" 78 | dependencies = [ 79 | "anchor-syn", 80 | "proc-macro2", 81 | "quote", 82 | "syn 1.0.109", 83 | ] 84 | 85 | [[package]] 86 | name = "anchor-attribute-account" 87 | version = "0.30.1" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" 90 | dependencies = [ 91 | "anchor-syn", 92 | "bs58 0.5.1", 93 | "proc-macro2", 94 | "quote", 95 | "syn 1.0.109", 96 | ] 97 | 98 | [[package]] 99 | name = "anchor-attribute-constant" 100 | version = "0.30.1" 101 | source = "registry+https://github.com/rust-lang/crates.io-index" 102 | checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" 103 | dependencies = [ 104 | "anchor-syn", 105 | "quote", 106 | "syn 1.0.109", 107 | ] 108 | 109 | [[package]] 110 | name = "anchor-attribute-error" 111 | version = "0.30.1" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" 114 | dependencies = [ 115 | "anchor-syn", 116 | "quote", 117 | "syn 1.0.109", 118 | ] 119 | 120 | [[package]] 121 | name = "anchor-attribute-event" 122 | version = "0.30.1" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" 125 | dependencies = [ 126 | "anchor-syn", 127 | "proc-macro2", 128 | "quote", 129 | "syn 1.0.109", 130 | ] 131 | 132 | [[package]] 133 | name = "anchor-attribute-program" 134 | version = "0.30.1" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" 137 | dependencies = [ 138 | "anchor-lang-idl", 139 | "anchor-syn", 140 | "anyhow", 141 | "bs58 0.5.1", 142 | "heck", 143 | "proc-macro2", 144 | "quote", 145 | "serde_json", 146 | "syn 1.0.109", 147 | ] 148 | 149 | [[package]] 150 | name = "anchor-derive-accounts" 151 | version = "0.30.1" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" 154 | dependencies = [ 155 | "anchor-syn", 156 | "quote", 157 | "syn 1.0.109", 158 | ] 159 | 160 | [[package]] 161 | name = "anchor-derive-serde" 162 | version = "0.30.1" 163 | source = "registry+https://github.com/rust-lang/crates.io-index" 164 | checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" 165 | dependencies = [ 166 | "anchor-syn", 167 | "borsh-derive-internal 0.10.4", 168 | "proc-macro2", 169 | "quote", 170 | "syn 1.0.109", 171 | ] 172 | 173 | [[package]] 174 | name = "anchor-derive-space" 175 | version = "0.30.1" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" 178 | dependencies = [ 179 | "proc-macro2", 180 | "quote", 181 | "syn 1.0.109", 182 | ] 183 | 184 | [[package]] 185 | name = "anchor-lang" 186 | version = "0.30.1" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" 189 | dependencies = [ 190 | "anchor-attribute-access-control", 191 | "anchor-attribute-account", 192 | "anchor-attribute-constant", 193 | "anchor-attribute-error", 194 | "anchor-attribute-event", 195 | "anchor-attribute-program", 196 | "anchor-derive-accounts", 197 | "anchor-derive-serde", 198 | "anchor-derive-space", 199 | "anchor-lang-idl", 200 | "arrayref", 201 | "base64 0.21.7", 202 | "bincode", 203 | "borsh 0.10.4", 204 | "bytemuck", 205 | "getrandom 0.2.15", 206 | "solana-program", 207 | "thiserror", 208 | ] 209 | 210 | [[package]] 211 | name = "anchor-lang-idl" 212 | version = "0.1.1" 213 | source = "registry+https://github.com/rust-lang/crates.io-index" 214 | checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" 215 | dependencies = [ 216 | "anchor-lang-idl-spec", 217 | "anyhow", 218 | "heck", 219 | "regex", 220 | "serde", 221 | "serde_json", 222 | "sha2 0.10.8", 223 | ] 224 | 225 | [[package]] 226 | name = "anchor-lang-idl-spec" 227 | version = "0.1.0" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" 230 | dependencies = [ 231 | "anyhow", 232 | "serde", 233 | ] 234 | 235 | [[package]] 236 | name = "anchor-spl" 237 | version = "0.30.1" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" 240 | dependencies = [ 241 | "anchor-lang", 242 | "mpl-token-metadata", 243 | "spl-associated-token-account", 244 | "spl-memo", 245 | "spl-pod", 246 | "spl-token", 247 | "spl-token-2022", 248 | "spl-token-group-interface", 249 | "spl-token-metadata-interface", 250 | ] 251 | 252 | [[package]] 253 | name = "anchor-syn" 254 | version = "0.30.1" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" 257 | dependencies = [ 258 | "anyhow", 259 | "bs58 0.5.1", 260 | "cargo_toml", 261 | "heck", 262 | "proc-macro2", 263 | "quote", 264 | "serde", 265 | "serde_json", 266 | "sha2 0.10.8", 267 | "syn 1.0.109", 268 | "thiserror", 269 | ] 270 | 271 | [[package]] 272 | name = "anyhow" 273 | version = "1.0.93" 274 | source = "registry+https://github.com/rust-lang/crates.io-index" 275 | checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" 276 | 277 | [[package]] 278 | name = "ark-bn254" 279 | version = "0.4.0" 280 | source = "registry+https://github.com/rust-lang/crates.io-index" 281 | checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" 282 | dependencies = [ 283 | "ark-ec", 284 | "ark-ff", 285 | "ark-std", 286 | ] 287 | 288 | [[package]] 289 | name = "ark-ec" 290 | version = "0.4.2" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" 293 | dependencies = [ 294 | "ark-ff", 295 | "ark-poly", 296 | "ark-serialize", 297 | "ark-std", 298 | "derivative", 299 | "hashbrown 0.13.2", 300 | "itertools", 301 | "num-traits", 302 | "zeroize", 303 | ] 304 | 305 | [[package]] 306 | name = "ark-ff" 307 | version = "0.4.2" 308 | source = "registry+https://github.com/rust-lang/crates.io-index" 309 | checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" 310 | dependencies = [ 311 | "ark-ff-asm", 312 | "ark-ff-macros", 313 | "ark-serialize", 314 | "ark-std", 315 | "derivative", 316 | "digest 0.10.7", 317 | "itertools", 318 | "num-bigint", 319 | "num-traits", 320 | "paste", 321 | "rustc_version", 322 | "zeroize", 323 | ] 324 | 325 | [[package]] 326 | name = "ark-ff-asm" 327 | version = "0.4.2" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" 330 | dependencies = [ 331 | "quote", 332 | "syn 1.0.109", 333 | ] 334 | 335 | [[package]] 336 | name = "ark-ff-macros" 337 | version = "0.4.2" 338 | source = "registry+https://github.com/rust-lang/crates.io-index" 339 | checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" 340 | dependencies = [ 341 | "num-bigint", 342 | "num-traits", 343 | "proc-macro2", 344 | "quote", 345 | "syn 1.0.109", 346 | ] 347 | 348 | [[package]] 349 | name = "ark-poly" 350 | version = "0.4.2" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" 353 | dependencies = [ 354 | "ark-ff", 355 | "ark-serialize", 356 | "ark-std", 357 | "derivative", 358 | "hashbrown 0.13.2", 359 | ] 360 | 361 | [[package]] 362 | name = "ark-serialize" 363 | version = "0.4.2" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" 366 | dependencies = [ 367 | "ark-serialize-derive", 368 | "ark-std", 369 | "digest 0.10.7", 370 | "num-bigint", 371 | ] 372 | 373 | [[package]] 374 | name = "ark-serialize-derive" 375 | version = "0.4.2" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" 378 | dependencies = [ 379 | "proc-macro2", 380 | "quote", 381 | "syn 1.0.109", 382 | ] 383 | 384 | [[package]] 385 | name = "ark-std" 386 | version = "0.4.0" 387 | source = "registry+https://github.com/rust-lang/crates.io-index" 388 | checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" 389 | dependencies = [ 390 | "num-traits", 391 | "rand 0.8.5", 392 | ] 393 | 394 | [[package]] 395 | name = "arrayref" 396 | version = "0.3.9" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 399 | 400 | [[package]] 401 | name = "arrayvec" 402 | version = "0.7.6" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 405 | 406 | [[package]] 407 | name = "assert_matches" 408 | version = "1.5.0" 409 | source = "registry+https://github.com/rust-lang/crates.io-index" 410 | checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" 411 | 412 | [[package]] 413 | name = "atty" 414 | version = "0.2.14" 415 | source = "registry+https://github.com/rust-lang/crates.io-index" 416 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 417 | dependencies = [ 418 | "hermit-abi", 419 | "libc", 420 | "winapi", 421 | ] 422 | 423 | [[package]] 424 | name = "autocfg" 425 | version = "1.4.0" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 428 | 429 | [[package]] 430 | name = "base64" 431 | version = "0.12.3" 432 | source = "registry+https://github.com/rust-lang/crates.io-index" 433 | checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" 434 | 435 | [[package]] 436 | name = "base64" 437 | version = "0.21.7" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 440 | 441 | [[package]] 442 | name = "bincode" 443 | version = "1.3.3" 444 | source = "registry+https://github.com/rust-lang/crates.io-index" 445 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 446 | dependencies = [ 447 | "serde", 448 | ] 449 | 450 | [[package]] 451 | name = "bitflags" 452 | version = "2.6.0" 453 | source = "registry+https://github.com/rust-lang/crates.io-index" 454 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 455 | dependencies = [ 456 | "serde", 457 | ] 458 | 459 | [[package]] 460 | name = "bitmaps" 461 | version = "2.1.0" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" 464 | dependencies = [ 465 | "typenum", 466 | ] 467 | 468 | [[package]] 469 | name = "blake3" 470 | version = "1.5.1" 471 | source = "registry+https://github.com/rust-lang/crates.io-index" 472 | checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" 473 | dependencies = [ 474 | "arrayref", 475 | "arrayvec", 476 | "cc", 477 | "cfg-if", 478 | "constant_time_eq", 479 | "digest 0.10.7", 480 | ] 481 | 482 | [[package]] 483 | name = "block-buffer" 484 | version = "0.9.0" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 487 | dependencies = [ 488 | "block-padding", 489 | "generic-array", 490 | ] 491 | 492 | [[package]] 493 | name = "block-buffer" 494 | version = "0.10.4" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 497 | dependencies = [ 498 | "generic-array", 499 | ] 500 | 501 | [[package]] 502 | name = "block-padding" 503 | version = "0.2.1" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" 506 | 507 | [[package]] 508 | name = "borsh" 509 | version = "0.9.3" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" 512 | dependencies = [ 513 | "borsh-derive 0.9.3", 514 | "hashbrown 0.11.2", 515 | ] 516 | 517 | [[package]] 518 | name = "borsh" 519 | version = "0.10.4" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" 522 | dependencies = [ 523 | "borsh-derive 0.10.4", 524 | "hashbrown 0.13.2", 525 | ] 526 | 527 | [[package]] 528 | name = "borsh" 529 | version = "1.5.3" 530 | source = "registry+https://github.com/rust-lang/crates.io-index" 531 | checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" 532 | dependencies = [ 533 | "borsh-derive 1.5.3", 534 | "cfg_aliases", 535 | ] 536 | 537 | [[package]] 538 | name = "borsh-derive" 539 | version = "0.9.3" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" 542 | dependencies = [ 543 | "borsh-derive-internal 0.9.3", 544 | "borsh-schema-derive-internal 0.9.3", 545 | "proc-macro-crate 0.1.5", 546 | "proc-macro2", 547 | "syn 1.0.109", 548 | ] 549 | 550 | [[package]] 551 | name = "borsh-derive" 552 | version = "0.10.4" 553 | source = "registry+https://github.com/rust-lang/crates.io-index" 554 | checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" 555 | dependencies = [ 556 | "borsh-derive-internal 0.10.4", 557 | "borsh-schema-derive-internal 0.10.4", 558 | "proc-macro-crate 0.1.5", 559 | "proc-macro2", 560 | "syn 1.0.109", 561 | ] 562 | 563 | [[package]] 564 | name = "borsh-derive" 565 | version = "1.5.3" 566 | source = "registry+https://github.com/rust-lang/crates.io-index" 567 | checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" 568 | dependencies = [ 569 | "once_cell", 570 | "proc-macro-crate 3.2.0", 571 | "proc-macro2", 572 | "quote", 573 | "syn 2.0.87", 574 | ] 575 | 576 | [[package]] 577 | name = "borsh-derive-internal" 578 | version = "0.9.3" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" 581 | dependencies = [ 582 | "proc-macro2", 583 | "quote", 584 | "syn 1.0.109", 585 | ] 586 | 587 | [[package]] 588 | name = "borsh-derive-internal" 589 | version = "0.10.4" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" 592 | dependencies = [ 593 | "proc-macro2", 594 | "quote", 595 | "syn 1.0.109", 596 | ] 597 | 598 | [[package]] 599 | name = "borsh-schema-derive-internal" 600 | version = "0.9.3" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" 603 | dependencies = [ 604 | "proc-macro2", 605 | "quote", 606 | "syn 1.0.109", 607 | ] 608 | 609 | [[package]] 610 | name = "borsh-schema-derive-internal" 611 | version = "0.10.4" 612 | source = "registry+https://github.com/rust-lang/crates.io-index" 613 | checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" 614 | dependencies = [ 615 | "proc-macro2", 616 | "quote", 617 | "syn 1.0.109", 618 | ] 619 | 620 | [[package]] 621 | name = "bs58" 622 | version = "0.4.0" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" 625 | 626 | [[package]] 627 | name = "bs58" 628 | version = "0.5.1" 629 | source = "registry+https://github.com/rust-lang/crates.io-index" 630 | checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" 631 | dependencies = [ 632 | "tinyvec", 633 | ] 634 | 635 | [[package]] 636 | name = "bumpalo" 637 | version = "3.16.0" 638 | source = "registry+https://github.com/rust-lang/crates.io-index" 639 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 640 | 641 | [[package]] 642 | name = "bv" 643 | version = "0.11.1" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" 646 | dependencies = [ 647 | "feature-probe", 648 | "serde", 649 | ] 650 | 651 | [[package]] 652 | name = "bytemuck" 653 | version = "1.19.0" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" 656 | dependencies = [ 657 | "bytemuck_derive", 658 | ] 659 | 660 | [[package]] 661 | name = "bytemuck_derive" 662 | version = "1.8.0" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" 665 | dependencies = [ 666 | "proc-macro2", 667 | "quote", 668 | "syn 2.0.87", 669 | ] 670 | 671 | [[package]] 672 | name = "byteorder" 673 | version = "1.5.0" 674 | source = "registry+https://github.com/rust-lang/crates.io-index" 675 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 676 | 677 | [[package]] 678 | name = "cargo_toml" 679 | version = "0.19.2" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" 682 | dependencies = [ 683 | "serde", 684 | "toml 0.8.19", 685 | ] 686 | 687 | [[package]] 688 | name = "cc" 689 | version = "1.2.1" 690 | source = "registry+https://github.com/rust-lang/crates.io-index" 691 | checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" 692 | dependencies = [ 693 | "jobserver", 694 | "libc", 695 | "shlex", 696 | ] 697 | 698 | [[package]] 699 | name = "cfg-if" 700 | version = "1.0.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 703 | 704 | [[package]] 705 | name = "cfg_aliases" 706 | version = "0.2.1" 707 | source = "registry+https://github.com/rust-lang/crates.io-index" 708 | checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 709 | 710 | [[package]] 711 | name = "chrono" 712 | version = "0.4.38" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 715 | dependencies = [ 716 | "num-traits", 717 | ] 718 | 719 | [[package]] 720 | name = "cipher" 721 | version = "0.3.0" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" 724 | dependencies = [ 725 | "generic-array", 726 | ] 727 | 728 | [[package]] 729 | name = "console_error_panic_hook" 730 | version = "0.1.7" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" 733 | dependencies = [ 734 | "cfg-if", 735 | "wasm-bindgen", 736 | ] 737 | 738 | [[package]] 739 | name = "console_log" 740 | version = "0.2.2" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" 743 | dependencies = [ 744 | "log", 745 | "web-sys", 746 | ] 747 | 748 | [[package]] 749 | name = "constant_time_eq" 750 | version = "0.3.1" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" 753 | 754 | [[package]] 755 | name = "cpufeatures" 756 | version = "0.2.15" 757 | source = "registry+https://github.com/rust-lang/crates.io-index" 758 | checksum = "0ca741a962e1b0bff6d724a1a0958b686406e853bb14061f218562e1896f95e6" 759 | dependencies = [ 760 | "libc", 761 | ] 762 | 763 | [[package]] 764 | name = "crossbeam-deque" 765 | version = "0.8.5" 766 | source = "registry+https://github.com/rust-lang/crates.io-index" 767 | checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 768 | dependencies = [ 769 | "crossbeam-epoch", 770 | "crossbeam-utils", 771 | ] 772 | 773 | [[package]] 774 | name = "crossbeam-epoch" 775 | version = "0.9.18" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 778 | dependencies = [ 779 | "crossbeam-utils", 780 | ] 781 | 782 | [[package]] 783 | name = "crossbeam-utils" 784 | version = "0.8.20" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 787 | 788 | [[package]] 789 | name = "crunchy" 790 | version = "0.2.2" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 793 | 794 | [[package]] 795 | name = "crypto-common" 796 | version = "0.1.6" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 799 | dependencies = [ 800 | "generic-array", 801 | "typenum", 802 | ] 803 | 804 | [[package]] 805 | name = "crypto-mac" 806 | version = "0.8.0" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" 809 | dependencies = [ 810 | "generic-array", 811 | "subtle", 812 | ] 813 | 814 | [[package]] 815 | name = "ctr" 816 | version = "0.8.0" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" 819 | dependencies = [ 820 | "cipher", 821 | ] 822 | 823 | [[package]] 824 | name = "curve25519-dalek" 825 | version = "3.2.1" 826 | source = "registry+https://github.com/rust-lang/crates.io-index" 827 | checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" 828 | dependencies = [ 829 | "byteorder", 830 | "digest 0.9.0", 831 | "rand_core 0.5.1", 832 | "serde", 833 | "subtle", 834 | "zeroize", 835 | ] 836 | 837 | [[package]] 838 | name = "darling" 839 | version = "0.20.10" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" 842 | dependencies = [ 843 | "darling_core", 844 | "darling_macro", 845 | ] 846 | 847 | [[package]] 848 | name = "darling_core" 849 | version = "0.20.10" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" 852 | dependencies = [ 853 | "fnv", 854 | "ident_case", 855 | "proc-macro2", 856 | "quote", 857 | "strsim", 858 | "syn 2.0.87", 859 | ] 860 | 861 | [[package]] 862 | name = "darling_macro" 863 | version = "0.20.10" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" 866 | dependencies = [ 867 | "darling_core", 868 | "quote", 869 | "syn 2.0.87", 870 | ] 871 | 872 | [[package]] 873 | name = "derivation-path" 874 | version = "0.2.0" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" 877 | 878 | [[package]] 879 | name = "derivative" 880 | version = "2.2.0" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 883 | dependencies = [ 884 | "proc-macro2", 885 | "quote", 886 | "syn 1.0.109", 887 | ] 888 | 889 | [[package]] 890 | name = "digest" 891 | version = "0.9.0" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 894 | dependencies = [ 895 | "generic-array", 896 | ] 897 | 898 | [[package]] 899 | name = "digest" 900 | version = "0.10.7" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 903 | dependencies = [ 904 | "block-buffer 0.10.4", 905 | "crypto-common", 906 | "subtle", 907 | ] 908 | 909 | [[package]] 910 | name = "ed25519" 911 | version = "1.5.3" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" 914 | dependencies = [ 915 | "signature", 916 | ] 917 | 918 | [[package]] 919 | name = "ed25519-dalek" 920 | version = "1.0.1" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" 923 | dependencies = [ 924 | "curve25519-dalek", 925 | "ed25519", 926 | "rand 0.7.3", 927 | "serde", 928 | "sha2 0.9.9", 929 | "zeroize", 930 | ] 931 | 932 | [[package]] 933 | name = "ed25519-dalek-bip32" 934 | version = "0.2.0" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" 937 | dependencies = [ 938 | "derivation-path", 939 | "ed25519-dalek", 940 | "hmac 0.12.1", 941 | "sha2 0.10.8", 942 | ] 943 | 944 | [[package]] 945 | name = "either" 946 | version = "1.13.0" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 949 | 950 | [[package]] 951 | name = "env_logger" 952 | version = "0.9.3" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" 955 | dependencies = [ 956 | "atty", 957 | "humantime", 958 | "log", 959 | "regex", 960 | "termcolor", 961 | ] 962 | 963 | [[package]] 964 | name = "equivalent" 965 | version = "1.0.1" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 968 | 969 | [[package]] 970 | name = "feature-probe" 971 | version = "0.1.1" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" 974 | 975 | [[package]] 976 | name = "fnv" 977 | version = "1.0.7" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 980 | 981 | [[package]] 982 | name = "generic-array" 983 | version = "0.14.7" 984 | source = "registry+https://github.com/rust-lang/crates.io-index" 985 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 986 | dependencies = [ 987 | "serde", 988 | "typenum", 989 | "version_check", 990 | ] 991 | 992 | [[package]] 993 | name = "getrandom" 994 | version = "0.1.16" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" 997 | dependencies = [ 998 | "cfg-if", 999 | "js-sys", 1000 | "libc", 1001 | "wasi 0.9.0+wasi-snapshot-preview1", 1002 | "wasm-bindgen", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "getrandom" 1007 | version = "0.2.15" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 1010 | dependencies = [ 1011 | "cfg-if", 1012 | "js-sys", 1013 | "libc", 1014 | "wasi 0.11.0+wasi-snapshot-preview1", 1015 | "wasm-bindgen", 1016 | ] 1017 | 1018 | [[package]] 1019 | name = "hashbrown" 1020 | version = "0.11.2" 1021 | source = "registry+https://github.com/rust-lang/crates.io-index" 1022 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 1023 | dependencies = [ 1024 | "ahash 0.7.8", 1025 | ] 1026 | 1027 | [[package]] 1028 | name = "hashbrown" 1029 | version = "0.13.2" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" 1032 | dependencies = [ 1033 | "ahash 0.8.11", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "hashbrown" 1038 | version = "0.15.1" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" 1041 | 1042 | [[package]] 1043 | name = "heck" 1044 | version = "0.3.3" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 1047 | dependencies = [ 1048 | "unicode-segmentation", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "hermit-abi" 1053 | version = "0.1.19" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1056 | dependencies = [ 1057 | "libc", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "hmac" 1062 | version = "0.8.1" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" 1065 | dependencies = [ 1066 | "crypto-mac", 1067 | "digest 0.9.0", 1068 | ] 1069 | 1070 | [[package]] 1071 | name = "hmac" 1072 | version = "0.12.1" 1073 | source = "registry+https://github.com/rust-lang/crates.io-index" 1074 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1075 | dependencies = [ 1076 | "digest 0.10.7", 1077 | ] 1078 | 1079 | [[package]] 1080 | name = "hmac-drbg" 1081 | version = "0.3.0" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" 1084 | dependencies = [ 1085 | "digest 0.9.0", 1086 | "generic-array", 1087 | "hmac 0.8.1", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "humantime" 1092 | version = "2.1.0" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1095 | 1096 | [[package]] 1097 | name = "ident_case" 1098 | version = "1.0.1" 1099 | source = "registry+https://github.com/rust-lang/crates.io-index" 1100 | checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" 1101 | 1102 | [[package]] 1103 | name = "im" 1104 | version = "15.1.0" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" 1107 | dependencies = [ 1108 | "bitmaps", 1109 | "rand_core 0.6.4", 1110 | "rand_xoshiro", 1111 | "rayon", 1112 | "serde", 1113 | "sized-chunks", 1114 | "typenum", 1115 | "version_check", 1116 | ] 1117 | 1118 | [[package]] 1119 | name = "indexmap" 1120 | version = "2.6.0" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" 1123 | dependencies = [ 1124 | "equivalent", 1125 | "hashbrown 0.15.1", 1126 | ] 1127 | 1128 | [[package]] 1129 | name = "itertools" 1130 | version = "0.10.5" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1133 | dependencies = [ 1134 | "either", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "itoa" 1139 | version = "1.0.11" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 1142 | 1143 | [[package]] 1144 | name = "jobserver" 1145 | version = "0.1.32" 1146 | source = "registry+https://github.com/rust-lang/crates.io-index" 1147 | checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" 1148 | dependencies = [ 1149 | "libc", 1150 | ] 1151 | 1152 | [[package]] 1153 | name = "js-sys" 1154 | version = "0.3.72" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" 1157 | dependencies = [ 1158 | "wasm-bindgen", 1159 | ] 1160 | 1161 | [[package]] 1162 | name = "keccak" 1163 | version = "0.1.5" 1164 | source = "registry+https://github.com/rust-lang/crates.io-index" 1165 | checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" 1166 | dependencies = [ 1167 | "cpufeatures", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "lazy_static" 1172 | version = "1.5.0" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1175 | 1176 | [[package]] 1177 | name = "libc" 1178 | version = "0.2.164" 1179 | source = "registry+https://github.com/rust-lang/crates.io-index" 1180 | checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" 1181 | 1182 | [[package]] 1183 | name = "libsecp256k1" 1184 | version = "0.6.0" 1185 | source = "registry+https://github.com/rust-lang/crates.io-index" 1186 | checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" 1187 | dependencies = [ 1188 | "arrayref", 1189 | "base64 0.12.3", 1190 | "digest 0.9.0", 1191 | "hmac-drbg", 1192 | "libsecp256k1-core", 1193 | "libsecp256k1-gen-ecmult", 1194 | "libsecp256k1-gen-genmult", 1195 | "rand 0.7.3", 1196 | "serde", 1197 | "sha2 0.9.9", 1198 | "typenum", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "libsecp256k1-core" 1203 | version = "0.2.2" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" 1206 | dependencies = [ 1207 | "crunchy", 1208 | "digest 0.9.0", 1209 | "subtle", 1210 | ] 1211 | 1212 | [[package]] 1213 | name = "libsecp256k1-gen-ecmult" 1214 | version = "0.2.1" 1215 | source = "registry+https://github.com/rust-lang/crates.io-index" 1216 | checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" 1217 | dependencies = [ 1218 | "libsecp256k1-core", 1219 | ] 1220 | 1221 | [[package]] 1222 | name = "libsecp256k1-gen-genmult" 1223 | version = "0.2.1" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" 1226 | dependencies = [ 1227 | "libsecp256k1-core", 1228 | ] 1229 | 1230 | [[package]] 1231 | name = "light-poseidon" 1232 | version = "0.2.0" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" 1235 | dependencies = [ 1236 | "ark-bn254", 1237 | "ark-ff", 1238 | "num-bigint", 1239 | "thiserror", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "lock_api" 1244 | version = "0.4.12" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1247 | dependencies = [ 1248 | "autocfg", 1249 | "scopeguard", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "log" 1254 | version = "0.4.22" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 1257 | 1258 | [[package]] 1259 | name = "memchr" 1260 | version = "2.7.4" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1263 | 1264 | [[package]] 1265 | name = "memmap2" 1266 | version = "0.5.10" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" 1269 | dependencies = [ 1270 | "libc", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "memoffset" 1275 | version = "0.9.1" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 1278 | dependencies = [ 1279 | "autocfg", 1280 | ] 1281 | 1282 | [[package]] 1283 | name = "merlin" 1284 | version = "3.0.0" 1285 | source = "registry+https://github.com/rust-lang/crates.io-index" 1286 | checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" 1287 | dependencies = [ 1288 | "byteorder", 1289 | "keccak", 1290 | "rand_core 0.6.4", 1291 | "zeroize", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "mpl-token-metadata" 1296 | version = "4.1.2" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "caf0f61b553e424a6234af1268456972ee66c2222e1da89079242251fa7479e5" 1299 | dependencies = [ 1300 | "borsh 0.10.4", 1301 | "num-derive 0.3.3", 1302 | "num-traits", 1303 | "solana-program", 1304 | "thiserror", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "num-bigint" 1309 | version = "0.4.6" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 1312 | dependencies = [ 1313 | "num-integer", 1314 | "num-traits", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "num-derive" 1319 | version = "0.3.3" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" 1322 | dependencies = [ 1323 | "proc-macro2", 1324 | "quote", 1325 | "syn 1.0.109", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "num-derive" 1330 | version = "0.4.2" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" 1333 | dependencies = [ 1334 | "proc-macro2", 1335 | "quote", 1336 | "syn 2.0.87", 1337 | ] 1338 | 1339 | [[package]] 1340 | name = "num-integer" 1341 | version = "0.1.46" 1342 | source = "registry+https://github.com/rust-lang/crates.io-index" 1343 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1344 | dependencies = [ 1345 | "num-traits", 1346 | ] 1347 | 1348 | [[package]] 1349 | name = "num-traits" 1350 | version = "0.2.19" 1351 | source = "registry+https://github.com/rust-lang/crates.io-index" 1352 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1353 | dependencies = [ 1354 | "autocfg", 1355 | ] 1356 | 1357 | [[package]] 1358 | name = "num_enum" 1359 | version = "0.7.3" 1360 | source = "registry+https://github.com/rust-lang/crates.io-index" 1361 | checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" 1362 | dependencies = [ 1363 | "num_enum_derive", 1364 | ] 1365 | 1366 | [[package]] 1367 | name = "num_enum_derive" 1368 | version = "0.7.3" 1369 | source = "registry+https://github.com/rust-lang/crates.io-index" 1370 | checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" 1371 | dependencies = [ 1372 | "proc-macro-crate 3.2.0", 1373 | "proc-macro2", 1374 | "quote", 1375 | "syn 2.0.87", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "once_cell" 1380 | version = "1.20.2" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 1383 | 1384 | [[package]] 1385 | name = "opaque-debug" 1386 | version = "0.3.1" 1387 | source = "registry+https://github.com/rust-lang/crates.io-index" 1388 | checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" 1389 | 1390 | [[package]] 1391 | name = "parking_lot" 1392 | version = "0.12.3" 1393 | source = "registry+https://github.com/rust-lang/crates.io-index" 1394 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1395 | dependencies = [ 1396 | "lock_api", 1397 | "parking_lot_core", 1398 | ] 1399 | 1400 | [[package]] 1401 | name = "parking_lot_core" 1402 | version = "0.9.10" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1405 | dependencies = [ 1406 | "cfg-if", 1407 | "libc", 1408 | "redox_syscall", 1409 | "smallvec", 1410 | "windows-targets", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "paste" 1415 | version = "1.0.15" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 1418 | 1419 | [[package]] 1420 | name = "pbkdf2" 1421 | version = "0.4.0" 1422 | source = "registry+https://github.com/rust-lang/crates.io-index" 1423 | checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" 1424 | dependencies = [ 1425 | "crypto-mac", 1426 | ] 1427 | 1428 | [[package]] 1429 | name = "pbkdf2" 1430 | version = "0.11.0" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" 1433 | dependencies = [ 1434 | "digest 0.10.7", 1435 | ] 1436 | 1437 | [[package]] 1438 | name = "percent-encoding" 1439 | version = "2.3.1" 1440 | source = "registry+https://github.com/rust-lang/crates.io-index" 1441 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1442 | 1443 | [[package]] 1444 | name = "polyval" 1445 | version = "0.5.3" 1446 | source = "registry+https://github.com/rust-lang/crates.io-index" 1447 | checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" 1448 | dependencies = [ 1449 | "cfg-if", 1450 | "cpufeatures", 1451 | "opaque-debug", 1452 | "universal-hash", 1453 | ] 1454 | 1455 | [[package]] 1456 | name = "ppv-lite86" 1457 | version = "0.2.20" 1458 | source = "registry+https://github.com/rust-lang/crates.io-index" 1459 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 1460 | dependencies = [ 1461 | "zerocopy", 1462 | ] 1463 | 1464 | [[package]] 1465 | name = "proc-macro-crate" 1466 | version = "0.1.5" 1467 | source = "registry+https://github.com/rust-lang/crates.io-index" 1468 | checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" 1469 | dependencies = [ 1470 | "toml 0.5.11", 1471 | ] 1472 | 1473 | [[package]] 1474 | name = "proc-macro-crate" 1475 | version = "3.2.0" 1476 | source = "registry+https://github.com/rust-lang/crates.io-index" 1477 | checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" 1478 | dependencies = [ 1479 | "toml_edit", 1480 | ] 1481 | 1482 | [[package]] 1483 | name = "proc-macro2" 1484 | version = "1.0.89" 1485 | source = "registry+https://github.com/rust-lang/crates.io-index" 1486 | checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" 1487 | dependencies = [ 1488 | "unicode-ident", 1489 | ] 1490 | 1491 | [[package]] 1492 | name = "qstring" 1493 | version = "0.7.2" 1494 | source = "registry+https://github.com/rust-lang/crates.io-index" 1495 | checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" 1496 | dependencies = [ 1497 | "percent-encoding", 1498 | ] 1499 | 1500 | [[package]] 1501 | name = "qualifier_attr" 1502 | version = "0.2.2" 1503 | source = "registry+https://github.com/rust-lang/crates.io-index" 1504 | checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" 1505 | dependencies = [ 1506 | "proc-macro2", 1507 | "quote", 1508 | "syn 2.0.87", 1509 | ] 1510 | 1511 | [[package]] 1512 | name = "quote" 1513 | version = "1.0.37" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 1516 | dependencies = [ 1517 | "proc-macro2", 1518 | ] 1519 | 1520 | [[package]] 1521 | name = "rand" 1522 | version = "0.7.3" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 1525 | dependencies = [ 1526 | "getrandom 0.1.16", 1527 | "libc", 1528 | "rand_chacha 0.2.2", 1529 | "rand_core 0.5.1", 1530 | "rand_hc", 1531 | ] 1532 | 1533 | [[package]] 1534 | name = "rand" 1535 | version = "0.8.5" 1536 | source = "registry+https://github.com/rust-lang/crates.io-index" 1537 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1538 | dependencies = [ 1539 | "libc", 1540 | "rand_chacha 0.3.1", 1541 | "rand_core 0.6.4", 1542 | ] 1543 | 1544 | [[package]] 1545 | name = "rand_chacha" 1546 | version = "0.2.2" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 1549 | dependencies = [ 1550 | "ppv-lite86", 1551 | "rand_core 0.5.1", 1552 | ] 1553 | 1554 | [[package]] 1555 | name = "rand_chacha" 1556 | version = "0.3.1" 1557 | source = "registry+https://github.com/rust-lang/crates.io-index" 1558 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1559 | dependencies = [ 1560 | "ppv-lite86", 1561 | "rand_core 0.6.4", 1562 | ] 1563 | 1564 | [[package]] 1565 | name = "rand_core" 1566 | version = "0.5.1" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 1569 | dependencies = [ 1570 | "getrandom 0.1.16", 1571 | ] 1572 | 1573 | [[package]] 1574 | name = "rand_core" 1575 | version = "0.6.4" 1576 | source = "registry+https://github.com/rust-lang/crates.io-index" 1577 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1578 | dependencies = [ 1579 | "getrandom 0.2.15", 1580 | ] 1581 | 1582 | [[package]] 1583 | name = "rand_hc" 1584 | version = "0.2.0" 1585 | source = "registry+https://github.com/rust-lang/crates.io-index" 1586 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 1587 | dependencies = [ 1588 | "rand_core 0.5.1", 1589 | ] 1590 | 1591 | [[package]] 1592 | name = "rand_xoshiro" 1593 | version = "0.6.0" 1594 | source = "registry+https://github.com/rust-lang/crates.io-index" 1595 | checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" 1596 | dependencies = [ 1597 | "rand_core 0.6.4", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "raydium-clmm-cpi" 1602 | version = "0.1.0" 1603 | source = "git+https://github.com/raydium-io/raydium-cpi?branch=anchor-0.30.1#4e5dfcb6e23d564b271cb9926a09d12819c6110a" 1604 | dependencies = [ 1605 | "anchor-lang", 1606 | "anchor-spl", 1607 | ] 1608 | 1609 | [[package]] 1610 | name = "rayon" 1611 | version = "1.10.0" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 1614 | dependencies = [ 1615 | "either", 1616 | "rayon-core", 1617 | ] 1618 | 1619 | [[package]] 1620 | name = "rayon-core" 1621 | version = "1.12.1" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 1624 | dependencies = [ 1625 | "crossbeam-deque", 1626 | "crossbeam-utils", 1627 | ] 1628 | 1629 | [[package]] 1630 | name = "redox_syscall" 1631 | version = "0.5.7" 1632 | source = "registry+https://github.com/rust-lang/crates.io-index" 1633 | checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" 1634 | dependencies = [ 1635 | "bitflags", 1636 | ] 1637 | 1638 | [[package]] 1639 | name = "regex" 1640 | version = "1.11.1" 1641 | source = "registry+https://github.com/rust-lang/crates.io-index" 1642 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 1643 | dependencies = [ 1644 | "aho-corasick", 1645 | "memchr", 1646 | "regex-automata", 1647 | "regex-syntax", 1648 | ] 1649 | 1650 | [[package]] 1651 | name = "regex-automata" 1652 | version = "0.4.9" 1653 | source = "registry+https://github.com/rust-lang/crates.io-index" 1654 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 1655 | dependencies = [ 1656 | "aho-corasick", 1657 | "memchr", 1658 | "regex-syntax", 1659 | ] 1660 | 1661 | [[package]] 1662 | name = "regex-syntax" 1663 | version = "0.8.5" 1664 | source = "registry+https://github.com/rust-lang/crates.io-index" 1665 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 1666 | 1667 | [[package]] 1668 | name = "rustc-hash" 1669 | version = "1.1.0" 1670 | source = "registry+https://github.com/rust-lang/crates.io-index" 1671 | checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 1672 | 1673 | [[package]] 1674 | name = "rustc_version" 1675 | version = "0.4.1" 1676 | source = "registry+https://github.com/rust-lang/crates.io-index" 1677 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 1678 | dependencies = [ 1679 | "semver", 1680 | ] 1681 | 1682 | [[package]] 1683 | name = "rustversion" 1684 | version = "1.0.18" 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" 1686 | checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" 1687 | 1688 | [[package]] 1689 | name = "ryu" 1690 | version = "1.0.18" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1693 | 1694 | [[package]] 1695 | name = "scopeguard" 1696 | version = "1.2.0" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1699 | 1700 | [[package]] 1701 | name = "semver" 1702 | version = "1.0.23" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 1705 | 1706 | [[package]] 1707 | name = "serde" 1708 | version = "1.0.215" 1709 | source = "registry+https://github.com/rust-lang/crates.io-index" 1710 | checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" 1711 | dependencies = [ 1712 | "serde_derive", 1713 | ] 1714 | 1715 | [[package]] 1716 | name = "serde_bytes" 1717 | version = "0.11.15" 1718 | source = "registry+https://github.com/rust-lang/crates.io-index" 1719 | checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" 1720 | dependencies = [ 1721 | "serde", 1722 | ] 1723 | 1724 | [[package]] 1725 | name = "serde_derive" 1726 | version = "1.0.215" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" 1729 | dependencies = [ 1730 | "proc-macro2", 1731 | "quote", 1732 | "syn 2.0.87", 1733 | ] 1734 | 1735 | [[package]] 1736 | name = "serde_json" 1737 | version = "1.0.133" 1738 | source = "registry+https://github.com/rust-lang/crates.io-index" 1739 | checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" 1740 | dependencies = [ 1741 | "itoa", 1742 | "memchr", 1743 | "ryu", 1744 | "serde", 1745 | ] 1746 | 1747 | [[package]] 1748 | name = "serde_spanned" 1749 | version = "0.6.8" 1750 | source = "registry+https://github.com/rust-lang/crates.io-index" 1751 | checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" 1752 | dependencies = [ 1753 | "serde", 1754 | ] 1755 | 1756 | [[package]] 1757 | name = "serde_with" 1758 | version = "2.3.3" 1759 | source = "registry+https://github.com/rust-lang/crates.io-index" 1760 | checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" 1761 | dependencies = [ 1762 | "serde", 1763 | "serde_with_macros", 1764 | ] 1765 | 1766 | [[package]] 1767 | name = "serde_with_macros" 1768 | version = "2.3.3" 1769 | source = "registry+https://github.com/rust-lang/crates.io-index" 1770 | checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" 1771 | dependencies = [ 1772 | "darling", 1773 | "proc-macro2", 1774 | "quote", 1775 | "syn 2.0.87", 1776 | ] 1777 | 1778 | [[package]] 1779 | name = "sha2" 1780 | version = "0.9.9" 1781 | source = "registry+https://github.com/rust-lang/crates.io-index" 1782 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 1783 | dependencies = [ 1784 | "block-buffer 0.9.0", 1785 | "cfg-if", 1786 | "cpufeatures", 1787 | "digest 0.9.0", 1788 | "opaque-debug", 1789 | ] 1790 | 1791 | [[package]] 1792 | name = "sha2" 1793 | version = "0.10.8" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1796 | dependencies = [ 1797 | "cfg-if", 1798 | "cpufeatures", 1799 | "digest 0.10.7", 1800 | ] 1801 | 1802 | [[package]] 1803 | name = "sha3" 1804 | version = "0.9.1" 1805 | source = "registry+https://github.com/rust-lang/crates.io-index" 1806 | checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" 1807 | dependencies = [ 1808 | "block-buffer 0.9.0", 1809 | "digest 0.9.0", 1810 | "keccak", 1811 | "opaque-debug", 1812 | ] 1813 | 1814 | [[package]] 1815 | name = "sha3" 1816 | version = "0.10.8" 1817 | source = "registry+https://github.com/rust-lang/crates.io-index" 1818 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 1819 | dependencies = [ 1820 | "digest 0.10.7", 1821 | "keccak", 1822 | ] 1823 | 1824 | [[package]] 1825 | name = "shlex" 1826 | version = "1.3.0" 1827 | source = "registry+https://github.com/rust-lang/crates.io-index" 1828 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1829 | 1830 | [[package]] 1831 | name = "signature" 1832 | version = "1.6.4" 1833 | source = "registry+https://github.com/rust-lang/crates.io-index" 1834 | checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" 1835 | 1836 | [[package]] 1837 | name = "siphasher" 1838 | version = "0.3.11" 1839 | source = "registry+https://github.com/rust-lang/crates.io-index" 1840 | checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" 1841 | 1842 | [[package]] 1843 | name = "sized-chunks" 1844 | version = "0.6.5" 1845 | source = "registry+https://github.com/rust-lang/crates.io-index" 1846 | checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" 1847 | dependencies = [ 1848 | "bitmaps", 1849 | "typenum", 1850 | ] 1851 | 1852 | [[package]] 1853 | name = "smallvec" 1854 | version = "1.13.2" 1855 | source = "registry+https://github.com/rust-lang/crates.io-index" 1856 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1857 | 1858 | [[package]] 1859 | name = "solana-frozen-abi" 1860 | version = "1.18.26" 1861 | source = "registry+https://github.com/rust-lang/crates.io-index" 1862 | checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" 1863 | dependencies = [ 1864 | "block-buffer 0.10.4", 1865 | "bs58 0.4.0", 1866 | "bv", 1867 | "either", 1868 | "generic-array", 1869 | "im", 1870 | "lazy_static", 1871 | "log", 1872 | "memmap2", 1873 | "rustc_version", 1874 | "serde", 1875 | "serde_bytes", 1876 | "serde_derive", 1877 | "sha2 0.10.8", 1878 | "solana-frozen-abi-macro", 1879 | "subtle", 1880 | "thiserror", 1881 | ] 1882 | 1883 | [[package]] 1884 | name = "solana-frozen-abi-macro" 1885 | version = "1.18.26" 1886 | source = "registry+https://github.com/rust-lang/crates.io-index" 1887 | checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" 1888 | dependencies = [ 1889 | "proc-macro2", 1890 | "quote", 1891 | "rustc_version", 1892 | "syn 2.0.87", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "solana-logger" 1897 | version = "1.18.26" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "121d36ffb3c6b958763312cbc697fbccba46ee837d3a0aa4fc0e90fcb3b884f3" 1900 | dependencies = [ 1901 | "env_logger", 1902 | "lazy_static", 1903 | "log", 1904 | ] 1905 | 1906 | [[package]] 1907 | name = "solana-program" 1908 | version = "1.18.26" 1909 | source = "registry+https://github.com/rust-lang/crates.io-index" 1910 | checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" 1911 | dependencies = [ 1912 | "ark-bn254", 1913 | "ark-ec", 1914 | "ark-ff", 1915 | "ark-serialize", 1916 | "base64 0.21.7", 1917 | "bincode", 1918 | "bitflags", 1919 | "blake3", 1920 | "borsh 0.10.4", 1921 | "borsh 0.9.3", 1922 | "borsh 1.5.3", 1923 | "bs58 0.4.0", 1924 | "bv", 1925 | "bytemuck", 1926 | "cc", 1927 | "console_error_panic_hook", 1928 | "console_log", 1929 | "curve25519-dalek", 1930 | "getrandom 0.2.15", 1931 | "itertools", 1932 | "js-sys", 1933 | "lazy_static", 1934 | "libc", 1935 | "libsecp256k1", 1936 | "light-poseidon", 1937 | "log", 1938 | "memoffset", 1939 | "num-bigint", 1940 | "num-derive 0.4.2", 1941 | "num-traits", 1942 | "parking_lot", 1943 | "rand 0.8.5", 1944 | "rustc_version", 1945 | "rustversion", 1946 | "serde", 1947 | "serde_bytes", 1948 | "serde_derive", 1949 | "serde_json", 1950 | "sha2 0.10.8", 1951 | "sha3 0.10.8", 1952 | "solana-frozen-abi", 1953 | "solana-frozen-abi-macro", 1954 | "solana-sdk-macro", 1955 | "thiserror", 1956 | "tiny-bip39", 1957 | "wasm-bindgen", 1958 | "zeroize", 1959 | ] 1960 | 1961 | [[package]] 1962 | name = "solana-sdk" 1963 | version = "1.18.26" 1964 | source = "registry+https://github.com/rust-lang/crates.io-index" 1965 | checksum = "580ad66c2f7a4c3cb3244fe21440546bd500f5ecb955ad9826e92a78dded8009" 1966 | dependencies = [ 1967 | "assert_matches", 1968 | "base64 0.21.7", 1969 | "bincode", 1970 | "bitflags", 1971 | "borsh 1.5.3", 1972 | "bs58 0.4.0", 1973 | "bytemuck", 1974 | "byteorder", 1975 | "chrono", 1976 | "derivation-path", 1977 | "digest 0.10.7", 1978 | "ed25519-dalek", 1979 | "ed25519-dalek-bip32", 1980 | "generic-array", 1981 | "hmac 0.12.1", 1982 | "itertools", 1983 | "js-sys", 1984 | "lazy_static", 1985 | "libsecp256k1", 1986 | "log", 1987 | "memmap2", 1988 | "num-derive 0.4.2", 1989 | "num-traits", 1990 | "num_enum", 1991 | "pbkdf2 0.11.0", 1992 | "qstring", 1993 | "qualifier_attr", 1994 | "rand 0.7.3", 1995 | "rand 0.8.5", 1996 | "rustc_version", 1997 | "rustversion", 1998 | "serde", 1999 | "serde_bytes", 2000 | "serde_derive", 2001 | "serde_json", 2002 | "serde_with", 2003 | "sha2 0.10.8", 2004 | "sha3 0.10.8", 2005 | "siphasher", 2006 | "solana-frozen-abi", 2007 | "solana-frozen-abi-macro", 2008 | "solana-logger", 2009 | "solana-program", 2010 | "solana-sdk-macro", 2011 | "thiserror", 2012 | "uriparse", 2013 | "wasm-bindgen", 2014 | ] 2015 | 2016 | [[package]] 2017 | name = "solana-sdk-macro" 2018 | version = "1.18.26" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" 2021 | dependencies = [ 2022 | "bs58 0.4.0", 2023 | "proc-macro2", 2024 | "quote", 2025 | "rustversion", 2026 | "syn 2.0.87", 2027 | ] 2028 | 2029 | [[package]] 2030 | name = "solana-security-txt" 2031 | version = "1.1.1" 2032 | source = "registry+https://github.com/rust-lang/crates.io-index" 2033 | checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" 2034 | 2035 | [[package]] 2036 | name = "solana-zk-token-sdk" 2037 | version = "1.18.26" 2038 | source = "registry+https://github.com/rust-lang/crates.io-index" 2039 | checksum = "7cbdf4249b6dfcbba7d84e2b53313698043f60f8e22ce48286e6fbe8a17c8d16" 2040 | dependencies = [ 2041 | "aes-gcm-siv", 2042 | "base64 0.21.7", 2043 | "bincode", 2044 | "bytemuck", 2045 | "byteorder", 2046 | "curve25519-dalek", 2047 | "getrandom 0.1.16", 2048 | "itertools", 2049 | "lazy_static", 2050 | "merlin", 2051 | "num-derive 0.4.2", 2052 | "num-traits", 2053 | "rand 0.7.3", 2054 | "serde", 2055 | "serde_json", 2056 | "sha3 0.9.1", 2057 | "solana-program", 2058 | "solana-sdk", 2059 | "subtle", 2060 | "thiserror", 2061 | "zeroize", 2062 | ] 2063 | 2064 | [[package]] 2065 | name = "spl-associated-token-account" 2066 | version = "3.0.4" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" 2069 | dependencies = [ 2070 | "assert_matches", 2071 | "borsh 1.5.3", 2072 | "num-derive 0.4.2", 2073 | "num-traits", 2074 | "solana-program", 2075 | "spl-token", 2076 | "spl-token-2022", 2077 | "thiserror", 2078 | ] 2079 | 2080 | [[package]] 2081 | name = "spl-discriminator" 2082 | version = "0.2.5" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "210101376962bb22bb13be6daea34656ea1cbc248fce2164b146e39203b55e03" 2085 | dependencies = [ 2086 | "bytemuck", 2087 | "solana-program", 2088 | "spl-discriminator-derive", 2089 | ] 2090 | 2091 | [[package]] 2092 | name = "spl-discriminator-derive" 2093 | version = "0.2.0" 2094 | source = "registry+https://github.com/rust-lang/crates.io-index" 2095 | checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" 2096 | dependencies = [ 2097 | "quote", 2098 | "spl-discriminator-syn", 2099 | "syn 2.0.87", 2100 | ] 2101 | 2102 | [[package]] 2103 | name = "spl-discriminator-syn" 2104 | version = "0.2.0" 2105 | source = "registry+https://github.com/rust-lang/crates.io-index" 2106 | checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" 2107 | dependencies = [ 2108 | "proc-macro2", 2109 | "quote", 2110 | "sha2 0.10.8", 2111 | "syn 2.0.87", 2112 | "thiserror", 2113 | ] 2114 | 2115 | [[package]] 2116 | name = "spl-memo" 2117 | version = "4.0.4" 2118 | source = "registry+https://github.com/rust-lang/crates.io-index" 2119 | checksum = "a49f49f95f2d02111ded31696ab38a081fab623d4c76bd4cb074286db4560836" 2120 | dependencies = [ 2121 | "solana-program", 2122 | ] 2123 | 2124 | [[package]] 2125 | name = "spl-pod" 2126 | version = "0.2.5" 2127 | source = "registry+https://github.com/rust-lang/crates.io-index" 2128 | checksum = "c52d84c55efeef8edcc226743dc089d7e3888b8e3474569aa3eff152b37b9996" 2129 | dependencies = [ 2130 | "borsh 1.5.3", 2131 | "bytemuck", 2132 | "solana-program", 2133 | "solana-zk-token-sdk", 2134 | "spl-program-error", 2135 | ] 2136 | 2137 | [[package]] 2138 | name = "spl-program-error" 2139 | version = "0.4.4" 2140 | source = "registry+https://github.com/rust-lang/crates.io-index" 2141 | checksum = "e45a49acb925db68aa501b926096b2164adbdcade7a0c24152af9f0742d0a602" 2142 | dependencies = [ 2143 | "num-derive 0.4.2", 2144 | "num-traits", 2145 | "solana-program", 2146 | "spl-program-error-derive", 2147 | "thiserror", 2148 | ] 2149 | 2150 | [[package]] 2151 | name = "spl-program-error-derive" 2152 | version = "0.4.1" 2153 | source = "registry+https://github.com/rust-lang/crates.io-index" 2154 | checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" 2155 | dependencies = [ 2156 | "proc-macro2", 2157 | "quote", 2158 | "sha2 0.10.8", 2159 | "syn 2.0.87", 2160 | ] 2161 | 2162 | [[package]] 2163 | name = "spl-tlv-account-resolution" 2164 | version = "0.6.5" 2165 | source = "registry+https://github.com/rust-lang/crates.io-index" 2166 | checksum = "fab8edfd37be5fa17c9e42c1bff86abbbaf0494b031b37957f2728ad2ff842ba" 2167 | dependencies = [ 2168 | "bytemuck", 2169 | "solana-program", 2170 | "spl-discriminator", 2171 | "spl-pod", 2172 | "spl-program-error", 2173 | "spl-type-length-value", 2174 | ] 2175 | 2176 | [[package]] 2177 | name = "spl-token" 2178 | version = "4.0.3" 2179 | source = "registry+https://github.com/rust-lang/crates.io-index" 2180 | checksum = "b9eb465e4bf5ce1d498f05204c8089378c1ba34ef2777ea95852fc53a1fd4fb2" 2181 | dependencies = [ 2182 | "arrayref", 2183 | "bytemuck", 2184 | "num-derive 0.4.2", 2185 | "num-traits", 2186 | "num_enum", 2187 | "solana-program", 2188 | "thiserror", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "spl-token-2022" 2193 | version = "3.0.4" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "b01d1b2851964e257187c0bca43a0de38d0af59192479ca01ac3e2b58b1bd95a" 2196 | dependencies = [ 2197 | "arrayref", 2198 | "bytemuck", 2199 | "num-derive 0.4.2", 2200 | "num-traits", 2201 | "num_enum", 2202 | "solana-program", 2203 | "solana-security-txt", 2204 | "solana-zk-token-sdk", 2205 | "spl-memo", 2206 | "spl-pod", 2207 | "spl-token", 2208 | "spl-token-group-interface", 2209 | "spl-token-metadata-interface", 2210 | "spl-transfer-hook-interface", 2211 | "spl-type-length-value", 2212 | "thiserror", 2213 | ] 2214 | 2215 | [[package]] 2216 | name = "spl-token-group-interface" 2217 | version = "0.2.5" 2218 | source = "registry+https://github.com/rust-lang/crates.io-index" 2219 | checksum = "014817d6324b1e20c4bbc883e8ee30a5faa13e59d91d1b2b95df98b920150c17" 2220 | dependencies = [ 2221 | "bytemuck", 2222 | "solana-program", 2223 | "spl-discriminator", 2224 | "spl-pod", 2225 | "spl-program-error", 2226 | ] 2227 | 2228 | [[package]] 2229 | name = "spl-token-metadata-interface" 2230 | version = "0.3.5" 2231 | source = "registry+https://github.com/rust-lang/crates.io-index" 2232 | checksum = "f3da00495b602ebcf5d8ba8b3ecff1ee454ce4c125c9077747be49c2d62335ba" 2233 | dependencies = [ 2234 | "borsh 1.5.3", 2235 | "solana-program", 2236 | "spl-discriminator", 2237 | "spl-pod", 2238 | "spl-program-error", 2239 | "spl-type-length-value", 2240 | ] 2241 | 2242 | [[package]] 2243 | name = "spl-transfer-hook-interface" 2244 | version = "0.6.5" 2245 | source = "registry+https://github.com/rust-lang/crates.io-index" 2246 | checksum = "a9b5c08a89838e5a2931f79b17f611857f281a14a2100968a3ccef352cb7414b" 2247 | dependencies = [ 2248 | "arrayref", 2249 | "bytemuck", 2250 | "solana-program", 2251 | "spl-discriminator", 2252 | "spl-pod", 2253 | "spl-program-error", 2254 | "spl-tlv-account-resolution", 2255 | "spl-type-length-value", 2256 | ] 2257 | 2258 | [[package]] 2259 | name = "spl-type-length-value" 2260 | version = "0.4.6" 2261 | source = "registry+https://github.com/rust-lang/crates.io-index" 2262 | checksum = "c872f93d0600e743116501eba2d53460e73a12c9a496875a42a7d70e034fe06d" 2263 | dependencies = [ 2264 | "bytemuck", 2265 | "solana-program", 2266 | "spl-discriminator", 2267 | "spl-pod", 2268 | "spl-program-error", 2269 | ] 2270 | 2271 | [[package]] 2272 | name = "strsim" 2273 | version = "0.11.1" 2274 | source = "registry+https://github.com/rust-lang/crates.io-index" 2275 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2276 | 2277 | [[package]] 2278 | name = "subtle" 2279 | version = "2.4.1" 2280 | source = "registry+https://github.com/rust-lang/crates.io-index" 2281 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2282 | 2283 | [[package]] 2284 | name = "syn" 2285 | version = "1.0.109" 2286 | source = "registry+https://github.com/rust-lang/crates.io-index" 2287 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2288 | dependencies = [ 2289 | "proc-macro2", 2290 | "quote", 2291 | "unicode-ident", 2292 | ] 2293 | 2294 | [[package]] 2295 | name = "syn" 2296 | version = "2.0.87" 2297 | source = "registry+https://github.com/rust-lang/crates.io-index" 2298 | checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" 2299 | dependencies = [ 2300 | "proc-macro2", 2301 | "quote", 2302 | "unicode-ident", 2303 | ] 2304 | 2305 | [[package]] 2306 | name = "termcolor" 2307 | version = "1.4.1" 2308 | source = "registry+https://github.com/rust-lang/crates.io-index" 2309 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 2310 | dependencies = [ 2311 | "winapi-util", 2312 | ] 2313 | 2314 | [[package]] 2315 | name = "thiserror" 2316 | version = "1.0.69" 2317 | source = "registry+https://github.com/rust-lang/crates.io-index" 2318 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2319 | dependencies = [ 2320 | "thiserror-impl", 2321 | ] 2322 | 2323 | [[package]] 2324 | name = "thiserror-impl" 2325 | version = "1.0.69" 2326 | source = "registry+https://github.com/rust-lang/crates.io-index" 2327 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2328 | dependencies = [ 2329 | "proc-macro2", 2330 | "quote", 2331 | "syn 2.0.87", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "tiny-bip39" 2336 | version = "0.8.2" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" 2339 | dependencies = [ 2340 | "anyhow", 2341 | "hmac 0.8.1", 2342 | "once_cell", 2343 | "pbkdf2 0.4.0", 2344 | "rand 0.7.3", 2345 | "rustc-hash", 2346 | "sha2 0.9.9", 2347 | "thiserror", 2348 | "unicode-normalization", 2349 | "wasm-bindgen", 2350 | "zeroize", 2351 | ] 2352 | 2353 | [[package]] 2354 | name = "tinyvec" 2355 | version = "1.8.0" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 2358 | dependencies = [ 2359 | "tinyvec_macros", 2360 | ] 2361 | 2362 | [[package]] 2363 | name = "tinyvec_macros" 2364 | version = "0.1.1" 2365 | source = "registry+https://github.com/rust-lang/crates.io-index" 2366 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2367 | 2368 | [[package]] 2369 | name = "token-2022-pumpfun" 2370 | version = "0.1.0" 2371 | dependencies = [ 2372 | "anchor-lang", 2373 | "anchor-spl", 2374 | "raydium-clmm-cpi", 2375 | ] 2376 | 2377 | [[package]] 2378 | name = "toml" 2379 | version = "0.5.11" 2380 | source = "registry+https://github.com/rust-lang/crates.io-index" 2381 | checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" 2382 | dependencies = [ 2383 | "serde", 2384 | ] 2385 | 2386 | [[package]] 2387 | name = "toml" 2388 | version = "0.8.19" 2389 | source = "registry+https://github.com/rust-lang/crates.io-index" 2390 | checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" 2391 | dependencies = [ 2392 | "serde", 2393 | "serde_spanned", 2394 | "toml_datetime", 2395 | "toml_edit", 2396 | ] 2397 | 2398 | [[package]] 2399 | name = "toml_datetime" 2400 | version = "0.6.8" 2401 | source = "registry+https://github.com/rust-lang/crates.io-index" 2402 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2403 | dependencies = [ 2404 | "serde", 2405 | ] 2406 | 2407 | [[package]] 2408 | name = "toml_edit" 2409 | version = "0.22.22" 2410 | source = "registry+https://github.com/rust-lang/crates.io-index" 2411 | checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" 2412 | dependencies = [ 2413 | "indexmap", 2414 | "serde", 2415 | "serde_spanned", 2416 | "toml_datetime", 2417 | "winnow", 2418 | ] 2419 | 2420 | [[package]] 2421 | name = "typenum" 2422 | version = "1.17.0" 2423 | source = "registry+https://github.com/rust-lang/crates.io-index" 2424 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2425 | 2426 | [[package]] 2427 | name = "unicode-ident" 2428 | version = "1.0.13" 2429 | source = "registry+https://github.com/rust-lang/crates.io-index" 2430 | checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" 2431 | 2432 | [[package]] 2433 | name = "unicode-normalization" 2434 | version = "0.1.24" 2435 | source = "registry+https://github.com/rust-lang/crates.io-index" 2436 | checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" 2437 | dependencies = [ 2438 | "tinyvec", 2439 | ] 2440 | 2441 | [[package]] 2442 | name = "unicode-segmentation" 2443 | version = "1.12.0" 2444 | source = "registry+https://github.com/rust-lang/crates.io-index" 2445 | checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 2446 | 2447 | [[package]] 2448 | name = "universal-hash" 2449 | version = "0.4.1" 2450 | source = "registry+https://github.com/rust-lang/crates.io-index" 2451 | checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" 2452 | dependencies = [ 2453 | "generic-array", 2454 | "subtle", 2455 | ] 2456 | 2457 | [[package]] 2458 | name = "uriparse" 2459 | version = "0.6.4" 2460 | source = "registry+https://github.com/rust-lang/crates.io-index" 2461 | checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" 2462 | dependencies = [ 2463 | "fnv", 2464 | "lazy_static", 2465 | ] 2466 | 2467 | [[package]] 2468 | name = "version_check" 2469 | version = "0.9.5" 2470 | source = "registry+https://github.com/rust-lang/crates.io-index" 2471 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 2472 | 2473 | [[package]] 2474 | name = "wasi" 2475 | version = "0.9.0+wasi-snapshot-preview1" 2476 | source = "registry+https://github.com/rust-lang/crates.io-index" 2477 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 2478 | 2479 | [[package]] 2480 | name = "wasi" 2481 | version = "0.11.0+wasi-snapshot-preview1" 2482 | source = "registry+https://github.com/rust-lang/crates.io-index" 2483 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2484 | 2485 | [[package]] 2486 | name = "wasm-bindgen" 2487 | version = "0.2.95" 2488 | source = "registry+https://github.com/rust-lang/crates.io-index" 2489 | checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" 2490 | dependencies = [ 2491 | "cfg-if", 2492 | "once_cell", 2493 | "wasm-bindgen-macro", 2494 | ] 2495 | 2496 | [[package]] 2497 | name = "wasm-bindgen-backend" 2498 | version = "0.2.95" 2499 | source = "registry+https://github.com/rust-lang/crates.io-index" 2500 | checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" 2501 | dependencies = [ 2502 | "bumpalo", 2503 | "log", 2504 | "once_cell", 2505 | "proc-macro2", 2506 | "quote", 2507 | "syn 2.0.87", 2508 | "wasm-bindgen-shared", 2509 | ] 2510 | 2511 | [[package]] 2512 | name = "wasm-bindgen-macro" 2513 | version = "0.2.95" 2514 | source = "registry+https://github.com/rust-lang/crates.io-index" 2515 | checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" 2516 | dependencies = [ 2517 | "quote", 2518 | "wasm-bindgen-macro-support", 2519 | ] 2520 | 2521 | [[package]] 2522 | name = "wasm-bindgen-macro-support" 2523 | version = "0.2.95" 2524 | source = "registry+https://github.com/rust-lang/crates.io-index" 2525 | checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" 2526 | dependencies = [ 2527 | "proc-macro2", 2528 | "quote", 2529 | "syn 2.0.87", 2530 | "wasm-bindgen-backend", 2531 | "wasm-bindgen-shared", 2532 | ] 2533 | 2534 | [[package]] 2535 | name = "wasm-bindgen-shared" 2536 | version = "0.2.95" 2537 | source = "registry+https://github.com/rust-lang/crates.io-index" 2538 | checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" 2539 | 2540 | [[package]] 2541 | name = "web-sys" 2542 | version = "0.3.72" 2543 | source = "registry+https://github.com/rust-lang/crates.io-index" 2544 | checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" 2545 | dependencies = [ 2546 | "js-sys", 2547 | "wasm-bindgen", 2548 | ] 2549 | 2550 | [[package]] 2551 | name = "winapi" 2552 | version = "0.3.9" 2553 | source = "registry+https://github.com/rust-lang/crates.io-index" 2554 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2555 | dependencies = [ 2556 | "winapi-i686-pc-windows-gnu", 2557 | "winapi-x86_64-pc-windows-gnu", 2558 | ] 2559 | 2560 | [[package]] 2561 | name = "winapi-i686-pc-windows-gnu" 2562 | version = "0.4.0" 2563 | source = "registry+https://github.com/rust-lang/crates.io-index" 2564 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2565 | 2566 | [[package]] 2567 | name = "winapi-util" 2568 | version = "0.1.9" 2569 | source = "registry+https://github.com/rust-lang/crates.io-index" 2570 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 2571 | dependencies = [ 2572 | "windows-sys", 2573 | ] 2574 | 2575 | [[package]] 2576 | name = "winapi-x86_64-pc-windows-gnu" 2577 | version = "0.4.0" 2578 | source = "registry+https://github.com/rust-lang/crates.io-index" 2579 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2580 | 2581 | [[package]] 2582 | name = "windows-sys" 2583 | version = "0.59.0" 2584 | source = "registry+https://github.com/rust-lang/crates.io-index" 2585 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 2586 | dependencies = [ 2587 | "windows-targets", 2588 | ] 2589 | 2590 | [[package]] 2591 | name = "windows-targets" 2592 | version = "0.52.6" 2593 | source = "registry+https://github.com/rust-lang/crates.io-index" 2594 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 2595 | dependencies = [ 2596 | "windows_aarch64_gnullvm", 2597 | "windows_aarch64_msvc", 2598 | "windows_i686_gnu", 2599 | "windows_i686_gnullvm", 2600 | "windows_i686_msvc", 2601 | "windows_x86_64_gnu", 2602 | "windows_x86_64_gnullvm", 2603 | "windows_x86_64_msvc", 2604 | ] 2605 | 2606 | [[package]] 2607 | name = "windows_aarch64_gnullvm" 2608 | version = "0.52.6" 2609 | source = "registry+https://github.com/rust-lang/crates.io-index" 2610 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 2611 | 2612 | [[package]] 2613 | name = "windows_aarch64_msvc" 2614 | version = "0.52.6" 2615 | source = "registry+https://github.com/rust-lang/crates.io-index" 2616 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 2617 | 2618 | [[package]] 2619 | name = "windows_i686_gnu" 2620 | version = "0.52.6" 2621 | source = "registry+https://github.com/rust-lang/crates.io-index" 2622 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 2623 | 2624 | [[package]] 2625 | name = "windows_i686_gnullvm" 2626 | version = "0.52.6" 2627 | source = "registry+https://github.com/rust-lang/crates.io-index" 2628 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 2629 | 2630 | [[package]] 2631 | name = "windows_i686_msvc" 2632 | version = "0.52.6" 2633 | source = "registry+https://github.com/rust-lang/crates.io-index" 2634 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 2635 | 2636 | [[package]] 2637 | name = "windows_x86_64_gnu" 2638 | version = "0.52.6" 2639 | source = "registry+https://github.com/rust-lang/crates.io-index" 2640 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 2641 | 2642 | [[package]] 2643 | name = "windows_x86_64_gnullvm" 2644 | version = "0.52.6" 2645 | source = "registry+https://github.com/rust-lang/crates.io-index" 2646 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 2647 | 2648 | [[package]] 2649 | name = "windows_x86_64_msvc" 2650 | version = "0.52.6" 2651 | source = "registry+https://github.com/rust-lang/crates.io-index" 2652 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 2653 | 2654 | [[package]] 2655 | name = "winnow" 2656 | version = "0.6.20" 2657 | source = "registry+https://github.com/rust-lang/crates.io-index" 2658 | checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" 2659 | dependencies = [ 2660 | "memchr", 2661 | ] 2662 | 2663 | [[package]] 2664 | name = "zerocopy" 2665 | version = "0.7.35" 2666 | source = "registry+https://github.com/rust-lang/crates.io-index" 2667 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 2668 | dependencies = [ 2669 | "byteorder", 2670 | "zerocopy-derive", 2671 | ] 2672 | 2673 | [[package]] 2674 | name = "zerocopy-derive" 2675 | version = "0.7.35" 2676 | source = "registry+https://github.com/rust-lang/crates.io-index" 2677 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 2678 | dependencies = [ 2679 | "proc-macro2", 2680 | "quote", 2681 | "syn 2.0.87", 2682 | ] 2683 | 2684 | [[package]] 2685 | name = "zeroize" 2686 | version = "1.3.0" 2687 | source = "registry+https://github.com/rust-lang/crates.io-index" 2688 | checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" 2689 | dependencies = [ 2690 | "zeroize_derive", 2691 | ] 2692 | 2693 | [[package]] 2694 | name = "zeroize_derive" 2695 | version = "1.4.2" 2696 | source = "registry+https://github.com/rust-lang/crates.io-index" 2697 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 2698 | dependencies = [ 2699 | "proc-macro2", 2700 | "quote", 2701 | "syn 2.0.87", 2702 | ] 2703 | --------------------------------------------------------------------------------