Skip to content

Commit

Permalink
fix: estimate_gas interface with drip unit gas price. Resolves #36
Browse files Browse the repository at this point in the history
  • Loading branch information
darwintree committed Aug 27, 2024
1 parent 9ecb791 commit 840fbc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conflux_web3/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ def estimate_gas_and_collateral_munger(
) -> Tuple[TxParam, Optional[EpochNumberParam]]:
if "from" not in transaction and self.default_account:
transaction = assoc(transaction, "from", self.default_account)
if 'value' in transaction:
transaction['value'] = to_int_if_drip_units(transaction['value'])
if 'gasPrice' in transaction:
transaction['gasPrice'] = to_int_if_drip_units(transaction['gasPrice'])

if block_identifier is None:
params = (transaction, self._default_block)
Expand Down

0 comments on commit 840fbc2

Please sign in to comment.