Open Rovak opened 6 years ago
Make a DSL similar to https://github.com/typelevel/squants
Prototype: https://scalafiddle.io/sf/wU5kTG8/3
Example
val bitcoins: Bitcoin = Satoshi(500000) val satoshis: Satoshi = Bitcoin(2) Bitcoin(2) == Satoshi(200000000) val sum= Bitcoin(1) + Bitcoin(3) val wallet = Wallet("0xjk234jlk234ljk234") wallet send 1.bitcoin to "0xjkl345h43hjk2436kl"
Make a DSL similar to https://github.com/typelevel/squants
Prototype: https://scalafiddle.io/sf/wU5kTG8/3
Example