1.0.1 • Published 5 years ago

solidity-fixedpoint v1.0.1

Weekly downloads
3
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

Solidity Fixed Point Library

Actions Status npm

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

1.0.1

5 years ago

1.0.0

5 years ago