Skip to content

Commit 99a7745

Browse files
authored
fix: add type field to call request (#4868)
1 parent 267953e commit 99a7745

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

crates/edr_eth/src/remote/eth/call_request.rs

+3
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@ pub struct CallRequest {
2828
pub data: Option<Bytes>,
2929
/// warm storage access pre-payment
3030
pub access_list: Option<Vec<AccessListItem>>,
31+
/// EIP-2718 type
32+
#[cfg_attr(feature = "serde", serde(default, rename = "type"))]
33+
pub transaction_type: Option<U256>,
3134
}

crates/edr_provider/src/requests/eth/call.rs

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub(crate) fn resolve_call_request<LoggerErrorT: Debug>(
6363
value,
6464
data: input,
6565
access_list,
66+
..
6667
} = request;
6768

6869
let chain_id = data.chain_id();

crates/edr_provider/tests/eth_request_serialization.rs

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ fn test_serde_eth_call() {
3838
value: Some(U256::from(123568919)),
3939
data: Some(Bytes::from(&b"whatever"[..])),
4040
access_list: None,
41+
transaction_type: None,
4142
};
4243
help_test_method_invocation_serde(MethodInvocation::Call(
4344
tx.clone(),
@@ -72,6 +73,7 @@ fn test_serde_eth_estimate_gas() {
7273
value: Some(U256::from(123568919)),
7374
data: Some(Bytes::from(&b"whatever"[..])),
7475
access_list: None,
76+
transaction_type: None,
7577
};
7678
help_test_method_invocation_serde(MethodInvocation::EstimateGas(
7779
tx.clone(),

0 commit comments

Comments
 (0)