├── README.md └── pump_ws ├── pf_trade_ws.py ├── ps_create_ws.py ├── pf_create_ws.py ├── pump_fun.json └── pump_swap.json /README.md: -------------------------------------------------------------------------------- 1 | ## Pump Websocket ## 2 | 3 | Monitors Pump Fun create events, trade events, and Pump Swap create events in real-time via WebSocket, using a WSS URL from providers like Helius or QuickNode. 4 | 5 | This code can be adapted for use in a sniper bot or copy trading bot. 6 | 7 | If you can - please support my work and donate to: 3pPK76GL5ChVFBHND54UfBMtg36Bsh1mzbQPTbcK89PD 8 | 9 | ``` 10 | pip install websocket-client solders construct 11 | ``` 12 | 13 | ## Contact ## 14 | 15 | My services are for hire. Contact me if you need help integrating the code into your own project. 16 | 17 | Telegram: https://t.me/AL_THE_BOT_FATHER 18 | 19 | Group Telegram: https://t.me/Bot_Mafia_Support 20 | -------------------------------------------------------------------------------- /pump_ws/pf_trade_ws.py: -------------------------------------------------------------------------------- 1 | import websocket 2 | import json 3 | import base64 4 | from dataclasses import dataclass, asdict 5 | from solders.pubkey import Pubkey # type: ignore 6 | from construct import Struct, Padding, Int64ul, Int64sl, Flag, Bytes 7 | 8 | WSS = "wss://mainnet.helius-rpc.com/?api-key=" 9 | 10 | @dataclass 11 | class TradeEvent: 12 | mint: str 13 | sol_amount: int 14 | token_amount: int 15 | is_buy: bool 16 | user: str 17 | timestamp: int 18 | virtual_sol_reserves: int 19 | virtual_token_reserves: int 20 | real_sol_reserves: int 21 | real_token_reserves: int 22 | fee_recipient: str 23 | fee_basis_points: int 24 | fee: int 25 | creator: str 26 | creator_fee_basis_points: int 27 | creator_fee: int 28 | 29 | _trade_layout = Struct( 30 | Padding(8), 31 | "mint" / Bytes(32), 32 | "sol_amount" / Int64ul, 33 | "token_amount" / Int64ul, 34 | "is_buy" / Flag, 35 | "user" / Bytes(32), 36 | "timestamp" / Int64sl, 37 | "virtual_sol_reserves" / Int64ul, 38 | "virtual_token_reserves" / Int64ul, 39 | "real_sol_reserves" / Int64ul, 40 | "real_token_reserves" / Int64ul, 41 | "fee_recipient" / Bytes(32), 42 | "fee_basis_points" / Int64ul, 43 | "fee" / Int64ul, 44 | "creator" / Bytes(32), 45 | "creator_fee_basis_points" / Int64ul, 46 | "creator_fee" / Int64ul, 47 | ) 48 | 49 | def parse_trade_event(program_data_b64: str) -> TradeEvent | None: 50 | try: 51 | raw = base64.b64decode(program_data_b64) 52 | p = _trade_layout.parse(raw) 53 | return TradeEvent( 54 | mint=str(Pubkey.from_bytes(p.mint)), 55 | sol_amount=p.sol_amount, 56 | token_amount=p.token_amount, 57 | is_buy=p.is_buy, 58 | user=str(Pubkey.from_bytes(p.user)), 59 | timestamp=p.timestamp, 60 | virtual_sol_reserves=p.virtual_sol_reserves, 61 | virtual_token_reserves=p.virtual_token_reserves, 62 | real_sol_reserves=p.real_sol_reserves, 63 | real_token_reserves=p.real_token_reserves, 64 | fee_recipient=str(Pubkey.from_bytes(p.fee_recipient)), 65 | fee_basis_points=p.fee_basis_points, 66 | fee=p.fee, 67 | creator=str(Pubkey.from_bytes(p.creator)), 68 | creator_fee_basis_points=p.creator_fee_basis_points, 69 | creator_fee=p.creator_fee, 70 | ) 71 | except Exception as e: 72 | print(f"Error parsing TradeEvent: {e}") 73 | return None 74 | 75 | def on_message(ws, message): 76 | try: 77 | msg = json.loads(message) 78 | except json.JSONDecodeError as e: 79 | print(f"JSON decode error: {e}") 80 | return 81 | 82 | rv = msg.get("params", {}).get("result", {}).get("value", {}) 83 | logs = rv.get("logs", []) 84 | 85 | if "Program log: Instruction: Buy" in logs or "Program log: Instruction: Sell" in logs: 86 | for entry in logs: 87 | if entry.startswith("Program data: vdt/"): 88 | b64 = entry.split("Program data: ", 1)[1] 89 | event = parse_trade_event(b64) 90 | if event: 91 | print(asdict(event)) 92 | break 93 | 94 | def on_error(ws, error): 95 | print(f"WebSocket error: {error}") 96 | 97 | def on_close(ws, close_status_code, close_msg): 98 | print("WebSocket connection closed") 99 | 100 | def on_open(ws): 101 | sub_req = { 102 | "jsonrpc": "2.0", 103 | "id": 1, 104 | "method": "logsSubscribe", 105 | "params": [ 106 | {"mentions": ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"]}, 107 | {"commitment": "processed"} 108 | ] 109 | } 110 | try: 111 | ws.send(json.dumps(sub_req)) 112 | print("Subscribed to logs...") 113 | except Exception as e: 114 | print(f"Error sending subscription request: {e}") 115 | 116 | def start_websocket(): 117 | ws = websocket.WebSocketApp( 118 | WSS, 119 | on_message=on_message, 120 | on_error=on_error, 121 | on_close=on_close 122 | ) 123 | ws.on_open = on_open 124 | ws.run_forever() 125 | 126 | if __name__ == "__main__": 127 | try: 128 | start_websocket() 129 | except Exception as e: 130 | print(f"Unexpected error in main loop: {e}") 131 | -------------------------------------------------------------------------------- /pump_ws/ps_create_ws.py: -------------------------------------------------------------------------------- 1 | import websocket 2 | import json 3 | import base64 4 | import time 5 | from dataclasses import dataclass, asdict 6 | from solders.pubkey import Pubkey # type: ignore 7 | from construct import Padding, Struct, Int64sl, Int16ul, Int8ul, Int64ul, Bytes 8 | 9 | WSS = "wss://mainnet.helius-rpc.com/?api-key=" 10 | 11 | _create_layout = Struct( 12 | Padding(8), 13 | "timestamp" / Int64sl, # i64 14 | "index" / Int16ul, # u16 15 | "creator" / Bytes(32), # pubkey 16 | "base_mint" / Bytes(32), # pubkey 17 | "quote_mint" / Bytes(32), # pubkey 18 | "base_mint_decimals" / Int8ul, # u8 19 | "quote_mint_decimals" / Int8ul, # u8 20 | "base_amount_in" / Int64ul, # u64 21 | "quote_amount_in" / Int64ul, # u64 22 | "pool_base_amount" / Int64ul, # u64 23 | "pool_quote_amount" / Int64ul, # u64 24 | "minimum_liquidity" / Int64ul, # u64 25 | "initial_liquidity" / Int64ul, # u64 26 | "lp_token_amount_out" / Int64ul, # u64 27 | "pool_bump" / Int8ul, # u8 28 | "pool" / Bytes(32), # pubkey 29 | "lp_mint" / Bytes(32), # pubkey 30 | "user_base_token_account" / Bytes(32), # pubkey 31 | "user_quote_token_account" / Bytes(32) # pubkey 32 | ) 33 | 34 | @dataclass 35 | class CreatePoolEvent: 36 | timestamp: int 37 | index: int 38 | creator: str 39 | base_mint: str 40 | quote_mint: str 41 | base_mint_decimals: int 42 | quote_mint_decimals: int 43 | base_amount_in: int 44 | quote_amount_in: int 45 | pool_base_amount: int 46 | pool_quote_amount: int 47 | minimum_liquidity: int 48 | initial_liquidity: int 49 | lp_token_amount_out: int 50 | pool_bump: int 51 | pool: str 52 | lp_mint: str 53 | user_base_token_account: str 54 | user_quote_token_account: str 55 | 56 | def decode_event(program_data_base64: str) -> CreatePoolEvent | None: 57 | try: 58 | raw = base64.b64decode(program_data_base64) 59 | p = _create_layout.parse(raw) 60 | return CreatePoolEvent( 61 | timestamp=p.timestamp, 62 | index=p.index, 63 | creator=str(Pubkey.from_bytes(p.creator)), 64 | base_mint=str(Pubkey.from_bytes(p.base_mint)), 65 | quote_mint=str(Pubkey.from_bytes(p.quote_mint)), 66 | base_mint_decimals=p.base_mint_decimals, 67 | quote_mint_decimals=p.quote_mint_decimals, 68 | base_amount_in=p.base_amount_in, 69 | quote_amount_in=p.quote_amount_in, 70 | pool_base_amount=p.pool_base_amount, 71 | pool_quote_amount=p.pool_quote_amount, 72 | minimum_liquidity=p.minimum_liquidity, 73 | initial_liquidity=p.initial_liquidity, 74 | lp_token_amount_out=p.lp_token_amount_out, 75 | pool_bump=p.pool_bump, 76 | pool=str(Pubkey.from_bytes(p.pool)), 77 | lp_mint=str(Pubkey.from_bytes(p.lp_mint)), 78 | user_base_token_account=str(Pubkey.from_bytes(p.user_base_token_account)), 79 | user_quote_token_account=str(Pubkey.from_bytes(p.user_quote_token_account)), 80 | ) 81 | except Exception: 82 | return None 83 | 84 | def on_message(ws, message): 85 | try: 86 | log_data = json.loads(message) 87 | except json.JSONDecodeError as e: 88 | print(f"JSON decode error: {e}") 89 | return 90 | 91 | logs = log_data.get("params", {}) \ 92 | .get("result", {}) \ 93 | .get("value", {}) \ 94 | .get("logs", []) 95 | 96 | if "Program log: Instruction: CreatePool" in "".join(logs): 97 | for log_entry in logs: 98 | if log_entry.startswith("Program data: "): 99 | b64 = log_entry.split("Program data: ", 1)[1] 100 | event = decode_event(b64) 101 | if event: 102 | print(asdict(event)) 103 | break 104 | 105 | def on_error(ws, error): 106 | print(f"WebSocket error: {error}") 107 | 108 | def on_close(ws, close_status_code, close_msg): 109 | print("WebSocket connection closed") 110 | 111 | def on_open(ws): 112 | request = { 113 | "jsonrpc": "2.0", 114 | "id": 1, 115 | "method": "logsSubscribe", 116 | "params": [ 117 | {"mentions": ["pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"]}, 118 | {"commitment": "processed"}, 119 | ], 120 | } 121 | try: 122 | ws.send(json.dumps(request)) 123 | print("Subscribed to logs...") 124 | except Exception as e: 125 | print(f"Error sending subscription request: {e}") 126 | 127 | def start_websocket(): 128 | while True: 129 | ws = websocket.WebSocketApp( 130 | WSS, 131 | on_message=on_message, 132 | on_error=on_error, 133 | on_close=on_close 134 | ) 135 | ws.on_open = on_open 136 | ws.run_forever() 137 | print("WebSocket connection lost. Reconnecting in 1 second...") 138 | time.sleep(1) 139 | 140 | if __name__ == "__main__": 141 | try: 142 | start_websocket() 143 | except Exception as e: 144 | print(f"Unexpected error in main event loop: {e}") 145 | -------------------------------------------------------------------------------- /pump_ws/pf_create_ws.py: -------------------------------------------------------------------------------- 1 | import websocket 2 | import json 3 | import base64 4 | import struct 5 | from dataclasses import dataclass, asdict 6 | from solders.pubkey import Pubkey # type: ignore 7 | 8 | WSS = "wss://mainnet.helius-rpc.com/?api-key=" 9 | 10 | # 8-byte discriminator + 3×4-byte lengths + 4×32-byte pubkeys + 5×8-byte ints = 188 bytes 11 | _MIN_CREATE_EVENT_SIZE = 188 12 | 13 | @dataclass 14 | class CreateEvent: 15 | name: str 16 | symbol: str 17 | uri: str 18 | mint: str 19 | bonding_curve: str 20 | user: str 21 | creator: str 22 | timestamp: int 23 | virtual_token_reserves: int 24 | virtual_sol_reserves: int 25 | real_token_reserves: int 26 | token_total_supply: int 27 | 28 | 29 | def parse_create_event(data_hex: str) -> CreateEvent: 30 | data = bytes.fromhex(data_hex) 31 | offset = 8 # skip discriminator/padding 32 | 33 | def read_length_prefixed_string() -> str: 34 | nonlocal offset 35 | # ensure there's room for length prefix 36 | if offset + 4 > len(data): 37 | raise ValueError("Not enough data for string length") 38 | (length,) = struct.unpack_from(" len(data): 41 | raise ValueError(f"Invalid string length {length}") 42 | raw = data[offset : offset + length] 43 | offset += length 44 | return raw.decode("utf-8", errors="replace").rstrip("\x00") 45 | 46 | def read_pubkey_str() -> str: 47 | nonlocal offset 48 | if offset + 32 > len(data): 49 | raise ValueError("Not enough data for pubkey") 50 | pk_bytes = data[offset : offset + 32] 51 | offset += 32 52 | return str(Pubkey.from_bytes(pk_bytes)) 53 | 54 | # parse fields 55 | name = read_length_prefixed_string() 56 | symbol = read_length_prefixed_string() 57 | uri = read_length_prefixed_string() 58 | mint = read_pubkey_str() 59 | bonding_curve = read_pubkey_str() 60 | user = read_pubkey_str() 61 | creator = read_pubkey_str() 62 | 63 | # signed 64-bit timestamp 64 | if offset + 8 > len(data): 65 | raise ValueError("Not enough data for timestamp") 66 | (timestamp,) = struct.unpack_from(" int: 71 | nonlocal offset 72 | if offset + 8 > len(data): 73 | raise ValueError("Not enough data for u64") 74 | (val,) = struct.unpack_from(" current_size" 2358 | }, 2359 | { 2360 | "code": 6010, 2361 | "name": "AccountTypeNotSupported", 2362 | "msg": "Account type not supported" 2363 | }, 2364 | { 2365 | "code": 6011, 2366 | "name": "InitialRealTokenReservesShouldBeLessThanTokenTotalSupply", 2367 | "msg": "initial_real_token_reserves should be less than token_total_supply" 2368 | }, 2369 | { 2370 | "code": 6012, 2371 | "name": "InitialVirtualTokenReservesShouldBeGreaterThanInitialRealTokenReserves", 2372 | "msg": "initial_virtual_token_reserves should be greater than initial_real_token_reserves" 2373 | }, 2374 | { 2375 | "code": 6013, 2376 | "name": "FeeBasisPointsGreaterThanMaximum", 2377 | "msg": "fee_basis_points greater than maximum" 2378 | }, 2379 | { 2380 | "code": 6014, 2381 | "name": "AllZerosWithdrawAuthority", 2382 | "msg": "Withdraw authority cannot be set to System Program ID" 2383 | }, 2384 | { 2385 | "code": 6015, 2386 | "name": "PoolMigrationFeeShouldBeLessThanFinalRealSolReserves", 2387 | "msg": "pool_migration_fee should be less than final_real_sol_reserves" 2388 | }, 2389 | { 2390 | "code": 6016, 2391 | "name": "PoolMigrationFeeShouldBeGreaterThanCreatorFeePlusMaxMigrateFees", 2392 | "msg": "pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES" 2393 | }, 2394 | { 2395 | "code": 6017, 2396 | "name": "DisabledWithdraw", 2397 | "msg": "Migrate instruction is disabled" 2398 | }, 2399 | { 2400 | "code": 6018, 2401 | "name": "DisabledMigrate", 2402 | "msg": "Migrate instruction is disabled" 2403 | }, 2404 | { 2405 | "code": 6019, 2406 | "name": "InvalidCreator", 2407 | "msg": "Invalid creator pubkey" 2408 | }, 2409 | { 2410 | "code": 6020, 2411 | "name": "BuyZeroAmount", 2412 | "msg": "Buy zero amount" 2413 | }, 2414 | { 2415 | "code": 6021, 2416 | "name": "NotEnoughTokensToBuy", 2417 | "msg": "Not enough tokens to buy" 2418 | }, 2419 | { 2420 | "code": 6022, 2421 | "name": "SellZeroAmount", 2422 | "msg": "Sell zero amount" 2423 | }, 2424 | { 2425 | "code": 6023, 2426 | "name": "NotEnoughTokensToSell", 2427 | "msg": "Not enough tokens to sell" 2428 | }, 2429 | { 2430 | "code": 6024, 2431 | "name": "Overflow", 2432 | "msg": "Overflow" 2433 | }, 2434 | { 2435 | "code": 6025, 2436 | "name": "Truncation", 2437 | "msg": "Truncation" 2438 | }, 2439 | { 2440 | "code": 6026, 2441 | "name": "DivisionByZero", 2442 | "msg": "Division by zero" 2443 | }, 2444 | { 2445 | "code": 6027, 2446 | "name": "NotEnoughRemainingAccounts", 2447 | "msg": "Not enough remaining accounts" 2448 | }, 2449 | { 2450 | "code": 6028, 2451 | "name": "AllFeeRecipientsShouldBeNonZero", 2452 | "msg": "All fee recipients should be non-zero" 2453 | }, 2454 | { 2455 | "code": 6029, 2456 | "name": "UnsortedNotUniqueFeeRecipients", 2457 | "msg": "Unsorted or not unique fee recipients" 2458 | }, 2459 | { 2460 | "code": 6030, 2461 | "name": "CreatorShouldNotBeZero", 2462 | "msg": "Creator should not be zero" 2463 | } 2464 | ], 2465 | "types": [ 2466 | { 2467 | "name": "BondingCurve", 2468 | "type": { 2469 | "kind": "struct", 2470 | "fields": [ 2471 | { 2472 | "name": "virtual_token_reserves", 2473 | "type": "u64" 2474 | }, 2475 | { 2476 | "name": "virtual_sol_reserves", 2477 | "type": "u64" 2478 | }, 2479 | { 2480 | "name": "real_token_reserves", 2481 | "type": "u64" 2482 | }, 2483 | { 2484 | "name": "real_sol_reserves", 2485 | "type": "u64" 2486 | }, 2487 | { 2488 | "name": "token_total_supply", 2489 | "type": "u64" 2490 | }, 2491 | { 2492 | "name": "complete", 2493 | "type": "bool" 2494 | }, 2495 | { 2496 | "name": "creator", 2497 | "type": "pubkey" 2498 | } 2499 | ] 2500 | } 2501 | }, 2502 | { 2503 | "name": "CollectCreatorFeeEvent", 2504 | "type": { 2505 | "kind": "struct", 2506 | "fields": [ 2507 | { 2508 | "name": "timestamp", 2509 | "type": "i64" 2510 | }, 2511 | { 2512 | "name": "creator", 2513 | "type": "pubkey" 2514 | }, 2515 | { 2516 | "name": "creator_fee", 2517 | "type": "u64" 2518 | } 2519 | ] 2520 | } 2521 | }, 2522 | { 2523 | "name": "CompleteEvent", 2524 | "type": { 2525 | "kind": "struct", 2526 | "fields": [ 2527 | { 2528 | "name": "user", 2529 | "type": "pubkey" 2530 | }, 2531 | { 2532 | "name": "mint", 2533 | "type": "pubkey" 2534 | }, 2535 | { 2536 | "name": "bonding_curve", 2537 | "type": "pubkey" 2538 | }, 2539 | { 2540 | "name": "timestamp", 2541 | "type": "i64" 2542 | } 2543 | ] 2544 | } 2545 | }, 2546 | { 2547 | "name": "CompletePumpAmmMigrationEvent", 2548 | "type": { 2549 | "kind": "struct", 2550 | "fields": [ 2551 | { 2552 | "name": "user", 2553 | "type": "pubkey" 2554 | }, 2555 | { 2556 | "name": "mint", 2557 | "type": "pubkey" 2558 | }, 2559 | { 2560 | "name": "mint_amount", 2561 | "type": "u64" 2562 | }, 2563 | { 2564 | "name": "sol_amount", 2565 | "type": "u64" 2566 | }, 2567 | { 2568 | "name": "pool_migration_fee", 2569 | "type": "u64" 2570 | }, 2571 | { 2572 | "name": "bonding_curve", 2573 | "type": "pubkey" 2574 | }, 2575 | { 2576 | "name": "timestamp", 2577 | "type": "i64" 2578 | }, 2579 | { 2580 | "name": "pool", 2581 | "type": "pubkey" 2582 | } 2583 | ] 2584 | } 2585 | }, 2586 | { 2587 | "name": "CreateEvent", 2588 | "type": { 2589 | "kind": "struct", 2590 | "fields": [ 2591 | { 2592 | "name": "name", 2593 | "type": "string" 2594 | }, 2595 | { 2596 | "name": "symbol", 2597 | "type": "string" 2598 | }, 2599 | { 2600 | "name": "uri", 2601 | "type": "string" 2602 | }, 2603 | { 2604 | "name": "mint", 2605 | "type": "pubkey" 2606 | }, 2607 | { 2608 | "name": "bonding_curve", 2609 | "type": "pubkey" 2610 | }, 2611 | { 2612 | "name": "user", 2613 | "type": "pubkey" 2614 | }, 2615 | { 2616 | "name": "creator", 2617 | "type": "pubkey" 2618 | }, 2619 | { 2620 | "name": "timestamp", 2621 | "type": "i64" 2622 | }, 2623 | { 2624 | "name": "virtual_token_reserves", 2625 | "type": "u64" 2626 | }, 2627 | { 2628 | "name": "virtual_sol_reserves", 2629 | "type": "u64" 2630 | }, 2631 | { 2632 | "name": "real_token_reserves", 2633 | "type": "u64" 2634 | }, 2635 | { 2636 | "name": "token_total_supply", 2637 | "type": "u64" 2638 | } 2639 | ] 2640 | } 2641 | }, 2642 | { 2643 | "name": "ExtendAccountEvent", 2644 | "type": { 2645 | "kind": "struct", 2646 | "fields": [ 2647 | { 2648 | "name": "account", 2649 | "type": "pubkey" 2650 | }, 2651 | { 2652 | "name": "user", 2653 | "type": "pubkey" 2654 | }, 2655 | { 2656 | "name": "current_size", 2657 | "type": "u64" 2658 | }, 2659 | { 2660 | "name": "new_size", 2661 | "type": "u64" 2662 | }, 2663 | { 2664 | "name": "timestamp", 2665 | "type": "i64" 2666 | } 2667 | ] 2668 | } 2669 | }, 2670 | { 2671 | "name": "Global", 2672 | "type": { 2673 | "kind": "struct", 2674 | "fields": [ 2675 | { 2676 | "name": "initialized", 2677 | "docs": [ 2678 | "Unused" 2679 | ], 2680 | "type": "bool" 2681 | }, 2682 | { 2683 | "name": "authority", 2684 | "type": "pubkey" 2685 | }, 2686 | { 2687 | "name": "fee_recipient", 2688 | "type": "pubkey" 2689 | }, 2690 | { 2691 | "name": "initial_virtual_token_reserves", 2692 | "type": "u64" 2693 | }, 2694 | { 2695 | "name": "initial_virtual_sol_reserves", 2696 | "type": "u64" 2697 | }, 2698 | { 2699 | "name": "initial_real_token_reserves", 2700 | "type": "u64" 2701 | }, 2702 | { 2703 | "name": "token_total_supply", 2704 | "type": "u64" 2705 | }, 2706 | { 2707 | "name": "fee_basis_points", 2708 | "type": "u64" 2709 | }, 2710 | { 2711 | "name": "withdraw_authority", 2712 | "type": "pubkey" 2713 | }, 2714 | { 2715 | "name": "enable_migrate", 2716 | "docs": [ 2717 | "Unused" 2718 | ], 2719 | "type": "bool" 2720 | }, 2721 | { 2722 | "name": "pool_migration_fee", 2723 | "type": "u64" 2724 | }, 2725 | { 2726 | "name": "creator_fee_basis_points", 2727 | "type": "u64" 2728 | }, 2729 | { 2730 | "name": "fee_recipients", 2731 | "type": { 2732 | "array": [ 2733 | "pubkey", 2734 | 7 2735 | ] 2736 | } 2737 | }, 2738 | { 2739 | "name": "set_creator_authority", 2740 | "type": "pubkey" 2741 | } 2742 | ] 2743 | } 2744 | }, 2745 | { 2746 | "name": "SetCreatorEvent", 2747 | "type": { 2748 | "kind": "struct", 2749 | "fields": [ 2750 | { 2751 | "name": "timestamp", 2752 | "type": "i64" 2753 | }, 2754 | { 2755 | "name": "mint", 2756 | "type": "pubkey" 2757 | }, 2758 | { 2759 | "name": "bonding_curve", 2760 | "type": "pubkey" 2761 | }, 2762 | { 2763 | "name": "creator", 2764 | "type": "pubkey" 2765 | } 2766 | ] 2767 | } 2768 | }, 2769 | { 2770 | "name": "SetMetaplexCreatorEvent", 2771 | "type": { 2772 | "kind": "struct", 2773 | "fields": [ 2774 | { 2775 | "name": "timestamp", 2776 | "type": "i64" 2777 | }, 2778 | { 2779 | "name": "mint", 2780 | "type": "pubkey" 2781 | }, 2782 | { 2783 | "name": "bonding_curve", 2784 | "type": "pubkey" 2785 | }, 2786 | { 2787 | "name": "metadata", 2788 | "type": "pubkey" 2789 | }, 2790 | { 2791 | "name": "creator", 2792 | "type": "pubkey" 2793 | } 2794 | ] 2795 | } 2796 | }, 2797 | { 2798 | "name": "SetParamsEvent", 2799 | "type": { 2800 | "kind": "struct", 2801 | "fields": [ 2802 | { 2803 | "name": "initial_virtual_token_reserves", 2804 | "type": "u64" 2805 | }, 2806 | { 2807 | "name": "initial_virtual_sol_reserves", 2808 | "type": "u64" 2809 | }, 2810 | { 2811 | "name": "initial_real_token_reserves", 2812 | "type": "u64" 2813 | }, 2814 | { 2815 | "name": "final_real_sol_reserves", 2816 | "type": "u64" 2817 | }, 2818 | { 2819 | "name": "token_total_supply", 2820 | "type": "u64" 2821 | }, 2822 | { 2823 | "name": "fee_basis_points", 2824 | "type": "u64" 2825 | }, 2826 | { 2827 | "name": "withdraw_authority", 2828 | "type": "pubkey" 2829 | }, 2830 | { 2831 | "name": "enable_migrate", 2832 | "type": "bool" 2833 | }, 2834 | { 2835 | "name": "pool_migration_fee", 2836 | "type": "u64" 2837 | }, 2838 | { 2839 | "name": "creator_fee_basis_points", 2840 | "type": "u64" 2841 | }, 2842 | { 2843 | "name": "fee_recipients", 2844 | "type": { 2845 | "array": [ 2846 | "pubkey", 2847 | 8 2848 | ] 2849 | } 2850 | }, 2851 | { 2852 | "name": "timestamp", 2853 | "type": "i64" 2854 | }, 2855 | { 2856 | "name": "set_creator_authority", 2857 | "type": "pubkey" 2858 | } 2859 | ] 2860 | } 2861 | }, 2862 | { 2863 | "name": "TradeEvent", 2864 | "type": { 2865 | "kind": "struct", 2866 | "fields": [ 2867 | { 2868 | "name": "mint", 2869 | "type": "pubkey" 2870 | }, 2871 | { 2872 | "name": "sol_amount", 2873 | "type": "u64" 2874 | }, 2875 | { 2876 | "name": "token_amount", 2877 | "type": "u64" 2878 | }, 2879 | { 2880 | "name": "is_buy", 2881 | "type": "bool" 2882 | }, 2883 | { 2884 | "name": "user", 2885 | "type": "pubkey" 2886 | }, 2887 | { 2888 | "name": "timestamp", 2889 | "type": "i64" 2890 | }, 2891 | { 2892 | "name": "virtual_sol_reserves", 2893 | "type": "u64" 2894 | }, 2895 | { 2896 | "name": "virtual_token_reserves", 2897 | "type": "u64" 2898 | }, 2899 | { 2900 | "name": "real_sol_reserves", 2901 | "type": "u64" 2902 | }, 2903 | { 2904 | "name": "real_token_reserves", 2905 | "type": "u64" 2906 | }, 2907 | { 2908 | "name": "fee_recipient", 2909 | "type": "pubkey" 2910 | }, 2911 | { 2912 | "name": "fee_basis_points", 2913 | "type": "u64" 2914 | }, 2915 | { 2916 | "name": "fee", 2917 | "type": "u64" 2918 | }, 2919 | { 2920 | "name": "creator", 2921 | "type": "pubkey" 2922 | }, 2923 | { 2924 | "name": "creator_fee_basis_points", 2925 | "type": "u64" 2926 | }, 2927 | { 2928 | "name": "creator_fee", 2929 | "type": "u64" 2930 | } 2931 | ] 2932 | } 2933 | }, 2934 | { 2935 | "name": "UpdateGlobalAuthorityEvent", 2936 | "type": { 2937 | "kind": "struct", 2938 | "fields": [ 2939 | { 2940 | "name": "global", 2941 | "type": "pubkey" 2942 | }, 2943 | { 2944 | "name": "authority", 2945 | "type": "pubkey" 2946 | }, 2947 | { 2948 | "name": "new_authority", 2949 | "type": "pubkey" 2950 | }, 2951 | { 2952 | "name": "timestamp", 2953 | "type": "i64" 2954 | } 2955 | ] 2956 | } 2957 | } 2958 | ] 2959 | } -------------------------------------------------------------------------------- /pump_ws/pump_swap.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA", 3 | "metadata": { 4 | "name": "pump_amm", 5 | "version": "0.1.0", 6 | "spec": "0.1.0", 7 | "description": "Created with Anchor" 8 | }, 9 | "instructions": [ 10 | { 11 | "name": "buy", 12 | "discriminator": [ 13 | 102, 14 | 6, 15 | 61, 16 | 18, 17 | 1, 18 | 218, 19 | 235, 20 | 234 21 | ], 22 | "accounts": [ 23 | { 24 | "name": "pool" 25 | }, 26 | { 27 | "name": "user", 28 | "writable": true, 29 | "signer": true 30 | }, 31 | { 32 | "name": "global_config" 33 | }, 34 | { 35 | "name": "base_mint", 36 | "relations": [ 37 | "pool" 38 | ] 39 | }, 40 | { 41 | "name": "quote_mint", 42 | "relations": [ 43 | "pool" 44 | ] 45 | }, 46 | { 47 | "name": "user_base_token_account", 48 | "writable": true 49 | }, 50 | { 51 | "name": "user_quote_token_account", 52 | "writable": true 53 | }, 54 | { 55 | "name": "pool_base_token_account", 56 | "writable": true, 57 | "relations": [ 58 | "pool" 59 | ] 60 | }, 61 | { 62 | "name": "pool_quote_token_account", 63 | "writable": true, 64 | "relations": [ 65 | "pool" 66 | ] 67 | }, 68 | { 69 | "name": "protocol_fee_recipient" 70 | }, 71 | { 72 | "name": "protocol_fee_recipient_token_account", 73 | "writable": true, 74 | "pda": { 75 | "seeds": [ 76 | { 77 | "kind": "account", 78 | "path": "protocol_fee_recipient" 79 | }, 80 | { 81 | "kind": "account", 82 | "path": "quote_token_program" 83 | }, 84 | { 85 | "kind": "account", 86 | "path": "quote_mint" 87 | } 88 | ], 89 | "program": { 90 | "kind": "const", 91 | "value": [ 92 | 140, 93 | 151, 94 | 37, 95 | 143, 96 | 78, 97 | 36, 98 | 137, 99 | 241, 100 | 187, 101 | 61, 102 | 16, 103 | 41, 104 | 20, 105 | 142, 106 | 13, 107 | 131, 108 | 11, 109 | 90, 110 | 19, 111 | 153, 112 | 218, 113 | 255, 114 | 16, 115 | 132, 116 | 4, 117 | 142, 118 | 123, 119 | 216, 120 | 219, 121 | 233, 122 | 248, 123 | 89 124 | ] 125 | } 126 | } 127 | }, 128 | { 129 | "name": "base_token_program" 130 | }, 131 | { 132 | "name": "quote_token_program" 133 | }, 134 | { 135 | "name": "system_program", 136 | "address": "11111111111111111111111111111111" 137 | }, 138 | { 139 | "name": "associated_token_program", 140 | "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" 141 | }, 142 | { 143 | "name": "event_authority", 144 | "pda": { 145 | "seeds": [ 146 | { 147 | "kind": "const", 148 | "value": [ 149 | 95, 150 | 95, 151 | 101, 152 | 118, 153 | 101, 154 | 110, 155 | 116, 156 | 95, 157 | 97, 158 | 117, 159 | 116, 160 | 104, 161 | 111, 162 | 114, 163 | 105, 164 | 116, 165 | 121 166 | ] 167 | } 168 | ] 169 | } 170 | }, 171 | { 172 | "name": "program" 173 | }, 174 | { 175 | "name": "coin_creator_vault_ata", 176 | "writable": true, 177 | "pda": { 178 | "seeds": [ 179 | { 180 | "kind": "account", 181 | "path": "coin_creator_vault_authority" 182 | }, 183 | { 184 | "kind": "account", 185 | "path": "quote_token_program" 186 | }, 187 | { 188 | "kind": "account", 189 | "path": "quote_mint" 190 | } 191 | ], 192 | "program": { 193 | "kind": "const", 194 | "value": [ 195 | 140, 196 | 151, 197 | 37, 198 | 143, 199 | 78, 200 | 36, 201 | 137, 202 | 241, 203 | 187, 204 | 61, 205 | 16, 206 | 41, 207 | 20, 208 | 142, 209 | 13, 210 | 131, 211 | 11, 212 | 90, 213 | 19, 214 | 153, 215 | 218, 216 | 255, 217 | 16, 218 | 132, 219 | 4, 220 | 142, 221 | 123, 222 | 216, 223 | 219, 224 | 233, 225 | 248, 226 | 89 227 | ] 228 | } 229 | } 230 | }, 231 | { 232 | "name": "coin_creator_vault_authority", 233 | "pda": { 234 | "seeds": [ 235 | { 236 | "kind": "const", 237 | "value": [ 238 | 99, 239 | 114, 240 | 101, 241 | 97, 242 | 116, 243 | 111, 244 | 114, 245 | 95, 246 | 118, 247 | 97, 248 | 117, 249 | 108, 250 | 116 251 | ] 252 | }, 253 | { 254 | "kind": "account", 255 | "path": "pool.coin_creator", 256 | "account": "Pool" 257 | } 258 | ] 259 | } 260 | } 261 | ], 262 | "args": [ 263 | { 264 | "name": "base_amount_out", 265 | "type": "u64" 266 | }, 267 | { 268 | "name": "max_quote_amount_in", 269 | "type": "u64" 270 | } 271 | ] 272 | }, 273 | { 274 | "name": "collect_coin_creator_fee", 275 | "discriminator": [ 276 | 160, 277 | 57, 278 | 89, 279 | 42, 280 | 181, 281 | 139, 282 | 43, 283 | 66 284 | ], 285 | "accounts": [ 286 | { 287 | "name": "quote_mint" 288 | }, 289 | { 290 | "name": "quote_token_program" 291 | }, 292 | { 293 | "name": "coin_creator", 294 | "signer": true 295 | }, 296 | { 297 | "name": "coin_creator_vault_authority", 298 | "pda": { 299 | "seeds": [ 300 | { 301 | "kind": "const", 302 | "value": [ 303 | 99, 304 | 114, 305 | 101, 306 | 97, 307 | 116, 308 | 111, 309 | 114, 310 | 95, 311 | 118, 312 | 97, 313 | 117, 314 | 108, 315 | 116 316 | ] 317 | }, 318 | { 319 | "kind": "account", 320 | "path": "coin_creator" 321 | } 322 | ] 323 | } 324 | }, 325 | { 326 | "name": "coin_creator_vault_ata", 327 | "writable": true, 328 | "pda": { 329 | "seeds": [ 330 | { 331 | "kind": "account", 332 | "path": "coin_creator_vault_authority" 333 | }, 334 | { 335 | "kind": "account", 336 | "path": "quote_token_program" 337 | }, 338 | { 339 | "kind": "account", 340 | "path": "quote_mint" 341 | } 342 | ], 343 | "program": { 344 | "kind": "const", 345 | "value": [ 346 | 140, 347 | 151, 348 | 37, 349 | 143, 350 | 78, 351 | 36, 352 | 137, 353 | 241, 354 | 187, 355 | 61, 356 | 16, 357 | 41, 358 | 20, 359 | 142, 360 | 13, 361 | 131, 362 | 11, 363 | 90, 364 | 19, 365 | 153, 366 | 218, 367 | 255, 368 | 16, 369 | 132, 370 | 4, 371 | 142, 372 | 123, 373 | 216, 374 | 219, 375 | 233, 376 | 248, 377 | 89 378 | ] 379 | } 380 | } 381 | }, 382 | { 383 | "name": "coin_creator_token_account", 384 | "writable": true 385 | }, 386 | { 387 | "name": "event_authority", 388 | "pda": { 389 | "seeds": [ 390 | { 391 | "kind": "const", 392 | "value": [ 393 | 95, 394 | 95, 395 | 101, 396 | 118, 397 | 101, 398 | 110, 399 | 116, 400 | 95, 401 | 97, 402 | 117, 403 | 116, 404 | 104, 405 | 111, 406 | 114, 407 | 105, 408 | 116, 409 | 121 410 | ] 411 | } 412 | ] 413 | } 414 | }, 415 | { 416 | "name": "program" 417 | } 418 | ], 419 | "args": [] 420 | }, 421 | { 422 | "name": "create_config", 423 | "discriminator": [ 424 | 201, 425 | 207, 426 | 243, 427 | 114, 428 | 75, 429 | 111, 430 | 47, 431 | 189 432 | ], 433 | "accounts": [ 434 | { 435 | "name": "admin", 436 | "writable": true, 437 | "signer": true, 438 | "address": "8LWu7QM2dGR1G8nKDHthckea57bkCzXyBTAKPJUBDHo8" 439 | }, 440 | { 441 | "name": "global_config", 442 | "writable": true, 443 | "pda": { 444 | "seeds": [ 445 | { 446 | "kind": "const", 447 | "value": [ 448 | 103, 449 | 108, 450 | 111, 451 | 98, 452 | 97, 453 | 108, 454 | 95, 455 | 99, 456 | 111, 457 | 110, 458 | 102, 459 | 105, 460 | 103 461 | ] 462 | } 463 | ] 464 | } 465 | }, 466 | { 467 | "name": "system_program", 468 | "address": "11111111111111111111111111111111" 469 | }, 470 | { 471 | "name": "event_authority", 472 | "pda": { 473 | "seeds": [ 474 | { 475 | "kind": "const", 476 | "value": [ 477 | 95, 478 | 95, 479 | 101, 480 | 118, 481 | 101, 482 | 110, 483 | 116, 484 | 95, 485 | 97, 486 | 117, 487 | 116, 488 | 104, 489 | 111, 490 | 114, 491 | 105, 492 | 116, 493 | 121 494 | ] 495 | } 496 | ] 497 | } 498 | }, 499 | { 500 | "name": "program" 501 | } 502 | ], 503 | "args": [ 504 | { 505 | "name": "lp_fee_basis_points", 506 | "type": "u64" 507 | }, 508 | { 509 | "name": "protocol_fee_basis_points", 510 | "type": "u64" 511 | }, 512 | { 513 | "name": "protocol_fee_recipients", 514 | "type": { 515 | "array": [ 516 | "pubkey", 517 | 8 518 | ] 519 | } 520 | }, 521 | { 522 | "name": "coin_creator_fee_basis_points", 523 | "type": "u64" 524 | } 525 | ] 526 | }, 527 | { 528 | "name": "create_pool", 529 | "discriminator": [ 530 | 233, 531 | 146, 532 | 209, 533 | 142, 534 | 207, 535 | 104, 536 | 64, 537 | 188 538 | ], 539 | "accounts": [ 540 | { 541 | "name": "pool", 542 | "writable": true, 543 | "pda": { 544 | "seeds": [ 545 | { 546 | "kind": "const", 547 | "value": [ 548 | 112, 549 | 111, 550 | 111, 551 | 108 552 | ] 553 | }, 554 | { 555 | "kind": "arg", 556 | "path": "index" 557 | }, 558 | { 559 | "kind": "account", 560 | "path": "creator" 561 | }, 562 | { 563 | "kind": "account", 564 | "path": "base_mint" 565 | }, 566 | { 567 | "kind": "account", 568 | "path": "quote_mint" 569 | } 570 | ] 571 | } 572 | }, 573 | { 574 | "name": "global_config" 575 | }, 576 | { 577 | "name": "creator", 578 | "writable": true, 579 | "signer": true 580 | }, 581 | { 582 | "name": "base_mint" 583 | }, 584 | { 585 | "name": "quote_mint" 586 | }, 587 | { 588 | "name": "lp_mint", 589 | "writable": true, 590 | "pda": { 591 | "seeds": [ 592 | { 593 | "kind": "const", 594 | "value": [ 595 | 112, 596 | 111, 597 | 111, 598 | 108, 599 | 95, 600 | 108, 601 | 112, 602 | 95, 603 | 109, 604 | 105, 605 | 110, 606 | 116 607 | ] 608 | }, 609 | { 610 | "kind": "account", 611 | "path": "pool" 612 | } 613 | ] 614 | } 615 | }, 616 | { 617 | "name": "user_base_token_account", 618 | "writable": true 619 | }, 620 | { 621 | "name": "user_quote_token_account", 622 | "writable": true 623 | }, 624 | { 625 | "name": "user_pool_token_account", 626 | "writable": true, 627 | "pda": { 628 | "seeds": [ 629 | { 630 | "kind": "account", 631 | "path": "creator" 632 | }, 633 | { 634 | "kind": "account", 635 | "path": "token_2022_program" 636 | }, 637 | { 638 | "kind": "account", 639 | "path": "lp_mint" 640 | } 641 | ], 642 | "program": { 643 | "kind": "const", 644 | "value": [ 645 | 140, 646 | 151, 647 | 37, 648 | 143, 649 | 78, 650 | 36, 651 | 137, 652 | 241, 653 | 187, 654 | 61, 655 | 16, 656 | 41, 657 | 20, 658 | 142, 659 | 13, 660 | 131, 661 | 11, 662 | 90, 663 | 19, 664 | 153, 665 | 218, 666 | 255, 667 | 16, 668 | 132, 669 | 4, 670 | 142, 671 | 123, 672 | 216, 673 | 219, 674 | 233, 675 | 248, 676 | 89 677 | ] 678 | } 679 | } 680 | }, 681 | { 682 | "name": "pool_base_token_account", 683 | "writable": true, 684 | "pda": { 685 | "seeds": [ 686 | { 687 | "kind": "account", 688 | "path": "pool" 689 | }, 690 | { 691 | "kind": "account", 692 | "path": "base_token_program" 693 | }, 694 | { 695 | "kind": "account", 696 | "path": "base_mint" 697 | } 698 | ], 699 | "program": { 700 | "kind": "const", 701 | "value": [ 702 | 140, 703 | 151, 704 | 37, 705 | 143, 706 | 78, 707 | 36, 708 | 137, 709 | 241, 710 | 187, 711 | 61, 712 | 16, 713 | 41, 714 | 20, 715 | 142, 716 | 13, 717 | 131, 718 | 11, 719 | 90, 720 | 19, 721 | 153, 722 | 218, 723 | 255, 724 | 16, 725 | 132, 726 | 4, 727 | 142, 728 | 123, 729 | 216, 730 | 219, 731 | 233, 732 | 248, 733 | 89 734 | ] 735 | } 736 | } 737 | }, 738 | { 739 | "name": "pool_quote_token_account", 740 | "writable": true, 741 | "pda": { 742 | "seeds": [ 743 | { 744 | "kind": "account", 745 | "path": "pool" 746 | }, 747 | { 748 | "kind": "account", 749 | "path": "quote_token_program" 750 | }, 751 | { 752 | "kind": "account", 753 | "path": "quote_mint" 754 | } 755 | ], 756 | "program": { 757 | "kind": "const", 758 | "value": [ 759 | 140, 760 | 151, 761 | 37, 762 | 143, 763 | 78, 764 | 36, 765 | 137, 766 | 241, 767 | 187, 768 | 61, 769 | 16, 770 | 41, 771 | 20, 772 | 142, 773 | 13, 774 | 131, 775 | 11, 776 | 90, 777 | 19, 778 | 153, 779 | 218, 780 | 255, 781 | 16, 782 | 132, 783 | 4, 784 | 142, 785 | 123, 786 | 216, 787 | 219, 788 | 233, 789 | 248, 790 | 89 791 | ] 792 | } 793 | } 794 | }, 795 | { 796 | "name": "system_program", 797 | "address": "11111111111111111111111111111111" 798 | }, 799 | { 800 | "name": "token_2022_program", 801 | "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" 802 | }, 803 | { 804 | "name": "base_token_program" 805 | }, 806 | { 807 | "name": "quote_token_program" 808 | }, 809 | { 810 | "name": "associated_token_program", 811 | "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" 812 | }, 813 | { 814 | "name": "event_authority", 815 | "pda": { 816 | "seeds": [ 817 | { 818 | "kind": "const", 819 | "value": [ 820 | 95, 821 | 95, 822 | 101, 823 | 118, 824 | 101, 825 | 110, 826 | 116, 827 | 95, 828 | 97, 829 | 117, 830 | 116, 831 | 104, 832 | 111, 833 | 114, 834 | 105, 835 | 116, 836 | 121 837 | ] 838 | } 839 | ] 840 | } 841 | }, 842 | { 843 | "name": "program" 844 | } 845 | ], 846 | "args": [ 847 | { 848 | "name": "index", 849 | "type": "u16" 850 | }, 851 | { 852 | "name": "base_amount_in", 853 | "type": "u64" 854 | }, 855 | { 856 | "name": "quote_amount_in", 857 | "type": "u64" 858 | }, 859 | { 860 | "name": "coin_creator", 861 | "type": "pubkey" 862 | } 863 | ] 864 | }, 865 | { 866 | "name": "deposit", 867 | "discriminator": [ 868 | 242, 869 | 35, 870 | 198, 871 | 137, 872 | 82, 873 | 225, 874 | 242, 875 | 182 876 | ], 877 | "accounts": [ 878 | { 879 | "name": "pool", 880 | "writable": true 881 | }, 882 | { 883 | "name": "global_config" 884 | }, 885 | { 886 | "name": "user", 887 | "signer": true 888 | }, 889 | { 890 | "name": "base_mint", 891 | "relations": [ 892 | "pool" 893 | ] 894 | }, 895 | { 896 | "name": "quote_mint", 897 | "relations": [ 898 | "pool" 899 | ] 900 | }, 901 | { 902 | "name": "lp_mint", 903 | "writable": true, 904 | "relations": [ 905 | "pool" 906 | ] 907 | }, 908 | { 909 | "name": "user_base_token_account", 910 | "writable": true 911 | }, 912 | { 913 | "name": "user_quote_token_account", 914 | "writable": true 915 | }, 916 | { 917 | "name": "user_pool_token_account", 918 | "writable": true 919 | }, 920 | { 921 | "name": "pool_base_token_account", 922 | "writable": true, 923 | "relations": [ 924 | "pool" 925 | ] 926 | }, 927 | { 928 | "name": "pool_quote_token_account", 929 | "writable": true, 930 | "relations": [ 931 | "pool" 932 | ] 933 | }, 934 | { 935 | "name": "token_program", 936 | "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" 937 | }, 938 | { 939 | "name": "token_2022_program", 940 | "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" 941 | }, 942 | { 943 | "name": "event_authority", 944 | "pda": { 945 | "seeds": [ 946 | { 947 | "kind": "const", 948 | "value": [ 949 | 95, 950 | 95, 951 | 101, 952 | 118, 953 | 101, 954 | 110, 955 | 116, 956 | 95, 957 | 97, 958 | 117, 959 | 116, 960 | 104, 961 | 111, 962 | 114, 963 | 105, 964 | 116, 965 | 121 966 | ] 967 | } 968 | ] 969 | } 970 | }, 971 | { 972 | "name": "program" 973 | } 974 | ], 975 | "args": [ 976 | { 977 | "name": "lp_token_amount_out", 978 | "type": "u64" 979 | }, 980 | { 981 | "name": "max_base_amount_in", 982 | "type": "u64" 983 | }, 984 | { 985 | "name": "max_quote_amount_in", 986 | "type": "u64" 987 | } 988 | ] 989 | }, 990 | { 991 | "name": "disable", 992 | "discriminator": [ 993 | 185, 994 | 173, 995 | 187, 996 | 90, 997 | 216, 998 | 15, 999 | 238, 1000 | 233 1001 | ], 1002 | "accounts": [ 1003 | { 1004 | "name": "admin", 1005 | "signer": true, 1006 | "relations": [ 1007 | "global_config" 1008 | ] 1009 | }, 1010 | { 1011 | "name": "global_config", 1012 | "writable": true 1013 | }, 1014 | { 1015 | "name": "event_authority", 1016 | "pda": { 1017 | "seeds": [ 1018 | { 1019 | "kind": "const", 1020 | "value": [ 1021 | 95, 1022 | 95, 1023 | 101, 1024 | 118, 1025 | 101, 1026 | 110, 1027 | 116, 1028 | 95, 1029 | 97, 1030 | 117, 1031 | 116, 1032 | 104, 1033 | 111, 1034 | 114, 1035 | 105, 1036 | 116, 1037 | 121 1038 | ] 1039 | } 1040 | ] 1041 | } 1042 | }, 1043 | { 1044 | "name": "program" 1045 | } 1046 | ], 1047 | "args": [ 1048 | { 1049 | "name": "disable_create_pool", 1050 | "type": "bool" 1051 | }, 1052 | { 1053 | "name": "disable_deposit", 1054 | "type": "bool" 1055 | }, 1056 | { 1057 | "name": "disable_withdraw", 1058 | "type": "bool" 1059 | }, 1060 | { 1061 | "name": "disable_buy", 1062 | "type": "bool" 1063 | }, 1064 | { 1065 | "name": "disable_sell", 1066 | "type": "bool" 1067 | } 1068 | ] 1069 | }, 1070 | { 1071 | "name": "extend_account", 1072 | "discriminator": [ 1073 | 234, 1074 | 102, 1075 | 194, 1076 | 203, 1077 | 150, 1078 | 72, 1079 | 62, 1080 | 229 1081 | ], 1082 | "accounts": [ 1083 | { 1084 | "name": "account", 1085 | "writable": true 1086 | }, 1087 | { 1088 | "name": "user", 1089 | "signer": true 1090 | }, 1091 | { 1092 | "name": "system_program", 1093 | "address": "11111111111111111111111111111111" 1094 | }, 1095 | { 1096 | "name": "event_authority", 1097 | "pda": { 1098 | "seeds": [ 1099 | { 1100 | "kind": "const", 1101 | "value": [ 1102 | 95, 1103 | 95, 1104 | 101, 1105 | 118, 1106 | 101, 1107 | 110, 1108 | 116, 1109 | 95, 1110 | 97, 1111 | 117, 1112 | 116, 1113 | 104, 1114 | 111, 1115 | 114, 1116 | 105, 1117 | 116, 1118 | 121 1119 | ] 1120 | } 1121 | ] 1122 | } 1123 | }, 1124 | { 1125 | "name": "program" 1126 | } 1127 | ], 1128 | "args": [] 1129 | }, 1130 | { 1131 | "name": "sell", 1132 | "discriminator": [ 1133 | 51, 1134 | 230, 1135 | 133, 1136 | 164, 1137 | 1, 1138 | 127, 1139 | 131, 1140 | 173 1141 | ], 1142 | "accounts": [ 1143 | { 1144 | "name": "pool" 1145 | }, 1146 | { 1147 | "name": "user", 1148 | "writable": true, 1149 | "signer": true 1150 | }, 1151 | { 1152 | "name": "global_config" 1153 | }, 1154 | { 1155 | "name": "base_mint", 1156 | "relations": [ 1157 | "pool" 1158 | ] 1159 | }, 1160 | { 1161 | "name": "quote_mint", 1162 | "relations": [ 1163 | "pool" 1164 | ] 1165 | }, 1166 | { 1167 | "name": "user_base_token_account", 1168 | "writable": true 1169 | }, 1170 | { 1171 | "name": "user_quote_token_account", 1172 | "writable": true 1173 | }, 1174 | { 1175 | "name": "pool_base_token_account", 1176 | "writable": true, 1177 | "relations": [ 1178 | "pool" 1179 | ] 1180 | }, 1181 | { 1182 | "name": "pool_quote_token_account", 1183 | "writable": true, 1184 | "relations": [ 1185 | "pool" 1186 | ] 1187 | }, 1188 | { 1189 | "name": "protocol_fee_recipient" 1190 | }, 1191 | { 1192 | "name": "protocol_fee_recipient_token_account", 1193 | "writable": true, 1194 | "pda": { 1195 | "seeds": [ 1196 | { 1197 | "kind": "account", 1198 | "path": "protocol_fee_recipient" 1199 | }, 1200 | { 1201 | "kind": "account", 1202 | "path": "quote_token_program" 1203 | }, 1204 | { 1205 | "kind": "account", 1206 | "path": "quote_mint" 1207 | } 1208 | ], 1209 | "program": { 1210 | "kind": "const", 1211 | "value": [ 1212 | 140, 1213 | 151, 1214 | 37, 1215 | 143, 1216 | 78, 1217 | 36, 1218 | 137, 1219 | 241, 1220 | 187, 1221 | 61, 1222 | 16, 1223 | 41, 1224 | 20, 1225 | 142, 1226 | 13, 1227 | 131, 1228 | 11, 1229 | 90, 1230 | 19, 1231 | 153, 1232 | 218, 1233 | 255, 1234 | 16, 1235 | 132, 1236 | 4, 1237 | 142, 1238 | 123, 1239 | 216, 1240 | 219, 1241 | 233, 1242 | 248, 1243 | 89 1244 | ] 1245 | } 1246 | } 1247 | }, 1248 | { 1249 | "name": "base_token_program" 1250 | }, 1251 | { 1252 | "name": "quote_token_program" 1253 | }, 1254 | { 1255 | "name": "system_program", 1256 | "address": "11111111111111111111111111111111" 1257 | }, 1258 | { 1259 | "name": "associated_token_program", 1260 | "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL" 1261 | }, 1262 | { 1263 | "name": "event_authority", 1264 | "pda": { 1265 | "seeds": [ 1266 | { 1267 | "kind": "const", 1268 | "value": [ 1269 | 95, 1270 | 95, 1271 | 101, 1272 | 118, 1273 | 101, 1274 | 110, 1275 | 116, 1276 | 95, 1277 | 97, 1278 | 117, 1279 | 116, 1280 | 104, 1281 | 111, 1282 | 114, 1283 | 105, 1284 | 116, 1285 | 121 1286 | ] 1287 | } 1288 | ] 1289 | } 1290 | }, 1291 | { 1292 | "name": "program" 1293 | }, 1294 | { 1295 | "name": "coin_creator_vault_ata", 1296 | "writable": true, 1297 | "pda": { 1298 | "seeds": [ 1299 | { 1300 | "kind": "account", 1301 | "path": "coin_creator_vault_authority" 1302 | }, 1303 | { 1304 | "kind": "account", 1305 | "path": "quote_token_program" 1306 | }, 1307 | { 1308 | "kind": "account", 1309 | "path": "quote_mint" 1310 | } 1311 | ], 1312 | "program": { 1313 | "kind": "const", 1314 | "value": [ 1315 | 140, 1316 | 151, 1317 | 37, 1318 | 143, 1319 | 78, 1320 | 36, 1321 | 137, 1322 | 241, 1323 | 187, 1324 | 61, 1325 | 16, 1326 | 41, 1327 | 20, 1328 | 142, 1329 | 13, 1330 | 131, 1331 | 11, 1332 | 90, 1333 | 19, 1334 | 153, 1335 | 218, 1336 | 255, 1337 | 16, 1338 | 132, 1339 | 4, 1340 | 142, 1341 | 123, 1342 | 216, 1343 | 219, 1344 | 233, 1345 | 248, 1346 | 89 1347 | ] 1348 | } 1349 | } 1350 | }, 1351 | { 1352 | "name": "coin_creator_vault_authority", 1353 | "pda": { 1354 | "seeds": [ 1355 | { 1356 | "kind": "const", 1357 | "value": [ 1358 | 99, 1359 | 114, 1360 | 101, 1361 | 97, 1362 | 116, 1363 | 111, 1364 | 114, 1365 | 95, 1366 | 118, 1367 | 97, 1368 | 117, 1369 | 108, 1370 | 116 1371 | ] 1372 | }, 1373 | { 1374 | "kind": "account", 1375 | "path": "pool.coin_creator", 1376 | "account": "Pool" 1377 | } 1378 | ] 1379 | } 1380 | } 1381 | ], 1382 | "args": [ 1383 | { 1384 | "name": "base_amount_in", 1385 | "type": "u64" 1386 | }, 1387 | { 1388 | "name": "min_quote_amount_out", 1389 | "type": "u64" 1390 | } 1391 | ] 1392 | }, 1393 | { 1394 | "name": "set_coin_creator", 1395 | "docs": [ 1396 | "Sets Pool::coin_creator from Metaplex metadata creator or BondingCurve::creator" 1397 | ], 1398 | "discriminator": [ 1399 | 210, 1400 | 149, 1401 | 128, 1402 | 45, 1403 | 188, 1404 | 58, 1405 | 78, 1406 | 175 1407 | ], 1408 | "accounts": [ 1409 | { 1410 | "name": "pool", 1411 | "writable": true 1412 | }, 1413 | { 1414 | "name": "metadata", 1415 | "pda": { 1416 | "seeds": [ 1417 | { 1418 | "kind": "const", 1419 | "value": [ 1420 | 109, 1421 | 101, 1422 | 116, 1423 | 97, 1424 | 100, 1425 | 97, 1426 | 116, 1427 | 97 1428 | ] 1429 | }, 1430 | { 1431 | "kind": "const", 1432 | "value": [ 1433 | 11, 1434 | 112, 1435 | 101, 1436 | 177, 1437 | 227, 1438 | 209, 1439 | 124, 1440 | 69, 1441 | 56, 1442 | 157, 1443 | 82, 1444 | 127, 1445 | 107, 1446 | 4, 1447 | 195, 1448 | 205, 1449 | 88, 1450 | 184, 1451 | 108, 1452 | 115, 1453 | 26, 1454 | 160, 1455 | 253, 1456 | 181, 1457 | 73, 1458 | 182, 1459 | 209, 1460 | 188, 1461 | 3, 1462 | 248, 1463 | 41, 1464 | 70 1465 | ] 1466 | }, 1467 | { 1468 | "kind": "account", 1469 | "path": "pool.base_mint", 1470 | "account": "Pool" 1471 | } 1472 | ], 1473 | "program": { 1474 | "kind": "const", 1475 | "value": [ 1476 | 11, 1477 | 112, 1478 | 101, 1479 | 177, 1480 | 227, 1481 | 209, 1482 | 124, 1483 | 69, 1484 | 56, 1485 | 157, 1486 | 82, 1487 | 127, 1488 | 107, 1489 | 4, 1490 | 195, 1491 | 205, 1492 | 88, 1493 | 184, 1494 | 108, 1495 | 115, 1496 | 26, 1497 | 160, 1498 | 253, 1499 | 181, 1500 | 73, 1501 | 182, 1502 | 209, 1503 | 188, 1504 | 3, 1505 | 248, 1506 | 41, 1507 | 70 1508 | ] 1509 | } 1510 | } 1511 | }, 1512 | { 1513 | "name": "bonding_curve", 1514 | "pda": { 1515 | "seeds": [ 1516 | { 1517 | "kind": "const", 1518 | "value": [ 1519 | 98, 1520 | 111, 1521 | 110, 1522 | 100, 1523 | 105, 1524 | 110, 1525 | 103, 1526 | 45, 1527 | 99, 1528 | 117, 1529 | 114, 1530 | 118, 1531 | 101 1532 | ] 1533 | }, 1534 | { 1535 | "kind": "account", 1536 | "path": "pool.base_mint", 1537 | "account": "Pool" 1538 | } 1539 | ], 1540 | "program": { 1541 | "kind": "const", 1542 | "value": [ 1543 | 1, 1544 | 86, 1545 | 224, 1546 | 246, 1547 | 147, 1548 | 102, 1549 | 90, 1550 | 207, 1551 | 68, 1552 | 219, 1553 | 21, 1554 | 104, 1555 | 191, 1556 | 23, 1557 | 91, 1558 | 170, 1559 | 81, 1560 | 137, 1561 | 203, 1562 | 151, 1563 | 245, 1564 | 210, 1565 | 255, 1566 | 59, 1567 | 101, 1568 | 93, 1569 | 43, 1570 | 182, 1571 | 253, 1572 | 109, 1573 | 24, 1574 | 176 1575 | ] 1576 | } 1577 | } 1578 | }, 1579 | { 1580 | "name": "event_authority", 1581 | "pda": { 1582 | "seeds": [ 1583 | { 1584 | "kind": "const", 1585 | "value": [ 1586 | 95, 1587 | 95, 1588 | 101, 1589 | 118, 1590 | 101, 1591 | 110, 1592 | 116, 1593 | 95, 1594 | 97, 1595 | 117, 1596 | 116, 1597 | 104, 1598 | 111, 1599 | 114, 1600 | 105, 1601 | 116, 1602 | 121 1603 | ] 1604 | } 1605 | ] 1606 | } 1607 | }, 1608 | { 1609 | "name": "program" 1610 | } 1611 | ], 1612 | "args": [] 1613 | }, 1614 | { 1615 | "name": "update_admin", 1616 | "discriminator": [ 1617 | 161, 1618 | 176, 1619 | 40, 1620 | 213, 1621 | 60, 1622 | 184, 1623 | 179, 1624 | 228 1625 | ], 1626 | "accounts": [ 1627 | { 1628 | "name": "admin", 1629 | "signer": true, 1630 | "relations": [ 1631 | "global_config" 1632 | ] 1633 | }, 1634 | { 1635 | "name": "global_config", 1636 | "writable": true 1637 | }, 1638 | { 1639 | "name": "new_admin" 1640 | }, 1641 | { 1642 | "name": "event_authority", 1643 | "pda": { 1644 | "seeds": [ 1645 | { 1646 | "kind": "const", 1647 | "value": [ 1648 | 95, 1649 | 95, 1650 | 101, 1651 | 118, 1652 | 101, 1653 | 110, 1654 | 116, 1655 | 95, 1656 | 97, 1657 | 117, 1658 | 116, 1659 | 104, 1660 | 111, 1661 | 114, 1662 | 105, 1663 | 116, 1664 | 121 1665 | ] 1666 | } 1667 | ] 1668 | } 1669 | }, 1670 | { 1671 | "name": "program" 1672 | } 1673 | ], 1674 | "args": [] 1675 | }, 1676 | { 1677 | "name": "update_fee_config", 1678 | "discriminator": [ 1679 | 104, 1680 | 184, 1681 | 103, 1682 | 242, 1683 | 88, 1684 | 151, 1685 | 107, 1686 | 20 1687 | ], 1688 | "accounts": [ 1689 | { 1690 | "name": "admin", 1691 | "signer": true, 1692 | "relations": [ 1693 | "global_config" 1694 | ] 1695 | }, 1696 | { 1697 | "name": "global_config", 1698 | "writable": true 1699 | }, 1700 | { 1701 | "name": "event_authority", 1702 | "pda": { 1703 | "seeds": [ 1704 | { 1705 | "kind": "const", 1706 | "value": [ 1707 | 95, 1708 | 95, 1709 | 101, 1710 | 118, 1711 | 101, 1712 | 110, 1713 | 116, 1714 | 95, 1715 | 97, 1716 | 117, 1717 | 116, 1718 | 104, 1719 | 111, 1720 | 114, 1721 | 105, 1722 | 116, 1723 | 121 1724 | ] 1725 | } 1726 | ] 1727 | } 1728 | }, 1729 | { 1730 | "name": "program" 1731 | } 1732 | ], 1733 | "args": [ 1734 | { 1735 | "name": "lp_fee_basis_points", 1736 | "type": "u64" 1737 | }, 1738 | { 1739 | "name": "protocol_fee_basis_points", 1740 | "type": "u64" 1741 | }, 1742 | { 1743 | "name": "protocol_fee_recipients", 1744 | "type": { 1745 | "array": [ 1746 | "pubkey", 1747 | 8 1748 | ] 1749 | } 1750 | }, 1751 | { 1752 | "name": "coin_creator_fee_basis_points", 1753 | "type": "u64" 1754 | } 1755 | ] 1756 | }, 1757 | { 1758 | "name": "withdraw", 1759 | "discriminator": [ 1760 | 183, 1761 | 18, 1762 | 70, 1763 | 156, 1764 | 148, 1765 | 109, 1766 | 161, 1767 | 34 1768 | ], 1769 | "accounts": [ 1770 | { 1771 | "name": "pool", 1772 | "writable": true 1773 | }, 1774 | { 1775 | "name": "global_config" 1776 | }, 1777 | { 1778 | "name": "user", 1779 | "signer": true 1780 | }, 1781 | { 1782 | "name": "base_mint", 1783 | "relations": [ 1784 | "pool" 1785 | ] 1786 | }, 1787 | { 1788 | "name": "quote_mint", 1789 | "relations": [ 1790 | "pool" 1791 | ] 1792 | }, 1793 | { 1794 | "name": "lp_mint", 1795 | "writable": true, 1796 | "relations": [ 1797 | "pool" 1798 | ] 1799 | }, 1800 | { 1801 | "name": "user_base_token_account", 1802 | "writable": true 1803 | }, 1804 | { 1805 | "name": "user_quote_token_account", 1806 | "writable": true 1807 | }, 1808 | { 1809 | "name": "user_pool_token_account", 1810 | "writable": true 1811 | }, 1812 | { 1813 | "name": "pool_base_token_account", 1814 | "writable": true, 1815 | "relations": [ 1816 | "pool" 1817 | ] 1818 | }, 1819 | { 1820 | "name": "pool_quote_token_account", 1821 | "writable": true, 1822 | "relations": [ 1823 | "pool" 1824 | ] 1825 | }, 1826 | { 1827 | "name": "token_program", 1828 | "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" 1829 | }, 1830 | { 1831 | "name": "token_2022_program", 1832 | "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" 1833 | }, 1834 | { 1835 | "name": "event_authority", 1836 | "pda": { 1837 | "seeds": [ 1838 | { 1839 | "kind": "const", 1840 | "value": [ 1841 | 95, 1842 | 95, 1843 | 101, 1844 | 118, 1845 | 101, 1846 | 110, 1847 | 116, 1848 | 95, 1849 | 97, 1850 | 117, 1851 | 116, 1852 | 104, 1853 | 111, 1854 | 114, 1855 | 105, 1856 | 116, 1857 | 121 1858 | ] 1859 | } 1860 | ] 1861 | } 1862 | }, 1863 | { 1864 | "name": "program" 1865 | } 1866 | ], 1867 | "args": [ 1868 | { 1869 | "name": "lp_token_amount_in", 1870 | "type": "u64" 1871 | }, 1872 | { 1873 | "name": "min_base_amount_out", 1874 | "type": "u64" 1875 | }, 1876 | { 1877 | "name": "min_quote_amount_out", 1878 | "type": "u64" 1879 | } 1880 | ] 1881 | } 1882 | ], 1883 | "accounts": [ 1884 | { 1885 | "name": "BondingCurve", 1886 | "discriminator": [ 1887 | 23, 1888 | 183, 1889 | 248, 1890 | 55, 1891 | 96, 1892 | 216, 1893 | 172, 1894 | 96 1895 | ] 1896 | }, 1897 | { 1898 | "name": "GlobalConfig", 1899 | "discriminator": [ 1900 | 149, 1901 | 8, 1902 | 156, 1903 | 202, 1904 | 160, 1905 | 252, 1906 | 176, 1907 | 217 1908 | ] 1909 | }, 1910 | { 1911 | "name": "Pool", 1912 | "discriminator": [ 1913 | 241, 1914 | 154, 1915 | 109, 1916 | 4, 1917 | 17, 1918 | 177, 1919 | 109, 1920 | 188 1921 | ] 1922 | } 1923 | ], 1924 | "events": [ 1925 | { 1926 | "name": "BuyEvent", 1927 | "discriminator": [ 1928 | 103, 1929 | 244, 1930 | 82, 1931 | 31, 1932 | 44, 1933 | 245, 1934 | 119, 1935 | 119 1936 | ] 1937 | }, 1938 | { 1939 | "name": "CollectCoinCreatorFeeEvent", 1940 | "discriminator": [ 1941 | 232, 1942 | 245, 1943 | 194, 1944 | 238, 1945 | 234, 1946 | 218, 1947 | 58, 1948 | 89 1949 | ] 1950 | }, 1951 | { 1952 | "name": "CreateConfigEvent", 1953 | "discriminator": [ 1954 | 107, 1955 | 52, 1956 | 89, 1957 | 129, 1958 | 55, 1959 | 226, 1960 | 81, 1961 | 22 1962 | ] 1963 | }, 1964 | { 1965 | "name": "CreatePoolEvent", 1966 | "discriminator": [ 1967 | 177, 1968 | 49, 1969 | 12, 1970 | 210, 1971 | 160, 1972 | 118, 1973 | 167, 1974 | 116 1975 | ] 1976 | }, 1977 | { 1978 | "name": "DepositEvent", 1979 | "discriminator": [ 1980 | 120, 1981 | 248, 1982 | 61, 1983 | 83, 1984 | 31, 1985 | 142, 1986 | 107, 1987 | 144 1988 | ] 1989 | }, 1990 | { 1991 | "name": "DisableEvent", 1992 | "discriminator": [ 1993 | 107, 1994 | 253, 1995 | 193, 1996 | 76, 1997 | 228, 1998 | 202, 1999 | 27, 2000 | 104 2001 | ] 2002 | }, 2003 | { 2004 | "name": "ExtendAccountEvent", 2005 | "discriminator": [ 2006 | 97, 2007 | 97, 2008 | 215, 2009 | 144, 2010 | 93, 2011 | 146, 2012 | 22, 2013 | 124 2014 | ] 2015 | }, 2016 | { 2017 | "name": "SellEvent", 2018 | "discriminator": [ 2019 | 62, 2020 | 47, 2021 | 55, 2022 | 10, 2023 | 165, 2024 | 3, 2025 | 220, 2026 | 42 2027 | ] 2028 | }, 2029 | { 2030 | "name": "SetBondingCurveCoinCreatorEvent", 2031 | "discriminator": [ 2032 | 242, 2033 | 231, 2034 | 235, 2035 | 102, 2036 | 65, 2037 | 99, 2038 | 189, 2039 | 211 2040 | ] 2041 | }, 2042 | { 2043 | "name": "SetMetaplexCoinCreatorEvent", 2044 | "discriminator": [ 2045 | 150, 2046 | 107, 2047 | 199, 2048 | 123, 2049 | 124, 2050 | 207, 2051 | 102, 2052 | 228 2053 | ] 2054 | }, 2055 | { 2056 | "name": "UpdateAdminEvent", 2057 | "discriminator": [ 2058 | 225, 2059 | 152, 2060 | 171, 2061 | 87, 2062 | 246, 2063 | 63, 2064 | 66, 2065 | 234 2066 | ] 2067 | }, 2068 | { 2069 | "name": "UpdateFeeConfigEvent", 2070 | "discriminator": [ 2071 | 90, 2072 | 23, 2073 | 65, 2074 | 35, 2075 | 62, 2076 | 244, 2077 | 188, 2078 | 208 2079 | ] 2080 | }, 2081 | { 2082 | "name": "WithdrawEvent", 2083 | "discriminator": [ 2084 | 22, 2085 | 9, 2086 | 133, 2087 | 26, 2088 | 160, 2089 | 44, 2090 | 71, 2091 | 192 2092 | ] 2093 | } 2094 | ], 2095 | "errors": [ 2096 | { 2097 | "code": 6000, 2098 | "name": "FeeBasisPointsExceedsMaximum" 2099 | }, 2100 | { 2101 | "code": 6001, 2102 | "name": "ZeroBaseAmount" 2103 | }, 2104 | { 2105 | "code": 6002, 2106 | "name": "ZeroQuoteAmount" 2107 | }, 2108 | { 2109 | "code": 6003, 2110 | "name": "TooLittlePoolTokenLiquidity" 2111 | }, 2112 | { 2113 | "code": 6004, 2114 | "name": "ExceededSlippage" 2115 | }, 2116 | { 2117 | "code": 6005, 2118 | "name": "InvalidAdmin" 2119 | }, 2120 | { 2121 | "code": 6006, 2122 | "name": "UnsupportedBaseMint" 2123 | }, 2124 | { 2125 | "code": 6007, 2126 | "name": "UnsupportedQuoteMint" 2127 | }, 2128 | { 2129 | "code": 6008, 2130 | "name": "InvalidBaseMint" 2131 | }, 2132 | { 2133 | "code": 6009, 2134 | "name": "InvalidQuoteMint" 2135 | }, 2136 | { 2137 | "code": 6010, 2138 | "name": "InvalidLpMint" 2139 | }, 2140 | { 2141 | "code": 6011, 2142 | "name": "AllProtocolFeeRecipientsShouldBeNonZero" 2143 | }, 2144 | { 2145 | "code": 6012, 2146 | "name": "UnsortedNotUniqueProtocolFeeRecipients" 2147 | }, 2148 | { 2149 | "code": 6013, 2150 | "name": "InvalidProtocolFeeRecipient" 2151 | }, 2152 | { 2153 | "code": 6014, 2154 | "name": "InvalidPoolBaseTokenAccount" 2155 | }, 2156 | { 2157 | "code": 6015, 2158 | "name": "InvalidPoolQuoteTokenAccount" 2159 | }, 2160 | { 2161 | "code": 6016, 2162 | "name": "BuyMoreBaseAmountThanPoolReserves" 2163 | }, 2164 | { 2165 | "code": 6017, 2166 | "name": "DisabledCreatePool" 2167 | }, 2168 | { 2169 | "code": 6018, 2170 | "name": "DisabledDeposit" 2171 | }, 2172 | { 2173 | "code": 6019, 2174 | "name": "DisabledWithdraw" 2175 | }, 2176 | { 2177 | "code": 6020, 2178 | "name": "DisabledBuy" 2179 | }, 2180 | { 2181 | "code": 6021, 2182 | "name": "DisabledSell" 2183 | }, 2184 | { 2185 | "code": 6022, 2186 | "name": "SameMint" 2187 | }, 2188 | { 2189 | "code": 6023, 2190 | "name": "Overflow" 2191 | }, 2192 | { 2193 | "code": 6024, 2194 | "name": "Truncation" 2195 | }, 2196 | { 2197 | "code": 6025, 2198 | "name": "DivisionByZero" 2199 | }, 2200 | { 2201 | "code": 6026, 2202 | "name": "NewSizeLessThanCurrentSize" 2203 | }, 2204 | { 2205 | "code": 6027, 2206 | "name": "AccountTypeNotSupported" 2207 | }, 2208 | { 2209 | "code": 6028, 2210 | "name": "OnlyCanonicalPumpPoolsCanHaveCoinCreator" 2211 | } 2212 | ], 2213 | "types": [ 2214 | { 2215 | "name": "BondingCurve", 2216 | "type": { 2217 | "kind": "struct", 2218 | "fields": [ 2219 | { 2220 | "name": "virtual_token_reserves", 2221 | "type": "u64" 2222 | }, 2223 | { 2224 | "name": "virtual_sol_reserves", 2225 | "type": "u64" 2226 | }, 2227 | { 2228 | "name": "real_token_reserves", 2229 | "type": "u64" 2230 | }, 2231 | { 2232 | "name": "real_sol_reserves", 2233 | "type": "u64" 2234 | }, 2235 | { 2236 | "name": "token_total_supply", 2237 | "type": "u64" 2238 | }, 2239 | { 2240 | "name": "complete", 2241 | "type": "bool" 2242 | }, 2243 | { 2244 | "name": "creator", 2245 | "type": "pubkey" 2246 | } 2247 | ] 2248 | } 2249 | }, 2250 | { 2251 | "name": "BuyEvent", 2252 | "type": { 2253 | "kind": "struct", 2254 | "fields": [ 2255 | { 2256 | "name": "timestamp", 2257 | "type": "i64" 2258 | }, 2259 | { 2260 | "name": "base_amount_out", 2261 | "type": "u64" 2262 | }, 2263 | { 2264 | "name": "max_quote_amount_in", 2265 | "type": "u64" 2266 | }, 2267 | { 2268 | "name": "user_base_token_reserves", 2269 | "type": "u64" 2270 | }, 2271 | { 2272 | "name": "user_quote_token_reserves", 2273 | "type": "u64" 2274 | }, 2275 | { 2276 | "name": "pool_base_token_reserves", 2277 | "type": "u64" 2278 | }, 2279 | { 2280 | "name": "pool_quote_token_reserves", 2281 | "type": "u64" 2282 | }, 2283 | { 2284 | "name": "quote_amount_in", 2285 | "type": "u64" 2286 | }, 2287 | { 2288 | "name": "lp_fee_basis_points", 2289 | "type": "u64" 2290 | }, 2291 | { 2292 | "name": "lp_fee", 2293 | "type": "u64" 2294 | }, 2295 | { 2296 | "name": "protocol_fee_basis_points", 2297 | "type": "u64" 2298 | }, 2299 | { 2300 | "name": "protocol_fee", 2301 | "type": "u64" 2302 | }, 2303 | { 2304 | "name": "quote_amount_in_with_lp_fee", 2305 | "type": "u64" 2306 | }, 2307 | { 2308 | "name": "user_quote_amount_in", 2309 | "type": "u64" 2310 | }, 2311 | { 2312 | "name": "pool", 2313 | "type": "pubkey" 2314 | }, 2315 | { 2316 | "name": "user", 2317 | "type": "pubkey" 2318 | }, 2319 | { 2320 | "name": "user_base_token_account", 2321 | "type": "pubkey" 2322 | }, 2323 | { 2324 | "name": "user_quote_token_account", 2325 | "type": "pubkey" 2326 | }, 2327 | { 2328 | "name": "protocol_fee_recipient", 2329 | "type": "pubkey" 2330 | }, 2331 | { 2332 | "name": "protocol_fee_recipient_token_account", 2333 | "type": "pubkey" 2334 | }, 2335 | { 2336 | "name": "coin_creator", 2337 | "type": "pubkey" 2338 | }, 2339 | { 2340 | "name": "coin_creator_fee_basis_points", 2341 | "type": "u64" 2342 | }, 2343 | { 2344 | "name": "coin_creator_fee", 2345 | "type": "u64" 2346 | } 2347 | ] 2348 | } 2349 | }, 2350 | { 2351 | "name": "CollectCoinCreatorFeeEvent", 2352 | "type": { 2353 | "kind": "struct", 2354 | "fields": [ 2355 | { 2356 | "name": "timestamp", 2357 | "type": "i64" 2358 | }, 2359 | { 2360 | "name": "coin_creator", 2361 | "type": "pubkey" 2362 | }, 2363 | { 2364 | "name": "coin_creator_fee", 2365 | "type": "u64" 2366 | }, 2367 | { 2368 | "name": "coin_creator_vault_ata", 2369 | "type": "pubkey" 2370 | }, 2371 | { 2372 | "name": "coin_creator_token_account", 2373 | "type": "pubkey" 2374 | } 2375 | ] 2376 | } 2377 | }, 2378 | { 2379 | "name": "CreateConfigEvent", 2380 | "type": { 2381 | "kind": "struct", 2382 | "fields": [ 2383 | { 2384 | "name": "timestamp", 2385 | "type": "i64" 2386 | }, 2387 | { 2388 | "name": "admin", 2389 | "type": "pubkey" 2390 | }, 2391 | { 2392 | "name": "lp_fee_basis_points", 2393 | "type": "u64" 2394 | }, 2395 | { 2396 | "name": "protocol_fee_basis_points", 2397 | "type": "u64" 2398 | }, 2399 | { 2400 | "name": "protocol_fee_recipients", 2401 | "type": { 2402 | "array": [ 2403 | "pubkey", 2404 | 8 2405 | ] 2406 | } 2407 | }, 2408 | { 2409 | "name": "coin_creator_fee_basis_points", 2410 | "type": "u64" 2411 | } 2412 | ] 2413 | } 2414 | }, 2415 | { 2416 | "name": "CreatePoolEvent", 2417 | "type": { 2418 | "kind": "struct", 2419 | "fields": [ 2420 | { 2421 | "name": "timestamp", 2422 | "type": "i64" 2423 | }, 2424 | { 2425 | "name": "index", 2426 | "type": "u16" 2427 | }, 2428 | { 2429 | "name": "creator", 2430 | "type": "pubkey" 2431 | }, 2432 | { 2433 | "name": "base_mint", 2434 | "type": "pubkey" 2435 | }, 2436 | { 2437 | "name": "quote_mint", 2438 | "type": "pubkey" 2439 | }, 2440 | { 2441 | "name": "base_mint_decimals", 2442 | "type": "u8" 2443 | }, 2444 | { 2445 | "name": "quote_mint_decimals", 2446 | "type": "u8" 2447 | }, 2448 | { 2449 | "name": "base_amount_in", 2450 | "type": "u64" 2451 | }, 2452 | { 2453 | "name": "quote_amount_in", 2454 | "type": "u64" 2455 | }, 2456 | { 2457 | "name": "pool_base_amount", 2458 | "type": "u64" 2459 | }, 2460 | { 2461 | "name": "pool_quote_amount", 2462 | "type": "u64" 2463 | }, 2464 | { 2465 | "name": "minimum_liquidity", 2466 | "type": "u64" 2467 | }, 2468 | { 2469 | "name": "initial_liquidity", 2470 | "type": "u64" 2471 | }, 2472 | { 2473 | "name": "lp_token_amount_out", 2474 | "type": "u64" 2475 | }, 2476 | { 2477 | "name": "pool_bump", 2478 | "type": "u8" 2479 | }, 2480 | { 2481 | "name": "pool", 2482 | "type": "pubkey" 2483 | }, 2484 | { 2485 | "name": "lp_mint", 2486 | "type": "pubkey" 2487 | }, 2488 | { 2489 | "name": "user_base_token_account", 2490 | "type": "pubkey" 2491 | }, 2492 | { 2493 | "name": "user_quote_token_account", 2494 | "type": "pubkey" 2495 | }, 2496 | { 2497 | "name": "coin_creator", 2498 | "type": "pubkey" 2499 | } 2500 | ] 2501 | } 2502 | }, 2503 | { 2504 | "name": "DepositEvent", 2505 | "type": { 2506 | "kind": "struct", 2507 | "fields": [ 2508 | { 2509 | "name": "timestamp", 2510 | "type": "i64" 2511 | }, 2512 | { 2513 | "name": "lp_token_amount_out", 2514 | "type": "u64" 2515 | }, 2516 | { 2517 | "name": "max_base_amount_in", 2518 | "type": "u64" 2519 | }, 2520 | { 2521 | "name": "max_quote_amount_in", 2522 | "type": "u64" 2523 | }, 2524 | { 2525 | "name": "user_base_token_reserves", 2526 | "type": "u64" 2527 | }, 2528 | { 2529 | "name": "user_quote_token_reserves", 2530 | "type": "u64" 2531 | }, 2532 | { 2533 | "name": "pool_base_token_reserves", 2534 | "type": "u64" 2535 | }, 2536 | { 2537 | "name": "pool_quote_token_reserves", 2538 | "type": "u64" 2539 | }, 2540 | { 2541 | "name": "base_amount_in", 2542 | "type": "u64" 2543 | }, 2544 | { 2545 | "name": "quote_amount_in", 2546 | "type": "u64" 2547 | }, 2548 | { 2549 | "name": "lp_mint_supply", 2550 | "type": "u64" 2551 | }, 2552 | { 2553 | "name": "pool", 2554 | "type": "pubkey" 2555 | }, 2556 | { 2557 | "name": "user", 2558 | "type": "pubkey" 2559 | }, 2560 | { 2561 | "name": "user_base_token_account", 2562 | "type": "pubkey" 2563 | }, 2564 | { 2565 | "name": "user_quote_token_account", 2566 | "type": "pubkey" 2567 | }, 2568 | { 2569 | "name": "user_pool_token_account", 2570 | "type": "pubkey" 2571 | } 2572 | ] 2573 | } 2574 | }, 2575 | { 2576 | "name": "DisableEvent", 2577 | "type": { 2578 | "kind": "struct", 2579 | "fields": [ 2580 | { 2581 | "name": "timestamp", 2582 | "type": "i64" 2583 | }, 2584 | { 2585 | "name": "admin", 2586 | "type": "pubkey" 2587 | }, 2588 | { 2589 | "name": "disable_create_pool", 2590 | "type": "bool" 2591 | }, 2592 | { 2593 | "name": "disable_deposit", 2594 | "type": "bool" 2595 | }, 2596 | { 2597 | "name": "disable_withdraw", 2598 | "type": "bool" 2599 | }, 2600 | { 2601 | "name": "disable_buy", 2602 | "type": "bool" 2603 | }, 2604 | { 2605 | "name": "disable_sell", 2606 | "type": "bool" 2607 | } 2608 | ] 2609 | } 2610 | }, 2611 | { 2612 | "name": "ExtendAccountEvent", 2613 | "type": { 2614 | "kind": "struct", 2615 | "fields": [ 2616 | { 2617 | "name": "timestamp", 2618 | "type": "i64" 2619 | }, 2620 | { 2621 | "name": "account", 2622 | "type": "pubkey" 2623 | }, 2624 | { 2625 | "name": "user", 2626 | "type": "pubkey" 2627 | }, 2628 | { 2629 | "name": "current_size", 2630 | "type": "u64" 2631 | }, 2632 | { 2633 | "name": "new_size", 2634 | "type": "u64" 2635 | } 2636 | ] 2637 | } 2638 | }, 2639 | { 2640 | "name": "GlobalConfig", 2641 | "type": { 2642 | "kind": "struct", 2643 | "fields": [ 2644 | { 2645 | "name": "admin", 2646 | "docs": [ 2647 | "The admin pubkey" 2648 | ], 2649 | "type": "pubkey" 2650 | }, 2651 | { 2652 | "name": "lp_fee_basis_points", 2653 | "docs": [ 2654 | "The lp fee in basis points (0.01%)" 2655 | ], 2656 | "type": "u64" 2657 | }, 2658 | { 2659 | "name": "protocol_fee_basis_points", 2660 | "docs": [ 2661 | "The protocol fee in basis points (0.01%)" 2662 | ], 2663 | "type": "u64" 2664 | }, 2665 | { 2666 | "name": "disable_flags", 2667 | "docs": [ 2668 | "Flags to disable certain functionality", 2669 | "bit 0 - Disable create pool", 2670 | "bit 1 - Disable deposit", 2671 | "bit 2 - Disable withdraw", 2672 | "bit 3 - Disable buy", 2673 | "bit 4 - Disable sell" 2674 | ], 2675 | "type": "u8" 2676 | }, 2677 | { 2678 | "name": "protocol_fee_recipients", 2679 | "docs": [ 2680 | "Addresses of the protocol fee recipients" 2681 | ], 2682 | "type": { 2683 | "array": [ 2684 | "pubkey", 2685 | 8 2686 | ] 2687 | } 2688 | }, 2689 | { 2690 | "name": "coin_creator_fee_basis_points", 2691 | "docs": [ 2692 | "The coin creator fee in basis points (0.01%)" 2693 | ], 2694 | "type": "u64" 2695 | } 2696 | ] 2697 | } 2698 | }, 2699 | { 2700 | "name": "Pool", 2701 | "type": { 2702 | "kind": "struct", 2703 | "fields": [ 2704 | { 2705 | "name": "pool_bump", 2706 | "type": "u8" 2707 | }, 2708 | { 2709 | "name": "index", 2710 | "type": "u16" 2711 | }, 2712 | { 2713 | "name": "creator", 2714 | "type": "pubkey" 2715 | }, 2716 | { 2717 | "name": "base_mint", 2718 | "type": "pubkey" 2719 | }, 2720 | { 2721 | "name": "quote_mint", 2722 | "type": "pubkey" 2723 | }, 2724 | { 2725 | "name": "lp_mint", 2726 | "type": "pubkey" 2727 | }, 2728 | { 2729 | "name": "pool_base_token_account", 2730 | "type": "pubkey" 2731 | }, 2732 | { 2733 | "name": "pool_quote_token_account", 2734 | "type": "pubkey" 2735 | }, 2736 | { 2737 | "name": "lp_supply", 2738 | "docs": [ 2739 | "True circulating supply without burns and lock-ups" 2740 | ], 2741 | "type": "u64" 2742 | }, 2743 | { 2744 | "name": "coin_creator", 2745 | "type": "pubkey" 2746 | } 2747 | ] 2748 | } 2749 | }, 2750 | { 2751 | "name": "SellEvent", 2752 | "type": { 2753 | "kind": "struct", 2754 | "fields": [ 2755 | { 2756 | "name": "timestamp", 2757 | "type": "i64" 2758 | }, 2759 | { 2760 | "name": "base_amount_in", 2761 | "type": "u64" 2762 | }, 2763 | { 2764 | "name": "min_quote_amount_out", 2765 | "type": "u64" 2766 | }, 2767 | { 2768 | "name": "user_base_token_reserves", 2769 | "type": "u64" 2770 | }, 2771 | { 2772 | "name": "user_quote_token_reserves", 2773 | "type": "u64" 2774 | }, 2775 | { 2776 | "name": "pool_base_token_reserves", 2777 | "type": "u64" 2778 | }, 2779 | { 2780 | "name": "pool_quote_token_reserves", 2781 | "type": "u64" 2782 | }, 2783 | { 2784 | "name": "quote_amount_out", 2785 | "type": "u64" 2786 | }, 2787 | { 2788 | "name": "lp_fee_basis_points", 2789 | "type": "u64" 2790 | }, 2791 | { 2792 | "name": "lp_fee", 2793 | "type": "u64" 2794 | }, 2795 | { 2796 | "name": "protocol_fee_basis_points", 2797 | "type": "u64" 2798 | }, 2799 | { 2800 | "name": "protocol_fee", 2801 | "type": "u64" 2802 | }, 2803 | { 2804 | "name": "quote_amount_out_without_lp_fee", 2805 | "type": "u64" 2806 | }, 2807 | { 2808 | "name": "user_quote_amount_out", 2809 | "type": "u64" 2810 | }, 2811 | { 2812 | "name": "pool", 2813 | "type": "pubkey" 2814 | }, 2815 | { 2816 | "name": "user", 2817 | "type": "pubkey" 2818 | }, 2819 | { 2820 | "name": "user_base_token_account", 2821 | "type": "pubkey" 2822 | }, 2823 | { 2824 | "name": "user_quote_token_account", 2825 | "type": "pubkey" 2826 | }, 2827 | { 2828 | "name": "protocol_fee_recipient", 2829 | "type": "pubkey" 2830 | }, 2831 | { 2832 | "name": "protocol_fee_recipient_token_account", 2833 | "type": "pubkey" 2834 | }, 2835 | { 2836 | "name": "coin_creator", 2837 | "type": "pubkey" 2838 | }, 2839 | { 2840 | "name": "coin_creator_fee_basis_points", 2841 | "type": "u64" 2842 | }, 2843 | { 2844 | "name": "coin_creator_fee", 2845 | "type": "u64" 2846 | } 2847 | ] 2848 | } 2849 | }, 2850 | { 2851 | "name": "SetBondingCurveCoinCreatorEvent", 2852 | "type": { 2853 | "kind": "struct", 2854 | "fields": [ 2855 | { 2856 | "name": "timestamp", 2857 | "type": "i64" 2858 | }, 2859 | { 2860 | "name": "base_mint", 2861 | "type": "pubkey" 2862 | }, 2863 | { 2864 | "name": "pool", 2865 | "type": "pubkey" 2866 | }, 2867 | { 2868 | "name": "bonding_curve", 2869 | "type": "pubkey" 2870 | }, 2871 | { 2872 | "name": "coin_creator", 2873 | "type": "pubkey" 2874 | } 2875 | ] 2876 | } 2877 | }, 2878 | { 2879 | "name": "SetMetaplexCoinCreatorEvent", 2880 | "type": { 2881 | "kind": "struct", 2882 | "fields": [ 2883 | { 2884 | "name": "timestamp", 2885 | "type": "i64" 2886 | }, 2887 | { 2888 | "name": "base_mint", 2889 | "type": "pubkey" 2890 | }, 2891 | { 2892 | "name": "pool", 2893 | "type": "pubkey" 2894 | }, 2895 | { 2896 | "name": "metadata", 2897 | "type": "pubkey" 2898 | }, 2899 | { 2900 | "name": "coin_creator", 2901 | "type": "pubkey" 2902 | } 2903 | ] 2904 | } 2905 | }, 2906 | { 2907 | "name": "UpdateAdminEvent", 2908 | "type": { 2909 | "kind": "struct", 2910 | "fields": [ 2911 | { 2912 | "name": "timestamp", 2913 | "type": "i64" 2914 | }, 2915 | { 2916 | "name": "admin", 2917 | "type": "pubkey" 2918 | }, 2919 | { 2920 | "name": "new_admin", 2921 | "type": "pubkey" 2922 | } 2923 | ] 2924 | } 2925 | }, 2926 | { 2927 | "name": "UpdateFeeConfigEvent", 2928 | "type": { 2929 | "kind": "struct", 2930 | "fields": [ 2931 | { 2932 | "name": "timestamp", 2933 | "type": "i64" 2934 | }, 2935 | { 2936 | "name": "admin", 2937 | "type": "pubkey" 2938 | }, 2939 | { 2940 | "name": "lp_fee_basis_points", 2941 | "type": "u64" 2942 | }, 2943 | { 2944 | "name": "protocol_fee_basis_points", 2945 | "type": "u64" 2946 | }, 2947 | { 2948 | "name": "protocol_fee_recipients", 2949 | "type": { 2950 | "array": [ 2951 | "pubkey", 2952 | 8 2953 | ] 2954 | } 2955 | }, 2956 | { 2957 | "name": "coin_creator_fee_basis_points", 2958 | "type": "u64" 2959 | } 2960 | ] 2961 | } 2962 | }, 2963 | { 2964 | "name": "WithdrawEvent", 2965 | "type": { 2966 | "kind": "struct", 2967 | "fields": [ 2968 | { 2969 | "name": "timestamp", 2970 | "type": "i64" 2971 | }, 2972 | { 2973 | "name": "lp_token_amount_in", 2974 | "type": "u64" 2975 | }, 2976 | { 2977 | "name": "min_base_amount_out", 2978 | "type": "u64" 2979 | }, 2980 | { 2981 | "name": "min_quote_amount_out", 2982 | "type": "u64" 2983 | }, 2984 | { 2985 | "name": "user_base_token_reserves", 2986 | "type": "u64" 2987 | }, 2988 | { 2989 | "name": "user_quote_token_reserves", 2990 | "type": "u64" 2991 | }, 2992 | { 2993 | "name": "pool_base_token_reserves", 2994 | "type": "u64" 2995 | }, 2996 | { 2997 | "name": "pool_quote_token_reserves", 2998 | "type": "u64" 2999 | }, 3000 | { 3001 | "name": "base_amount_out", 3002 | "type": "u64" 3003 | }, 3004 | { 3005 | "name": "quote_amount_out", 3006 | "type": "u64" 3007 | }, 3008 | { 3009 | "name": "lp_mint_supply", 3010 | "type": "u64" 3011 | }, 3012 | { 3013 | "name": "pool", 3014 | "type": "pubkey" 3015 | }, 3016 | { 3017 | "name": "user", 3018 | "type": "pubkey" 3019 | }, 3020 | { 3021 | "name": "user_base_token_account", 3022 | "type": "pubkey" 3023 | }, 3024 | { 3025 | "name": "user_quote_token_account", 3026 | "type": "pubkey" 3027 | }, 3028 | { 3029 | "name": "user_pool_token_account", 3030 | "type": "pubkey" 3031 | } 3032 | ] 3033 | } 3034 | } 3035 | ] 3036 | } --------------------------------------------------------------------------------