diem / diem/move

[Feature Request] Add u256 support

Open
#80 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
378
Forks
137
PR merge metrics
No merged PRs in 30d

Description

# 🚀 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

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. Start by tracing the Move primitive-type and compiler paths, then review the linked Diem discussion; done means the requested u256 builtin is supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, solidity
Domain
blockchain, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.