Skip to content

Commit

Permalink
Update calldata scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
delaaxe committed Jun 7, 2024
1 parent c7b8e5e commit e48a2d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions examples/starknet/calldata copy

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions examples/starknet/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cairo_proof_parser::parse;
use itertools::{chain, Itertools};
use itertools::chain;
use runner::VecFelt252;
use std::io::{stdin, Read};

Expand All @@ -20,16 +20,18 @@ fn main() -> anyhow::Result<()> {
public_input.into_iter(),
unsent_commitment.into_iter(),
witness.into_iter()
)
.collect_vec();
);

let proof_string = proof
.iter()
let cairo_version = 0; // TODO: pass as argument

let calldata = chain!(proof, vec![cairo_version.into()].into_iter());

let calldata_string = calldata
.map(|f| f.to_string())
.collect::<Vec<String>>()
.join(" ");

println!("{}", proof_string);
println!("{}", calldata_string);

Ok(())
}

0 comments on commit e48a2d0

Please sign in to comment.