From 8f96b8f6b834d2bcc9301c94f73c76758643195a Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 11 Dec 2023 13:24:21 -0700 Subject: [PATCH] rework funcs --- src/storage_proofs.rs | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/storage_proofs.rs b/src/storage_proofs.rs index db7959c..54c4a0c 100644 --- a/src/storage_proofs.rs +++ b/src/storage_proofs.rs @@ -145,7 +145,8 @@ impl StorageProofs { rmpv::Value::String(s) => { // directly add a (name,string) arg pair // ie, "path" => "/some/file/path" - builder.push_input(name, decode_u256(val)?); + let s = s.clone().into_bytes(); + s.iter().for_each(|c| builder.push_input(name, *c)); } rmpv::Value::Ext(_, _) => { // directly add a (name,u256) arg pair @@ -155,21 +156,6 @@ impl StorageProofs { } } - // vec of vecs is flattened, since wasm expects a contiguous array in memory - - // chunks.iter().for_each(|c| builder.push_input("chunks", *c)); - - // siblings - // .iter() - // .for_each(|c| builder.push_input("siblings", *c)); - - // hashes.iter().for_each(|c| builder.push_input("hashes", *c)); - - // path.iter().for_each(|c| builder.push_input("path", *c)); - - // builder.push_input("root", root); - // builder.push_input("salt", salt); - let circuit: CircomCircuit> = builder.build() .map_err(|e| e.to_string())?;