Commit 0e801850 authored by Noah Zinsmeister's avatar Noah Zinsmeister

big refactor, more abstraction

add data fetching
parent 0badfed0
[
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [{ "name": "", "type": "uint8" }],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]
[
{
"constant": true,
"inputs": [
{
"name": "tokenA",
"type": "address"
},
{
"name": "tokenB",
"type": "address"
}
],
"name": "getExchange",
"outputs": [
{
"name": "exchange",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
]
...@@ -2,15 +2,19 @@ import JSBI from 'jsbi' ...@@ -2,15 +2,19 @@ import JSBI from 'jsbi'
// exports for external consumption // exports for external consumption
export enum ChainId { export enum ChainId {
RINKEBY = 4 MAINNET = 1,
ROPSTEN = 3,
RINKEBY = 4,
GÖRLI = 5,
KOVAN = 42
} }
export const WETH = { export const FACTORY_ADDRESS = {
[ChainId.RINKEBY]: { [ChainId.MAINNET]: '',
chainId: ChainId.RINKEBY, [ChainId.ROPSTEN]: '',
address: '0xc778417E063141139Fce010982780140Aa0cD5Ab', [ChainId.RINKEBY]: '0xbe52bB8cCa36fcD6061C307f14bAB48F09A760f9',
decimals: 18 [ChainId.GÖRLI]: '',
} [ChainId.KOVAN]: ''
} }
export enum TradeType { export enum TradeType {
...@@ -27,6 +31,6 @@ export const _997 = JSBI.BigInt(997) ...@@ -27,6 +31,6 @@ export const _997 = JSBI.BigInt(997)
export const _1000 = JSBI.BigInt(1000) export const _1000 = JSBI.BigInt(1000)
export enum SolidityType { export enum SolidityType {
uint8, uint8 = 'uint8',
uint256 uint256 = 'uint256'
} }
import invariant from 'tiny-invariant' import invariant from 'tiny-invariant'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { getNetwork } from '@ethersproject/networks'
import { getDefaultProvider } from '@ethersproject/providers'
import { Contract } from '@ethersproject/contracts'
import { SolidityType } from '../constants' import { FACTORY_ADDRESS, ZERO, ONE, _997, _1000 } from '../constants'
import { BigintIsh } from '../types' import UniswapV2Factory from '../abis/UniswapV2Factory.json'
import { parseBigintIsh } from '../utils/parseInputs' import ERC20 from '../abis/ERC20.json'
import { validateSolidityTypeInstance } from '../utils/validateInputs' import { validateAndParseAddress } from '../utils'
import { Token } from './token' import { Token } from './token'
import { TokenAmount } from './fractions/tokenAmount'
export class Exchange { export class Exchange {
public readonly pair: [Token, Token] private readonly tokenAmounts: [TokenAmount, TokenAmount]
public readonly balances: [JSBI, JSBI] public readonly address?: string
static validate(pair: [Token, Token], balances: [JSBI, JSBI]) { static async fetchData(
// validate components of an Exchange tokenA: Token,
balances.forEach(balance => validateSolidityTypeInstance(balance, SolidityType.uint256)) tokenB: Token,
provider = getDefaultProvider(getNetwork(tokenA.chainId)),
address?: string
): Promise<Exchange> {
const parsedAddress =
typeof address === 'string'
? address
: await new Contract(FACTORY_ADDRESS[tokenA.chainId], UniswapV2Factory, provider).getExchange(
tokenA.address,
tokenB.address
)
const balances = await Promise.all([
new Contract(tokenA.address, ERC20, provider).balanceOf(parsedAddress),
new Contract(tokenB.address, ERC20, provider).balanceOf(parsedAddress)
])
return new Exchange(new TokenAmount(tokenA, balances[0]), new TokenAmount(tokenB, balances[1]), parsedAddress)
}
constructor(tokenAmountA: TokenAmount, tokenAmountB: TokenAmount, address?: string) {
invariant(tokenAmountA.token.chainId === tokenAmountB.token.chainId, 'CHAIN_IDS')
const tokenAmounts: [TokenAmount, TokenAmount] =
tokenAmountA.token.address < tokenAmountB.token.address
? [tokenAmountA, tokenAmountB]
: [tokenAmountB, tokenAmountA]
invariant(tokenAmounts[0].token.address < tokenAmounts[1].token.address, 'ADDRESSES')
this.tokenAmounts = tokenAmounts
if (typeof address === 'string') this.address = validateAndParseAddress(address)
}
public get reserve0(): TokenAmount {
return this.tokenAmounts[0]
}
public get reserve1(): TokenAmount {
return this.tokenAmounts[1]
}
public get token0(): Token {
return this.tokenAmounts[0].token
}
public get token1(): Token {
return this.tokenAmounts[1].token
}
public getOutputAmount(inputAmount: TokenAmount): [TokenAmount, Exchange] {
invariant(inputAmount.token.equals(this.token0) || inputAmount.token.equals(this.token1), 'TOKEN')
invariant(JSBI.greaterThan(inputAmount.raw, ZERO), 'ZERO')
invariant(JSBI.greaterThan(this.reserve0.raw, ZERO), 'ZERO')
invariant(JSBI.greaterThan(this.reserve1.raw, ZERO), 'ZERO')
// validate conditions that must be true of an Exchange const inputReserve = inputAmount.token.equals(this.reserve0.token) ? this.reserve0 : this.reserve1
const chainIds = pair.map(token => token.chainId) const outputReserve = inputAmount.token.equals(this.reserve0.token) ? this.reserve1 : this.reserve0
invariant(chainIds[0] === chainIds[1], `${chainIds} are not equal.`) const inputAmountWithFee = JSBI.multiply(inputAmount.raw, _997)
const addresses = pair.map(token => token.address) const numerator = JSBI.multiply(inputAmountWithFee, outputReserve.raw)
invariant(addresses[0] < addresses[1], `${addresses} are not ordered.`) const denominator = JSBI.add(JSBI.multiply(inputReserve.raw, _1000), inputAmountWithFee)
const output = new TokenAmount(
inputAmount.token.equals(this.token0) ? this.token1 : this.token0,
JSBI.divide(numerator, denominator)
)
return [output, new Exchange(inputReserve.add(inputAmount), outputReserve.subtract(output), this.address)]
} }
constructor(pair: [Token, Token], balances: [BigintIsh, BigintIsh]) { public getInputAmount(outputAmount: TokenAmount): [TokenAmount, Exchange] {
const balancesParsed = balances.map(balance => parseBigintIsh(balance)) invariant(outputAmount.token.equals(this.token0) || outputAmount.token.equals(this.token1), 'TOKEN')
const inOrder = pair[0].address < pair[1].address invariant(JSBI.greaterThan(outputAmount.raw, ZERO), 'ZERO')
const orderedPair = (inOrder ? pair : pair.slice().reverse()) as [Token, Token] invariant(JSBI.greaterThan(this.reserve0.raw, ZERO), 'ZERO')
const orderedBalances = (inOrder ? balancesParsed : balancesParsed.slice().reverse()) as [JSBI, JSBI] invariant(JSBI.greaterThan(this.reserve1.raw, ZERO), 'ZERO')
Exchange.validate(orderedPair, orderedBalances)
this.pair = orderedPair const inputReserve = outputAmount.token.equals(this.reserve0.token) ? this.reserve1 : this.reserve0
this.balances = orderedBalances const outputReserve = outputAmount.token.equals(this.reserve0.token) ? this.reserve0 : this.reserve1
const numerator = JSBI.multiply(JSBI.multiply(inputReserve.raw, outputAmount.raw), _1000)
const denominator = JSBI.multiply(JSBI.subtract(outputReserve.raw, outputAmount.raw), _997)
const input = new TokenAmount(
outputAmount.token.equals(this.token0) ? this.token1 : this.token0,
JSBI.add(JSBI.divide(numerator, denominator), ONE)
)
return [input, new Exchange(inputReserve.add(input), outputReserve.subtract(outputAmount), this.address)]
} }
} }
import invariant from 'tiny-invariant'
import JSBI from 'jsbi'
import { ZERO, ONE, TEN, _100 } from '../constants'
import { BigintIsh } from '../types'
import { parseBigintIsh } from '../utils/parseInputs'
import { formatSignificant, formatFixed } from '../utils/formatOutputs'
import { Route } from './route'
export class Fraction {
public readonly numerator: JSBI
public readonly denominator: JSBI
constructor(numerator: BigintIsh, denominator: BigintIsh = ONE) {
this.numerator = parseBigintIsh(numerator)
this.denominator = parseBigintIsh(denominator)
}
// warning: this can truncate!
get quotient() {
return JSBI.divide(this.numerator, this.denominator)
}
public invert(): Fraction {
return new Fraction(this.denominator, this.numerator)
}
public multiply(other: Fraction): Fraction {
return new Fraction(
JSBI.multiply(this.numerator, other.numerator),
JSBI.multiply(this.denominator, other.denominator)
)
}
public formatSignificant(significantDigits: number, ...rest: any[]): string {
return formatSignificant(this.numerator, this.denominator, significantDigits, ...rest)
}
public formatFixed(decimalPlaces: number, ...rest: any[]): string {
return formatFixed(this.numerator, this.denominator, decimalPlaces, ...rest)
}
}
export class Price {
public readonly price: Fraction // normalized
public readonly scalar: Fraction // used to convert back to raw balances
static fromRoute(route: Route): Price {
const prices: Fraction[] = route.exchanges.map((exchange, i) => {
const input = route.path[i]
const baseIndex = input.address === exchange.pair[0].address ? 0 : 1
const quoteIndex = input.address === exchange.pair[0].address ? 1 : 0
return new Fraction(
JSBI.multiply(
exchange.balances[quoteIndex],
JSBI.exponentiate(TEN, JSBI.BigInt(exchange.pair[baseIndex].decimals))
),
JSBI.multiply(
exchange.balances[baseIndex],
JSBI.exponentiate(TEN, JSBI.BigInt(exchange.pair[quoteIndex].decimals))
)
)
})
const price = prices.reduce((accumulator, currentValue) => accumulator.multiply(currentValue), new Fraction(ONE))
const scalar = new Fraction(
JSBI.exponentiate(TEN, JSBI.BigInt(route.output.decimals)),
JSBI.exponentiate(TEN, JSBI.BigInt(route.input.decimals))
)
return new Price(price, scalar)
}
constructor(price: Fraction, scalar: Fraction) {
this.price = price
this.scalar = scalar
}
public invert(): Price {
return new Price(this.price.invert(), this.scalar.invert())
}
public quote(amount: BigintIsh): JSBI {
const amountParsed = parseBigintIsh(amount)
invariant(JSBI.greaterThan(amountParsed, ZERO), `${amountParsed} isn't positive.`)
return this.price.multiply(this.scalar).multiply(new Fraction(amount)).quotient
}
public formatSignificant(significantDigits = 6, ...rest: any[]): string {
return this.price.formatSignificant(significantDigits, ...rest)
}
public formatFixed(decimalPlaces = 6, ...rest: any[]): string {
return this.price.formatFixed(decimalPlaces, ...rest)
}
}
export class Percent {
public readonly percent: Fraction
constructor(percent: Fraction) {
this.percent = percent
}
public formatSignificant(significantDigits = 5, ...rest: any[]): string {
return this.percent.multiply(new Fraction(_100)).formatSignificant(significantDigits, ...rest)
}
public formatFixed(decimalPlaces = 2, ...rest: any[]): string {
return this.percent.multiply(new Fraction(_100)).formatFixed(decimalPlaces, ...rest)
}
}
import invariant from 'tiny-invariant'
import JSBI from 'jsbi'
import _Decimal from 'decimal.js-light'
import _Big, { RoundingMode } from 'big.js'
import toFormat from 'toformat'
import { BigintIsh, Rounding } from '../../types'
import { ONE } from '../../constants'
import { parseBigintIsh } from '../../utils'
const Decimal = toFormat(_Decimal)
const Big = toFormat(_Big)
const toSignificantRounding = {
[Rounding.ROUND_DOWN]: Decimal.ROUND_DOWN,
[Rounding.ROUND_HALF_UP]: Decimal.ROUND_HALF_UP,
[Rounding.ROUND_UP]: Decimal.ROUND_UP
}
const toFixedRounding = {
[Rounding.ROUND_DOWN]: RoundingMode.RoundDown,
[Rounding.ROUND_HALF_UP]: RoundingMode.RoundHalfUp,
[Rounding.ROUND_UP]: RoundingMode.RoundUp
}
export class Fraction {
public readonly numerator: JSBI
public readonly denominator: JSBI
public constructor(numerator: BigintIsh, denominator: BigintIsh = ONE) {
this.numerator = parseBigintIsh(numerator)
this.denominator = parseBigintIsh(denominator)
}
// performs floor division
public get quotient(): JSBI {
return JSBI.divide(this.numerator, this.denominator)
}
public invert(): Fraction {
return new Fraction(this.denominator, this.numerator)
}
public multiply(other: Fraction | BigintIsh): Fraction {
const otherParsed = other instanceof Fraction ? other : new Fraction(parseBigintIsh(other))
return new Fraction(
JSBI.multiply(this.numerator, otherParsed.numerator),
JSBI.multiply(this.denominator, otherParsed.denominator)
)
}
public toSignificant(
significantDigits: number,
format: object = { groupSeparator: '' },
rounding: Rounding = Rounding.ROUND_HALF_UP,
maximumDecimalPlaces: number = Number.MAX_SAFE_INTEGER // should only be used to properly bound token amounts
): string {
invariant(Number.isInteger(significantDigits), `${significantDigits} is not a positive integer.`)
invariant(significantDigits > 0, `${significantDigits} is not positive.`)
invariant(Number.isInteger(maximumDecimalPlaces), `${maximumDecimalPlaces} is not an integer.`)
invariant(maximumDecimalPlaces >= 0, `maximumDecimalPlaces ${maximumDecimalPlaces} is negative.`)
Decimal.set({ precision: significantDigits + 1, rounding: toSignificantRounding[rounding] })
const quotient = new Decimal(this.numerator.toString())
.div(this.denominator.toString())
.toSignificantDigits(significantDigits)
const decimalPlaces =
quotient.precision(true) >= significantDigits
? quotient.decimalPlaces()
: significantDigits - (quotient.precision(true) - quotient.decimalPlaces())
return quotient.toFormat(Math.min(decimalPlaces, maximumDecimalPlaces), format)
}
public toFixed(
decimalPlaces: number,
format: object = { groupSeparator: '' },
rounding: Rounding = Rounding.ROUND_HALF_UP
): string {
invariant(Number.isInteger(decimalPlaces), `${decimalPlaces} is not an integer.`)
invariant(decimalPlaces >= 0, `${decimalPlaces} is negative.`)
Big.DP = decimalPlaces
Big.RM = toFixedRounding[rounding]
return new Big(this.numerator.toString()).div(this.denominator.toString()).toFormat(decimalPlaces, format)
}
}
export * from './fraction'
export * from './percent'
export * from './tokenAmount'
export * from './price'
import { Rounding } from '../../types'
import { _100 } from '../../constants'
import { Fraction } from './fraction'
const _100Percent = new Fraction(_100)
export class Percent extends Fraction {
public toSignificant(significantDigits: number = 5, format?: object, rounding?: Rounding): string {
return this.multiply(_100Percent).toSignificant(significantDigits, format, rounding)
}
public toFixed(decimalPlaces: number = 2, format?: object, rounding?: Rounding): string {
return this.multiply(_100Percent).toSignificant(decimalPlaces, format, rounding)
}
}
import invariant from 'tiny-invariant'
import JSBI from 'jsbi'
import { BigintIsh, Rounding } from '../../types'
import { TEN } from '../../constants'
import { Token } from '../token'
import { Route } from '../route'
import { Fraction } from './fraction'
import { TokenAmount } from './tokenAmount'
export class Price extends Fraction {
public readonly baseToken: Token // input i.e. denominator
public readonly quoteToken: Token // output i.e. numerator
public readonly scalar: Fraction // used to adjust the raw fraction w/r/t the decimals of the {base,quote}Tokens
static fromRoute(route: Route): Price {
const prices: Price[] = []
for (const [i, exchange] of route.exchanges.entries()) {
prices.push(
route.path[i].equals(exchange.token0)
? new Price(exchange.reserve0.token, exchange.reserve1.token, exchange.reserve0.raw, exchange.reserve1.raw)
: new Price(exchange.reserve1.token, exchange.reserve0.token, exchange.reserve1.raw, exchange.reserve0.raw)
)
}
return prices.slice(1).reduce((accumulator, currentValue) => accumulator.multiply(currentValue), prices[0])
}
// denominator and numerator _must be_ scaled in units of the {base,quote}Tokens
constructor(baseToken: Token, quoteToken: Token, denominator: BigintIsh, numerator: BigintIsh) {
super(numerator, denominator)
this.baseToken = baseToken
this.quoteToken = quoteToken
this.scalar = new Fraction(
JSBI.exponentiate(TEN, JSBI.BigInt(baseToken.decimals)),
JSBI.exponentiate(TEN, JSBI.BigInt(quoteToken.decimals))
)
}
public get raw(): Fraction {
return new Fraction(this.numerator, this.denominator)
}
public get adjusted(): Fraction {
return super.multiply(this.scalar)
}
public invert(): Price {
return new Price(this.quoteToken, this.baseToken, this.numerator, this.denominator)
}
public multiply(other: Price): Price {
invariant(this.quoteToken.equals(other.baseToken), 'BASE')
const fraction = super.multiply(other)
return new Price(this.baseToken, other.quoteToken, fraction.denominator, fraction.numerator)
}
// performs floor division on overflow
public quote(tokenAmount: TokenAmount): TokenAmount {
invariant(tokenAmount.token.equals(this.baseToken), 'TOKEN')
return new TokenAmount(this.quoteToken, super.multiply(tokenAmount.raw).quotient)
}
public toSignificant(significantDigits: number = 6, format?: object, rounding?: Rounding): string {
return this.adjusted.toSignificant(significantDigits, format, rounding)
}
public toFixed(decimalPlaces: number = 6, format?: object, rounding?: Rounding): string {
return this.adjusted.toFixed(decimalPlaces, format, rounding)
}
}
import invariant from 'tiny-invariant'
import JSBI from 'jsbi'
import { BigintIsh, Rounding } from '../../types'
import { TEN, SolidityType } from '../../constants'
import { parseBigintIsh, validateSolidityTypeInstance } from '../../utils'
import { Token } from '../token'
import { Fraction } from './fraction'
export class TokenAmount extends Fraction {
public readonly token: Token
// amount _must be_ scaled in units of the token
constructor(token: Token, amount: BigintIsh) {
const parsedAmount = parseBigintIsh(amount)
validateSolidityTypeInstance(parsedAmount, SolidityType.uint256)
super(parsedAmount, JSBI.exponentiate(TEN, JSBI.BigInt(token.decimals)))
this.token = token
}
public get raw(): JSBI {
return this.numerator
}
public get adjusted(): Fraction {
return this
}
public add(other: TokenAmount): TokenAmount {
invariant(this.token.equals(other.token), 'TOKEN')
return new TokenAmount(this.token, JSBI.add(this.raw, other.raw))
}
public subtract(other: TokenAmount): TokenAmount {
invariant(this.token.equals(other.token), 'TOKEN')
return new TokenAmount(this.token, JSBI.subtract(this.raw, other.raw))
}
public toSignificant(significantDigits: number, format?: object, rounding: Rounding = Rounding.ROUND_DOWN): string {
return super.toSignificant(significantDigits, format, rounding, this.token.decimals)
}
public toFixed(
decimalPlaces: number = this.token.decimals,
format?: object,
rounding: Rounding = Rounding.ROUND_DOWN
): string {
invariant(decimalPlaces <= this.token.decimals, 'DECIMALS')
return super.toFixed(decimalPlaces, format, rounding)
}
}
...@@ -2,5 +2,4 @@ export * from './token' ...@@ -2,5 +2,4 @@ export * from './token'
export * from './exchange' export * from './exchange'
export * from './route' export * from './route'
export * from './trade' export * from './trade'
export * from './fractions' export * from './fractions'
...@@ -2,34 +2,27 @@ import invariant from 'tiny-invariant' ...@@ -2,34 +2,27 @@ import invariant from 'tiny-invariant'
import { Token } from './token' import { Token } from './token'
import { Exchange } from './exchange' import { Exchange } from './exchange'
import { Price } from './fractions' import { Price } from './fractions/price'
export class Route { export class Route {
public readonly exchanges: Exchange[] public readonly exchanges: Exchange[]
public readonly path: Token[] public readonly path: Token[]
public readonly midPrice: Price public readonly midPrice: Price
static validate(exchanges: Exchange[], input: Token): Token[] { constructor(exchanges: Exchange[], input: Token) {
// validate components of a Route invariant(exchanges.length > 0, 'EXCHANGES')
invariant(exchanges.length > 0, `${exchanges} does not consist of at least 1 exchange.`) invariant(
exchanges.map(exchange => exchange.token0.chainId === exchanges[0].token0.chainId).every(x => x),
// validate conditions that must be true of a Route 'CHAIN_IDS'
const chainIds = exchanges.map(exchange => exchange.pair[0].chainId) // a sufficent check since exchanges are valid )
chainIds.forEach((chainId, _, array) => invariant(chainId === array[0], `${chainIds} are not all equal.`))
const path = [input] const path = [input]
exchanges.forEach((exchange, i) => { for (const [i, exchange] of exchanges.entries()) {
const currentInput = path[i] const currentInput = path[i]
const addresses = exchange.pair.map(token => token.address) invariant(currentInput.equals(exchange.token0) || currentInput.equals(exchange.token1), 'PATH')
invariant(addresses.includes(currentInput.address), `${addresses} does not contain ${input.address}.`) const output = currentInput.equals(exchange.token0) ? exchange.token1 : exchange.token0
const output = currentInput.address === addresses[0] ? exchange.pair[1] : exchange.pair[0]
path.push(output) path.push(output)
}) }
invariant(path.length === new Set(path).size, `${path} contains duplicate addresses.`) invariant(path.length === new Set(path).size, 'PATH')
return path
}
constructor(exchanges: Exchange[], input: Token) {
const path = Route.validate(exchanges, input)
this.exchanges = exchanges this.exchanges = exchanges
this.path = path this.path = path
......
import invariant from 'tiny-invariant'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { getNetwork } from '@ethersproject/networks'
import { getDefaultProvider } from '@ethersproject/providers'
import { Contract } from '@ethersproject/contracts'
import { SolidityType } from '../constants' import { ChainId, SolidityType } from '../constants'
import { validateChainId, validateAddress, validateSolidityTypeInstance } from '../utils/validateInputs' import ERC20 from '../abis/ERC20.json'
import { validateAndParseAddress, validateSolidityTypeInstance } from '../utils'
const CACHE: { [chainId: number]: { [address: string]: number } } = {
1: {
'0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A': 9 // DGD
}
}
export class Token { export class Token {
public readonly chainId: number public readonly chainId: ChainId
public readonly address: string public readonly address: string
public readonly decimals: number public readonly decimals: number
public readonly symbol?: string
public readonly name?: string
static validate(chainId: number, address: string, decimals: number) { static async fetchData(
validateChainId(chainId) chainId: ChainId,
validateAddress(address) address: string,
validateSolidityTypeInstance(JSBI.BigInt(decimals), SolidityType.uint8) provider = getDefaultProvider(getNetwork(chainId)),
symbol?: string,
name?: string
): Promise<Token> {
const parsedDecimals =
typeof CACHE?.[chainId]?.[address] === 'number'
? CACHE[chainId][address]
: await new Contract(address, ERC20, provider).decimals().then((decimals: number): number => {
CACHE[chainId][address] = decimals
return decimals
})
return new Token(chainId, address, parsedDecimals, symbol, name)
} }
constructor(chainId: number, address: string, decimals: number) { constructor(chainId: ChainId, address: string, decimals: number, symbol?: string, name?: string) {
Token.validate(chainId, address, decimals) validateSolidityTypeInstance(JSBI.BigInt(decimals), SolidityType.uint8)
this.chainId = chainId this.chainId = chainId
this.address = address this.address = validateAndParseAddress(address)
this.decimals = decimals this.decimals = decimals
if (typeof symbol === 'string') this.symbol = symbol
if (typeof name === 'string') this.name = name
} }
public equals(other: Token): boolean {
const equal = this.chainId === other.chainId && this.address === other.address
if (equal) invariant(this.decimals === other.decimals, 'DECIMALS')
return equal
}
}
export const WETH = {
[ChainId.MAINNET]: new Token(
ChainId.MAINNET,
'0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
18,
'WETH',
'Wrapped Ether'
),
[ChainId.ROPSTEN]: new Token(
ChainId.ROPSTEN,
'0xc778417E063141139Fce010982780140Aa0cD5Ab',
18,
'WETH',
'Wrapped Ether'
),
[ChainId.RINKEBY]: new Token(
ChainId.RINKEBY,
'0xc778417E063141139Fce010982780140Aa0cD5Ab',
18,
'WETH',
'Wrapped Ether'
),
[ChainId.GÖRLI]: new Token(ChainId.GÖRLI, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'WETH', 'Wrapped Ether'),
[ChainId.KOVAN]: new Token(ChainId.KOVAN, '0xd0A1E359811322d97991E03f863a0C30C2cF029C', 18, 'WETH', 'Wrapped Ether')
} }
import invariant from 'tiny-invariant' import invariant from 'tiny-invariant'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { ZERO, ONE, _997, _1000, SolidityType, TradeType } from '../constants' import { TradeType } from '../constants'
import { BigintIsh } from '../types'
import { parseBigintIsh } from '../utils/parseInputs'
import { validateSolidityTypeInstance } from '../utils/validateInputs'
import { Exchange } from './exchange' import { Exchange } from './exchange'
import { Route } from './route' import { Route } from './route'
import { Fraction, Price, Percent } from './fractions' import { Fraction, TokenAmount } from './fractions'
import { Price } from './fractions/price'
import { Percent } from './fractions/percent'
function getOutputAmount(inputAmount: JSBI, inputReserve: JSBI, outputReserve: JSBI): JSBI { function getSlippage(inputAmount: TokenAmount, midPrice: Price, outputAmount: TokenAmount): Percent {
invariant(JSBI.greaterThan(inputAmount, ZERO), `${inputAmount} is not positive.`) const exactQuote = midPrice.raw.multiply(inputAmount.raw)
invariant(JSBI.greaterThan(inputReserve, ZERO), `${inputReserve} is not positive.`) // calculate (outputAmount - exactQuote) / exactQuote
invariant(JSBI.greaterThan(outputReserve, ZERO), `${outputReserve} is not positive.`) const exactDifference = new Fraction(
const inputAmountWithFee = JSBI.multiply(inputAmount, _997) JSBI.subtract(JSBI.multiply(outputAmount.raw, exactQuote.denominator), exactQuote.numerator),
const numerator = JSBI.multiply(inputAmountWithFee, outputReserve)
const denominator = JSBI.add(JSBI.multiply(inputReserve, _1000), inputAmountWithFee)
return JSBI.divide(numerator, denominator)
}
function getInputAmount(outputAmount: JSBI, inputReserve: JSBI, outputReserve: JSBI): JSBI {
invariant(JSBI.greaterThan(outputAmount, ZERO), `${outputAmount} is not positive.`)
invariant(JSBI.greaterThan(inputReserve, ZERO), `${inputReserve} is not positive.`)
invariant(JSBI.greaterThan(outputReserve, ZERO), `${outputReserve} is not positive.`)
const numerator = JSBI.multiply(JSBI.multiply(inputReserve, outputAmount), _1000)
const denominator = JSBI.multiply(JSBI.subtract(outputReserve, outputAmount), _997)
return JSBI.add(JSBI.divide(numerator, denominator), ONE)
}
function getSlippage(inputAmount: JSBI, midPrice: Price, outputAmount: JSBI): Percent {
const exactQuote = midPrice.price.multiply(midPrice.scalar).multiply(new Fraction(inputAmount))
const normalizedNumerator = new Fraction(
JSBI.subtract(JSBI.multiply(outputAmount, exactQuote.denominator), exactQuote.numerator),
exactQuote.denominator exactQuote.denominator
) )
const invertedDenominator = exactQuote.invert() const slippage = exactDifference.multiply(exactQuote.invert())
return new Percent(normalizedNumerator.multiply(invertedDenominator)) return new Percent(slippage.numerator, slippage.denominator)
} }
function getPercentChange(referenceRate: Price, newRate: Price): Percent { function getPercentChange(referenceRate: Price, newRate: Price): Percent {
const normalizedNumerator = new Fraction( // calculate (newRate - referenceRate) / referenceRate
const difference = new Fraction(
JSBI.subtract( JSBI.subtract(
JSBI.multiply(newRate.price.numerator, referenceRate.price.denominator), JSBI.multiply(newRate.adjusted.numerator, referenceRate.adjusted.denominator),
JSBI.multiply(referenceRate.price.numerator, newRate.price.denominator) JSBI.multiply(referenceRate.adjusted.numerator, newRate.adjusted.denominator)
), ),
JSBI.multiply(referenceRate.price.denominator, newRate.price.denominator) JSBI.multiply(referenceRate.adjusted.denominator, newRate.adjusted.denominator)
) )
const invertedDenominator = referenceRate.price.invert() const percentChange = difference.multiply(referenceRate.adjusted.invert())
return new Percent(normalizedNumerator.multiply(invertedDenominator)) return new Percent(percentChange.numerator, percentChange.denominator)
} }
export class Trade { export class Trade {
public readonly route: Route public readonly route: Route
public readonly inputAmount: JSBI
public readonly outputAmount: JSBI
public readonly tradeType: TradeType public readonly tradeType: TradeType
public readonly inputAmount: TokenAmount
public readonly outputAmount: TokenAmount
public readonly executionPrice: Price public readonly executionPrice: Price
public readonly nextMidPrice: Price public readonly nextMidPrice: Price
public readonly slippage: Percent public readonly slippage: Percent
public readonly midPricePercentChange: Percent public readonly midPricePercentChange: Percent
static validate(amount: JSBI) { constructor(route: Route, amount: TokenAmount, tradeType: TradeType) {
validateSolidityTypeInstance(amount, SolidityType.uint256) invariant(amount.token.equals(tradeType === TradeType.EXACT_INPUT ? route.input : route.output), 'TOKEN')
} const amounts: TokenAmount[] = new Array(route.path.length)
constructor(route: Route, amount: BigintIsh, tradeType: TradeType) {
const amountParsed = parseBigintIsh(amount)
Trade.validate(amountParsed)
const amounts: JSBI[] = new Array(route.exchanges.length + 1)
const nextExchanges: Exchange[] = new Array(route.exchanges.length) const nextExchanges: Exchange[] = new Array(route.exchanges.length)
if (tradeType === TradeType.EXACT_INPUT) { if (tradeType === TradeType.EXACT_INPUT) {
amounts[0] = amountParsed amounts[0] = amount
route.exchanges.forEach((exchange, i) => { for (let i = 0; i < route.path.length - 1; i++) {
const input = route.path[i] const exchange = route.exchanges[i]
const inputIndex = input.address === exchange.pair[0].address ? 0 : 1 const [outputAmount, nextExchange] = exchange.getOutputAmount(amounts[i])
const outputIndex = input.address === exchange.pair[0].address ? 1 : 0
const inputAmount = amounts[i]
const outputAmount = getOutputAmount(inputAmount, exchange.balances[inputIndex], exchange.balances[outputIndex])
amounts[i + 1] = outputAmount amounts[i + 1] = outputAmount
const nextExchange = new Exchange(
[exchange.pair[inputIndex], exchange.pair[outputIndex]],
[
JSBI.add(exchange.balances[inputIndex], inputAmount),
JSBI.subtract(exchange.balances[outputIndex], outputAmount)
]
)
nextExchanges[i] = nextExchange nextExchanges[i] = nextExchange
}) }
} else if (tradeType === TradeType.EXACT_OUTPUT) { } else {
amounts[amounts.length - 1] = amountParsed amounts[amounts.length - 1] = amount
route.exchanges for (let i = route.path.length - 1; i > 0; i--) {
.slice() const exchange = route.exchanges[i - 1]
.reverse() const [inputAmount, nextExchange] = exchange.getInputAmount(amounts[i])
.forEach((exchange, i) => { amounts[i - 1] = inputAmount
const inverseIndex = route.exchanges.length - 1 - i nextExchanges[i - 1] = nextExchange
const input = route.path[inverseIndex] }
const inputIndex = input.address === exchange.pair[0].address ? 0 : 1
const outputIndex = input.address === exchange.pair[0].address ? 1 : 0
const outputAmount = amounts[inverseIndex + 1]
const inputAmount = getInputAmount(
outputAmount,
exchange.balances[inputIndex],
exchange.balances[outputIndex]
)
amounts[inverseIndex] = inputAmount
const nextExchange = new Exchange(
[exchange.pair[inputIndex], exchange.pair[outputIndex]],
[
JSBI.add(exchange.balances[inputIndex], inputAmount),
JSBI.subtract(exchange.balances[outputIndex], outputAmount)
]
)
nextExchanges[inverseIndex] = nextExchange
})
} }
this.route = route this.route = route
this.tradeType = tradeType
const inputAmount = amounts[0] const inputAmount = amounts[0]
const outputAmount = amounts[amounts.length - 1] const outputAmount = amounts[amounts.length - 1]
this.inputAmount = inputAmount this.inputAmount = inputAmount
this.outputAmount = outputAmount this.outputAmount = outputAmount
this.tradeType = tradeType this.executionPrice = new Price(route.input, route.output, inputAmount.raw, outputAmount.raw)
this.executionPrice = new Price(
new Fraction(outputAmount, inputAmount).multiply(route.midPrice.scalar.invert()),
route.midPrice.scalar
)
const nextMidPrice = Price.fromRoute(new Route(nextExchanges, route.input)) const nextMidPrice = Price.fromRoute(new Route(nextExchanges, route.input))
this.nextMidPrice = nextMidPrice this.nextMidPrice = nextMidPrice
this.slippage = getSlippage(inputAmount, route.midPrice, outputAmount) this.slippage = getSlippage(inputAmount, route.midPrice, outputAmount)
......
export * from './types' export * from './types'
export { ChainId, WETH, TradeType } from './constants' export * from './constants'
export * from './entities' export * from './entities'
export * from './utils'
import JSBI from 'jsbi' import JSBI from 'jsbi'
export type BigintIsh = bigint | JSBI | string export type BigintIsh = JSBI | bigint | string
export enum Rounding {
ROUND_DOWN,
ROUND_HALF_UP,
ROUND_UP
}
import invariant from 'tiny-invariant'
import warning from 'tiny-warning'
import JSBI from 'jsbi'
import { getAddress } from '@ethersproject/address'
import { BigintIsh } from './types'
import { ZERO, SolidityType } from './constants'
const SOLIDITY_TYPE_MAXIMA = {
[SolidityType.uint8]: JSBI.BigInt('0xff'),
[SolidityType.uint256]: JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')
}
// only works for uint{8,256}
export function validateSolidityTypeInstance(value: JSBI, solidityType: SolidityType): void {
invariant(JSBI.greaterThanOrEqual(value, ZERO), `${value} is not a ${solidityType}.`)
invariant(JSBI.lessThanOrEqual(value, SOLIDITY_TYPE_MAXIMA[solidityType]), `${value} is not a ${solidityType}.`)
}
// warns if addresses are not checksummed
export function validateAndParseAddress(address: string): string {
try {
const checksummedAddress = getAddress(address)
warning(address === checksummedAddress, `${address} is not checksummed.`)
return checksummedAddress
} catch (error) {
invariant(false, `${address} is not a valid address.`)
}
}
export function parseBigintIsh(bigintIsh: BigintIsh): JSBI {
return bigintIsh instanceof JSBI
? bigintIsh
: typeof bigintIsh === 'bigint'
? JSBI.BigInt(bigintIsh.toString())
: JSBI.BigInt(bigintIsh)
}
import invariant from 'tiny-invariant'
import _Decimal from 'decimal.js-light'
import _Big, { RoundingMode } from 'big.js'
import toFormat from 'toformat'
import { BigintIsh } from '../types'
import { ONE } from '../constants'
import { parseBigintIsh } from './parseInputs'
const Decimal = toFormat(_Decimal)
const Big = toFormat(_Big)
export function formatSignificant(
numerator: BigintIsh,
denominator: BigintIsh = ONE,
significantDigits: number,
format: object = { groupSeparator: '' },
roundingMode: number = Decimal.ROUND_HALF_UP
): string {
invariant(Number.isInteger(significantDigits), `${significantDigits} is not an integer.`)
invariant(significantDigits > 0, `${significantDigits} isn't positive.`)
const numeratorParsed = parseBigintIsh(numerator)
const denominatorParsed = parseBigintIsh(denominator)
Decimal.set({ precision: significantDigits + 1, rounding: roundingMode })
const quotient = new Decimal(numeratorParsed.toString())
.div(denominatorParsed.toString())
.toSignificantDigits(significantDigits)
return quotient.toFormat(
quotient.precision(true) >= significantDigits
? quotient.decimalPlaces()
: significantDigits - (quotient.precision(true) - quotient.decimalPlaces()),
format
)
}
export function formatFixed(
numerator: BigintIsh,
denominator: BigintIsh = ONE,
decimalPlaces: number,
format: object = { groupSeparator: '' },
roundingMode: RoundingMode = RoundingMode.RoundHalfUp
): string {
invariant(Number.isInteger(decimalPlaces), `${decimalPlaces} is not an integer.`)
invariant(decimalPlaces >= 0, `${decimalPlaces} is negative.`)
const numeratorParsed = parseBigintIsh(numerator)
const denominatorParsed = parseBigintIsh(denominator)
Big.DP = decimalPlaces
Big.RM = roundingMode
return new Big(numeratorParsed.toString()).div(denominatorParsed.toString()).toFormat(decimalPlaces, format)
}
export * from './formatOutputs'
import JSBI from 'jsbi'
import { BigintIsh } from '../types'
export function parseBigintIsh(bigintIsh: BigintIsh): JSBI {
return typeof bigintIsh === 'bigint'
? JSBI.BigInt(bigintIsh.toString())
: bigintIsh instanceof JSBI
? bigintIsh
: JSBI.BigInt(bigintIsh)
}
import invariant from 'tiny-invariant'
import JSBI from 'jsbi'
import { getAddress } from '@ethersproject/address'
import { ZERO, ChainId, SolidityType } from '../constants'
export function validateChainId(chainId: number) {
invariant(!!ChainId[chainId], `${chainId} is not a supported chainId.`)
}
export function validateAddress(address: string) {
try {
if (address !== getAddress(address)) {
throw Error('Address is not properly checksummed.')
}
} catch (error) {
invariant(false, `${address} is an invalid address. ${error}`)
}
}
const SolidityTypeMaxima = {
[SolidityType.uint8]: JSBI.BigInt(2 ** 8 - 1),
[SolidityType.uint256]: JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff')
}
export function validateSolidityTypeInstance(value: JSBI, solidityType: SolidityType) {
invariant(JSBI.greaterThanOrEqual(value, ZERO), `${value} is negative.`)
invariant(JSBI.lessThanOrEqual(value, SolidityTypeMaxima[solidityType]), `${value} is too large.`)
}
import { ChainId, WETH as _WETH, TradeType, Token, Exchange, Route, Trade } from '../src'
const ADDRESSES = [
'0x0000000000000000000000000000000000000000',
'0x0000000000000000000000000000000000000001',
'0x0000000000000000000000000000000000000002'
]
const CHAIN_ID = ChainId.RINKEBY
const WETH = _WETH[ChainId.RINKEBY]
function getTokens(n: number, decimals: number | number[]) {
return ADDRESSES.slice(0, n).map(
(address, i) => new Token(CHAIN_ID, address, typeof decimals === 'number' ? decimals : decimals[i])
)
}
function decimalize(amount: number, decimal: number): bigint {
return BigInt(amount) * BigInt(10) ** BigInt(decimal)
}
describe('entities', () => {
;[
[0, 0, 0],
[0, 9, 18],
[18, 18, 18]
].forEach(decimals => {
describe(`decimals: ${decimals}`, () => {
let tokens: Token[]
it('Token', () => {
tokens = getTokens(3, decimals)
tokens.forEach((token, i) => {
expect(token.chainId).toEqual(CHAIN_ID)
expect(token.address).toEqual(ADDRESSES[i])
expect(token.decimals).toEqual(decimals[i])
})
})
let exchanges: Exchange[]
it('Exchange', () => {
const pairs: [Token, Token][] = [
[tokens[0], tokens[1]],
[tokens[1], tokens[2]],
[tokens[2], WETH]
]
const balances: [bigint, bigint][] = [
[decimalize(1, pairs[0][0].decimals), decimalize(1, pairs[0][1].decimals)],
[decimalize(1, pairs[1][0].decimals), decimalize(1, pairs[1][1].decimals)],
[decimalize(1, pairs[2][0].decimals), decimalize(1234, pairs[2][1].decimals)]
]
exchanges = [
new Exchange(pairs[0], balances[0]),
new Exchange(pairs[1], balances[1]),
new Exchange(pairs[2], balances[2])
]
})
let route: Route
it('Route', () => {
route = new Route(exchanges, tokens[0])
expect(route.path).toEqual(tokens.concat([WETH]))
expect(route.input).toEqual(tokens[0])
expect(route.output).toEqual(WETH)
})
it('Price via Route.marketRate', () => {
expect(route.midPrice.quote(decimalize(1, route.input.decimals)).toString()).toEqual(
decimalize(1234, route.output.decimals).toString()
)
expect(
route.midPrice
.invert()
.quote(decimalize(1234, route.output.decimals))
.toString()
).toEqual(decimalize(1, route.input.decimals).toString())
expect(route.midPrice.formatSignificant(1)).toEqual('1000')
expect(route.midPrice.formatSignificant(2)).toEqual('1200')
expect(route.midPrice.formatSignificant(3)).toEqual('1230')
expect(route.midPrice.formatSignificant(4)).toEqual('1234')
expect(route.midPrice.formatSignificant(5)).toEqual('1234.0')
expect(route.midPrice.formatSignificant(5, { groupSeparator: ',' })).toEqual('1,234.0')
expect(route.midPrice.invert().formatSignificant(1)).toEqual('0.0008')
expect(route.midPrice.invert().formatSignificant(2)).toEqual('0.00081')
expect(route.midPrice.invert().formatSignificant(3)).toEqual('0.000810')
expect(route.midPrice.invert().formatSignificant(4)).toEqual('0.0008104')
expect(route.midPrice.invert().formatSignificant(4, undefined, 1)).toEqual('0.0008103')
expect(route.midPrice.invert().formatSignificant(5)).toEqual('0.00081037')
expect(route.midPrice.formatFixed(0)).toEqual('1234')
expect(route.midPrice.formatFixed(1)).toEqual('1234.0')
expect(route.midPrice.formatFixed(2)).toEqual('1234.00')
expect(route.midPrice.formatFixed(2, { groupSeparator: ',' })).toEqual('1,234.00')
expect(route.midPrice.invert().formatFixed(0)).toEqual('0')
expect(route.midPrice.invert().formatFixed(1)).toEqual('0.0')
expect(route.midPrice.invert().formatFixed(2)).toEqual('0.00')
expect(route.midPrice.invert().formatFixed(3)).toEqual('0.001')
expect(route.midPrice.invert().formatFixed(4)).toEqual('0.0008')
expect(route.midPrice.invert().formatFixed(5)).toEqual('0.00081')
expect(route.midPrice.invert().formatFixed(6)).toEqual('0.000810')
expect(route.midPrice.invert().formatFixed(7)).toEqual('0.0008104')
expect(route.midPrice.invert().formatFixed(7, undefined, 0)).toEqual('0.0008103')
expect(route.midPrice.invert().formatFixed(8)).toEqual('0.00081037')
})
describe('Trade', () => {
it('TradeType.EXACT_INPUT', () => {
const exchanges = [
new Exchange([tokens[1], WETH], [decimalize(5, tokens[1].decimals), decimalize(10, WETH.decimals)])
]
const route = new Route(exchanges, tokens[1])
const inputAmount = decimalize(1, tokens[1].decimals)
const trade = new Trade(route, inputAmount, TradeType.EXACT_INPUT)
expect(trade.inputAmount.toString()).toEqual(inputAmount.toString())
expect(trade.outputAmount.toString()).toEqual('1662497915624478906')
expect(trade.executionPrice.formatSignificant(18)).toEqual('1.66249791562447891')
expect(trade.executionPrice.invert().formatSignificant(18)).toEqual('0.601504513540621866')
expect(trade.executionPrice.quote(inputAmount).toString()).toEqual(trade.outputAmount.toString())
expect(
trade.executionPrice
.invert()
.quote(trade.outputAmount)
.toString()
).toEqual(inputAmount.toString())
expect(trade.nextMidPrice.formatSignificant(18)).toEqual('1.38958368072925352')
expect(trade.nextMidPrice.invert().formatSignificant(18)).toEqual('0.719640000000000000')
expect(trade.slippage.formatSignificant(18)).toEqual('-16.8751042187760547')
expect(trade.midPricePercentChange.formatSignificant(18)).toEqual('-30.5208159635373242')
})
it('TradeType.EXACT_OUTPUT', () => {
const exchanges = [
new Exchange([tokens[1], WETH], [decimalize(5, tokens[1].decimals), decimalize(10, WETH.decimals)])
]
const route = new Route(exchanges, tokens[1])
const outputAmount = BigInt('1662497915624478906')
const trade = new Trade(route, outputAmount, TradeType.EXACT_OUTPUT)
expect(trade.inputAmount.toString()).toEqual(decimalize(1, tokens[1].decimals).toString())
expect(trade.outputAmount.toString()).toEqual(outputAmount.toString())
// TODO think about inverse execution price?
expect(trade.executionPrice.formatSignificant(18)).toEqual('1.66249791562447891')
expect(trade.executionPrice.invert().formatSignificant(18)).toEqual('0.601504513540621866')
expect(trade.executionPrice.quote(trade.inputAmount).toString()).toEqual(outputAmount.toString())
expect(
trade.executionPrice
.invert()
.quote(outputAmount)
.toString()
).toEqual(trade.inputAmount.toString())
expect(trade.nextMidPrice.formatSignificant(18)).toEqual('1.38958368072925352')
expect(trade.nextMidPrice.invert().formatSignificant(18)).toEqual('0.719640000000000000')
expect(trade.slippage.formatSignificant(18)).toEqual('-16.8751042187760547')
expect(trade.midPricePercentChange.formatSignificant(18)).toEqual('-30.5208159635373242')
})
it('minimum TradeType.EXACT_INPUT', () => {
if ([9, 18].includes(tokens[1].decimals)) {
const exchanges = [
new Exchange(
[tokens[1], WETH],
[
decimalize(1, tokens[1].decimals),
decimalize(10, WETH.decimals) +
(tokens[1].decimals === 9 ? BigInt('30090280812437312') : BigInt('30090270812437322'))
]
)
]
const route = new Route(exchanges, tokens[1])
const trade = new Trade(route, '1', TradeType.EXACT_INPUT)
expect(trade.slippage.formatSignificant(18)).toEqual(
tokens[1].decimals === 9 ? '-0.300000099400899902' : '-0.300000000000000100'
)
}
})
})
})
})
})
import { ChainId, WETH, Token, Exchange } from '../src'
describe('data', () => {
it('Token', async () => {
const token = await Token.fetchData(ChainId.MAINNET, '0x6B175474E89094C44Da98b954EedeAC495271d0F') // DAI
expect(token.decimals).toEqual(18)
})
it('Token:CACHE', async () => {
const token = await Token.fetchData(ChainId.MAINNET, '0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A') // DGD
expect(token.decimals).toEqual(9)
})
it('Exchange', async () => {
const token = new Token(ChainId.RINKEBY, '0xc7AD46e0b8a400Bb3C915120d284AafbA8fc4735', 18) // DAI
const exchange = await Exchange.fetchData(WETH[ChainId.RINKEBY], token)
expect(exchange.address).toEqual('0xC0568fA2FC63123B7352c506076DFa5623D62Db5')
})
})
import { ChainId, WETH as _WETH, TradeType, Rounding, Token, TokenAmount, Exchange, Route, Trade } from '../src'
const ADDRESSES = [
'0x0000000000000000000000000000000000000001',
'0x0000000000000000000000000000000000000002',
'0x0000000000000000000000000000000000000003'
]
const CHAIN_ID = ChainId.RINKEBY
const WETH = _WETH[ChainId.RINKEBY]
const DECIMAL_PERMUTATIONS: [number, number, number][] = [
[0, 0, 0],
[0, 9, 18],
[18, 18, 18]
]
function decimalize(amount: number, decimals: number): bigint {
return BigInt(amount) * BigInt(10) ** BigInt(decimals)
}
describe('entities', () => {
DECIMAL_PERMUTATIONS.forEach(decimals => {
describe(`decimals permutation: ${decimals}`, () => {
let tokens: Token[]
it('Token', () => {
tokens = ADDRESSES.map((address, i) => new Token(CHAIN_ID, address, decimals[i]))
tokens.forEach((token, i) => {
expect(token.chainId).toEqual(CHAIN_ID)
expect(token.address).toEqual(ADDRESSES[i])
expect(token.decimals).toEqual(decimals[i])
})
})
let exchanges: Exchange[]
it('Exchange', () => {
exchanges = [
new Exchange(
new TokenAmount(tokens[0], decimalize(1, tokens[0].decimals)),
new TokenAmount(tokens[1], decimalize(1, tokens[1].decimals))
),
new Exchange(
new TokenAmount(tokens[1], decimalize(1, tokens[1].decimals)),
new TokenAmount(tokens[2], decimalize(1, tokens[2].decimals))
),
new Exchange(
new TokenAmount(tokens[2], decimalize(1, tokens[2].decimals)),
new TokenAmount(WETH, decimalize(1234, WETH.decimals))
)
]
})
let route: Route
it('Route', () => {
route = new Route(exchanges, tokens[0])
expect(route.exchanges).toEqual(exchanges)
expect(route.path).toEqual(tokens.concat([WETH]))
expect(route.input).toEqual(tokens[0])
expect(route.output).toEqual(WETH)
})
it('Price:Route.midPrice', () => {
expect(route.midPrice.quote(new TokenAmount(route.input, decimalize(1, route.input.decimals)))).toEqual(
new TokenAmount(route.output, decimalize(1234, route.output.decimals))
)
expect(
route.midPrice.invert().quote(new TokenAmount(route.output, decimalize(1234, route.output.decimals)))
).toEqual(new TokenAmount(route.input, decimalize(1, route.input.decimals)))
expect(route.midPrice.toSignificant(1)).toEqual('1000')
expect(route.midPrice.toSignificant(2)).toEqual('1200')
expect(route.midPrice.toSignificant(3)).toEqual('1230')
expect(route.midPrice.toSignificant(4)).toEqual('1234')
expect(route.midPrice.toSignificant(5)).toEqual('1234.0')
expect(route.midPrice.toSignificant(5, { groupSeparator: ',' })).toEqual('1,234.0')
expect(route.midPrice.invert().toSignificant(1)).toEqual('0.0008')
expect(route.midPrice.invert().toSignificant(2)).toEqual('0.00081')
expect(route.midPrice.invert().toSignificant(3)).toEqual('0.000810')
expect(route.midPrice.invert().toSignificant(4)).toEqual('0.0008104')
expect(route.midPrice.invert().toSignificant(4, undefined, Rounding.ROUND_DOWN)).toEqual('0.0008103')
expect(route.midPrice.invert().toSignificant(5)).toEqual('0.00081037')
expect(route.midPrice.toFixed(0)).toEqual('1234')
expect(route.midPrice.toFixed(1)).toEqual('1234.0')
expect(route.midPrice.toFixed(2)).toEqual('1234.00')
expect(route.midPrice.toFixed(2, { groupSeparator: ',' })).toEqual('1,234.00')
expect(route.midPrice.invert().toFixed(0)).toEqual('0')
expect(route.midPrice.invert().toFixed(1)).toEqual('0.0')
expect(route.midPrice.invert().toFixed(2)).toEqual('0.00')
expect(route.midPrice.invert().toFixed(3)).toEqual('0.001')
expect(route.midPrice.invert().toFixed(4)).toEqual('0.0008')
expect(route.midPrice.invert().toFixed(5)).toEqual('0.00081')
expect(route.midPrice.invert().toFixed(6)).toEqual('0.000810')
expect(route.midPrice.invert().toFixed(7)).toEqual('0.0008104')
expect(route.midPrice.invert().toFixed(7, undefined, Rounding.ROUND_DOWN)).toEqual('0.0008103')
expect(route.midPrice.invert().toFixed(8)).toEqual('0.00081037')
})
describe('Trade', () => {
let route: Route
it('TradeType.EXACT_INPUT', () => {
route = new Route(
[
new Exchange(
new TokenAmount(tokens[1], decimalize(5, tokens[1].decimals)),
new TokenAmount(WETH, decimalize(10, WETH.decimals))
)
],
tokens[1]
)
const inputAmount = new TokenAmount(tokens[1], decimalize(1, tokens[1].decimals))
const expectedOutputAmount = new TokenAmount(WETH, '1662497915624478906')
const trade = new Trade(route, inputAmount, TradeType.EXACT_INPUT)
expect(trade.route).toEqual(route)
expect(trade.tradeType).toEqual(TradeType.EXACT_INPUT)
expect(trade.inputAmount).toEqual(inputAmount)
expect(trade.outputAmount).toEqual(expectedOutputAmount)
expect(trade.executionPrice.toSignificant(18)).toEqual('1.66249791562447891')
expect(trade.executionPrice.invert().toSignificant(18)).toEqual('0.601504513540621866')
expect(trade.executionPrice.quote(inputAmount)).toEqual(expectedOutputAmount)
expect(trade.executionPrice.invert().quote(expectedOutputAmount)).toEqual(inputAmount)
expect(trade.nextMidPrice.toSignificant(18)).toEqual('1.38958368072925352')
expect(trade.nextMidPrice.invert().toSignificant(18)).toEqual('0.719640000000000000')
expect(trade.slippage.toSignificant(18)).toEqual('-16.8751042187760547')
expect(trade.midPricePercentChange.toSignificant(18)).toEqual('-30.5208159635373242')
})
it('TradeType.EXACT_OUTPUT', () => {
const outputAmount = new TokenAmount(WETH, '1662497915624478906')
const expectedInputAmount = new TokenAmount(tokens[1], decimalize(1, tokens[1].decimals))
const trade = new Trade(route, outputAmount, TradeType.EXACT_OUTPUT)
expect(trade.route).toEqual(route)
expect(trade.tradeType).toEqual(TradeType.EXACT_OUTPUT)
expect(trade.outputAmount).toEqual(outputAmount)
expect(trade.inputAmount).toEqual(expectedInputAmount)
expect(trade.executionPrice.toSignificant(18)).toEqual('1.66249791562447891')
expect(trade.executionPrice.invert().toSignificant(18)).toEqual('0.601504513540621866')
expect(trade.executionPrice.quote(expectedInputAmount)).toEqual(outputAmount)
expect(trade.executionPrice.invert().quote(outputAmount)).toEqual(expectedInputAmount)
expect(trade.nextMidPrice.toSignificant(18)).toEqual('1.38958368072925352')
expect(trade.nextMidPrice.invert().toSignificant(18)).toEqual('0.719640000000000000')
expect(trade.slippage.toSignificant(18)).toEqual('-16.8751042187760547')
expect(trade.midPricePercentChange.toSignificant(18)).toEqual('-30.5208159635373242')
})
it('minimum TradeType.EXACT_INPUT', () => {
if ([9, 18].includes(tokens[1].decimals)) {
const route = new Route(
[
new Exchange(
new TokenAmount(tokens[1], decimalize(1, tokens[1].decimals)),
new TokenAmount(
WETH,
decimalize(10, WETH.decimals) +
(tokens[1].decimals === 9 ? BigInt('30090280812437312') : BigInt('30090270812437322'))
)
)
],
tokens[1]
)
const outputAmount = new TokenAmount(tokens[1], '1')
const trade = new Trade(route, outputAmount, TradeType.EXACT_INPUT)
expect(trade.slippage.toSignificant(18)).toEqual(
tokens[1].decimals === 9 ? '-0.300000099400899902' : '-0.300000000000000100'
)
}
})
})
})
})
})
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
"paths": { "paths": {
"*": ["src/*", "node_modules/*"] "*": ["src/*", "node_modules/*"]
}, },
"esModuleInterop": true "esModuleInterop": true,
"resolveJsonModule": true
} }
} }
...@@ -769,7 +769,46 @@ ...@@ -769,7 +769,46 @@
exec-sh "^0.3.2" exec-sh "^0.3.2"
minimist "^1.2.0" minimist "^1.2.0"
"@ethersproject/address@^5.0.0-beta.134": "@ethersproject/abi@>=5.0.0-beta.137":
version "5.0.0-beta.144"
resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.144.tgz#04eb86776f92bece9ec603a02ba13d736588e3a4"
integrity sha512-/gFYNiWDRcpJuKx1BXUnd2Yt1RdxcW1eLqvCFZKSbA7FFXZ4N3EceYn/SijpEY4yCR56UEHpxzJB3E882foRYA==
dependencies:
"@ethersproject/address" ">=5.0.0-beta.128"
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/constants" ">=5.0.0-beta.128"
"@ethersproject/hash" ">=5.0.0-beta.128"
"@ethersproject/keccak256" ">=5.0.0-beta.127"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/strings" ">=5.0.0-beta.130"
"@ethersproject/abstract-provider@>=5.0.0-beta.131":
version "5.0.0-beta.137"
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.0.0-beta.137.tgz#c118812b08ada766e63cfe2304961ef3cd30a52b"
integrity sha512-fAB8vkeUxe9wxHQn2xGpblMX8gHQaGh2Qorev4aokrtGW9UH0qFOtdg0lfWc6i1625Q+xMlR9L8d1tXjcJZTJw==
dependencies:
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/networks" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/transactions" ">=5.0.0-beta.128"
"@ethersproject/web" ">=5.0.0-beta.129"
"@ethersproject/abstract-signer@>=5.0.0-beta.132":
version "5.0.0-beta.138"
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.0.0-beta.138.tgz#0d0a11576ad617e6434a299e696620770d9d664f"
integrity sha512-J/E1gfourQRxaM9kDgD64o5FxSJ+1GgXIKRz3sx5WdvYVYRiNbpvlQ9cKVQeWiqC9LMtYhlHJbzntYUE0rgw/w==
dependencies:
"@ethersproject/abstract-provider" ">=5.0.0-beta.131"
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.0-beta.134":
version "5.0.0-beta.134" version "5.0.0-beta.134"
resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.0-beta.134.tgz#9c1790c87b763dc547ac12e2dbc9fa78d0799a71" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.0-beta.134.tgz#9c1790c87b763dc547ac12e2dbc9fa78d0799a71"
integrity sha512-FHhUVJTUIg2pXvOOhIt8sB1cQbcwrzZKzf9CPV7JM1auli20nGoYhyMFYGK7u++GXzTMJduIkU1OwlIBupewDw== integrity sha512-FHhUVJTUIg2pXvOOhIt8sB1cQbcwrzZKzf9CPV7JM1auli20nGoYhyMFYGK7u++GXzTMJduIkU1OwlIBupewDw==
...@@ -781,6 +820,13 @@ ...@@ -781,6 +820,13 @@
"@ethersproject/rlp" ">=5.0.0-beta.126" "@ethersproject/rlp" ">=5.0.0-beta.126"
bn.js "^4.4.0" bn.js "^4.4.0"
"@ethersproject/base64@>=5.0.0-beta.126":
version "5.0.0-beta.131"
resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.0.0-beta.131.tgz#eb308ed6fd614cb1a7bc0bb50fd05abedb6ca965"
integrity sha512-pjgZZyDlGpSBkbuO87hnmVrOa92znIt5EIGBW1Mly5Nby8PU4YVwK3WoRP2vGd7hViNVLPCgfbmhh6LQhWK1sg==
dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/bignumber@>=5.0.0-beta.130": "@ethersproject/bignumber@>=5.0.0-beta.130":
version "5.0.0-beta.135" version "5.0.0-beta.135"
resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.0-beta.135.tgz#9d464df8967f5d314d109497e4f25ab82314c098" resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.0-beta.135.tgz#9d464df8967f5d314d109497e4f25ab82314c098"
...@@ -798,6 +844,39 @@ ...@@ -798,6 +844,39 @@
dependencies: dependencies:
"@ethersproject/logger" ">=5.0.0-beta.129" "@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/constants@>=5.0.0-beta.128":
version "5.0.0-beta.133"
resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.0-beta.133.tgz#af4ccd7232f3ed73aebe066a695ede32c497a394"
integrity sha512-VCTpk3AF00mlWQw1vg+fI6qCo0qO5EVWK574t4HNBKW6X748jc9UJPryKUz9JgZ64ZQupyLM92wHilsG/YTpNQ==
dependencies:
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/contracts@^5.0.0-beta.143":
version "5.0.0-beta.143"
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.0.0-beta.143.tgz#5fc2ed962f3364534b80048cb742a231354a4b80"
integrity sha512-xjWNlnbhfAkWxBW1ICi6l/O9iplf6GW8IlN57DddERCuzJnj3t2g3PinVTacH27ySqApnWF2FbFQIf0BRYp5hQ==
dependencies:
"@ethersproject/abi" ">=5.0.0-beta.137"
"@ethersproject/abstract-provider" ">=5.0.0-beta.131"
"@ethersproject/abstract-signer" ">=5.0.0-beta.132"
"@ethersproject/address" ">=5.0.0-beta.128"
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/constants" ">=5.0.0-beta.128"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/transactions" ">=5.0.0-beta.128"
"@ethersproject/hash@>=5.0.0-beta.128":
version "5.0.0-beta.133"
resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.0-beta.133.tgz#bda0c74454a82359642033f27c5157963495fcdf"
integrity sha512-tfF11QxFlJCy92rMtUZ0kImchWhlYXkN5Gj5cYfTcCdWEUKwNq1LljDnlrjV2JabO6s5enb8uiUj4RBTo2+Rgw==
dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/keccak256" ">=5.0.0-beta.127"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/strings" ">=5.0.0-beta.130"
"@ethersproject/keccak256@>=5.0.0-beta.127": "@ethersproject/keccak256@>=5.0.0-beta.127":
version "5.0.0-beta.131" version "5.0.0-beta.131"
resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.0-beta.131.tgz#b5778723ee75208065b9b9ad30c71d480f41bb31" resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.0-beta.131.tgz#b5778723ee75208065b9b9ad30c71d480f41bb31"
...@@ -811,6 +890,13 @@ ...@@ -811,6 +890,13 @@
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.0-beta.133.tgz#2d62d495ed413c7045054d4f99a0fb4920079b2e" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.0-beta.133.tgz#2d62d495ed413c7045054d4f99a0fb4920079b2e"
integrity sha512-1ISf7rFKFbMHlEB37JS7Oy3FgFlvzF2Ze2uFZMJHGKp9xgDvFy1VHNMBM1KrJPK4AqCZXww0//e2keLsN3g/Cw== integrity sha512-1ISf7rFKFbMHlEB37JS7Oy3FgFlvzF2Ze2uFZMJHGKp9xgDvFy1VHNMBM1KrJPK4AqCZXww0//e2keLsN3g/Cw==
"@ethersproject/networks@>=5.0.0-beta.129", "@ethersproject/networks@^5.0.0-beta.134":
version "5.0.0-beta.134"
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.0.0-beta.134.tgz#934cb8d62c0dce123ef436bebc2578692e20c25d"
integrity sha512-96Gw2z27mFxcSNGD3ZqzFC4ssnrKkYSUHH8rqqyFBfz+WEWrP5Qc2gkBpMJ0QluVNOHr5MhptufvZXAgsGTuAw==
dependencies:
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties@>=5.0.0-beta.131": "@ethersproject/properties@>=5.0.0-beta.131":
version "5.0.0-beta.136" version "5.0.0-beta.136"
resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.0-beta.136.tgz#4834f6eeb4d66aa9d2bb4d8b7a8517077df3eb63" resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.0-beta.136.tgz#4834f6eeb4d66aa9d2bb4d8b7a8517077df3eb63"
...@@ -818,6 +904,35 @@ ...@@ -818,6 +904,35 @@
dependencies: dependencies:
"@ethersproject/logger" ">=5.0.0-beta.129" "@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/providers@^5.0.0-beta.151":
version "5.0.0-beta.151"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.0.0-beta.151.tgz#fb280b3f1475b9abd9e9e17e3d6db6a6e64c19bd"
integrity sha512-qlbxsyAQ4W/QK/fMynwzt/woO8JbZW/37iJpTS+JNK3FrMQoumsyCjhr4N8FREUHOei2vDuGBIsjN6ltbT8qvA==
dependencies:
"@ethersproject/abstract-provider" ">=5.0.0-beta.131"
"@ethersproject/abstract-signer" ">=5.0.0-beta.132"
"@ethersproject/address" ">=5.0.0-beta.128"
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/constants" ">=5.0.0-beta.128"
"@ethersproject/hash" ">=5.0.0-beta.128"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/networks" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/random" ">=5.0.0-beta.128"
"@ethersproject/rlp" ">=5.0.0-beta.126"
"@ethersproject/strings" ">=5.0.0-beta.130"
"@ethersproject/transactions" ">=5.0.0-beta.128"
"@ethersproject/web" ">=5.0.0-beta.129"
"@ethersproject/random@>=5.0.0-beta.128":
version "5.0.0-beta.133"
resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.0.0-beta.133.tgz#5a7a05bc8bba446995eee77008ec2d48c938071f"
integrity sha512-walmaJK9MWy02I0SAHmv5Dg8His0Vn4x/ehqlu081z5gpm0WRo9H+3tlhaHQzAI0aK6B3mRV0bsG+PvWRh41Jg==
dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/rlp@>=5.0.0-beta.126": "@ethersproject/rlp@>=5.0.0-beta.126":
version "5.0.0-beta.131" version "5.0.0-beta.131"
resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.0-beta.131.tgz#4a0c0c314e26ed7f01be6bca16308d629a8022d2" resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.0.0-beta.131.tgz#4a0c0c314e26ed7f01be6bca16308d629a8022d2"
...@@ -825,6 +940,51 @@ ...@@ -825,6 +940,51 @@
dependencies: dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129" "@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/signing-key@>=5.0.0-beta.129":
version "5.0.0-beta.135"
resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.0.0-beta.135.tgz#f739e800aad9e01b77a8ec2c353b9b66ce5738fa"
integrity sha512-D4w5svi8F8eYs+LTuroKzOR8le6ZKtmH/mDmtuz15vz3XdOkLPGVne5mqqqLJd8APBnOEDtsAqmg7ZCrAk8Mag==
dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
elliptic "6.5.2"
"@ethersproject/strings@>=5.0.0-beta.130":
version "5.0.0-beta.136"
resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.0-beta.136.tgz#053cbf4f9f96a7537cbc50300597f2d707907f51"
integrity sha512-Hb9RvTrgGcOavHvtQZz+AuijB79BO3g1cfF2MeMfCU9ID4j3mbZv/olzDMS2pK9r4aERJpAS94AmlWzCgoY2LQ==
dependencies:
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/constants" ">=5.0.0-beta.128"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/transactions@>=5.0.0-beta.128":
version "5.0.0-beta.133"
resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.0-beta.133.tgz#5fbc008fdf99478621159aa8ae765add709b1da8"
integrity sha512-KKmtmC1ROcXmZ30zKp/NdoPSMiyt9jtj43XtMOh+oR5VVZ8Zlcmh7q2HchoNEl6jJaWpNybuhXYFhrb73fYhhA==
dependencies:
"@ethersproject/address" ">=5.0.0-beta.128"
"@ethersproject/bignumber" ">=5.0.0-beta.130"
"@ethersproject/bytes" ">=5.0.0-beta.129"
"@ethersproject/constants" ">=5.0.0-beta.128"
"@ethersproject/keccak256" ">=5.0.0-beta.127"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/rlp" ">=5.0.0-beta.126"
"@ethersproject/signing-key" ">=5.0.0-beta.129"
"@ethersproject/web@>=5.0.0-beta.129":
version "5.0.0-beta.135"
resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.0.0-beta.135.tgz#f2ddc5d7f3fbeda69f77c20aff271784f6c3ae5c"
integrity sha512-5g0jGtQvLeU/O0KTlp9cqm5PpuDUZzopJaO8LxZpFW9t+5uVuBcJe8uoA8z+OsAnsRKPc6bGBc9esrWEW0hKLw==
dependencies:
"@ethersproject/base64" ">=5.0.0-beta.126"
"@ethersproject/logger" ">=5.0.0-beta.129"
"@ethersproject/properties" ">=5.0.0-beta.131"
"@ethersproject/strings" ">=5.0.0-beta.130"
cross-fetch "3.0.4"
"@jest/console@^24.7.1", "@jest/console@^24.9.0": "@jest/console@^24.7.1", "@jest/console@^24.9.0":
version "24.9.0" version "24.9.0"
resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0"
...@@ -1219,11 +1379,6 @@ abab@^2.0.0: ...@@ -1219,11 +1379,6 @@ abab@^2.0.0:
resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a"
integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
acorn-globals@^4.1.0: acorn-globals@^4.1.0:
version "4.3.4" version "4.3.4"
resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7"
...@@ -1324,19 +1479,6 @@ anymatch@^2.0.0: ...@@ -1324,19 +1479,6 @@ anymatch@^2.0.0:
micromatch "^3.1.4" micromatch "^3.1.4"
normalize-path "^2.1.1" normalize-path "^2.1.1"
aproba@^1.0.3:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
are-we-there-yet@~1.1.2:
version "1.1.5"
resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
dependencies:
delegates "^1.0.0"
readable-stream "^2.0.6"
argparse@^1.0.7: argparse@^1.0.7:
version "1.0.10" version "1.0.10"
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
...@@ -1685,6 +1827,11 @@ braces@^2.3.1, braces@^2.3.2: ...@@ -1685,6 +1827,11 @@ braces@^2.3.1, braces@^2.3.2:
split-string "^3.0.2" split-string "^3.0.2"
to-regex "^3.0.1" to-regex "^3.0.1"
brorand@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=
browser-process-hrtime@^0.1.2: browser-process-hrtime@^0.1.2:
version "0.1.3" version "0.1.3"
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4"
...@@ -1839,11 +1986,6 @@ chokidar@2.1.5: ...@@ -1839,11 +1986,6 @@ chokidar@2.1.5:
optionalDependencies: optionalDependencies:
fsevents "^1.2.7" fsevents "^1.2.7"
chownr@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142"
integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw==
ci-info@^2.0.0: ci-info@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
...@@ -1907,11 +2049,6 @@ co@^4.6.0: ...@@ -1907,11 +2049,6 @@ co@^4.6.0:
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
collection-visit@^1.0.0: collection-visit@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
...@@ -1964,11 +2101,6 @@ confusing-browser-globals@^1.0.9: ...@@ -1964,11 +2101,6 @@ confusing-browser-globals@^1.0.9:
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd"
integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== integrity sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw==
console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
contains-path@^0.1.0: contains-path@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
...@@ -2027,6 +2159,14 @@ cross-env@6.0.3: ...@@ -2027,6 +2159,14 @@ cross-env@6.0.3:
dependencies: dependencies:
cross-spawn "^7.0.0" cross-spawn "^7.0.0"
cross-fetch@3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.0.4.tgz#7bef7020207e684a7638ef5f2f698e24d9eb283c"
integrity sha512-MSHgpjQqgbT/94D4CyADeNoYh52zMkCX4pcJvPP5WqPsLFMKjr2TCMg381ox5qI0ii2dPwaLx/00477knXqXVw==
dependencies:
node-fetch "2.6.0"
whatwg-fetch "3.0.0"
cross-spawn@^6.0.0, cross-spawn@^6.0.5: cross-spawn@^6.0.0, cross-spawn@^6.0.5:
version "6.0.5" version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
...@@ -2087,13 +2227,6 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: ...@@ -2087,13 +2227,6 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9:
dependencies: dependencies:
ms "2.0.0" ms "2.0.0"
debug@^3.2.6:
version "3.2.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
dependencies:
ms "^2.1.1"
debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: debug@^4.0.1, debug@^4.1.0, debug@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
...@@ -2116,11 +2249,6 @@ decode-uri-component@^0.2.0: ...@@ -2116,11 +2249,6 @@ decode-uri-component@^0.2.0:
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
deep-is@~0.1.3: deep-is@~0.1.3:
version "0.1.3" version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
...@@ -2167,16 +2295,6 @@ delayed-stream@~1.0.0: ...@@ -2167,16 +2295,6 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
detect-libc@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
detect-newline@^2.1.0: detect-newline@^2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
...@@ -2229,6 +2347,19 @@ electron-to-chromium@^1.3.338: ...@@ -2229,6 +2347,19 @@ electron-to-chromium@^1.3.338:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.338.tgz#4f33745aed599dfa0fd7b388bf754c164e915168" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.338.tgz#4f33745aed599dfa0fd7b388bf754c164e915168"
integrity sha512-wlmfixuHEc9CkfOKgcqdtzBmRW4NStM9ptl5oPILY2UDyHuSXb3Yit+yLVyLObTgGuMMU36hhnfs2GDJId7ctA== integrity sha512-wlmfixuHEc9CkfOKgcqdtzBmRW4NStM9ptl5oPILY2UDyHuSXb3Yit+yLVyLObTgGuMMU36hhnfs2GDJId7ctA==
elliptic@6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762"
integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==
dependencies:
bn.js "^4.4.0"
brorand "^1.0.1"
hash.js "^1.0.0"
hmac-drbg "^1.0.0"
inherits "^2.0.1"
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.0"
emoji-regex@^7.0.1, emoji-regex@^7.0.2: emoji-regex@^7.0.1, emoji-regex@^7.0.2:
version "7.0.3" version "7.0.3"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
...@@ -2759,13 +2890,6 @@ fs-extra@8.1.0, fs-extra@^8.0.1: ...@@ -2759,13 +2890,6 @@ fs-extra@8.1.0, fs-extra@^8.0.1:
jsonfile "^4.0.0" jsonfile "^4.0.0"
universalify "^0.1.0" universalify "^0.1.0"
fs-minipass@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
dependencies:
minipass "^2.6.0"
fs.realpath@^1.0.0: fs.realpath@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
...@@ -2789,20 +2913,6 @@ functional-red-black-tree@^1.0.1: ...@@ -2789,20 +2913,6 @@ functional-red-black-tree@^1.0.1:
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
dependencies:
aproba "^1.0.3"
console-control-strings "^1.0.0"
has-unicode "^2.0.0"
object-assign "^4.1.0"
signal-exit "^3.0.0"
string-width "^1.0.1"
strip-ansi "^3.0.1"
wide-align "^1.1.0"
gensync@^1.0.0-beta.1: gensync@^1.0.0-beta.1:
version "1.0.0-beta.1" version "1.0.0-beta.1"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269"
...@@ -2938,11 +3048,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1: ...@@ -2938,11 +3048,6 @@ has-symbols@^1.0.0, has-symbols@^1.0.1:
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
has-unicode@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
has-value@^0.3.1: has-value@^0.3.1:
version "0.3.1" version "0.3.1"
resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
...@@ -2981,6 +3086,23 @@ has@^1.0.3: ...@@ -2981,6 +3086,23 @@ has@^1.0.3:
dependencies: dependencies:
function-bind "^1.1.1" function-bind "^1.1.1"
hash.js@^1.0.0, hash.js@^1.0.3:
version "1.1.7"
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==
dependencies:
inherits "^2.0.3"
minimalistic-assert "^1.0.1"
hmac-drbg@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=
dependencies:
hash.js "^1.0.3"
minimalistic-assert "^1.0.0"
minimalistic-crypto-utils "^1.0.1"
hosted-git-info@^2.1.4: hosted-git-info@^2.1.4:
version "2.8.5" version "2.8.5"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c"
...@@ -3017,20 +3139,13 @@ humanize-duration@^3.15.3: ...@@ -3017,20 +3139,13 @@ humanize-duration@^3.15.3:
resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.21.0.tgz#ae5dc7e67640770cbf6a8d03a5d1138d47c7ce38" resolved "https://registry.yarnpkg.com/humanize-duration/-/humanize-duration-3.21.0.tgz#ae5dc7e67640770cbf6a8d03a5d1138d47c7ce38"
integrity sha512-7BLsrQZ2nMGeakmGDUl1pDne6/7iAdvwf1RtDLCOPHNFIHjkOVW7lcu7xHkIM9HhZAlSSO5crhC1dHvtl4dIQw== integrity sha512-7BLsrQZ2nMGeakmGDUl1pDne6/7iAdvwf1RtDLCOPHNFIHjkOVW7lcu7xHkIM9HhZAlSSO5crhC1dHvtl4dIQw==
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24" version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
dependencies: dependencies:
safer-buffer ">= 2.1.2 < 3" safer-buffer ">= 2.1.2 < 3"
ignore-walk@^3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
dependencies:
minimatch "^3.0.4"
ignore@^4.0.6: ignore@^4.0.6:
version "4.0.6" version "4.0.6"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
...@@ -3065,16 +3180,11 @@ inflight@^1.0.4: ...@@ -3065,16 +3180,11 @@ inflight@^1.0.4:
once "^1.3.0" once "^1.3.0"
wrappy "1" wrappy "1"
inherits@2, inherits@^2.0.3, inherits@~2.0.3: inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3:
version "2.0.4" version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
inquirer@^7.0.0: inquirer@^7.0.0:
version "7.0.3" version "7.0.3"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.3.tgz#f9b4cd2dff58b9f73e8d43759436ace15bed4567" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.3.tgz#f9b4cd2dff58b9f73e8d43759436ace15bed4567"
...@@ -3203,13 +3313,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1: ...@@ -3203,13 +3313,6 @@ is-extglob@^2.1.0, is-extglob@^2.1.1:
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
is-fullwidth-code-point@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb"
integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs=
dependencies:
number-is-nan "^1.0.0"
is-fullwidth-code-point@^2.0.0: is-fullwidth-code-point@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
...@@ -4132,6 +4235,16 @@ mimic-fn@^2.1.0: ...@@ -4132,6 +4235,16 @@ mimic-fn@^2.1.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==
minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=
minimatch@^3.0.4: minimatch@^3.0.4:
version "3.0.4" version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
...@@ -4149,21 +4262,6 @@ minimist@^1.1.1, minimist@^1.2.0: ...@@ -4149,21 +4262,6 @@ minimist@^1.1.1, minimist@^1.2.0:
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
dependencies:
safe-buffer "^5.1.2"
yallist "^3.0.0"
minizlib@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
dependencies:
minipass "^2.9.0"
mixin-deep@^1.2.0: mixin-deep@^1.2.0:
version "1.3.2" version "1.3.2"
resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
...@@ -4172,7 +4270,7 @@ mixin-deep@^1.2.0: ...@@ -4172,7 +4270,7 @@ mixin-deep@^1.2.0:
for-in "^1.0.2" for-in "^1.0.2"
is-extendable "^1.0.1" is-extendable "^1.0.1"
mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1: mkdirp@0.x, mkdirp@^0.5.1:
version "0.5.1" version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
...@@ -4226,15 +4324,6 @@ natural-compare@^1.4.0: ...@@ -4226,15 +4324,6 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
needle@^2.2.1:
version "2.4.0"
resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c"
integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==
dependencies:
debug "^3.2.6"
iconv-lite "^0.4.4"
sax "^1.2.4"
nice-try@^1.0.4: nice-try@^1.0.4:
version "1.0.5" version "1.0.5"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
...@@ -4247,6 +4336,11 @@ no-case@^2.2.0: ...@@ -4247,6 +4336,11 @@ no-case@^2.2.0:
dependencies: dependencies:
lower-case "^1.1.1" lower-case "^1.1.1"
node-fetch@2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
node-int64@^0.4.0: node-int64@^0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
...@@ -4268,22 +4362,6 @@ node-notifier@^5.4.2: ...@@ -4268,22 +4362,6 @@ node-notifier@^5.4.2:
shellwords "^0.1.1" shellwords "^0.1.1"
which "^1.3.0" which "^1.3.0"
node-pre-gyp@*:
version "0.14.0"
resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
dependencies:
detect-libc "^1.0.2"
mkdirp "^0.5.1"
needle "^2.2.1"
nopt "^4.0.1"
npm-packlist "^1.1.6"
npmlog "^4.0.2"
rc "^1.2.7"
rimraf "^2.6.1"
semver "^5.3.0"
tar "^4.4.2"
node-releases@^1.1.46: node-releases@^1.1.46:
version "1.1.46" version "1.1.46"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.46.tgz#6b262afef1bdc9a950a96df2e77e0d2290f484bf" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.46.tgz#6b262afef1bdc9a950a96df2e77e0d2290f484bf"
...@@ -4291,14 +4369,6 @@ node-releases@^1.1.46: ...@@ -4291,14 +4369,6 @@ node-releases@^1.1.46:
dependencies: dependencies:
semver "^6.3.0" semver "^6.3.0"
nopt@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d"
integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=
dependencies:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.3.2: normalize-package-data@^2.3.2:
version "2.5.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
...@@ -4321,26 +4391,6 @@ normalize-path@^3.0.0: ...@@ -4321,26 +4391,6 @@ normalize-path@^3.0.0:
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
npm-bundled@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b"
integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==
dependencies:
npm-normalize-package-bin "^1.0.1"
npm-normalize-package-bin@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2"
integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
npm-packlist@^1.1.6:
version "1.4.7"
resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.7.tgz#9e954365a06b80b18111ea900945af4f88ed4848"
integrity sha512-vAj7dIkp5NhieaGZxBJB8fF4R0078rqsmhJcAfXZ6O7JJhjhPK96n5Ry1oZcfLXgfun0GWTZPOxaEyqv8GBykQ==
dependencies:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
npm-run-path@^2.0.0: npm-run-path@^2.0.0:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
...@@ -4355,21 +4405,6 @@ npm-run-path@^4.0.0: ...@@ -4355,21 +4405,6 @@ npm-run-path@^4.0.0:
dependencies: dependencies:
path-key "^3.0.0" path-key "^3.0.0"
npmlog@^4.0.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
dependencies:
are-we-there-yet "~1.1.2"
console-control-strings "~1.1.0"
gauge "~2.7.3"
set-blocking "~2.0.0"
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=
nwsapi@^2.0.7: nwsapi@^2.0.7:
version "2.2.0" version "2.2.0"
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
...@@ -4380,7 +4415,7 @@ oauth-sign@~0.9.0: ...@@ -4380,7 +4415,7 @@ oauth-sign@~0.9.0:
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
object-assign@^4.1.0, object-assign@^4.1.1: object-assign@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
...@@ -4511,24 +4546,11 @@ ora@^3.4.0: ...@@ -4511,24 +4546,11 @@ ora@^3.4.0:
strip-ansi "^5.2.0" strip-ansi "^5.2.0"
wcwidth "^1.0.1" wcwidth "^1.0.1"
os-homedir@^1.0.0: os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
os-tmpdir@^1.0.0, os-tmpdir@~1.0.2:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
osenv@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
dependencies:
os-homedir "^1.0.0"
os-tmpdir "^1.0.0"
p-each-series@^1.0.0: p-each-series@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71"
...@@ -4855,16 +4877,6 @@ qs@~6.5.2: ...@@ -4855,16 +4877,6 @@ qs@~6.5.2:
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
rc@^1.2.7:
version "1.2.8"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
dependencies:
deep-extend "^0.6.0"
ini "~1.3.0"
minimist "^1.2.0"
strip-json-comments "~2.0.1"
react-is@^16.8.1, react-is@^16.8.4: react-is@^16.8.1, react-is@^16.8.4:
version "16.12.0" version "16.12.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c"
...@@ -4904,7 +4916,7 @@ read-pkg@^3.0.0: ...@@ -4904,7 +4916,7 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2" normalize-package-data "^2.3.2"
path-type "^3.0.0" path-type "^3.0.0"
readable-stream@^2.0.2, readable-stream@^2.0.6: readable-stream@^2.0.2:
version "2.3.7" version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
...@@ -5147,7 +5159,7 @@ rimraf@2.6.3: ...@@ -5147,7 +5159,7 @@ rimraf@2.6.3:
dependencies: dependencies:
glob "^7.1.3" glob "^7.1.3"
rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.3: rimraf@^2.5.4, rimraf@^2.6.3:
version "2.7.1" version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
...@@ -5290,7 +5302,7 @@ sax@^1.2.4: ...@@ -5290,7 +5302,7 @@ sax@^1.2.4:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.7.1" version "5.7.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
...@@ -5310,7 +5322,7 @@ serialize-javascript@^2.1.2: ...@@ -5310,7 +5322,7 @@ serialize-javascript@^2.1.2:
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ== integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
set-blocking@^2.0.0, set-blocking@~2.0.0: set-blocking@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
...@@ -5548,16 +5560,7 @@ string-length@^3.1.0: ...@@ -5548,16 +5560,7 @@ string-length@^3.1.0:
astral-regex "^1.0.0" astral-regex "^1.0.0"
strip-ansi "^5.2.0" strip-ansi "^5.2.0"
string-width@^1.0.1: string-width@^2.1.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=
dependencies:
code-point-at "^1.0.0"
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
"string-width@^1.0.2 || 2", string-width@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
...@@ -5606,7 +5609,7 @@ string_decoder@~1.1.1: ...@@ -5606,7 +5609,7 @@ string_decoder@~1.1.1:
dependencies: dependencies:
safe-buffer "~5.1.0" safe-buffer "~5.1.0"
strip-ansi@^3.0.0, strip-ansi@^3.0.1: strip-ansi@^3.0.0:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
...@@ -5654,11 +5657,6 @@ strip-json-comments@^3.0.1: ...@@ -5654,11 +5657,6 @@ strip-json-comments@^3.0.1:
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
supports-color@^2.0.0: supports-color@^2.0.0:
version "2.0.0" version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
...@@ -5693,19 +5691,6 @@ table@^5.2.3: ...@@ -5693,19 +5691,6 @@ table@^5.2.3:
slice-ansi "^2.1.0" slice-ansi "^2.1.0"
string-width "^3.0.0" string-width "^3.0.0"
tar@^4.4.2:
version "4.4.13"
resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
dependencies:
chownr "^1.1.1"
fs-minipass "^1.2.5"
minipass "^2.8.6"
minizlib "^1.2.1"
mkdirp "^0.5.0"
safe-buffer "^5.1.2"
yallist "^3.0.3"
terser@^4.6.2: terser@^4.6.2:
version "4.6.3" version "4.6.3"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.3.tgz#e33aa42461ced5238d352d2df2a67f21921f8d87" resolved "https://registry.yarnpkg.com/terser/-/terser-4.6.3.tgz#e33aa42461ced5238d352d2df2a67f21921f8d87"
...@@ -5748,10 +5733,15 @@ tiny-glob@^0.2.6: ...@@ -5748,10 +5733,15 @@ tiny-glob@^0.2.6:
globalyzer "^0.1.0" globalyzer "^0.1.0"
globrex "^0.1.1" globrex "^0.1.1"
tiny-invariant@^1.0.6: tiny-invariant@^1.1.0:
version "1.0.6" version "1.1.0"
resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.0.6.tgz#b3f9b38835e36a41c843a3b0907a5a7b3755de73" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875"
integrity sha512-FOyLWWVjG+aC0UqG76V53yAWdXfH8bO6FNmyZOuUrzDzK8DI3/JRY25UD7+g49JWM1LXwymsKERB+DzI0dTEQA== integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==
tiny-warning@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==
tmp@^0.0.33: tmp@^0.0.33:
version "0.0.33" version "0.0.33"
...@@ -6112,6 +6102,11 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: ...@@ -6112,6 +6102,11 @@ whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
dependencies: dependencies:
iconv-lite "0.4.24" iconv-lite "0.4.24"
whatwg-fetch@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"
integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0:
version "2.3.0" version "2.3.0"
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
...@@ -6154,13 +6149,6 @@ which@^2.0.1: ...@@ -6154,13 +6149,6 @@ which@^2.0.1:
dependencies: dependencies:
isexe "^2.0.0" isexe "^2.0.0"
wide-align@^1.1.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
dependencies:
string-width "^1.0.2 || 2"
word-wrap@~1.2.3: word-wrap@~1.2.3:
version "1.2.3" version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
...@@ -6221,11 +6209,6 @@ y18n@^4.0.0: ...@@ -6221,11 +6209,6 @@ y18n@^4.0.0:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
yallist@^3.0.0, yallist@^3.0.3:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
yaml@^1.7.2: yaml@^1.7.2:
version "1.7.2" version "1.7.2"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.2.tgz#f26aabf738590ab61efaca502358e48dc9f348b2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.7.2.tgz#f26aabf738590ab61efaca502358e48dc9f348b2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment