-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat(eas-form): auto generate form from eas schema #67
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: draft
Are you sure you want to change the base?
feat(eas-form): auto generate form from eas schema #67
Conversation
|
@@ -110,23 +114,25 @@ const createArgs = (schema: any, chain: Chain, fixture: any) => { | |||
// TODO chain control at withWalletControlWagmi | |||
|
|||
export const AttestationWagmiOffchain: Story = { | |||
// @ts-expect-error withMockAccount() decorator should inject an account. |
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.
(lets create extra stories and keep as is)
const entries = stringPairs.map((pair) => pair.split(" ")); | ||
const zodSchemaObject: any = {}; | ||
|
||
for (const entry of entries) { |
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.
EAS parse the schema (base on ABI syntax)
you can refer to (our) implementation at SchemaEncoder constructor to which prase the schmeaString to schema object (then see if we are able to create zod schema from it)
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.
added some comments
Fixes #56