remove debug log
This commit is contained in:
@@ -192,7 +192,6 @@ export function dexSamplesToFills(
|
||||
|
||||
let penalty = ZERO_AMOUNT;
|
||||
if (i === 0) {
|
||||
console.log(`fee: ${fee}, gasCost: ${sample.gasCost}, gasPrice: ${gasPrice}`);
|
||||
// Only the first fill in a DEX path incurs a penalty.
|
||||
penalty = ethToOutputAmount({
|
||||
input,
|
||||
|
@@ -740,7 +740,6 @@ export class MarketOperationUtils {
|
||||
isMultiHop?: boolean;
|
||||
}): Promise<OptimizedHop | null> {
|
||||
|
||||
console.log(`finding optimal path for`, opts.inputToken, opts.outputToken);
|
||||
let path = await this._findOptimalPathFromSamples({
|
||||
side: opts.side,
|
||||
nativeOrders: opts.nativeOrders,
|
||||
@@ -996,7 +995,6 @@ export class MarketOperationUtils {
|
||||
outputAmountPerEth: tokenAmountPerEth[outputToken],
|
||||
};
|
||||
for (const route of hopRoutes) {
|
||||
console.log(route.map(r => [r.inputToken, r.outputToken]));
|
||||
const rate = getHopRouteOverallAdjustedTakerToMakerRate(route, rateOpts);
|
||||
if (!bestHopRouteTotalRate || rate.gt(bestHopRouteTotalRate)) {
|
||||
console.log(`new best route: <\n\t${route.map(r => `path: ${r.inputToken}->${r.outputToken}, ${r.orders.map(o => o.source)}, output: ${r.outputAmount}`).join(',\n\t')}\n>, overall rate: ${rate}, overall gas cost: ${route.reduce((a,v) => a + v.gasCost, 0)}`);
|
||||
@@ -1039,7 +1037,6 @@ function getHopRouteOverallAdjustedTakerToMakerRate(
|
||||
const totalEthCost = opts.gasPrice.times(
|
||||
exchangeProxyOverhead(sourceFlags).plus(hops.reduce((a, h) => a + h.gasCost, 0)),
|
||||
);
|
||||
console.log(totalEthCost, hops.length, exchangeProxyOverhead(sourceFlags));
|
||||
const ethCostAsOutputAmount = ethToOutputAmount({
|
||||
ethAmount: totalEthCost,
|
||||
input: inputAmount,
|
||||
|
@@ -437,7 +437,6 @@ export async function findOptimalPathJSAsync(
|
||||
// Sort fill arrays by descending adjusted completed rate.
|
||||
// Remove any paths which cannot impact the optimal path
|
||||
const sortedPaths = reducePaths(fillsToSortedPaths(fills, side, targetInput, opts));
|
||||
console.log(sortedPaths.map(p => ({ source: p.fills[0].source, data: p.fills[0].data, output: p.size().output, adjustedOutput: p.adjustedSize().output, rate: p.adjustedCompleteTakerToMakerRate() })));
|
||||
if (sortedPaths.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -449,7 +448,6 @@ export async function findOptimalPathJSAsync(
|
||||
await Promise.resolve();
|
||||
}
|
||||
const finalPath = optimalPath.isComplete() ? optimalPath : undefined;
|
||||
console.log(finalPath?.fills.map(f => f.source), finalPath?.adjustedCompleteTakerToMakerRate());
|
||||
// tslint:disable-next-line: no-unused-expression
|
||||
samplerMetrics &&
|
||||
samplerMetrics.logRouterDetails({
|
||||
|
Reference in New Issue
Block a user