Skip to content
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

[DevEx] Code gen - WIP #168

Draft
wants to merge 47 commits into
base: main
Choose a base branch
from
Draft

[DevEx] Code gen - WIP #168

wants to merge 47 commits into from

Conversation

xbtmatt
Copy link
Contributor

@xbtmatt xbtmatt commented Nov 3, 2023

Description

Probably needs its own repo at this point, but there are two big things here:

  1. ABI Code Gen
  2. New transaction builder flow with classes

ABI Code Gen

  • Argument names
  • Generated entry function payloads
  • Separate into different files
  • Separate into different folders for each module address
  • Separate with namespaces
  • Add ability to provide named address with config.yaml
  • Export all generated code under namespaces in generated/index.ts
  • [ ]More config.yaml options
  • Add generated typescript doc comments
  • Support scripts

Transaction Builder

  • Fix assumptions around feepayer, need to set withFeePayer on instantiation
  • Add MultiAgent support for transaction builder
  • Couple the builder with ABI gen

TODO:

  • Move typeTags out of external class arg types
  • Move typeTags out of this.args and put a line below this.typeArgs = ...map()
  • Change the input type for Option<T> to be undefined, null, or T instead of T | [T] or just all..?
  • smart imports/exports. get rid of unused ones
  • named addresses in typescript folder, rather than hardcoded module address in classes. That way it's easy to update the contract address once code has been generated

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

Successfully merging this pull request may close these issues.

1 participant