feat: custom predicates in frontend statement and operation types (#97)

* Modify frontend statement type

* Modify frontend operation type

* Add exception to typos.toml
This commit is contained in:
Ahmad Afuni 2025-02-28 22:03:44 +10:00 committed by GitHub
parent bcfad307e7
commit 7373b959f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 168 additions and 125 deletions

View file

@ -7,7 +7,7 @@ use std::fmt;
use crate::middleware::{
self, hash_str, AnchoredKey, Hash, MainPodInputs, NativeOperation, NativePredicate, NonePod,
Params, Pod, PodId, PodProver, StatementArg, ToFields, KEY_TYPE, SELF,
OperationType, Params, Pod, PodId, PodProver, StatementArg, ToFields, KEY_TYPE, SELF,
};
mod operation;
@ -261,7 +261,11 @@ impl MockMainPod {
.map(|mid_arg| Self::find_op_arg(statements, mid_arg))
.collect::<Result<Vec<_>>>()?;
Self::pad_operation_args(params, &mut args);
operations.push(Operation(op.code(), args));
let op_code = match op.code() {
OperationType::Native(code) => code,
_ => unimplemented!(),
};
operations.push(Operation(op_code, args));
}
Ok(operations)
}