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:
Georgios Konstantopoulos
2022-08-29 15:06:27 -07:00
committed by GitHub
parent 8f6fcaf40b
commit 06eb0759e0
8 changed files with 1222 additions and 905 deletions

View File

@@ -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,

View File

@@ -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)
}