fixed linting issues

This commit is contained in:
Noah Khamliche
2022-04-28 14:04:25 -04:00
parent 08cf51b101
commit feede28293
5 changed files with 11 additions and 20 deletions

View File

@@ -24,7 +24,6 @@ import {
ELLIPSIS_BSC_INFOS, ELLIPSIS_BSC_INFOS,
FIREBIRDONESWAP_BSC_INFOS, FIREBIRDONESWAP_BSC_INFOS,
FIREBIRDONESWAP_POLYGON_INFOS, FIREBIRDONESWAP_POLYGON_INFOS,
GMX_ROUTER_BY_CHAIN_ID,
IRONSWAP_POLYGON_INFOS, IRONSWAP_POLYGON_INFOS,
JETSWAP_ROUTER_BY_CHAIN_ID, JETSWAP_ROUTER_BY_CHAIN_ID,
JULSWAP_ROUTER_BY_CHAIN_ID, JULSWAP_ROUTER_BY_CHAIN_ID,

View File

@@ -19,7 +19,6 @@ import {
FillData, FillData,
FinalUniswapV3FillData, FinalUniswapV3FillData,
GeistFillData, GeistFillData,
GMXFillData,
GetMarketOrdersOpts, GetMarketOrdersOpts,
isFinalUniswapV3FillData, isFinalUniswapV3FillData,
KyberSamplerOpts, KyberSamplerOpts,

View File

@@ -21,7 +21,6 @@ import {
GeistFillData, GeistFillData,
GenericRouterFillData, GenericRouterFillData,
GMXFillData, GMXFillData,
GMXSwapFillData,
KyberDmmFillData, KyberDmmFillData,
KyberFillData, KyberFillData,
LidoFillData, LidoFillData,
@@ -373,7 +372,12 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
break; break;
case ERC20BridgeSource.GMX: case ERC20BridgeSource.GMX:
const gmxFillData = (order as OptimizedMarketBridgeOrder<GMXFillData>).fillData; const gmxFillData = (order as OptimizedMarketBridgeOrder<GMXFillData>).fillData;
bridgeData = encoder.encode([gmxFillData.router,gmxFillData.reader,gmxFillData.vault, gmxFillData.tokenAddressPath]); bridgeData = encoder.encode([
gmxFillData.router,
gmxFillData.reader,
gmxFillData.vault,
gmxFillData.tokenAddressPath,
]);
break; break;
default: default:
@@ -463,7 +467,6 @@ const routerAddressPathEncoder = AbiEncoder.create('(address,address[])');
const gmxAddressPathEncoder = AbiEncoder.create('(address,address,address,address[])'); const gmxAddressPathEncoder = AbiEncoder.create('(address,address,address,address[])');
const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]); const tokenAddressEncoder = AbiEncoder.create([{ name: 'tokenAddress', type: 'address' }]);
export const BRIDGE_ENCODERS: { export const BRIDGE_ENCODERS: {
[key in Exclude< [key in Exclude<
ERC20BridgeSource, ERC20BridgeSource,
@@ -516,7 +519,7 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder, [ERC20BridgeSource.SpookySwap]: routerAddressPathEncoder,
[ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder, [ERC20BridgeSource.MorpheusSwap]: routerAddressPathEncoder,
// Avalanche // Avalanche
[ERC20BridgeSource.GMX] : gmxAddressPathEncoder, [ERC20BridgeSource.GMX]: gmxAddressPathEncoder,
// Celo // Celo
[ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder, [ERC20BridgeSource.UbeSwap]: routerAddressPathEncoder,
// BSC // BSC

View File

@@ -75,7 +75,6 @@ import {
GeistInfo, GeistInfo,
GenericRouterFillData, GenericRouterFillData,
GMXFillData, GMXFillData,
GMXQuoteFillData,
HopInfo, HopInfo,
KyberDmmFillData, KyberDmmFillData,
KyberFillData, KyberFillData,
@@ -1227,7 +1226,7 @@ export class SamplerOperations {
): SourceQuoteOperation<GMXFillData> { ): SourceQuoteOperation<GMXFillData> {
return new SamplerContractOperation({ return new SamplerContractOperation({
source: ERC20BridgeSource.GMX, source: ERC20BridgeSource.GMX,
fillData: {router, reader, vault, tokenAddressPath }, fillData: { router, reader, vault, tokenAddressPath },
contract: this._samplerContract, contract: this._samplerContract,
function: this._samplerContract.sampleSellsFromGMX, function: this._samplerContract.sampleSellsFromGMX,
params: [reader, vault, tokenAddressPath, takerFillAmounts], params: [reader, vault, tokenAddressPath, takerFillAmounts],
@@ -1242,7 +1241,7 @@ export class SamplerOperations {
): SourceQuoteOperation<GMXFillData> { ): SourceQuoteOperation<GMXFillData> {
return new SamplerContractOperation({ return new SamplerContractOperation({
source: ERC20BridgeSource.GMX, source: ERC20BridgeSource.GMX,
fillData: {router, reader, vault, tokenAddressPath }, fillData: { router, reader, vault, tokenAddressPath },
contract: this._samplerContract, contract: this._samplerContract,
function: this._samplerContract.sampleBuysFromGMX, function: this._samplerContract.sampleBuysFromGMX,
params: [reader, vault, tokenAddressPath, makerFillAmounts], params: [reader, vault, tokenAddressPath, makerFillAmounts],
@@ -1641,7 +1640,6 @@ export class SamplerOperations {
); );
} }
case ERC20BridgeSource.GMX: { case ERC20BridgeSource.GMX: {
return this.getGMXSellQuotes( return this.getGMXSellQuotes(
GMX_ROUTER_BY_CHAIN_ID[this.chainId], GMX_ROUTER_BY_CHAIN_ID[this.chainId],
GMX_READER_BY_CHAIN_ID[this.chainId], GMX_READER_BY_CHAIN_ID[this.chainId],
@@ -1955,7 +1953,6 @@ export class SamplerOperations {
return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts); return this.getCompoundBuyQuotes(cToken.tokenAddress, makerToken, takerToken, makerFillAmounts);
} }
case ERC20BridgeSource.GMX: { case ERC20BridgeSource.GMX: {
return this.getGMXBuyQuotes( return this.getGMXBuyQuotes(
GMX_ROUTER_BY_CHAIN_ID[this.chainId], GMX_ROUTER_BY_CHAIN_ID[this.chainId],
GMX_READER_BY_CHAIN_ID[this.chainId], GMX_READER_BY_CHAIN_ID[this.chainId],

View File

@@ -94,6 +94,7 @@ export enum ERC20BridgeSource {
// Avalanche // Avalanche
Pangolin = 'Pangolin', Pangolin = 'Pangolin',
TraderJoe = 'TraderJoe', TraderJoe = 'TraderJoe',
// tslint:disable-next-line: enum-naming
GMX = 'GMX', GMX = 'GMX',
// Celo only // Celo only
UbeSwap = 'UbeSwap', UbeSwap = 'UbeSwap',
@@ -223,21 +224,13 @@ export interface UniswapV2FillData extends FillData {
tokenAddressPath: string[]; tokenAddressPath: string[];
router: string; router: string;
} }
export interface GMXQuoteFillData extends FillData {
tokenAddressPath: string[];
reader: string;
vault: string;
}
export interface GMXFillData extends FillData { export interface GMXFillData extends FillData {
router: string; router: string;
reader: string; reader: string;
vault: string; vault: string;
tokenAddressPath: string[]; tokenAddressPath: string[];
} }
export interface GMXSwapFillData extends FillData {
router: string;
tokenAddressPath: string[];
}
export interface ShellFillData extends FillData { export interface ShellFillData extends FillData {
poolAddress: string; poolAddress: string;