mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-12 07:41:04 +00:00
Add rustfmt.toml from substrate repo (#161)
* Add rustfmt.toml from substrate repo * Apply rustfmt to code base * Fix formatting * Move rustfmt job to the top
This commit is contained in:
committed by
GitHub
parent
77ad07e347
commit
a0b548b37d
+5
-5
@@ -7,15 +7,15 @@ fn main() {
|
||||
let args = env::args().collect::<Vec<_>>();
|
||||
if args.len() != 3 {
|
||||
println!("Usage: {} input_file.wasm output_file.wasm", args[0]);
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
// Loading module
|
||||
let module = parity_wasm::deserialize_file(&args[1]).expect("Module deserialization to succeed");
|
||||
let module =
|
||||
parity_wasm::deserialize_file(&args[1]).expect("Module deserialization to succeed");
|
||||
|
||||
let result = utils::inject_gas_counter(
|
||||
module, &utils::rules::Set::default(), "env"
|
||||
).expect("Failed to inject gas. Some forbidden opcodes?");
|
||||
let result = utils::inject_gas_counter(module, &utils::rules::Set::default(), "env")
|
||||
.expect("Failed to inject gas. Some forbidden opcodes?");
|
||||
|
||||
parity_wasm::serialize_to_file(&args[2], result).expect("Module serialization to succeed")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user