@paraswap/dex-lib 3.8.32-inception → 3.8.32-inception.2
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/build/abi/inception/inception-ratio-feed.json +239 -3
- package/build/dex/inception/inception-event-pool.js +1 -0
- package/build/dex/inception/inception-event-pool.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/inception/inception-ratio-feed.json +239 -3
- package/src/dex/inception/inception-event-pool.ts +2 -0
- package/src/dex/inception/inception-events.test.ts +2 -1
|
@@ -1,4 +1,109 @@
|
|
|
1
1
|
[
|
|
2
|
+
{ "inputs": [], "name": "EnforcedPause", "type": "error" },
|
|
3
|
+
{ "inputs": [], "name": "ExpectedPause", "type": "error" },
|
|
4
|
+
{ "inputs": [], "name": "InconsistentInputData", "type": "error" },
|
|
5
|
+
{
|
|
6
|
+
"inputs": [{ "internalType": "uint256", "name": "day", "type": "uint256" }],
|
|
7
|
+
"name": "IncorrectDay",
|
|
8
|
+
"type": "error"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{ "internalType": "address", "name": "token", "type": "address" }
|
|
13
|
+
],
|
|
14
|
+
"name": "IncorrectToken",
|
|
15
|
+
"type": "error"
|
|
16
|
+
},
|
|
17
|
+
{ "inputs": [], "name": "InvalidInitialization", "type": "error" },
|
|
18
|
+
{ "inputs": [], "name": "NewRatioThresholdInvalid", "type": "error" },
|
|
19
|
+
{ "inputs": [], "name": "NotInitializing", "type": "error" },
|
|
20
|
+
{ "inputs": [], "name": "NullParams", "type": "error" },
|
|
21
|
+
{
|
|
22
|
+
"inputs": [
|
|
23
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
24
|
+
],
|
|
25
|
+
"name": "OperatorUnauthorizedAccount",
|
|
26
|
+
"type": "error"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [
|
|
30
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
|
31
|
+
],
|
|
32
|
+
"name": "OwnableInvalidOwner",
|
|
33
|
+
"type": "error"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [
|
|
37
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
38
|
+
],
|
|
39
|
+
"name": "OwnableUnauthorizedAccount",
|
|
40
|
+
"type": "error"
|
|
41
|
+
},
|
|
42
|
+
{ "inputs": [], "name": "RatioThresholdNotSet", "type": "error" },
|
|
43
|
+
{
|
|
44
|
+
"anonymous": false,
|
|
45
|
+
"inputs": [
|
|
46
|
+
{
|
|
47
|
+
"indexed": false,
|
|
48
|
+
"internalType": "uint64",
|
|
49
|
+
"name": "version",
|
|
50
|
+
"type": "uint64"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"name": "Initialized",
|
|
54
|
+
"type": "event"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"anonymous": false,
|
|
58
|
+
"inputs": [
|
|
59
|
+
{
|
|
60
|
+
"indexed": false,
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "prevValue",
|
|
63
|
+
"type": "address"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"indexed": false,
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "newValue",
|
|
69
|
+
"type": "address"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"name": "OperatorUpdated",
|
|
73
|
+
"type": "event"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"anonymous": false,
|
|
77
|
+
"inputs": [
|
|
78
|
+
{
|
|
79
|
+
"indexed": true,
|
|
80
|
+
"internalType": "address",
|
|
81
|
+
"name": "previousOwner",
|
|
82
|
+
"type": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"indexed": true,
|
|
86
|
+
"internalType": "address",
|
|
87
|
+
"name": "newOwner",
|
|
88
|
+
"type": "address"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"name": "OwnershipTransferred",
|
|
92
|
+
"type": "event"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"anonymous": false,
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"indexed": false,
|
|
99
|
+
"internalType": "address",
|
|
100
|
+
"name": "account",
|
|
101
|
+
"type": "address"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"name": "Paused",
|
|
105
|
+
"type": "event"
|
|
106
|
+
},
|
|
2
107
|
{
|
|
3
108
|
"anonymous": false,
|
|
4
109
|
"inputs": [
|
|
@@ -11,19 +116,76 @@
|
|
|
11
116
|
{
|
|
12
117
|
"indexed": false,
|
|
13
118
|
"internalType": "uint256",
|
|
14
|
-
"name": "
|
|
119
|
+
"name": "failedRatio",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"indexed": false,
|
|
124
|
+
"internalType": "string",
|
|
125
|
+
"name": "reason",
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"name": "RatioNotUpdated",
|
|
130
|
+
"type": "event"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"anonymous": false,
|
|
134
|
+
"inputs": [
|
|
135
|
+
{
|
|
136
|
+
"indexed": false,
|
|
137
|
+
"internalType": "uint256",
|
|
138
|
+
"name": "prevValue",
|
|
15
139
|
"type": "uint256"
|
|
16
140
|
},
|
|
17
141
|
{
|
|
18
142
|
"indexed": false,
|
|
19
143
|
"internalType": "uint256",
|
|
20
|
-
"name": "
|
|
144
|
+
"name": "newValue",
|
|
145
|
+
"type": "uint256"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"name": "RatioThresholdChanged",
|
|
149
|
+
"type": "event"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"anonymous": false,
|
|
153
|
+
"inputs": [
|
|
154
|
+
{
|
|
155
|
+
"indexed": true,
|
|
156
|
+
"internalType": "address",
|
|
157
|
+
"name": "tokenAddress",
|
|
158
|
+
"type": "address"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"indexed": false,
|
|
162
|
+
"internalType": "uint256",
|
|
163
|
+
"name": "prevValue",
|
|
164
|
+
"type": "uint256"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"indexed": false,
|
|
168
|
+
"internalType": "uint256",
|
|
169
|
+
"name": "newValue",
|
|
21
170
|
"type": "uint256"
|
|
22
171
|
}
|
|
23
172
|
],
|
|
24
173
|
"name": "RatioUpdated",
|
|
25
174
|
"type": "event"
|
|
26
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"anonymous": false,
|
|
178
|
+
"inputs": [
|
|
179
|
+
{
|
|
180
|
+
"indexed": false,
|
|
181
|
+
"internalType": "address",
|
|
182
|
+
"name": "account",
|
|
183
|
+
"type": "address"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"name": "Unpaused",
|
|
187
|
+
"type": "event"
|
|
188
|
+
},
|
|
27
189
|
{
|
|
28
190
|
"inputs": [],
|
|
29
191
|
"name": "MAX_THRESHOLD",
|
|
@@ -67,12 +229,35 @@
|
|
|
67
229
|
"type": "function"
|
|
68
230
|
},
|
|
69
231
|
{
|
|
70
|
-
"inputs": [
|
|
232
|
+
"inputs": [
|
|
233
|
+
{ "internalType": "address", "name": "operator", "type": "address" }
|
|
234
|
+
],
|
|
71
235
|
"name": "initialize",
|
|
72
236
|
"outputs": [],
|
|
73
237
|
"stateMutability": "nonpayable",
|
|
74
238
|
"type": "function"
|
|
75
239
|
},
|
|
240
|
+
{
|
|
241
|
+
"inputs": [],
|
|
242
|
+
"name": "owner",
|
|
243
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
244
|
+
"stateMutability": "view",
|
|
245
|
+
"type": "function"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"inputs": [],
|
|
249
|
+
"name": "pause",
|
|
250
|
+
"outputs": [],
|
|
251
|
+
"stateMutability": "nonpayable",
|
|
252
|
+
"type": "function"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"inputs": [],
|
|
256
|
+
"name": "paused",
|
|
257
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
258
|
+
"stateMutability": "view",
|
|
259
|
+
"type": "function"
|
|
260
|
+
},
|
|
76
261
|
{
|
|
77
262
|
"inputs": [],
|
|
78
263
|
"name": "ratioThreshold",
|
|
@@ -80,6 +265,57 @@
|
|
|
80
265
|
"stateMutability": "view",
|
|
81
266
|
"type": "function"
|
|
82
267
|
},
|
|
268
|
+
{
|
|
269
|
+
"inputs": [],
|
|
270
|
+
"name": "renounceOwnership",
|
|
271
|
+
"outputs": [],
|
|
272
|
+
"stateMutability": "nonpayable",
|
|
273
|
+
"type": "function"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"inputs": [
|
|
277
|
+
{ "internalType": "address", "name": "token", "type": "address" },
|
|
278
|
+
{ "internalType": "uint256", "name": "ratio", "type": "uint256" }
|
|
279
|
+
],
|
|
280
|
+
"name": "repairRatioFor",
|
|
281
|
+
"outputs": [],
|
|
282
|
+
"stateMutability": "nonpayable",
|
|
283
|
+
"type": "function"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"inputs": [
|
|
287
|
+
{ "internalType": "address", "name": "newOperator", "type": "address" }
|
|
288
|
+
],
|
|
289
|
+
"name": "setInceptionOperator",
|
|
290
|
+
"outputs": [],
|
|
291
|
+
"stateMutability": "nonpayable",
|
|
292
|
+
"type": "function"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"inputs": [
|
|
296
|
+
{ "internalType": "uint256", "name": "newValue", "type": "uint256" }
|
|
297
|
+
],
|
|
298
|
+
"name": "setRatioThreshold",
|
|
299
|
+
"outputs": [],
|
|
300
|
+
"stateMutability": "nonpayable",
|
|
301
|
+
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"inputs": [
|
|
305
|
+
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
306
|
+
],
|
|
307
|
+
"name": "transferOwnership",
|
|
308
|
+
"outputs": [],
|
|
309
|
+
"stateMutability": "nonpayable",
|
|
310
|
+
"type": "function"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [],
|
|
314
|
+
"name": "unpause",
|
|
315
|
+
"outputs": [],
|
|
316
|
+
"stateMutability": "nonpayable",
|
|
317
|
+
"type": "function"
|
|
318
|
+
},
|
|
83
319
|
{
|
|
84
320
|
"inputs": [
|
|
85
321
|
{ "internalType": "address[]", "name": "addresses", "type": "address[]" },
|
|
@@ -18,6 +18,7 @@ class InceptionEventPool extends stateful_event_subscriber_1.StatefulEventSubscr
|
|
|
18
18
|
this.poolConfig = poolConfig;
|
|
19
19
|
this.poolInterface = poolInterface;
|
|
20
20
|
this.ratioFeedInterface = new abi_1.Interface(inception_ratio_feed_json_1.default);
|
|
21
|
+
this.addressesSubscribed = [poolConfig.ratioFeedAddress];
|
|
21
22
|
}
|
|
22
23
|
processLog(state, log, blockHeader) {
|
|
23
24
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inception-event-pool.js","sourceRoot":"","sources":["../../../src/dex/inception/inception-event-pool.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAGvB,+EAA0E;AAG1E,mCAA0C;AAC1C,4CAA+C;AAC/C,8GAAiF;AACjF,qCAA+C;AAE/C,MAAa,kBAAmB,SAAQ,mDAAkC;IAExE,YACE,UAAkB,EACR,OAAe,EACf,SAAqB,EAC/B,MAAc,EACP,UAAsB,EACtB,aAAwB;QAE/B,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QANnC,YAAO,GAAP,OAAO,CAAQ;QACf,cAAS,GAAT,SAAS,CAAY;QAExB,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAW;QAPvB,uBAAkB,GAAc,IAAI,eAAS,CAAC,mCAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"inception-event-pool.js","sourceRoot":"","sources":["../../../src/dex/inception/inception-event-pool.ts"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AAGvB,+EAA0E;AAG1E,mCAA0C;AAC1C,4CAA+C;AAC/C,8GAAiF;AACjF,qCAA+C;AAE/C,MAAa,kBAAmB,SAAQ,mDAAkC;IAExE,YACE,UAAkB,EACR,OAAe,EACf,SAAqB,EAC/B,MAAc,EACP,UAAsB,EACtB,aAAwB;QAE/B,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QANnC,YAAO,GAAP,OAAO,CAAQ;QACf,cAAS,GAAT,SAAS,CAAY;QAExB,eAAU,GAAV,UAAU,CAAY;QACtB,kBAAa,GAAb,aAAa,CAAW;QAPvB,uBAAkB,GAAc,IAAI,eAAS,CAAC,mCAAoB,CAAC,CAAC;QAW5E,IAAI,CAAC,mBAAmB,GAAG,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAES,UAAU,CAClB,KAA8B,EAC9B,GAAkB,EAClB,WAAkC;QAElC,IAAI;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACrD,MAAM,MAAM,GAAc,gBAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC7C,QAAQ,MAAM,CAAC,IAAI,EAAE;gBACnB,KAAK,cAAc,CAAC,CAAC;oBACnB,MAAM,SAAS,GAAG,IAAA,4BAAmB,EAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;oBACpE,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,GAAG;wBACvC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;qBACzC,CAAC;oBACF,OAAO,MAAM,CAAC;iBACf;gBACD;oBACE,OAAO,MAAM,CAAC;aACjB;SACF;QAAC,OAAO,CAAC,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC;YAC5C,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,WAAmB;QACrC,OAAO,IAAA,uBAAe,EACpB,IAAI,CAAC,SAAS,CAAC,aAAa,EAC5B,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,OAAO,EACZ,WAAW,CACZ,CAAC;IACJ,CAAC;CACF;AAhDD,gDAgDC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,109 @@
|
|
|
1
1
|
[
|
|
2
|
+
{ "inputs": [], "name": "EnforcedPause", "type": "error" },
|
|
3
|
+
{ "inputs": [], "name": "ExpectedPause", "type": "error" },
|
|
4
|
+
{ "inputs": [], "name": "InconsistentInputData", "type": "error" },
|
|
5
|
+
{
|
|
6
|
+
"inputs": [{ "internalType": "uint256", "name": "day", "type": "uint256" }],
|
|
7
|
+
"name": "IncorrectDay",
|
|
8
|
+
"type": "error"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{ "internalType": "address", "name": "token", "type": "address" }
|
|
13
|
+
],
|
|
14
|
+
"name": "IncorrectToken",
|
|
15
|
+
"type": "error"
|
|
16
|
+
},
|
|
17
|
+
{ "inputs": [], "name": "InvalidInitialization", "type": "error" },
|
|
18
|
+
{ "inputs": [], "name": "NewRatioThresholdInvalid", "type": "error" },
|
|
19
|
+
{ "inputs": [], "name": "NotInitializing", "type": "error" },
|
|
20
|
+
{ "inputs": [], "name": "NullParams", "type": "error" },
|
|
21
|
+
{
|
|
22
|
+
"inputs": [
|
|
23
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
24
|
+
],
|
|
25
|
+
"name": "OperatorUnauthorizedAccount",
|
|
26
|
+
"type": "error"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"inputs": [
|
|
30
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
|
31
|
+
],
|
|
32
|
+
"name": "OwnableInvalidOwner",
|
|
33
|
+
"type": "error"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [
|
|
37
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
38
|
+
],
|
|
39
|
+
"name": "OwnableUnauthorizedAccount",
|
|
40
|
+
"type": "error"
|
|
41
|
+
},
|
|
42
|
+
{ "inputs": [], "name": "RatioThresholdNotSet", "type": "error" },
|
|
43
|
+
{
|
|
44
|
+
"anonymous": false,
|
|
45
|
+
"inputs": [
|
|
46
|
+
{
|
|
47
|
+
"indexed": false,
|
|
48
|
+
"internalType": "uint64",
|
|
49
|
+
"name": "version",
|
|
50
|
+
"type": "uint64"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"name": "Initialized",
|
|
54
|
+
"type": "event"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"anonymous": false,
|
|
58
|
+
"inputs": [
|
|
59
|
+
{
|
|
60
|
+
"indexed": false,
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "prevValue",
|
|
63
|
+
"type": "address"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"indexed": false,
|
|
67
|
+
"internalType": "address",
|
|
68
|
+
"name": "newValue",
|
|
69
|
+
"type": "address"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"name": "OperatorUpdated",
|
|
73
|
+
"type": "event"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"anonymous": false,
|
|
77
|
+
"inputs": [
|
|
78
|
+
{
|
|
79
|
+
"indexed": true,
|
|
80
|
+
"internalType": "address",
|
|
81
|
+
"name": "previousOwner",
|
|
82
|
+
"type": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"indexed": true,
|
|
86
|
+
"internalType": "address",
|
|
87
|
+
"name": "newOwner",
|
|
88
|
+
"type": "address"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"name": "OwnershipTransferred",
|
|
92
|
+
"type": "event"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"anonymous": false,
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"indexed": false,
|
|
99
|
+
"internalType": "address",
|
|
100
|
+
"name": "account",
|
|
101
|
+
"type": "address"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"name": "Paused",
|
|
105
|
+
"type": "event"
|
|
106
|
+
},
|
|
2
107
|
{
|
|
3
108
|
"anonymous": false,
|
|
4
109
|
"inputs": [
|
|
@@ -11,19 +116,76 @@
|
|
|
11
116
|
{
|
|
12
117
|
"indexed": false,
|
|
13
118
|
"internalType": "uint256",
|
|
14
|
-
"name": "
|
|
119
|
+
"name": "failedRatio",
|
|
120
|
+
"type": "uint256"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"indexed": false,
|
|
124
|
+
"internalType": "string",
|
|
125
|
+
"name": "reason",
|
|
126
|
+
"type": "string"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"name": "RatioNotUpdated",
|
|
130
|
+
"type": "event"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"anonymous": false,
|
|
134
|
+
"inputs": [
|
|
135
|
+
{
|
|
136
|
+
"indexed": false,
|
|
137
|
+
"internalType": "uint256",
|
|
138
|
+
"name": "prevValue",
|
|
15
139
|
"type": "uint256"
|
|
16
140
|
},
|
|
17
141
|
{
|
|
18
142
|
"indexed": false,
|
|
19
143
|
"internalType": "uint256",
|
|
20
|
-
"name": "
|
|
144
|
+
"name": "newValue",
|
|
145
|
+
"type": "uint256"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"name": "RatioThresholdChanged",
|
|
149
|
+
"type": "event"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"anonymous": false,
|
|
153
|
+
"inputs": [
|
|
154
|
+
{
|
|
155
|
+
"indexed": true,
|
|
156
|
+
"internalType": "address",
|
|
157
|
+
"name": "tokenAddress",
|
|
158
|
+
"type": "address"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"indexed": false,
|
|
162
|
+
"internalType": "uint256",
|
|
163
|
+
"name": "prevValue",
|
|
164
|
+
"type": "uint256"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"indexed": false,
|
|
168
|
+
"internalType": "uint256",
|
|
169
|
+
"name": "newValue",
|
|
21
170
|
"type": "uint256"
|
|
22
171
|
}
|
|
23
172
|
],
|
|
24
173
|
"name": "RatioUpdated",
|
|
25
174
|
"type": "event"
|
|
26
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"anonymous": false,
|
|
178
|
+
"inputs": [
|
|
179
|
+
{
|
|
180
|
+
"indexed": false,
|
|
181
|
+
"internalType": "address",
|
|
182
|
+
"name": "account",
|
|
183
|
+
"type": "address"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"name": "Unpaused",
|
|
187
|
+
"type": "event"
|
|
188
|
+
},
|
|
27
189
|
{
|
|
28
190
|
"inputs": [],
|
|
29
191
|
"name": "MAX_THRESHOLD",
|
|
@@ -67,12 +229,35 @@
|
|
|
67
229
|
"type": "function"
|
|
68
230
|
},
|
|
69
231
|
{
|
|
70
|
-
"inputs": [
|
|
232
|
+
"inputs": [
|
|
233
|
+
{ "internalType": "address", "name": "operator", "type": "address" }
|
|
234
|
+
],
|
|
71
235
|
"name": "initialize",
|
|
72
236
|
"outputs": [],
|
|
73
237
|
"stateMutability": "nonpayable",
|
|
74
238
|
"type": "function"
|
|
75
239
|
},
|
|
240
|
+
{
|
|
241
|
+
"inputs": [],
|
|
242
|
+
"name": "owner",
|
|
243
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
244
|
+
"stateMutability": "view",
|
|
245
|
+
"type": "function"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"inputs": [],
|
|
249
|
+
"name": "pause",
|
|
250
|
+
"outputs": [],
|
|
251
|
+
"stateMutability": "nonpayable",
|
|
252
|
+
"type": "function"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"inputs": [],
|
|
256
|
+
"name": "paused",
|
|
257
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
258
|
+
"stateMutability": "view",
|
|
259
|
+
"type": "function"
|
|
260
|
+
},
|
|
76
261
|
{
|
|
77
262
|
"inputs": [],
|
|
78
263
|
"name": "ratioThreshold",
|
|
@@ -80,6 +265,57 @@
|
|
|
80
265
|
"stateMutability": "view",
|
|
81
266
|
"type": "function"
|
|
82
267
|
},
|
|
268
|
+
{
|
|
269
|
+
"inputs": [],
|
|
270
|
+
"name": "renounceOwnership",
|
|
271
|
+
"outputs": [],
|
|
272
|
+
"stateMutability": "nonpayable",
|
|
273
|
+
"type": "function"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"inputs": [
|
|
277
|
+
{ "internalType": "address", "name": "token", "type": "address" },
|
|
278
|
+
{ "internalType": "uint256", "name": "ratio", "type": "uint256" }
|
|
279
|
+
],
|
|
280
|
+
"name": "repairRatioFor",
|
|
281
|
+
"outputs": [],
|
|
282
|
+
"stateMutability": "nonpayable",
|
|
283
|
+
"type": "function"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"inputs": [
|
|
287
|
+
{ "internalType": "address", "name": "newOperator", "type": "address" }
|
|
288
|
+
],
|
|
289
|
+
"name": "setInceptionOperator",
|
|
290
|
+
"outputs": [],
|
|
291
|
+
"stateMutability": "nonpayable",
|
|
292
|
+
"type": "function"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"inputs": [
|
|
296
|
+
{ "internalType": "uint256", "name": "newValue", "type": "uint256" }
|
|
297
|
+
],
|
|
298
|
+
"name": "setRatioThreshold",
|
|
299
|
+
"outputs": [],
|
|
300
|
+
"stateMutability": "nonpayable",
|
|
301
|
+
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"inputs": [
|
|
305
|
+
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
306
|
+
],
|
|
307
|
+
"name": "transferOwnership",
|
|
308
|
+
"outputs": [],
|
|
309
|
+
"stateMutability": "nonpayable",
|
|
310
|
+
"type": "function"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [],
|
|
314
|
+
"name": "unpause",
|
|
315
|
+
"outputs": [],
|
|
316
|
+
"stateMutability": "nonpayable",
|
|
317
|
+
"type": "function"
|
|
318
|
+
},
|
|
83
319
|
{
|
|
84
320
|
"inputs": [
|
|
85
321
|
{ "internalType": "address[]", "name": "addresses", "type": "address[]" },
|
|
@@ -20,6 +20,8 @@ export class InceptionEventPool extends StatefulEventSubscriber<PoolState> {
|
|
|
20
20
|
public poolInterface: Interface,
|
|
21
21
|
) {
|
|
22
22
|
super(parentName, 'pool', dexHelper, logger);
|
|
23
|
+
|
|
24
|
+
this.addressesSubscribed = [poolConfig.ratioFeedAddress];
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
protected processLog(
|
|
@@ -26,7 +26,8 @@ async function fetchPoolState(
|
|
|
26
26
|
|
|
27
27
|
describe('Inception Event', function () {
|
|
28
28
|
const blockNumbers: { [eventName: string]: number[] } = {
|
|
29
|
-
RatioUpdated: [20438963, 20431766, 20424602],
|
|
29
|
+
// RatioUpdated: [20438963, 20431766, 20424602],
|
|
30
|
+
RatioUpdated: [20438962, 20431765, 20424601, 20703959, 20711125],
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
describe('InceptionEventPool', function () {
|