@@ -83,12 +83,20 @@ async fn handler_internal(
83
83
. validate_project_access_and_quota ( rpc_project_id. as_ref ( ) )
84
84
. await ?;
85
85
86
+ let first_call = if let Some ( first) = request_payload. transaction . calls . into_calls ( ) . first ( ) {
87
+ first. clone ( )
88
+ } else {
89
+ return Err ( RpcError :: InvalidParameter (
90
+ "The transaction calls are empty" . to_string ( ) ,
91
+ ) ) ;
92
+ } ;
93
+
86
94
let mut initial_transaction = Transaction {
87
95
from : request_payload. transaction . from ,
88
- to : request_payload. transaction . to ,
89
- value : request_payload. transaction . value ,
96
+ to : first_call. to ,
97
+ value : first_call. value ,
98
+ input : first_call. input . clone ( ) ,
90
99
gas_limit : U64 :: ZERO ,
91
- input : request_payload. transaction . input . clone ( ) ,
92
100
nonce : U64 :: ZERO ,
93
101
chain_id : request_payload. transaction . chain_id . clone ( ) ,
94
102
} ;
@@ -103,6 +111,7 @@ async fn handler_internal(
103
111
from_address,
104
112
rpc_project_id. as_ref ( ) ,
105
113
MessageSource :: ChainAgnosticCheck ,
114
+ query_params. session_id . clone ( ) ,
106
115
)
107
116
. await ?;
108
117
initial_transaction. nonce = intial_transaction_nonce;
@@ -274,6 +283,7 @@ async fn handler_internal(
274
283
convert_alloy_address_to_h160 ( from_address) ,
275
284
rpc_project_id. as_ref ( ) ,
276
285
MessageSource :: ChainAgnosticCheck ,
286
+ query_params. session_id . clone ( ) ,
277
287
)
278
288
. await ?;
279
289
let erc20_balance = U256 :: from_be_bytes ( erc20_balance. into ( ) ) ;
@@ -289,6 +299,7 @@ async fn handler_internal(
289
299
// or return an insufficient funds error
290
300
let Some ( bridging_asset) = check_bridging_for_erc20_transfer (
291
301
rpc_project_id. as_ref ( ) . to_string ( ) ,
302
+ query_params. session_id . clone ( ) ,
292
303
erc20_topup_value,
293
304
from_address,
294
305
initial_transaction. chain_id . clone ( ) ,
@@ -417,6 +428,7 @@ async fn handler_internal(
417
428
from_address,
418
429
rpc_project_id. as_ref ( ) ,
419
430
MessageSource :: ChainAgnosticCheck ,
431
+ query_params. session_id . clone ( ) ,
420
432
)
421
433
. await ?;
422
434
@@ -565,6 +577,9 @@ async fn handler_internal(
565
577
region. clone ( ) ,
566
578
country. clone ( ) ,
567
579
continent. clone ( ) ,
580
+ query_params. sdk_version . clone ( ) ,
581
+ query_params. sdk_type . clone ( ) ,
582
+ orchestration_id. clone ( ) ,
568
583
bridge_chain_id. clone ( ) ,
569
584
bridge_contract. to_string ( ) ,
570
585
bridge_token_symbol. clone ( ) ,
@@ -578,6 +593,9 @@ async fn handler_internal(
578
593
region. clone ( ) ,
579
594
country. clone ( ) ,
580
595
continent. clone ( ) ,
596
+ query_params. sdk_version . clone ( ) ,
597
+ query_params. sdk_type . clone ( ) ,
598
+ orchestration_id. clone ( ) ,
581
599
bridge_chain_id. clone ( ) ,
582
600
bridge_contract. to_string ( ) ,
583
601
bridge_token_symbol. clone ( ) ,
@@ -595,6 +613,9 @@ async fn handler_internal(
595
613
region,
596
614
country,
597
615
continent,
616
+ query_params. sdk_version ,
617
+ query_params. sdk_type ,
618
+ orchestration_id. clone ( ) ,
598
619
from_address. to_string ( ) ,
599
620
to_address. to_string ( ) ,
600
621
asset_transfer_value. to_string ( ) ,
0 commit comments