File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
packages/flash-loans/src/aave Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828} from './types'
2929import {
3030 AAVE_ADAPTER_FACTORY ,
31+ AAVE_DAPP_ID_PER_TYPE ,
3132 AAVE_HOOK_ADAPTER_PER_TYPE ,
3233 AAVE_POOL_ADDRESS ,
3334 AaveFlashLoanType ,
@@ -480,20 +481,23 @@ export class AaveCollateralSwapSdk {
480481 expectedInstanceAddress ,
481482 )
482483 const postHookCallData = this . getFlashLoanPostHook ( flashLoanType , collateralPermit )
484+ const dappId = AAVE_DAPP_ID_PER_TYPE [ flashLoanType ]
483485
484486 return {
485487 pre : [
486488 {
487489 target : AAVE_ADAPTER_FACTORY [ chainId ] ,
488490 callData : preHookCallData ,
489491 gasLimit : DEFAULT_HOOK_GAS_LIMIT . pre . toString ( ) ,
492+ dappId,
490493 } ,
491494 ] ,
492495 post : [
493496 {
494497 target : expectedInstanceAddress ,
495498 callData : postHookCallData ,
496499 gasLimit : DEFAULT_HOOK_GAS_LIMIT . post . toString ( ) ,
500+ dappId,
497501 } ,
498502 ] ,
499503 }
Original file line number Diff line number Diff line change @@ -62,3 +62,9 @@ export const EMPTY_PERMIT: CollateralPermitData = {
6262 r : HASH_ZERO ,
6363 s : HASH_ZERO ,
6464}
65+
66+ export const AAVE_DAPP_ID_PER_TYPE : Record < AaveFlashLoanType , string > = {
67+ [ AaveFlashLoanType . CollateralSwap ] : 'cow-sdk://flashloans/aave/v3/collateral-swap' ,
68+ [ AaveFlashLoanType . DebtSwap ] : 'cow-sdk://flashloans/aave/v3/debt-swap' ,
69+ [ AaveFlashLoanType . RepayCollateral ] : 'cow-sdk://flashloans/aave/v3/repay-with-collateral' ,
70+ }
You can’t perform that action at this time.
0 commit comments