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

chore: add --encoded-constructor-args to verify-contract as alias for --constructor-args #6454

Merged

Conversation

Leechael
Copy link
Contributor

Related: #6453

@DaniPopes
Copy link
Member

I dont think the two commands' flags are the same even if they have the same name

@Leechael
Copy link
Contributor Author

So what you purpose for? Considering:

forge verify-contract  --constructor-args a b c

vs:

forge verify-contract --constructor-args a --constructor-args b --constructor-args c

Related previous PR: #622

Why does the behavior of --constructor-args differ between create and verify-contract when submitting a contract with multiple constructor arguments?

@DaniPopes
Copy link
Member

verify-contract accepts the already-encoded arguments in one hex string, while script accepts the human-readable form that you would use anywhere else, so I'd rather change the verify-contract behavior.

@Leechael
Copy link
Contributor Author

verify-contract accepts the already-encoded arguments in one hex string

Is it better to change the argument name to be more explicit? e.g. --encoded-contructor-args

@Evalir
Copy link
Member

Evalir commented Nov 29, 2023

@Leechael changing them would be a breaking change and we'd rather avoid this—but we can add an alias and recommend that instead. wdyt @DaniPopes / @mattsse ?

@Leechael
Copy link
Contributor Author

Leechael commented Dec 2, 2023

If we can reach a conclusion, I would like to follow the decision and making that change.

@Evalir
Copy link
Member

Evalir commented Dec 7, 2023

@Leechael I believe the way forward is just add an alias to --constructor-args, called --encoded-constructor-args for verify-contract.

@Evalir Evalir changed the title fix forge verify-contract argument parsing chore: add --encoded-constructor-args to verify-contract as alias for --constructor-args Dec 14, 2023
@Evalir
Copy link
Member

Evalir commented Dec 14, 2023

hey @Leechael—added the change I described and changed the PR name—thanks!

@Evalir Evalir merged commit 6fcbbd8 into foundry-rs:master Dec 14, 2023
19 checks passed
@Leechael Leechael deleted the fix-construct-args-behavior-not-consistent branch December 14, 2023 19:58
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.

3 participants