fix: BalancerV2 sor alias (#481)
* Install both Balancer sor and rename early version to v1 * yarn.lock * CHANGELOG
This commit is contained in:
		
				
					committed by
					
						
						Noah Khamliche
					
				
			
			
				
	
			
			
			
						parent
						
							01f4e0eb48
						
					
				
				
					commit
					777f83c702
				
			@@ -1,4 +1,13 @@
 | 
			
		||||
[
 | 
			
		||||
    {
 | 
			
		||||
        "version": "16.60.1",
 | 
			
		||||
        "changes": [
 | 
			
		||||
            {
 | 
			
		||||
                "note": "Alias Balancer sor to the old version",
 | 
			
		||||
                "pr": 481
 | 
			
		||||
            }
 | 
			
		||||
        ]
 | 
			
		||||
    },
 | 
			
		||||
    {
 | 
			
		||||
        "version": "16.60.0",
 | 
			
		||||
        "changes": [
 | 
			
		||||
 
 | 
			
		||||
@@ -80,8 +80,7 @@
 | 
			
		||||
        "@0x/typescript-typings": "^5.3.1",
 | 
			
		||||
        "@0x/utils": "^6.5.3",
 | 
			
		||||
        "@0x/web3-wrapper": "^7.6.5",
 | 
			
		||||
        "@balancer-labs/sdk": "^0.1.6",
 | 
			
		||||
        "@balancer-labs/sor": "0.3.2",
 | 
			
		||||
        "@balancer-labs/sdk": "0.1.6",
 | 
			
		||||
        "@bancor/sdk": "0.2.9",
 | 
			
		||||
        "@ethersproject/abi": "^5.0.1",
 | 
			
		||||
        "@ethersproject/address": "^5.0.1",
 | 
			
		||||
@@ -100,7 +99,7 @@
 | 
			
		||||
        "graphql-request": "^3.4.0",
 | 
			
		||||
        "heartbeats": "^5.0.1",
 | 
			
		||||
        "lodash": "^4.17.11",
 | 
			
		||||
        "sorV2": "npm:@balancer-labs/sor"
 | 
			
		||||
        "balancer-labs-sor-v1": "npm:@balancer-labs/sor@0.3.2"
 | 
			
		||||
    },
 | 
			
		||||
    "devDependencies": {
 | 
			
		||||
        "@0x/abi-gen": "^5.8.0",
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,107 @@
 | 
			
		||||
import { getPoolsWithTokens, parsePoolData } from 'balancer-labs-sor-v1';
 | 
			
		||||
import { Pool } from 'balancer-labs-sor-v1/dist/types';
 | 
			
		||||
import { gql, request } from 'graphql-request';
 | 
			
		||||
 | 
			
		||||
import { BALANCER_MAX_POOLS_FETCHED, BALANCER_SUBGRAPH_URL, BALANCER_TOP_POOLS_FETCHED } from '../constants';
 | 
			
		||||
 | 
			
		||||
import { CacheValue, PoolsCache } from './pools_cache';
 | 
			
		||||
 | 
			
		||||
// tslint:disable:custom-no-magic-numbers
 | 
			
		||||
const ONE_DAY_MS = 24 * 60 * 60 * 1000;
 | 
			
		||||
// tslint:enable:custom-no-magic-numbers
 | 
			
		||||
 | 
			
		||||
interface BalancerPoolResponse {
 | 
			
		||||
    id: string;
 | 
			
		||||
    swapFee: string;
 | 
			
		||||
    tokens: Array<{ address: string; decimals: number; balance: string }>;
 | 
			
		||||
    tokensList: string[];
 | 
			
		||||
    totalWeight: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export class BalancerPoolsCache extends PoolsCache {
 | 
			
		||||
    constructor(
 | 
			
		||||
        private readonly _subgraphUrl: string = BALANCER_SUBGRAPH_URL,
 | 
			
		||||
        cache: { [key: string]: CacheValue } = {},
 | 
			
		||||
        private readonly maxPoolsFetched: number = BALANCER_MAX_POOLS_FETCHED,
 | 
			
		||||
        private readonly _topPoolsFetched: number = BALANCER_TOP_POOLS_FETCHED,
 | 
			
		||||
    ) {
 | 
			
		||||
        super(cache);
 | 
			
		||||
        void this._loadTopPoolsAsync();
 | 
			
		||||
        // Reload the top pools every 12 hours
 | 
			
		||||
        setInterval(async () => void this._loadTopPoolsAsync(), ONE_DAY_MS / 2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected async _fetchPoolsForPairAsync(takerToken: string, makerToken: string): Promise<Pool[]> {
 | 
			
		||||
        try {
 | 
			
		||||
            const poolData = (await getPoolsWithTokens(takerToken, makerToken)).pools;
 | 
			
		||||
            // Sort by maker token balance (descending)
 | 
			
		||||
            const pools = parsePoolData(poolData, takerToken, makerToken).sort((a, b) =>
 | 
			
		||||
                b.balanceOut.minus(a.balanceOut).toNumber(),
 | 
			
		||||
            );
 | 
			
		||||
            return pools.length > this.maxPoolsFetched ? pools.slice(0, this.maxPoolsFetched) : pools;
 | 
			
		||||
        } catch (err) {
 | 
			
		||||
            return [];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected async _loadTopPoolsAsync(): Promise<void> {
 | 
			
		||||
        const fromToPools: {
 | 
			
		||||
            [from: string]: { [to: string]: Pool[] };
 | 
			
		||||
        } = {};
 | 
			
		||||
 | 
			
		||||
        const pools = await this._fetchTopPoolsAsync();
 | 
			
		||||
        for (const pool of pools) {
 | 
			
		||||
            const { tokensList } = pool;
 | 
			
		||||
            for (const from of tokensList) {
 | 
			
		||||
                for (const to of tokensList.filter(t => t.toLowerCase() !== from.toLowerCase())) {
 | 
			
		||||
                    fromToPools[from] = fromToPools[from] || {};
 | 
			
		||||
                    fromToPools[from][to] = fromToPools[from][to] || [];
 | 
			
		||||
 | 
			
		||||
                    try {
 | 
			
		||||
                        // The list of pools must be relevant to `from` and `to`  for `parsePoolData`
 | 
			
		||||
                        const poolData = parsePoolData([pool], from, to);
 | 
			
		||||
                        fromToPools[from][to].push(poolData[0]);
 | 
			
		||||
                        // Cache this as we progress through
 | 
			
		||||
                        const expiresAt = Date.now() + this._cacheTimeMs;
 | 
			
		||||
                        this._cachePoolsForPair(from, to, fromToPools[from][to], expiresAt);
 | 
			
		||||
                    } catch {
 | 
			
		||||
                        // soldier on
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected async _fetchTopPoolsAsync(): Promise<BalancerPoolResponse[]> {
 | 
			
		||||
        const query = gql`
 | 
			
		||||
            query fetchTopPools($topPoolsFetched: Int!) {
 | 
			
		||||
                pools(
 | 
			
		||||
                    first: $topPoolsFetched
 | 
			
		||||
                    where: { publicSwap: true, liquidity_gt: 0 }
 | 
			
		||||
                    orderBy: swapsCount
 | 
			
		||||
                    orderDirection: desc
 | 
			
		||||
                ) {
 | 
			
		||||
                    id
 | 
			
		||||
                    publicSwap
 | 
			
		||||
                    swapFee
 | 
			
		||||
                    totalWeight
 | 
			
		||||
                    tokensList
 | 
			
		||||
                    tokens {
 | 
			
		||||
                        id
 | 
			
		||||
                        address
 | 
			
		||||
                        balance
 | 
			
		||||
                        decimals
 | 
			
		||||
                        symbol
 | 
			
		||||
                        denormWeight
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        `;
 | 
			
		||||
        try {
 | 
			
		||||
            const { pools } = await request(this._subgraphUrl, query, { topPoolsFetched: this._topPoolsFetched });
 | 
			
		||||
            return pools;
 | 
			
		||||
        } catch (err) {
 | 
			
		||||
            return [];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
import { ChainId } from '@0x/contract-addresses';
 | 
			
		||||
import { BigNumber } from '@0x/utils';
 | 
			
		||||
// import { parsePoolData } from '@balancer-labs'; // TODO - upgrade to v2
 | 
			
		||||
import { Pool } from '@balancer-labs/sor/dist/types';
 | 
			
		||||
import { Pool } from 'balancer-labs-sor-v1/dist/types';
 | 
			
		||||
import { gql, request } from 'graphql-request';
 | 
			
		||||
 | 
			
		||||
import { DEFAULT_WARNING_LOGGER } from '../../../constants';
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,28 @@
 | 
			
		||||
import { Pool } from 'balancer-labs-sor-v1/dist/types';
 | 
			
		||||
import { getPoolsWithTokens, parsePoolData } from 'cream-sor';
 | 
			
		||||
 | 
			
		||||
import { BALANCER_MAX_POOLS_FETCHED } from '../constants';
 | 
			
		||||
 | 
			
		||||
import { CacheValue, PoolsCache } from './pools_cache';
 | 
			
		||||
 | 
			
		||||
export class CreamPoolsCache extends PoolsCache {
 | 
			
		||||
    constructor(
 | 
			
		||||
        _cache: { [key: string]: CacheValue } = {},
 | 
			
		||||
        private readonly maxPoolsFetched: number = BALANCER_MAX_POOLS_FETCHED,
 | 
			
		||||
    ) {
 | 
			
		||||
        super(_cache);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected async _fetchPoolsForPairAsync(takerToken: string, makerToken: string): Promise<Pool[]> {
 | 
			
		||||
        try {
 | 
			
		||||
            const poolData = (await getPoolsWithTokens(takerToken, makerToken)).pools;
 | 
			
		||||
            // Sort by maker token balance (descending)
 | 
			
		||||
            const pools = parsePoolData(poolData, takerToken, makerToken).sort((a, b) =>
 | 
			
		||||
                b.balanceOut.minus(a.balanceOut).toNumber(),
 | 
			
		||||
            );
 | 
			
		||||
            return pools.slice(0, this.maxPoolsFetched);
 | 
			
		||||
        } catch (err) {
 | 
			
		||||
            return [];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,78 @@
 | 
			
		||||
import { Pool } from 'balancer-labs-sor-v1/dist/types';
 | 
			
		||||
 | 
			
		||||
import { ONE_HOUR_IN_SECONDS, ONE_SECOND_MS } from '../constants';
 | 
			
		||||
export { Pool };
 | 
			
		||||
export interface CacheValue {
 | 
			
		||||
    expiresAt: number;
 | 
			
		||||
    pools: Pool[];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// tslint:disable:custom-no-magic-numbers
 | 
			
		||||
// Cache results for 30mins
 | 
			
		||||
const DEFAULT_CACHE_TIME_MS = (ONE_HOUR_IN_SECONDS / 2) * ONE_SECOND_MS;
 | 
			
		||||
const DEFAULT_TIMEOUT_MS = 1000;
 | 
			
		||||
// tslint:enable:custom-no-magic-numbers
 | 
			
		||||
 | 
			
		||||
export abstract class PoolsCache {
 | 
			
		||||
    protected static _isExpired(value: CacheValue): boolean {
 | 
			
		||||
        return Date.now() >= value.expiresAt;
 | 
			
		||||
    }
 | 
			
		||||
    constructor(
 | 
			
		||||
        protected readonly _cache: { [key: string]: CacheValue },
 | 
			
		||||
        protected readonly _cacheTimeMs: number = DEFAULT_CACHE_TIME_MS,
 | 
			
		||||
    ) {}
 | 
			
		||||
 | 
			
		||||
    public async getFreshPoolsForPairAsync(
 | 
			
		||||
        takerToken: string,
 | 
			
		||||
        makerToken: string,
 | 
			
		||||
        timeoutMs: number = DEFAULT_TIMEOUT_MS,
 | 
			
		||||
    ): Promise<Pool[]> {
 | 
			
		||||
        const timeout = new Promise<Pool[]>(resolve => setTimeout(resolve, timeoutMs, []));
 | 
			
		||||
        return Promise.race([this._getAndSaveFreshPoolsForPairAsync(takerToken, makerToken), timeout]);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public getCachedPoolAddressesForPair(
 | 
			
		||||
        takerToken: string,
 | 
			
		||||
        makerToken: string,
 | 
			
		||||
        ignoreExpired: boolean = true,
 | 
			
		||||
    ): string[] | undefined {
 | 
			
		||||
        const key = JSON.stringify([takerToken, makerToken]);
 | 
			
		||||
        const value = this._cache[key];
 | 
			
		||||
        if (ignoreExpired) {
 | 
			
		||||
            return value === undefined ? [] : value.pools.map(pool => pool.id);
 | 
			
		||||
        }
 | 
			
		||||
        if (!value) {
 | 
			
		||||
            return undefined;
 | 
			
		||||
        }
 | 
			
		||||
        if (PoolsCache._isExpired(value)) {
 | 
			
		||||
            return undefined;
 | 
			
		||||
        }
 | 
			
		||||
        return (value || []).pools.map(pool => pool.id);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public isFresh(takerToken: string, makerToken: string): boolean {
 | 
			
		||||
        const cached = this.getCachedPoolAddressesForPair(takerToken, makerToken, false);
 | 
			
		||||
        return cached !== undefined;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected async _getAndSaveFreshPoolsForPairAsync(takerToken: string, makerToken: string): Promise<Pool[]> {
 | 
			
		||||
        const key = JSON.stringify([takerToken, makerToken]);
 | 
			
		||||
        const value = this._cache[key];
 | 
			
		||||
        if (value === undefined || value.expiresAt >= Date.now()) {
 | 
			
		||||
            const pools = await this._fetchPoolsForPairAsync(takerToken, makerToken);
 | 
			
		||||
            const expiresAt = Date.now() + this._cacheTimeMs;
 | 
			
		||||
            this._cachePoolsForPair(takerToken, makerToken, pools, expiresAt);
 | 
			
		||||
        }
 | 
			
		||||
        return this._cache[key].pools;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected _cachePoolsForPair(takerToken: string, makerToken: string, pools: Pool[], expiresAt: number): void {
 | 
			
		||||
        const key = JSON.stringify([takerToken, makerToken]);
 | 
			
		||||
        this._cache[key] = {
 | 
			
		||||
            pools,
 | 
			
		||||
            expiresAt,
 | 
			
		||||
        };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    protected abstract _fetchPoolsForPairAsync(takerToken: string, makerToken: string): Promise<Pool[]>;
 | 
			
		||||
}
 | 
			
		||||
@@ -11,7 +11,7 @@ import {
 | 
			
		||||
import { FillQuoteTransformerOrderType, LimitOrder, RfqOrder, SignatureType } from '@0x/protocol-utils';
 | 
			
		||||
import { BigNumber, hexUtils, NULL_BYTES } from '@0x/utils';
 | 
			
		||||
import { Web3Wrapper } from '@0x/web3-wrapper';
 | 
			
		||||
import { Pool } from '@balancer-labs/sor/dist/types';
 | 
			
		||||
import { Pool } from 'balancer-labs-sor-v1/dist/types';
 | 
			
		||||
import * as _ from 'lodash';
 | 
			
		||||
import * as TypeMoq from 'typemoq';
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										57
									
								
								yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										57
									
								
								yarn.lock
									
									
									
									
									
								
							@@ -646,7 +646,6 @@
 | 
			
		||||
"@0x/abi-gen@^5.8.0":
 | 
			
		||||
  version "5.8.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/abi-gen/-/abi-gen-5.8.0.tgz#d5507de71021ebb121d50dc239c80f9cbe156da2"
 | 
			
		||||
  integrity sha512-5+dal6EY5Ji13WozUpNsyNvYUP4TW35Z0+t+9dDTtGKtZmxK6KxlNaDTUaK4qZcGy+bv39cYnLHfjDTGOLUCyA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
    "@0x/typescript-typings" "^5.3.1"
 | 
			
		||||
@@ -680,7 +679,6 @@
 | 
			
		||||
"@0x/assert@^3.0.34":
 | 
			
		||||
  version "3.0.34"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.34.tgz#aa43642abb969882910f271d9eab957217510807"
 | 
			
		||||
  integrity sha512-KDdmUs0O055PPnijmdoBOrZwztl2fmjox1peLzeKNl5OfxwpGBxuce4AhUkmcWKI3u7Mj3Az69gUByX6/NLnVg==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/json-schemas" "^6.4.4"
 | 
			
		||||
    "@0x/typescript-typings" "^5.3.1"
 | 
			
		||||
@@ -720,7 +718,6 @@
 | 
			
		||||
"@0x/base-contract@^6.5.0":
 | 
			
		||||
  version "6.5.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/base-contract/-/base-contract-6.5.0.tgz#95b0c3000e571cf4c2a4ee648d029d0ed744b88f"
 | 
			
		||||
  integrity sha512-FbtBmF1qKLvbJL7FmFtxI3enCV0a9YKkltlwgCU/CDlGqGH/1ZP0p32cWLP48tRfqrgCcvWlfc4rRTs4aIwlow==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/assert" "^3.0.34"
 | 
			
		||||
    "@0x/json-schemas" "^6.4.4"
 | 
			
		||||
@@ -838,7 +835,6 @@
 | 
			
		||||
"@0x/contracts-gen@^2.0.46":
 | 
			
		||||
  version "2.0.46"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/contracts-gen/-/contracts-gen-2.0.46.tgz#3b840b8a56b67abecb2859c1b8e1db36c309dc11"
 | 
			
		||||
  integrity sha512-zlFSH+TAtDvAG+fEAjOojMPP4E4tO3usmMQdHP26DzqMaJNLGuquLNsx7RQJkECfl/wfMRHMinhRd18pXlmrNw==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/sol-compiler" "^4.8.1"
 | 
			
		||||
    "@0x/sol-resolver" "^3.1.12"
 | 
			
		||||
@@ -874,7 +870,6 @@
 | 
			
		||||
"@0x/dev-utils@^4.2.14":
 | 
			
		||||
  version "4.2.14"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-4.2.14.tgz#2b15b3247ccaf111d8d42689907b603537b0a86c"
 | 
			
		||||
  integrity sha512-1NY2ito5eNo5r8kb9RUP8xoYj5WxnyrcXBDu34ezKHhTMeMcXw7LvXZWSTqrJ6jlZpWT5BM+bJEXGuHDRYJqRA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/subproviders" "^6.6.5"
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
@@ -912,7 +907,6 @@
 | 
			
		||||
"@0x/json-schemas@^6.4.4":
 | 
			
		||||
  version "6.4.4"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-6.4.4.tgz#9243c18ef6c1333c3cc47bf2870912d7badb307e"
 | 
			
		||||
  integrity sha512-uPl/gGQo3sYHwmoiNRITEyTOdr2bQTmsxzYquVwHIA1ZM6UHSIjiFcbeAO91aSE/U5uiCc9vuz8Ux9x+8F1BWw==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/typescript-typings" "^5.3.1"
 | 
			
		||||
    "@types/node" "12.12.54"
 | 
			
		||||
@@ -934,7 +928,6 @@
 | 
			
		||||
"@0x/monorepo-scripts@^3.2.4":
 | 
			
		||||
  version "3.2.4"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/monorepo-scripts/-/monorepo-scripts-3.2.4.tgz#7a089db39a3bd128ee22448d341cdabcc948614b"
 | 
			
		||||
  integrity sha512-Fszb8zo5ao5jRRfugnmoRg1kI8el6q0SXo4Ibnpqj+ahAsjGN/1cgVuhqEzy+3PYU6X7Z/gmV1GE7RYn+mFk1g==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
    "@0x/utils" "^6.5.3"
 | 
			
		||||
@@ -962,7 +955,6 @@
 | 
			
		||||
"@0x/neon-router@^0.3.5":
 | 
			
		||||
  version "0.3.5"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/neon-router/-/neon-router-0.3.5.tgz#895e7a2dc65d492a413daaea283cbc0ca6df83fa"
 | 
			
		||||
  integrity sha512-8wizP3smc5o4jVg1smZzCCFo4ohOrgDhO4JFjF+/oNHbFImlGHOvmH9HQ2FJXAXiLEOTxrbp3T5XxP5GNATq3w==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@mapbox/node-pre-gyp" "^1.0.5"
 | 
			
		||||
 | 
			
		||||
@@ -983,7 +975,6 @@
 | 
			
		||||
"@0x/protocol-utils@^1.0.1":
 | 
			
		||||
  version "1.11.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/protocol-utils/-/protocol-utils-1.11.2.tgz#c27ccf3410b99d8c364550bc18dc8b04dc2e967e"
 | 
			
		||||
  integrity sha512-DmYCWb3fB1NSBbR7JV2Tr4oXr/3rDzVpECWUvntCyIwdohHSM7ytjYbL9ilvlH3vuDK85CSyFWNrbSP6xZfTpA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/assert" "^3.0.34"
 | 
			
		||||
    "@0x/contract-addresses" "^6.12.1"
 | 
			
		||||
@@ -1013,7 +1004,6 @@
 | 
			
		||||
"@0x/sol-compiler@^4.8.1":
 | 
			
		||||
  version "4.8.1"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-compiler/-/sol-compiler-4.8.1.tgz#87340455c1ff7505a6201549910972016524857e"
 | 
			
		||||
  integrity sha512-bTTbrWv8GE0HbPIYK7EVxIWcPxs1R7SPr9G3qiOM+HGg7tHip8t2ehGdoY00zR7UALXVi3lHvKGl/na3uM7t4w==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/assert" "^3.0.34"
 | 
			
		||||
    "@0x/json-schemas" "^6.4.4"
 | 
			
		||||
@@ -1042,7 +1032,6 @@
 | 
			
		||||
"@0x/sol-coverage@^4.0.45":
 | 
			
		||||
  version "4.0.45"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-coverage/-/sol-coverage-4.0.45.tgz#5661cfe4eae7c8c8a9d24c9173e269aae54fe366"
 | 
			
		||||
  integrity sha512-6WuGPIax1l1/8dcrvwUTiB3Gz5FIbW9ie2QAiQv8qNJAVmZHDSPX3obd5eCFaVaPEtrLB7fOQpiDoyQJ7mFyZQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/sol-tracing-utils" "^7.3.1"
 | 
			
		||||
    "@0x/subproviders" "^6.6.5"
 | 
			
		||||
@@ -1057,7 +1046,6 @@
 | 
			
		||||
"@0x/sol-profiler@^4.1.35":
 | 
			
		||||
  version "4.1.35"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-profiler/-/sol-profiler-4.1.35.tgz#aef3a46c11be1caeb0f060a5c3584e7b160ef67c"
 | 
			
		||||
  integrity sha512-Lvs7gyyr8kiiAA2saLLCGHct9VVYC4DB4hNP+/82GDXXBu51ZYxuxE8q9M9fUj6kGyNM1jhd614w2aYUB5MpNw==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/sol-tracing-utils" "^7.3.1"
 | 
			
		||||
    "@0x/subproviders" "^6.6.5"
 | 
			
		||||
@@ -1072,7 +1060,6 @@
 | 
			
		||||
"@0x/sol-resolver@^3.1.12":
 | 
			
		||||
  version "3.1.12"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-resolver/-/sol-resolver-3.1.12.tgz#36156ff540751ae8b5e082cfa37ab0d4192580b8"
 | 
			
		||||
  integrity sha512-r22NN6LKaihc40PSzgpIni0nYRwk7bTu7Yz9mGySb3sgiqRHt+QJV13q5rwBuoIMwLpfmCgiL0qC3NVHcfl1BA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
    "@0x/typescript-typings" "^5.3.1"
 | 
			
		||||
@@ -1082,7 +1069,6 @@
 | 
			
		||||
"@0x/sol-trace@^3.0.45":
 | 
			
		||||
  version "3.0.45"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-trace/-/sol-trace-3.0.45.tgz#337bb5ffb362a1b3e9631cf3bb1a40d6e8f4cf3e"
 | 
			
		||||
  integrity sha512-zrWOJ7ut25kxHLhJGItQBt7Z3idUnpEIJlsYLhtmKK+nf3E1QLluhsdn0No0ijtBpIiI3KtlZvFXHyqktH6NCg==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/sol-tracing-utils" "^7.3.1"
 | 
			
		||||
    "@0x/subproviders" "^6.6.5"
 | 
			
		||||
@@ -1098,7 +1084,6 @@
 | 
			
		||||
"@0x/sol-tracing-utils@^7.3.1":
 | 
			
		||||
  version "7.3.1"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/sol-tracing-utils/-/sol-tracing-utils-7.3.1.tgz#99a1948d3fac88d442beda73ea53029142e6748b"
 | 
			
		||||
  integrity sha512-IWMvokOdA83ORwyn3HqjK3+zXEGSr+fRcwNu6khikGDi70gUWVDmkSghHKltEcy05YC8mRRoJgIw8Skrzvbd4w==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/dev-utils" "^4.2.14"
 | 
			
		||||
    "@0x/sol-compiler" "^4.8.1"
 | 
			
		||||
@@ -1126,7 +1111,6 @@
 | 
			
		||||
"@0x/subproviders@^6.6.5":
 | 
			
		||||
  version "6.6.5"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.6.5.tgz#7083abd28aad5564ad5bbf98c9f7d35ebf948aff"
 | 
			
		||||
  integrity sha512-tpkKH5XBgrlO4K9dMNqsYiTgrAOJUnThiu73y9tYl4mwX/1gRpyG1EebvD8w6VKPrLjnyPyMw50ZvTyaYgbXNQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/assert" "^3.0.34"
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
@@ -1204,7 +1188,6 @@
 | 
			
		||||
"@0x/types@^3.3.6":
 | 
			
		||||
  version "3.3.6"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/types/-/types-3.3.6.tgz#2746137791d5c8ca6034311a9327fc78b46c5f63"
 | 
			
		||||
  integrity sha512-ljtc9X4BnlM+MkcLet6hypsF1og0N4lMxt/2nNuPvbI6qude1kdu7Eyw2yb8fpwQfClTtR4rYUT6DeL0zh7qmQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@types/node" "12.12.54"
 | 
			
		||||
    bignumber.js "~9.0.2"
 | 
			
		||||
@@ -1246,7 +1229,6 @@
 | 
			
		||||
"@0x/typescript-typings@^5.3.1":
 | 
			
		||||
  version "5.3.1"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.3.1.tgz#853bcad04fbaee4af63532317d7f9ef486dfbb1a"
 | 
			
		||||
  integrity sha512-baxz6gTNDI+q/TBOm8xXeqCiCu/Rw6a/cpuWzjFNPPTMgO7o4nsk6fIGFGJLuSGUmDMOx+YVzUB0emV6dMtMxA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@types/bn.js" "^4.11.0"
 | 
			
		||||
    "@types/node" "12.12.54"
 | 
			
		||||
@@ -1313,7 +1295,6 @@
 | 
			
		||||
"@0x/utils@^6.5.3":
 | 
			
		||||
  version "6.5.3"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-6.5.3.tgz#b944ffb197a062e3996a4f2e6e43f7babe21e113"
 | 
			
		||||
  integrity sha512-C8Af9MeNvWTtSg5eEOObSZ+7gjOGSHkhqDWv8iPfrMMt7yFkAjHxpXW+xufk6ZG2VTg+hel82GDyhKaGtoQZDA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/types" "^3.3.6"
 | 
			
		||||
    "@0x/typescript-typings" "^5.3.1"
 | 
			
		||||
@@ -1347,7 +1328,6 @@
 | 
			
		||||
"@0x/web3-wrapper@^7.6.5":
 | 
			
		||||
  version "7.6.5"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.6.5.tgz#9e6731663b1856c043e45165ba564ab6ee7b97f6"
 | 
			
		||||
  integrity sha512-AyaisigXUsuwLcLqfji7DzQ+komL9NpaH1k2eTZMn7sxPfZZBSIMFbu3vgSKYvRnJdrXrkeKjE5h0BhIvTngMA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@0x/assert" "^3.0.34"
 | 
			
		||||
    "@0x/json-schemas" "^6.4.4"
 | 
			
		||||
@@ -1404,7 +1384,6 @@
 | 
			
		||||
"@balancer-labs/sdk@^0.1.6":
 | 
			
		||||
  version "0.1.6"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@balancer-labs/sdk/-/sdk-0.1.6.tgz#1a6f0aacfada7b0afbdf02259ef40ed37d3ecbcb"
 | 
			
		||||
  integrity sha512-r9s7Y2XJks+8V53kqwaqHDAETipgFSEQxI7TFHYigoOtWp/sUaZnlu0kDMv3NuDvya0+t9gp5a0VxbztLwcn+g==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@balancer-labs/sor" "^4.0.0-beta.2"
 | 
			
		||||
    axios "^0.24.0"
 | 
			
		||||
@@ -1412,19 +1391,9 @@
 | 
			
		||||
    graphql-request "^3.5.0"
 | 
			
		||||
    lodash "^4.17.21"
 | 
			
		||||
 | 
			
		||||
"@balancer-labs/sor@0.3.2":
 | 
			
		||||
  version "0.3.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-0.3.2.tgz#b05c63a07031c2ea13ed0d2670f5105cfaa40523"
 | 
			
		||||
  dependencies:
 | 
			
		||||
    bignumber.js "^9.0.0"
 | 
			
		||||
    ethers "^4.0.39"
 | 
			
		||||
    isomorphic-fetch "^2.2.1"
 | 
			
		||||
    typescript "^3.8.3"
 | 
			
		||||
 | 
			
		||||
"@balancer-labs/sor@^4.0.0-beta.2":
 | 
			
		||||
  version "4.0.0-beta.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.0.0-beta.2.tgz#17ee901c7434f9a5702653488b1a3ec6e1f926f1"
 | 
			
		||||
  integrity sha512-ylDxsMDKpoynOQIH4PhucYc7bkXddjL6GRFCF2BwnQ4Yoy7vBOT7S0zJvIkKuUG6MSUdoTBaAtWckxXBJiNxyA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    isomorphic-fetch "^2.2.1"
 | 
			
		||||
 | 
			
		||||
@@ -3303,7 +3272,6 @@ axios@^0.24.0:
 | 
			
		||||
axios@^0.24.0:
 | 
			
		||||
  version "0.24.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6"
 | 
			
		||||
  integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    follow-redirects "^1.14.4"
 | 
			
		||||
 | 
			
		||||
@@ -3788,6 +3756,15 @@ balanced-match@^1.0.0:
 | 
			
		||||
  version "1.0.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
 | 
			
		||||
 | 
			
		||||
"balancer-labs-sor-v1@npm:@balancer-labs/sor@0.3.2":
 | 
			
		||||
  version "0.3.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-0.3.2.tgz#b05c63a07031c2ea13ed0d2670f5105cfaa40523"
 | 
			
		||||
  dependencies:
 | 
			
		||||
    bignumber.js "^9.0.0"
 | 
			
		||||
    ethers "^4.0.39"
 | 
			
		||||
    isomorphic-fetch "^2.2.1"
 | 
			
		||||
    typescript "^3.8.3"
 | 
			
		||||
 | 
			
		||||
base-x@^3.0.2, base-x@^3.0.8:
 | 
			
		||||
  version "3.0.8"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d"
 | 
			
		||||
@@ -3831,7 +3808,6 @@ bigi@1.4.2, bigi@^1.1.0:
 | 
			
		||||
bignumber.js@7.2.1, bignumber.js@^9.0.0, bignumber.js@^9.0.2, bignumber.js@~4.1.0, bignumber.js@~9.0.0, bignumber.js@~9.0.2:
 | 
			
		||||
  version "9.0.2"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673"
 | 
			
		||||
  integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==
 | 
			
		||||
 | 
			
		||||
binary-extensions@^2.0.0:
 | 
			
		||||
  version "2.1.0"
 | 
			
		||||
@@ -4613,7 +4589,6 @@ commander@^2.12.1, commander@^2.8.1:
 | 
			
		||||
commander@^8.1.0:
 | 
			
		||||
  version "8.3.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
 | 
			
		||||
  integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==
 | 
			
		||||
 | 
			
		||||
commondir@^1.0.1:
 | 
			
		||||
  version "1.0.1"
 | 
			
		||||
@@ -5908,7 +5883,6 @@ ethereum-types@^3.5.0:
 | 
			
		||||
ethereum-types@^3.7.0:
 | 
			
		||||
  version "3.7.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-3.7.0.tgz#2fec14cebef6e68f3b66a6efd4eaa1003f2c972b"
 | 
			
		||||
  integrity sha512-7gU4cUkpmKbAMgEdF3vWFCcLS1aKdsGxIFbd8WIHgBOHLwlcjfcxtkwrFGXuCc90cg6V4MDA9iOI7W0hQ7eTvQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@types/node" "12.12.54"
 | 
			
		||||
    bignumber.js "~9.0.2"
 | 
			
		||||
@@ -6574,7 +6548,6 @@ follow-redirects@^1.14.4:
 | 
			
		||||
follow-redirects@^1.12.1, follow-redirects@^1.14.4:
 | 
			
		||||
  version "1.14.9"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
 | 
			
		||||
  integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
 | 
			
		||||
 | 
			
		||||
for-each@~0.3.3:
 | 
			
		||||
  version "0.3.3"
 | 
			
		||||
@@ -7090,7 +7063,6 @@ graphql-request@^3.4.0:
 | 
			
		||||
graphql-request@^3.5.0:
 | 
			
		||||
  version "3.7.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-3.7.0.tgz#c7406e537084f8b9788541e3e6704340ca13055b"
 | 
			
		||||
  integrity sha512-dw5PxHCgBneN2DDNqpWu8QkbbJ07oOziy8z+bK/TAXufsOLaETuVO4GkXrbs0WjhdKhBMN3BkpN/RIvUHkmNUQ==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    cross-fetch "^3.0.6"
 | 
			
		||||
    extract-files "^9.0.0"
 | 
			
		||||
@@ -7103,7 +7075,6 @@ graphql@^15.4.0:
 | 
			
		||||
graphql@^15.6.1:
 | 
			
		||||
  version "15.8.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.8.0.tgz#33410e96b012fa3bdb1091cc99a94769db212b38"
 | 
			
		||||
  integrity sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==
 | 
			
		||||
 | 
			
		||||
growl@1.10.5:
 | 
			
		||||
  version "1.10.5"
 | 
			
		||||
@@ -8481,7 +8452,6 @@ lodash@4.17.20, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.
 | 
			
		||||
lodash@^4.17.21:
 | 
			
		||||
  version "4.17.21"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
 | 
			
		||||
  integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
 | 
			
		||||
 | 
			
		||||
log-driver@^1.2.7:
 | 
			
		||||
  version "1.2.7"
 | 
			
		||||
@@ -11283,7 +11253,6 @@ socks@~2.3.2:
 | 
			
		||||
solc@^0.8:
 | 
			
		||||
  version "0.8.12"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.12.tgz#3002ed3092ee2f7672f1a2ab80c0d8df8df3ef2b"
 | 
			
		||||
  integrity sha512-TU3anAhKWBQ/WrerJ9EcHrNwGOA1y5vIk5Flz7dBNamLDkX9VQTIwcKd3FiZsT0Ew8rSU7RTmJyGNHRGzP5TBA==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    command-exists "^1.2.8"
 | 
			
		||||
    commander "^8.1.0"
 | 
			
		||||
@@ -11313,13 +11282,6 @@ solidity-parser-antlr@^0.4.2:
 | 
			
		||||
  version "0.4.11"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.4.11.tgz#af43e1f13b3b88309a875455f5d6e565b05ee5f1"
 | 
			
		||||
 | 
			
		||||
"sorV2@npm:@balancer-labs/sor":
 | 
			
		||||
  version "4.0.0-beta.1"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/@balancer-labs/sor/-/sor-4.0.0-beta.1.tgz#fb8b3f2d9bb5cec5c79446e0062aab7cdfcabccb"
 | 
			
		||||
  integrity sha512-L3eMBRA51egMNKHkLktOr3sNJuqgoz24AfJkpzU4w1I66m9HlOPY/E3FgYKWO+1cXJ2sQZWDH3pEjnWMRnNbNg==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    isomorphic-fetch "^2.2.1"
 | 
			
		||||
 | 
			
		||||
sort-keys@^2.0.0:
 | 
			
		||||
  version "2.0.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
 | 
			
		||||
@@ -12241,7 +12203,6 @@ typescript@3.7.x:
 | 
			
		||||
typescript@4.6.3:
 | 
			
		||||
  version "4.6.3"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.3.tgz#eefeafa6afdd31d725584c67a0eaba80f6fc6c6c"
 | 
			
		||||
  integrity sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==
 | 
			
		||||
 | 
			
		||||
typescript@^3.8.3:
 | 
			
		||||
  version "3.9.7"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user