fix: Update to newest version of solana
All checks were successful
Build Docker / BuildImage (push) Successful in 34s

This commit is contained in:
Nathan Woodburn 2024-07-03 15:07:27 +10:00
parent 6664de6c07
commit 69fb34c2ba
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -254,14 +254,14 @@ def donateAmountPost(amount):
receiver = Pubkey.from_string('AJsPEEe6S7XSiVcdZKbeV8GRp1QuhFUsG8mLrqL4XgiU')
transfer_ix = transfer(TransferParams(from_pubkey=sender, to_pubkey=receiver, lamports=int(amount * 1000000000)))
solana_client = Client("https://api.mainnet-beta.solana.com")
blockhashData = solana_client.get_recent_blockhash()
blockhash = blockhashData['result']['value']['blockhash']
blockhashData = solana_client.get_latest_blockhash()
blockhash = blockhashData.value.blockhash
msg = MessageV0.try_compile(
payer=sender,
instructions=[transfer_ix],
address_lookup_table_accounts=[],
recent_blockhash=Hash.from_string(blockhash),
recent_blockhash=blockhash,
)
tx = VersionedTransaction(message=msg, keypairs=[NullSigner(sender)])
tx = bytes(tx).hex()