fix: Update to newest version of solana
All checks were successful
Build Docker / BuildImage (push) Successful in 34s
All checks were successful
Build Docker / BuildImage (push) Successful in 34s
This commit is contained in:
parent
6664de6c07
commit
69fb34c2ba
@ -254,14 +254,14 @@ def donateAmountPost(amount):
|
|||||||
receiver = Pubkey.from_string('AJsPEEe6S7XSiVcdZKbeV8GRp1QuhFUsG8mLrqL4XgiU')
|
receiver = Pubkey.from_string('AJsPEEe6S7XSiVcdZKbeV8GRp1QuhFUsG8mLrqL4XgiU')
|
||||||
transfer_ix = transfer(TransferParams(from_pubkey=sender, to_pubkey=receiver, lamports=int(amount * 1000000000)))
|
transfer_ix = transfer(TransferParams(from_pubkey=sender, to_pubkey=receiver, lamports=int(amount * 1000000000)))
|
||||||
solana_client = Client("https://api.mainnet-beta.solana.com")
|
solana_client = Client("https://api.mainnet-beta.solana.com")
|
||||||
blockhashData = solana_client.get_recent_blockhash()
|
blockhashData = solana_client.get_latest_blockhash()
|
||||||
blockhash = blockhashData['result']['value']['blockhash']
|
blockhash = blockhashData.value.blockhash
|
||||||
|
|
||||||
msg = MessageV0.try_compile(
|
msg = MessageV0.try_compile(
|
||||||
payer=sender,
|
payer=sender,
|
||||||
instructions=[transfer_ix],
|
instructions=[transfer_ix],
|
||||||
address_lookup_table_accounts=[],
|
address_lookup_table_accounts=[],
|
||||||
recent_blockhash=Hash.from_string(blockhash),
|
recent_blockhash=blockhash,
|
||||||
)
|
)
|
||||||
tx = VersionedTransaction(message=msg, keypairs=[NullSigner(sender)])
|
tx = VersionedTransaction(message=msg, keypairs=[NullSigner(sender)])
|
||||||
tx = bytes(tx).hex()
|
tx = bytes(tx).hex()
|
||||||
|
Loading…
Reference in New Issue
Block a user