Skip to content

Commit

Permalink
fix: value of gas in JSON RPC Transaction should be gas limit (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangby-cryptape authored Nov 7, 2023
1 parent dfee005 commit b514a1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/api/src/jsonrpc/web3_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl From<(SignedTransaction, Receipt)> for Web3Transaction {
block_hash: Some(receipt.block_hash),
raw: Hex::encode(stx.transaction.encode().unwrap()),
public_key: stx.public,
gas: receipt.used_gas,
gas: *stx.transaction.unsigned.gas_limit(),
gas_price: stx.transaction.unsigned.gas_price(),
max_fee_per_gas: if is_eip1559 {
Some(U256::from(MAX_PRIORITY_FEE_PER_GAS))
Expand Down

0 comments on commit b514a1d

Please sign in to comment.