don't pack prices as much

This commit is contained in:
Noah Zinsmeister
2019-12-05 13:28:23 -05:00
parent 607b1c6e6e
commit b284b63118
10 changed files with 122 additions and 207 deletions

View File

@ -14,14 +14,4 @@ library SafeMath {
function clamp128(uint y) internal pure returns (uint128 z) {
z = y <= uint128(-1) ? uint128(y) : uint128(-1);
}
function downcast128(uint y) internal pure returns (uint128 z) {
require(y <= uint128(-1), "downcast-128-overflow");
z = uint128(y);
}
function downcast32(uint y) internal pure returns (uint32 z) {
require(y <= uint32(-1), "downcast-32-overflow");
z = uint32(y);
}
}