Rename missed variables

This commit is contained in:
Amir Bandeali
2018-04-22 14:44:56 -07:00
parent 46653a0268
commit 08208acf53
7 changed files with 274 additions and 274 deletions

View File

@@ -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.

View File

@@ -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;

View File

@@ -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]
);

View File

@@ -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;
}