1.0.1 • Published 5 years ago
solidity-fixedpoint v1.0.1
Solidity Fixed Point Library
Implements fixed point numbers in Solidity using the Q number format.
Built off the Uniswap FixedPoint and Babylonian libraries developed by moodysalem.
This library uses the UQ192x64 format to maximize the range of fixed point numbers while keeping the resolution close to the 18 decimal places that is standard for most Solidity contracts.
Uniswap originally used the UQ112x112 format to optimize the variable packing in their contracts.
Install Dependencies
npm install
Compile Contracts
npx buidler compile
Run Tests
npx buidler test
Contributors
- @opz 💻