Christian Kamm
0349ace3b6
Downgrade the `fixed` crate to v1.11.0 ( #500 )
2023-03-12 08:50:42 +01:00
Christian Kamm
5c7a2e3e10
Use the overflow-checks=true equivalent with the fixed crate ( #476 )
...
* Vendor `fixed` crate to have checked math in release mode
* remove all cm!()
* drop superfluous parens
* drop use of checked_math crate
* manual removal of redundant checked_* functions
2023-02-24 11:56:33 +01:00
Christian Kamm
7b9e19cc08
Organize paths, rename crates ( #466 )
...
liquidator, keeper, cli and settle-bot moved to bin/
client moved to lib/client
All crates have a "mango-v4-" prefix
2023-02-20 14:08:38 +01:00
Christian Kamm
79a7bdc299
Checked math: support cm!(a += b)
2022-09-06 08:55:27 +02:00
Christian Kamm
7a343a9a8d
checked_math: support casts and I80F48::from
2022-08-14 15:01:15 +02:00
Christian Kamm
449fe4dc6d
Add checked_math library for convenient overflow checking
...
Instead of
x.checked_add(y).ok_or(error!(MangoError::MathError))?
we can write
cm!(x + y)
2022-03-13 15:45:50 +01:00