-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(path-finder): add StellaSwapV4 (#318)
- Loading branch information
1 parent
2a7cc0b
commit e8273f6
Showing
8 changed files
with
82 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/smart-router/src/liquidity-providers/StellaSwapV4.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { PublicClient } from 'viem' | ||
import { ParachainId } from '@zenlink-interface/chain' | ||
|
||
import { AlgebraBaseProvider } from './AlgebraBase' | ||
import { LiquidityProviders } from './LiquidityProvider' | ||
|
||
export class StellaSwapV4Provider extends AlgebraBaseProvider { | ||
public constructor(chainId: ParachainId, client: PublicClient) { | ||
const factory = { | ||
[ParachainId.MOONBEAM]: '0x90dD87C994959A36d725bB98F9008B0b3C3504A0', | ||
} as const | ||
const stateMultiCall = { | ||
[ParachainId.MOONBEAM]: '0x5dA55ED94De76E82A4355921504A7eCFEFA2EF00', | ||
} as const | ||
|
||
super(chainId, client, factory, stateMultiCall) | ||
} | ||
|
||
public getType(): LiquidityProviders { | ||
return LiquidityProviders.StellaSwapV4 | ||
} | ||
|
||
public getPoolProviderName(): string { | ||
return 'StellaSwapV4' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.