Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 6c9f643

Browse files
committed
fmt
1 parent 959b202 commit 6c9f643

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

src/transaction/l1_handler.rs

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,7 @@ impl L1Handler {
200200
}
201201

202202
/// Creates a L1Handler for simulation purposes.
203-
pub fn create_for_simulation(
204-
&self,
205-
skip_validate: bool,
206-
skip_execute: bool,
207-
) -> Transaction {
203+
pub fn create_for_simulation(&self, skip_validate: bool, skip_execute: bool) -> Transaction {
208204
let tx = L1Handler {
209205
skip_validate,
210206
skip_execute,
@@ -221,20 +217,17 @@ impl L1Handler {
221217
paid_fee_on_l1: Option<Felt252>,
222218
) -> Result<Self, TransactionError> {
223219
L1Handler::new_with_tx_hash(
224-
Address(Felt252::from_bytes_be(
225-
tx.contract_address.0.key().bytes(),
226-
)),
227-
Felt252::from_bytes_be(
228-
tx.entry_point_selector.0.bytes()),
220+
Address(Felt252::from_bytes_be(tx.contract_address.0.key().bytes())),
221+
Felt252::from_bytes_be(tx.entry_point_selector.0.bytes()),
229222
tx.calldata
230-
.0
231-
.as_ref()
232-
.iter()
233-
.map(|f| Felt252::from_bytes_be(f.bytes()))
234-
.collect(),
235-
Felt252::from_bytes_be(tx.nonce.0.bytes()),
236-
paid_fee_on_l1,
237-
tx_hash
223+
.0
224+
.as_ref()
225+
.iter()
226+
.map(|f| Felt252::from_bytes_be(f.bytes()))
227+
.collect(),
228+
Felt252::from_bytes_be(tx.nonce.0.bytes()),
229+
paid_fee_on_l1,
230+
tx_hash,
238231
)
239232
}
240233
}

0 commit comments

Comments
 (0)