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 for write contract functionality: false and 0 boolean inputs are parsed as true #3785

Merged
merged 1 commit into from
Apr 8, 2021

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Apr 8, 2021

Resolves #3751

Motivation

Write contract functionality: false and 0 boolean inputs are parsed as true

https://discord.com/channels/502416149343109121/502432256011272195/829043557390221372

I believe there's an issue with blockscout where when calling a function that accepts a boolean value, whether I put "true", "false", "1" or "0" it always converts to true. You can see in this screenshot the data created should have 0 at the end for false but it has 1 no matter what I input in the boolean field.

For reference this was the contract: https://blockscout.com/poa/xdai/address/0xfBd0B2726070a9D6AfF6D7216c9E9340Eae68b2a/write-proxy

Changelog

Enhancements

Things you added that don't break anything. Regression tests for Bug Fixes count as Enhancements.

Bug Fixes

Things you changed that fix bugs. If a fixes a bug, but in so doing adds a new requirement, removes code, or requires a database reset and reindex, the breaking part of the change should be added to Incompatible Changes below also.

Incompatible Changes

Things you broke while doing Enhancements and Bug Fixes. Breaking changes include (1) adding new requirements and (2) removing code. Renaming counts as (2) because a rename is a removal followed by an add.

Upgrading

If you have any Incompatible Changes in the above Changelog, outline how users of prior versions can upgrade once this PR lands or when reviewers are testing locally. A common upgrading step is "Database reset and re-index required".

Checklist for your Pull Request (PR)

@vbaranov vbaranov force-pushed the vb-write-contract-fix-boolean-input branch from 1803422 to 9afd76c Compare April 8, 2021 14:49
@vbaranov vbaranov force-pushed the vb-write-contract-fix-boolean-input branch from 9afd76c to 184fa32 Compare April 8, 2021 15:37
@vbaranov vbaranov merged commit 960483f into master Apr 8, 2021
@vbaranov vbaranov deleted the vb-write-contract-fix-boolean-input branch April 8, 2021 16:13
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.

Mumbai: Function called with incorrect boolean argument value
1 participant