fix(examples): remove redunant imports, comments

This commit is contained in:
smypmsa
2025-06-28 09:52:53 +00:00
parent f69dfce484
commit ddbe5970a2
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -6,7 +6,6 @@ import os
import struct import struct
import base58 import base58
import spl.token.instructions as spl_token
import websockets import websockets
from construct import Bytes, Flag, Int64ul, Struct from construct import Bytes, Flag, Int64ul, Struct
from solana.rpc.async_api import AsyncClient from solana.rpc.async_api import AsyncClient
@@ -18,7 +17,10 @@ from solders.keypair import Keypair
from solders.message import Message from solders.message import Message
from solders.pubkey import Pubkey from solders.pubkey import Pubkey
from solders.transaction import Transaction, VersionedTransaction from solders.transaction import Transaction, VersionedTransaction
from spl.token.instructions import create_idempotent_associated_token_account, get_associated_token_address from spl.token.instructions import (
create_idempotent_associated_token_account,
get_associated_token_address,
)
# Here and later all the discriminators are precalculated. See learning-examples/calculate_discriminator.py # Here and later all the discriminators are precalculated. See learning-examples/calculate_discriminator.py
EXPECTED_DISCRIMINATOR = struct.pack("<Q", 6966180631402821399) EXPECTED_DISCRIMINATOR = struct.pack("<Q", 6966180631402821399)
+1 -1
View File
@@ -235,7 +235,7 @@ async def sell_token(
async def main(): async def main():
# Replace these with the actual values for the token you want to sell # Replace these with the actual values for the token you want to sell
mint = Pubkey.from_string("5GkGpfvRLusWGqxSkwk7uEs6mHzNxH8QaZD6uPvYpump") mint = Pubkey.from_string("...")
bonding_curve, _ = get_bonding_curve_address(mint) bonding_curve, _ = get_bonding_curve_address(mint)
associated_bonding_curve = find_associated_bonding_curve(mint, bonding_curve) associated_bonding_curve = find_associated_bonding_curve(mint, bonding_curve)