Skip to content

Commit

Permalink
fix requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aburkut committed Dec 20, 2024
1 parent 52ffe2d commit 3d09a15
Showing 1 changed file with 0 additions and 66 deletions.
66 changes: 0 additions & 66 deletions src/dex/aave-v3-stata-v2/aave-v3-stata-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,72 +297,6 @@ export class AaveV3StataV2
};
}

// Encode call data used by simpleSwap like routers
// Used for simpleSwap & simpleBuy
// Hint: this.buildSimpleParamWithoutWETHConversion
// could be useful
// async getSimpleParam(
// srcToken: string,
// destToken: string,
// srcAmount: string,
// destAmount: string,
// data: AaveV3StataV2Data,
// side: SwapSide,
// ): Promise<SimpleExchangeParam> {
// const { exchange, srcType, destType } = data;
// let swapData;
//
// if (side === SwapSide.SELL) {
// if (srcType === TokenType.STATA_TOKEN) {
// // e.g. sell srcAmount 100 srcToken stataUSDC for destToken USDC
// swapData = AaveV3Stata.stata.encodeFunctionData(StataFunctions.redeem, [
// srcAmount,
// this.augustusAddress, // receiver
// this.augustusAddress, // owner
// destType === TokenType.UNDERLYING, // withdraw from aToken
// ]);
// } else {
// // sell srcAmount 100 srcToken USDC for destToken stataUSDC
// swapData = AaveV3Stata.stata.encodeFunctionData(
// StataFunctions.deposit,
// [
// srcAmount,
// this.augustusAddress, // receiver
// 0, // referrer (noop)
// srcType === TokenType.UNDERLYING, // deposit to aave
// ],
// );
// }
// } else {
// if (srcType === TokenType.STATA_TOKEN) {
// // e.g. buy destAmount 100 destToken USDC for srcToken stataUSDC
// swapData = AaveV3Stata.stata.encodeFunctionData(
// StataFunctions.withdraw,
// [
// destAmount,
// this.augustusAddress, // receiver
// this.augustusAddress, // owner
// ],
// );
// } else {
// // e.g. buy destAmount 100 destToken stataUSDC for srcToken USDC
// swapData = AaveV3Stata.stata.encodeFunctionData(StataFunctions.mint, [
// destAmount,
// this.augustusAddress,
// ]);
// }
// }
//
// return this.buildSimpleParamWithoutWETHConversion(
// srcToken,
// srcAmount,
// destToken,
// destAmount,
// swapData,
// exchange,
// );
// }

getDexParam(
srcToken: Address,
destToken: Address,
Expand Down

0 comments on commit 3d09a15

Please sign in to comment.