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

fix: Type bug with encodeDeployData #2370

Closed
wants to merge 1 commit into from
Closed

Conversation

roninjin10
Copy link
Contributor

@roninjin10 roninjin10 commented Jun 4, 2024

encodeDeployData should work for contracts that do not have constructors too

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgUwHYGMIBNkBFlgA2EAnrgIYzlwC+cAZlBCHAOQBuwyIrAUKJFiIw5KAGdkAQQBGwOo2ZtysmCTDI+vAPRa4MABbAxcTKhhRy6ePvLHUEExFRjzAVyvQAhL1MuAkPquIOSoAErI5FjKhFKycAC8cADarPSuGDDATibkhOiuhJTIABSuwGYATACsAGxwqACUcGCuUMhwbTCtznCl5TDVNQ2sALpwto7OMD5OLnDSJDDImDgJvH5+rAAMAB41WwAcW-sALFtVFQDMJ0cAjLW3W0-0VQDsVfRH9FhV0lXHjwqFSwRxqjy2tx+9EuAE4PtD6Mh9qCtmcLtc7g8nlsXu9Pjifn9jk8TpcwQCnhU4XjLrUtsgIehQZdpDCsDDgcgDrcTuStsC3r8Pl9CXyTq99qijmStpduRCYRTUVTboq+d9ar8+VUfjUtajzrdtScYaqKbdLu89dJToajqbZYroUL8QcKrK+TUfnjFf8+eh7tbJbc3R7wa9kG9g76lQHNX98dHzud6JKqcnfgcbrcc3zpORBZ8Klm+TDkKa1Y9bq9db8Y26YbTDlsOf9-kdQeDpOnybdpOdraa20qDgXre2W9UM+dWWa2+P8RqE9yYxWM0HwVgmUbwegx5mc7zwUjCyKhQOXdzaTH1a9uXysLTByrh-GPvt3W6s7LbhVA1XfyjACdyedA9XHBNe1uT4bmLf4QPpOFB3uZMOSHdctSrS4QwQvd4zdC5XwXD9DndOdzROAtPkuCESyrODn3Q+dfleegTmQG5XmkV5wWxPj+IEwShOEkSng+C59lzEkJP5E54UJd8qwOO8Kn9fdZz9KsOQOMld3U1tSNDciOz-HMsVucgCwlKtyBhXtmL+VkXwwyCq3zN01PjdDWPoXy-P8gLAqC4KQtCkLQ10iFliAqKbSrBz9VosjV3I2pEXIVTeRhV5jhqV5aTdP8gWOGFLKJP5IgqaR0EjPs8vIGppG+GjaVed13Tkm1FWqcsMqzNl0G+LBHy5KIgXQMlxTJVMwOuGinm5HLZUuVgABpeBmKY4CiKgEhQDBsDwAhiDIShyGKBB1mUYAAC5mlECQZGAYpAmCMIIiiaQYiehp1r8BYlhWZB1poBogA


PR-Codex overview

This PR updates the encodeDeployData.ts file in the utils/abi directory to modify the type definition for args and EncodeDeployDataReturnType.

Detailed summary

  • Updated args type definition to require allArgs
  • Modified EncodeDeployDataReturnType to be of type Hex

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Jun 4, 2024

⚠️ No Changeset found

Latest commit: 6ae7c24

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jun 4, 2024

@roninjin10 is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@@ -35,8 +35,7 @@ export type EncodeDeployDataParameters<
readonly [] extends allArgs
? { args?: allArgs | undefined }
: { args: allArgs }
> &
(hasConstructor extends true ? unknown : never)
>
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also updated the implementation to still not allow no constructor and args

@roninjin10
Copy link
Contributor Author

closed in favor of #2374

@roninjin10 roninjin10 closed this Jun 7, 2024
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.

2 participants