uuosio / ascdk

MIT License
12 stars 9 forks source link

u256 hex issue #75

Closed jafri closed 2 years ago

jafri commented 2 years ago
        print(U256.fromU64(90).toString(16))
        print((90).toString(16))

first one prints 55 second one prints 5a

correct hex is 5a

learnforpractice commented 2 years ago

There is a problem with U256 converting to hex string.

https://github.com/uuosio/ascdk/blob/64169f2d21e1330dc65fd319cf2d5797640f284b/as-packages/chain/assembly/bignum/integer/u256.ts#L662