Skip to content

fix: remove tx value range check in non-strict mode#40

Merged
paulmillr merged 1 commit into
paulmillr:mainfrom
lgiussan:fix-tx-value-validation
Sep 27, 2025
Merged

fix: remove tx value range check in non-strict mode#40
paulmillr merged 1 commit into
paulmillr:mainfrom
lgiussan:fix-tx-value-validation

Conversation

@lgiussan
Copy link
Copy Markdown
Contributor

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 of 1M, as defined here.

@paulmillr
Copy link
Copy Markdown
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.

@lgiussan
Copy link
Copy Markdown
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.

@paulmillr paulmillr merged commit 87e6757 into paulmillr:main Sep 27, 2025
6 checks passed
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