Skip to content

Commit

Permalink
feat: Add steer config support
Browse files Browse the repository at this point in the history
  • Loading branch information
Doublo54 committed Aug 10, 2023
1 parent 90b2a70 commit 865a91e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/constants/dexDisplayAttributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const dexDisplayAttributes: Record<LiquidityDex, { icon: string; tag: str
icon: 'https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/main/assets/QUICK.png',
tag: 'QUICKSWAP LP',
},
[LiquidityDex.Steer]: {
icon: 'https://raw.githubusercontent.com/ApeSwapFinance/apeswap-token-lists/main/assets/SUSHI.svg',
tag: 'SUSHI STEER LP',
},
[LiquidityDex.ApeSwapV3]: {
icon: '',
tag: '',
Expand Down
20 changes: 20 additions & 0 deletions src/constants/dexFactories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export const dexFactories: Partial<
factory: '0x1097053Fd2ea711dad45caCcc45EfF7548fCB362',
protocol: Protocols.V2,
},
[LiquidityDex.Steer]: {
factory: '0xbACEB8eC6b9355Dfc0269C18bac9d6E2Bdc29C4F', //Sushi
protocol: Protocols.Steer,
},
},
[ChainId.BSC]: {
[LiquidityDex.ApeSwapV2]: {
Expand All @@ -35,6 +39,10 @@ export const dexFactories: Partial<
factory: '0x306F06C147f064A010530292A1EB6737c3e378e4', //Thena
protocol: Protocols.Algebra,
},
[LiquidityDex.Steer]: {
factory: '0x126555dd55a39328F69400d6aE4F782Bd4C34ABb', //Sushi
protocol: Protocols.Steer,
},
},
[ChainId.MATIC]: {
[LiquidityDex.ApeSwapV2]: {
Expand All @@ -53,6 +61,10 @@ export const dexFactories: Partial<
factory: '0x411b0facc3489691f28ad58c47006af5e3ab3a28', //Quickswap
protocol: Protocols.Algebra,
},
[LiquidityDex.Steer]: {
factory: '0x917933899c6a5F8E37F31E19f92CdBFF7e8FF0e2', //Sushi
protocol: Protocols.Steer,
},
},
[ChainId.ARBITRUM]: {
[LiquidityDex.ApeSwapV2]: {
Expand All @@ -67,27 +79,35 @@ export const dexFactories: Partial<
factory: '0x9C2ABD632771b433E5E7507BcaA41cA3b25D8544', //Zyberswap
protocol: Protocols.Algebra,
},
[LiquidityDex.Steer]: {
factory: '0x1af415a1EbA07a4986a52B6f2e7dE7003D82231e', //Sushi
protocol: Protocols.Steer,
},
},
}

export const defaultDexFactories: Partial<Record<ChainId, Partial<Record<Protocols, string>>>> = {
[ChainId.MAINNET]: {
[Protocols.V2]: dexFactories[ChainId.MAINNET]?.ApeSwapV2?.factory,
[Protocols.V3]: dexFactories[ChainId.MAINNET]?.UniswapV3?.factory,
[Protocols.Steer]: dexFactories[ChainId.MAINNET]?.Steer?.factory,
},
[ChainId.BSC]: {
[Protocols.V2]: dexFactories[ChainId.BSC]?.ApeSwapV2?.factory,
[Protocols.V3]: dexFactories[ChainId.BSC]?.ApeSwapV3?.factory,
[Protocols.Algebra]: dexFactories[ChainId.BSC]?.Algebra?.factory,
[Protocols.Steer]: dexFactories[ChainId.BSC]?.Steer?.factory,
},
[ChainId.MATIC]: {
[Protocols.V2]: dexFactories[ChainId.MATIC]?.ApeSwapV2?.factory,
[Protocols.V3]: dexFactories[ChainId.MATIC]?.UniswapV3?.factory,
[Protocols.Algebra]: dexFactories[ChainId.MATIC]?.Algebra?.factory,
[Protocols.Steer]: dexFactories[ChainId.MATIC]?.Steer?.factory,
},
[ChainId.ARBITRUM]: {
[Protocols.V2]: dexFactories[ChainId.ARBITRUM]?.ApeSwapV2?.factory,
[Protocols.V3]: dexFactories[ChainId.ARBITRUM]?.UniswapV3?.factory,
[Protocols.Algebra]: dexFactories[ChainId.ARBITRUM]?.Algebra?.factory,
[Protocols.Steer]: dexFactories[ChainId.ARBITRUM]?.Steer?.factory,
},
}
6 changes: 6 additions & 0 deletions src/constants/dexToZapMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export const dexToZapMapping: Record<LiquidityDex, Partial<Record<ChainId, ZapVe
[LiquidityDex.QuickswapV2]: {
[ChainId.MATIC]: ZapVersion.External,
},
[LiquidityDex.Steer]: {
[ChainId.BSC]: ZapVersion.External,
[ChainId.MATIC]: ZapVersion.External,
[ChainId.MAINNET]: ZapVersion.External,
[ChainId.ARBITRUM]: ZapVersion.External,
},
[LiquidityDex.ApeSwapV3]: {},
[LiquidityDex.UniswapV3]: {},
}
2 changes: 2 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum LiquidityDex {
Algebra = 'Algebra',
QuickswapV2 = 'QuickswapV2',
UniswapV3 = 'UniswapV3',
Steer = 'Steer',
}

export enum ZapVersion {
Expand All @@ -46,6 +47,7 @@ export enum Protocols {
V3 = 3,
Algebra = 4,
Gamma = 5,
Steer = 6,
}

export interface FarmStyles {
Expand Down

0 comments on commit 865a91e

Please sign in to comment.