-
Notifications
You must be signed in to change notification settings - Fork 11
Add extra front-end types and make MainPodBuilder emit these #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
fac4ee7
a83da21
2b7ad67
6ee329e
7ca92d0
675fde5
64818a7
81dc917
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,11 +3,11 @@ use std::sync::Arc; | |||||
| use anyhow::Result; | ||||||
|
|
||||||
| use crate::{ | ||||||
| frontend::{literal, CustomPredicateBatchBuilder, StatementTmplBuilder}, | ||||||
| middleware::{ | ||||||
| CustomPredicateBatch, CustomPredicateRef, NativePredicate, Params, PodType, Predicate, | ||||||
| KEY_SIGNER, KEY_TYPE, | ||||||
| frontend::{ | ||||||
| literal, CustomPredicateBatch, CustomPredicateBatchBuilder, CustomPredicateRef, | ||||||
| NativePredicate, Predicate, StatementTmplBuilder, Value, | ||||||
| }, | ||||||
| middleware::{self, Params, PodType, KEY_SIGNER, KEY_TYPE}, | ||||||
| }; | ||||||
|
|
||||||
| use NativePredicate as NP; | ||||||
|
|
@@ -27,7 +27,7 @@ pub fn eth_friend_batch(params: &Params) -> Result<Arc<CustomPredicateBatch>> { | |||||
| // there is an attestation pod that's a SignedPod | ||||||
| STB::new(NP::ValueOf) | ||||||
| .arg(("attestation_pod", literal(KEY_TYPE))) | ||||||
| .arg(PodType::MockSigned), // TODO | ||||||
| .arg(Value::from(middleware::Value::from(PodType::MockSigned))), // TODO | ||||||
|
||||||
| .arg(Value::from(middleware::Value::from(PodType::MockSigned))), // TODO | |
| .arg(middleware::Value::from(PodType::MockSigned)), // TODO |
This also works, and it's a bit shorter.
But I agree with @ax0 that maybe the From implementations between types of the same name in frontend and middleware may be making the code harder to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll explore enriching the middleware types with "metadata" so that we can avoid duplicating so many types in the frontend. #171
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These
Valuetype conversions are getting out of hand.