Skip to content

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

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

Conversation

0xrusowsky
Copy link

reimplements forge eip712 using solar

motivation:

to-do

  • reimplement eip712 using solar
  • integrate with forge bind-json


for (idx, field_id) in def.fields.iter().enumerate() {
let field = self.hir.variable(*field_id);
let ty = self.resolve_type(&field.ty, subtypes)?;
Copy link
Member

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

Copy link
Author

@0xrusowsky 0xrusowsky May 14, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants