mirror of
https://github.com/arnaucube/circom-compat.git
synced 2026-01-09 15:31:31 +01:00
Bump to latest Ethers (#26)
* chore: bump ethers
* fix: adjust ethers breaking changes
1. Use the abigen'd ::deploy methods
2. Use Anvil instead of Ganache
* silence warning
* fix: replace abi with full verifier artifact
* ci: use anvil instead of the node stack
* chore: remove ethers-solc
* fix: return error instead of raise
17c0834abf
this api got deprecated and would panic instead of generating an error that can behandled
* lints
* minimfy json
This commit is contained in:
committed by
GitHub
parent
8f6fcaf40b
commit
06eb0759e0
@@ -13,7 +13,7 @@ pub struct CircomCircuit<E: PairingEngine> {
|
||||
pub witness: Option<Vec<E::Fr>>,
|
||||
}
|
||||
|
||||
impl<'a, E: PairingEngine> CircomCircuit<E> {
|
||||
impl<E: PairingEngine> CircomCircuit<E> {
|
||||
pub fn get_public_inputs(&self) -> Option<Vec<E::Fr>> {
|
||||
match &self.witness {
|
||||
None => None,
|
||||
|
||||
@@ -307,14 +307,14 @@ mod runtime {
|
||||
pub fn error(store: &Store) -> Function {
|
||||
#[allow(unused)]
|
||||
#[allow(clippy::many_single_char_names)]
|
||||
fn func(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) {
|
||||
fn func(a: i32, b: i32, c: i32, d: i32, e: i32, f: i32) -> Result<(), RuntimeError> {
|
||||
// NOTE: We can also get more information why it is failing, see p2str etc here:
|
||||
// https://github.com/iden3/circom_runtime/blob/master/js/witness_calculator.js#L52-L64
|
||||
println!(
|
||||
"runtime error, exiting early: {0} {1} {2} {3} {4} {5}",
|
||||
a, b, c, d, e, f
|
||||
);
|
||||
RuntimeError::raise(Box::new(ExitCode(1)));
|
||||
Err(RuntimeError::user(Box::new(ExitCode(1))))
|
||||
}
|
||||
Function::new_native(store, func)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user