mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-15 18:08:05 +00:00
Release solana-streamer-sdk v1.4.11
This commit is contained in:
@@ -29,6 +29,10 @@ pub struct PumpFunCreateTokenEvent {
|
||||
#[borsh(skip)]
|
||||
pub is_cashback_enabled: bool,
|
||||
#[borsh(skip)]
|
||||
pub quote_mint: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub virtual_quote_reserves: u64,
|
||||
#[borsh(skip)]
|
||||
pub mint_authority: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub associated_bonding_curve: Pubkey,
|
||||
@@ -72,6 +76,10 @@ pub struct PumpFunCreateV2TokenEvent {
|
||||
/// Whether cashback is enabled (IDL CreateEvent.is_cashback_enabled)
|
||||
pub is_cashback_enabled: bool,
|
||||
#[borsh(skip)]
|
||||
pub quote_mint: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub virtual_quote_reserves: u64,
|
||||
#[borsh(skip)]
|
||||
pub mint_authority: Pubkey,
|
||||
#[borsh(skip)]
|
||||
pub associated_bonding_curve: Pubkey,
|
||||
@@ -448,6 +456,95 @@ pub struct PumpFunGlobalAccountEvent {
|
||||
pub global: Global,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunFeeConfigAccountEvent {
|
||||
pub metadata: EventMetadata,
|
||||
pub pubkey: Pubkey,
|
||||
pub executable: bool,
|
||||
pub lamports: u64,
|
||||
pub owner: Pubkey,
|
||||
pub rent_epoch: u64,
|
||||
pub fee_config: PumpFunFeeConfig,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunFeeConfig {
|
||||
pub bump: u8,
|
||||
pub admin: Pubkey,
|
||||
pub flat_fees: PumpFeesFees,
|
||||
pub fee_tiers: Vec<PumpFeesFeeTier>,
|
||||
pub stable_fee_tiers: Vec<PumpFeesFeeTier>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunSharingConfigAccountEvent {
|
||||
pub metadata: EventMetadata,
|
||||
pub pubkey: Pubkey,
|
||||
pub executable: bool,
|
||||
pub lamports: u64,
|
||||
pub owner: Pubkey,
|
||||
pub rent_epoch: u64,
|
||||
pub sharing_config: PumpFunSharingConfig,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunSharingConfig {
|
||||
pub bump: u8,
|
||||
pub version: u8,
|
||||
pub status: PumpFeesConfigStatus,
|
||||
pub mint: Pubkey,
|
||||
pub admin: Pubkey,
|
||||
pub admin_revoked: bool,
|
||||
pub shareholders: Vec<PumpFeesShareholder>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunGlobalVolumeAccumulatorAccountEvent {
|
||||
pub metadata: EventMetadata,
|
||||
pub pubkey: Pubkey,
|
||||
pub executable: bool,
|
||||
pub lamports: u64,
|
||||
pub owner: Pubkey,
|
||||
pub rent_epoch: u64,
|
||||
pub global_volume_accumulator: PumpFunGlobalVolumeAccumulator,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunGlobalVolumeAccumulator {
|
||||
pub start_time: i64,
|
||||
pub end_time: i64,
|
||||
pub seconds_in_a_day: i64,
|
||||
pub mint: Pubkey,
|
||||
pub total_token_supply: [u64; 30],
|
||||
pub sol_volumes: [u64; 30],
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunUserVolumeAccumulatorAccountEvent {
|
||||
pub metadata: EventMetadata,
|
||||
pub pubkey: Pubkey,
|
||||
pub executable: bool,
|
||||
pub lamports: u64,
|
||||
pub owner: Pubkey,
|
||||
pub rent_epoch: u64,
|
||||
pub user_volume_accumulator: PumpFunUserVolumeAccumulator,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct PumpFunUserVolumeAccumulator {
|
||||
pub user: Pubkey,
|
||||
pub needs_claim: bool,
|
||||
pub total_unclaimed_tokens: u64,
|
||||
pub total_claimed_tokens: u64,
|
||||
pub current_sol_volume: u64,
|
||||
pub last_update_timestamp: i64,
|
||||
pub has_total_claimed_tokens: bool,
|
||||
pub cashback_earned: u64,
|
||||
pub total_cashback_claimed: u64,
|
||||
pub stable_cashback_earned: u64,
|
||||
pub total_stable_cashback_claimed: u64,
|
||||
}
|
||||
|
||||
/// Event discriminator constants
|
||||
pub mod discriminators {
|
||||
// Event discriminators
|
||||
|
||||
@@ -5,17 +5,18 @@ use solana_sdk::pubkey::Pubkey;
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, BorshDeserialize)]
|
||||
pub struct BondingCurve {
|
||||
pub virtual_token_reserves: u64,
|
||||
pub virtual_sol_reserves: u64,
|
||||
pub virtual_quote_reserves: u64,
|
||||
pub real_token_reserves: u64,
|
||||
pub real_sol_reserves: u64,
|
||||
pub real_quote_reserves: u64,
|
||||
pub token_total_supply: u64,
|
||||
pub complete: bool,
|
||||
pub creator: Pubkey,
|
||||
pub is_mayhem_mode: bool,
|
||||
pub is_cashback_coin: bool,
|
||||
pub quote_mint: Pubkey,
|
||||
}
|
||||
|
||||
pub const BONDING_CURVE_SIZE: usize = 8 * 5 + 1 + 32 + 1 + 1;
|
||||
pub const BONDING_CURVE_SIZE: usize = 8 * 5 + 1 + 32 + 1 + 1 + 32;
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq, Eq, Serialize, Deserialize, BorshDeserialize)]
|
||||
pub struct Global {
|
||||
@@ -40,7 +41,25 @@ pub struct Global {
|
||||
pub mayhem_mode_enabled: bool,
|
||||
pub reserved_fee_recipients: [Pubkey; 7],
|
||||
pub is_cashback_enabled: bool,
|
||||
pub buyback_fee_recipients: [Pubkey; 8],
|
||||
pub buyback_basis_points: u64,
|
||||
pub initial_virtual_quote_reserves: u64,
|
||||
pub whitelisted_quote_mints: [Pubkey; 1],
|
||||
}
|
||||
|
||||
pub const GLOBAL_SIZE: usize =
|
||||
1 + 32 * 2 + 8 * 5 + 32 + 1 + 8 * 2 + 32 * 7 + 32 * 2 + 1 + 32 * 2 + 1 + 32 * 7 + 1;
|
||||
pub const GLOBAL_SIZE: usize = 1
|
||||
+ 32 * 2
|
||||
+ 8 * 5
|
||||
+ 32
|
||||
+ 1
|
||||
+ 8 * 2
|
||||
+ 32 * 7
|
||||
+ 32 * 2
|
||||
+ 1
|
||||
+ 32 * 2
|
||||
+ 1
|
||||
+ 32 * 7
|
||||
+ 1
|
||||
+ 32 * 8
|
||||
+ 8 * 2
|
||||
+ 32;
|
||||
|
||||
Reference in New Issue
Block a user