Skip to content

Commit 6d4dc14

Browse files
Add format lints
1 parent 03251d3 commit 6d4dc14

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

wasm/src/programs/manager/deploy.rs

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,23 @@
1616

1717
use super::*;
1818

19-
use crate::{OfflineQuery, PrivateKey, RecordPlaintext, Transaction, execute_fee, log};
20-
use crate::types::native::{
21-
CurrentAleo,
22-
CurrentNetwork,
23-
ProcessNative,
24-
ProgramIDNative,
25-
ProgramNative,
26-
ProgramOwnerNative,
27-
RecordPlaintextNative,
28-
TransactionNative,
19+
use crate::{
20+
OfflineQuery,
21+
PrivateKey,
22+
RecordPlaintext,
23+
Transaction,
24+
execute_fee,
25+
log,
26+
types::native::{
27+
CurrentAleo,
28+
CurrentNetwork,
29+
ProcessNative,
30+
ProgramIDNative,
31+
ProgramNative,
32+
ProgramOwnerNative,
33+
RecordPlaintextNative,
34+
TransactionNative,
35+
},
2936
};
3037
use snarkvm_algorithms::snark::varuna::VarunaVersion;
3138

wasm/src/programs/manager/execute.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ use crate::{
3939
use snarkvm_algorithms::snark::varuna::VarunaVersion;
4040
use snarkvm_console::network::{ConsensusVersion, Network};
4141
use snarkvm_ledger_query::QueryTrait;
42-
use snarkvm_synthesizer::{prelude::cost_in_microcredits_v1};
42+
use snarkvm_synthesizer::prelude::cost_in_microcredits_v1;
4343

4444
use core::ops::Add;
4545
use js_sys::{Array, Object};
@@ -115,7 +115,8 @@ impl ProgramManager {
115115

116116
log("Proving execution");
117117
let locator = program_native.id().to_string().add("/").add(function);
118-
let execution = trace.prove_execution::<CurrentAleo, _>(&locator, VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
118+
let execution =
119+
trace.prove_execution::<CurrentAleo, _>(&locator, VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
119120
ExecutionResponse::new(Some(execution), function, response, process, program)?
120121
} else {
121122
ExecutionResponse::new(None, function, response, process, program)?
@@ -300,7 +301,8 @@ impl ProgramManager {
300301
trace.prepare_async(query).await.map_err(|err| err.to_string())?;
301302
block_height
302303
};
303-
let execution = trace.prove_execution::<CurrentAleo, _>(&locator, VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
304+
let execution =
305+
trace.prove_execution::<CurrentAleo, _>(&locator, VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
304306

305307
// Get the storage cost in bytes for the program execution
306308
log("Estimating cost");

wasm/src/programs/manager/join.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ impl ProgramManager {
127127
}
128128

129129
log("Proving the join execution");
130-
let execution = trace.prove_execution::<CurrentAleo, _>("credits.aleo/join", VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
130+
let execution = trace
131+
.prove_execution::<CurrentAleo, _>("credits.aleo/join", VarunaVersion::V2, rng)
132+
.map_err(|e| e.to_string())?;
131133
let execution_id = execution.to_execution_id().map_err(|e| e.to_string())?;
132134

133135
log("Verifying the join execution");

wasm/src/programs/manager/split.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ use crate::{
2626
process_inputs,
2727
types::native::{CurrentAleo, IdentifierNative, ProcessNative, ProgramNative, TransactionNative},
2828
};
29-
use snarkvm_algorithms::snark::varuna::VarunaVersion;
3029
use js_sys::Array;
3130
use rand::{SeedableRng, rngs::StdRng};
31+
use snarkvm_algorithms::snark::varuna::VarunaVersion;
3232
use std::{ops::Add, str::FromStr};
3333

3434
#[wasm_bindgen]
@@ -89,8 +89,9 @@ impl ProgramManager {
8989
}
9090

9191
log("Proving the split execution");
92-
let execution =
93-
trace.prove_execution::<CurrentAleo, _>("credits.aleo/split", VarunaVersion::V2, rng).map_err(|e| e.to_string())?;
92+
let execution = trace
93+
.prove_execution::<CurrentAleo, _>("credits.aleo/split", VarunaVersion::V2, rng)
94+
.map_err(|e| e.to_string())?;
9495

9596
log("Verifying the split execution");
9697
process.verify_execution(VarunaVersion::V2, &execution).map_err(|err| err.to_string())?;

0 commit comments

Comments
 (0)