diff --git a/bus-mapping/src/circuit_input_builder.rs b/bus-mapping/src/circuit_input_builder.rs index 5bfc7cf0d3..01498c6056 100644 --- a/bus-mapping/src/circuit_input_builder.rs +++ b/bus-mapping/src/circuit_input_builder.rs @@ -1741,7 +1741,13 @@ impl BuilderClient

{ eth_block: &EthBlock, geth_traces: &[eth_types::GethExecTrace], ) -> Result { - let mut block_access_trace = Vec::new(); + let mut block_access_trace = vec![Access { + step_index: None, + rw: RW::WRITE, + value: AccessValue::Account { + address: eth_block.author, + }, + }]; for (tx_index, tx) in eth_block.transactions.iter().enumerate() { let geth_trace = &geth_traces[tx_index]; let tx_access_trace = gen_state_access_trace(eth_block, tx, geth_trace)?; diff --git a/bus-mapping/src/evm/opcodes.rs b/bus-mapping/src/evm/opcodes.rs index d68743c213..e0102367a4 100644 --- a/bus-mapping/src/evm/opcodes.rs +++ b/bus-mapping/src/evm/opcodes.rs @@ -324,20 +324,24 @@ pub fn gen_begin_tx_ops(state: &mut CircuitInputStateRef) -> Result<(), Error> { }, )?; - if call.is_create() { - unimplemented!("Creation transaction is not yet implemented") - } else if state.is_precompiled(&call.address) { - unimplemented!("Call to precompiled is not yet implemented") - } else { - state.push_op( - RW::READ, - AccountOp { - address: call.address, - field: AccountField::CodeHash, - value: code_hash.to_word(), - value_prev: code_hash.to_word(), - }, - ); + match (call.is_create(), state.is_precompiled(&call.address)) { + (true, _) => { + // TODO: Implement creation transaction + } + (_, true) => { + // TODO: Implement calling to precompiled + } + _ => { + state.push_op( + RW::READ, + AccountOp { + address: call.address, + field: AccountField::CodeHash, + value: code_hash.to_word(), + value_prev: code_hash.to_word(), + }, + ); + } } for (field, value) in [