-
Notifications
You must be signed in to change notification settings - Fork 132
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
Check Expr
length when converting to abi.Address
#414
Comments
I guess we may also want to verify at runtime the transaction types are accurate? |
@jasonpaulos @barnjamin would be good also to generate checks that |
Yes, this is even more important. edit: #427
We do this one correctly! Line 74 in 9edc6f5
Though I wonder if it would be more consistent with the rest of the AVM to convert values greater than 1 to 1. This is how the |
fixed by #432 |
Right now
abi.Address.set
called with anExpr
argument does not verify at runtime that the length of the argument is in fact 32 bytes:pyteal/pyteal/ast/abi/address.py
Line 98 in 9edc6f5
Without this verification, it's possible for the address variable to contain an invalid value.
There is some precedent for verifying this constraint, namely the checks that occur in
abi.Uint.set
when called with anExpr
:pyteal/pyteal/ast/abi/uint.py
Line 244 in 9edc6f5
The text was updated successfully, but these errors were encountered: