move icon indicating copy to clipboard operation
move copied to clipboard

[Feature Request] Add u256 support

Open nanne007 opened this issue 3 years ago • 1 comments

🚀 Feature Request

Support u256 primitive type. May also consider u16, u32, and signed integer type like i8, i16, i32 , i64, i128, i256.

A similar discussion exists in diem repo https://github.com/diem/diem/issues/8504

Motivation

Is your feature request related to a problem? Please describe. u256 are common used in solidity. Lack of u256 cause many problems when bridging asset or protocol into Move contracts.

And since Move doesn't float types, we need a large integer type to simulate float calculation for u128.

Pitch

A builtin support for u256 is what I'm expecting for.

alternative is using native structs, but it's tedious.

Additional context

nanne007 avatar Feb 25 '22 06:02 nanne007

The starcoin-framework implements U256 in Move by the native method. But we still expect the primitive u256.

jolestar avatar Mar 03 '22 03:03 jolestar