aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-11-22 22:55:21 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-03 18:33:04 +0800
commitd142413745cb08e0a2af58f1205dbca2eb499044 (patch)
tree4b9d7895c726aeac057fcd37737570775787e28b
parente339e1182de9d9868263a3b01c9e1cda849954d3 (diff)
downloaddexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar.gz
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar.bz2
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar.lz
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar.xz
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.tar.zst
dexon-sol-tools-d142413745cb08e0a2af58f1205dbca2eb499044.zip
Rename calldata to callData because solhint doesn't like calldata (probably reserved keyword) and goes nuts
-rw-r--r--contracts/core/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol28
1 files changed, 14 insertions, 14 deletions
diff --git a/contracts/core/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol b/contracts/core/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol
index 99dd47a78..aa3bf9ab8 100644
--- a/contracts/core/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol
+++ b/contracts/core/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol
@@ -92,53 +92,53 @@ contract ReentrantERC20Token is
LibOrder.Order[] memory orders;
uint256[] memory takerAssetFillAmounts;
bytes[] memory signatures;
- bytes memory calldata;
+ bytes memory callData;
- // Create calldata for function that corresponds to currentFunctionId
+ // Create callData for function that corresponds to currentFunctionId
if (currentFunctionId == uint8(ExchangeFunction.FILL_ORDER)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.fillOrder.selector,
order,
0,
signature
);
} else if (currentFunctionId == uint8(ExchangeFunction.FILL_OR_KILL_ORDER)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.fillOrKillOrder.selector,
order,
0,
signature
);
} else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.batchFillOrders.selector,
orders,
takerAssetFillAmounts,
signatures
);
} else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_OR_KILL_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.batchFillOrKillOrders.selector,
orders,
takerAssetFillAmounts,
signatures
);
} else if (currentFunctionId == uint8(ExchangeFunction.MARKET_BUY_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.marketBuyOrders.selector,
orders,
0,
signatures
);
} else if (currentFunctionId == uint8(ExchangeFunction.MARKET_SELL_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.marketSellOrders.selector,
orders,
0,
signatures
);
} else if (currentFunctionId == uint8(ExchangeFunction.MATCH_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.matchOrders.selector,
order,
order,
@@ -146,22 +146,22 @@ contract ReentrantERC20Token is
signature
);
} else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDER)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.cancelOrder.selector,
order
);
} else if (currentFunctionId == uint8(ExchangeFunction.BATCH_CANCEL_ORDERS)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.batchCancelOrders.selector,
orders
);
} else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDERS_UP_TO)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.cancelOrdersUpTo.selector,
0
);
} else if (currentFunctionId == uint8(ExchangeFunction.SET_SIGNATURE_VALIDATOR_APPROVAL)) {
- calldata = abi.encodeWithSelector(
+ callData = abi.encodeWithSelector(
EXCHANGE.setSignatureValidatorApproval.selector,
address(0),
false
@@ -169,7 +169,7 @@ contract ReentrantERC20Token is
}
// Call Exchange function, swallow error
- address(EXCHANGE).call(calldata);
+ address(EXCHANGE).call(callData);
// Revert reason is 100 bytes
bytes memory returnData = new bytes(100);