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

abigen: create output type for structured contract functions #30578

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joey1123455
Copy link

@joey1123455 joey1123455 commented Oct 12, 2024

Enhance abigen to Generate Output Types for Contract Functions

Description

Issue #29689

Current limitations:

  • It does not create separate output types for contract functions
  • This makes it challenging to use the generated bindings in a generic way across different projects

Proposed enhancements:

  1. Generate dedicated structs for each function's return type
  2. Export these structs in the generated package

Example before:

func SomeFunction() (struct{ Field1 int, Field2 string }, error)

Example after:

type SomeFunctionOutput struct {
    Field1 int
    Field2 string
}

func SomeFunction() (SomeFunctionOutput, error)

@joey1123455
Copy link
Author

@gballet hello, I'm waiting on a review for this pull request

@joey1123455
Copy link
Author

@MariusVanDerWijden hello, could you please review my pull request

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

Successfully merging this pull request may close these issues.

2 participants