@paraswap/dex-lib 2.34.0 → 2.35.1

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.
Files changed (72) hide show
  1. package/build/abi/api3-proxy.json +46 -0
  2. package/build/abi/api3-server-v1.json +463 -0
  3. package/build/abi/quick-perps/fast-price-events.json +70 -0
  4. package/build/abi/quick-perps/fast-price-feed.json +741 -0
  5. package/build/abi/quick-perps/reader.json +313 -0
  6. package/build/abi/quick-perps/vault-price-feed.json +323 -0
  7. package/build/abi/quick-perps/vault.json +1953 -0
  8. package/build/composed-event-subscriber.js +8 -2
  9. package/build/composed-event-subscriber.js.map +1 -1
  10. package/build/config.js +2 -2
  11. package/build/dex/algebra/algebra.js +0 -12
  12. package/build/dex/algebra/algebra.js.map +1 -1
  13. package/build/dex/index.js +2 -0
  14. package/build/dex/index.js.map +1 -1
  15. package/build/dex/quick-perps/config.d.ts +11 -0
  16. package/build/dex/quick-perps/config.js +27 -0
  17. package/build/dex/quick-perps/config.js.map +1 -0
  18. package/build/dex/quick-perps/fast-price-feed.d.ts +26 -0
  19. package/build/dex/quick-perps/fast-price-feed.js +176 -0
  20. package/build/dex/quick-perps/fast-price-feed.js.map +1 -0
  21. package/build/dex/quick-perps/pool.d.ts +21 -0
  22. package/build/dex/quick-perps/pool.js +210 -0
  23. package/build/dex/quick-perps/pool.js.map +1 -0
  24. package/build/dex/quick-perps/quick-perps.d.ts +52 -0
  25. package/build/dex/quick-perps/quick-perps.js +205 -0
  26. package/build/dex/quick-perps/quick-perps.js.map +1 -0
  27. package/build/dex/quick-perps/types.d.ts +98 -0
  28. package/build/dex/quick-perps/types.js +3 -0
  29. package/build/dex/quick-perps/types.js.map +1 -0
  30. package/build/dex/quick-perps/usdq.d.ts +15 -0
  31. package/build/dex/quick-perps/usdq.js +61 -0
  32. package/build/dex/quick-perps/usdq.js.map +1 -0
  33. package/build/dex/quick-perps/vault-price-feed.d.ts +43 -0
  34. package/build/dex/quick-perps/vault-price-feed.js +194 -0
  35. package/build/dex/quick-perps/vault-price-feed.js.map +1 -0
  36. package/build/dex/quick-perps/vault-utils.d.ts +8 -0
  37. package/build/dex/quick-perps/vault-utils.js +41 -0
  38. package/build/dex/quick-perps/vault-utils.js.map +1 -0
  39. package/build/dex/quick-perps/vault.d.ts +46 -0
  40. package/build/dex/quick-perps/vault.js +166 -0
  41. package/build/dex/quick-perps/vault.js.map +1 -0
  42. package/build/lib/api3-feed.d.ts +26 -0
  43. package/build/lib/api3-feed.js +82 -0
  44. package/build/lib/api3-feed.js.map +1 -0
  45. package/package.json +1 -1
  46. package/src/abi/api3-proxy.json +46 -0
  47. package/src/abi/api3-server-v1.json +463 -0
  48. package/src/abi/quick-perps/fast-price-events.json +70 -0
  49. package/src/abi/quick-perps/fast-price-feed.json +741 -0
  50. package/src/abi/quick-perps/reader.json +313 -0
  51. package/src/abi/quick-perps/vault-price-feed.json +323 -0
  52. package/src/abi/quick-perps/vault.json +1953 -0
  53. package/src/composed-event-subscriber.ts +16 -11
  54. package/src/config.ts +2 -2
  55. package/src/dex/algebra/algebra.ts +0 -13
  56. package/src/dex/index.ts +2 -0
  57. package/src/dex/quick-perps/config.ts +31 -0
  58. package/src/dex/quick-perps/fast-price-feed.ts +279 -0
  59. package/src/dex/quick-perps/pool.ts +372 -0
  60. package/src/dex/quick-perps/quick-perps-e2e.test.ts +65 -0
  61. package/src/dex/quick-perps/quick-perps-events.test.ts +101 -0
  62. package/src/dex/quick-perps/quick-perps-integration.test.ts +153 -0
  63. package/src/dex/quick-perps/quick-perps.ts +292 -0
  64. package/src/dex/quick-perps/types.ts +97 -0
  65. package/src/dex/quick-perps/usdq.ts +83 -0
  66. package/src/dex/quick-perps/vault-price-feed.ts +322 -0
  67. package/src/dex/quick-perps/vault-utils.ts +53 -0
  68. package/src/dex/quick-perps/vault.ts +290 -0
  69. package/src/lib/api3-feed.ts +140 -0
  70. package/tests/constants-e2e.ts +29 -0
  71. package/tests/tenderly-simulation.ts +46 -2
  72. package/tests/utils-e2e.ts +18 -10
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Api3FeedSubscriber = void 0;
7
+ const composed_event_subscriber_1 = require("../composed-event-subscriber");
8
+ const abi_1 = require("@ethersproject/abi");
9
+ const api3_proxy_json_1 = __importDefault(require("../abi/api3-proxy.json"));
10
+ const api3_server_v1_json_1 = __importDefault(require("../abi/api3-server-v1.json"));
11
+ class Api3FeedSubscriber extends composed_event_subscriber_1.PartialEventSubscriber {
12
+ constructor(proxy, api3Server, dataFeedId, lens, logger) {
13
+ super([api3Server], lens, logger);
14
+ this.proxy = proxy;
15
+ this.dataFeedId = dataFeedId;
16
+ }
17
+ static getApi3ServerV1MultiCallInput(proxy) {
18
+ return {
19
+ target: proxy,
20
+ callData: Api3FeedSubscriber.proxyInterface.encodeFunctionData('api3ServerV1'),
21
+ };
22
+ }
23
+ static getDataFeedId(proxy) {
24
+ return {
25
+ target: proxy,
26
+ callData: Api3FeedSubscriber.proxyInterface.encodeFunctionData('dataFeedId'),
27
+ };
28
+ }
29
+ static decodeDataFeedId(multicallOutput) {
30
+ return Api3FeedSubscriber.proxyInterface.decodeFunctionResult('dataFeedId', multicallOutput)[0];
31
+ }
32
+ static decodeApi3ServerV1Result(multicallOutput) {
33
+ return Api3FeedSubscriber.proxyInterface.decodeFunctionResult('api3ServerV1', multicallOutput)[0];
34
+ }
35
+ processLog(state, log, blockHeader) {
36
+ if (log.topics[0] === Api3FeedSubscriber.ANSWER_UPDATED_SIGNED_DATA) {
37
+ const decoded = Api3FeedSubscriber.api3ServerV1Iface.decodeEventLog('UpdatedBeaconWithSignedData', log.data, log.topics);
38
+ if (decoded.beaconId !== this.dataFeedId)
39
+ return null;
40
+ return {
41
+ value: BigInt(decoded.value.toString()),
42
+ timestamp: BigInt(decoded.timestamp.toString()),
43
+ };
44
+ }
45
+ else if (log.topics[0] === Api3FeedSubscriber.ANSWER_UPDATED_BEACON_SET_DATA) {
46
+ const decoded = Api3FeedSubscriber.api3ServerV1Iface.decodeEventLog('UpdatedBeaconSetWithBeacons', log.data, log.topics);
47
+ if (decoded.beaconSetId !== this.dataFeedId)
48
+ return null;
49
+ return {
50
+ value: BigInt(decoded.value.toString()),
51
+ timestamp: BigInt(decoded.timestamp.toString()),
52
+ };
53
+ }
54
+ else {
55
+ return null;
56
+ }
57
+ }
58
+ getGenerateStateMultiCallInputs() {
59
+ return [
60
+ {
61
+ target: this.proxy,
62
+ callData: Api3FeedSubscriber.proxyInterface.encodeFunctionData('read'),
63
+ },
64
+ ];
65
+ }
66
+ generateState(multicallOutputs, blockNumber) {
67
+ const decoded = Api3FeedSubscriber.proxyInterface.decodeFunctionResult('read', multicallOutputs[0]);
68
+ return {
69
+ value: BigInt(decoded.value.toString()),
70
+ timestamp: BigInt(decoded.timestamp.toString()),
71
+ };
72
+ }
73
+ getLatestData(state) {
74
+ return this.lens.get()(state).value;
75
+ }
76
+ }
77
+ exports.Api3FeedSubscriber = Api3FeedSubscriber;
78
+ Api3FeedSubscriber.proxyInterface = new abi_1.Interface(api3_proxy_json_1.default);
79
+ Api3FeedSubscriber.api3ServerV1Iface = new abi_1.Interface(api3_server_v1_json_1.default);
80
+ Api3FeedSubscriber.ANSWER_UPDATED_SIGNED_DATA = Api3FeedSubscriber.api3ServerV1Iface.getEventTopic('UpdatedBeaconWithSignedData');
81
+ Api3FeedSubscriber.ANSWER_UPDATED_BEACON_SET_DATA = Api3FeedSubscriber.api3ServerV1Iface.getEventTopic('UpdatedBeaconSetWithBeacons');
82
+ //# sourceMappingURL=api3-feed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api3-feed.js","sourceRoot":"","sources":["../../src/lib/api3-feed.ts"],"names":[],"mappings":";;;;;;AACA,4EAAsE;AAUtE,4CAA+C;AAC/C,6EAA8C;A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,KAA0B;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;IACtC,CAAC;;AAtHH,gDAuHC;AAnHiB,iCAAc,GAAG,IAAI,eAAS,CAAC,yBAAQ,CAAC,CAAC;AACzC,oCAAiB,GAAG,IAAI,eAAS,CAAC,6BAAe,CAAC,CAAC;AACnD,6CAA0B,GACxC,kBAAkB,CAAC,iBAAiB,CAAC,aAAa,CAChD,6BAA6B,CAC9B,CAAC;AACY,iDAA8B,GAC5C,kBAAkB,CAAC,iBAAiB,CAAC,aAAa,CAChD,6BAA6B,CAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paraswap/dex-lib",
3
- "version": "2.34.0",
3
+ "version": "2.35.1",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "repository": "https://github.com/paraswap/paraswap-dex-lib",
@@ -0,0 +1,46 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "api3ServerV1",
5
+ "outputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "",
9
+ "type": "address"
10
+ }
11
+ ],
12
+ "stateMutability": "view",
13
+ "type": "function"
14
+ },
15
+ {
16
+ "inputs": [],
17
+ "name": "dataFeedId",
18
+ "outputs": [
19
+ {
20
+ "internalType": "bytes32",
21
+ "name": "",
22
+ "type": "bytes32"
23
+ }
24
+ ],
25
+ "stateMutability": "view",
26
+ "type": "function"
27
+ },
28
+ {
29
+ "inputs": [],
30
+ "name": "read",
31
+ "outputs": [
32
+ {
33
+ "internalType": "int224",
34
+ "name": "value",
35
+ "type": "int224"
36
+ },
37
+ {
38
+ "internalType": "uint32",
39
+ "name": "timestamp",
40
+ "type": "uint32"
41
+ }
42
+ ],
43
+ "stateMutability": "view",
44
+ "type": "function"
45
+ }
46
+ ]
@@ -0,0 +1,463 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_accessControlRegistry",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "string",
11
+ "name": "_adminRoleDescription",
12
+ "type": "string"
13
+ },
14
+ { "internalType": "address", "name": "_manager", "type": "address" }
15
+ ],
16
+ "stateMutability": "nonpayable",
17
+ "type": "constructor"
18
+ },
19
+ {
20
+ "anonymous": false,
21
+ "inputs": [
22
+ {
23
+ "indexed": true,
24
+ "internalType": "bytes32",
25
+ "name": "dataFeedId",
26
+ "type": "bytes32"
27
+ },
28
+ {
29
+ "indexed": true,
30
+ "internalType": "bytes32",
31
+ "name": "dapiName",
32
+ "type": "bytes32"
33
+ },
34
+ {
35
+ "indexed": false,
36
+ "internalType": "address",
37
+ "name": "sender",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "name": "SetDapiName",
42
+ "type": "event"
43
+ },
44
+ {
45
+ "anonymous": false,
46
+ "inputs": [
47
+ {
48
+ "indexed": true,
49
+ "internalType": "bytes32",
50
+ "name": "beaconSetId",
51
+ "type": "bytes32"
52
+ },
53
+ {
54
+ "indexed": false,
55
+ "internalType": "int224",
56
+ "name": "value",
57
+ "type": "int224"
58
+ },
59
+ {
60
+ "indexed": false,
61
+ "internalType": "uint32",
62
+ "name": "timestamp",
63
+ "type": "uint32"
64
+ }
65
+ ],
66
+ "name": "UpdatedBeaconSetWithBeacons",
67
+ "type": "event"
68
+ },
69
+ {
70
+ "anonymous": false,
71
+ "inputs": [
72
+ {
73
+ "indexed": true,
74
+ "internalType": "bytes32",
75
+ "name": "beaconId",
76
+ "type": "bytes32"
77
+ },
78
+ {
79
+ "indexed": false,
80
+ "internalType": "int224",
81
+ "name": "value",
82
+ "type": "int224"
83
+ },
84
+ {
85
+ "indexed": false,
86
+ "internalType": "uint32",
87
+ "name": "timestamp",
88
+ "type": "uint32"
89
+ }
90
+ ],
91
+ "name": "UpdatedBeaconWithSignedData",
92
+ "type": "event"
93
+ },
94
+ {
95
+ "anonymous": false,
96
+ "inputs": [
97
+ {
98
+ "indexed": true,
99
+ "internalType": "bytes32",
100
+ "name": "beaconSetId",
101
+ "type": "bytes32"
102
+ },
103
+ {
104
+ "indexed": true,
105
+ "internalType": "address",
106
+ "name": "proxy",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "indexed": true,
111
+ "internalType": "bytes32",
112
+ "name": "updateId",
113
+ "type": "bytes32"
114
+ },
115
+ {
116
+ "indexed": false,
117
+ "internalType": "int224",
118
+ "name": "value",
119
+ "type": "int224"
120
+ },
121
+ {
122
+ "indexed": false,
123
+ "internalType": "uint32",
124
+ "name": "timestamp",
125
+ "type": "uint32"
126
+ }
127
+ ],
128
+ "name": "UpdatedOevProxyBeaconSetWithSignedData",
129
+ "type": "event"
130
+ },
131
+ {
132
+ "anonymous": false,
133
+ "inputs": [
134
+ {
135
+ "indexed": true,
136
+ "internalType": "bytes32",
137
+ "name": "beaconId",
138
+ "type": "bytes32"
139
+ },
140
+ {
141
+ "indexed": true,
142
+ "internalType": "address",
143
+ "name": "proxy",
144
+ "type": "address"
145
+ },
146
+ {
147
+ "indexed": true,
148
+ "internalType": "bytes32",
149
+ "name": "updateId",
150
+ "type": "bytes32"
151
+ },
152
+ {
153
+ "indexed": false,
154
+ "internalType": "int224",
155
+ "name": "value",
156
+ "type": "int224"
157
+ },
158
+ {
159
+ "indexed": false,
160
+ "internalType": "uint32",
161
+ "name": "timestamp",
162
+ "type": "uint32"
163
+ }
164
+ ],
165
+ "name": "UpdatedOevProxyBeaconWithSignedData",
166
+ "type": "event"
167
+ },
168
+ {
169
+ "anonymous": false,
170
+ "inputs": [
171
+ {
172
+ "indexed": true,
173
+ "internalType": "address",
174
+ "name": "oevProxy",
175
+ "type": "address"
176
+ },
177
+ {
178
+ "indexed": false,
179
+ "internalType": "address",
180
+ "name": "oevBeneficiary",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "indexed": false,
185
+ "internalType": "uint256",
186
+ "name": "amount",
187
+ "type": "uint256"
188
+ }
189
+ ],
190
+ "name": "Withdrew",
191
+ "type": "event"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "DAPI_NAME_SETTER_ROLE_DESCRIPTION",
196
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "accessControlRegistry",
203
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
204
+ "stateMutability": "view",
205
+ "type": "function"
206
+ },
207
+ {
208
+ "inputs": [],
209
+ "name": "adminRole",
210
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [],
216
+ "name": "adminRoleDescription",
217
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
218
+ "stateMutability": "view",
219
+ "type": "function"
220
+ },
221
+ {
222
+ "inputs": [
223
+ { "internalType": "address", "name": "account", "type": "address" }
224
+ ],
225
+ "name": "containsBytecode",
226
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
227
+ "stateMutability": "view",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
232
+ "name": "dapiNameHashToDataFeedId",
233
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
234
+ "stateMutability": "view",
235
+ "type": "function"
236
+ },
237
+ {
238
+ "inputs": [],
239
+ "name": "dapiNameSetterRole",
240
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [
246
+ { "internalType": "bytes32", "name": "dapiName", "type": "bytes32" }
247
+ ],
248
+ "name": "dapiNameToDataFeedId",
249
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
250
+ "stateMutability": "view",
251
+ "type": "function"
252
+ },
253
+ {
254
+ "inputs": [
255
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" }
256
+ ],
257
+ "name": "dataFeeds",
258
+ "outputs": [
259
+ { "internalType": "int224", "name": "value", "type": "int224" },
260
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
261
+ ],
262
+ "stateMutability": "view",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "inputs": [
267
+ { "internalType": "address", "name": "account", "type": "address" }
268
+ ],
269
+ "name": "getBalance",
270
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
271
+ "stateMutability": "view",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "inputs": [],
276
+ "name": "getBlockBasefee",
277
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
278
+ "stateMutability": "view",
279
+ "type": "function"
280
+ },
281
+ {
282
+ "inputs": [],
283
+ "name": "getBlockNumber",
284
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
285
+ "stateMutability": "view",
286
+ "type": "function"
287
+ },
288
+ {
289
+ "inputs": [],
290
+ "name": "getBlockTimestamp",
291
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
292
+ "stateMutability": "view",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [],
297
+ "name": "getChainId",
298
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
299
+ "stateMutability": "view",
300
+ "type": "function"
301
+ },
302
+ {
303
+ "inputs": [],
304
+ "name": "manager",
305
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
306
+ "stateMutability": "view",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [
311
+ { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }
312
+ ],
313
+ "name": "multicall",
314
+ "outputs": [
315
+ { "internalType": "bytes[]", "name": "returndata", "type": "bytes[]" }
316
+ ],
317
+ "stateMutability": "nonpayable",
318
+ "type": "function"
319
+ },
320
+ {
321
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
322
+ "name": "oevProxyToBalance",
323
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ { "internalType": "address", "name": "proxy", "type": "address" },
330
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" }
331
+ ],
332
+ "name": "oevProxyToIdToDataFeed",
333
+ "outputs": [
334
+ { "internalType": "int224", "name": "value", "type": "int224" },
335
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
336
+ ],
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [
342
+ { "internalType": "bytes32", "name": "dapiNameHash", "type": "bytes32" }
343
+ ],
344
+ "name": "readDataFeedWithDapiNameHash",
345
+ "outputs": [
346
+ { "internalType": "int224", "name": "value", "type": "int224" },
347
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
348
+ ],
349
+ "stateMutability": "view",
350
+ "type": "function"
351
+ },
352
+ {
353
+ "inputs": [
354
+ { "internalType": "bytes32", "name": "dapiNameHash", "type": "bytes32" }
355
+ ],
356
+ "name": "readDataFeedWithDapiNameHashAsOevProxy",
357
+ "outputs": [
358
+ { "internalType": "int224", "name": "value", "type": "int224" },
359
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
360
+ ],
361
+ "stateMutability": "view",
362
+ "type": "function"
363
+ },
364
+ {
365
+ "inputs": [
366
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" }
367
+ ],
368
+ "name": "readDataFeedWithId",
369
+ "outputs": [
370
+ { "internalType": "int224", "name": "value", "type": "int224" },
371
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
372
+ ],
373
+ "stateMutability": "view",
374
+ "type": "function"
375
+ },
376
+ {
377
+ "inputs": [
378
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" }
379
+ ],
380
+ "name": "readDataFeedWithIdAsOevProxy",
381
+ "outputs": [
382
+ { "internalType": "int224", "name": "value", "type": "int224" },
383
+ { "internalType": "uint32", "name": "timestamp", "type": "uint32" }
384
+ ],
385
+ "stateMutability": "view",
386
+ "type": "function"
387
+ },
388
+ {
389
+ "inputs": [
390
+ { "internalType": "bytes32", "name": "dapiName", "type": "bytes32" },
391
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" }
392
+ ],
393
+ "name": "setDapiName",
394
+ "outputs": [],
395
+ "stateMutability": "nonpayable",
396
+ "type": "function"
397
+ },
398
+ {
399
+ "inputs": [
400
+ { "internalType": "bytes[]", "name": "data", "type": "bytes[]" }
401
+ ],
402
+ "name": "tryMulticall",
403
+ "outputs": [
404
+ { "internalType": "bool[]", "name": "successes", "type": "bool[]" },
405
+ { "internalType": "bytes[]", "name": "returndata", "type": "bytes[]" }
406
+ ],
407
+ "stateMutability": "nonpayable",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [
412
+ { "internalType": "bytes32[]", "name": "beaconIds", "type": "bytes32[]" }
413
+ ],
414
+ "name": "updateBeaconSetWithBeacons",
415
+ "outputs": [
416
+ { "internalType": "bytes32", "name": "beaconSetId", "type": "bytes32" }
417
+ ],
418
+ "stateMutability": "nonpayable",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [
423
+ { "internalType": "address", "name": "airnode", "type": "address" },
424
+ { "internalType": "bytes32", "name": "templateId", "type": "bytes32" },
425
+ { "internalType": "uint256", "name": "timestamp", "type": "uint256" },
426
+ { "internalType": "bytes", "name": "data", "type": "bytes" },
427
+ { "internalType": "bytes", "name": "signature", "type": "bytes" }
428
+ ],
429
+ "name": "updateBeaconWithSignedData",
430
+ "outputs": [
431
+ { "internalType": "bytes32", "name": "beaconId", "type": "bytes32" }
432
+ ],
433
+ "stateMutability": "nonpayable",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [
438
+ { "internalType": "address", "name": "oevProxy", "type": "address" },
439
+ { "internalType": "bytes32", "name": "dataFeedId", "type": "bytes32" },
440
+ { "internalType": "bytes32", "name": "updateId", "type": "bytes32" },
441
+ { "internalType": "uint256", "name": "timestamp", "type": "uint256" },
442
+ { "internalType": "bytes", "name": "data", "type": "bytes" },
443
+ {
444
+ "internalType": "bytes[]",
445
+ "name": "packedOevUpdateSignatures",
446
+ "type": "bytes[]"
447
+ }
448
+ ],
449
+ "name": "updateOevProxyDataFeedWithSignedData",
450
+ "outputs": [],
451
+ "stateMutability": "payable",
452
+ "type": "function"
453
+ },
454
+ {
455
+ "inputs": [
456
+ { "internalType": "address", "name": "oevProxy", "type": "address" }
457
+ ],
458
+ "name": "withdraw",
459
+ "outputs": [],
460
+ "stateMutability": "nonpayable",
461
+ "type": "function"
462
+ }
463
+ ]
@@ -0,0 +1,70 @@
1
+ [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": false,
7
+ "internalType": "address",
8
+ "name": "token",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "indexed": false,
13
+ "internalType": "uint256",
14
+ "name": "price",
15
+ "type": "uint256"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "address",
20
+ "name": "priceFeed",
21
+ "type": "address"
22
+ }
23
+ ],
24
+ "name": "PriceUpdate",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "inputs": [
29
+ { "internalType": "address", "name": "_token", "type": "address" },
30
+ { "internalType": "uint256", "name": "_price", "type": "uint256" }
31
+ ],
32
+ "name": "emitPriceEvent",
33
+ "outputs": [],
34
+ "stateMutability": "nonpayable",
35
+ "type": "function"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "gov",
40
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
41
+ "stateMutability": "view",
42
+ "type": "function"
43
+ },
44
+ {
45
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
46
+ "name": "isPriceFeed",
47
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
48
+ "stateMutability": "view",
49
+ "type": "function"
50
+ },
51
+ {
52
+ "inputs": [
53
+ { "internalType": "address", "name": "_gov", "type": "address" }
54
+ ],
55
+ "name": "setGov",
56
+ "outputs": [],
57
+ "stateMutability": "nonpayable",
58
+ "type": "function"
59
+ },
60
+ {
61
+ "inputs": [
62
+ { "internalType": "address", "name": "_priceFeed", "type": "address" },
63
+ { "internalType": "bool", "name": "_isPriceFeed", "type": "bool" }
64
+ ],
65
+ "name": "setIsPriceFeed",
66
+ "outputs": [],
67
+ "stateMutability": "nonpayable",
68
+ "type": "function"
69
+ }
70
+ ]