Skip to content

type generation for launchpad code - #1001

Merged
Kevin101Zhang merged 7 commits into
mainfrom
1000-type-generation-for-launchpad-code
Aug 12, 2024
Merged

Kevin101Zhang merged 7 commits into
mainfrom
1000-type-generation-for-launchpad-code

Conversation

@Kevin101Zhang

Copy link
Copy Markdown
Contributor

types are now generated for launchpad code

@Kevin101Zhang Kevin101Zhang linked an issue Aug 8, 2024 that may be closed by this pull request
@Kevin101Zhang
Kevin101Zhang marked this pull request as ready for review August 8, 2024 21:23
@Kevin101Zhang
Kevin101Zhang requested a review from a team August 8, 2024 21:23
return request<WizardResponse>('launchpad-create-indexer', req);
};

const generateCode = async (contractFilter: string, selectedMethods: Method[], selectedEvents?: Event[]) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The function name "generateCode" has been reused multiple times and each time it does something different. Can you rename all of these instances to be more specific? No two functions should ever be the same unless they're in entirely different projects or attached to some class.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

They are all one function and reference. we have a api endpoint that includes generate code and a function that is called generate code that consumes the endpoint.

Screenshot 2024-08-09 at 4 24 43 PM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There's two definitions isn't there? One here and another here? The former being a class function and another being an inlined arrow function. I would rather you name the arrow function something unique.

Comment thread frontend/src/components/Editor/EditorComponents/Editor.tsx Outdated
@Kevin101Zhang
Kevin101Zhang merged commit e759080 into main Aug 12, 2024
@Kevin101Zhang
Kevin101Zhang deleted the 1000-type-generation-for-launchpad-code branch August 12, 2024 18:07
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.

type generation for launchpad Code

2 participants