safe-num support #1025
Labels
D2-notify
Pull request can be merged and notification about changes should be documented.
I6-refactoring
Code needs refactoring.
P0-someday-maybe
Issue might be worth doing someday.
Q1-easy
Can be done by primarily duplicating and adapting code.
Which part of the code is the issue addressing?
Description
I open this issue to track the changes of safe-num repo with the intention of using into
centrifuge-chain
.As an overview, the
safe-num
aim is to allow safe arithmetic operation checks without losing readability which means, to be as close as possible to the "normal" arithmetic style while being sure all operations are checked.How will this affect the code base
centrifuge-chain
, most arithmetic calculations in the pallets will use it.The adoption could be gradual
What are forseen obstacles or hurdles to overcome?
How to allow
FixedPointNumber
to use it withFixedPointOperand
?The first idea of
safe-num
crate was to be agnostic from the framework used. But in order to enableFixedPointNumber
support, we need to implementSubstrate
traits forSafeNum
, which can only be done in thesafe-num
crate because of the orphan rule.Is a substrate feature that enables these traits implementations ok?
Pending tasks
SafeNum
SafeNum
SafeNum
FixedPointNumber
support.The text was updated successfully, but these errors were encountered: