-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
instead of using unwrap you should prefer to use the anyhow crate and have something like (notice the ?):
fn main() -> Result<(), anyhow::Error> {
// ...
let input_deposit: DepositInput =
serde_json::from_str(input_json_data)?;
let cfg = CircomConfig::<Bn254>::new(
"./circuits/withdraw_js/withdraw.wasm",
"./circuits/withdraw.r1cs",
)?;
// Insert our public inputs as key value pairs
let mut builder = CircomBuilder::new(cfg);
builder.push_input(
"root",
BigInt::parse_bytes(input_deposit.root.as_bytes(), 10)?,
);
builder.push_input(
"nullifierHash",
BigInt::parse_bytes(input_deposit.nullifier_hash.as_bytes(), 10)?,
);
// ...
}Metadata
Metadata
Assignees
Labels
No labels