aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-12 07:39:46 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:17 +0800
commitd0930b90485703937d8d7364cc4c27f7a7de4556 (patch)
tree46efd39a772df473027ffe20481f74f67e3431b8 /packages/contracts
parent591645758aa53347495dc948e28e7f82d1129d3d (diff)
downloaddexon-0x-contracts-d0930b90485703937d8d7364cc4c27f7a7de4556.tar.gz
dexon-0x-contracts-d0930b90485703937d8d7364cc4c27f7a7de4556.tar.zst
dexon-0x-contracts-d0930b90485703937d8d7364cc4c27f7a7de4556.zip
Improved readability of FillOrderNoThrow II
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol30
1 files changed, 15 insertions, 15 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
index a440593ee..d4e4d453b 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
@@ -134,9 +134,9 @@ contract MixinWrapperFunctions is
// Offset from the source data we're reading from
let sourceOffset := order
- // bytesLen and bytesLenPadded track the length of a dynamically-allocated bytes array.
- let bytesLen := 0
- let bytesLenPadded := 0
+ // arrayLenBytes and arrayLenWords track the length of a dynamically-allocated bytes array.
+ let arrayLenBytes := 0
+ let arrayLenWords := 0
/////// Write order Struct ///////
// Write memory location of Order, relative to the start of the
@@ -155,16 +155,16 @@ contract MixinWrapperFunctions is
mstore(add(dataAreaStart, mul(11, 0x20)), sub(dataAreaEnd, dataAreaStart))
// Calculate length of <order.makerAssetProxyMetadata>
- bytesLen := mload(sourceOffset)
+ arrayLenBytes := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
+ arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
// Write length of <order.makerAssetProxyMetadata>
- mstore(dataAreaEnd, bytesLen)
+ mstore(dataAreaEnd, arrayLenBytes)
dataAreaEnd := add(dataAreaEnd, 0x20)
// Write contents of <order.makerAssetProxyMetadata>
- for {let i := 0} lt(i, bytesLenPadded) {i := add(i, 1)} {
+ for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
mstore(dataAreaEnd, mload(sourceOffset))
dataAreaEnd := add(dataAreaEnd, 0x20)
sourceOffset := add(sourceOffset, 0x20)
@@ -174,16 +174,16 @@ contract MixinWrapperFunctions is
mstore(add(dataAreaStart, mul(12, 0x20)), sub(dataAreaEnd, dataAreaStart))
// Calculate length of <order.takerAssetProxyMetadata>
- bytesLen := mload(sourceOffset)
+ arrayLenBytes := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
+ arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
// Write length of <order.takerAssetProxyMetadata>
- mstore(dataAreaEnd, bytesLen)
+ mstore(dataAreaEnd, arrayLenBytes)
dataAreaEnd := add(dataAreaEnd, 0x20)
// Write contents of <order.takerAssetProxyMetadata>
- for {let i := 0} lt(i, bytesLenPadded) {i := add(i, 1)} {
+ for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
mstore(dataAreaEnd, mload(sourceOffset))
dataAreaEnd := add(dataAreaEnd, 0x20)
sourceOffset := add(sourceOffset, 0x20)
@@ -199,16 +199,16 @@ contract MixinWrapperFunctions is
// Calculate length of signature
sourceOffset := signature
- bytesLen := mload(sourceOffset)
+ arrayLenBytes := mload(sourceOffset)
sourceOffset := add(sourceOffset, 0x20)
- bytesLenPadded := div(add(bytesLen, 0x1F), 0x20)
+ arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
// Write length of signature
- mstore(dataAreaEnd, bytesLen)
+ mstore(dataAreaEnd, arrayLenBytes)
dataAreaEnd := add(dataAreaEnd, 0x20)
// Write contents of signature
- for {let i := 0} lt(i, bytesLenPadded) {i := add(i, 1)} {
+ for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
mstore(dataAreaEnd, mload(sourceOffset))
dataAreaEnd := add(dataAreaEnd, 0x20)
sourceOffset := add(sourceOffset, 0x20)