@instadapp/interop-x 0.0.0-dev.c696e38 → 0.0.0-dev.cdc0510
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/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 +4 -0
- package/dist/src/errors/index.js +30 -0
- package/dist/src/gnosis/actions/aaveV2/source.js +2 -1
- package/dist/src/gnosis/actions/aaveV2/target.js +5 -3
- 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} +106 -14
- 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 +2 -1
- package/dist/src/tasks/InteropX/SyncLogValidateEvents.js +5 -4
- 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 +24 -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/index.ts +8 -0
- package/src/abi/instList.json +232 -0
- package/src/api/index.ts +8 -0
- package/src/constants/addresses.ts +20 -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 +21 -0
- package/src/errors/index.ts +26 -0
- package/src/gnosis/actions/aaveV2/source.ts +2 -1
- package/src/gnosis/actions/aaveV2/target.ts +13 -3
- 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} +133 -20
- package/src/tasks/InteropX/ProcessValidateEvents.ts +42 -19
- package/src/tasks/InteropX/SyncLogExecuteEvents.ts +161 -0
- package/src/tasks/InteropX/SyncLogSubmitEvents.ts +5 -6
- package/src/tasks/InteropX/SyncLogValidateEvents.ts +8 -9
- 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 +30 -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 +174 -0
- package/src/utils/web3.ts +132 -0
@@ -0,0 +1,211 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"inputs": [
|
4
|
+
{
|
5
|
+
"internalType": "address",
|
6
|
+
"name": "_wnativeToken",
|
7
|
+
"type": "address"
|
8
|
+
}
|
9
|
+
],
|
10
|
+
"stateMutability": "nonpayable",
|
11
|
+
"type": "constructor"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"inputs": [
|
15
|
+
{
|
16
|
+
"components": [
|
17
|
+
{
|
18
|
+
"components": [
|
19
|
+
{
|
20
|
+
"internalType": "address",
|
21
|
+
"name": "sourceToken",
|
22
|
+
"type": "address"
|
23
|
+
},
|
24
|
+
{
|
25
|
+
"internalType": "address",
|
26
|
+
"name": "targetToken",
|
27
|
+
"type": "address"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"internalType": "uint256",
|
31
|
+
"name": "amount",
|
32
|
+
"type": "uint256"
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"internalType": "struct Variables.TokenInfo[]",
|
36
|
+
"name": "supply",
|
37
|
+
"type": "tuple[]"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"components": [
|
41
|
+
{
|
42
|
+
"internalType": "address",
|
43
|
+
"name": "sourceToken",
|
44
|
+
"type": "address"
|
45
|
+
},
|
46
|
+
{
|
47
|
+
"internalType": "address",
|
48
|
+
"name": "targetToken",
|
49
|
+
"type": "address"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"internalType": "uint256",
|
53
|
+
"name": "amount",
|
54
|
+
"type": "uint256"
|
55
|
+
}
|
56
|
+
],
|
57
|
+
"internalType": "struct Variables.TokenInfo[]",
|
58
|
+
"name": "withdraw",
|
59
|
+
"type": "tuple[]"
|
60
|
+
}
|
61
|
+
],
|
62
|
+
"internalType": "struct Variables.Position",
|
63
|
+
"name": "position",
|
64
|
+
"type": "tuple"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"internalType": "address",
|
68
|
+
"name": "liquidityContract",
|
69
|
+
"type": "address"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"internalType": "bool",
|
73
|
+
"name": "isSupply",
|
74
|
+
"type": "bool"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"internalType": "bool",
|
78
|
+
"name": "isTargetToken",
|
79
|
+
"type": "bool"
|
80
|
+
}
|
81
|
+
],
|
82
|
+
"name": "checkLiquidity",
|
83
|
+
"outputs": [
|
84
|
+
{
|
85
|
+
"components": [
|
86
|
+
{
|
87
|
+
"internalType": "bool",
|
88
|
+
"name": "isOk",
|
89
|
+
"type": "bool"
|
90
|
+
},
|
91
|
+
{
|
92
|
+
"components": [
|
93
|
+
{
|
94
|
+
"internalType": "address",
|
95
|
+
"name": "token",
|
96
|
+
"type": "address"
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"internalType": "uint256",
|
100
|
+
"name": "liquidityAvailable",
|
101
|
+
"type": "uint256"
|
102
|
+
},
|
103
|
+
{
|
104
|
+
"internalType": "uint256",
|
105
|
+
"name": "liquidityShort",
|
106
|
+
"type": "uint256"
|
107
|
+
}
|
108
|
+
],
|
109
|
+
"internalType": "struct Helpers.LiquidityData[]",
|
110
|
+
"name": "supply",
|
111
|
+
"type": "tuple[]"
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"components": [
|
115
|
+
{
|
116
|
+
"internalType": "address",
|
117
|
+
"name": "token",
|
118
|
+
"type": "address"
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"internalType": "uint256",
|
122
|
+
"name": "liquidityAvailable",
|
123
|
+
"type": "uint256"
|
124
|
+
},
|
125
|
+
{
|
126
|
+
"internalType": "uint256",
|
127
|
+
"name": "liquidityShort",
|
128
|
+
"type": "uint256"
|
129
|
+
}
|
130
|
+
],
|
131
|
+
"internalType": "struct Helpers.LiquidityData[]",
|
132
|
+
"name": "withdraw",
|
133
|
+
"type": "tuple[]"
|
134
|
+
}
|
135
|
+
],
|
136
|
+
"internalType": "struct Helpers.PositionData",
|
137
|
+
"name": "p",
|
138
|
+
"type": "tuple"
|
139
|
+
}
|
140
|
+
],
|
141
|
+
"stateMutability": "view",
|
142
|
+
"type": "function"
|
143
|
+
},
|
144
|
+
{
|
145
|
+
"inputs": [
|
146
|
+
{
|
147
|
+
"internalType": "address[]",
|
148
|
+
"name": "tokens",
|
149
|
+
"type": "address[]"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"internalType": "address",
|
153
|
+
"name": "liquidityContract",
|
154
|
+
"type": "address"
|
155
|
+
}
|
156
|
+
],
|
157
|
+
"name": "getLiquidity",
|
158
|
+
"outputs": [
|
159
|
+
{
|
160
|
+
"components": [
|
161
|
+
{
|
162
|
+
"internalType": "address",
|
163
|
+
"name": "token",
|
164
|
+
"type": "address"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"internalType": "uint256",
|
168
|
+
"name": "liquidityAvailable",
|
169
|
+
"type": "uint256"
|
170
|
+
},
|
171
|
+
{
|
172
|
+
"internalType": "uint256",
|
173
|
+
"name": "liquidityShort",
|
174
|
+
"type": "uint256"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"internalType": "struct Helpers.LiquidityData[]",
|
178
|
+
"name": "l",
|
179
|
+
"type": "tuple[]"
|
180
|
+
}
|
181
|
+
],
|
182
|
+
"stateMutability": "view",
|
183
|
+
"type": "function"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
"inputs": [],
|
187
|
+
"name": "nativeToken",
|
188
|
+
"outputs": [
|
189
|
+
{
|
190
|
+
"internalType": "address",
|
191
|
+
"name": "",
|
192
|
+
"type": "address"
|
193
|
+
}
|
194
|
+
],
|
195
|
+
"stateMutability": "view",
|
196
|
+
"type": "function"
|
197
|
+
},
|
198
|
+
{
|
199
|
+
"inputs": [],
|
200
|
+
"name": "wnativeToken",
|
201
|
+
"outputs": [
|
202
|
+
{
|
203
|
+
"internalType": "address",
|
204
|
+
"name": "",
|
205
|
+
"type": "address"
|
206
|
+
}
|
207
|
+
],
|
208
|
+
"stateMutability": "view",
|
209
|
+
"type": "function"
|
210
|
+
}
|
211
|
+
]
|
package/src/abi/index.ts
CHANGED
@@ -2,10 +2,18 @@ import gnosisSafe from "./gnosisSafe.json";
|
|
2
2
|
import erc20 from "./erc20.json";
|
3
3
|
import interopX from "./interopX.json";
|
4
4
|
import { connectors } from "./connectors";
|
5
|
+
import instList from "./instList.json";
|
6
|
+
import balanceResolver from "./balanceResolver.json";
|
7
|
+
import aaveV2Resolver from "./aaveV2Resolver.json";
|
8
|
+
import aaveV3Resolver from "./aaveV3Resolver.json";
|
5
9
|
|
6
10
|
export default {
|
7
11
|
gnosisSafe,
|
8
12
|
erc20,
|
9
13
|
interopX,
|
10
14
|
connectors,
|
15
|
+
instList,
|
16
|
+
balanceResolver,
|
17
|
+
aaveV2Resolver,
|
18
|
+
aaveV3Resolver,
|
11
19
|
};
|
@@ -0,0 +1,232 @@
|
|
1
|
+
[
|
2
|
+
{
|
3
|
+
"inputs": [
|
4
|
+
{
|
5
|
+
"internalType": "address",
|
6
|
+
"name": "_instaIndex",
|
7
|
+
"type": "address"
|
8
|
+
}
|
9
|
+
],
|
10
|
+
"stateMutability": "nonpayable",
|
11
|
+
"type": "constructor"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
"inputs": [
|
15
|
+
{
|
16
|
+
"internalType": "uint64",
|
17
|
+
"name": "",
|
18
|
+
"type": "uint64"
|
19
|
+
}
|
20
|
+
],
|
21
|
+
"name": "accountAddr",
|
22
|
+
"outputs": [
|
23
|
+
{
|
24
|
+
"internalType": "address",
|
25
|
+
"name": "",
|
26
|
+
"type": "address"
|
27
|
+
}
|
28
|
+
],
|
29
|
+
"stateMutability": "view",
|
30
|
+
"type": "function"
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"inputs": [
|
34
|
+
{
|
35
|
+
"internalType": "address",
|
36
|
+
"name": "",
|
37
|
+
"type": "address"
|
38
|
+
}
|
39
|
+
],
|
40
|
+
"name": "accountID",
|
41
|
+
"outputs": [
|
42
|
+
{
|
43
|
+
"internalType": "uint64",
|
44
|
+
"name": "",
|
45
|
+
"type": "uint64"
|
46
|
+
}
|
47
|
+
],
|
48
|
+
"stateMutability": "view",
|
49
|
+
"type": "function"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"inputs": [
|
53
|
+
{
|
54
|
+
"internalType": "uint64",
|
55
|
+
"name": "",
|
56
|
+
"type": "uint64"
|
57
|
+
}
|
58
|
+
],
|
59
|
+
"name": "accountLink",
|
60
|
+
"outputs": [
|
61
|
+
{
|
62
|
+
"internalType": "address",
|
63
|
+
"name": "first",
|
64
|
+
"type": "address"
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"internalType": "address",
|
68
|
+
"name": "last",
|
69
|
+
"type": "address"
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"internalType": "uint64",
|
73
|
+
"name": "count",
|
74
|
+
"type": "uint64"
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"stateMutability": "view",
|
78
|
+
"type": "function"
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"inputs": [
|
82
|
+
{
|
83
|
+
"internalType": "uint64",
|
84
|
+
"name": "",
|
85
|
+
"type": "uint64"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"internalType": "address",
|
89
|
+
"name": "",
|
90
|
+
"type": "address"
|
91
|
+
}
|
92
|
+
],
|
93
|
+
"name": "accountList",
|
94
|
+
"outputs": [
|
95
|
+
{
|
96
|
+
"internalType": "address",
|
97
|
+
"name": "prev",
|
98
|
+
"type": "address"
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"internalType": "address",
|
102
|
+
"name": "next",
|
103
|
+
"type": "address"
|
104
|
+
}
|
105
|
+
],
|
106
|
+
"stateMutability": "view",
|
107
|
+
"type": "function"
|
108
|
+
},
|
109
|
+
{
|
110
|
+
"inputs": [],
|
111
|
+
"name": "accounts",
|
112
|
+
"outputs": [
|
113
|
+
{
|
114
|
+
"internalType": "uint64",
|
115
|
+
"name": "",
|
116
|
+
"type": "uint64"
|
117
|
+
}
|
118
|
+
],
|
119
|
+
"stateMutability": "view",
|
120
|
+
"type": "function"
|
121
|
+
},
|
122
|
+
{
|
123
|
+
"inputs": [
|
124
|
+
{
|
125
|
+
"internalType": "address",
|
126
|
+
"name": "_owner",
|
127
|
+
"type": "address"
|
128
|
+
}
|
129
|
+
],
|
130
|
+
"name": "addAuth",
|
131
|
+
"outputs": [],
|
132
|
+
"stateMutability": "nonpayable",
|
133
|
+
"type": "function"
|
134
|
+
},
|
135
|
+
{
|
136
|
+
"inputs": [
|
137
|
+
{
|
138
|
+
"internalType": "address",
|
139
|
+
"name": "_account",
|
140
|
+
"type": "address"
|
141
|
+
}
|
142
|
+
],
|
143
|
+
"name": "init",
|
144
|
+
"outputs": [],
|
145
|
+
"stateMutability": "nonpayable",
|
146
|
+
"type": "function"
|
147
|
+
},
|
148
|
+
{
|
149
|
+
"inputs": [],
|
150
|
+
"name": "instaIndex",
|
151
|
+
"outputs": [
|
152
|
+
{
|
153
|
+
"internalType": "address",
|
154
|
+
"name": "",
|
155
|
+
"type": "address"
|
156
|
+
}
|
157
|
+
],
|
158
|
+
"stateMutability": "view",
|
159
|
+
"type": "function"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
"inputs": [
|
163
|
+
{
|
164
|
+
"internalType": "address",
|
165
|
+
"name": "_owner",
|
166
|
+
"type": "address"
|
167
|
+
}
|
168
|
+
],
|
169
|
+
"name": "removeAuth",
|
170
|
+
"outputs": [],
|
171
|
+
"stateMutability": "nonpayable",
|
172
|
+
"type": "function"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"inputs": [
|
176
|
+
{
|
177
|
+
"internalType": "address",
|
178
|
+
"name": "",
|
179
|
+
"type": "address"
|
180
|
+
}
|
181
|
+
],
|
182
|
+
"name": "userLink",
|
183
|
+
"outputs": [
|
184
|
+
{
|
185
|
+
"internalType": "uint64",
|
186
|
+
"name": "first",
|
187
|
+
"type": "uint64"
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"internalType": "uint64",
|
191
|
+
"name": "last",
|
192
|
+
"type": "uint64"
|
193
|
+
},
|
194
|
+
{
|
195
|
+
"internalType": "uint64",
|
196
|
+
"name": "count",
|
197
|
+
"type": "uint64"
|
198
|
+
}
|
199
|
+
],
|
200
|
+
"stateMutability": "view",
|
201
|
+
"type": "function"
|
202
|
+
},
|
203
|
+
{
|
204
|
+
"inputs": [
|
205
|
+
{
|
206
|
+
"internalType": "address",
|
207
|
+
"name": "",
|
208
|
+
"type": "address"
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"internalType": "uint64",
|
212
|
+
"name": "",
|
213
|
+
"type": "uint64"
|
214
|
+
}
|
215
|
+
],
|
216
|
+
"name": "userList",
|
217
|
+
"outputs": [
|
218
|
+
{
|
219
|
+
"internalType": "uint64",
|
220
|
+
"name": "prev",
|
221
|
+
"type": "uint64"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"internalType": "uint64",
|
225
|
+
"name": "next",
|
226
|
+
"type": "uint64"
|
227
|
+
}
|
228
|
+
],
|
229
|
+
"stateMutability": "view",
|
230
|
+
"type": "function"
|
231
|
+
}
|
232
|
+
]
|
package/src/api/index.ts
CHANGED
@@ -26,6 +26,14 @@ export const startApiServer = async () => {
|
|
26
26
|
})
|
27
27
|
})
|
28
28
|
|
29
|
+
server.get('/transactions/:transaction', async (req) => {
|
30
|
+
return await Transaction.findOne({
|
31
|
+
where: {
|
32
|
+
transactionHash: (req.params as any).transaction
|
33
|
+
}
|
34
|
+
})
|
35
|
+
})
|
36
|
+
|
29
37
|
await server.listen(PORT, HOST)
|
30
38
|
|
31
39
|
logger.log(`RPC Server listening at http://${HOST}:${PORT}`)
|
@@ -1,14 +1,32 @@
|
|
1
|
+
export type NetworkAddresses = {
|
2
|
+
gnosisSafe: string
|
3
|
+
multisend: string
|
4
|
+
interopX: string
|
5
|
+
dsaAddress: string
|
6
|
+
instList: string
|
7
|
+
aaveResolver: string
|
8
|
+
balanceResolver: string
|
9
|
+
}
|
10
|
+
|
1
11
|
export const addresses = {
|
2
12
|
137: {
|
3
13
|
gnosisSafe: '0x5635d2910e51da33d9DC0422c893CF4F28B69A25',
|
4
14
|
multisend: '0xA238CBeb142c10Ef7Ad8442C6D1f9E89e07e7761',
|
5
15
|
interopX: '0xDB6083df37C5F224a3dF84A4B5f9fB60b6c8670a',
|
6
16
|
dsaAddress: '0x9Fbd453a8e7a158510fBae5D9935958507cf4b19',
|
17
|
+
instList: "0x839c2D3aDe63DF5b0b8F3E57D5e145057Ab41556",
|
18
|
+
aaveResolver: "0x0731c1d0154C2bE74d50e2083Df10aa531AAbb10",
|
19
|
+
aaveV3Resolver: "0x1bD311bd5aD4DCfE18bCb55d42F0a3c714E2bfDe",
|
20
|
+
balanceResolver: "0xecc3991846bB21717B95A593Fd86C5930A491F95",
|
7
21
|
},
|
8
22
|
43114: {
|
9
23
|
gnosisSafe: '0x31d7a5194Fe60AC209Cf1Ce2d539C9A60662Ed6b',
|
10
24
|
multisend: '0x998739BFdAAdde7C933B942a68053933098f9EDa',
|
11
25
|
interopX: '0xA82A87096709E3D8648c9d9a22f31133bC4B6d32',
|
12
|
-
dsaAddress: '
|
26
|
+
dsaAddress: '0x995e67a652d2be45a8bff438b3dfac66dfff1c46',
|
27
|
+
instList: "0x9926955e0Dd681Dc303370C52f4Ad0a4dd061687",
|
28
|
+
aaveResolver: "0x7C5C59944263311a1e350E3B871B0d1d8E9A513E",
|
29
|
+
aaveV3Resolver: "0xB0862d7dB941698A0A92F8dF6672F4B56A5F5b02",
|
30
|
+
balanceResolver: "0xD45dFA34cEeAB567208041331F5ed9916C23b1E8",
|
13
31
|
}
|
14
|
-
} as Record<number,
|
32
|
+
} as Record<number, NetworkAddresses>
|
package/src/constants/index.ts
CHANGED
package/src/constants/tokens.ts
CHANGED
@@ -1,48 +1,48 @@
|
|
1
1
|
export const tokens = {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
2
|
+
1: [
|
3
|
+
{
|
4
|
+
aliases: ['eth'],
|
5
|
+
symbol: "ETH",
|
6
|
+
name: "Ethereum",
|
7
|
+
address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
8
|
+
decimals: 18,
|
9
|
+
},
|
10
|
+
{
|
11
|
+
aliases: ['weth'],
|
12
|
+
symbol: "WETH",
|
13
|
+
name: "Wrapped Ethereum",
|
14
|
+
address: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
15
|
+
decimals: 18,
|
16
|
+
},
|
17
|
+
{
|
18
|
+
aliases: ['dai'],
|
19
|
+
symbol: "DAI",
|
20
|
+
name: "DAI Stable",
|
21
|
+
address: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
|
22
|
+
decimals: 18,
|
23
|
+
},
|
24
|
+
{
|
25
|
+
aliases: ['usdc'],
|
26
|
+
symbol: "USDC",
|
27
|
+
name: "USD Coin",
|
28
|
+
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
29
|
+
decimals: 6,
|
30
|
+
},
|
31
|
+
{
|
32
|
+
aliases: ['usdt'],
|
33
|
+
symbol: "USDT",
|
34
|
+
name: "Tether USD Coin",
|
35
|
+
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
36
|
+
decimals: 6,
|
37
|
+
},
|
38
|
+
{
|
39
|
+
aliases: ['wbtc'],
|
40
|
+
symbol: "WBTC",
|
41
|
+
name: "Wrapped BTC",
|
42
|
+
address: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
43
|
+
decimals: 8,
|
44
|
+
},
|
45
|
+
],
|
46
46
|
137: [
|
47
47
|
{
|
48
48
|
aliases: ['eth', 'weth'],
|
@@ -0,0 +1 @@
|
|
1
|
+
import "./prices"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Prices } from "@/services";
|
2
|
+
import cron from "node-cron";
|
3
|
+
|
4
|
+
Prices.fetch().catch(console.log);
|
5
|
+
|
6
|
+
cron.schedule(`* * * * *`, async () => {
|
7
|
+
try {
|
8
|
+
await Prices.fetch();
|
9
|
+
} catch (error) {
|
10
|
+
console.log("Prices: ", error.message);
|
11
|
+
}
|
12
|
+
});
|
@@ -83,6 +83,22 @@ export class Transaction extends Model<
|
|
83
83
|
metadata: string;
|
84
84
|
}>;
|
85
85
|
|
86
|
+
declare executeEvent: CreationOptional<{
|
87
|
+
sourceSpells: Array<{ connector: string; data: string }>;
|
88
|
+
targetSpells: Array<{ connector: string; data: string }>;
|
89
|
+
position: IPosition;
|
90
|
+
actionId: string;
|
91
|
+
actionIdHashHash: string;
|
92
|
+
actionIdHash: string;
|
93
|
+
sourceSender: string;
|
94
|
+
sourceDsaId: string;
|
95
|
+
targetDsaId: string;
|
96
|
+
sourceChainId: number;
|
97
|
+
targetChainId: number;
|
98
|
+
vnonce: string;
|
99
|
+
metadata: string;
|
100
|
+
}>;
|
101
|
+
|
86
102
|
declare status: CreationOptional<string>;
|
87
103
|
|
88
104
|
declare createdAt: CreationOptional<Date>;
|
@@ -158,6 +174,11 @@ Transaction.init(
|
|
158
174
|
allowNull: true,
|
159
175
|
},
|
160
176
|
|
177
|
+
executeEvent: {
|
178
|
+
type: DataTypes.JSON,
|
179
|
+
allowNull: true,
|
180
|
+
},
|
181
|
+
|
161
182
|
status: {
|
162
183
|
type: DataTypes.STRING,
|
163
184
|
defaultValue: "pending",
|