-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Problem
Currently Uint256 cannot be constructed directly from a bytes<32>. This means you must go from bytes<32> -> biguint -> Uint256. This works, but it increases opcode cost due to the usage of b| because we loose the length information when going to biguint. For example, here is the diff of the TEAL when switching a type from bytes<32> to Uint256:
Part of them problem here is also that the compiler does not seem to know the length of the output of bzero, which is should when the argument is a constant.
Solution
No response
Proposal
Allow a bytes<32> to be passed to the ctor of Uint256. This also applies to all other UintN types
Pros & Cons
No response
Dependencies
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels