-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Created the sei plugin for dragonswap #316
base: main
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also missing screenshots of examples working
@@ -12,7 +12,8 @@ export type Chain = | |||
| ZilliqaChain | |||
| CosmosChain | |||
| StarknetChain | |||
| RadixChain; | |||
| RadixChain | |||
| SeiChain; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sei is EVM compatible so no need to do this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also not even used in the plugin
description: "Swap tokens on Dragonswap using exact input amount", | ||
}) | ||
async exactInputSingle(walletClient: EVMWalletClient, parameters: ExactInputSingleParameters) { | ||
// Approve token if needed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We spoke about this, approves happen thru the erc20 plugin. No need to add this or the erc20 abi :)
routerAddress: "0x11DA6463D6Cb5a03411Dbf5ab6f6bc3997Ac7428", // SwapRouter02 | ||
factoryAddress: "0x179D9a5592Bc77050796F7be28058c51cA575df4", // DragonswapV2Factory | ||
nonfungiblePositionManagerAddress: "0xa7FDcBe645d6b2B98639EbacbC347e2B575f6F70", | ||
quoterAddress: "0x38F759cf0Af1D0dcAEd723a3967A3B658738eDe9" // QuoterV2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these addresses hallucinated? i cant even find them on sei explorer
}) | ||
async getQuote(walletClient: EVMWalletClient, parameters: ExactInputSingleParameters) { | ||
|
||
const quote = await walletClient.sendTransaction({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a sendTransaction? I can't check the contract since I can't find it on Sei explorer.
description: "Add liquidity to Dragonswap pool", | ||
}) | ||
async addLiquidity(walletClient: EVMWalletClient, parameters: AddLiquidityParameters) { | ||
// Approve tokens |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, no need to approve
amount0Desired: z.string().describe("The desired amount of token0 to deposit"), | ||
amount1Desired: z.string().describe("The desired amount of token1 to deposit"), | ||
amount0Min: z.string().describe("The minimum amount of token0 to deposit"), | ||
amount1Min: z.string().describe("The minimum amount of token1 to deposit"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is in base units? Need to specify
fee: z.number().describe("The fee tier of the pool"), | ||
tickLower: z.number().describe("The lower tick of the position"), | ||
tickUpper: z.number().describe("The upper tick of the position"), | ||
amount0Desired: z.string().describe("The desired amount of token0 to deposit"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is in base units? Need to specify
tickLower: z.number().describe("The lower tick of the position"), | ||
tickUpper: z.number().describe("The upper tick of the position"), | ||
amount0Desired: z.string().describe("The desired amount of token0 to deposit"), | ||
amount1Desired: z.string().describe("The desired amount of token1 to deposit"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is in base units? Need to specify
z.object({ | ||
tokenId: z.string().describe("The ID of the token to remove liquidity from"), | ||
liquidity: z.string().describe("The amount of liquidity to remove"), | ||
amount0Min: z.string().describe("The minimum amount of token0 to receive"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is in base units? Need to specify
tokenId: z.string().describe("The ID of the token to remove liquidity from"), | ||
liquidity: z.string().describe("The amount of liquidity to remove"), | ||
amount0Min: z.string().describe("The minimum amount of token0 to receive"), | ||
amount1Min: z.string().describe("The minimum amount of token1 to receive"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is in base units? Need to specify
Relates to:
Add Dragonswap Plugin for SEI Network
Background
This PR adds support for Dragonswap, a decentralized exchange on the SEI network. The plugin enables token swaps, liquidity provision, and fee collection through DragonswapV2 contracts.
What does this PR do?
Testing
Detailed testing results
Docs
My changes require a change to the project documentation.
I have updated the documentation to include:
For plugins
Telegram username
@kamalthedev
Additional Notes