@instadapp/interop-x 0.0.0-dev.8cb1c22 → 0.0.0-dev.909c44a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +9 -2
- package/dist/src/abi/aaveV2Resolver.json +832 -0
- package/dist/src/abi/aaveV3Resolver.json +628 -0
- package/dist/src/abi/balanceResolver.json +211 -0
- package/dist/src/abi/connectors/index.js +2 -2
- package/dist/src/abi/connectors/v2/1INCH-A.js +39 -1
- package/dist/src/abi/connectors/v2/1INCH-V3-A.js +42 -0
- package/dist/src/abi/connectors/v2/1INCH-V4-A.js +42 -0
- package/dist/src/abi/connectors/v2/AAVE-IMPORT-V2-V3-A.js +57 -0
- package/dist/src/abi/connectors/v2/AAVE-V2-A.js +91 -133
- package/dist/src/abi/connectors/v2/AAVE-V2-IMPORT-C.js +4 -0
- package/dist/src/abi/connectors/v2/AAVE-V3-A.js +322 -0
- package/dist/src/abi/connectors/v2/AAVE-V3-CLAIM-A.js +58 -0
- package/dist/src/abi/connectors/v2/AAVE-V3-IMPORT-A.js +59 -0
- package/dist/src/abi/connectors/v2/AAVE-V3-IMPORT-PERMIT-A.js +81 -0
- package/dist/src/abi/connectors/v2/BASIC-A.js +44 -86
- package/dist/src/abi/connectors/v2/BENQI-A.js +901 -0
- package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-C.js +4 -0
- package/dist/src/abi/connectors/v2/COMPOUND-IMPORT-D.js +27 -0
- package/dist/src/abi/connectors/v2/DSA-SPELL-A.js +60 -0
- package/dist/src/abi/connectors/v2/HOP-A.js +41 -0
- package/dist/src/abi/connectors/v2/HOP-MAINNET-A.js +38 -0
- package/dist/src/abi/connectors/v2/INSTA-DEX-SIMULATION-A.js +40 -0
- package/dist/src/abi/connectors/v2/INSTAPOOL-B.js +4 -0
- package/dist/src/abi/connectors/v2/INSTAPOOL-C.js +4 -0
- package/dist/src/abi/connectors/v2/INTEROP-A.js +4 -0
- package/dist/src/abi/connectors/v2/INTEROP-STAGING-A.js +4 -0
- package/dist/src/abi/connectors/v2/LIDO-STETH-A.js +36 -0
- package/dist/src/abi/connectors/v2/LITE-A.js +4 -0
- package/dist/src/abi/connectors/v2/MSTABLE-A.js +4 -0
- package/dist/src/abi/connectors/v2/NOTIONAL-V2-A.js +484 -0
- package/dist/src/abi/connectors/v2/PANGOLIN-A.js +136 -0
- package/dist/src/abi/connectors/v2/PANGOLIN-STAKE-A.js +227 -0
- package/dist/src/abi/connectors/v2/PARASWAP-A.js +26 -1
- package/dist/src/abi/connectors/v2/PARASWAP-V5-A.js +29 -0
- package/dist/src/abi/connectors/v2/POOLTOGETHER-A.js +4 -0
- package/dist/src/abi/connectors/v2/QI-A.js +4 -0
- package/dist/src/abi/connectors/v2/QUICKSWAP-A.js +136 -0
- package/dist/src/abi/connectors/v2/SUSHISWAP-A.js +136 -0
- package/dist/src/abi/connectors/v2/SWAP-AGGREGATOR-A.js +25 -0
- package/dist/src/abi/connectors/v2/UBIQUITY-A.js +73 -0
- package/dist/src/abi/connectors/v2/UNISWAP-SELL-BETA.js +4 -0
- package/dist/src/abi/connectors/v2/UNISWAP-V3-A.js +1 -1
- package/dist/src/abi/connectors/v2/UNISWAP-V3-ROUTER-A.js +4 -0
- package/dist/src/abi/connectors/v2/UNISWAP-V3-STAKER-B.js +193 -0
- package/dist/src/abi/connectors/v2/UNISWAP-V3-SWAP-A.js +74 -0
- package/dist/src/abi/connectors/v2/UNIVERSE-A.js +4 -0
- package/dist/src/abi/connectors/v2/WAVAX-A.js +4 -0
- package/dist/src/abi/connectors/v2/WFTM-A.js +60 -0
- package/dist/src/abi/connectors/v2/WMATIC-A.js +4 -0
- package/dist/src/abi/connectors/v2/ZEROX-A.js +29 -0
- package/dist/src/abi/connectors/v2/ZEROX-V4-A.js +29 -0
- package/dist/src/abi/connectors/v2/index.js +128 -44
- package/dist/src/abi/index.js +8 -0
- package/dist/src/abi/instList.json +232 -0
- package/dist/src/api/index.js +7 -0
- package/dist/src/constants/addresses.js +9 -1
- package/dist/src/constants/capPerChain.js +8 -0
- package/dist/src/constants/index.js +2 -0
- package/dist/src/constants/tokens.js +44 -44
- package/dist/src/constants/wrappedNativeToken.js +8 -0
- package/dist/src/crons/index.js +3 -0
- package/dist/src/crons/prices.js +16 -0
- package/dist/src/db/models/transaction.js +5 -1
- package/dist/src/errors/index.js +30 -0
- package/dist/src/gnosis/actions/aaveV2/source.js +26 -1
- package/dist/src/gnosis/actions/aaveV2/target.js +20 -5
- package/dist/src/gnosis/actions/aaveV3/index.js +11 -0
- package/dist/src/gnosis/actions/aaveV3/source.js +74 -0
- package/dist/src/gnosis/actions/aaveV3/target.js +87 -0
- package/dist/src/gnosis/actions/index.js +2 -0
- package/dist/src/index.js +2 -1
- package/dist/src/providers/index.js +17 -0
- package/dist/src/providers/retry-provider.js +45 -0
- package/dist/src/services/Prices.js +74 -0
- package/dist/src/services/index.js +8 -0
- package/dist/src/tasks/InteropX/{ProcessSubmitSubmitEvents.js → ProcessSubmitEvents.js} +110 -16
- package/dist/src/tasks/InteropX/ProcessValidateEvents.js +30 -10
- package/dist/src/tasks/InteropX/SyncLogExecuteEvents.js +113 -0
- package/dist/src/tasks/InteropX/SyncLogSubmitEvents.js +3 -2
- package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +6 -5
- package/dist/src/tasks/index.js +7 -5
- package/dist/src/typechain/AaveV2Resolver.js +2 -0
- package/dist/src/typechain/AaveV3Resolver.js +2 -0
- package/dist/src/typechain/BalanceResolver.js +2 -0
- package/dist/src/typechain/InstList.js +2 -0
- package/dist/src/typechain/factories/AaveV2Resolver__factory.js +1191 -0
- package/dist/src/typechain/factories/AaveV3Resolver__factory.js +887 -0
- package/dist/src/typechain/factories/BalanceResolver__factory.js +228 -0
- package/dist/src/typechain/factories/InstList__factory.js +249 -0
- package/dist/src/typechain/factories/index.js +9 -1
- package/dist/src/typechain/index.js +9 -1
- package/dist/src/utils/async.js +18 -0
- package/dist/src/utils/dsa.js +36 -0
- package/dist/src/utils/formatting.js +67 -0
- package/dist/src/utils/gnosis.js +87 -0
- package/dist/src/utils/http.js +10 -0
- package/dist/src/utils/index.js +22 -220
- package/dist/src/utils/interop.js +16 -0
- package/dist/src/utils/tokens.js +22 -0
- package/dist/src/utils/validate.js +111 -0
- package/dist/src/utils/web3.js +93 -0
- package/package.json +9 -2
- package/src/abi/aaveV2Resolver.json +832 -0
- package/src/abi/aaveV3Resolver.json +628 -0
- package/src/abi/balanceResolver.json +211 -0
- package/src/abi/connectors/index.ts +5 -5
- package/src/abi/connectors/v2/1INCH-A.ts +39 -1
- package/src/abi/connectors/v2/1INCH-V3-A.ts +41 -0
- package/src/abi/connectors/v2/1INCH-V4-A.ts +41 -0
- package/src/abi/connectors/v2/AAVE-IMPORT-V2-V3-A.ts +56 -0
- package/src/abi/connectors/v2/AAVE-V2-A.ts +93 -135
- package/src/abi/connectors/v2/AAVE-V2-IMPORT-C.ts +3 -0
- package/src/abi/connectors/v2/AAVE-V3-A.ts +321 -0
- package/src/abi/connectors/v2/AAVE-V3-CLAIM-A.ts +57 -0
- package/src/abi/connectors/v2/AAVE-V3-IMPORT-A.ts +58 -0
- package/src/abi/connectors/v2/AAVE-V3-IMPORT-PERMIT-A.ts +80 -0
- package/src/abi/connectors/v2/BASIC-A.ts +44 -86
- package/src/abi/connectors/v2/BENQI-A.ts +900 -0
- package/src/abi/connectors/v2/COMPOUND-IMPORT-C.ts +3 -0
- package/src/abi/connectors/v2/COMPOUND-IMPORT-D.ts +26 -0
- package/src/abi/connectors/v2/DSA-SPELL-A.ts +59 -0
- package/src/abi/connectors/v2/HOP-A.ts +40 -0
- package/src/abi/connectors/v2/HOP-MAINNET-A.ts +37 -0
- package/src/abi/connectors/v2/INSTA-DEX-SIMULATION-A.ts +39 -0
- package/src/abi/connectors/v2/INSTAPOOL-B.ts +3 -0
- package/src/abi/connectors/v2/INSTAPOOL-C.ts +3 -0
- package/src/abi/connectors/v2/INTEROP-A.ts +3 -0
- package/src/abi/connectors/v2/INTEROP-STAGING-A.ts +3 -0
- package/src/abi/connectors/v2/LIDO-STETH-A.ts +35 -0
- package/src/abi/connectors/v2/LITE-A.ts +3 -0
- package/src/abi/connectors/v2/MSTABLE-A.ts +3 -0
- package/src/abi/connectors/v2/NOTIONAL-V2-A.ts +483 -0
- package/src/abi/connectors/v2/PANGOLIN-A.ts +135 -0
- package/src/abi/connectors/v2/PANGOLIN-STAKE-A.ts +226 -0
- package/src/abi/connectors/v2/PARASWAP-A.ts +26 -1
- package/src/abi/connectors/v2/PARASWAP-V5-A.ts +28 -0
- package/src/abi/connectors/v2/POOLTOGETHER-A.ts +3 -0
- package/src/abi/connectors/v2/QI-A.ts +3 -0
- package/src/abi/connectors/v2/QUICKSWAP-A.ts +135 -0
- package/src/abi/connectors/v2/SUSHISWAP-A.ts +135 -0
- package/src/abi/connectors/v2/SWAP-AGGREGATOR-A.ts +24 -0
- package/src/abi/connectors/v2/UBIQUITY-A.ts +72 -0
- package/src/abi/connectors/v2/UNISWAP-SELL-BETA.ts +3 -0
- package/src/abi/connectors/v2/UNISWAP-V3-A.ts +1 -1
- package/src/abi/connectors/v2/UNISWAP-V3-ROUTER-A.ts +3 -0
- package/src/abi/connectors/v2/UNISWAP-V3-STAKER-B.ts +192 -0
- package/src/abi/connectors/v2/UNISWAP-V3-SWAP-A.ts +73 -0
- package/src/abi/connectors/v2/UNIVERSE-A.ts +3 -0
- package/src/abi/connectors/v2/WAVAX-A.ts +3 -0
- package/src/abi/connectors/v2/WFTM-A.ts +59 -0
- package/src/abi/connectors/v2/WMATIC-A.ts +3 -0
- package/src/abi/connectors/v2/ZEROX-A.ts +28 -0
- package/src/abi/connectors/v2/ZEROX-V4-A.ts +28 -0
- package/src/abi/connectors/v2/index.ts +171 -85
- package/src/abi/index.ts +8 -0
- package/src/abi/instList.json +232 -0
- package/src/api/index.ts +8 -0
- package/src/constants/addresses.ts +21 -2
- package/src/constants/capPerChain.ts +5 -0
- package/src/constants/index.ts +2 -0
- package/src/constants/tokens.ts +44 -44
- package/src/constants/wrappedNativeToken.ts +5 -0
- package/src/crons/index.ts +1 -0
- package/src/crons/prices.ts +12 -0
- package/src/db/models/transaction.ts +22 -1
- package/src/errors/index.ts +26 -0
- package/src/gnosis/actions/aaveV2/source.ts +56 -3
- package/src/gnosis/actions/aaveV2/target.ts +35 -7
- package/src/gnosis/actions/aaveV3/index.ts +9 -0
- package/src/gnosis/actions/aaveV3/source.ts +119 -0
- package/src/gnosis/actions/aaveV3/target.ts +142 -0
- package/src/gnosis/actions/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/providers/index.ts +1 -0
- package/src/providers/retry-provider.ts +51 -0
- package/src/services/Prices.ts +89 -0
- package/src/services/index.ts +1 -0
- package/src/tasks/InteropX/{ProcessSubmitSubmitEvents.ts → ProcessSubmitEvents.ts} +139 -22
- package/src/tasks/InteropX/ProcessValidateEvents.ts +42 -19
- package/src/tasks/InteropX/SyncLogExecuteEvents.ts +161 -0
- package/src/tasks/InteropX/SyncLogSubmitEvents.ts +6 -7
- package/src/tasks/InteropX/SyncLogValidateEvents.ts +9 -10
- package/src/tasks/index.ts +8 -5
- package/src/typechain/AaveV2Resolver.ts +1017 -0
- package/src/typechain/AaveV3Resolver.ts +935 -0
- package/src/typechain/BalanceResolver.ts +266 -0
- package/src/typechain/InstList.ts +402 -0
- package/src/typechain/factories/AaveV2Resolver__factory.ts +1198 -0
- package/src/typechain/factories/AaveV3Resolver__factory.ts +894 -0
- package/src/typechain/factories/BalanceResolver__factory.ts +235 -0
- package/src/typechain/factories/InstList__factory.ts +253 -0
- package/src/typechain/factories/index.ts +4 -0
- package/src/typechain/index.ts +8 -0
- package/src/utils/async.ts +22 -0
- package/src/utils/dsa.ts +56 -0
- package/src/utils/formatting.ts +68 -0
- package/src/utils/gnosis.ts +166 -0
- package/src/utils/http.ts +6 -0
- package/src/utils/index.ts +9 -365
- package/src/utils/interop.ts +28 -0
- package/src/utils/tokens.ts +21 -0
- package/src/utils/validate.ts +179 -0
- package/src/utils/web3.ts +132 -0
@@ -1,39 +1,14 @@
|
|
1
|
-
import { AbiItem } from 'web3-utils'
|
1
|
+
import { AbiItem } from 'web3-utils'
|
2
2
|
|
3
3
|
export const AAVE_V2: AbiItem[] = [
|
4
4
|
{
|
5
5
|
anonymous: false,
|
6
6
|
inputs: [
|
7
|
-
{
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
},
|
13
|
-
{
|
14
|
-
indexed: false,
|
15
|
-
internalType: 'uint256',
|
16
|
-
name: 'tokenAmt',
|
17
|
-
type: 'uint256',
|
18
|
-
},
|
19
|
-
{
|
20
|
-
indexed: true,
|
21
|
-
internalType: 'uint256',
|
22
|
-
name: 'rateMode',
|
23
|
-
type: 'uint256',
|
24
|
-
},
|
25
|
-
{
|
26
|
-
indexed: false,
|
27
|
-
internalType: 'uint256',
|
28
|
-
name: 'getId',
|
29
|
-
type: 'uint256',
|
30
|
-
},
|
31
|
-
{
|
32
|
-
indexed: false,
|
33
|
-
internalType: 'uint256',
|
34
|
-
name: 'setId',
|
35
|
-
type: 'uint256',
|
36
|
-
},
|
7
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
8
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
9
|
+
{ indexed: true, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
10
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
11
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
37
12
|
],
|
38
13
|
name: 'LogBorrow',
|
39
14
|
type: 'event',
|
@@ -41,80 +16,28 @@ export const AAVE_V2: AbiItem[] = [
|
|
41
16
|
{
|
42
17
|
anonymous: false,
|
43
18
|
inputs: [
|
44
|
-
{
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
type: 'address',
|
49
|
-
},
|
50
|
-
{
|
51
|
-
indexed: false,
|
52
|
-
internalType: 'uint256',
|
53
|
-
name: 'tokenAmt',
|
54
|
-
type: 'uint256',
|
55
|
-
},
|
56
|
-
{
|
57
|
-
indexed: false,
|
58
|
-
internalType: 'uint256',
|
59
|
-
name: 'getId',
|
60
|
-
type: 'uint256',
|
61
|
-
},
|
62
|
-
{
|
63
|
-
indexed: false,
|
64
|
-
internalType: 'uint256',
|
65
|
-
name: 'setId',
|
66
|
-
type: 'uint256',
|
67
|
-
},
|
19
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
20
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
21
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
22
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
68
23
|
],
|
69
24
|
name: 'LogDeposit',
|
70
25
|
type: 'event',
|
71
26
|
},
|
72
27
|
{
|
73
28
|
anonymous: false,
|
74
|
-
inputs: [
|
75
|
-
{
|
76
|
-
indexed: false,
|
77
|
-
internalType: 'address[]',
|
78
|
-
name: 'tokens',
|
79
|
-
type: 'address[]',
|
80
|
-
},
|
81
|
-
],
|
29
|
+
inputs: [{ indexed: false, internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
82
30
|
name: 'LogEnableCollateral',
|
83
31
|
type: 'event',
|
84
32
|
},
|
85
33
|
{
|
86
34
|
anonymous: false,
|
87
35
|
inputs: [
|
88
|
-
{
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
},
|
94
|
-
{
|
95
|
-
indexed: false,
|
96
|
-
internalType: 'uint256',
|
97
|
-
name: 'tokenAmt',
|
98
|
-
type: 'uint256',
|
99
|
-
},
|
100
|
-
{
|
101
|
-
indexed: true,
|
102
|
-
internalType: 'uint256',
|
103
|
-
name: 'rateMode',
|
104
|
-
type: 'uint256',
|
105
|
-
},
|
106
|
-
{
|
107
|
-
indexed: false,
|
108
|
-
internalType: 'uint256',
|
109
|
-
name: 'getId',
|
110
|
-
type: 'uint256',
|
111
|
-
},
|
112
|
-
{
|
113
|
-
indexed: false,
|
114
|
-
internalType: 'uint256',
|
115
|
-
name: 'setId',
|
116
|
-
type: 'uint256',
|
117
|
-
},
|
36
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
37
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
38
|
+
{ indexed: true, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
39
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
40
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
118
41
|
],
|
119
42
|
name: 'LogPayback',
|
120
43
|
type: 'event',
|
@@ -122,30 +45,32 @@ export const AAVE_V2: AbiItem[] = [
|
|
122
45
|
{
|
123
46
|
anonymous: false,
|
124
47
|
inputs: [
|
125
|
-
{
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
},
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
},
|
48
|
+
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
|
49
|
+
{ indexed: false, internalType: 'uint256', name: 'amt', type: 'uint256' },
|
50
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
51
|
+
{ indexed: false, internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
52
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
53
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
54
|
+
],
|
55
|
+
name: 'LogPaybackOnBehalfOf',
|
56
|
+
type: 'event',
|
57
|
+
},
|
58
|
+
{
|
59
|
+
anonymous: false,
|
60
|
+
inputs: [
|
61
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
62
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
63
|
+
],
|
64
|
+
name: 'LogSwapRateMode',
|
65
|
+
type: 'event',
|
66
|
+
},
|
67
|
+
{
|
68
|
+
anonymous: false,
|
69
|
+
inputs: [
|
70
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
71
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
72
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
73
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
149
74
|
],
|
150
75
|
name: 'LogWithdraw',
|
151
76
|
type: 'event',
|
@@ -159,18 +84,11 @@ export const AAVE_V2: AbiItem[] = [
|
|
159
84
|
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
160
85
|
],
|
161
86
|
name: 'borrow',
|
162
|
-
outputs: [],
|
163
|
-
stateMutability: 'payable',
|
164
|
-
type: 'function',
|
165
|
-
},
|
166
|
-
{
|
167
|
-
inputs: [],
|
168
|
-
name: 'connectorID',
|
169
87
|
outputs: [
|
170
|
-
{ internalType: '
|
171
|
-
{ internalType: '
|
88
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
89
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
172
90
|
],
|
173
|
-
stateMutability: '
|
91
|
+
stateMutability: 'payable',
|
174
92
|
type: 'function',
|
175
93
|
},
|
176
94
|
{
|
@@ -181,16 +99,20 @@ export const AAVE_V2: AbiItem[] = [
|
|
181
99
|
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
182
100
|
],
|
183
101
|
name: 'deposit',
|
184
|
-
outputs: [
|
102
|
+
outputs: [
|
103
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
104
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
105
|
+
],
|
185
106
|
stateMutability: 'payable',
|
186
107
|
type: 'function',
|
187
108
|
},
|
188
109
|
{
|
189
|
-
inputs: [
|
190
|
-
{ internalType: 'address[]', name: 'tokens', type: 'address[]' },
|
191
|
-
],
|
110
|
+
inputs: [{ internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
192
111
|
name: 'enableCollateral',
|
193
|
-
outputs: [
|
112
|
+
outputs: [
|
113
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
114
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
115
|
+
],
|
194
116
|
stateMutability: 'payable',
|
195
117
|
type: 'function',
|
196
118
|
},
|
@@ -210,7 +132,40 @@ export const AAVE_V2: AbiItem[] = [
|
|
210
132
|
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
211
133
|
],
|
212
134
|
name: 'payback',
|
213
|
-
outputs: [
|
135
|
+
outputs: [
|
136
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
137
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
138
|
+
],
|
139
|
+
stateMutability: 'payable',
|
140
|
+
type: 'function',
|
141
|
+
},
|
142
|
+
{
|
143
|
+
inputs: [
|
144
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
145
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
146
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
147
|
+
{ internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
148
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
149
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
150
|
+
],
|
151
|
+
name: 'paybackOnBehalfOf',
|
152
|
+
outputs: [
|
153
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
154
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
155
|
+
],
|
156
|
+
stateMutability: 'payable',
|
157
|
+
type: 'function',
|
158
|
+
},
|
159
|
+
{
|
160
|
+
inputs: [
|
161
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
162
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
163
|
+
],
|
164
|
+
name: 'swapBorrowRateMode',
|
165
|
+
outputs: [
|
166
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
167
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
168
|
+
],
|
214
169
|
stateMutability: 'payable',
|
215
170
|
type: 'function',
|
216
171
|
},
|
@@ -222,8 +177,11 @@ export const AAVE_V2: AbiItem[] = [
|
|
222
177
|
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
223
178
|
],
|
224
179
|
name: 'withdraw',
|
225
|
-
outputs: [
|
180
|
+
outputs: [
|
181
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
182
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
183
|
+
],
|
226
184
|
stateMutability: 'payable',
|
227
185
|
type: 'function',
|
228
186
|
},
|
229
|
-
]
|
187
|
+
]
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { AbiItem } from 'web3-utils'
|
2
|
+
|
3
|
+
export const AAVE_V2_IMPORT_C: AbiItem[] = [{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"convertStable","type":"bool"},{"indexed":false,"internalType":"address[]","name":"supplyTokens","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"borrowTokens","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"supplyAmts","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"stableBorrowAmts","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"variableBorrowAmts","type":"uint256[]"}],"name":"LogAaveV2Import","type":"event"},{"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":"times","type":"uint256"},{"internalType":"bool","name":"isFlash","type":"bool"},{"internalType":"uint256[]","name":"flashFees","type":"uint256[]"}],"internalType":"struct AaveImportHelpers.ImportInputData","name":"inputData","type":"tuple"}],"name":"importAave","outputs":[{"internalType":"string","name":"_eventName","type":"string"},{"internalType":"bytes","name":"_eventParam","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address[]","name":"supplyTokens","type":"address[]"},{"internalType":"address[]","name":"borrowTokens","type":"address[]"},{"internalType":"bool","name":"convertStable","type":"bool"},{"internalType":"uint256","name":"times","type":"uint256"},{"internalType":"bool","name":"isFlash","type":"bool"},{"internalType":"uint256[]","name":"flashFees","type":"uint256[]"}],"internalType":"struct AaveImportHelpers.ImportInputData","name":"inputData","type":"tuple"}],"name":"migrateAave","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"}]
|
@@ -0,0 +1,321 @@
|
|
1
|
+
import { AbiItem } from 'web3-utils'
|
2
|
+
|
3
|
+
export const AAVE_V3_A: AbiItem[] = [
|
4
|
+
{
|
5
|
+
anonymous: false,
|
6
|
+
inputs: [
|
7
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
8
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
9
|
+
{ indexed: true, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
10
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
11
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
12
|
+
],
|
13
|
+
name: 'LogBorrow',
|
14
|
+
type: 'event',
|
15
|
+
},
|
16
|
+
{
|
17
|
+
anonymous: false,
|
18
|
+
inputs: [
|
19
|
+
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
|
20
|
+
{ indexed: false, internalType: 'uint256', name: 'amt', type: 'uint256' },
|
21
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
22
|
+
{ indexed: false, internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
23
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
24
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
25
|
+
],
|
26
|
+
name: 'LogBorrowOnBehalfOf',
|
27
|
+
type: 'event',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
anonymous: false,
|
31
|
+
inputs: [
|
32
|
+
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
|
33
|
+
{ indexed: false, internalType: 'uint256', name: 'amount', type: 'uint256' },
|
34
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
35
|
+
{ indexed: false, internalType: 'address', name: 'delegateTo', type: 'address' },
|
36
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
37
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
38
|
+
],
|
39
|
+
name: 'LogDelegateBorrow',
|
40
|
+
type: 'event',
|
41
|
+
},
|
42
|
+
{
|
43
|
+
anonymous: false,
|
44
|
+
inputs: [
|
45
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
46
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
47
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
48
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
49
|
+
],
|
50
|
+
name: 'LogDeposit',
|
51
|
+
type: 'event',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
anonymous: false,
|
55
|
+
inputs: [
|
56
|
+
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
|
57
|
+
{ indexed: false, internalType: 'uint256', name: 'amt', type: 'uint256' },
|
58
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
59
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
60
|
+
],
|
61
|
+
name: 'LogDepositWithoutCollateral',
|
62
|
+
type: 'event',
|
63
|
+
},
|
64
|
+
{
|
65
|
+
anonymous: false,
|
66
|
+
inputs: [{ indexed: false, internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
67
|
+
name: 'LogDisableCollateral',
|
68
|
+
type: 'event',
|
69
|
+
},
|
70
|
+
{
|
71
|
+
anonymous: false,
|
72
|
+
inputs: [{ indexed: false, internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
73
|
+
name: 'LogEnableCollateral',
|
74
|
+
type: 'event',
|
75
|
+
},
|
76
|
+
{
|
77
|
+
anonymous: false,
|
78
|
+
inputs: [
|
79
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
80
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
81
|
+
{ indexed: true, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
82
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
83
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
84
|
+
],
|
85
|
+
name: 'LogPayback',
|
86
|
+
type: 'event',
|
87
|
+
},
|
88
|
+
{
|
89
|
+
anonymous: false,
|
90
|
+
inputs: [
|
91
|
+
{ indexed: false, internalType: 'address', name: 'token', type: 'address' },
|
92
|
+
{ indexed: false, internalType: 'uint256', name: 'amt', type: 'uint256' },
|
93
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
94
|
+
{ indexed: false, internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
95
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
96
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
97
|
+
],
|
98
|
+
name: 'LogPaybackOnBehalfOf',
|
99
|
+
type: 'event',
|
100
|
+
},
|
101
|
+
{
|
102
|
+
anonymous: false,
|
103
|
+
inputs: [{ indexed: false, internalType: 'uint8', name: 'categoryId', type: 'uint8' }],
|
104
|
+
name: 'LogSetUserEMode',
|
105
|
+
type: 'event',
|
106
|
+
},
|
107
|
+
{
|
108
|
+
anonymous: false,
|
109
|
+
inputs: [
|
110
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
111
|
+
{ indexed: false, internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
112
|
+
],
|
113
|
+
name: 'LogSwapRateMode',
|
114
|
+
type: 'event',
|
115
|
+
},
|
116
|
+
{
|
117
|
+
anonymous: false,
|
118
|
+
inputs: [
|
119
|
+
{ indexed: true, internalType: 'address', name: 'token', type: 'address' },
|
120
|
+
{ indexed: false, internalType: 'uint256', name: 'tokenAmt', type: 'uint256' },
|
121
|
+
{ indexed: false, internalType: 'uint256', name: 'getId', type: 'uint256' },
|
122
|
+
{ indexed: false, internalType: 'uint256', name: 'setId', type: 'uint256' },
|
123
|
+
],
|
124
|
+
name: 'LogWithdraw',
|
125
|
+
type: 'event',
|
126
|
+
},
|
127
|
+
{
|
128
|
+
inputs: [
|
129
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
130
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
131
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
132
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
133
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
134
|
+
],
|
135
|
+
name: 'borrow',
|
136
|
+
outputs: [
|
137
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
138
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
139
|
+
],
|
140
|
+
stateMutability: 'payable',
|
141
|
+
type: 'function',
|
142
|
+
},
|
143
|
+
{
|
144
|
+
inputs: [
|
145
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
146
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
147
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
148
|
+
{ internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
149
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
150
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
151
|
+
],
|
152
|
+
name: 'borrowOnBehalfOf',
|
153
|
+
outputs: [
|
154
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
155
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
156
|
+
],
|
157
|
+
stateMutability: 'payable',
|
158
|
+
type: 'function',
|
159
|
+
},
|
160
|
+
{
|
161
|
+
inputs: [
|
162
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
163
|
+
{ internalType: 'uint256', name: 'amount', type: 'uint256' },
|
164
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
165
|
+
{ internalType: 'address', name: 'delegateTo', type: 'address' },
|
166
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
167
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
168
|
+
],
|
169
|
+
name: 'delegateBorrow',
|
170
|
+
outputs: [
|
171
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
172
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
173
|
+
],
|
174
|
+
stateMutability: 'payable',
|
175
|
+
type: 'function',
|
176
|
+
},
|
177
|
+
{
|
178
|
+
inputs: [
|
179
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
180
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
181
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
182
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
183
|
+
],
|
184
|
+
name: 'deposit',
|
185
|
+
outputs: [
|
186
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
187
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
188
|
+
],
|
189
|
+
stateMutability: 'payable',
|
190
|
+
type: 'function',
|
191
|
+
},
|
192
|
+
{
|
193
|
+
inputs: [
|
194
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
195
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
196
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
197
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
198
|
+
],
|
199
|
+
name: 'depositWithoutCollateral',
|
200
|
+
outputs: [
|
201
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
202
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
203
|
+
],
|
204
|
+
stateMutability: 'payable',
|
205
|
+
type: 'function',
|
206
|
+
},
|
207
|
+
{
|
208
|
+
inputs: [{ internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
209
|
+
name: 'disableCollateral',
|
210
|
+
outputs: [
|
211
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
212
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
213
|
+
],
|
214
|
+
stateMutability: 'payable',
|
215
|
+
type: 'function',
|
216
|
+
},
|
217
|
+
{
|
218
|
+
inputs: [{ internalType: 'address[]', name: 'tokens', type: 'address[]' }],
|
219
|
+
name: 'enableCollateral',
|
220
|
+
outputs: [
|
221
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
222
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
223
|
+
],
|
224
|
+
stateMutability: 'payable',
|
225
|
+
type: 'function',
|
226
|
+
},
|
227
|
+
{
|
228
|
+
inputs: [],
|
229
|
+
name: 'name',
|
230
|
+
outputs: [{ internalType: 'string', name: '', type: 'string' }],
|
231
|
+
stateMutability: 'view',
|
232
|
+
type: 'function',
|
233
|
+
},
|
234
|
+
{
|
235
|
+
inputs: [
|
236
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
237
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
238
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
239
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
240
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
241
|
+
],
|
242
|
+
name: 'payback',
|
243
|
+
outputs: [
|
244
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
245
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
246
|
+
],
|
247
|
+
stateMutability: 'payable',
|
248
|
+
type: 'function',
|
249
|
+
},
|
250
|
+
{
|
251
|
+
inputs: [
|
252
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
253
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
254
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
255
|
+
{ internalType: 'address', name: 'onBehalfOf', type: 'address' },
|
256
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
257
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
258
|
+
],
|
259
|
+
name: 'paybackOnBehalfOf',
|
260
|
+
outputs: [
|
261
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
262
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
263
|
+
],
|
264
|
+
stateMutability: 'payable',
|
265
|
+
type: 'function',
|
266
|
+
},
|
267
|
+
{
|
268
|
+
inputs: [
|
269
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
270
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
271
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
272
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
273
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
274
|
+
],
|
275
|
+
name: 'paybackWithATokens',
|
276
|
+
outputs: [
|
277
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
278
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
279
|
+
],
|
280
|
+
stateMutability: 'payable',
|
281
|
+
type: 'function',
|
282
|
+
},
|
283
|
+
{
|
284
|
+
inputs: [{ internalType: 'uint8', name: 'categoryId', type: 'uint8' }],
|
285
|
+
name: 'setUserEMode',
|
286
|
+
outputs: [
|
287
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
288
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
289
|
+
],
|
290
|
+
stateMutability: 'payable',
|
291
|
+
type: 'function',
|
292
|
+
},
|
293
|
+
{
|
294
|
+
inputs: [
|
295
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
296
|
+
{ internalType: 'uint256', name: 'rateMode', type: 'uint256' },
|
297
|
+
],
|
298
|
+
name: 'swapBorrowRateMode',
|
299
|
+
outputs: [
|
300
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
301
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
302
|
+
],
|
303
|
+
stateMutability: 'payable',
|
304
|
+
type: 'function',
|
305
|
+
},
|
306
|
+
{
|
307
|
+
inputs: [
|
308
|
+
{ internalType: 'address', name: 'token', type: 'address' },
|
309
|
+
{ internalType: 'uint256', name: 'amt', type: 'uint256' },
|
310
|
+
{ internalType: 'uint256', name: 'getId', type: 'uint256' },
|
311
|
+
{ internalType: 'uint256', name: 'setId', type: 'uint256' },
|
312
|
+
],
|
313
|
+
name: 'withdraw',
|
314
|
+
outputs: [
|
315
|
+
{ internalType: 'string', name: '_eventName', type: 'string' },
|
316
|
+
{ internalType: 'bytes', name: '_eventParam', type: 'bytes' },
|
317
|
+
],
|
318
|
+
stateMutability: 'payable',
|
319
|
+
type: 'function',
|
320
|
+
},
|
321
|
+
]
|