Skip to content

Commit

Permalink
feat(zkevm-circuits): pick 6/7,7/7 commits of PR453 in scroll circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchangYoo committed May 27, 2024
1 parent 9c1ecd7 commit c3892c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions zkevm-circuits/src/evm_circuit/execution/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,6 @@ impl<F: Field, const IS_CREATE2: bool, const S: ExecutionState> ExecutionGadget<
)?;

let mut rw_offset = 0;

if !is_insufficient_balance {
let [caller_balance_pair, callee_balance_pair] = if !value.is_zero() {
rw_offset += 2;
Expand Down Expand Up @@ -557,13 +556,15 @@ impl<F: Field, const IS_CREATE2: bool, const S: ExecutionState> ExecutionGadget<
self.callee_is_success.assign(
region,
offset,
Value::known(
Value::known(if is_insufficient_balance {
F::zero()
} else {
block.rws
[step.rw_indices[21 + rw_offset + usize::from(is_create2) + copy_rw_increase]]
[step.rw_indices[22 + rw_offset + usize::from(is_create2) + copy_rw_increase]]
.call_context_value()
.to_scalar()
.unwrap(),
),
.unwrap()
}),
)?;

let keccak_input: Vec<u8> = if is_create2 {
Expand Down Expand Up @@ -720,7 +721,6 @@ mod test {
{
let init_code = initialization_bytecode(*is_success);
let root_code = creater_bytecode(init_code, 23414.into(), *is_create2, *is_persistent);

let caller = Account {
address: *CALLER_ADDRESS,
code: root_code.into(),
Expand Down

0 comments on commit c3892c0

Please sign in to comment.