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

type generation for launchpad code #1001

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

Kevin101Zhang
Copy link
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 as a code owner August 8, 2024 21:23
@@ -45,6 +53,30 @@ const fetchWizardData = (req: string): Promise<WizardResponse> => {
return request<WizardResponse>('launchpad-create-indexer', req);
};

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

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
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
Collaborator

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.

frontend/src/components/Editor/EditorComponents/Editor.tsx Outdated Show resolved Hide resolved
@Kevin101Zhang Kevin101Zhang merged commit e759080 into main Aug 12, 2024
4 checks passed
@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