-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libraries compatibility to python 3.12 #467
Comments
can you provide a more descriptive issue? |
Transaction Creation Error in solana-py v0.36.1Environment & Versions
Issue DescriptionWhen attempting to create and send transfer transactions using the solders Transaction and Message classes, I'm consistently getting type conversion errors:
Minimal Reproduction Codefrom solana.rpc.api import Client
from solders.keypair import Keypair
from solders.transaction import Transaction
from solders.pubkey import Pubkey
from solders.message import Message
from solders.system_program import TransferParams, transfer
from solders.hash import Hash
# Setup
client = Client("https://api.devnet.solana.com")
sender_keypair = Keypair.from_bytes(bytes.fromhex(sender_private_key))
recipient_pubkey = Pubkey.from_string(recipient_address)
# Get blockhash
blockhash_resp = client.get_latest_blockhash()
recent_blockhash = blockhash_resp.value.blockhash
# Create transfer instruction
transfer_instruction = transfer(
TransferParams(
from_pubkey=sender_keypair.pubkey(),
to_pubkey=recipient_pubkey,
lamports=amount
)
)
# This is where the error occurs
message = Message([transfer_instruction], recent_blockhash)
transaction = Transaction(
from_keypairs=[sender_keypair],
message=message
) Expected BehaviorThe transaction should be created successfully and ready to be sent. Actual BehaviorGetting type conversion error suggesting the Message or Transaction constructor is expecting different types than what we're providing. Questions
Additional Context
References
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
some packages are not compatible with python 3.12
The text was updated successfully, but these errors were encountered: