Compare commits
12 Commits
protocol@e
...
protocol@9
Author | SHA1 | Date | |
---|---|---|---|
|
9e6efc3676 | ||
|
3aef29dace | ||
|
9a16e00577 | ||
|
84e4819e6e | ||
|
25dd6bc79a | ||
|
5d2cdb00c2 | ||
|
0f701f42d3 | ||
|
3e3e82d3f7 | ||
|
c57bf86273 | ||
|
f470d282ee | ||
|
b8a2526da5 | ||
|
97575bbde9 |
@@ -1,4 +1,46 @@
|
||||
[
|
||||
{
|
||||
"version": "16.49.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix `slippage` inconsistency when recalculated in exchange proxy quote consumer",
|
||||
"pr": 412
|
||||
},
|
||||
{
|
||||
"note": "Fix incorrect output scaling when input is less than desired amount, update fast-abi",
|
||||
"pr": 401
|
||||
},
|
||||
{
|
||||
"note": "Improve Uniswap V3 gas schedule",
|
||||
"pr": 397
|
||||
},
|
||||
{
|
||||
"note": "Fix add Native as VIP and use Path to compare all sources vs vip only",
|
||||
"pr": 413
|
||||
}
|
||||
],
|
||||
"timestamp": 1644495123
|
||||
},
|
||||
{
|
||||
"version": "16.49.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix ABI encoding error with two hop buys due to applying slippage to uint(-1) values",
|
||||
"pr": 410
|
||||
}
|
||||
],
|
||||
"timestamp": 1643653482
|
||||
},
|
||||
{
|
||||
"version": "16.49.1",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Fix WorstCaseQuoteInfo encoding bug",
|
||||
"pr": 402
|
||||
}
|
||||
],
|
||||
"timestamp": 1643613597
|
||||
},
|
||||
{
|
||||
"version": "16.49.0",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,21 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v16.49.3 - _February 10, 2022_
|
||||
|
||||
* Fix `slippage` inconsistency when recalculated in exchange proxy quote consumer (#412)
|
||||
* Fix incorrect output scaling when input is less than desired amount, update fast-abi (#401)
|
||||
* Improve Uniswap V3 gas schedule (#397)
|
||||
* Fix add Native as VIP and use Path to compare all sources vs vip only (#413)
|
||||
|
||||
## v16.49.2 - _January 31, 2022_
|
||||
|
||||
* Fix ABI encoding error with two hop buys due to applying slippage to uint(-1) values (#410)
|
||||
|
||||
## v16.49.1 - _January 31, 2022_
|
||||
|
||||
* Fix WorstCaseQuoteInfo encoding bug (#402)
|
||||
|
||||
## v16.49.0 - _January 28, 2022_
|
||||
|
||||
* Add more curve pools (#409)
|
||||
|
@@ -22,17 +22,43 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";
|
||||
|
||||
interface IUniswapV3Quoter {
|
||||
interface IUniswapV3QuoterV2 {
|
||||
function factory()
|
||||
external
|
||||
view
|
||||
returns (IUniswapV3Factory factory);
|
||||
|
||||
// @notice Returns the amount out received for a given exact input swap without executing the swap
|
||||
// @param path The path of the swap, i.e. each token pair and the pool fee
|
||||
// @param amountIn The amount of the first token to swap
|
||||
// @return amountOut The amount of the last token that would be received
|
||||
// @return sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path
|
||||
// @return initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path
|
||||
// @return gasEstimate The estimate of the gas that the swap consumes
|
||||
function quoteExactInput(bytes memory path, uint256 amountIn)
|
||||
external
|
||||
returns (uint256 amountOut);
|
||||
returns (
|
||||
uint256 amountOut,
|
||||
uint160[] memory sqrtPriceX96AfterList,
|
||||
uint32[] memory initializedTicksCrossedList,
|
||||
uint256 gasEstimate
|
||||
);
|
||||
|
||||
// @notice Returns the amount in required for a given exact output swap without executing the swap
|
||||
// @param path The path of the swap, i.e. each token pair and the pool fee. Path must be provided in reverse order
|
||||
// @param amountOut The amount of the last token to receive
|
||||
// @return amountIn The amount of first token required to be paid
|
||||
// @return sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path
|
||||
// @return initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path
|
||||
// @return gasEstimate The estimate of the gas that the swap consumes
|
||||
function quoteExactOutput(bytes memory path, uint256 amountOut)
|
||||
external
|
||||
returns (uint256 amountIn);
|
||||
returns (
|
||||
uint256 amountIn,
|
||||
uint160[] memory sqrtPriceX96AfterList,
|
||||
uint32[] memory initializedTicksCrossedList,
|
||||
uint256 gasEstimate
|
||||
);
|
||||
}
|
||||
|
||||
interface IUniswapV3Factory {
|
||||
@@ -61,14 +87,15 @@ contract UniswapV3Sampler
|
||||
/// @return makerTokenAmounts Maker amounts bought at each taker token
|
||||
/// amount.
|
||||
function sampleSellsFromUniswapV3(
|
||||
IUniswapV3Quoter quoter,
|
||||
IUniswapV3QuoterV2 quoter,
|
||||
IERC20TokenV06[] memory path,
|
||||
uint256[] memory takerTokenAmounts
|
||||
)
|
||||
public
|
||||
returns (
|
||||
bytes[] memory uniswapPaths,
|
||||
uint256[] memory makerTokenAmounts
|
||||
uint256[] memory makerTokenAmounts,
|
||||
uint256[] memory uniswapGasUsed
|
||||
)
|
||||
{
|
||||
IUniswapV3Pool[][] memory poolPaths =
|
||||
@@ -76,31 +103,39 @@ contract UniswapV3Sampler
|
||||
|
||||
makerTokenAmounts = new uint256[](takerTokenAmounts.length);
|
||||
uniswapPaths = new bytes[](takerTokenAmounts.length);
|
||||
uniswapGasUsed = new uint256[](takerTokenAmounts.length);
|
||||
|
||||
for (uint256 i = 0; i < takerTokenAmounts.length; ++i) {
|
||||
// Pick the best result from all the paths.
|
||||
bytes memory topUniswapPath;
|
||||
uint256 topBuyAmount = 0;
|
||||
for (uint256 j = 0; j < poolPaths.length; ++j) {
|
||||
bytes memory uniswapPath = _toUniswapPath(path, poolPaths[j]);
|
||||
try
|
||||
quoter.quoteExactInput
|
||||
{ gas: QUOTE_GAS }
|
||||
(uniswapPath, takerTokenAmounts[i])
|
||||
returns (uint256 buyAmount)
|
||||
try quoter.quoteExactInput
|
||||
{ gas: QUOTE_GAS }
|
||||
(uniswapPath, takerTokenAmounts[i])
|
||||
returns (
|
||||
uint256 buyAmount,
|
||||
uint160[] memory, /* sqrtPriceX96AfterList */
|
||||
uint32[] memory, /* initializedTicksCrossedList */
|
||||
uint256 gasUsed
|
||||
)
|
||||
{
|
||||
if (topBuyAmount <= buyAmount) {
|
||||
topBuyAmount = buyAmount;
|
||||
topUniswapPath = uniswapPath;
|
||||
uniswapPaths[i] = uniswapPath;
|
||||
uniswapGasUsed[i] = gasUsed;
|
||||
}
|
||||
} catch { }
|
||||
} catch {}
|
||||
}
|
||||
// Break early if we can't complete the buys.
|
||||
// Break early if we can't complete the sells.
|
||||
if (topBuyAmount == 0) {
|
||||
// HACK(kimpers): To avoid too many local variables, paths and gas used is set directly in the loop
|
||||
// then reset if no valid valid quote was found
|
||||
uniswapPaths[i] = "";
|
||||
uniswapGasUsed[i] = 0;
|
||||
break;
|
||||
}
|
||||
makerTokenAmounts[i] = topBuyAmount;
|
||||
uniswapPaths[i] = topUniswapPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,14 +147,15 @@ contract UniswapV3Sampler
|
||||
/// @return takerTokenAmounts Taker amounts sold at each maker token
|
||||
/// amount.
|
||||
function sampleBuysFromUniswapV3(
|
||||
IUniswapV3Quoter quoter,
|
||||
IUniswapV3QuoterV2 quoter,
|
||||
IERC20TokenV06[] memory path,
|
||||
uint256[] memory makerTokenAmounts
|
||||
)
|
||||
public
|
||||
returns (
|
||||
bytes[] memory uniswapPaths,
|
||||
uint256[] memory takerTokenAmounts
|
||||
uint256[] memory takerTokenAmounts,
|
||||
uint256[] memory uniswapGasUsed
|
||||
)
|
||||
{
|
||||
IUniswapV3Pool[][] memory poolPaths =
|
||||
@@ -128,11 +164,12 @@ contract UniswapV3Sampler
|
||||
|
||||
takerTokenAmounts = new uint256[](makerTokenAmounts.length);
|
||||
uniswapPaths = new bytes[](makerTokenAmounts.length);
|
||||
uniswapGasUsed = new uint256[](makerTokenAmounts.length);
|
||||
|
||||
for (uint256 i = 0; i < makerTokenAmounts.length; ++i) {
|
||||
uint256 topSellAmount;
|
||||
|
||||
// Pick the best result from all the paths.
|
||||
bytes memory topUniswapPath;
|
||||
uint256 topSellAmount = 0;
|
||||
for (uint256 j = 0; j < poolPaths.length; ++j) {
|
||||
// quoter requires path to be reversed for buys.
|
||||
bytes memory uniswapPath = _toUniswapPath(
|
||||
@@ -143,21 +180,30 @@ contract UniswapV3Sampler
|
||||
quoter.quoteExactOutput
|
||||
{ gas: QUOTE_GAS }
|
||||
(uniswapPath, makerTokenAmounts[i])
|
||||
returns (uint256 sellAmount)
|
||||
returns (
|
||||
uint256 sellAmount,
|
||||
uint160[] memory, /* sqrtPriceX96AfterList */
|
||||
uint32[] memory, /* initializedTicksCrossedList */
|
||||
uint256 gasUsed
|
||||
)
|
||||
{
|
||||
if (topSellAmount == 0 || topSellAmount >= sellAmount) {
|
||||
topSellAmount = sellAmount;
|
||||
// But the output path should still be encoded for sells.
|
||||
topUniswapPath = _toUniswapPath(path, poolPaths[j]);
|
||||
uniswapPaths[i] = _toUniswapPath(path, poolPaths[j]);
|
||||
uniswapGasUsed[i] = gasUsed;
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
// Break early if we can't complete the buys.
|
||||
if (topSellAmount == 0) {
|
||||
// HACK(kimpers): To avoid too many local variables, paths and gas used is set directly in the loop
|
||||
// then reset if no valid valid quote was found
|
||||
uniswapPaths[i] = "";
|
||||
uniswapGasUsed[i] = 0;
|
||||
break;
|
||||
}
|
||||
takerTokenAmounts[i] = topSellAmount;
|
||||
uniswapPaths[i] = topUniswapPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,6 +282,7 @@ contract UniswapV3Sampler
|
||||
|
||||
function _reverseTokenPath(IERC20TokenV06[] memory tokenPath)
|
||||
private
|
||||
pure
|
||||
returns (IERC20TokenV06[] memory reversed)
|
||||
{
|
||||
reversed = new IERC20TokenV06[](tokenPath.length);
|
||||
@@ -246,6 +293,7 @@ contract UniswapV3Sampler
|
||||
|
||||
function _reversePoolPath(IUniswapV3Pool[] memory poolPath)
|
||||
private
|
||||
pure
|
||||
returns (IUniswapV3Pool[] memory reversed)
|
||||
{
|
||||
reversed = new IUniswapV3Pool[](poolPath.length);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0x/asset-swapper",
|
||||
"version": "16.49.0",
|
||||
"version": "16.49.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -86,7 +86,7 @@
|
||||
"decimal.js": "^10.2.0",
|
||||
"ethereum-types": "^3.6.0",
|
||||
"ethereumjs-util": "^7.0.10",
|
||||
"fast-abi": "^0.0.2",
|
||||
"fast-abi": "^0.0.4",
|
||||
"graphql": "^15.4.0",
|
||||
"graphql-request": "^3.4.0",
|
||||
"heartbeats": "^5.0.1",
|
||||
|
@@ -691,7 +691,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
|
||||
|
||||
function slipNonNativeOrders(quote: MarketSellSwapQuote | MarketBuySwapQuote): OptimizedMarketOrder[] {
|
||||
const slippage = getMaxQuoteSlippageRate(quote);
|
||||
if (!slippage) {
|
||||
if (slippage === 0) {
|
||||
return quote.orders;
|
||||
}
|
||||
return quote.orders.map(o => {
|
||||
@@ -701,25 +701,20 @@ function slipNonNativeOrders(quote: MarketSellSwapQuote | MarketBuySwapQuote): O
|
||||
return {
|
||||
...o,
|
||||
...(quote.type === MarketOperation.Sell
|
||||
? { makerAmount: o.makerAmount.times(1 - slippage).integerValue(BigNumber.ROUND_DOWN) }
|
||||
: { takerAmount: o.takerAmount.times(1 + slippage).integerValue(BigNumber.ROUND_UP) }),
|
||||
? {
|
||||
makerAmount: o.makerAmount.eq(MAX_UINT256)
|
||||
? MAX_UINT256
|
||||
: o.makerAmount.times(1 - slippage).integerValue(BigNumber.ROUND_DOWN),
|
||||
}
|
||||
: {
|
||||
takerAmount: o.takerAmount.eq(MAX_UINT256)
|
||||
? MAX_UINT256
|
||||
: o.takerAmount.times(1 + slippage).integerValue(BigNumber.ROUND_UP),
|
||||
}),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function getMaxQuoteSlippageRate(quote: MarketBuySwapQuote | MarketSellSwapQuote): number {
|
||||
if (quote.type === MarketOperation.Buy) {
|
||||
// (worstCaseTaker - bestCaseTaker) / bestCaseTaker
|
||||
// where worstCaseTaker >= bestCaseTaker
|
||||
return quote.worstCaseQuoteInfo.takerAmount
|
||||
.minus(quote.bestCaseQuoteInfo.takerAmount)
|
||||
.div(quote.bestCaseQuoteInfo.takerAmount)
|
||||
.toNumber();
|
||||
}
|
||||
// (bestCaseMaker - worstCaseMaker) / bestCaseMaker
|
||||
// where bestCaseMaker >= worstCaseMaker
|
||||
return quote.bestCaseQuoteInfo.makerAmount
|
||||
.minus(quote.worstCaseQuoteInfo.makerAmount)
|
||||
.div(quote.bestCaseQuoteInfo.makerAmount)
|
||||
.toNumber();
|
||||
return quote.worstCaseQuoteInfo.slippage;
|
||||
}
|
||||
|
@@ -578,8 +578,8 @@ function calculateQuoteInfo(
|
||||
});
|
||||
|
||||
return {
|
||||
bestCaseQuoteInfo: fillResultsToQuoteInfo(bestCaseFillResult),
|
||||
worstCaseQuoteInfo: fillResultsToQuoteInfo(worstCaseFillResult),
|
||||
bestCaseQuoteInfo: fillResultsToQuoteInfo(bestCaseFillResult, 0),
|
||||
worstCaseQuoteInfo: fillResultsToQuoteInfo(worstCaseFillResult, slippage),
|
||||
sourceBreakdown: getSwapQuoteOrdersBreakdown(bestCaseFillResult.fillAmountBySource),
|
||||
};
|
||||
}
|
||||
@@ -599,29 +599,33 @@ function calculateTwoHopQuoteInfo(
|
||||
secondHopSource: _.pick(secondHopFill, 'source', 'fillData'),
|
||||
}),
|
||||
).toNumber();
|
||||
const isSell = operation === MarketOperation.Sell;
|
||||
|
||||
return {
|
||||
bestCaseQuoteInfo: {
|
||||
makerAmount: operation === MarketOperation.Sell ? secondHopFill.output : secondHopFill.input,
|
||||
takerAmount: operation === MarketOperation.Sell ? firstHopFill.input : firstHopFill.output,
|
||||
totalTakerAmount: operation === MarketOperation.Sell ? firstHopFill.input : firstHopFill.output,
|
||||
makerAmount: isSell ? secondHopFill.output : secondHopFill.input,
|
||||
takerAmount: isSell ? firstHopFill.input : firstHopFill.output,
|
||||
totalTakerAmount: isSell ? firstHopFill.input : firstHopFill.output,
|
||||
feeTakerTokenAmount: constants.ZERO_AMOUNT,
|
||||
protocolFeeInWeiAmount: constants.ZERO_AMOUNT,
|
||||
gas,
|
||||
slippage: 0,
|
||||
},
|
||||
// TODO jacob consolidate this with quote simulation worstCase
|
||||
worstCaseQuoteInfo: {
|
||||
makerAmount: MarketOperation.Sell
|
||||
makerAmount: isSell
|
||||
? secondHopOrder.makerAmount.times(1 - slippage).integerValue()
|
||||
: secondHopOrder.makerAmount,
|
||||
takerAmount: MarketOperation.Sell
|
||||
takerAmount: isSell
|
||||
? firstHopOrder.takerAmount
|
||||
: firstHopOrder.takerAmount.times(1 + slippage).integerValue(),
|
||||
totalTakerAmount: MarketOperation.Sell
|
||||
: firstHopOrder.takerAmount.times(1 + slippage).integerValue(BigNumber.ROUND_UP),
|
||||
totalTakerAmount: isSell
|
||||
? firstHopOrder.takerAmount
|
||||
: firstHopOrder.takerAmount.times(1 + slippage).integerValue(),
|
||||
: firstHopOrder.takerAmount.times(1 + slippage).integerValue(BigNumber.ROUND_UP),
|
||||
feeTakerTokenAmount: constants.ZERO_AMOUNT,
|
||||
protocolFeeInWeiAmount: constants.ZERO_AMOUNT,
|
||||
gas,
|
||||
slippage,
|
||||
},
|
||||
sourceBreakdown: {
|
||||
[ERC20BridgeSource.MultiHop]: {
|
||||
@@ -647,7 +651,7 @@ function getSwapQuoteOrdersBreakdown(fillAmountBySource: { [source: string]: Big
|
||||
return breakdown;
|
||||
}
|
||||
|
||||
function fillResultsToQuoteInfo(fr: QuoteFillResult): SwapQuoteInfo {
|
||||
function fillResultsToQuoteInfo(fr: QuoteFillResult, slippage: number): SwapQuoteInfo {
|
||||
return {
|
||||
makerAmount: fr.totalMakerAssetAmount,
|
||||
takerAmount: fr.takerAssetAmount,
|
||||
@@ -655,6 +659,7 @@ function fillResultsToQuoteInfo(fr: QuoteFillResult): SwapQuoteInfo {
|
||||
feeTakerTokenAmount: fr.takerFeeTakerAssetAmount,
|
||||
protocolFeeInWeiAmount: fr.protocolFeeAmount,
|
||||
gas: fr.gas,
|
||||
slippage,
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -208,6 +208,7 @@ export type SwapQuote = MarketBuySwapQuote | MarketSellSwapQuote;
|
||||
* makerTokenAmount: The amount of makerAsset that will be acquired through the swap.
|
||||
* protocolFeeInWeiAmount: The amount of ETH to pay (in WEI) as protocol fee to perform the swap for desired asset.
|
||||
* gas: Amount of estimated gas needed to fill the quote.
|
||||
* slippage: Amount of slippage to allow for.
|
||||
*/
|
||||
export interface SwapQuoteInfo {
|
||||
feeTakerTokenAmount: BigNumber;
|
||||
@@ -216,6 +217,7 @@ export interface SwapQuoteInfo {
|
||||
makerAmount: BigNumber;
|
||||
protocolFeeInWeiAmount: BigNumber;
|
||||
gas: number;
|
||||
slippage: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2,6 +2,7 @@ import { ChainId, getContractAddressesForChainOrThrow } from '@0x/contract-addre
|
||||
import { FillQuoteTransformerOrderType } from '@0x/protocol-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { formatBytes32String } from '@ethersproject/strings';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { TokenAdjacencyGraphBuilder } from '../token_adjacency_graph_builder';
|
||||
|
||||
@@ -17,7 +18,9 @@ import {
|
||||
ERC20BridgeSource,
|
||||
FeeSchedule,
|
||||
FillData,
|
||||
FinalUniswapV3FillData,
|
||||
GetMarketOrdersOpts,
|
||||
isFinalUniswapV3FillData,
|
||||
KyberSamplerOpts,
|
||||
LidoInfo,
|
||||
LiquidityProviderFillData,
|
||||
@@ -2039,19 +2042,19 @@ export const BEETHOVEN_X_SUBGRAPH_URL_BY_CHAIN = valueByChainId<string>(
|
||||
export const UNISWAPV3_CONFIG_BY_CHAIN_ID = valueByChainId(
|
||||
{
|
||||
[ChainId.Mainnet]: {
|
||||
quoter: '0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6',
|
||||
quoter: '0x61ffe014ba17989e743c5f6cb21bf9697530b21e',
|
||||
router: '0xe592427a0aece92de3edee1f18e0157c05861564',
|
||||
},
|
||||
[ChainId.Ropsten]: {
|
||||
quoter: '0x2f9e608fd881861b8916257b76613cb22ee0652c',
|
||||
quoter: '0x61ffe014ba17989e743c5f6cb21bf9697530b21e',
|
||||
router: '0x03782388516e94fcd4c18666303601a12aa729ea',
|
||||
},
|
||||
[ChainId.Polygon]: {
|
||||
quoter: '0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6',
|
||||
quoter: '0x61ffe014ba17989e743c5f6cb21bf9697530b21e',
|
||||
router: '0xe592427a0aece92de3edee1f18e0157c05861564',
|
||||
},
|
||||
[ChainId.Optimism]: {
|
||||
quoter: '0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6',
|
||||
quoter: '0x61ffe014ba17989e743c5f6cb21bf9697530b21e',
|
||||
router: '0xe592427a0aece92de3edee1f18e0157c05861564',
|
||||
},
|
||||
},
|
||||
@@ -2221,7 +2224,14 @@ export const SPOOKYSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
||||
|
||||
export const VIP_ERC20_BRIDGE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSource[]>(
|
||||
{
|
||||
[ChainId.Mainnet]: [ERC20BridgeSource.UniswapV2, ERC20BridgeSource.SushiSwap, ERC20BridgeSource.UniswapV3],
|
||||
[ChainId.Mainnet]: [
|
||||
ERC20BridgeSource.UniswapV2,
|
||||
ERC20BridgeSource.SushiSwap,
|
||||
ERC20BridgeSource.UniswapV3,
|
||||
ERC20BridgeSource.Curve,
|
||||
ERC20BridgeSource.LiquidityProvider,
|
||||
ERC20BridgeSource.Native,
|
||||
],
|
||||
[ChainId.BSC]: [
|
||||
ERC20BridgeSource.PancakeSwap,
|
||||
ERC20BridgeSource.PancakeSwapV2,
|
||||
@@ -2231,6 +2241,8 @@ export const VIP_ERC20_BRIDGE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSo
|
||||
ERC20BridgeSource.CafeSwap,
|
||||
ERC20BridgeSource.CheeseSwap,
|
||||
ERC20BridgeSource.JulSwap,
|
||||
ERC20BridgeSource.LiquidityProvider,
|
||||
ERC20BridgeSource.Native,
|
||||
],
|
||||
},
|
||||
[],
|
||||
@@ -2334,11 +2346,33 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
|
||||
return gas;
|
||||
},
|
||||
[ERC20BridgeSource.UniswapV3]: (fillData?: FillData) => {
|
||||
let gas = 100e3;
|
||||
const path = (fillData as UniswapV3FillData).tokenAddressPath;
|
||||
if (path.length > 2) {
|
||||
gas += (path.length - 2) * 32e3; // +32k for each hop.
|
||||
const uniFillData = fillData as UniswapV3FillData | FinalUniswapV3FillData;
|
||||
// NOTE: This base value was heuristically chosen by looking at how much it generally
|
||||
// underestimated gas usage
|
||||
const base = 34e3; // 34k base
|
||||
let gas = base;
|
||||
if (isFinalUniswapV3FillData(uniFillData)) {
|
||||
gas += uniFillData.gasUsed;
|
||||
} else {
|
||||
// NOTE: We don't actually know which of the paths would be used in the router
|
||||
// therefore we estimate using the mean of gas prices returned from UniswapV3
|
||||
// For the best case scenario (least amount of hops & ticks) this will
|
||||
// over estimate the gas usage
|
||||
const pathAmountsWithGasUsed = uniFillData.pathAmounts.filter(p => p.gasUsed > 0);
|
||||
const meanGasUsedForPath = Math.round(_.meanBy(pathAmountsWithGasUsed, p => p.gasUsed));
|
||||
gas += meanGasUsedForPath;
|
||||
}
|
||||
|
||||
// If we for some reason could not read `gasUsed` when sampling
|
||||
// fall back to legacy gas estimation
|
||||
if (gas === base) {
|
||||
gas = 100e3;
|
||||
const path = uniFillData.tokenAddressPath;
|
||||
if (path.length > 2) {
|
||||
gas += (path.length - 2) * 32e3; // +32k for each hop.
|
||||
}
|
||||
}
|
||||
|
||||
return gas;
|
||||
},
|
||||
[ERC20BridgeSource.Lido]: () => 226e3,
|
||||
|
@@ -36,6 +36,7 @@ import {
|
||||
ShellFillData,
|
||||
UniswapV2FillData,
|
||||
UniswapV3FillData,
|
||||
UniswapV3PathAmount,
|
||||
} from './types';
|
||||
|
||||
// tslint:disable completed-docs
|
||||
@@ -387,11 +388,14 @@ function createFinalBridgeOrderFillDataFromCollapsedFill(fill: CollapsedFill): F
|
||||
switch (fill.source) {
|
||||
case ERC20BridgeSource.UniswapV3: {
|
||||
const fd = fill.fillData as UniswapV3FillData;
|
||||
return {
|
||||
const { uniswapPath, gasUsed } = getBestUniswapV3PathAmountForInputAmount(fd, fill.input);
|
||||
const finalFillData: FinalUniswapV3FillData = {
|
||||
router: fd.router,
|
||||
tokenAddressPath: fd.tokenAddressPath,
|
||||
uniswapPath: getBestUniswapV3PathForInputAmount(fd, fill.input),
|
||||
uniswapPath,
|
||||
gasUsed,
|
||||
};
|
||||
return finalFillData;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@@ -399,18 +403,21 @@ function createFinalBridgeOrderFillDataFromCollapsedFill(fill: CollapsedFill): F
|
||||
return fill.fillData;
|
||||
}
|
||||
|
||||
function getBestUniswapV3PathForInputAmount(fillData: UniswapV3FillData, inputAmount: BigNumber): string {
|
||||
function getBestUniswapV3PathAmountForInputAmount(
|
||||
fillData: UniswapV3FillData,
|
||||
inputAmount: BigNumber,
|
||||
): UniswapV3PathAmount {
|
||||
if (fillData.pathAmounts.length === 0) {
|
||||
throw new Error(`No Uniswap V3 paths`);
|
||||
}
|
||||
// Find the best path that can satisfy `inputAmount`.
|
||||
// Assumes `fillData.pathAmounts` is sorted ascending.
|
||||
for (const { inputAmount: pathInputAmount, uniswapPath } of fillData.pathAmounts) {
|
||||
if (pathInputAmount.gte(inputAmount)) {
|
||||
return uniswapPath;
|
||||
for (const pathAmount of fillData.pathAmounts) {
|
||||
if (pathAmount.inputAmount.gte(inputAmount)) {
|
||||
return pathAmount;
|
||||
}
|
||||
}
|
||||
return fillData.pathAmounts[fillData.pathAmounts.length - 1].uniswapPath;
|
||||
return fillData.pathAmounts[fillData.pathAmounts.length - 1];
|
||||
}
|
||||
|
||||
export function getMakerTakerTokens(opts: CreateOrderFromPathOpts): [string, string] {
|
||||
|
@@ -10,13 +10,11 @@ import { VIP_ERC20_BRIDGE_SOURCES_BY_CHAIN_ID } from '../market_operation_utils/
|
||||
|
||||
import { dexSamplesToFills, ethToOutputAmount, nativeOrdersToFills } from './fills';
|
||||
import { DEFAULT_PATH_PENALTY_OPTS, Path, PathPenaltyOpts } from './path';
|
||||
import { getRate } from './rate_utils';
|
||||
import { DexSample, ERC20BridgeSource, FeeSchedule, Fill, FillData, SamplerMetrics } from './types';
|
||||
|
||||
// tslint:disable: prefer-for-of custom-no-magic-numbers completed-docs no-bitwise
|
||||
|
||||
const RUN_LIMIT_DECAY_FACTOR = 0.5;
|
||||
const FILL_QUOTE_TRANSFORMER_GAS_OVERHEAD = new BigNumber(150e3);
|
||||
// NOTE: The Rust router will panic with less than 3 samples
|
||||
const MIN_NUM_SAMPLE_INPUTS = 3;
|
||||
|
||||
@@ -275,16 +273,14 @@ function findRoutesAndCreateOptimalPath(
|
||||
}
|
||||
|
||||
// TODO(kimpers): remove once we have solved the rounding/precision loss issues in the Rust router
|
||||
const scaleOutput = (fillInput: BigNumber, output: BigNumber) =>
|
||||
output
|
||||
.dividedBy(fillInput)
|
||||
.times(rustInputAdjusted)
|
||||
.decimalPlaces(0, side === MarketOperation.Sell ? BigNumber.ROUND_FLOOR : BigNumber.ROUND_CEIL);
|
||||
const maxSampledOutput = BigNumber.max(...routeSamples.map(s => s.output));
|
||||
const scaleOutput = (output: BigNumber) => BigNumber.min(output.times(scale), maxSampledOutput);
|
||||
|
||||
adjustedFills.push({
|
||||
...fill,
|
||||
input: rustInputAdjusted,
|
||||
output: scaleOutput(fill.input, fill.output),
|
||||
adjustedOutput: scaleOutput(fill.input, fill.adjustedOutput),
|
||||
output: scaleOutput(fill.output),
|
||||
adjustedOutput: scaleOutput(fill.adjustedOutput),
|
||||
index: 0,
|
||||
parent: undefined,
|
||||
sourcePathId: sourcePathId ?? hexUtils.random(),
|
||||
@@ -295,7 +291,7 @@ function findRoutesAndCreateOptimalPath(
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const pathFromRustInputs = Path.create(side, adjustedFills, input);
|
||||
const pathFromRustInputs = Path.create(side, adjustedFills, input, opts);
|
||||
|
||||
return pathFromRustInputs;
|
||||
}
|
||||
@@ -360,17 +356,7 @@ export function findOptimalRustPathFromSamples(
|
||||
timingMs: performance.now() - beforeTimeMs,
|
||||
});
|
||||
|
||||
const { input: allSourcesInput, output: allSourcesOutput } = allSourcesPath.adjustedSize();
|
||||
// NOTE: For sell quotes input is the taker asset and for buy quotes input is the maker asset
|
||||
const gasCostInWei = FILL_QUOTE_TRANSFORMER_GAS_OVERHEAD.times(opts.gasPrice);
|
||||
const fqtOverheadInOutputToken = gasCostInWei.times(opts.outputAmountPerEth);
|
||||
const outputWithFqtOverhead =
|
||||
side === MarketOperation.Sell
|
||||
? allSourcesOutput.minus(fqtOverheadInOutputToken)
|
||||
: allSourcesOutput.plus(fqtOverheadInOutputToken);
|
||||
const allSourcesAdjustedRateWithFqtOverhead = getRate(side, allSourcesInput, outputWithFqtOverhead);
|
||||
|
||||
if (vipSourcesPath?.adjustedRate().isGreaterThan(allSourcesAdjustedRateWithFqtOverhead)) {
|
||||
if (vipSourcesPath?.isBetterThan(allSourcesPath)) {
|
||||
return vipSourcesPath;
|
||||
}
|
||||
}
|
||||
|
@@ -767,16 +767,17 @@ export class SamplerOperations {
|
||||
function: this._samplerContract.sampleSellsFromUniswapV3,
|
||||
params: [quoter, tokenAddressPath, takerFillAmounts],
|
||||
callback: (callResults: string, fillData: UniswapV3FillData): BigNumber[] => {
|
||||
const [paths, samples] = this._samplerContract.getABIDecodedReturnData<[string[], BigNumber[]]>(
|
||||
'sampleSellsFromUniswapV3',
|
||||
callResults,
|
||||
);
|
||||
const [paths, samples, gasUsed] = this._samplerContract.getABIDecodedReturnData<
|
||||
[string[], BigNumber[], BigNumber[]]
|
||||
>('sampleSellsFromUniswapV3', callResults);
|
||||
fillData.router = router;
|
||||
fillData.tokenAddressPath = tokenAddressPath;
|
||||
fillData.pathAmounts = paths.map((uniswapPath, i) => ({
|
||||
uniswapPath,
|
||||
inputAmount: takerFillAmounts[i],
|
||||
gasUsed: gasUsed[i].toNumber(),
|
||||
}));
|
||||
|
||||
return samples;
|
||||
},
|
||||
});
|
||||
@@ -795,15 +796,15 @@ export class SamplerOperations {
|
||||
function: this._samplerContract.sampleBuysFromUniswapV3,
|
||||
params: [quoter, tokenAddressPath, makerFillAmounts],
|
||||
callback: (callResults: string, fillData: UniswapV3FillData): BigNumber[] => {
|
||||
const [paths, samples] = this._samplerContract.getABIDecodedReturnData<[string[], BigNumber[]]>(
|
||||
'sampleBuysFromUniswapV3',
|
||||
callResults,
|
||||
);
|
||||
const [paths, samples, gasUsed] = this._samplerContract.getABIDecodedReturnData<
|
||||
[string[], BigNumber[], BigNumber[]]
|
||||
>('sampleBuysFromUniswapV3', callResults);
|
||||
fillData.router = router;
|
||||
fillData.tokenAddressPath = tokenAddressPath;
|
||||
fillData.pathAmounts = paths.map((uniswapPath, i) => ({
|
||||
uniswapPath,
|
||||
inputAmount: makerFillAmounts[i],
|
||||
gasUsed: gasUsed[i].toNumber(),
|
||||
}));
|
||||
return samples;
|
||||
},
|
||||
|
@@ -268,19 +268,34 @@ export interface HopInfo {
|
||||
returnData: string;
|
||||
}
|
||||
|
||||
export interface UniswapV3PathAmount {
|
||||
uniswapPath: string;
|
||||
inputAmount: BigNumber;
|
||||
gasUsed: number;
|
||||
}
|
||||
export interface UniswapV3FillData extends FillData {
|
||||
tokenAddressPath: string[];
|
||||
router: string;
|
||||
pathAmounts: Array<{ uniswapPath: string; inputAmount: BigNumber }>;
|
||||
pathAmounts: UniswapV3PathAmount[];
|
||||
}
|
||||
|
||||
export interface KyberDmmFillData extends UniswapV2FillData {
|
||||
poolsPath: string[];
|
||||
}
|
||||
|
||||
export interface FinalUniswapV3FillData extends Omit<UniswapV3FillData, 'uniswapPaths'> {
|
||||
/**
|
||||
* Determines whether FillData is UniswapV3FillData or FinalUniswapV3FillData
|
||||
*/
|
||||
export function isFinalUniswapV3FillData(
|
||||
data: UniswapV3FillData | FinalUniswapV3FillData,
|
||||
): data is FinalUniswapV3FillData {
|
||||
return !!(data as FinalUniswapV3FillData).uniswapPath;
|
||||
}
|
||||
|
||||
export interface FinalUniswapV3FillData extends Omit<UniswapV3FillData, 'pathAmounts'> {
|
||||
// The uniswap-encoded path that can fll the maximum input amount.
|
||||
uniswapPath: string;
|
||||
gasUsed: number;
|
||||
}
|
||||
|
||||
export interface LidoFillData extends FillData {
|
||||
|
@@ -125,6 +125,7 @@ describe('ExchangeProxySwapQuoteConsumer', () => {
|
||||
gas: Math.floor(Math.random() * 8e6),
|
||||
protocolFeeInWeiAmount: getRandomAmount(),
|
||||
feeTakerTokenAmount: getRandomAmount(),
|
||||
slippage: 0,
|
||||
},
|
||||
worstCaseQuoteInfo: {
|
||||
makerAmount: makerTokenFillAmount,
|
||||
@@ -133,6 +134,7 @@ describe('ExchangeProxySwapQuoteConsumer', () => {
|
||||
gas: Math.floor(Math.random() * 8e6),
|
||||
protocolFeeInWeiAmount: getRandomAmount(),
|
||||
feeTakerTokenAmount: getRandomAmount(),
|
||||
slippage: 0,
|
||||
},
|
||||
makerAmountPerEth: getRandomInteger(1, 1e9),
|
||||
takerAmountPerEth: getRandomInteger(1, 1e9),
|
||||
|
@@ -24,6 +24,7 @@ export async function getFullyFillableSwapQuoteWithNoFeesAsync(
|
||||
totalTakerAmount: takerAmount,
|
||||
protocolFeeInWeiAmount: protocolFeePerOrder.times(orders.length),
|
||||
gas: 200e3,
|
||||
slippage: 0,
|
||||
};
|
||||
|
||||
const breakdown = {
|
||||
|
218
yarn.lock
218
yarn.lock
@@ -2993,12 +2993,6 @@ ansi-escapes@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
|
||||
|
||||
ansi-escapes@^4.2.1:
|
||||
version "4.3.2"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
|
||||
dependencies:
|
||||
type-fest "^0.21.3"
|
||||
|
||||
ansi-regex@^2.0.0:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
|
||||
@@ -3109,14 +3103,6 @@ arr-union@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
||||
|
||||
array-back@^3.0.1:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/array-back/-/array-back-3.1.0.tgz#b8859d7a508871c9a7b2cf42f99428f65e96bfb0"
|
||||
|
||||
array-back@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/array-back/-/array-back-4.0.1.tgz#9b80312935a52062e1a233a9c7abeb5481b30e90"
|
||||
|
||||
array-differ@^2.0.3:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-2.1.0.tgz#4b9c1c3f14b906757082925769e8ab904f4801b1"
|
||||
@@ -4261,6 +4247,11 @@ caniuse-lite@^1.0.30000844:
|
||||
version "1.0.30001151"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz#1ddfde5e6fff02aad7940b4edb7d3ac76b0cb00b"
|
||||
|
||||
cargo-cp-artifact@^0.1.6:
|
||||
version "0.1.6"
|
||||
resolved "https://registry.yarnpkg.com/cargo-cp-artifact/-/cargo-cp-artifact-0.1.6.tgz#df1bc9dad036ae0f4230639a869182e1d5850f89"
|
||||
integrity sha512-CQw0doK/aaF7j041666XzuilHxqMxaKkn+I5vmBsd8SAwS0cO5CqVEVp0xJwOKstyqWZ6WK4Ww3O6p26x/Goyg==
|
||||
|
||||
caseless@~0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
|
||||
@@ -4311,13 +4302,6 @@ chalk@^4.0.0:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
chalk@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad"
|
||||
dependencies:
|
||||
ansi-styles "^4.1.0"
|
||||
supports-color "^7.1.0"
|
||||
|
||||
change-case@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.1.0.tgz#0e611b7edc9952df2e8513b27b42de72647dd17e"
|
||||
@@ -4435,12 +4419,6 @@ cli-cursor@^2.1.0:
|
||||
dependencies:
|
||||
restore-cursor "^2.0.0"
|
||||
|
||||
cli-cursor@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
|
||||
dependencies:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-format@^3.0.9:
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/cli-format/-/cli-format-3.0.9.tgz#ea2cf6df891a8deaaa0dae7d9b8bd21dd8661bb2"
|
||||
@@ -4455,10 +4433,6 @@ cli-width@^2.0.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48"
|
||||
|
||||
cli-width@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
|
||||
|
||||
cliui@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
|
||||
@@ -4591,30 +4565,6 @@ command-exists@^1.2.8:
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69"
|
||||
|
||||
command-line-args@^5.1.1:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-5.1.1.tgz#88e793e5bb3ceb30754a86863f0401ac92fd369a"
|
||||
dependencies:
|
||||
array-back "^3.0.1"
|
||||
find-replace "^3.0.0"
|
||||
lodash.camelcase "^4.3.0"
|
||||
typical "^4.0.0"
|
||||
|
||||
command-line-commands@^3.0.1:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/command-line-commands/-/command-line-commands-3.0.2.tgz#53872a1181db837f21906b1228e260a4eeb42ee4"
|
||||
dependencies:
|
||||
array-back "^4.0.1"
|
||||
|
||||
command-line-usage@^6.1.0:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-6.1.1.tgz#c908e28686108917758a49f45efb4f02f76bc03f"
|
||||
dependencies:
|
||||
array-back "^4.0.1"
|
||||
chalk "^2.4.2"
|
||||
table-layout "^1.0.1"
|
||||
typical "^5.2.0"
|
||||
|
||||
commander@2.18.0:
|
||||
version "2.18.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
|
||||
@@ -5152,7 +5102,7 @@ deep-equal@~1.1.1:
|
||||
object-keys "^1.1.1"
|
||||
regexp.prototype.flags "^1.2.0"
|
||||
|
||||
deep-extend@^0.6.0, deep-extend@~0.6.0:
|
||||
deep-extend@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
|
||||
|
||||
@@ -6399,13 +6349,13 @@ fake-merkle-patricia-tree@^1.0.1:
|
||||
dependencies:
|
||||
checkpoint-store "^1.1.0"
|
||||
|
||||
fast-abi@^0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/fast-abi/-/fast-abi-0.0.2.tgz#da5f796fd7c7b0c966d916ee21daae3eca61c07c"
|
||||
integrity sha512-k/2s63SkFf6jU2LyF6oQC5/N+L90q6VD1wkp2NXo+DSHoTeOJD2Q6Egpcs+bTPODik0CHxjb7lORgsG+QCRq/Q==
|
||||
fast-abi@^0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/fast-abi/-/fast-abi-0.0.4.tgz#c6a547d0fe75862a9eea6fe5aa7ab135e6ab62a0"
|
||||
integrity sha512-BM/x54z6i5L+VnHk1c1xt4sSlx4SCIZNQJ3tNBrM88ytOSd/JY/2pRVkx/RxY3sdF6X5exgB6YVemCqVLzQzUA==
|
||||
dependencies:
|
||||
"@mapbox/node-pre-gyp" "^1.0.4"
|
||||
neon-cli "^0.8.0"
|
||||
cargo-cp-artifact "^0.1.6"
|
||||
uuid "^8.3.2"
|
||||
|
||||
fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
|
||||
@@ -6457,12 +6407,6 @@ figures@^2.0.0:
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.5"
|
||||
|
||||
figures@^3.0.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.5"
|
||||
|
||||
file-entry-cache@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
|
||||
@@ -6534,12 +6478,6 @@ find-cache-dir@^0.1.1:
|
||||
mkdirp "^0.5.1"
|
||||
pkg-dir "^1.0.0"
|
||||
|
||||
find-replace@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-3.0.0.tgz#3e7e23d3b05167a76f770c9fbd5258b0def68c38"
|
||||
dependencies:
|
||||
array-back "^3.0.1"
|
||||
|
||||
find-up@3.0.0, find-up@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
|
||||
@@ -6903,12 +6841,6 @@ ghauth@^2.0.0:
|
||||
read "~1.0.5"
|
||||
xtend "~4.0.0"
|
||||
|
||||
git-config@0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/git-config/-/git-config-0.0.7.tgz#a9c8a3ef07a776c3d72261356d8b727b62202b28"
|
||||
dependencies:
|
||||
iniparser "~1.0.5"
|
||||
|
||||
git-raw-commits@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5"
|
||||
@@ -7506,10 +7438,6 @@ ini@^1.3.2, ini@^1.3.4, ini@~1.3.0:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
|
||||
|
||||
iniparser@~1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/iniparser/-/iniparser-1.0.5.tgz#836d6befe6dfbfcee0bccf1cf9f2acc7027f783d"
|
||||
|
||||
init-package-json@^1.10.3:
|
||||
version "1.10.3"
|
||||
resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe"
|
||||
@@ -7541,24 +7469,6 @@ inquirer@^6.2.0, inquirer@^6.2.2:
|
||||
strip-ansi "^5.1.0"
|
||||
through "^2.3.6"
|
||||
|
||||
inquirer@^7.3.3:
|
||||
version "7.3.3"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
|
||||
dependencies:
|
||||
ansi-escapes "^4.2.1"
|
||||
chalk "^4.1.0"
|
||||
cli-cursor "^3.1.0"
|
||||
cli-width "^3.0.0"
|
||||
external-editor "^3.0.3"
|
||||
figures "^3.0.0"
|
||||
lodash "^4.17.19"
|
||||
mute-stream "0.0.8"
|
||||
run-async "^2.4.0"
|
||||
rxjs "^6.6.0"
|
||||
string-width "^4.1.0"
|
||||
strip-ansi "^6.0.0"
|
||||
through "^2.3.6"
|
||||
|
||||
interpret@^1.0.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||
@@ -8528,10 +8438,6 @@ lodash._reinterpolate@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
|
||||
|
||||
lodash.camelcase@^4.3.0:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
|
||||
|
||||
lodash.clonedeep@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
|
||||
@@ -8589,10 +8495,6 @@ lodash@4.17.20, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.
|
||||
version "4.17.20"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
||||
|
||||
lodash@^4.17.19:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||
|
||||
log-driver@^1.2.7:
|
||||
version "1.2.7"
|
||||
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
|
||||
@@ -8746,10 +8648,6 @@ make-promises-safe@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-promises-safe/-/make-promises-safe-1.1.0.tgz#b4d28c61ef8ad5502f38dbb3a0ee89627f76ad61"
|
||||
|
||||
make-promises-safe@^5.1.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-promises-safe/-/make-promises-safe-5.1.0.tgz#dd9d311f555bcaa144f12e225b3d37785f0aa8f2"
|
||||
|
||||
map-age-cleaner@^0.1.1:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a"
|
||||
@@ -8985,7 +8883,7 @@ mimic-fn@^1.0.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||
|
||||
mimic-fn@^2.0.0, mimic-fn@^2.1.0:
|
||||
mimic-fn@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
||||
|
||||
@@ -9255,7 +9153,7 @@ mute-stream@0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
|
||||
|
||||
mute-stream@0.0.8, mute-stream@~0.0.4:
|
||||
mute-stream@~0.0.4:
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
|
||||
|
||||
@@ -9315,25 +9213,6 @@ neo-async@^2.6.0:
|
||||
version "2.6.2"
|
||||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
|
||||
|
||||
neon-cli@^0.8.0:
|
||||
version "0.8.0"
|
||||
resolved "https://registry.yarnpkg.com/neon-cli/-/neon-cli-0.8.0.tgz#bca2e1cbc9706c65bf736a7057e6b3bf28f55857"
|
||||
dependencies:
|
||||
chalk "^4.1.0"
|
||||
command-line-args "^5.1.1"
|
||||
command-line-commands "^3.0.1"
|
||||
command-line-usage "^6.1.0"
|
||||
git-config "0.0.7"
|
||||
handlebars "^4.7.6"
|
||||
inquirer "^7.3.3"
|
||||
make-promises-safe "^5.1.0"
|
||||
rimraf "^3.0.2"
|
||||
semver "^7.3.2"
|
||||
toml "^3.0.0"
|
||||
ts-typed-json "^0.3.2"
|
||||
validate-npm-package-license "^3.0.4"
|
||||
validate-npm-package-name "^3.0.0"
|
||||
|
||||
next-tick@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
||||
@@ -9751,12 +9630,6 @@ onetime@^2.0.0:
|
||||
dependencies:
|
||||
mimic-fn "^1.0.0"
|
||||
|
||||
onetime@^5.1.0:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
|
||||
dependencies:
|
||||
mimic-fn "^2.1.0"
|
||||
|
||||
optionator@^0.8.1, optionator@^0.8.2:
|
||||
version "0.8.3"
|
||||
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
|
||||
@@ -10779,10 +10652,6 @@ redent@^3.0.0:
|
||||
indent-string "^4.0.0"
|
||||
strip-indent "^3.0.0"
|
||||
|
||||
reduce-flatten@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"
|
||||
|
||||
regenerate@^1.2.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.1.tgz#cad92ad8e6b591773485fbe05a485caf4f457e6f"
|
||||
@@ -10985,13 +10854,6 @@ restore-cursor@^2.0.0:
|
||||
onetime "^2.0.0"
|
||||
signal-exit "^3.0.2"
|
||||
|
||||
restore-cursor@^3.1.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
|
||||
dependencies:
|
||||
onetime "^5.1.0"
|
||||
signal-exit "^3.0.2"
|
||||
|
||||
resumer@~0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759"
|
||||
@@ -11045,7 +10907,7 @@ rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4:
|
||||
dependencies:
|
||||
bn.js "^4.11.1"
|
||||
|
||||
run-async@^2.2.0, run-async@^2.4.0:
|
||||
run-async@^2.2.0:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
|
||||
|
||||
@@ -11065,12 +10927,6 @@ rxjs@^6.4.0, rxjs@^6.5.3:
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
rxjs@^6.6.0:
|
||||
version "6.6.7"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9"
|
||||
dependencies:
|
||||
tslib "^1.9.0"
|
||||
|
||||
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||
version "5.1.2"
|
||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||
@@ -11691,14 +11547,6 @@ string-width@^3.0.0, string-width@^3.1.0:
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
strip-ansi "^5.1.0"
|
||||
|
||||
string-width@^4.1.0:
|
||||
version "4.2.2"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5"
|
||||
dependencies:
|
||||
emoji-regex "^8.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
string-width@^4.2.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
|
||||
@@ -11911,15 +11759,6 @@ swarm-js@^0.1.40:
|
||||
tar "^4.0.2"
|
||||
xhr-request "^1.0.1"
|
||||
|
||||
table-layout@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-1.0.2.tgz#c4038a1853b0136d63365a734b6931cf4fad4a04"
|
||||
dependencies:
|
||||
array-back "^4.0.1"
|
||||
deep-extend "~0.6.0"
|
||||
typical "^5.2.0"
|
||||
wordwrapjs "^4.0.0"
|
||||
|
||||
table@^5.2.3:
|
||||
version "5.4.6"
|
||||
resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
|
||||
@@ -12200,10 +12039,6 @@ toidentifier@1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
|
||||
|
||||
toml@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee"
|
||||
|
||||
toposort@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/toposort/-/toposort-2.0.2.tgz#ae21768175d1559d48bef35420b2f4962f09c330"
|
||||
@@ -12249,10 +12084,6 @@ truffle@^5.0.32:
|
||||
mocha "8.1.2"
|
||||
original-require "1.0.1"
|
||||
|
||||
ts-typed-json@^0.3.2:
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/ts-typed-json/-/ts-typed-json-0.3.2.tgz#f4f20f45950bae0a383857f7b0a94187eca1b56a"
|
||||
|
||||
tslib@1.9.0:
|
||||
version "1.9.0"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
|
||||
@@ -12342,10 +12173,6 @@ type-fest@^0.13.1:
|
||||
version "0.13.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||
|
||||
type-fest@^0.21.3:
|
||||
version "0.21.3"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
|
||||
|
||||
type-fest@^0.3.0:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"
|
||||
@@ -12449,14 +12276,6 @@ typewiselite@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e"
|
||||
|
||||
typical@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
|
||||
|
||||
typical@^5.2.0:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/typical/-/typical-5.2.0.tgz#4daaac4f2b5315460804f0acf6cb69c52bb93066"
|
||||
|
||||
u2f-api@0.2.7:
|
||||
version "0.2.7"
|
||||
resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"
|
||||
@@ -12688,7 +12507,7 @@ valid-url@^1.0.9:
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200"
|
||||
|
||||
validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3, validate-npm-package-license@^3.0.4:
|
||||
validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.3:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
|
||||
dependencies:
|
||||
@@ -13467,13 +13286,6 @@ wordwrap@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
|
||||
|
||||
wordwrapjs@^4.0.0:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-4.0.1.tgz#d9790bccfb110a0fc7836b5ebce0937b37a8b98f"
|
||||
dependencies:
|
||||
reduce-flatten "^2.0.0"
|
||||
typical "^5.2.0"
|
||||
|
||||
workerpool@6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.0.tgz#85aad67fa1a2c8ef9386a1b43539900f61d03d58"
|
||||
|
Reference in New Issue
Block a user