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

[Feature] Enumerate registers for top level inputs & parameter names for nested structs #682

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

iamalwaysuncomfortable
Copy link
Collaborator

Motivation

For both a Struct or Record type, its concrete type is its name. However, if a struct is a parameter of a record or another struct, its parameter name is defined in the enclosing struct or record.

In order to create automatically generated Input forms, the input name of the variable needs to be included. This PR changes the "name" field of nested structs from the struct type to the parameter "name". It also adds a field to identify the concrete struct.

Test Plan

Tests of the correct serialization accompany this struct.

…nputs in getProgramInputs and getRecord functions
Copy link
Collaborator

@onetrickwolf onetrickwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it in my branch, looks like it is returning what we need 👍 🎉

@iamalwaysuncomfortable iamalwaysuncomfortable merged commit 2457570 into testnet3 Jul 27, 2023
5 checks passed
@iamalwaysuncomfortable iamalwaysuncomfortable deleted the feat/js-input-naming branch July 27, 2023 15:54
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.

[Feature] Refactor Program Inputs [Bug] getFunctionInputs needs to give register for nested inputs need
2 participants