aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-04-23 05:44:56 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-23 05:44:56 +0800
commit08208acf5337c39ba7a864ad11655e24c1c1728c (patch)
tree598e96311a900cbae145590774d3b8598771098c /packages/contracts/src
parent46653a02683071e9ad35e5c378876a6400fd934c (diff)
downloaddexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar.gz
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar.bz2
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar.lz
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar.xz
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.tar.zst
dexon-sol-tools-08208acf5337c39ba7a864ad11655e24c1c1728c.zip
Rename missed variables
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/IExchange.sol8
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol6
-rw-r--r--packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol24
-rw-r--r--packages/contracts/src/utils/exchange_wrapper.ts2
4 files changed, 20 insertions, 20 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/IExchange.sol b/packages/contracts/src/contracts/current/protocol/Exchange/IExchange.sol
index 0550d6c4b..ef2fb2a96 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/IExchange.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/IExchange.sol
@@ -77,9 +77,9 @@ contract IExchange {
/// @dev Calculates the sum of values already filled and cancelled for a given order.
/// @param orderHash The Keccak-256 hash of the given order.
/// @return Sum of values already filled and cancelled.
- function getUnavailableTakerTokenAmount(bytes32 orderHash)
+ function getUnavailableTakerAssetAmount(bytes32 orderHash)
public view
- returns (uint256 unavailableTakerTokenAmount);
+ returns (uint256 unavailableTakerAssetAmount);
/// @dev Calculates partial value given a numerator and denominator.
/// @param numerator Numerator.
@@ -257,7 +257,7 @@ contract IExchange {
bytes32[] r,
bytes32[] s)
external
- returns (uint256 totalTakerTokenFilledAmount);
+ returns (uint256 totalTakerAssetFilledAmount);
/// @dev Synchronously executes multiple calls of fillOrderNoThrow in a single transaction until total takerAssetFillAmount filled.
/// @param orderAddresses Array of address arrays containing individual order addresses.
@@ -275,7 +275,7 @@ contract IExchange {
bytes32[] r,
bytes32[] s)
external
- returns (uint256 totalTakerTokenFilledAmount);
+ returns (uint256 totalTakerAssetFilledAmount);
/// @dev Synchronously cancels multiple orders in a single transaction.
/// @param orderAddresses Array of address arrays containing individual order addresses.
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
index d4801a8fd..710315515 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinExchangeCore.sol
@@ -127,14 +127,14 @@ contract MixinExchangeCore is
}
// Validate order availability
- uint256 remainingTakerTokenFillAmount = safeSub(order.takerAssetAmount, filled[orderHash]);
- if (remainingTakerTokenFillAmount == 0) {
+ uint256 remainingTakerAssetFillAmount = safeSub(order.takerAssetAmount, filled[orderHash]);
+ if (remainingTakerAssetFillAmount == 0) {
emit ExchangeError(uint8(Errors.ORDER_FULLY_FILLED), orderHash);
return fillResults;
}
// Validate fill order rounding
- fillResults.takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerTokenFillAmount);
+ fillResults.takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerAssetFillAmount);
if (isRoundingError(fillResults.takerAssetFilledAmount, order.takerAssetAmount, order.makerAssetAmount)) {
emit ExchangeError(uint8(Errors.ROUNDING_ERROR_TOO_LARGE), orderHash);
fillResults.takerAssetFilledAmount = 0;
diff --git a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
index caa391aed..2c0fd0751 100644
--- a/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
+++ b/packages/contracts/src/contracts/current/protocol/Exchange/MixinWrapperFunctions.sol
@@ -326,12 +326,12 @@ contract MixinWrapperFunctions is
require(areBytesEqual(orders[i].takerAssetData, orders[0].takerAssetData));
// Calculate the remaining amount of takerAsset to sell
- uint256 remainingTakerTokenFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
+ uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
// Attempt to sell the remaining amount of takerAsset
FillResults memory singleFillResults = fillOrder(
orders[i],
- remainingTakerTokenFillAmount,
+ remainingTakerAssetFillAmount,
signatures[i]
);
@@ -365,12 +365,12 @@ contract MixinWrapperFunctions is
require(areBytesEqual(orders[i].takerAssetData, orders[0].takerAssetData));
// Calculate the remaining amount of takerAsset to sell
- uint256 remainingTakerTokenFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
+ uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
// Attempt to sell the remaining amount of takerAsset
FillResults memory singleFillResults = fillOrderNoThrow(
orders[i],
- remainingTakerTokenFillAmount,
+ remainingTakerAssetFillAmount,
signatures[i]
);
@@ -403,20 +403,20 @@ contract MixinWrapperFunctions is
require(areBytesEqual(orders[i].makerAssetData, orders[0].makerAssetData));
// Calculate the remaining amount of makerAsset to buy
- uint256 remainingMakerTokenFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
+ uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
// Convert the remaining amount of makerAsset to buy into remaining amount
// of takerAsset to sell, assuming entire amount can be sold in the current order
- uint256 remainingTakerTokenFillAmount = getPartialAmount(
+ uint256 remainingTakerAssetFillAmount = getPartialAmount(
orders[i].takerAssetAmount,
orders[i].makerAssetAmount,
- remainingMakerTokenFillAmount
+ remainingMakerAssetFillAmount
);
// Attempt to sell the remaining amount of takerAsset
FillResults memory singleFillResults = fillOrder(
orders[i],
- remainingTakerTokenFillAmount,
+ remainingTakerAssetFillAmount,
signatures[i]
);
@@ -450,20 +450,20 @@ contract MixinWrapperFunctions is
require(areBytesEqual(orders[i].makerAssetData, orders[0].makerAssetData));
// Calculate the remaining amount of makerAsset to buy
- uint256 remainingMakerTokenFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
+ uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
// Convert the remaining amount of makerAsset to buy into remaining amount
// of takerAsset to sell, assuming entire amount can be sold in the current order
- uint256 remainingTakerTokenFillAmount = getPartialAmount(
+ uint256 remainingTakerAssetFillAmount = getPartialAmount(
orders[i].takerAssetAmount,
orders[i].makerAssetAmount,
- remainingMakerTokenFillAmount
+ remainingMakerAssetFillAmount
);
// Attempt to sell the remaining amount of takerAsset
FillResults memory singleFillResults = fillOrderNoThrow(
orders[i],
- remainingTakerTokenFillAmount,
+ remainingTakerAssetFillAmount,
signatures[i]
);
diff --git a/packages/contracts/src/utils/exchange_wrapper.ts b/packages/contracts/src/utils/exchange_wrapper.ts
index c4cfdc46c..26ce8b04e 100644
--- a/packages/contracts/src/utils/exchange_wrapper.ts
+++ b/packages/contracts/src/utils/exchange_wrapper.ts
@@ -221,7 +221,7 @@ export class ExchangeWrapper {
);
return partialAmount;
}
- public async getTakerTokenFilledAmountAsync(orderHashHex: string): Promise<BigNumber> {
+ public async getTakerAssetFilledAmountAsync(orderHashHex: string): Promise<BigNumber> {
const filledAmount = new BigNumber(await this._exchange.filled.callAsync(orderHashHex));
return filledAmount;
}