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

Add cleaning of substrings of require messages from parsed construc… #4764

Merged
merged 1 commit into from
Oct 18, 2021

Conversation

nikitosing
Copy link
Member

@nikitosing nikitosing commented Oct 13, 2021

…tor arguments

Close #4758

Motivation

In some cases in parsed constructor arguments appear some strings which are substring of messages used in required statements in constructor. As in linked issue:
Parsed constructor arguments: 596f75206e65656420746f2070726f7669646520616e2061637475616c204372{constructor_args_itself}

>>> web3.Web3.toText('596f75206e65656420746f2070726f7669646520616e2061637475616c204372')
'You need to provide an actual Cr' 

Require messages:
596f75206e65656420746f2070726f7669646520616e2061637475616c2043727970746f7374616d7020332e3120636f6e74726163742e =>
You need to provide an actual Cryptostamp 3.1 contract.
596f75206e65656420746f2070726f7669646520616e2061637475616c2043727970746f7374616d7020332e312050726573616c6520636f6e74726163742e =>
You need to provide an actual Cryptostamp 3.1 Presale contract.

Changelog

Bug Fixes

  • Added deleting such strings from parsed constructor arguments in order to make verification possible at such cases

Checklist for your Pull Request (PR)

@vbaranov vbaranov merged commit 99d58ac into master Oct 18, 2021
@vbaranov vbaranov deleted the np-fix-constructor-args-bug branch October 18, 2021 06:54
sidhujag pushed a commit to syscoin/blockscout that referenced this pull request Oct 18, 2021
…-args-bug

Add cleaning of substrings of `require` messages from parsed construc…
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.

Constructor arguments do not match, please try again.
2 participants