@bronlabs/intents-sdk 1.0.109 → 1.0.110
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/abi/OracleAggregator.json +166 -31
- package/dist/contracts.d.ts +25 -2
- package/dist/contracts.js.map +1 -1
- package/package.json +1 -1
|
@@ -186,6 +186,19 @@
|
|
|
186
186
|
"name": "OwnershipTransferred",
|
|
187
187
|
"type": "event"
|
|
188
188
|
},
|
|
189
|
+
{
|
|
190
|
+
"inputs": [],
|
|
191
|
+
"name": "bronTreasury",
|
|
192
|
+
"outputs": [
|
|
193
|
+
{
|
|
194
|
+
"internalType": "address",
|
|
195
|
+
"name": "",
|
|
196
|
+
"type": "address"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"stateMutability": "view",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
189
202
|
{
|
|
190
203
|
"inputs": [
|
|
191
204
|
{
|
|
@@ -259,29 +272,24 @@
|
|
|
259
272
|
"internalType": "string",
|
|
260
273
|
"name": "_orderId",
|
|
261
274
|
"type": "string"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"internalType": "bool",
|
|
278
|
+
"name": "_isUserTx",
|
|
279
|
+
"type": "bool"
|
|
262
280
|
}
|
|
263
281
|
],
|
|
264
|
-
"name": "
|
|
282
|
+
"name": "getActualRoundQuorumVoters",
|
|
265
283
|
"outputs": [
|
|
266
284
|
{
|
|
267
|
-
"internalType": "
|
|
268
|
-
"name": "",
|
|
269
|
-
"type": "uint256"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"internalType": "uint256",
|
|
273
|
-
"name": "",
|
|
274
|
-
"type": "uint256"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"internalType": "uint256",
|
|
285
|
+
"internalType": "address[]",
|
|
278
286
|
"name": "",
|
|
279
|
-
"type": "
|
|
287
|
+
"type": "address[]"
|
|
280
288
|
},
|
|
281
289
|
{
|
|
282
|
-
"internalType": "
|
|
290
|
+
"internalType": "address[]",
|
|
283
291
|
"name": "",
|
|
284
|
-
"type": "
|
|
292
|
+
"type": "address[]"
|
|
285
293
|
}
|
|
286
294
|
],
|
|
287
295
|
"stateMutability": "view",
|
|
@@ -312,34 +320,52 @@
|
|
|
312
320
|
"internalType": "string",
|
|
313
321
|
"name": "_orderId",
|
|
314
322
|
"type": "string"
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
"internalType": "uint256",
|
|
318
|
-
"name": "_roundId",
|
|
319
|
-
"type": "uint256"
|
|
320
323
|
}
|
|
321
324
|
],
|
|
322
|
-
"name": "
|
|
325
|
+
"name": "getOracleConsensusRoundId",
|
|
323
326
|
"outputs": [
|
|
324
327
|
{
|
|
325
328
|
"internalType": "uint256",
|
|
326
329
|
"name": "",
|
|
327
330
|
"type": "uint256"
|
|
328
|
-
}
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"stateMutability": "view",
|
|
334
|
+
"type": "function"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"inputs": [
|
|
329
338
|
{
|
|
330
|
-
"internalType": "
|
|
331
|
-
"name": "",
|
|
332
|
-
"type": "
|
|
333
|
-
}
|
|
339
|
+
"internalType": "string",
|
|
340
|
+
"name": "_orderId",
|
|
341
|
+
"type": "string"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
"name": "getOracleConsensusYesVotesCount",
|
|
345
|
+
"outputs": [
|
|
334
346
|
{
|
|
335
347
|
"internalType": "uint256",
|
|
336
348
|
"name": "",
|
|
337
349
|
"type": "uint256"
|
|
338
|
-
}
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"stateMutability": "view",
|
|
353
|
+
"type": "function"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"inputs": [
|
|
339
357
|
{
|
|
340
|
-
"internalType": "
|
|
358
|
+
"internalType": "address",
|
|
359
|
+
"name": "_oracle",
|
|
360
|
+
"type": "address"
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
"name": "getOracleCooldownNetworks",
|
|
364
|
+
"outputs": [
|
|
365
|
+
{
|
|
366
|
+
"internalType": "string[]",
|
|
341
367
|
"name": "",
|
|
342
|
-
"type": "
|
|
368
|
+
"type": "string[]"
|
|
343
369
|
}
|
|
344
370
|
],
|
|
345
371
|
"stateMutability": "view",
|
|
@@ -364,6 +390,83 @@
|
|
|
364
390
|
"stateMutability": "view",
|
|
365
391
|
"type": "function"
|
|
366
392
|
},
|
|
393
|
+
{
|
|
394
|
+
"inputs": [
|
|
395
|
+
{
|
|
396
|
+
"internalType": "string",
|
|
397
|
+
"name": "_orderId",
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"internalType": "address",
|
|
402
|
+
"name": "_oracle",
|
|
403
|
+
"type": "address"
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"name": "getOracleYesVotes",
|
|
407
|
+
"outputs": [
|
|
408
|
+
{
|
|
409
|
+
"internalType": "uint256",
|
|
410
|
+
"name": "",
|
|
411
|
+
"type": "uint256"
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"stateMutability": "view",
|
|
415
|
+
"type": "function"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"inputs": [
|
|
419
|
+
{
|
|
420
|
+
"internalType": "string",
|
|
421
|
+
"name": "_orderId",
|
|
422
|
+
"type": "string"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"name": "getParticipatingOraclesYesVotes",
|
|
426
|
+
"outputs": [
|
|
427
|
+
{
|
|
428
|
+
"internalType": "address[]",
|
|
429
|
+
"name": "",
|
|
430
|
+
"type": "address[]"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"stateMutability": "view",
|
|
434
|
+
"type": "function"
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"inputs": [
|
|
438
|
+
{
|
|
439
|
+
"internalType": "string",
|
|
440
|
+
"name": "_orderId",
|
|
441
|
+
"type": "string"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"internalType": "uint256",
|
|
445
|
+
"name": "_roundId",
|
|
446
|
+
"type": "uint256"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"internalType": "bool",
|
|
450
|
+
"name": "_isUserTx",
|
|
451
|
+
"type": "bool"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"name": "getQuorumVoters",
|
|
455
|
+
"outputs": [
|
|
456
|
+
{
|
|
457
|
+
"internalType": "address[]",
|
|
458
|
+
"name": "",
|
|
459
|
+
"type": "address[]"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"internalType": "address[]",
|
|
463
|
+
"name": "",
|
|
464
|
+
"type": "address[]"
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
"stateMutability": "view",
|
|
468
|
+
"type": "function"
|
|
469
|
+
},
|
|
367
470
|
{
|
|
368
471
|
"inputs": [
|
|
369
472
|
{
|
|
@@ -471,6 +574,25 @@
|
|
|
471
574
|
"stateMutability": "view",
|
|
472
575
|
"type": "function"
|
|
473
576
|
},
|
|
577
|
+
{
|
|
578
|
+
"inputs": [
|
|
579
|
+
{
|
|
580
|
+
"internalType": "string",
|
|
581
|
+
"name": "",
|
|
582
|
+
"type": "string"
|
|
583
|
+
}
|
|
584
|
+
],
|
|
585
|
+
"name": "networkActiveCooldownCount",
|
|
586
|
+
"outputs": [
|
|
587
|
+
{
|
|
588
|
+
"internalType": "uint256",
|
|
589
|
+
"name": "",
|
|
590
|
+
"type": "uint256"
|
|
591
|
+
}
|
|
592
|
+
],
|
|
593
|
+
"stateMutability": "view",
|
|
594
|
+
"type": "function"
|
|
595
|
+
},
|
|
474
596
|
{
|
|
475
597
|
"inputs": [],
|
|
476
598
|
"name": "networkManager",
|
|
@@ -765,7 +887,7 @@
|
|
|
765
887
|
"type": "string"
|
|
766
888
|
}
|
|
767
889
|
],
|
|
768
|
-
"name": "
|
|
890
|
+
"name": "resetOracleConsensus",
|
|
769
891
|
"outputs": [],
|
|
770
892
|
"stateMutability": "nonpayable",
|
|
771
893
|
"type": "function"
|
|
@@ -783,6 +905,19 @@
|
|
|
783
905
|
"stateMutability": "nonpayable",
|
|
784
906
|
"type": "function"
|
|
785
907
|
},
|
|
908
|
+
{
|
|
909
|
+
"inputs": [
|
|
910
|
+
{
|
|
911
|
+
"internalType": "address",
|
|
912
|
+
"name": "_bronTreasury",
|
|
913
|
+
"type": "address"
|
|
914
|
+
}
|
|
915
|
+
],
|
|
916
|
+
"name": "setTreasury",
|
|
917
|
+
"outputs": [],
|
|
918
|
+
"stateMutability": "nonpayable",
|
|
919
|
+
"type": "function"
|
|
920
|
+
},
|
|
786
921
|
{
|
|
787
922
|
"inputs": [
|
|
788
923
|
{
|
|
@@ -879,4 +1014,4 @@
|
|
|
879
1014
|
"stateMutability": "view",
|
|
880
1015
|
"type": "function"
|
|
881
1016
|
}
|
|
882
|
-
]
|
|
1017
|
+
]
|
package/dist/contracts.d.ts
CHANGED
|
@@ -78,8 +78,31 @@ export interface OracleAggregatorContract {
|
|
|
78
78
|
oracleConfirmUserTx(orderId: string, isConfirmed: boolean, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
79
79
|
oracleConfirmSolverTx(orderId: string, isConfirmed: boolean, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
80
80
|
getOracleSubscribedNetworks(oracle: string): Promise<string[]>;
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
getOracleCooldownNetworks(oracle: string): Promise<string[]>;
|
|
82
|
+
getOracleYesVotes(orderId: string, oracle: string): Promise<bigint>;
|
|
83
|
+
getParticipatingOraclesYesVotes(orderId: string): Promise<string[]>;
|
|
84
|
+
getOracleConsensusRoundId(orderId: string): Promise<bigint>;
|
|
85
|
+
getOracleConsensusYesVotesCount(orderId: string): Promise<bigint>;
|
|
86
|
+
getActualRoundQuorumVoters(orderId: string, isUserTx: boolean): Promise<[string[], string[]]>;
|
|
87
|
+
getQuorumVoters(orderId: string, roundId: bigint, isUserTx: boolean): Promise<[string[], string[]]>;
|
|
88
|
+
getEffectiveOraclesCount(networkId: string): Promise<bigint>;
|
|
89
|
+
subscribeToNetwork(networkId: string, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
90
|
+
unsubscribeFromNetwork(networkId: string, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
91
|
+
registerOracle(params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
92
|
+
reconcileOracleConsensus(orderId: string, isUserTx: boolean, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
93
|
+
claimOracleCollectedFees(feeToken: string, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
94
|
+
cleanupExpiredNetworkCooldown(oracle: string, networkId: string, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
95
|
+
setTreasury(bronTreasury: string, params?: NetworkParams): Promise<ethers.ContractTransactionResponse>;
|
|
96
|
+
oraclesCount(): Promise<bigint>;
|
|
97
|
+
networkOraclesCount(networkId: string): Promise<bigint>;
|
|
98
|
+
networkActiveCooldownCount(networkId: string): Promise<bigint>;
|
|
99
|
+
oracleCollectedFees(oracle: string, feeToken: string): Promise<bigint>;
|
|
100
|
+
oracleNetworkCooldownEndTime(networkId: string, oracle: string): Promise<bigint>;
|
|
101
|
+
oracleNetworkSubscription(networkId: string, oracle: string): Promise<boolean>;
|
|
102
|
+
oracleWrongDecisionCooldownEndTime(oracle: string): Promise<bigint>;
|
|
103
|
+
wrongOracleDecisionCooldown(): Promise<bigint>;
|
|
104
|
+
isOracleVotedInActualRound(orderId: string, oracle: string, isUserTx: boolean): Promise<boolean>;
|
|
105
|
+
isOracleVotedInRoundId(orderId: string, oracle: string, isUserTx: boolean, roundId: bigint): Promise<boolean>;
|
|
83
106
|
}
|
|
84
107
|
export declare function initOrderEngine(orderEngineAddress: string, provider: ethers.JsonRpcProvider | ethers.Signer): OrderEngineContract & ethers.Contract;
|
|
85
108
|
export declare function initOracleAggregator(oracleAggregatorAddress: string, provider: ethers.JsonRpcProvider | ethers.Signer): OracleAggregatorContract & ethers.Contract;
|
package/dist/contracts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,CAAN,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,uDAAS,CAAA;IACT,iEAAc,CAAA;IACd,2EAAmB,CAAA;IACnB,qEAAgB,CAAA;IAChB,mGAA+B,CAAA;IAC/B,yEAAkB,CAAA;IAClB,uGAAiC,CAAA;IACjC,uDAAS,CAAA;IACT,yDAAU,CAAA;IACV,uDAAS,CAAA;AACX,CAAC,EAXW,WAAW,KAAX,WAAW,QAWtB;
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,MAAM,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