diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-09-04 11:55:37 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-09-04 11:55:37 +0800 |
commit | 99fbf384fdcae26eb608f9e0c95a852b7cb7bd99 (patch) | |
tree | 843ccc0183ffadc6d5c24881ea8fd707ed1937a5 /packages/contracts/src/2.0.0/protocol/Exchange/libs | |
parent | cb4fcf4de7b9decad05536f2edf1c1ffd8666a72 (diff) | |
download | dexon-0x-contracts-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.tar.gz dexon-0x-contracts-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.tar.zst dexon-0x-contracts-99fbf384fdcae26eb608f9e0c95a852b7cb7bd99.zip |
Apply styling fixes
Diffstat (limited to 'packages/contracts/src/2.0.0/protocol/Exchange/libs')
4 files changed, 11 insertions, 5 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibEIP712.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibEIP712.sol index b02f7632e..203edc1fd 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibEIP712.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibEIP712.sol @@ -20,6 +20,7 @@ pragma solidity 0.4.24; contract LibEIP712 { + // EIP191 header for EIP712 prefix string constant internal EIP191_HEADER = "\x19\x01"; diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibFillResults.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibFillResults.sol index 1b4181d94..659ae9a69 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibFillResults.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibFillResults.sol @@ -24,7 +24,6 @@ import "../../../utils/SafeMath/SafeMath.sol"; contract LibFillResults is SafeMath { - struct FillResults { uint256 makerAssetFilledAmount; // Total amount of makerAsset(s) filled. uint256 takerAssetFilledAmount; // Total amount of takerAsset(s) filled. diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol index 57fd53f29..d8fed176c 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibMath.sol @@ -24,7 +24,6 @@ import "../../../utils/SafeMath/SafeMath.sol"; contract LibMath is SafeMath { - /// @dev Calculates partial value given a numerator and denominator rounded down. /// Reverts if rounding error is >= 0.1% /// @param numerator Numerator. @@ -206,7 +205,11 @@ contract LibMath is // 1000 * remainder < numerator * target // so we have a rounding error iff: // 1000 * remainder >= numerator * target - uint256 remainder = mulmod(target, numerator, denominator); + uint256 remainder = mulmod( + target, + numerator, + denominator + ); isError = safeMul(1000, remainder) >= safeMul(numerator, target); return isError; } @@ -238,7 +241,11 @@ contract LibMath is return false; } // Compute remainder as before - uint256 remainder = mulmod(target, numerator, denominator); + uint256 remainder = mulmod( + target, + numerator, + denominator + ); // TODO: safeMod remainder = safeSub(denominator, remainder) % denominator; isError = safeMul(1000, remainder) >= safeMul(numerator, target); diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol index 68f4f5f1b..0fe7c2161 100644 --- a/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol +++ b/packages/contracts/src/2.0.0/protocol/Exchange/libs/LibOrder.sol @@ -24,7 +24,6 @@ import "./LibEIP712.sol"; contract LibOrder is LibEIP712 { - // Hash for the EIP712 Order Schema bytes32 constant internal EIP712_ORDER_SCHEMA_HASH = keccak256(abi.encodePacked( "Order(", |