RGB-WG / rust-rgb20

RGB20 fungible asset schema

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RGB20: introduce dedicated type for decimal precision

dr-orlovsky opened this issue · comments

Hi, there are some ghideline about this issue?

It should be a wrapper type around amplify::num::u5, but it also should control that the value is never getting above 18 (since 5-bit may allow range 0..=23 and we need 0..=18). The type should be Deref into u8 and should have TryFrom convertors for u5, u8, usize that check that boundary.

Well, you can make it a wrapper not around u5 but normal u8 since you have to control the range anyway...

Ok, I will give a try this week

Hi, i can't build the project, I send the compiler error in a file.
errror_rgb_core.txt