Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions idl/pump_swap_idl.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@
],
"accounts": [
{
"name": "pool"
"name": "pool",
"writable": true
},
{
"name": "user",
Expand Down Expand Up @@ -730,7 +731,8 @@
],
"accounts": [
{
"name": "pool"
"name": "pool",
"writable": true
},
{
"name": "user",
Expand Down Expand Up @@ -2465,7 +2467,8 @@
],
"accounts": [
{
"name": "pool"
"name": "pool",
"writable": true
},
{
"name": "user",
Expand Down
3 changes: 2 additions & 1 deletion learning-examples/pumpswap/manual_buy_pumpswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ async def buy_pump_swap(

# Define all accounts needed for the buy instruction
accounts = [
AccountMeta(pubkey=pump_fun_amm_market, is_signer=False, is_writable=False),
AccountMeta(pubkey=pump_fun_amm_market, is_signer=False, is_writable=True),
AccountMeta(pubkey=payer.pubkey(), is_signer=True, is_writable=True),
AccountMeta(pubkey=PUMP_SWAP_GLOBAL_CONFIG, is_signer=False, is_writable=False),
AccountMeta(pubkey=base_mint, is_signer=False, is_writable=False),
Expand Down Expand Up @@ -365,6 +365,7 @@ async def buy_pump_swap(
BUY_DISCRIMINATOR
+ struct.pack("<Q", base_amount_out)
+ struct.pack("<Q", max_sol_input)
+ struct.pack("<B", 1) # track_volume: 1 = true (enable volume tracking)
)

compute_limit_ix = set_compute_unit_limit(COMPUTE_UNIT_BUDGET)
Expand Down
2 changes: 1 addition & 1 deletion learning-examples/pumpswap/manual_sell_pumpswap.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ async def sell_pump_swap(

# Define all accounts needed for the sell instruction
accounts = [
AccountMeta(pubkey=pump_fun_amm_market, is_signer=False, is_writable=False),
AccountMeta(pubkey=pump_fun_amm_market, is_signer=False, is_writable=True),
AccountMeta(pubkey=payer.pubkey(), is_signer=True, is_writable=True),
AccountMeta(pubkey=PUMP_SWAP_GLOBAL_CONFIG, is_signer=False, is_writable=False),
AccountMeta(pubkey=base_mint, is_signer=False, is_writable=False),
Expand Down