mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-08-19 02:08:04 +00:00
fix: decrease tx CUs, add explicit commitment level for getLatestBlockhash
This commit is contained in:
+2
-2
@@ -120,7 +120,7 @@ class SolanaClient:
|
|||||||
Recent blockhash as string
|
Recent blockhash as string
|
||||||
"""
|
"""
|
||||||
client = await self.get_client()
|
client = await self.get_client()
|
||||||
response = await client.get_latest_blockhash()
|
response = await client.get_latest_blockhash(commitment="processed")
|
||||||
return response.value.blockhash
|
return response.value.blockhash
|
||||||
|
|
||||||
async def build_and_send_transaction(
|
async def build_and_send_transaction(
|
||||||
@@ -152,7 +152,7 @@ class SolanaClient:
|
|||||||
# Add priority fee instructions if applicable
|
# Add priority fee instructions if applicable
|
||||||
if priority_fee is not None:
|
if priority_fee is not None:
|
||||||
fee_instructions = [
|
fee_instructions = [
|
||||||
set_compute_unit_limit(100_000), # Default compute unit limit
|
set_compute_unit_limit(75_000), # Default compute unit limit
|
||||||
set_compute_unit_price(priority_fee),
|
set_compute_unit_price(priority_fee),
|
||||||
]
|
]
|
||||||
instructions = fee_instructions + instructions
|
instructions = fee_instructions + instructions
|
||||||
|
|||||||
Reference in New Issue
Block a user