Fix Buy/Sell Logic, Update IDL, and Add Missing bn.js Dependency#112
Fix Buy/Sell Logic, Update IDL, and Add Missing bn.js Dependency#112kiennd wants to merge 4 commits intorckprtr:mainfrom
Conversation
|
LGTM! |
|
Getting this error when attempting to create a token using this MR: |
same here. Any fix for this? |
|
I changed the files that were changed in this commit, but I seem to run into this issue |
|
@LightYagami200 @Storryy Details% npm run exampleInitial test account balance: 🔧 GlobalAccount: 📤 Create & Buy TX: 📈 Bonding curve after create & buy: 💰 SPL Balance after buy: 3576.654744 📈 Bonding curve after buy: 💸 Sell:
📤 Sell TX: Final test account balance: 0.031397181 SOL 📉 Bonding curve after sell: |
|
I'm going to test and merge thank you! |
hey? its been a while |
…ogram The on-chain pump program has been updated multiple times since this SDK's last release, adding creator fees, fee program integration, volume tracking, cashback, and mayhem mode support. This broke all buy/sell/create operations. Changes: - Replace IDL with the official one from pump-fun/pump-public-docs (Mar 2026) - Update BondingCurveAccount: add creator, isMayhemMode, isCashbackCoin fields - Update GlobalAccount: add creatorFeeBasisPoints, feeRecipients, withdrawAuthority, enableMigrate, poolMigrationFee, setCreatorAuthority - Update buy instructions to pass all 16 required accounts: creator_vault, global_volume_accumulator, user_volume_accumulator, fee_config, fee_program - Update sell instructions to pass all 14 required accounts - Update sell price calculation to include creator fees - Add PDA derivation helpers for all new accounts - Fix browser compatibility (use Uint8Array instead of Buffer at module level) Fixes rckprtr#108, rckprtr#109, rckprtr#112, rckprtr#120 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request addresses compatibility and functionality issues introduced by the recent Pump.fun IDL update. The following changes have been made:
Updated buy, sell, and createAndBuy functions to align with the updated IDL structure.
Synchronized project interfaces with the latest Pump.fun IDL to ensure seamless program interaction.
Added the missing bn.js dependency required for BigNumber operations.