fix: remove tx value range check in non-strict mode#40
Merged
Conversation
Owner
|
Can you describe what removing the check allows you to accomplish? The sanity check was there because some people do bad, incorrect conversions and come up with incorrect amounts. |
Contributor
Author
|
The patch I'm proposing was necessary for doing some large transactions in the initial liquidity setup of a new EVM-compatible alt-chain with a 1B token supply (e.g. https://vflow.subscan.io/tx/0x12319d2a81f3faf76a52614bffab47f55b6dbceee77a8b0f17e727ce1eb3c700). I fully agree that this check makes sense >99.99% of the time, but it would still be nice to have the ability to opt out, which is exactly the objective of this PR. However, I would understand if you preferred to err on the safe side, and keep this check always in place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the moment, tx validation enforces an arbitrary maximum value of 1M eth for the tx value, even in non-strict validation mode.
This PR limits that check to the strict mode only. It also aligns the maximum value in the error message, currently hardcoded as
100M, with the actual value of1M, as defined here.