diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-12 07:39:36 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 591645758aa53347495dc948e28e7f82d1129d3d (patch) | |
tree | a0003c072a061e87cc7a0ddabe1a6dbdbb90ad10 /packages/contracts/src | |
parent | 4e093369f61403562d4d65fb33dcc0a2d09de3de (diff) | |
download | dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar.gz dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar.bz2 dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar.lz dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar.xz dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.tar.zst dexon-sol-tools-591645758aa53347495dc948e28e7f82d1129d3d.zip |
Improved readability of FillOrderNoThrow
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol | 8 |
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) |