Skip to content

Commit

Permalink
Merge pull request #152 from Richa-iitr/aave-v3-import-permit
Browse files Browse the repository at this point in the history
Aave-v3 import permit connector
  • Loading branch information
pradyuman-verma authored Apr 12, 2022
2 parents e1c2118 + ac22701 commit d3f47b6
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/abi/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ export * as connectorsV2_M1 from './v2'
import * as connectorsV1 from './v1'
import { connectorsV2_M1 } from './v2'

export type Connector = keyof typeof connectorsV1 | keyof typeof connectorsV2_M1
export type Connector = keyof typeof connectorsV1 | keyof typeof connectorsV2_M1

export const connectors = {
versions: {
1: connectorsV1,
2: connectorsV2_M1
}
versions: {
1: connectorsV1,
2: connectorsV2_M1,
},
}
45 changes: 45 additions & 0 deletions src/abi/connectors/v2/AAVE-V3-IMPORT-PERMIT-A.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { AbiItem } from 'web3-utils'

export const AAVE_V3_IMPORT_PERMIT_A: AbiItem[] = [
{
inputs: [
{ internalType: 'address', name: 'userAccount', type: 'address' },
{
components: [
{ internalType: 'address[]', name: 'supplyTokens', type: 'address[]' },
{ internalType: 'address[]', name: 'borrowTokens', type: 'address[]' },
{ internalType: 'bool', name: 'convertStable', type: 'bool' },
{ internalType: 'uint256[]', name: 'flashLoanFees', type: 'uint256[]' },
],
internalType: 'struct Helper.ImportInputData',
name: 'inputData',
type: 'tuple',
},
{
components: [
{ internalType: 'uint8[]', name: 'v', type: 'uint8[]' },
{ internalType: 'bytes32[]', name: 'r', type: 'bytes32[]' },
{ internalType: 'bytes32[]', name: 's', type: 'bytes32[]' },
{ internalType: 'uint256[]', name: 'expiry', type: 'uint256[]' },
],
internalType: 'struct Helper.SignedPermits',
name: 'permitData',
type: 'tuple',
},
],
name: 'importAave',
outputs: [
{ internalType: 'string', name: '_eventName', type: 'string' },
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [],
name: 'name',
outputs: [{ internalType: 'string', name: '', type: 'string' }],
stateMutability: 'view',
type: 'function',
},
]
3 changes: 2 additions & 1 deletion src/abi/connectors/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ import { AAVE_IMPORT_V2_V3_A } from './AAVE-IMPORT-V2-V3-A'
import { AAVE_V3_IMPORT_A } from './AAVE-V3-IMPORT-A'
import { COMPOUND_IMPORT_D } from './COMPOUND-IMPORT-D'
import { LITE_A } from './LITE-A'

import { AAVE_V3_IMPORT_PERMIT_A } from './AAVE-V3-IMPORT-PERMIT-A'
export const connectorsV2_M1 = {
'AAVE-V3-IMPORT-PERMIT-A': AAVE_V3_IMPORT_PERMIT_A,
'LITE-A': LITE_A,
'COMPOUND-IMPORT-D': COMPOUND_IMPORT_D,
'AAVE-V3-IMPORT-A': AAVE_V3_IMPORT_A,
Expand Down
1 change: 1 addition & 0 deletions src/addresses/arbitrum/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export const connectorsV2_M1 = {
'UNISWAP-V3-ROUTER-A': '0xe8044B88a98f893e6d17AE4267a2B2694Ed28dCB',
'AAVE-V3-A': '0x4f99f135776Bd4aE336f515CaF01F2449EB3099B',
'AAVE-V3-IMPORT-A': '0x63995c71e2f57d0af786485e255a805603e54e76',
'AAVE-V3-IMPORT-PERMIT-A': '0xe6aa2d277aAfBb9e19354F6f893737C3608ff995',
}
1 change: 1 addition & 0 deletions src/addresses/avalanche/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ export const connectorsV2_M1 = {
'AAVE-V3-A': '0xD0889b53E270cF0B5d057976F04098AdA184483C',
'AAVE-IMPORT-V2-V3-A': '0xF352901811DdD6CE803a626D6A8e4A221880F6BE',
'AAVE-V3-IMPORT-A': '0xCAc6049C4fa9FF7201143b5F653b5F698AC2dE44',
'AAVE-V3-IMPORT-PERMIT-A': '0x2249Afe319baA0137CB434116Ac4d4Fd5c3eb719',
}
1 change: 1 addition & 0 deletions src/addresses/polygon/connectorsV2_M1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ export const connectorsV2_M1 = {
'AAVE-V3-A': '0xcf225aC445054bED2DeE9a06c399Be2Ea94007D7',
'AAVE-IMPORT-V2-V3-A': '0x39a7Dd80AbfCB49DC418Dc65F3b8cAC7FC661F01',
'AAVE-V3-IMPORT-A': '0x5AA9175c50068b0bA0E23ca157F5E772571B59a7',
'AAVE-V3-IMPORT-PERMIT-A': '0xe6aa2d277aAfBb9e19354F6f893737C3608ff995',
}

0 comments on commit d3f47b6

Please sign in to comment.