Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
Rename mul_gas_fee_by_gas to gas_fee
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaodino committed Jun 11, 2023
1 parent 352e9be commit 7179baa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zkevm-circuits/src/evm_circuit/execution/begin_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub(crate) struct BeginTxGadget<F> {
tx_nonce: Cell<F>,
tx_gas: Cell<F>,
tx_gas_price: Word<F>,
mul_gas_fee_by_gas: MulWordByU64Gadget<F>,
gas_fee: MulWordByU64Gadget<F>,
tx_caller_address: Cell<F>,
tx_caller_address_is_zero: IsZeroGadget<F>,
tx_callee_address: Cell<F>,
Expand Down Expand Up @@ -156,7 +156,7 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
// TODO: Implement EIP 1559 (currently it only supports legacy
// transaction format)
// Calculate transaction gas fee
let mul_gas_fee_by_gas =
let gas_fee =
MulWordByU64Gadget::construct(cb, tx_gas_price.clone(), tx_gas.expr());

// TODO: Take gas cost of access list (EIP 2930) into consideration.
Expand Down Expand Up @@ -442,7 +442,7 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
tx_nonce,
tx_gas,
tx_gas_price,
mul_gas_fee_by_gas,
gas_fee,
tx_caller_address,
tx_caller_address_is_zero,
tx_callee_address,
Expand Down Expand Up @@ -517,7 +517,7 @@ impl<F: Field> ExecutionGadget<F> for BeginTxGadget<F> {
.assign(region, offset, Value::known(F::from(tx.gas)))?;
self.tx_gas_price
.assign(region, offset, Some(tx.gas_price.to_le_bytes()))?;
self.mul_gas_fee_by_gas
self.gas_fee
.assign(region, offset, tx.gas_price, tx.gas, gas_fee)?;
let caller_address = tx
.caller_address
Expand Down

0 comments on commit 7179baa

Please sign in to comment.