From 202ee164f897d0a5d2d91cc9b01aff3fd6c81b77 Mon Sep 17 00:00:00 2001 From: canonbrother Date: Thu, 1 Jun 2023 17:16:55 +0800 Subject: [PATCH 1/2] log --- lib/ain-grpc/src/rpc/eth.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ain-grpc/src/rpc/eth.rs b/lib/ain-grpc/src/rpc/eth.rs index 4878c23f40..6b20a9505a 100644 --- a/lib/ain-grpc/src/rpc/eth.rs +++ b/lib/ain-grpc/src/rpc/eth.rs @@ -476,6 +476,7 @@ impl MetachainRPCServer for MetachainRPCModule { } } }; + debug!(target:"rpc","[send_transaction] from: {:?}", from); let chain_id = ain_cpp_imports::get_chain_id() .map_err(|e| Error::Custom(format!("ain_cpp_imports::get_chain_id error : {e:?}")))?; @@ -673,6 +674,7 @@ fn sign( address: H160, message: TransactionMessage, ) -> Result> { + debug!("sign address {:#x}", address); let key_id = address.as_fixed_bytes().to_owned(); let priv_key = get_eth_priv_key(key_id).unwrap(); let secret_key = SecretKey::parse(&priv_key).unwrap(); From 32208c7f50be55fc1fc709a990b753574610c0ca Mon Sep 17 00:00:00 2001 From: canonbrother Date: Thu, 1 Jun 2023 17:17:52 +0800 Subject: [PATCH 2/2] map access_list correctly --- lib/ain-evm/src/transaction/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ain-evm/src/transaction/mod.rs b/lib/ain-evm/src/transaction/mod.rs index d0ea3c92c4..b6203b0f53 100644 --- a/lib/ain-evm/src/transaction/mod.rs +++ b/lib/ain-evm/src/transaction/mod.rs @@ -134,7 +134,7 @@ impl TryFrom for SignedTx { action: tx.action, value: tx.value, input: tx.input.clone(), - access_list: vec![], + access_list: tx.access_list.clone(), }; let signing_message = libsecp256k1::Message::parse_slice(&msg.hash()[..]).unwrap(); let hash = H256::from(signing_message.serialize()); @@ -150,7 +150,7 @@ impl TryFrom for SignedTx { action: tx.action, value: tx.value, input: tx.input.clone(), - access_list: vec![], + access_list: tx.access_list.clone(), }; let signing_message = libsecp256k1::Message::parse_slice(&msg.hash()[..]).unwrap(); let hash = H256::from(signing_message.serialize());