Skip to content

Commit 1b120d2

Browse files
committed
fix: estimate: auth list should be send unchecked to the runtime
The runtime api expect type `Vec<AuthorizationListItem>`, the client should pass the authorization list without any pre-conversion
1 parent 66b5fb8 commit 1b120d2

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

client/rpc-core/src/types/transaction_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl From<TransactionRequest> for Option<TransactionMessage> {
269269
value,
270270
data: data_bytes,
271271
access_list,
272-
authorization_list: req.authorization_list.unwrap(),
272+
authorization_list: req.authorization_list.unwrap_or_default(),
273273
chain_id,
274274
})),
275275
// EIP1559: Has max_fee_per_gas but no gas_price, or all fee fields are None

client/rpc/src/eth/execute.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -948,19 +948,6 @@ where
948948
.map(|item| (item.address, item.storage_keys))
949949
.collect::<Vec<(sp_core::H160, Vec<H256>)>>();
950950

951-
let authorization_list = authorization_list
952-
.unwrap_or_default()
953-
.iter()
954-
.map(|d| {
955-
(
956-
U256::from(d.chain_id),
957-
d.address,
958-
d.nonce,
959-
d.authorizing_address().ok(),
960-
)
961-
})
962-
.collect::<Vec<(U256, H160, U256, Option<H160>)>>();
963-
964951
let encoded_params = Encode::encode(&(
965952
&from.unwrap_or_default(),
966953
&to,
@@ -974,7 +961,7 @@ where
974961
&Some(
975962
access_list
976963
),
977-
&Some(authorization_list),
964+
&authorization_list,
978965
));
979966

980967
// Proof size recording

0 commit comments

Comments
 (0)