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

[PAGE ISSUE] Lazy minting - msg.value is denominated in WEI #218

Open
morozj01 opened this issue Mar 13, 2022 · 0 comments
Open

[PAGE ISSUE] Lazy minting - msg.value is denominated in WEI #218

morozj01 opened this issue Mar 13, 2022 · 0 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@morozj01
Copy link

Noticed a mismatched in the expected unit values between the voucher.minPrice and msg.value -

voucher.minPrice is implied to be in ETH - so values like .5, 1, 10 (generally single or double digit) are assumed to be ok.

msg.value is in WEI so require(msg.value >= voucher.minPrice, "Insufficient funds to redeem"); will more or less always be true.

If you attempt to set voucher.minPrice to a value in WEI then this causes an overflow bug in most cases because 1 ETH in WEI will exceed the MAX_SAFE_INTERGER value in javascript.

@morozj01 morozj01 added the need/triage Needs initial labeling and prioritization label Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

1 participant