[TKR-275] Add Geist on Fantom (#398)
* Add Geist on Fantom * nvm there is not subgraph for it * finish giest utils * Address pr comments * lowercase gtoken addresses * return undefined instead of error for unsupported pairs * another lower case * Update fantom fillQuoteTransformer address * more const clean up
This commit is contained in:
parent
6073607d3e
commit
ae2fe55efa
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
|
||||||
|
{
|
||||||
|
"version": "16.50.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Adding support for Geist on `Fantom`",
|
||||||
|
"pr": 398
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "16.49.9",
|
"version": "16.49.9",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
57
packages/asset-swapper/src/noop_samplers/GeistSampler.ts
Normal file
57
packages/asset-swapper/src/noop_samplers/GeistSampler.ts
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import { BigNumber } from '@0x/utils';
|
||||||
|
|
||||||
|
import { ZERO_AMOUNT } from '../constants';
|
||||||
|
export interface GeistInfo {
|
||||||
|
lendingPool: string;
|
||||||
|
gToken: string;
|
||||||
|
underlyingToken: string;
|
||||||
|
}
|
||||||
|
// tslint:disable-next-line:no-unnecessary-class
|
||||||
|
export class GeistSampler {
|
||||||
|
public static sampleSellsFromGeist(
|
||||||
|
geistInfo: GeistInfo,
|
||||||
|
takerToken: string,
|
||||||
|
makerToken: string,
|
||||||
|
takerTokenAmounts: BigNumber[],
|
||||||
|
): BigNumber[] {
|
||||||
|
// Deposit/Withdrawal underlying <-> gToken is always 1:1
|
||||||
|
if (
|
||||||
|
(takerToken.toLowerCase() === geistInfo.gToken.toLowerCase() &&
|
||||||
|
makerToken.toLowerCase() === geistInfo.underlyingToken.toLowerCase()) ||
|
||||||
|
(takerToken.toLowerCase() === geistInfo.underlyingToken.toLowerCase() &&
|
||||||
|
makerToken.toLowerCase() === geistInfo.gToken.toLowerCase())
|
||||||
|
) {
|
||||||
|
return takerTokenAmounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not matching the reserve return 0 results
|
||||||
|
const numSamples = takerTokenAmounts.length;
|
||||||
|
|
||||||
|
const makerTokenAmounts = new Array(numSamples);
|
||||||
|
makerTokenAmounts.fill(ZERO_AMOUNT);
|
||||||
|
return makerTokenAmounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static sampleBuysFromGeist(
|
||||||
|
geistInfo: GeistInfo,
|
||||||
|
takerToken: string,
|
||||||
|
makerToken: string,
|
||||||
|
makerTokenAmounts: BigNumber[],
|
||||||
|
): BigNumber[] {
|
||||||
|
// Deposit/Withdrawal underlying <-> gToken is always 1:1
|
||||||
|
if (
|
||||||
|
(takerToken.toLowerCase() === geistInfo.gToken.toLowerCase() &&
|
||||||
|
makerToken.toLowerCase() === geistInfo.underlyingToken.toLowerCase()) ||
|
||||||
|
(takerToken.toLowerCase() === geistInfo.underlyingToken.toLowerCase() &&
|
||||||
|
makerToken.toLowerCase() === geistInfo.gToken.toLowerCase())
|
||||||
|
) {
|
||||||
|
return makerTokenAmounts;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not matching the reserve return 0 results
|
||||||
|
const numSamples = makerTokenAmounts.length;
|
||||||
|
const takerTokenAmounts = new Array(numSamples);
|
||||||
|
takerTokenAmounts.fill(ZERO_AMOUNT);
|
||||||
|
return takerTokenAmounts;
|
||||||
|
}
|
||||||
|
}
|
@ -17,6 +17,7 @@ import {
|
|||||||
ERC20BridgeSource,
|
ERC20BridgeSource,
|
||||||
FeeSchedule,
|
FeeSchedule,
|
||||||
FillData,
|
FillData,
|
||||||
|
GeistFillData,
|
||||||
GetMarketOrdersOpts,
|
GetMarketOrdersOpts,
|
||||||
KyberSamplerOpts,
|
KyberSamplerOpts,
|
||||||
LidoInfo,
|
LidoInfo,
|
||||||
@ -187,6 +188,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.Beethovenx,
|
ERC20BridgeSource.Beethovenx,
|
||||||
ERC20BridgeSource.Curve,
|
ERC20BridgeSource.Curve,
|
||||||
ERC20BridgeSource.CurveV2,
|
ERC20BridgeSource.CurveV2,
|
||||||
|
ERC20BridgeSource.Geist,
|
||||||
ERC20BridgeSource.JetSwap,
|
ERC20BridgeSource.JetSwap,
|
||||||
ERC20BridgeSource.MorpheusSwap,
|
ERC20BridgeSource.MorpheusSwap,
|
||||||
ERC20BridgeSource.SpiritSwap,
|
ERC20BridgeSource.SpiritSwap,
|
||||||
@ -331,6 +333,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.Beethovenx,
|
ERC20BridgeSource.Beethovenx,
|
||||||
ERC20BridgeSource.Curve,
|
ERC20BridgeSource.Curve,
|
||||||
ERC20BridgeSource.CurveV2,
|
ERC20BridgeSource.CurveV2,
|
||||||
|
ERC20BridgeSource.Geist,
|
||||||
ERC20BridgeSource.JetSwap,
|
ERC20BridgeSource.JetSwap,
|
||||||
ERC20BridgeSource.MorpheusSwap,
|
ERC20BridgeSource.MorpheusSwap,
|
||||||
ERC20BridgeSource.SpiritSwap,
|
ERC20BridgeSource.SpiritSwap,
|
||||||
@ -578,6 +581,7 @@ export const FANTOM_TOKENS = {
|
|||||||
DAI: '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
|
DAI: '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
|
||||||
fUSDT: '0x049d68029688eabf473097a2fc38ef61633a3c7a',
|
fUSDT: '0x049d68029688eabf473097a2fc38ef61633a3c7a',
|
||||||
WBTC: '0x321162cd933e2be498cd2267a90534a804051b11',
|
WBTC: '0x321162cd933e2be498cd2267a90534a804051b11',
|
||||||
|
WCRV: '0x1e4f97b9f9f913c46f1632781732927b9019c68b',
|
||||||
renBTC: '0xdbf31df14b66535af65aac99c32e9ea844e14501',
|
renBTC: '0xdbf31df14b66535af65aac99c32e9ea844e14501',
|
||||||
MIM: '0x82f0b8b456c1a451378467398982d4834b6829c1',
|
MIM: '0x82f0b8b456c1a451378467398982d4834b6829c1',
|
||||||
nUSD: '0xed2a7edd7413021d440b09d654f3b87712abab66',
|
nUSD: '0xed2a7edd7413021d440b09d654f3b87712abab66',
|
||||||
@ -586,6 +590,15 @@ export const FANTOM_TOKENS = {
|
|||||||
gUSDC: '0xe578c856933d8e1082740bf7661e379aa2a30b26',
|
gUSDC: '0xe578c856933d8e1082740bf7661e379aa2a30b26',
|
||||||
gDAI: '0x07e6332dd090d287d3489245038daf987955dcfb',
|
gDAI: '0x07e6332dd090d287d3489245038daf987955dcfb',
|
||||||
FRAX: '0xdc301622e621166bd8e82f2ca0a26c13ad0be355',
|
FRAX: '0xdc301622e621166bd8e82f2ca0a26c13ad0be355',
|
||||||
|
gFTM: '0x39b3bd37208cbade74d0fcbdbb12d606295b430a',
|
||||||
|
gETH: '0x25c130b2624cf12a4ea30143ef50c5d68cefa22f',
|
||||||
|
gWBTC: '0x38aca5484b8603373acc6961ecd57a6a594510a3',
|
||||||
|
gCRV: '0x690754a168b022331caa2467207c61919b3f8a98',
|
||||||
|
gMIM: '0xc664fc7b8487a3e10824cda768c1d239f2403bbe',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const GEIST_FANTOM_POOLS = {
|
||||||
|
lendingPool: '0x9fad24f572045c7869117160a571b2e50b10d068',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OPTIMISM_TOKENS = {
|
export const OPTIMISM_TOKENS = {
|
||||||
@ -1996,6 +2009,13 @@ export const COMPONENT_POOLS_BY_CHAIN_ID = valueByChainId(
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const GEIST_INFO_ADDRESS_BY_CHAIN_ID = valueByChainId<string>(
|
||||||
|
{
|
||||||
|
[ChainId.Fantom]: '0xd8321aa83fb0a4ecd6348d4577431310a6e0814d',
|
||||||
|
},
|
||||||
|
NULL_ADDRESS,
|
||||||
|
);
|
||||||
|
|
||||||
export const BALANCER_V2_VAULT_ADDRESS_BY_CHAIN = valueByChainId<string>(
|
export const BALANCER_V2_VAULT_ADDRESS_BY_CHAIN = valueByChainId<string>(
|
||||||
{
|
{
|
||||||
[ChainId.Mainnet]: '0xba12222222228d8ba445958a75a0704d566bf2c8',
|
[ChainId.Mainnet]: '0xba12222222228d8ba445958a75a0704d566bf2c8',
|
||||||
@ -2362,6 +2382,10 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
|
|||||||
// NOTE: The Aave deposit method is more expensive than the withdraw
|
// NOTE: The Aave deposit method is more expensive than the withdraw
|
||||||
return aaveFillData.takerToken === aaveFillData.underlyingToken ? 400e3 : 300e3;
|
return aaveFillData.takerToken === aaveFillData.underlyingToken ? 400e3 : 300e3;
|
||||||
},
|
},
|
||||||
|
[ERC20BridgeSource.Geist]: (fillData?: FillData) => {
|
||||||
|
const geistFillData = fillData as GeistFillData;
|
||||||
|
return geistFillData.takerToken === geistFillData.underlyingToken ? 400e3 : 300e3;
|
||||||
|
},
|
||||||
[ERC20BridgeSource.Compound]: (fillData?: FillData) => {
|
[ERC20BridgeSource.Compound]: (fillData?: FillData) => {
|
||||||
// NOTE: cETH is handled differently than other cTokens
|
// NOTE: cETH is handled differently than other cTokens
|
||||||
const wethAddress = NATIVE_FEE_TOKEN_BY_CHAIN_ID[ChainId.Mainnet];
|
const wethAddress = NATIVE_FEE_TOKEN_BY_CHAIN_ID[ChainId.Mainnet];
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
import { FANTOM_TOKENS, GEIST_FANTOM_POOLS } from './constants';
|
||||||
|
import { GeistInfo } from './types';
|
||||||
|
|
||||||
|
const gTokenToUnderlyingToken = new Map<string, string>([
|
||||||
|
[FANTOM_TOKENS.gFTM, FANTOM_TOKENS.WFTM],
|
||||||
|
[FANTOM_TOKENS.gfUSDT, FANTOM_TOKENS.fUSDT],
|
||||||
|
[FANTOM_TOKENS.gDAI, FANTOM_TOKENS.DAI],
|
||||||
|
[FANTOM_TOKENS.gUSDC, FANTOM_TOKENS.USDC],
|
||||||
|
[FANTOM_TOKENS.gETH, FANTOM_TOKENS.WETH],
|
||||||
|
[FANTOM_TOKENS.gWBTC, FANTOM_TOKENS.WBTC],
|
||||||
|
[FANTOM_TOKENS.gCRV, FANTOM_TOKENS.WCRV],
|
||||||
|
[FANTOM_TOKENS.gMIM, FANTOM_TOKENS.MIM],
|
||||||
|
]);
|
||||||
|
|
||||||
|
export function getGeistInfoForPair(
|
||||||
|
takerToken: string,
|
||||||
|
makerToken: string,
|
||||||
|
): GeistInfo | undefined {
|
||||||
|
let gToken;
|
||||||
|
let underlyingToken;
|
||||||
|
if (gTokenToUnderlyingToken.get(takerToken) === makerToken) {
|
||||||
|
gToken = takerToken;
|
||||||
|
underlyingToken = makerToken;
|
||||||
|
} else if (gTokenToUnderlyingToken.get(makerToken) === takerToken) {
|
||||||
|
gToken = makerToken;
|
||||||
|
underlyingToken = takerToken;
|
||||||
|
} else {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
lendingPool: GEIST_FANTOM_POOLS.lendingPool,
|
||||||
|
gToken,
|
||||||
|
underlyingToken,
|
||||||
|
};
|
||||||
|
}
|
@ -18,6 +18,7 @@ import {
|
|||||||
ERC20BridgeSource,
|
ERC20BridgeSource,
|
||||||
FillData,
|
FillData,
|
||||||
FinalUniswapV3FillData,
|
FinalUniswapV3FillData,
|
||||||
|
GeistFillData,
|
||||||
GenericRouterFillData,
|
GenericRouterFillData,
|
||||||
KyberDmmFillData,
|
KyberDmmFillData,
|
||||||
KyberFillData,
|
KyberFillData,
|
||||||
@ -202,6 +203,8 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
|
|||||||
return encodeBridgeSourceId(BridgeProtocol.AaveV2, 'AaveV2');
|
return encodeBridgeSourceId(BridgeProtocol.AaveV2, 'AaveV2');
|
||||||
case ERC20BridgeSource.Compound:
|
case ERC20BridgeSource.Compound:
|
||||||
return encodeBridgeSourceId(BridgeProtocol.Compound, 'Compound');
|
return encodeBridgeSourceId(BridgeProtocol.Compound, 'Compound');
|
||||||
|
case ERC20BridgeSource.Geist:
|
||||||
|
return encodeBridgeSourceId(BridgeProtocol.AaveV2, 'Geist');
|
||||||
default:
|
default:
|
||||||
throw new Error(AggregationError.NoBridgeForSource);
|
throw new Error(AggregationError.NoBridgeForSource);
|
||||||
}
|
}
|
||||||
@ -356,6 +359,10 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
|
|||||||
const compoundFillData = (order as OptimizedMarketBridgeOrder<CompoundFillData>).fillData;
|
const compoundFillData = (order as OptimizedMarketBridgeOrder<CompoundFillData>).fillData;
|
||||||
bridgeData = encoder.encode([compoundFillData.cToken]);
|
bridgeData = encoder.encode([compoundFillData.cToken]);
|
||||||
break;
|
break;
|
||||||
|
case ERC20BridgeSource.Geist:
|
||||||
|
const geistFillData = (order as OptimizedMarketBridgeOrder<GeistFillData>).fillData;
|
||||||
|
bridgeData = encoder.encode([geistFillData.lendingPool, geistFillData.gToken]);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error(AggregationError.NoBridgeForSource);
|
throw new Error(AggregationError.NoBridgeForSource);
|
||||||
@ -525,6 +532,7 @@ export const BRIDGE_ENCODERS: {
|
|||||||
[ERC20BridgeSource.Lido]: AbiEncoder.create('(address)'),
|
[ERC20BridgeSource.Lido]: AbiEncoder.create('(address)'),
|
||||||
[ERC20BridgeSource.AaveV2]: AbiEncoder.create('(address,address)'),
|
[ERC20BridgeSource.AaveV2]: AbiEncoder.create('(address,address)'),
|
||||||
[ERC20BridgeSource.Compound]: AbiEncoder.create('(address)'),
|
[ERC20BridgeSource.Compound]: AbiEncoder.create('(address)'),
|
||||||
|
[ERC20BridgeSource.Geist]: AbiEncoder.create('(address,address)'),
|
||||||
};
|
};
|
||||||
|
|
||||||
function getFillTokenAmounts(fill: CollapsedFill, side: MarketOperation): [BigNumber, BigNumber] {
|
function getFillTokenAmounts(fill: CollapsedFill, side: MarketOperation): [BigNumber, BigNumber] {
|
||||||
|
@ -4,6 +4,7 @@ import { BigNumber, logUtils } from '@0x/utils';
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { AaveV2Sampler } from '../../noop_samplers/AaveV2Sampler';
|
import { AaveV2Sampler } from '../../noop_samplers/AaveV2Sampler';
|
||||||
|
import { GeistSampler } from '../../noop_samplers/GeistSampler';
|
||||||
import { SamplerCallResult, SignedNativeOrder } from '../../types';
|
import { SamplerCallResult, SignedNativeOrder } from '../../types';
|
||||||
import { ERC20BridgeSamplerContract } from '../../wrappers';
|
import { ERC20BridgeSamplerContract } from '../../wrappers';
|
||||||
|
|
||||||
@ -46,6 +47,7 @@ import {
|
|||||||
UNISWAPV3_CONFIG_BY_CHAIN_ID,
|
UNISWAPV3_CONFIG_BY_CHAIN_ID,
|
||||||
ZERO_AMOUNT,
|
ZERO_AMOUNT,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
import { getGeistInfoForPair } from './geist_utils';
|
||||||
import { getLiquidityProvidersForPair } from './liquidity_provider_utils';
|
import { getLiquidityProvidersForPair } from './liquidity_provider_utils';
|
||||||
import { getIntermediateTokens } from './multihop_utils';
|
import { getIntermediateTokens } from './multihop_utils';
|
||||||
import { BalancerPoolsCache, BalancerV2PoolsCache, CreamPoolsCache, PoolsCache } from './pools_cache';
|
import { BalancerPoolsCache, BalancerV2PoolsCache, CreamPoolsCache, PoolsCache } from './pools_cache';
|
||||||
@ -66,6 +68,8 @@ import {
|
|||||||
DexSample,
|
DexSample,
|
||||||
DODOFillData,
|
DODOFillData,
|
||||||
ERC20BridgeSource,
|
ERC20BridgeSource,
|
||||||
|
GeistFillData,
|
||||||
|
GeistInfo,
|
||||||
GenericRouterFillData,
|
GenericRouterFillData,
|
||||||
HopInfo,
|
HopInfo,
|
||||||
KyberDmmFillData,
|
KyberDmmFillData,
|
||||||
@ -1151,6 +1155,34 @@ export class SamplerOperations {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// tslint:disable-next-line:prefer-function-over-method
|
||||||
|
public getGeistSellQuotes(
|
||||||
|
geistInfo: GeistInfo,
|
||||||
|
makerToken: string,
|
||||||
|
takerToken: string,
|
||||||
|
takerFillAmounts: BigNumber[],
|
||||||
|
): SourceQuoteOperation<GeistFillData> {
|
||||||
|
return new SamplerNoOperation({
|
||||||
|
source: ERC20BridgeSource.Geist,
|
||||||
|
fillData: { ...geistInfo, takerToken },
|
||||||
|
callback: () => GeistSampler.sampleSellsFromGeist(geistInfo, takerToken, makerToken, takerFillAmounts),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// tslint:disable-next-line:prefer-function-over-method
|
||||||
|
public getGeistBuyQuotes(
|
||||||
|
geistInfo: GeistInfo,
|
||||||
|
makerToken: string,
|
||||||
|
takerToken: string,
|
||||||
|
makerFillAmounts: BigNumber[],
|
||||||
|
): SourceQuoteOperation<GeistFillData> {
|
||||||
|
return new SamplerNoOperation({
|
||||||
|
source: ERC20BridgeSource.Geist,
|
||||||
|
fillData: { ...geistInfo, takerToken },
|
||||||
|
callback: () => GeistSampler.sampleBuysFromGeist(geistInfo, takerToken, makerToken, makerFillAmounts),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public getCompoundSellQuotes(
|
public getCompoundSellQuotes(
|
||||||
cToken: string,
|
cToken: string,
|
||||||
makerToken: string,
|
makerToken: string,
|
||||||
@ -1548,6 +1580,13 @@ export class SamplerOperations {
|
|||||||
};
|
};
|
||||||
return this.getAaveV2SellQuotes(info, makerToken, takerToken, takerFillAmounts);
|
return this.getAaveV2SellQuotes(info, makerToken, takerToken, takerFillAmounts);
|
||||||
}
|
}
|
||||||
|
case ERC20BridgeSource.Geist: {
|
||||||
|
const info: GeistInfo | undefined = getGeistInfoForPair(takerToken, makerToken);
|
||||||
|
if (!info) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return this.getGeistSellQuotes(info, makerToken, takerToken, takerFillAmounts);
|
||||||
|
}
|
||||||
case ERC20BridgeSource.Compound: {
|
case ERC20BridgeSource.Compound: {
|
||||||
if (!this.compoundCTokenCache) {
|
if (!this.compoundCTokenCache) {
|
||||||
return [];
|
return [];
|
||||||
@ -1578,7 +1617,7 @@ export class SamplerOperations {
|
|||||||
takerToken: string,
|
takerToken: string,
|
||||||
makerFillAmounts: BigNumber[],
|
makerFillAmounts: BigNumber[],
|
||||||
): SourceQuoteOperation[] {
|
): SourceQuoteOperation[] {
|
||||||
// Find the adjacent tokens in the provided tooken adjacency graph,
|
// Find the adjacent tokens in the provided token adjacency graph,
|
||||||
// e.g if this is DAI->USDC we may check for DAI->WETH->USDC
|
// e.g if this is DAI->USDC we may check for DAI->WETH->USDC
|
||||||
const intermediateTokens = getIntermediateTokens(makerToken, takerToken, this.tokenAdjacencyGraph);
|
const intermediateTokens = getIntermediateTokens(makerToken, takerToken, this.tokenAdjacencyGraph);
|
||||||
const _sources = BATCH_SOURCE_FILTERS.getAllowed(sources);
|
const _sources = BATCH_SOURCE_FILTERS.getAllowed(sources);
|
||||||
@ -1849,6 +1888,13 @@ export class SamplerOperations {
|
|||||||
};
|
};
|
||||||
return this.getAaveV2BuyQuotes(info, makerToken, takerToken, makerFillAmounts);
|
return this.getAaveV2BuyQuotes(info, makerToken, takerToken, makerFillAmounts);
|
||||||
}
|
}
|
||||||
|
case ERC20BridgeSource.Geist: {
|
||||||
|
const info: GeistInfo | undefined = getGeistInfoForPair(takerToken, makerToken);
|
||||||
|
if (!info) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return this.getGeistBuyQuotes(info, makerToken, takerToken, makerFillAmounts);
|
||||||
|
}
|
||||||
case ERC20BridgeSource.Compound: {
|
case ERC20BridgeSource.Compound: {
|
||||||
if (!this.compoundCTokenCache) {
|
if (!this.compoundCTokenCache) {
|
||||||
return [];
|
return [];
|
||||||
|
@ -102,6 +102,7 @@ export enum ERC20BridgeSource {
|
|||||||
SpookySwap = 'SpookySwap',
|
SpookySwap = 'SpookySwap',
|
||||||
Beethovenx = 'Beethovenx',
|
Beethovenx = 'Beethovenx',
|
||||||
MorpheusSwap = 'MorpheusSwap',
|
MorpheusSwap = 'MorpheusSwap',
|
||||||
|
Geist = 'Geist',
|
||||||
}
|
}
|
||||||
export type SourcesWithPoolsCache =
|
export type SourcesWithPoolsCache =
|
||||||
| ERC20BridgeSource.Balancer
|
| ERC20BridgeSource.Balancer
|
||||||
@ -181,6 +182,12 @@ export interface AaveV2Info {
|
|||||||
underlyingToken: string;
|
underlyingToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface GeistInfo {
|
||||||
|
lendingPool: string;
|
||||||
|
gToken: string;
|
||||||
|
underlyingToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
// Internal `fillData` field for `Fill` objects.
|
// Internal `fillData` field for `Fill` objects.
|
||||||
export interface FillData {}
|
export interface FillData {}
|
||||||
|
|
||||||
@ -301,6 +308,13 @@ export interface CompoundFillData extends FillData {
|
|||||||
makerToken: string;
|
makerToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface GeistFillData extends FillData {
|
||||||
|
lendingPool: string;
|
||||||
|
gToken: string;
|
||||||
|
underlyingToken: string;
|
||||||
|
takerToken: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a node on a fill path.
|
* Represents a node on a fill path.
|
||||||
*/
|
*/
|
||||||
|
@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
|
||||||
|
{
|
||||||
|
"version": "6.12.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Update fantom fillQuoteTransformer addresses",
|
||||||
|
"pr": 398
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "6.11.0",
|
"version": "6.11.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@ -415,7 +415,7 @@
|
|||||||
"wethTransformer": "0x9b6aa8f26a92108e7d1f66373d757bb955112703",
|
"wethTransformer": "0x9b6aa8f26a92108e7d1f66373d757bb955112703",
|
||||||
"payTakerTransformer": "0x32df54951d33d7460e15fa59b1fcc262183ce4c2",
|
"payTakerTransformer": "0x32df54951d33d7460e15fa59b1fcc262183ce4c2",
|
||||||
"affiliateFeeTransformer": "0x67efa679a4b56c38713d478e649c88247f4f8e88",
|
"affiliateFeeTransformer": "0x67efa679a4b56c38713d478e649c88247f4f8e88",
|
||||||
"fillQuoteTransformer": "0x71de60a1b160094a3f6c7e1b883ff9337d639131",
|
"fillQuoteTransformer": "0x641efe8a57ad39353fe22f77d211ef6b17b0590b",
|
||||||
"positiveSlippageFeeTransformer": "0xe87d69b285005cc82b53b844322652c49ed64600"
|
"positiveSlippageFeeTransformer": "0xe87d69b285005cc82b53b844322652c49ed64600"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
144
yarn.lock
144
yarn.lock
@ -687,17 +687,6 @@
|
|||||||
lodash "^4.17.11"
|
lodash "^4.17.11"
|
||||||
valid-url "^1.0.9"
|
valid-url "^1.0.9"
|
||||||
|
|
||||||
"@0x/assert@^3.0.32":
|
|
||||||
version "3.0.32"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.32.tgz#738c83b2f61ac8d02cf933f1dfd3b6ec4779bdd3"
|
|
||||||
dependencies:
|
|
||||||
"@0x/json-schemas" "^6.4.2"
|
|
||||||
"@0x/typescript-typings" "^5.2.2"
|
|
||||||
"@0x/utils" "^6.5.1"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
lodash "^4.17.11"
|
|
||||||
valid-url "^1.0.9"
|
|
||||||
|
|
||||||
"@0x/assert@^3.0.6":
|
"@0x/assert@^3.0.6":
|
||||||
version "3.0.21"
|
version "3.0.21"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.21.tgz#b385868d1833625912fd9173a2477be5a4090aed"
|
resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.21.tgz#b385868d1833625912fd9173a2477be5a4090aed"
|
||||||
@ -726,23 +715,6 @@
|
|||||||
js-sha3 "^0.7.0"
|
js-sha3 "^0.7.0"
|
||||||
uuid "^3.3.2"
|
uuid "^3.3.2"
|
||||||
|
|
||||||
"@0x/base-contract@^6.4.2":
|
|
||||||
version "6.4.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/base-contract/-/base-contract-6.4.6.tgz#4514c8a36bd8b7e2f28d8ef43bf6a457a2167754"
|
|
||||||
dependencies:
|
|
||||||
"@0x/assert" "^3.0.32"
|
|
||||||
"@0x/json-schemas" "^6.4.2"
|
|
||||||
"@0x/utils" "^6.5.1"
|
|
||||||
"@0x/web3-wrapper" "^7.6.3"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
ethereumjs-account "^3.0.0"
|
|
||||||
ethereumjs-blockstream "^7.0.0"
|
|
||||||
ethereumjs-util "^7.1.0"
|
|
||||||
ethereumjs-vm "^4.2.0"
|
|
||||||
ethers "~4.0.4"
|
|
||||||
js-sha3 "^0.7.0"
|
|
||||||
uuid "^3.3.2"
|
|
||||||
|
|
||||||
"@0x/base-contract@^6.4.5":
|
"@0x/base-contract@^6.4.5":
|
||||||
version "6.4.5"
|
version "6.4.5"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/base-contract/-/base-contract-6.4.5.tgz#f241f5b2c17b3e90e7ead8dec19840ee54ab29bf"
|
resolved "https://registry.yarnpkg.com/@0x/base-contract/-/base-contract-6.4.5.tgz#f241f5b2c17b3e90e7ead8dec19840ee54ab29bf"
|
||||||
@ -895,21 +867,6 @@
|
|||||||
ethereum-types "^3.5.0"
|
ethereum-types "^3.5.0"
|
||||||
ethereumjs-util "^7.0.10"
|
ethereumjs-util "^7.0.10"
|
||||||
|
|
||||||
"@0x/contracts-zero-ex@^0.30.1":
|
|
||||||
version "0.30.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/contracts-zero-ex/-/contracts-zero-ex-0.30.1.tgz#85f57e69803824e63c43d90d2a6d29bfa464c952"
|
|
||||||
dependencies:
|
|
||||||
"@0x/base-contract" "^6.4.2"
|
|
||||||
"@0x/protocol-utils" "^1.10.1"
|
|
||||||
"@0x/subproviders" "^6.6.0"
|
|
||||||
"@0x/types" "^3.3.4"
|
|
||||||
"@0x/typescript-typings" "^5.2.1"
|
|
||||||
"@0x/utils" "^6.4.4"
|
|
||||||
"@0x/web3-wrapper" "^7.6.0"
|
|
||||||
ethereum-types "^3.6.0"
|
|
||||||
ethereumjs-util "^7.0.10"
|
|
||||||
ethers "~4.0.4"
|
|
||||||
|
|
||||||
"@0x/dev-utils@^4.2.11":
|
"@0x/dev-utils@^4.2.11":
|
||||||
version "4.2.11"
|
version "4.2.11"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-4.2.11.tgz#017dcc50a91eb75c6ac3d6fe77021e4f4330bbe7"
|
resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-4.2.11.tgz#017dcc50a91eb75c6ac3d6fe77021e4f4330bbe7"
|
||||||
@ -956,15 +913,6 @@
|
|||||||
ajv "^6.12.5"
|
ajv "^6.12.5"
|
||||||
lodash.values "^4.3.0"
|
lodash.values "^4.3.0"
|
||||||
|
|
||||||
"@0x/json-schemas@^6.4.2":
|
|
||||||
version "6.4.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-6.4.2.tgz#67f9626fcf3f190ca2908cb09e8a237ba9efb0e5"
|
|
||||||
dependencies:
|
|
||||||
"@0x/typescript-typings" "^5.2.2"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
ajv "^6.12.5"
|
|
||||||
lodash.values "^4.3.0"
|
|
||||||
|
|
||||||
"@0x/mesh-rpc-client@^9.4.2":
|
"@0x/mesh-rpc-client@^9.4.2":
|
||||||
version "9.4.2"
|
version "9.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/mesh-rpc-client/-/mesh-rpc-client-9.4.2.tgz#6f9690fb1cb37fb0c2fd3907241af0e543c78451"
|
resolved "https://registry.yarnpkg.com/@0x/mesh-rpc-client/-/mesh-rpc-client-9.4.2.tgz#6f9690fb1cb37fb0c2fd3907241af0e543c78451"
|
||||||
@ -1144,35 +1092,6 @@
|
|||||||
solc "^0.5.5"
|
solc "^0.5.5"
|
||||||
solidity-parser-antlr "^0.4.2"
|
solidity-parser-antlr "^0.4.2"
|
||||||
|
|
||||||
"@0x/subproviders@^6.6.0":
|
|
||||||
version "6.6.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.6.3.tgz#580eaef30b7f2cb93ea06a0391fbeab3687dadd0"
|
|
||||||
dependencies:
|
|
||||||
"@0x/assert" "^3.0.32"
|
|
||||||
"@0x/types" "^3.3.5"
|
|
||||||
"@0x/typescript-typings" "^5.2.2"
|
|
||||||
"@0x/utils" "^6.5.1"
|
|
||||||
"@0x/web3-wrapper" "^7.6.3"
|
|
||||||
"@ethereumjs/common" "^2.4.0"
|
|
||||||
"@ethereumjs/tx" "^3.3.0"
|
|
||||||
"@ledgerhq/hw-app-eth" "^4.3.0"
|
|
||||||
"@ledgerhq/hw-transport-u2f" "4.24.0"
|
|
||||||
"@types/hdkey" "^0.7.0"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
"@types/web3-provider-engine" "^14.0.0"
|
|
||||||
bip39 "^2.5.0"
|
|
||||||
bn.js "^4.11.8"
|
|
||||||
ethereum-types "^3.6.1"
|
|
||||||
ethereumjs-util "^7.1.0"
|
|
||||||
ganache-core "^2.13.2"
|
|
||||||
hdkey "^0.7.1"
|
|
||||||
json-rpc-error "2.0.0"
|
|
||||||
lodash "^4.17.11"
|
|
||||||
semaphore-async-await "^1.5.1"
|
|
||||||
web3-provider-engine "14.0.6"
|
|
||||||
optionalDependencies:
|
|
||||||
"@ledgerhq/hw-transport-node-hid" "^4.3.0"
|
|
||||||
|
|
||||||
"@0x/subproviders@^6.6.2":
|
"@0x/subproviders@^6.6.2":
|
||||||
version "6.6.2"
|
version "6.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.6.2.tgz#c51b3167fcd3b58f5522305864bd4896455ee697"
|
resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.6.2.tgz#c51b3167fcd3b58f5522305864bd4896455ee697"
|
||||||
@ -1258,14 +1177,6 @@
|
|||||||
bignumber.js "~9.0.0"
|
bignumber.js "~9.0.0"
|
||||||
ethereum-types "^3.6.0"
|
ethereum-types "^3.6.0"
|
||||||
|
|
||||||
"@0x/types@^3.3.5":
|
|
||||||
version "3.3.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/types/-/types-3.3.5.tgz#c7ad68f706ed4a62a6f8519d10c8e03d5dfcbe93"
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
bignumber.js "~9.0.2"
|
|
||||||
ethereum-types "^3.6.1"
|
|
||||||
|
|
||||||
"@0x/typescript-typings@^5.0.1", "@0x/typescript-typings@^5.1.5":
|
"@0x/typescript-typings@^5.0.1", "@0x/typescript-typings@^5.1.5":
|
||||||
version "5.1.5"
|
version "5.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.1.5.tgz#dd0ad20ef42dad9d054886fd1da72839145b5863"
|
resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.1.5.tgz#dd0ad20ef42dad9d054886fd1da72839145b5863"
|
||||||
@ -1310,17 +1221,6 @@
|
|||||||
ethereum-types "^3.6.0"
|
ethereum-types "^3.6.0"
|
||||||
popper.js "1.14.3"
|
popper.js "1.14.3"
|
||||||
|
|
||||||
"@0x/typescript-typings@^5.2.2":
|
|
||||||
version "5.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.2.2.tgz#6827a19996614b82916eab68de071c8ff9c20ddc"
|
|
||||||
dependencies:
|
|
||||||
"@types/bn.js" "^4.11.0"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
"@types/react" "*"
|
|
||||||
bignumber.js "~9.0.2"
|
|
||||||
ethereum-types "^3.6.1"
|
|
||||||
popper.js "1.14.3"
|
|
||||||
|
|
||||||
"@0x/utils@^5.1.1", "@0x/utils@^5.4.0", "@0x/utils@^5.4.1":
|
"@0x/utils@^5.1.1", "@0x/utils@^5.4.0", "@0x/utils@^5.4.1":
|
||||||
version "5.6.4"
|
version "5.6.4"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-5.6.4.tgz#0158ec3243bbee444d90afbd79981321d19ccdfd"
|
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-5.6.4.tgz#0158ec3243bbee444d90afbd79981321d19ccdfd"
|
||||||
@ -1376,25 +1276,6 @@
|
|||||||
js-sha3 "^0.7.0"
|
js-sha3 "^0.7.0"
|
||||||
lodash "^4.17.11"
|
lodash "^4.17.11"
|
||||||
|
|
||||||
"@0x/utils@^6.4.4", "@0x/utils@^6.5.1":
|
|
||||||
version "6.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-6.5.1.tgz#aa04c5dd67ea70609cf5131b97d1fadf227a4a0b"
|
|
||||||
dependencies:
|
|
||||||
"@0x/types" "^3.3.5"
|
|
||||||
"@0x/typescript-typings" "^5.2.2"
|
|
||||||
"@types/mocha" "^5.2.7"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
abortcontroller-polyfill "^1.1.9"
|
|
||||||
bignumber.js "~9.0.2"
|
|
||||||
chalk "^2.3.0"
|
|
||||||
detect-node "2.0.3"
|
|
||||||
ethereum-types "^3.6.1"
|
|
||||||
ethereumjs-util "^7.1.0"
|
|
||||||
ethers "~4.0.4"
|
|
||||||
isomorphic-fetch "2.2.1"
|
|
||||||
js-sha3 "^0.7.0"
|
|
||||||
lodash "^4.17.11"
|
|
||||||
|
|
||||||
"@0x/utils@^6.5.0":
|
"@0x/utils@^6.5.0":
|
||||||
version "6.5.0"
|
version "6.5.0"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-6.5.0.tgz#a75eda9a1cdc7cd2520056dbaec678f20f7f16c4"
|
resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-6.5.0.tgz#a75eda9a1cdc7cd2520056dbaec678f20f7f16c4"
|
||||||
@ -1428,20 +1309,6 @@
|
|||||||
ethers "~4.0.4"
|
ethers "~4.0.4"
|
||||||
lodash "^4.17.11"
|
lodash "^4.17.11"
|
||||||
|
|
||||||
"@0x/web3-wrapper@^7.6.0", "@0x/web3-wrapper@^7.6.3":
|
|
||||||
version "7.6.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.6.3.tgz#990b21372b3834c173be79abde67337fb882553e"
|
|
||||||
dependencies:
|
|
||||||
"@0x/assert" "^3.0.32"
|
|
||||||
"@0x/json-schemas" "^6.4.2"
|
|
||||||
"@0x/typescript-typings" "^5.2.2"
|
|
||||||
"@0x/utils" "^6.5.1"
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
ethereum-types "^3.6.1"
|
|
||||||
ethereumjs-util "^7.1.0"
|
|
||||||
ethers "~4.0.4"
|
|
||||||
lodash "^4.17.11"
|
|
||||||
|
|
||||||
"@0x/web3-wrapper@^7.6.2":
|
"@0x/web3-wrapper@^7.6.2":
|
||||||
version "7.6.2"
|
version "7.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.6.2.tgz#fd6c50f67ce21191feabea1f59e1467ea5d89dae"
|
resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.6.2.tgz#fd6c50f67ce21191feabea1f59e1467ea5d89dae"
|
||||||
@ -3899,10 +3766,6 @@ bignumber.js@~4.1.0:
|
|||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1"
|
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1"
|
||||||
|
|
||||||
bignumber.js@~9.0.2:
|
|
||||||
version "9.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673"
|
|
||||||
|
|
||||||
binary-extensions@^2.0.0:
|
binary-extensions@^2.0.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
|
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.1.0.tgz#30fa40c9e7fe07dbc895678cd287024dea241dd9"
|
||||||
@ -5981,13 +5844,6 @@ ethereum-types@^3.6.0:
|
|||||||
"@types/node" "12.12.54"
|
"@types/node" "12.12.54"
|
||||||
bignumber.js "~9.0.0"
|
bignumber.js "~9.0.0"
|
||||||
|
|
||||||
ethereum-types@^3.6.1:
|
|
||||||
version "3.6.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-3.6.1.tgz#9931e846bb41ac136f84aa46082917af4dfbf294"
|
|
||||||
dependencies:
|
|
||||||
"@types/node" "12.12.54"
|
|
||||||
bignumber.js "~9.0.2"
|
|
||||||
|
|
||||||
ethereumjs-abi@0.6.5:
|
ethereumjs-abi@0.6.5:
|
||||||
version "0.6.5"
|
version "0.6.5"
|
||||||
resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241"
|
resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user