-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(forge): eip712 with solar #10510
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
base: master
Are you sure you want to change the base?
Conversation
|
||
for (idx, field_id) in def.fields.iter().enumerate() { | ||
let field = self.hir.variable(*field_id); | ||
let ty = self.resolve_type(&field.ty, subtypes)?; |
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.
this is just gcx.type_of_item, type resolution is implemented in solar obviously
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.
this is just gcx.type_of_item, type resolution is implemented in solar obviously
but in this usecase resolving the type requires its custom logic:
- enums -->
uint8
- contracts -->
address
- structs --> unique name based with the "counter" suffix
- mappings, fns, errors --> not supported by EIP-712 (returns
None
)
wouldn't i still need to manually do a match and resolve the names even if i used gcx.type_of_item
?
reimplements
forge eip712
using solarmotivation:
to-do
forge bind-json