Closed leighmcculloch closed 2 years ago
I'm fine with moving away from U256/U512, although I do like the brevity of them. But my recollection from writing the token contract (which was a while ago at this point) was that one of the macros, possibly contractimpl
, was broken by the generics. Obviously things have changed a lot since then and my memory could be wrong, but we should just confirm that it actually works now.
FixedBinary<...>
/BytesN<...>
should work now. I think I fixed that issue following your report.
We intend the
BigInt
type would be used instead ofu128
,u256
, etc integer types. The examples (and token contract) use the termU256
to refer to 32 byte arrays, which is confusing because these are not integer types and can't be used as such.This has created some confusion.
We should reserve
uN
terms for integer types, and useBytesN<...>
(orFixedBinary<...>
in the current released SDK) for fixed bytes.Related discussion: https://discord.com/channels/897514728459468821/966788672164855829/1007336560506699806