When calling eth_get_transaction_receipt
from the evm_rpc
canister, the JSON-RPC response appears in the console output as expected:
2024-11-07 06:35:02.696446 UTC: [Canister bw4dl-smaaa-aaaaa-qaacq-cai] Direct result: Consistent(Ok(Some(TransactionReceipt { block_hash: 0x4b85fda05ebafb031d778e3d37d804f15fd179921852a23d875bcef53c02275d, block_number: 21133753, effective_gas_price: 9038755583, gas_used: 41309, status: Some(1), transaction_hash: 0x1fcf2b74f5bc7abc56603cb8c491e0dddde76cb620eec8498cdc7b16e6654902, contract_address: None, from: 0xe93ebe6e9c21bec4c091af9eba11f670b9291a4e, logs: [LogEntry { address: 0xdac17f958d2ee523a2206206994597c13d831ec7, topics: [0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef, 0x000000000000000000000000e93ebe6e9c21bec4c091af9eba11f670b9291a4e, 0x000000000000000000000000055d9a4dc18687872d95e2324335aaa4fbd29f05], data: 0x00000000000000000000000000000000000000000000000000000000434b2c40, block_number: Some(21133753), transaction_hash: Some(0x1fcf2b74f5bc7abc56603cb8c491e0dddde76cb620eec8498cdc7b16e6654902), transaction_index: Some(117), block_hash: Some(0x4b85fda05ebafb031d778e3d37d804f15fd179921852a23d875bcef53c02275d), log_index: Some(461), removed: false }], logs_bloom: 0x00000000000000000000000000000000000000000000000000000000001000000000000040000000000000000000010008000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000002100000000000000000000000000080000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000008000000000000000000000000000, to: Some(0xdac17f958d2ee523a2206206994597c13d831ec7), transaction_index: 117, tx_type: 0x00 })))
However, when invoking the eth_get_transaction_receipt
method, the modified code below still results in unexpected output:
#[update(name = "eth_getTransactionReceipt")]
#[candid_method(rename = "eth_getTransactionReceipt")]
pub async fn eth_get_transaction_receipt(
source: evm_rpc_types::RpcServices,
config: Option<evm_rpc_types::RpcConfig>,
tx_hash: Hex32,
) -> MultiRpcResult<Option<evm_rpc_types::TransactionReceipt>> {
let result = match CandidRpcClient::new(source, config) {
Ok(source) => source.eth_get_transaction_receipt(tx_hash).await,
Err(err) => Err(err).into(),
};
ic_cdk::println!("Direct result: {:?}", result);
result
}
Despite the above adjustments, the output remains:
2024-11-07 06:35:02.696446 UTC: [Canister bd3sg-teaaa-aaaaa-qaaba-cai] re Full Response: Ok((Consistent(Ok(None)),))
2024-11-07 06:35:02.696446 UTC: [Canister bd3sg-teaaa-aaaaa-qaaba-cai] Full Response: Consistent(Ok(None))
2024-11-07 06:35:02.696446 UTC: [Canister bd3sg-teaaa-aaaaa-qaaba-cai] Transaction result: Ok(None)
2024-11-07 06:35:02.696446 UTC: [Canister bd3sg-teaaa-aaaaa-qaaba-cai] Transaction receipt parsed as None
What might be causing the transaction receipt to still be interpreted as Ok(None)
despite the correct direct result appearing in the console?