aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-12 07:39:36 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commit591645758aa53347495dc948e28e7f82d1129d3d (patch)
treea0003c072a061e87cc7a0ddabe1a6dbdbb90ad10 /packages/contracts/src
parent4e093369f61403562d4d65fb33dcc0a2d09de3de (diff)
downloaddexon-0x-contracts-591645758aa53347495dc948e28e7f82d1129d3d.tar.gz
dexon-0x-contracts-591645758aa53347495dc948e28e7f82d1129d3d.tar.zst
dexon-0x-contracts-591645758aa53347495dc948e28e7f82d1129d3d.zip
Improved readability of FillOrderNoThrow
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
index fdc906076..a440593ee 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
@@ -157,13 +157,13 @@ contract MixinWrapperFunctions is
// Calculate length of <order.makerAssetProxyMetadata>
bytesLen := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := add(div(bytesLen, 0x20), gt(mod(bytesLen, 0x20), 0))
+ bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
// Write length of <order.makerAssetProxyMetadata>
mstore(dataAreaEnd, bytesLen)
dataAreaEnd := add(dataAreaEnd, 0x20)
- // Write contents of <order.makerAssetProxyMetadata>
+ // Write contents of <order.makerAssetProxyMetadata>
for {let i := 0} lt(i, bytesLenPadded) {i := add(i, 1)} {
mstore(dataAreaEnd, mload(sourceOffset))
dataAreaEnd := add(dataAreaEnd, 0x20)
@@ -176,7 +176,7 @@ contract MixinWrapperFunctions is
// Calculate length of <order.takerAssetProxyMetadata>
bytesLen := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := add(div(bytesLen, 0x20), gt(mod(bytesLen, 0x20), 0))
+ bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
// Write length of <order.takerAssetProxyMetadata>
mstore(dataAreaEnd, bytesLen)
@@ -201,7 +201,7 @@ contract MixinWrapperFunctions is
sourceOffset := signature
bytesLen := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := add(div(bytesLen, 0x20), gt(mod(bytesLen, 0x20), 0))
+ bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
// Write length of signature
mstore(dataAreaEnd, bytesLen)