1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! A generic fixed point wrapper around the `U256` type from ethers-rs.
//!
//! The math in this library is a heavily based on Solidity's FixedPointMath
//! library with a few changes:
//! - The outward type of the underlying value is generic, allowing the library
//! to be used with any type that implements `FixedPointValue`, including
//! signed integers, and ensuring that the instance is bounded by the generic
//! type's limits.
//! - Support for overflowing intermediate operations in `mul_div_down` and
//! `mul_div_up` via `U512`.
//!
//! Each of the functions is fuzz tested against the Solidity implementation to
//! ensure that the behavior is identical given values bounded by the Solidity
//! implementation's limits.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;