@@ -48,7 +48,8 @@ class TransactionConfig:
4848 Attributes:
4949 expiration_ttl (int): Time-to-live, in seconds, before a transaction expires and is rejected by the network.
5050 Defaults to 600.
51- gas_unit_price (int): Price per unit of gas used to execute the transaction. Defaults to 100.
51+ gas_unit_price (int): Price per unit of gas used to execute the transaction. Defaults to
52+ `min_configured_gas_price` obtained from `rpc/v3/transactions/estimate_gas_price` endpoint.
5253 max_gas_amount (int): Maximum number of gas units allowed per transaction. Defaults to 500,000.
5354 transaction_wait_time_in_seconds (int): Number of seconds to wait for a transaction to be executed before timing
5455 out. Defaults to 20.
@@ -60,7 +61,7 @@ class TransactionConfig:
6061 """
6162
6263 expiration_ttl : int = 600
63- gas_unit_price : int = 100
64+ gas_unit_price : int | None = None
6465 max_gas_amount : int = 500_000
6566 transaction_wait_time_in_seconds : int = 20
6667 polling_wait_time_in_seconds : int = 1
@@ -98,7 +99,8 @@ class SupraClient(
9899
99100 Attributes:
100101 _chain_id (int | None): The chain-id of the network.
101- api_client (supra_sdk.clients.api_client.ApiClient): Inherited from `RestClient`. Used to send HTTP requests to the Supra RPC node.
102+ api_client (supra_sdk.clients.api_client.ApiClient): Inherited from `RestClient`. Used to send HTTP requests to
103+ the Supra RPC node.
102104
103105 """
104106
@@ -305,7 +307,8 @@ async def create_raw_transaction(
305307 sequence_number ,
306308 transaction_payload ,
307309 self .transaction_config .max_gas_amount ,
308- self .transaction_config .gas_unit_price ,
310+ self .transaction_config .gas_unit_price
311+ or (await self .estimate_gas_price ())["min_configured_gas_price" ],
309312 int (time .time ()) + self .transaction_config .expiration_ttl ,
310313 await self .chain_id (),
311314 )
0 commit comments