genlayer-js 0.9.1 → 0.9.3

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/index.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  chains_exports,
3
3
  localnet,
4
- testnet
5
- } from "./chunk-7YZQQWJZ.js";
4
+ testnetAsimov
5
+ } from "./chunk-4FVQ3G7J.js";
6
6
  import {
7
7
  CalldataAddress,
8
8
  transactionResultNumberToName,
9
9
  transactionsStatusNameToNumber,
10
10
  transactionsStatusNumberToName,
11
11
  voteTypeNumberToName
12
- } from "./chunk-RS7NCSOQ.js";
12
+ } from "./chunk-GACCNOPJ.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-MLKGABMK.js";
@@ -429,7 +429,29 @@ var contractActions = (client, publicClient) => {
429
429
  return schema;
430
430
  },
431
431
  readContract: async (args) => {
432
- const { account, address, functionName, args: callArgs, kwargs, leaderOnly = false } = args;
432
+ const {
433
+ account,
434
+ address,
435
+ functionName,
436
+ args: callArgs,
437
+ kwargs,
438
+ leaderOnly = false,
439
+ transactionHashVariant = "latest-final" /* LATEST_FINAL */
440
+ } = args;
441
+ if (client.chain.id === localnet.id) {
442
+ return _localnetReadContract({
443
+ client,
444
+ args: {
445
+ account,
446
+ address,
447
+ functionName,
448
+ args: callArgs,
449
+ kwargs,
450
+ stateStatus: transactionHashVariant === "latest-final" /* LATEST_FINAL */ ? "FINALIZED" /* FINALIZED */ : "ACCEPTED" /* ACCEPTED */,
451
+ rawReturn: args.rawReturn ?? false
452
+ }
453
+ });
454
+ }
433
455
  const encodedData = [encode(makeCalldataObject(functionName, callArgs, kwargs)), leaderOnly];
434
456
  const serializedData = serialize(encodedData);
435
457
  const senderAddress = account?.address ?? client.account?.address;
@@ -438,7 +460,7 @@ var contractActions = (client, publicClient) => {
438
460
  to: address,
439
461
  from: senderAddress,
440
462
  data: serializedData,
441
- transaction_hash_variant: "latest-final"
463
+ transaction_hash_variant: transactionHashVariant
442
464
  };
443
465
  const result = await client.request({
444
466
  method: "gen_call",
@@ -500,6 +522,36 @@ var contractActions = (client, publicClient) => {
500
522
  }
501
523
  };
502
524
  };
525
+ var _localnetReadContract = async ({
526
+ client,
527
+ args
528
+ }) => {
529
+ const {
530
+ account,
531
+ address,
532
+ functionName,
533
+ args: callArgs,
534
+ kwargs,
535
+ stateStatus = "ACCEPTED" /* ACCEPTED */
536
+ } = args;
537
+ const encodedData = encode(makeCalldataObject(functionName, callArgs, kwargs));
538
+ const serializedData = serializeOne(encodedData);
539
+ const senderAddress = account?.address ?? client.account?.address;
540
+ const requestParams = {
541
+ to: address,
542
+ from: senderAddress,
543
+ data: serializedData
544
+ };
545
+ const result = await client.request({
546
+ method: "eth_call",
547
+ params: [requestParams, stateStatus == "FINALIZED" /* FINALIZED */ ? "finalized" : "latest"]
548
+ });
549
+ if (args.rawReturn) {
550
+ return result;
551
+ }
552
+ const resultBinary = fromHex(result, "bytes");
553
+ return decode(resultBinary);
554
+ };
503
555
  var _sendTransaction = async ({
504
556
  client,
505
557
  publicClient,
@@ -554,6 +606,9 @@ var _sendTransaction = async ({
554
606
  }
555
607
  const serializedTransaction = await senderAccount.signTransaction(transactionRequest);
556
608
  const txHash = await client.sendRawTransaction({ serializedTransaction });
609
+ if (client.chain.id === localnet.id) {
610
+ return txHash;
611
+ }
557
612
  const receipt = await publicClient.waitForTransactionReceipt({ hash: txHash });
558
613
  if (receipt.status === "reverted") {
559
614
  throw new Error("Transaction reverted");
@@ -667,6 +722,13 @@ var receiptActions = (client, publicClient) => ({
667
722
  });
668
723
  var transactionActions = (client, publicClient) => ({
669
724
  getTransaction: async ({ hash }) => {
725
+ if (client.chain.id === localnet.id) {
726
+ const transaction2 = await client.getTransaction({ hash });
727
+ const localnetStatus = transaction2.status === "ACTIVATED" ? "PENDING" /* PENDING */ : transaction2.status;
728
+ transaction2.status = Number(transactionsStatusNameToNumber[localnetStatus]);
729
+ transaction2.statusName = localnetStatus;
730
+ return _decodeLocalnetTransaction(transaction2);
731
+ }
670
732
  const transaction = await publicClient.readContract({
671
733
  address: client.chain.consensusDataContract?.address,
672
734
  abi: client.chain.consensusDataContract?.abi,
@@ -755,13 +817,14 @@ var _decodeTransaction = (tx) => {
755
817
  return decodedTx;
756
818
  };
757
819
  var _decodeLocalnetTransaction = (tx) => {
820
+ if (!tx.data) return tx;
758
821
  try {
759
822
  const leaderReceipt = tx.consensus_data?.leader_receipt;
760
823
  if (leaderReceipt) {
761
- if (leaderReceipt.result) {
824
+ if (leaderReceipt.result && typeof leaderReceipt.result === "string") {
762
825
  leaderReceipt.result = resultToUserFriendlyJson(leaderReceipt.result);
763
826
  }
764
- if (leaderReceipt.calldata) {
827
+ if (leaderReceipt.calldata && typeof leaderReceipt.calldata === "string") {
765
828
  leaderReceipt.calldata = {
766
829
  base64: leaderReceipt.calldata,
767
830
  ...calldataToUserFriendlyJson(b64ToArray(leaderReceipt.calldata))
@@ -776,7 +839,7 @@ var _decodeLocalnetTransaction = (tx) => {
776
839
  );
777
840
  }
778
841
  }
779
- if (tx.data?.calldata) {
842
+ if (tx.data?.calldata && typeof tx.data.calldata === "string") {
780
843
  tx.data.calldata = {
781
844
  base64: tx.data.calldata,
782
845
  ...calldataToUserFriendlyJson(b64ToArray(tx.data.calldata))
@@ -788,21 +851,4035 @@ var _decodeLocalnetTransaction = (tx) => {
788
851
  return tx;
789
852
  };
790
853
 
791
- // src/config/snapID.ts
792
- var snapID = {
793
- local: "local:http://localhost:8081",
794
- npm: "npm:genlayer-wallet-plugin"
795
- };
796
-
797
- // src/wallet/connect.ts
798
- var networks = {
799
- localnet
854
+ // src/chains/studionet.ts
855
+ import { defineChain } from "viem";
856
+ var SIMULATOR_JSON_RPC_URL = "https://studio.genlayer.com/api";
857
+ var EXPLORER_URL = "https://genlayer-explorer.vercel.app";
858
+ var CONSENSUS_MAIN_CONTRACT = {
859
+ address: "0xb7278A61aa25c888815aFC32Ad3cC52fF24fE575",
860
+ abi: [
861
+ {
862
+ inputs: [],
863
+ name: "AccessControlBadConfirmation",
864
+ type: "error"
865
+ },
866
+ {
867
+ inputs: [
868
+ {
869
+ internalType: "address",
870
+ name: "account",
871
+ type: "address"
872
+ },
873
+ {
874
+ internalType: "bytes32",
875
+ name: "neededRole",
876
+ type: "bytes32"
877
+ }
878
+ ],
879
+ name: "AccessControlUnauthorizedAccount",
880
+ type: "error"
881
+ },
882
+ {
883
+ inputs: [],
884
+ name: "CallerNotMessages",
885
+ type: "error"
886
+ },
887
+ {
888
+ inputs: [],
889
+ name: "CanNotAppeal",
890
+ type: "error"
891
+ },
892
+ {
893
+ inputs: [],
894
+ name: "EmptyTransaction",
895
+ type: "error"
896
+ },
897
+ {
898
+ inputs: [],
899
+ name: "FinalizationNotAllowed",
900
+ type: "error"
901
+ },
902
+ {
903
+ inputs: [],
904
+ name: "InvalidAddress",
905
+ type: "error"
906
+ },
907
+ {
908
+ inputs: [],
909
+ name: "InvalidGhostContract",
910
+ type: "error"
911
+ },
912
+ {
913
+ inputs: [],
914
+ name: "InvalidInitialization",
915
+ type: "error"
916
+ },
917
+ {
918
+ inputs: [],
919
+ name: "InvalidVote",
920
+ type: "error"
921
+ },
922
+ {
923
+ inputs: [],
924
+ name: "MaxNumOfIterationsInPendingQueueReached",
925
+ type: "error"
926
+ },
927
+ {
928
+ inputs: [
929
+ {
930
+ internalType: "uint256",
931
+ name: "numOfMessages",
932
+ type: "uint256"
933
+ },
934
+ {
935
+ internalType: "uint256",
936
+ name: "maxAllocatedMessages",
937
+ type: "uint256"
938
+ }
939
+ ],
940
+ name: "MaxNumOfMessagesExceeded",
941
+ type: "error"
942
+ },
943
+ {
944
+ inputs: [],
945
+ name: "NonGenVMContract",
946
+ type: "error"
947
+ },
948
+ {
949
+ inputs: [],
950
+ name: "NotInitializing",
951
+ type: "error"
952
+ },
953
+ {
954
+ inputs: [
955
+ {
956
+ internalType: "address",
957
+ name: "owner",
958
+ type: "address"
959
+ }
960
+ ],
961
+ name: "OwnableInvalidOwner",
962
+ type: "error"
963
+ },
964
+ {
965
+ inputs: [
966
+ {
967
+ internalType: "address",
968
+ name: "account",
969
+ type: "address"
970
+ }
971
+ ],
972
+ name: "OwnableUnauthorizedAccount",
973
+ type: "error"
974
+ },
975
+ {
976
+ inputs: [],
977
+ name: "ReentrancyGuardReentrantCall",
978
+ type: "error"
979
+ },
980
+ {
981
+ inputs: [],
982
+ name: "TransactionNotAtPendingQueueHead",
983
+ type: "error"
984
+ },
985
+ {
986
+ anonymous: false,
987
+ inputs: [
988
+ {
989
+ indexed: true,
990
+ internalType: "bytes32",
991
+ name: "txId",
992
+ type: "bytes32"
993
+ },
994
+ {
995
+ indexed: true,
996
+ internalType: "address",
997
+ name: "appealer",
998
+ type: "address"
999
+ },
1000
+ {
1001
+ indexed: false,
1002
+ internalType: "uint256",
1003
+ name: "appealBond",
1004
+ type: "uint256"
1005
+ },
1006
+ {
1007
+ indexed: false,
1008
+ internalType: "address[]",
1009
+ name: "appealValidators",
1010
+ type: "address[]"
1011
+ }
1012
+ ],
1013
+ name: "AppealStarted",
1014
+ type: "event"
1015
+ },
1016
+ {
1017
+ anonymous: false,
1018
+ inputs: [
1019
+ {
1020
+ indexed: true,
1021
+ internalType: "bytes32",
1022
+ name: "txId",
1023
+ type: "bytes32"
1024
+ },
1025
+ {
1026
+ indexed: true,
1027
+ internalType: "address",
1028
+ name: "recipient",
1029
+ type: "address"
1030
+ },
1031
+ {
1032
+ indexed: false,
1033
+ internalType: "bytes",
1034
+ name: "data",
1035
+ type: "bytes"
1036
+ }
1037
+ ],
1038
+ name: "ErrorMessage",
1039
+ type: "event"
1040
+ },
1041
+ {
1042
+ anonymous: false,
1043
+ inputs: [
1044
+ {
1045
+ indexed: false,
1046
+ internalType: "address",
1047
+ name: "ghostFactory",
1048
+ type: "address"
1049
+ },
1050
+ {
1051
+ indexed: false,
1052
+ internalType: "address",
1053
+ name: "genManager",
1054
+ type: "address"
1055
+ },
1056
+ {
1057
+ indexed: false,
1058
+ internalType: "address",
1059
+ name: "genTransactions",
1060
+ type: "address"
1061
+ },
1062
+ {
1063
+ indexed: false,
1064
+ internalType: "address",
1065
+ name: "genQueue",
1066
+ type: "address"
1067
+ },
1068
+ {
1069
+ indexed: false,
1070
+ internalType: "address",
1071
+ name: "genStaking",
1072
+ type: "address"
1073
+ },
1074
+ {
1075
+ indexed: false,
1076
+ internalType: "address",
1077
+ name: "genMessages",
1078
+ type: "address"
1079
+ },
1080
+ {
1081
+ indexed: false,
1082
+ internalType: "address",
1083
+ name: "idleness",
1084
+ type: "address"
1085
+ },
1086
+ {
1087
+ indexed: false,
1088
+ internalType: "address",
1089
+ name: "tribunalAppeal",
1090
+ type: "address"
1091
+ }
1092
+ ],
1093
+ name: "ExternalContractsSet",
1094
+ type: "event"
1095
+ },
1096
+ {
1097
+ anonymous: false,
1098
+ inputs: [
1099
+ {
1100
+ indexed: false,
1101
+ internalType: "uint64",
1102
+ name: "version",
1103
+ type: "uint64"
1104
+ }
1105
+ ],
1106
+ name: "Initialized",
1107
+ type: "event"
1108
+ },
1109
+ {
1110
+ anonymous: false,
1111
+ inputs: [
1112
+ {
1113
+ indexed: true,
1114
+ internalType: "bytes32",
1115
+ name: "txId",
1116
+ type: "bytes32"
1117
+ },
1118
+ {
1119
+ indexed: true,
1120
+ internalType: "address",
1121
+ name: "recipient",
1122
+ type: "address"
1123
+ },
1124
+ {
1125
+ indexed: true,
1126
+ internalType: "address",
1127
+ name: "activator",
1128
+ type: "address"
1129
+ }
1130
+ ],
1131
+ name: "InternalMessageProcessed",
1132
+ type: "event"
1133
+ },
1134
+ {
1135
+ anonymous: false,
1136
+ inputs: [
1137
+ {
1138
+ indexed: true,
1139
+ internalType: "bytes32",
1140
+ name: "txId",
1141
+ type: "bytes32"
1142
+ },
1143
+ {
1144
+ indexed: true,
1145
+ internalType: "address",
1146
+ name: "recipient",
1147
+ type: "address"
1148
+ },
1149
+ {
1150
+ indexed: true,
1151
+ internalType: "address",
1152
+ name: "activator",
1153
+ type: "address"
1154
+ }
1155
+ ],
1156
+ name: "NewTransaction",
1157
+ type: "event"
1158
+ },
1159
+ {
1160
+ anonymous: false,
1161
+ inputs: [
1162
+ {
1163
+ indexed: true,
1164
+ internalType: "address",
1165
+ name: "previousOwner",
1166
+ type: "address"
1167
+ },
1168
+ {
1169
+ indexed: true,
1170
+ internalType: "address",
1171
+ name: "newOwner",
1172
+ type: "address"
1173
+ }
1174
+ ],
1175
+ name: "OwnershipTransferStarted",
1176
+ type: "event"
1177
+ },
1178
+ {
1179
+ anonymous: false,
1180
+ inputs: [
1181
+ {
1182
+ indexed: true,
1183
+ internalType: "address",
1184
+ name: "previousOwner",
1185
+ type: "address"
1186
+ },
1187
+ {
1188
+ indexed: true,
1189
+ internalType: "address",
1190
+ name: "newOwner",
1191
+ type: "address"
1192
+ }
1193
+ ],
1194
+ name: "OwnershipTransferred",
1195
+ type: "event"
1196
+ },
1197
+ {
1198
+ anonymous: false,
1199
+ inputs: [
1200
+ {
1201
+ indexed: true,
1202
+ internalType: "bytes32",
1203
+ name: "role",
1204
+ type: "bytes32"
1205
+ },
1206
+ {
1207
+ indexed: true,
1208
+ internalType: "bytes32",
1209
+ name: "previousAdminRole",
1210
+ type: "bytes32"
1211
+ },
1212
+ {
1213
+ indexed: true,
1214
+ internalType: "bytes32",
1215
+ name: "newAdminRole",
1216
+ type: "bytes32"
1217
+ }
1218
+ ],
1219
+ name: "RoleAdminChanged",
1220
+ type: "event"
1221
+ },
1222
+ {
1223
+ anonymous: false,
1224
+ inputs: [
1225
+ {
1226
+ indexed: true,
1227
+ internalType: "bytes32",
1228
+ name: "role",
1229
+ type: "bytes32"
1230
+ },
1231
+ {
1232
+ indexed: true,
1233
+ internalType: "address",
1234
+ name: "account",
1235
+ type: "address"
1236
+ },
1237
+ {
1238
+ indexed: true,
1239
+ internalType: "address",
1240
+ name: "sender",
1241
+ type: "address"
1242
+ }
1243
+ ],
1244
+ name: "RoleGranted",
1245
+ type: "event"
1246
+ },
1247
+ {
1248
+ anonymous: false,
1249
+ inputs: [
1250
+ {
1251
+ indexed: true,
1252
+ internalType: "bytes32",
1253
+ name: "role",
1254
+ type: "bytes32"
1255
+ },
1256
+ {
1257
+ indexed: true,
1258
+ internalType: "address",
1259
+ name: "account",
1260
+ type: "address"
1261
+ },
1262
+ {
1263
+ indexed: true,
1264
+ internalType: "address",
1265
+ name: "sender",
1266
+ type: "address"
1267
+ }
1268
+ ],
1269
+ name: "RoleRevoked",
1270
+ type: "event"
1271
+ },
1272
+ {
1273
+ anonymous: false,
1274
+ inputs: [
1275
+ {
1276
+ indexed: true,
1277
+ internalType: "bytes32",
1278
+ name: "txId",
1279
+ type: "bytes32"
1280
+ },
1281
+ {
1282
+ indexed: true,
1283
+ internalType: "address",
1284
+ name: "sender",
1285
+ type: "address"
1286
+ }
1287
+ ],
1288
+ name: "SlashAppealSubmitted",
1289
+ type: "event"
1290
+ },
1291
+ {
1292
+ anonymous: false,
1293
+ inputs: [
1294
+ {
1295
+ indexed: true,
1296
+ internalType: "bytes32",
1297
+ name: "tx_id",
1298
+ type: "bytes32"
1299
+ }
1300
+ ],
1301
+ name: "TransactionAccepted",
1302
+ type: "event"
1303
+ },
1304
+ {
1305
+ anonymous: false,
1306
+ inputs: [
1307
+ {
1308
+ indexed: true,
1309
+ internalType: "bytes32",
1310
+ name: "txId",
1311
+ type: "bytes32"
1312
+ },
1313
+ {
1314
+ indexed: true,
1315
+ internalType: "address",
1316
+ name: "leader",
1317
+ type: "address"
1318
+ }
1319
+ ],
1320
+ name: "TransactionActivated",
1321
+ type: "event"
1322
+ },
1323
+ {
1324
+ anonymous: false,
1325
+ inputs: [
1326
+ {
1327
+ indexed: true,
1328
+ internalType: "uint256",
1329
+ name: "batchId",
1330
+ type: "uint256"
1331
+ },
1332
+ {
1333
+ indexed: false,
1334
+ internalType: "address[]",
1335
+ name: "validators",
1336
+ type: "address[]"
1337
+ }
1338
+ ],
1339
+ name: "TransactionActivatedValidators",
1340
+ type: "event"
1341
+ },
1342
+ {
1343
+ anonymous: false,
1344
+ inputs: [
1345
+ {
1346
+ indexed: true,
1347
+ internalType: "bytes32",
1348
+ name: "txId",
1349
+ type: "bytes32"
1350
+ },
1351
+ {
1352
+ indexed: true,
1353
+ internalType: "address",
1354
+ name: "sender",
1355
+ type: "address"
1356
+ }
1357
+ ],
1358
+ name: "TransactionCancelled",
1359
+ type: "event"
1360
+ },
1361
+ {
1362
+ anonymous: false,
1363
+ inputs: [
1364
+ {
1365
+ indexed: true,
1366
+ internalType: "bytes32",
1367
+ name: "tx_id",
1368
+ type: "bytes32"
1369
+ }
1370
+ ],
1371
+ name: "TransactionFinalized",
1372
+ type: "event"
1373
+ },
1374
+ {
1375
+ anonymous: false,
1376
+ inputs: [
1377
+ {
1378
+ indexed: true,
1379
+ internalType: "bytes32",
1380
+ name: "txId",
1381
+ type: "bytes32"
1382
+ },
1383
+ {
1384
+ indexed: true,
1385
+ internalType: "address",
1386
+ name: "oldValidator",
1387
+ type: "address"
1388
+ },
1389
+ {
1390
+ indexed: true,
1391
+ internalType: "address",
1392
+ name: "newValidator",
1393
+ type: "address"
1394
+ }
1395
+ ],
1396
+ name: "TransactionIdleValidatorReplaced",
1397
+ type: "event"
1398
+ },
1399
+ {
1400
+ anonymous: false,
1401
+ inputs: [
1402
+ {
1403
+ indexed: true,
1404
+ internalType: "bytes32",
1405
+ name: "txId",
1406
+ type: "bytes32"
1407
+ },
1408
+ {
1409
+ indexed: true,
1410
+ internalType: "uint256",
1411
+ name: "validatorIndex",
1412
+ type: "uint256"
1413
+ }
1414
+ ],
1415
+ name: "TransactionIdleValidatorReplacementFailed",
1416
+ type: "event"
1417
+ },
1418
+ {
1419
+ anonymous: false,
1420
+ inputs: [
1421
+ {
1422
+ indexed: true,
1423
+ internalType: "bytes32",
1424
+ name: "txId",
1425
+ type: "bytes32"
1426
+ },
1427
+ {
1428
+ indexed: true,
1429
+ internalType: "address",
1430
+ name: "newLeader",
1431
+ type: "address"
1432
+ }
1433
+ ],
1434
+ name: "TransactionLeaderRotated",
1435
+ type: "event"
1436
+ },
1437
+ {
1438
+ anonymous: false,
1439
+ inputs: [
1440
+ {
1441
+ indexed: true,
1442
+ internalType: "bytes32",
1443
+ name: "tx_id",
1444
+ type: "bytes32"
1445
+ }
1446
+ ],
1447
+ name: "TransactionLeaderTimeout",
1448
+ type: "event"
1449
+ },
1450
+ {
1451
+ anonymous: false,
1452
+ inputs: [
1453
+ {
1454
+ indexed: false,
1455
+ internalType: "bytes32[]",
1456
+ name: "tx_ids",
1457
+ type: "bytes32[]"
1458
+ }
1459
+ ],
1460
+ name: "TransactionNeedsRecomputation",
1461
+ type: "event"
1462
+ },
1463
+ {
1464
+ anonymous: false,
1465
+ inputs: [
1466
+ {
1467
+ indexed: true,
1468
+ internalType: "bytes32",
1469
+ name: "tx_id",
1470
+ type: "bytes32"
1471
+ },
1472
+ {
1473
+ indexed: false,
1474
+ internalType: "address[]",
1475
+ name: "validators",
1476
+ type: "address[]"
1477
+ }
1478
+ ],
1479
+ name: "TransactionReceiptProposed",
1480
+ type: "event"
1481
+ },
1482
+ {
1483
+ anonymous: false,
1484
+ inputs: [
1485
+ {
1486
+ indexed: true,
1487
+ internalType: "bytes32",
1488
+ name: "tx_id",
1489
+ type: "bytes32"
1490
+ }
1491
+ ],
1492
+ name: "TransactionUndetermined",
1493
+ type: "event"
1494
+ },
1495
+ {
1496
+ anonymous: false,
1497
+ inputs: [
1498
+ {
1499
+ indexed: true,
1500
+ internalType: "bytes32",
1501
+ name: "txId",
1502
+ type: "bytes32"
1503
+ },
1504
+ {
1505
+ indexed: true,
1506
+ internalType: "address",
1507
+ name: "validator",
1508
+ type: "address"
1509
+ },
1510
+ {
1511
+ indexed: false,
1512
+ internalType: "bool",
1513
+ name: "isLastVote",
1514
+ type: "bool"
1515
+ }
1516
+ ],
1517
+ name: "TribunalAppealVoteCommitted",
1518
+ type: "event"
1519
+ },
1520
+ {
1521
+ anonymous: false,
1522
+ inputs: [
1523
+ {
1524
+ indexed: true,
1525
+ internalType: "bytes32",
1526
+ name: "txId",
1527
+ type: "bytes32"
1528
+ },
1529
+ {
1530
+ indexed: true,
1531
+ internalType: "address",
1532
+ name: "validator",
1533
+ type: "address"
1534
+ },
1535
+ {
1536
+ indexed: false,
1537
+ internalType: "bool",
1538
+ name: "isLastVote",
1539
+ type: "bool"
1540
+ }
1541
+ ],
1542
+ name: "TribunalAppealVoteRevealed",
1543
+ type: "event"
1544
+ },
1545
+ {
1546
+ anonymous: false,
1547
+ inputs: [
1548
+ {
1549
+ indexed: true,
1550
+ internalType: "bytes32",
1551
+ name: "txId",
1552
+ type: "bytes32"
1553
+ },
1554
+ {
1555
+ indexed: true,
1556
+ internalType: "address",
1557
+ name: "validator",
1558
+ type: "address"
1559
+ },
1560
+ {
1561
+ indexed: false,
1562
+ internalType: "bool",
1563
+ name: "isLastVote",
1564
+ type: "bool"
1565
+ }
1566
+ ],
1567
+ name: "VoteCommitted",
1568
+ type: "event"
1569
+ },
1570
+ {
1571
+ anonymous: false,
1572
+ inputs: [
1573
+ {
1574
+ indexed: true,
1575
+ internalType: "bytes32",
1576
+ name: "txId",
1577
+ type: "bytes32"
1578
+ },
1579
+ {
1580
+ indexed: true,
1581
+ internalType: "address",
1582
+ name: "validator",
1583
+ type: "address"
1584
+ },
1585
+ {
1586
+ indexed: false,
1587
+ internalType: "enum ITransactions.VoteType",
1588
+ name: "voteType",
1589
+ type: "uint8"
1590
+ },
1591
+ {
1592
+ indexed: false,
1593
+ internalType: "bool",
1594
+ name: "isLastVote",
1595
+ type: "bool"
1596
+ },
1597
+ {
1598
+ indexed: false,
1599
+ internalType: "enum ITransactions.ResultType",
1600
+ name: "result",
1601
+ type: "uint8"
1602
+ }
1603
+ ],
1604
+ name: "VoteRevealed",
1605
+ type: "event"
1606
+ },
1607
+ {
1608
+ inputs: [],
1609
+ name: "DEFAULT_ADMIN_ROLE",
1610
+ outputs: [
1611
+ {
1612
+ internalType: "bytes32",
1613
+ name: "",
1614
+ type: "bytes32"
1615
+ }
1616
+ ],
1617
+ stateMutability: "view",
1618
+ type: "function"
1619
+ },
1620
+ {
1621
+ inputs: [],
1622
+ name: "EVENTS_BATCH_SIZE",
1623
+ outputs: [
1624
+ {
1625
+ internalType: "uint256",
1626
+ name: "",
1627
+ type: "uint256"
1628
+ }
1629
+ ],
1630
+ stateMutability: "view",
1631
+ type: "function"
1632
+ },
1633
+ {
1634
+ inputs: [],
1635
+ name: "acceptOwnership",
1636
+ outputs: [],
1637
+ stateMutability: "nonpayable",
1638
+ type: "function"
1639
+ },
1640
+ {
1641
+ inputs: [
1642
+ {
1643
+ internalType: "bytes32",
1644
+ name: "_txId",
1645
+ type: "bytes32"
1646
+ },
1647
+ {
1648
+ internalType: "bytes",
1649
+ name: "_vrfProof",
1650
+ type: "bytes"
1651
+ }
1652
+ ],
1653
+ name: "activateTransaction",
1654
+ outputs: [],
1655
+ stateMutability: "nonpayable",
1656
+ type: "function"
1657
+ },
1658
+ {
1659
+ inputs: [
1660
+ {
1661
+ internalType: "address",
1662
+ name: "_sender",
1663
+ type: "address"
1664
+ },
1665
+ {
1666
+ internalType: "address",
1667
+ name: "_recipient",
1668
+ type: "address"
1669
+ },
1670
+ {
1671
+ internalType: "uint256",
1672
+ name: "_numOfInitialValidators",
1673
+ type: "uint256"
1674
+ },
1675
+ {
1676
+ internalType: "uint256",
1677
+ name: "_maxRotations",
1678
+ type: "uint256"
1679
+ },
1680
+ {
1681
+ internalType: "bytes",
1682
+ name: "_txData",
1683
+ type: "bytes"
1684
+ }
1685
+ ],
1686
+ name: "addTransaction",
1687
+ outputs: [],
1688
+ stateMutability: "nonpayable",
1689
+ type: "function"
1690
+ },
1691
+ {
1692
+ inputs: [
1693
+ {
1694
+ internalType: "bytes32",
1695
+ name: "_txId",
1696
+ type: "bytes32"
1697
+ }
1698
+ ],
1699
+ name: "cancelTransaction",
1700
+ outputs: [],
1701
+ stateMutability: "nonpayable",
1702
+ type: "function"
1703
+ },
1704
+ {
1705
+ inputs: [
1706
+ {
1707
+ internalType: "bytes32",
1708
+ name: "_txId",
1709
+ type: "bytes32"
1710
+ },
1711
+ {
1712
+ internalType: "bytes32",
1713
+ name: "_commitHash",
1714
+ type: "bytes32"
1715
+ }
1716
+ ],
1717
+ name: "commitTribunalAppealVote",
1718
+ outputs: [],
1719
+ stateMutability: "nonpayable",
1720
+ type: "function"
1721
+ },
1722
+ {
1723
+ inputs: [
1724
+ {
1725
+ internalType: "bytes32",
1726
+ name: "_txId",
1727
+ type: "bytes32"
1728
+ },
1729
+ {
1730
+ internalType: "bytes32",
1731
+ name: "_commitHash",
1732
+ type: "bytes32"
1733
+ },
1734
+ {
1735
+ internalType: "uint256",
1736
+ name: "_validatorIndex",
1737
+ type: "uint256"
1738
+ }
1739
+ ],
1740
+ name: "commitVote",
1741
+ outputs: [],
1742
+ stateMutability: "nonpayable",
1743
+ type: "function"
1744
+ },
1745
+ {
1746
+ inputs: [],
1747
+ name: "contracts",
1748
+ outputs: [
1749
+ {
1750
+ internalType: "contract IGenManager",
1751
+ name: "genManager",
1752
+ type: "address"
1753
+ },
1754
+ {
1755
+ internalType: "contract ITransactions",
1756
+ name: "genTransactions",
1757
+ type: "address"
1758
+ },
1759
+ {
1760
+ internalType: "contract IQueues",
1761
+ name: "genQueue",
1762
+ type: "address"
1763
+ },
1764
+ {
1765
+ internalType: "contract IGhostFactory",
1766
+ name: "ghostFactory",
1767
+ type: "address"
1768
+ },
1769
+ {
1770
+ internalType: "contract IGenStaking",
1771
+ name: "genStaking",
1772
+ type: "address"
1773
+ },
1774
+ {
1775
+ internalType: "contract IMessages",
1776
+ name: "genMessages",
1777
+ type: "address"
1778
+ },
1779
+ {
1780
+ internalType: "contract IIdleness",
1781
+ name: "idleness",
1782
+ type: "address"
1783
+ },
1784
+ {
1785
+ internalType: "contract ITribunalAppeal",
1786
+ name: "tribunalAppeal",
1787
+ type: "address"
1788
+ }
1789
+ ],
1790
+ stateMutability: "view",
1791
+ type: "function"
1792
+ },
1793
+ {
1794
+ inputs: [
1795
+ {
1796
+ internalType: "address",
1797
+ name: "_recipient",
1798
+ type: "address"
1799
+ },
1800
+ {
1801
+ internalType: "uint256",
1802
+ name: "_value",
1803
+ type: "uint256"
1804
+ },
1805
+ {
1806
+ internalType: "bytes",
1807
+ name: "_data",
1808
+ type: "bytes"
1809
+ }
1810
+ ],
1811
+ name: "executeMessage",
1812
+ outputs: [
1813
+ {
1814
+ internalType: "bool",
1815
+ name: "success",
1816
+ type: "bool"
1817
+ }
1818
+ ],
1819
+ stateMutability: "nonpayable",
1820
+ type: "function"
1821
+ },
1822
+ {
1823
+ inputs: [
1824
+ {
1825
+ internalType: "bytes32",
1826
+ name: "_txId",
1827
+ type: "bytes32"
1828
+ }
1829
+ ],
1830
+ name: "finalizeTransaction",
1831
+ outputs: [],
1832
+ stateMutability: "nonpayable",
1833
+ type: "function"
1834
+ },
1835
+ {
1836
+ inputs: [],
1837
+ name: "getContracts",
1838
+ outputs: [
1839
+ {
1840
+ components: [
1841
+ {
1842
+ internalType: "contract IGenManager",
1843
+ name: "genManager",
1844
+ type: "address"
1845
+ },
1846
+ {
1847
+ internalType: "contract ITransactions",
1848
+ name: "genTransactions",
1849
+ type: "address"
1850
+ },
1851
+ {
1852
+ internalType: "contract IQueues",
1853
+ name: "genQueue",
1854
+ type: "address"
1855
+ },
1856
+ {
1857
+ internalType: "contract IGhostFactory",
1858
+ name: "ghostFactory",
1859
+ type: "address"
1860
+ },
1861
+ {
1862
+ internalType: "contract IGenStaking",
1863
+ name: "genStaking",
1864
+ type: "address"
1865
+ },
1866
+ {
1867
+ internalType: "contract IMessages",
1868
+ name: "genMessages",
1869
+ type: "address"
1870
+ },
1871
+ {
1872
+ internalType: "contract IIdleness",
1873
+ name: "idleness",
1874
+ type: "address"
1875
+ },
1876
+ {
1877
+ internalType: "contract ITribunalAppeal",
1878
+ name: "tribunalAppeal",
1879
+ type: "address"
1880
+ }
1881
+ ],
1882
+ internalType: "struct IConsensusMain.ExternalContracts",
1883
+ name: "",
1884
+ type: "tuple"
1885
+ }
1886
+ ],
1887
+ stateMutability: "view",
1888
+ type: "function"
1889
+ },
1890
+ {
1891
+ inputs: [
1892
+ {
1893
+ internalType: "bytes32",
1894
+ name: "role",
1895
+ type: "bytes32"
1896
+ }
1897
+ ],
1898
+ name: "getRoleAdmin",
1899
+ outputs: [
1900
+ {
1901
+ internalType: "bytes32",
1902
+ name: "",
1903
+ type: "bytes32"
1904
+ }
1905
+ ],
1906
+ stateMutability: "view",
1907
+ type: "function"
1908
+ },
1909
+ {
1910
+ inputs: [
1911
+ {
1912
+ internalType: "address",
1913
+ name: "addr",
1914
+ type: "address"
1915
+ }
1916
+ ],
1917
+ name: "ghostContracts",
1918
+ outputs: [
1919
+ {
1920
+ internalType: "bool",
1921
+ name: "isGhost",
1922
+ type: "bool"
1923
+ }
1924
+ ],
1925
+ stateMutability: "view",
1926
+ type: "function"
1927
+ },
1928
+ {
1929
+ inputs: [
1930
+ {
1931
+ internalType: "bytes32",
1932
+ name: "role",
1933
+ type: "bytes32"
1934
+ },
1935
+ {
1936
+ internalType: "address",
1937
+ name: "account",
1938
+ type: "address"
1939
+ }
1940
+ ],
1941
+ name: "grantRole",
1942
+ outputs: [],
1943
+ stateMutability: "nonpayable",
1944
+ type: "function"
1945
+ },
1946
+ {
1947
+ inputs: [
1948
+ {
1949
+ internalType: "bytes32",
1950
+ name: "role",
1951
+ type: "bytes32"
1952
+ },
1953
+ {
1954
+ internalType: "address",
1955
+ name: "account",
1956
+ type: "address"
1957
+ }
1958
+ ],
1959
+ name: "hasRole",
1960
+ outputs: [
1961
+ {
1962
+ internalType: "bool",
1963
+ name: "",
1964
+ type: "bool"
1965
+ }
1966
+ ],
1967
+ stateMutability: "view",
1968
+ type: "function"
1969
+ },
1970
+ {
1971
+ inputs: [],
1972
+ name: "initialize",
1973
+ outputs: [],
1974
+ stateMutability: "nonpayable",
1975
+ type: "function"
1976
+ },
1977
+ {
1978
+ inputs: [],
1979
+ name: "owner",
1980
+ outputs: [
1981
+ {
1982
+ internalType: "address",
1983
+ name: "",
1984
+ type: "address"
1985
+ }
1986
+ ],
1987
+ stateMutability: "view",
1988
+ type: "function"
1989
+ },
1990
+ {
1991
+ inputs: [],
1992
+ name: "pendingOwner",
1993
+ outputs: [
1994
+ {
1995
+ internalType: "address",
1996
+ name: "",
1997
+ type: "address"
1998
+ }
1999
+ ],
2000
+ stateMutability: "view",
2001
+ type: "function"
2002
+ },
2003
+ {
2004
+ inputs: [
2005
+ {
2006
+ internalType: "address",
2007
+ name: "recipient",
2008
+ type: "address"
2009
+ }
2010
+ ],
2011
+ name: "proceedPendingQueueProcessing",
2012
+ outputs: [],
2013
+ stateMutability: "nonpayable",
2014
+ type: "function"
2015
+ },
2016
+ {
2017
+ inputs: [
2018
+ {
2019
+ internalType: "bytes32",
2020
+ name: "_txId",
2021
+ type: "bytes32"
2022
+ },
2023
+ {
2024
+ internalType: "bytes",
2025
+ name: "_txReceipt",
2026
+ type: "bytes"
2027
+ },
2028
+ {
2029
+ internalType: "uint256",
2030
+ name: "_processingBlock",
2031
+ type: "uint256"
2032
+ },
2033
+ {
2034
+ components: [
2035
+ {
2036
+ internalType: "enum IMessages.MessageType",
2037
+ name: "messageType",
2038
+ type: "uint8"
2039
+ },
2040
+ {
2041
+ internalType: "address",
2042
+ name: "recipient",
2043
+ type: "address"
2044
+ },
2045
+ {
2046
+ internalType: "uint256",
2047
+ name: "value",
2048
+ type: "uint256"
2049
+ },
2050
+ {
2051
+ internalType: "bytes",
2052
+ name: "data",
2053
+ type: "bytes"
2054
+ },
2055
+ {
2056
+ internalType: "bool",
2057
+ name: "onAcceptance",
2058
+ type: "bool"
2059
+ }
2060
+ ],
2061
+ internalType: "struct IMessages.SubmittedMessage[]",
2062
+ name: "_messages",
2063
+ type: "tuple[]"
2064
+ },
2065
+ {
2066
+ internalType: "bytes",
2067
+ name: "_vrfProof",
2068
+ type: "bytes"
2069
+ }
2070
+ ],
2071
+ name: "proposeReceipt",
2072
+ outputs: [],
2073
+ stateMutability: "nonpayable",
2074
+ type: "function"
2075
+ },
2076
+ {
2077
+ inputs: [],
2078
+ name: "renounceOwnership",
2079
+ outputs: [],
2080
+ stateMutability: "nonpayable",
2081
+ type: "function"
2082
+ },
2083
+ {
2084
+ inputs: [
2085
+ {
2086
+ internalType: "bytes32",
2087
+ name: "role",
2088
+ type: "bytes32"
2089
+ },
2090
+ {
2091
+ internalType: "address",
2092
+ name: "callerConfirmation",
2093
+ type: "address"
2094
+ }
2095
+ ],
2096
+ name: "renounceRole",
2097
+ outputs: [],
2098
+ stateMutability: "nonpayable",
2099
+ type: "function"
2100
+ },
2101
+ {
2102
+ inputs: [
2103
+ {
2104
+ internalType: "bytes32",
2105
+ name: "_txId",
2106
+ type: "bytes32"
2107
+ },
2108
+ {
2109
+ internalType: "bytes32",
2110
+ name: "_voteHash",
2111
+ type: "bytes32"
2112
+ },
2113
+ {
2114
+ internalType: "enum ITribunalAppeal.TribunalVoteType",
2115
+ name: "_voteType",
2116
+ type: "uint8"
2117
+ },
2118
+ {
2119
+ internalType: "uint256",
2120
+ name: "_nonce",
2121
+ type: "uint256"
2122
+ }
2123
+ ],
2124
+ name: "revealTribunalAppealVote",
2125
+ outputs: [],
2126
+ stateMutability: "nonpayable",
2127
+ type: "function"
2128
+ },
2129
+ {
2130
+ inputs: [
2131
+ {
2132
+ internalType: "bytes32",
2133
+ name: "_txId",
2134
+ type: "bytes32"
2135
+ },
2136
+ {
2137
+ internalType: "bytes32",
2138
+ name: "_voteHash",
2139
+ type: "bytes32"
2140
+ },
2141
+ {
2142
+ internalType: "enum ITransactions.VoteType",
2143
+ name: "_voteType",
2144
+ type: "uint8"
2145
+ },
2146
+ {
2147
+ internalType: "uint256",
2148
+ name: "_nonce",
2149
+ type: "uint256"
2150
+ },
2151
+ {
2152
+ internalType: "uint256",
2153
+ name: "_validatorIndex",
2154
+ type: "uint256"
2155
+ }
2156
+ ],
2157
+ name: "revealVote",
2158
+ outputs: [],
2159
+ stateMutability: "nonpayable",
2160
+ type: "function"
2161
+ },
2162
+ {
2163
+ inputs: [
2164
+ {
2165
+ internalType: "bytes32",
2166
+ name: "role",
2167
+ type: "bytes32"
2168
+ },
2169
+ {
2170
+ internalType: "address",
2171
+ name: "account",
2172
+ type: "address"
2173
+ }
2174
+ ],
2175
+ name: "revokeRole",
2176
+ outputs: [],
2177
+ stateMutability: "nonpayable",
2178
+ type: "function"
2179
+ },
2180
+ {
2181
+ inputs: [
2182
+ {
2183
+ internalType: "address",
2184
+ name: "_ghostFactory",
2185
+ type: "address"
2186
+ },
2187
+ {
2188
+ internalType: "address",
2189
+ name: "_genManager",
2190
+ type: "address"
2191
+ },
2192
+ {
2193
+ internalType: "address",
2194
+ name: "_genTransactions",
2195
+ type: "address"
2196
+ },
2197
+ {
2198
+ internalType: "address",
2199
+ name: "_genQueue",
2200
+ type: "address"
2201
+ },
2202
+ {
2203
+ internalType: "address",
2204
+ name: "_genStaking",
2205
+ type: "address"
2206
+ },
2207
+ {
2208
+ internalType: "address",
2209
+ name: "_genMessages",
2210
+ type: "address"
2211
+ },
2212
+ {
2213
+ internalType: "address",
2214
+ name: "_idleness",
2215
+ type: "address"
2216
+ },
2217
+ {
2218
+ internalType: "address",
2219
+ name: "_tribunalAppeal",
2220
+ type: "address"
2221
+ }
2222
+ ],
2223
+ name: "setExternalContracts",
2224
+ outputs: [],
2225
+ stateMutability: "nonpayable",
2226
+ type: "function"
2227
+ },
2228
+ {
2229
+ inputs: [
2230
+ {
2231
+ internalType: "bytes32",
2232
+ name: "_txId",
2233
+ type: "bytes32"
2234
+ }
2235
+ ],
2236
+ name: "submitAppeal",
2237
+ outputs: [],
2238
+ stateMutability: "payable",
2239
+ type: "function"
2240
+ },
2241
+ {
2242
+ inputs: [
2243
+ {
2244
+ internalType: "bytes32",
2245
+ name: "_txId",
2246
+ type: "bytes32"
2247
+ }
2248
+ ],
2249
+ name: "submitSlashAppeal",
2250
+ outputs: [],
2251
+ stateMutability: "nonpayable",
2252
+ type: "function"
2253
+ },
2254
+ {
2255
+ inputs: [
2256
+ {
2257
+ internalType: "bytes4",
2258
+ name: "interfaceId",
2259
+ type: "bytes4"
2260
+ }
2261
+ ],
2262
+ name: "supportsInterface",
2263
+ outputs: [
2264
+ {
2265
+ internalType: "bool",
2266
+ name: "",
2267
+ type: "bool"
2268
+ }
2269
+ ],
2270
+ stateMutability: "view",
2271
+ type: "function"
2272
+ },
2273
+ {
2274
+ inputs: [
2275
+ {
2276
+ internalType: "address",
2277
+ name: "newOwner",
2278
+ type: "address"
2279
+ }
2280
+ ],
2281
+ name: "transferOwnership",
2282
+ outputs: [],
2283
+ stateMutability: "nonpayable",
2284
+ type: "function"
2285
+ }
2286
+ ],
2287
+ bytecode: ""
2288
+ };
2289
+ var CONSENSUS_DATA_CONTRACT = {
2290
+ address: "0x88B0F18613Db92Bf970FfE264E02496e20a74D16",
2291
+ abi: [
2292
+ {
2293
+ inputs: [],
2294
+ name: "AccessControlBadConfirmation",
2295
+ type: "error"
2296
+ },
2297
+ {
2298
+ inputs: [
2299
+ {
2300
+ internalType: "address",
2301
+ name: "account",
2302
+ type: "address"
2303
+ },
2304
+ {
2305
+ internalType: "bytes32",
2306
+ name: "neededRole",
2307
+ type: "bytes32"
2308
+ }
2309
+ ],
2310
+ name: "AccessControlUnauthorizedAccount",
2311
+ type: "error"
2312
+ },
2313
+ {
2314
+ inputs: [],
2315
+ name: "InvalidInitialization",
2316
+ type: "error"
2317
+ },
2318
+ {
2319
+ inputs: [],
2320
+ name: "NotInitializing",
2321
+ type: "error"
2322
+ },
2323
+ {
2324
+ inputs: [
2325
+ {
2326
+ internalType: "address",
2327
+ name: "owner",
2328
+ type: "address"
2329
+ }
2330
+ ],
2331
+ name: "OwnableInvalidOwner",
2332
+ type: "error"
2333
+ },
2334
+ {
2335
+ inputs: [
2336
+ {
2337
+ internalType: "address",
2338
+ name: "account",
2339
+ type: "address"
2340
+ }
2341
+ ],
2342
+ name: "OwnableUnauthorizedAccount",
2343
+ type: "error"
2344
+ },
2345
+ {
2346
+ inputs: [],
2347
+ name: "ReentrancyGuardReentrantCall",
2348
+ type: "error"
2349
+ },
2350
+ {
2351
+ anonymous: false,
2352
+ inputs: [
2353
+ {
2354
+ indexed: false,
2355
+ internalType: "uint64",
2356
+ name: "version",
2357
+ type: "uint64"
2358
+ }
2359
+ ],
2360
+ name: "Initialized",
2361
+ type: "event"
2362
+ },
2363
+ {
2364
+ anonymous: false,
2365
+ inputs: [
2366
+ {
2367
+ indexed: true,
2368
+ internalType: "address",
2369
+ name: "previousOwner",
2370
+ type: "address"
2371
+ },
2372
+ {
2373
+ indexed: true,
2374
+ internalType: "address",
2375
+ name: "newOwner",
2376
+ type: "address"
2377
+ }
2378
+ ],
2379
+ name: "OwnershipTransferStarted",
2380
+ type: "event"
2381
+ },
2382
+ {
2383
+ anonymous: false,
2384
+ inputs: [
2385
+ {
2386
+ indexed: true,
2387
+ internalType: "address",
2388
+ name: "previousOwner",
2389
+ type: "address"
2390
+ },
2391
+ {
2392
+ indexed: true,
2393
+ internalType: "address",
2394
+ name: "newOwner",
2395
+ type: "address"
2396
+ }
2397
+ ],
2398
+ name: "OwnershipTransferred",
2399
+ type: "event"
2400
+ },
2401
+ {
2402
+ anonymous: false,
2403
+ inputs: [
2404
+ {
2405
+ indexed: true,
2406
+ internalType: "bytes32",
2407
+ name: "role",
2408
+ type: "bytes32"
2409
+ },
2410
+ {
2411
+ indexed: true,
2412
+ internalType: "bytes32",
2413
+ name: "previousAdminRole",
2414
+ type: "bytes32"
2415
+ },
2416
+ {
2417
+ indexed: true,
2418
+ internalType: "bytes32",
2419
+ name: "newAdminRole",
2420
+ type: "bytes32"
2421
+ }
2422
+ ],
2423
+ name: "RoleAdminChanged",
2424
+ type: "event"
2425
+ },
2426
+ {
2427
+ anonymous: false,
2428
+ inputs: [
2429
+ {
2430
+ indexed: true,
2431
+ internalType: "bytes32",
2432
+ name: "role",
2433
+ type: "bytes32"
2434
+ },
2435
+ {
2436
+ indexed: true,
2437
+ internalType: "address",
2438
+ name: "account",
2439
+ type: "address"
2440
+ },
2441
+ {
2442
+ indexed: true,
2443
+ internalType: "address",
2444
+ name: "sender",
2445
+ type: "address"
2446
+ }
2447
+ ],
2448
+ name: "RoleGranted",
2449
+ type: "event"
2450
+ },
2451
+ {
2452
+ anonymous: false,
2453
+ inputs: [
2454
+ {
2455
+ indexed: true,
2456
+ internalType: "bytes32",
2457
+ name: "role",
2458
+ type: "bytes32"
2459
+ },
2460
+ {
2461
+ indexed: true,
2462
+ internalType: "address",
2463
+ name: "account",
2464
+ type: "address"
2465
+ },
2466
+ {
2467
+ indexed: true,
2468
+ internalType: "address",
2469
+ name: "sender",
2470
+ type: "address"
2471
+ }
2472
+ ],
2473
+ name: "RoleRevoked",
2474
+ type: "event"
2475
+ },
2476
+ {
2477
+ inputs: [],
2478
+ name: "DEFAULT_ADMIN_ROLE",
2479
+ outputs: [
2480
+ {
2481
+ internalType: "bytes32",
2482
+ name: "",
2483
+ type: "bytes32"
2484
+ }
2485
+ ],
2486
+ stateMutability: "view",
2487
+ type: "function"
2488
+ },
2489
+ {
2490
+ inputs: [],
2491
+ name: "acceptOwnership",
2492
+ outputs: [],
2493
+ stateMutability: "nonpayable",
2494
+ type: "function"
2495
+ },
2496
+ {
2497
+ inputs: [
2498
+ {
2499
+ internalType: "bytes32",
2500
+ name: "_txId",
2501
+ type: "bytes32"
2502
+ },
2503
+ {
2504
+ internalType: "uint256",
2505
+ name: "_currentTimestamp",
2506
+ type: "uint256"
2507
+ }
2508
+ ],
2509
+ name: "canFinalize",
2510
+ outputs: [
2511
+ {
2512
+ internalType: "bool",
2513
+ name: "",
2514
+ type: "bool"
2515
+ },
2516
+ {
2517
+ internalType: "uint256",
2518
+ name: "",
2519
+ type: "uint256"
2520
+ },
2521
+ {
2522
+ internalType: "uint256",
2523
+ name: "",
2524
+ type: "uint256"
2525
+ }
2526
+ ],
2527
+ stateMutability: "view",
2528
+ type: "function"
2529
+ },
2530
+ {
2531
+ inputs: [],
2532
+ name: "consensusMain",
2533
+ outputs: [
2534
+ {
2535
+ internalType: "contract IConsensusMain",
2536
+ name: "",
2537
+ type: "address"
2538
+ }
2539
+ ],
2540
+ stateMutability: "view",
2541
+ type: "function"
2542
+ },
2543
+ {
2544
+ inputs: [
2545
+ {
2546
+ internalType: "bytes32",
2547
+ name: "_tx_id",
2548
+ type: "bytes32"
2549
+ }
2550
+ ],
2551
+ name: "getLastAppealResult",
2552
+ outputs: [
2553
+ {
2554
+ internalType: "enum ITransactions.ResultType",
2555
+ name: "",
2556
+ type: "uint8"
2557
+ }
2558
+ ],
2559
+ stateMutability: "view",
2560
+ type: "function"
2561
+ },
2562
+ {
2563
+ inputs: [
2564
+ {
2565
+ internalType: "address",
2566
+ name: "recipient",
2567
+ type: "address"
2568
+ }
2569
+ ],
2570
+ name: "getLatestAcceptedTransaction",
2571
+ outputs: [
2572
+ {
2573
+ components: [
2574
+ {
2575
+ internalType: "uint256",
2576
+ name: "currentTimestamp",
2577
+ type: "uint256"
2578
+ },
2579
+ {
2580
+ internalType: "address",
2581
+ name: "sender",
2582
+ type: "address"
2583
+ },
2584
+ {
2585
+ internalType: "address",
2586
+ name: "recipient",
2587
+ type: "address"
2588
+ },
2589
+ {
2590
+ internalType: "uint256",
2591
+ name: "numOfInitialValidators",
2592
+ type: "uint256"
2593
+ },
2594
+ {
2595
+ internalType: "uint256",
2596
+ name: "txSlot",
2597
+ type: "uint256"
2598
+ },
2599
+ {
2600
+ internalType: "uint256",
2601
+ name: "createdTimestamp",
2602
+ type: "uint256"
2603
+ },
2604
+ {
2605
+ internalType: "uint256",
2606
+ name: "lastVoteTimestamp",
2607
+ type: "uint256"
2608
+ },
2609
+ {
2610
+ internalType: "bytes32",
2611
+ name: "randomSeed",
2612
+ type: "bytes32"
2613
+ },
2614
+ {
2615
+ internalType: "enum ITransactions.ResultType",
2616
+ name: "result",
2617
+ type: "uint8"
2618
+ },
2619
+ {
2620
+ internalType: "bytes",
2621
+ name: "txData",
2622
+ type: "bytes"
2623
+ },
2624
+ {
2625
+ internalType: "bytes",
2626
+ name: "txReceipt",
2627
+ type: "bytes"
2628
+ },
2629
+ {
2630
+ components: [
2631
+ {
2632
+ internalType: "enum IMessages.MessageType",
2633
+ name: "messageType",
2634
+ type: "uint8"
2635
+ },
2636
+ {
2637
+ internalType: "address",
2638
+ name: "recipient",
2639
+ type: "address"
2640
+ },
2641
+ {
2642
+ internalType: "uint256",
2643
+ name: "value",
2644
+ type: "uint256"
2645
+ },
2646
+ {
2647
+ internalType: "bytes",
2648
+ name: "data",
2649
+ type: "bytes"
2650
+ },
2651
+ {
2652
+ internalType: "bool",
2653
+ name: "onAcceptance",
2654
+ type: "bool"
2655
+ }
2656
+ ],
2657
+ internalType: "struct IMessages.SubmittedMessage[]",
2658
+ name: "messages",
2659
+ type: "tuple[]"
2660
+ },
2661
+ {
2662
+ internalType: "enum IQueues.QueueType",
2663
+ name: "queueType",
2664
+ type: "uint8"
2665
+ },
2666
+ {
2667
+ internalType: "uint256",
2668
+ name: "queuePosition",
2669
+ type: "uint256"
2670
+ },
2671
+ {
2672
+ internalType: "address",
2673
+ name: "activator",
2674
+ type: "address"
2675
+ },
2676
+ {
2677
+ internalType: "address",
2678
+ name: "lastLeader",
2679
+ type: "address"
2680
+ },
2681
+ {
2682
+ internalType: "enum ITransactions.TransactionStatus",
2683
+ name: "status",
2684
+ type: "uint8"
2685
+ },
2686
+ {
2687
+ internalType: "bytes32",
2688
+ name: "txId",
2689
+ type: "bytes32"
2690
+ },
2691
+ {
2692
+ components: [
2693
+ {
2694
+ internalType: "uint256",
2695
+ name: "activationBlock",
2696
+ type: "uint256"
2697
+ },
2698
+ {
2699
+ internalType: "uint256",
2700
+ name: "processingBlock",
2701
+ type: "uint256"
2702
+ },
2703
+ {
2704
+ internalType: "uint256",
2705
+ name: "proposalBlock",
2706
+ type: "uint256"
2707
+ }
2708
+ ],
2709
+ internalType: "struct ITransactions.ReadStateBlockRange",
2710
+ name: "readStateBlockRange",
2711
+ type: "tuple"
2712
+ },
2713
+ {
2714
+ internalType: "uint256",
2715
+ name: "numOfRounds",
2716
+ type: "uint256"
2717
+ },
2718
+ {
2719
+ components: [
2720
+ {
2721
+ internalType: "uint256",
2722
+ name: "round",
2723
+ type: "uint256"
2724
+ },
2725
+ {
2726
+ internalType: "uint256",
2727
+ name: "leaderIndex",
2728
+ type: "uint256"
2729
+ },
2730
+ {
2731
+ internalType: "uint256",
2732
+ name: "votesCommitted",
2733
+ type: "uint256"
2734
+ },
2735
+ {
2736
+ internalType: "uint256",
2737
+ name: "votesRevealed",
2738
+ type: "uint256"
2739
+ },
2740
+ {
2741
+ internalType: "uint256",
2742
+ name: "appealBond",
2743
+ type: "uint256"
2744
+ },
2745
+ {
2746
+ internalType: "uint256",
2747
+ name: "rotationsLeft",
2748
+ type: "uint256"
2749
+ },
2750
+ {
2751
+ internalType: "enum ITransactions.ResultType",
2752
+ name: "result",
2753
+ type: "uint8"
2754
+ },
2755
+ {
2756
+ internalType: "address[]",
2757
+ name: "roundValidators",
2758
+ type: "address[]"
2759
+ },
2760
+ {
2761
+ internalType: "bytes32[]",
2762
+ name: "validatorVotesHash",
2763
+ type: "bytes32[]"
2764
+ },
2765
+ {
2766
+ internalType: "enum ITransactions.VoteType[]",
2767
+ name: "validatorVotes",
2768
+ type: "uint8[]"
2769
+ }
2770
+ ],
2771
+ internalType: "struct ITransactions.RoundData",
2772
+ name: "lastRound",
2773
+ type: "tuple"
2774
+ }
2775
+ ],
2776
+ internalType: "struct ConsensusData.TransactionData",
2777
+ name: "txData",
2778
+ type: "tuple"
2779
+ }
2780
+ ],
2781
+ stateMutability: "view",
2782
+ type: "function"
2783
+ },
2784
+ {
2785
+ inputs: [
2786
+ {
2787
+ internalType: "address",
2788
+ name: "recipient",
2789
+ type: "address"
2790
+ },
2791
+ {
2792
+ internalType: "uint256",
2793
+ name: "startIndex",
2794
+ type: "uint256"
2795
+ },
2796
+ {
2797
+ internalType: "uint256",
2798
+ name: "pageSize",
2799
+ type: "uint256"
2800
+ }
2801
+ ],
2802
+ name: "getLatestAcceptedTransactions",
2803
+ outputs: [
2804
+ {
2805
+ components: [
2806
+ {
2807
+ internalType: "uint256",
2808
+ name: "currentTimestamp",
2809
+ type: "uint256"
2810
+ },
2811
+ {
2812
+ internalType: "address",
2813
+ name: "sender",
2814
+ type: "address"
2815
+ },
2816
+ {
2817
+ internalType: "address",
2818
+ name: "recipient",
2819
+ type: "address"
2820
+ },
2821
+ {
2822
+ internalType: "uint256",
2823
+ name: "numOfInitialValidators",
2824
+ type: "uint256"
2825
+ },
2826
+ {
2827
+ internalType: "uint256",
2828
+ name: "txSlot",
2829
+ type: "uint256"
2830
+ },
2831
+ {
2832
+ internalType: "uint256",
2833
+ name: "createdTimestamp",
2834
+ type: "uint256"
2835
+ },
2836
+ {
2837
+ internalType: "uint256",
2838
+ name: "lastVoteTimestamp",
2839
+ type: "uint256"
2840
+ },
2841
+ {
2842
+ internalType: "bytes32",
2843
+ name: "randomSeed",
2844
+ type: "bytes32"
2845
+ },
2846
+ {
2847
+ internalType: "enum ITransactions.ResultType",
2848
+ name: "result",
2849
+ type: "uint8"
2850
+ },
2851
+ {
2852
+ internalType: "bytes",
2853
+ name: "txData",
2854
+ type: "bytes"
2855
+ },
2856
+ {
2857
+ internalType: "bytes",
2858
+ name: "txReceipt",
2859
+ type: "bytes"
2860
+ },
2861
+ {
2862
+ components: [
2863
+ {
2864
+ internalType: "enum IMessages.MessageType",
2865
+ name: "messageType",
2866
+ type: "uint8"
2867
+ },
2868
+ {
2869
+ internalType: "address",
2870
+ name: "recipient",
2871
+ type: "address"
2872
+ },
2873
+ {
2874
+ internalType: "uint256",
2875
+ name: "value",
2876
+ type: "uint256"
2877
+ },
2878
+ {
2879
+ internalType: "bytes",
2880
+ name: "data",
2881
+ type: "bytes"
2882
+ },
2883
+ {
2884
+ internalType: "bool",
2885
+ name: "onAcceptance",
2886
+ type: "bool"
2887
+ }
2888
+ ],
2889
+ internalType: "struct IMessages.SubmittedMessage[]",
2890
+ name: "messages",
2891
+ type: "tuple[]"
2892
+ },
2893
+ {
2894
+ internalType: "enum IQueues.QueueType",
2895
+ name: "queueType",
2896
+ type: "uint8"
2897
+ },
2898
+ {
2899
+ internalType: "uint256",
2900
+ name: "queuePosition",
2901
+ type: "uint256"
2902
+ },
2903
+ {
2904
+ internalType: "address",
2905
+ name: "activator",
2906
+ type: "address"
2907
+ },
2908
+ {
2909
+ internalType: "address",
2910
+ name: "lastLeader",
2911
+ type: "address"
2912
+ },
2913
+ {
2914
+ internalType: "enum ITransactions.TransactionStatus",
2915
+ name: "status",
2916
+ type: "uint8"
2917
+ },
2918
+ {
2919
+ internalType: "bytes32",
2920
+ name: "txId",
2921
+ type: "bytes32"
2922
+ },
2923
+ {
2924
+ components: [
2925
+ {
2926
+ internalType: "uint256",
2927
+ name: "activationBlock",
2928
+ type: "uint256"
2929
+ },
2930
+ {
2931
+ internalType: "uint256",
2932
+ name: "processingBlock",
2933
+ type: "uint256"
2934
+ },
2935
+ {
2936
+ internalType: "uint256",
2937
+ name: "proposalBlock",
2938
+ type: "uint256"
2939
+ }
2940
+ ],
2941
+ internalType: "struct ITransactions.ReadStateBlockRange",
2942
+ name: "readStateBlockRange",
2943
+ type: "tuple"
2944
+ },
2945
+ {
2946
+ internalType: "uint256",
2947
+ name: "numOfRounds",
2948
+ type: "uint256"
2949
+ },
2950
+ {
2951
+ components: [
2952
+ {
2953
+ internalType: "uint256",
2954
+ name: "round",
2955
+ type: "uint256"
2956
+ },
2957
+ {
2958
+ internalType: "uint256",
2959
+ name: "leaderIndex",
2960
+ type: "uint256"
2961
+ },
2962
+ {
2963
+ internalType: "uint256",
2964
+ name: "votesCommitted",
2965
+ type: "uint256"
2966
+ },
2967
+ {
2968
+ internalType: "uint256",
2969
+ name: "votesRevealed",
2970
+ type: "uint256"
2971
+ },
2972
+ {
2973
+ internalType: "uint256",
2974
+ name: "appealBond",
2975
+ type: "uint256"
2976
+ },
2977
+ {
2978
+ internalType: "uint256",
2979
+ name: "rotationsLeft",
2980
+ type: "uint256"
2981
+ },
2982
+ {
2983
+ internalType: "enum ITransactions.ResultType",
2984
+ name: "result",
2985
+ type: "uint8"
2986
+ },
2987
+ {
2988
+ internalType: "address[]",
2989
+ name: "roundValidators",
2990
+ type: "address[]"
2991
+ },
2992
+ {
2993
+ internalType: "bytes32[]",
2994
+ name: "validatorVotesHash",
2995
+ type: "bytes32[]"
2996
+ },
2997
+ {
2998
+ internalType: "enum ITransactions.VoteType[]",
2999
+ name: "validatorVotes",
3000
+ type: "uint8[]"
3001
+ }
3002
+ ],
3003
+ internalType: "struct ITransactions.RoundData",
3004
+ name: "lastRound",
3005
+ type: "tuple"
3006
+ }
3007
+ ],
3008
+ internalType: "struct ConsensusData.TransactionData[]",
3009
+ name: "",
3010
+ type: "tuple[]"
3011
+ }
3012
+ ],
3013
+ stateMutability: "view",
3014
+ type: "function"
3015
+ },
3016
+ {
3017
+ inputs: [
3018
+ {
3019
+ internalType: "address",
3020
+ name: "recipient",
3021
+ type: "address"
3022
+ }
3023
+ ],
3024
+ name: "getLatestAcceptedTxCount",
3025
+ outputs: [
3026
+ {
3027
+ internalType: "uint256",
3028
+ name: "",
3029
+ type: "uint256"
3030
+ }
3031
+ ],
3032
+ stateMutability: "view",
3033
+ type: "function"
3034
+ },
3035
+ {
3036
+ inputs: [
3037
+ {
3038
+ internalType: "address",
3039
+ name: "recipient",
3040
+ type: "address"
3041
+ }
3042
+ ],
3043
+ name: "getLatestFinalizedTransaction",
3044
+ outputs: [
3045
+ {
3046
+ components: [
3047
+ {
3048
+ internalType: "uint256",
3049
+ name: "currentTimestamp",
3050
+ type: "uint256"
3051
+ },
3052
+ {
3053
+ internalType: "address",
3054
+ name: "sender",
3055
+ type: "address"
3056
+ },
3057
+ {
3058
+ internalType: "address",
3059
+ name: "recipient",
3060
+ type: "address"
3061
+ },
3062
+ {
3063
+ internalType: "uint256",
3064
+ name: "numOfInitialValidators",
3065
+ type: "uint256"
3066
+ },
3067
+ {
3068
+ internalType: "uint256",
3069
+ name: "txSlot",
3070
+ type: "uint256"
3071
+ },
3072
+ {
3073
+ internalType: "uint256",
3074
+ name: "createdTimestamp",
3075
+ type: "uint256"
3076
+ },
3077
+ {
3078
+ internalType: "uint256",
3079
+ name: "lastVoteTimestamp",
3080
+ type: "uint256"
3081
+ },
3082
+ {
3083
+ internalType: "bytes32",
3084
+ name: "randomSeed",
3085
+ type: "bytes32"
3086
+ },
3087
+ {
3088
+ internalType: "enum ITransactions.ResultType",
3089
+ name: "result",
3090
+ type: "uint8"
3091
+ },
3092
+ {
3093
+ internalType: "bytes",
3094
+ name: "txData",
3095
+ type: "bytes"
3096
+ },
3097
+ {
3098
+ internalType: "bytes",
3099
+ name: "txReceipt",
3100
+ type: "bytes"
3101
+ },
3102
+ {
3103
+ components: [
3104
+ {
3105
+ internalType: "enum IMessages.MessageType",
3106
+ name: "messageType",
3107
+ type: "uint8"
3108
+ },
3109
+ {
3110
+ internalType: "address",
3111
+ name: "recipient",
3112
+ type: "address"
3113
+ },
3114
+ {
3115
+ internalType: "uint256",
3116
+ name: "value",
3117
+ type: "uint256"
3118
+ },
3119
+ {
3120
+ internalType: "bytes",
3121
+ name: "data",
3122
+ type: "bytes"
3123
+ },
3124
+ {
3125
+ internalType: "bool",
3126
+ name: "onAcceptance",
3127
+ type: "bool"
3128
+ }
3129
+ ],
3130
+ internalType: "struct IMessages.SubmittedMessage[]",
3131
+ name: "messages",
3132
+ type: "tuple[]"
3133
+ },
3134
+ {
3135
+ internalType: "enum IQueues.QueueType",
3136
+ name: "queueType",
3137
+ type: "uint8"
3138
+ },
3139
+ {
3140
+ internalType: "uint256",
3141
+ name: "queuePosition",
3142
+ type: "uint256"
3143
+ },
3144
+ {
3145
+ internalType: "address",
3146
+ name: "activator",
3147
+ type: "address"
3148
+ },
3149
+ {
3150
+ internalType: "address",
3151
+ name: "lastLeader",
3152
+ type: "address"
3153
+ },
3154
+ {
3155
+ internalType: "enum ITransactions.TransactionStatus",
3156
+ name: "status",
3157
+ type: "uint8"
3158
+ },
3159
+ {
3160
+ internalType: "bytes32",
3161
+ name: "txId",
3162
+ type: "bytes32"
3163
+ },
3164
+ {
3165
+ components: [
3166
+ {
3167
+ internalType: "uint256",
3168
+ name: "activationBlock",
3169
+ type: "uint256"
3170
+ },
3171
+ {
3172
+ internalType: "uint256",
3173
+ name: "processingBlock",
3174
+ type: "uint256"
3175
+ },
3176
+ {
3177
+ internalType: "uint256",
3178
+ name: "proposalBlock",
3179
+ type: "uint256"
3180
+ }
3181
+ ],
3182
+ internalType: "struct ITransactions.ReadStateBlockRange",
3183
+ name: "readStateBlockRange",
3184
+ type: "tuple"
3185
+ },
3186
+ {
3187
+ internalType: "uint256",
3188
+ name: "numOfRounds",
3189
+ type: "uint256"
3190
+ },
3191
+ {
3192
+ components: [
3193
+ {
3194
+ internalType: "uint256",
3195
+ name: "round",
3196
+ type: "uint256"
3197
+ },
3198
+ {
3199
+ internalType: "uint256",
3200
+ name: "leaderIndex",
3201
+ type: "uint256"
3202
+ },
3203
+ {
3204
+ internalType: "uint256",
3205
+ name: "votesCommitted",
3206
+ type: "uint256"
3207
+ },
3208
+ {
3209
+ internalType: "uint256",
3210
+ name: "votesRevealed",
3211
+ type: "uint256"
3212
+ },
3213
+ {
3214
+ internalType: "uint256",
3215
+ name: "appealBond",
3216
+ type: "uint256"
3217
+ },
3218
+ {
3219
+ internalType: "uint256",
3220
+ name: "rotationsLeft",
3221
+ type: "uint256"
3222
+ },
3223
+ {
3224
+ internalType: "enum ITransactions.ResultType",
3225
+ name: "result",
3226
+ type: "uint8"
3227
+ },
3228
+ {
3229
+ internalType: "address[]",
3230
+ name: "roundValidators",
3231
+ type: "address[]"
3232
+ },
3233
+ {
3234
+ internalType: "bytes32[]",
3235
+ name: "validatorVotesHash",
3236
+ type: "bytes32[]"
3237
+ },
3238
+ {
3239
+ internalType: "enum ITransactions.VoteType[]",
3240
+ name: "validatorVotes",
3241
+ type: "uint8[]"
3242
+ }
3243
+ ],
3244
+ internalType: "struct ITransactions.RoundData",
3245
+ name: "lastRound",
3246
+ type: "tuple"
3247
+ }
3248
+ ],
3249
+ internalType: "struct ConsensusData.TransactionData",
3250
+ name: "txData",
3251
+ type: "tuple"
3252
+ }
3253
+ ],
3254
+ stateMutability: "view",
3255
+ type: "function"
3256
+ },
3257
+ {
3258
+ inputs: [
3259
+ {
3260
+ internalType: "address",
3261
+ name: "recipient",
3262
+ type: "address"
3263
+ },
3264
+ {
3265
+ internalType: "uint256",
3266
+ name: "startIndex",
3267
+ type: "uint256"
3268
+ },
3269
+ {
3270
+ internalType: "uint256",
3271
+ name: "pageSize",
3272
+ type: "uint256"
3273
+ }
3274
+ ],
3275
+ name: "getLatestFinalizedTransactions",
3276
+ outputs: [
3277
+ {
3278
+ components: [
3279
+ {
3280
+ internalType: "uint256",
3281
+ name: "currentTimestamp",
3282
+ type: "uint256"
3283
+ },
3284
+ {
3285
+ internalType: "address",
3286
+ name: "sender",
3287
+ type: "address"
3288
+ },
3289
+ {
3290
+ internalType: "address",
3291
+ name: "recipient",
3292
+ type: "address"
3293
+ },
3294
+ {
3295
+ internalType: "uint256",
3296
+ name: "numOfInitialValidators",
3297
+ type: "uint256"
3298
+ },
3299
+ {
3300
+ internalType: "uint256",
3301
+ name: "txSlot",
3302
+ type: "uint256"
3303
+ },
3304
+ {
3305
+ internalType: "uint256",
3306
+ name: "createdTimestamp",
3307
+ type: "uint256"
3308
+ },
3309
+ {
3310
+ internalType: "uint256",
3311
+ name: "lastVoteTimestamp",
3312
+ type: "uint256"
3313
+ },
3314
+ {
3315
+ internalType: "bytes32",
3316
+ name: "randomSeed",
3317
+ type: "bytes32"
3318
+ },
3319
+ {
3320
+ internalType: "enum ITransactions.ResultType",
3321
+ name: "result",
3322
+ type: "uint8"
3323
+ },
3324
+ {
3325
+ internalType: "bytes",
3326
+ name: "txData",
3327
+ type: "bytes"
3328
+ },
3329
+ {
3330
+ internalType: "bytes",
3331
+ name: "txReceipt",
3332
+ type: "bytes"
3333
+ },
3334
+ {
3335
+ components: [
3336
+ {
3337
+ internalType: "enum IMessages.MessageType",
3338
+ name: "messageType",
3339
+ type: "uint8"
3340
+ },
3341
+ {
3342
+ internalType: "address",
3343
+ name: "recipient",
3344
+ type: "address"
3345
+ },
3346
+ {
3347
+ internalType: "uint256",
3348
+ name: "value",
3349
+ type: "uint256"
3350
+ },
3351
+ {
3352
+ internalType: "bytes",
3353
+ name: "data",
3354
+ type: "bytes"
3355
+ },
3356
+ {
3357
+ internalType: "bool",
3358
+ name: "onAcceptance",
3359
+ type: "bool"
3360
+ }
3361
+ ],
3362
+ internalType: "struct IMessages.SubmittedMessage[]",
3363
+ name: "messages",
3364
+ type: "tuple[]"
3365
+ },
3366
+ {
3367
+ internalType: "enum IQueues.QueueType",
3368
+ name: "queueType",
3369
+ type: "uint8"
3370
+ },
3371
+ {
3372
+ internalType: "uint256",
3373
+ name: "queuePosition",
3374
+ type: "uint256"
3375
+ },
3376
+ {
3377
+ internalType: "address",
3378
+ name: "activator",
3379
+ type: "address"
3380
+ },
3381
+ {
3382
+ internalType: "address",
3383
+ name: "lastLeader",
3384
+ type: "address"
3385
+ },
3386
+ {
3387
+ internalType: "enum ITransactions.TransactionStatus",
3388
+ name: "status",
3389
+ type: "uint8"
3390
+ },
3391
+ {
3392
+ internalType: "bytes32",
3393
+ name: "txId",
3394
+ type: "bytes32"
3395
+ },
3396
+ {
3397
+ components: [
3398
+ {
3399
+ internalType: "uint256",
3400
+ name: "activationBlock",
3401
+ type: "uint256"
3402
+ },
3403
+ {
3404
+ internalType: "uint256",
3405
+ name: "processingBlock",
3406
+ type: "uint256"
3407
+ },
3408
+ {
3409
+ internalType: "uint256",
3410
+ name: "proposalBlock",
3411
+ type: "uint256"
3412
+ }
3413
+ ],
3414
+ internalType: "struct ITransactions.ReadStateBlockRange",
3415
+ name: "readStateBlockRange",
3416
+ type: "tuple"
3417
+ },
3418
+ {
3419
+ internalType: "uint256",
3420
+ name: "numOfRounds",
3421
+ type: "uint256"
3422
+ },
3423
+ {
3424
+ components: [
3425
+ {
3426
+ internalType: "uint256",
3427
+ name: "round",
3428
+ type: "uint256"
3429
+ },
3430
+ {
3431
+ internalType: "uint256",
3432
+ name: "leaderIndex",
3433
+ type: "uint256"
3434
+ },
3435
+ {
3436
+ internalType: "uint256",
3437
+ name: "votesCommitted",
3438
+ type: "uint256"
3439
+ },
3440
+ {
3441
+ internalType: "uint256",
3442
+ name: "votesRevealed",
3443
+ type: "uint256"
3444
+ },
3445
+ {
3446
+ internalType: "uint256",
3447
+ name: "appealBond",
3448
+ type: "uint256"
3449
+ },
3450
+ {
3451
+ internalType: "uint256",
3452
+ name: "rotationsLeft",
3453
+ type: "uint256"
3454
+ },
3455
+ {
3456
+ internalType: "enum ITransactions.ResultType",
3457
+ name: "result",
3458
+ type: "uint8"
3459
+ },
3460
+ {
3461
+ internalType: "address[]",
3462
+ name: "roundValidators",
3463
+ type: "address[]"
3464
+ },
3465
+ {
3466
+ internalType: "bytes32[]",
3467
+ name: "validatorVotesHash",
3468
+ type: "bytes32[]"
3469
+ },
3470
+ {
3471
+ internalType: "enum ITransactions.VoteType[]",
3472
+ name: "validatorVotes",
3473
+ type: "uint8[]"
3474
+ }
3475
+ ],
3476
+ internalType: "struct ITransactions.RoundData",
3477
+ name: "lastRound",
3478
+ type: "tuple"
3479
+ }
3480
+ ],
3481
+ internalType: "struct ConsensusData.TransactionData[]",
3482
+ name: "",
3483
+ type: "tuple[]"
3484
+ }
3485
+ ],
3486
+ stateMutability: "view",
3487
+ type: "function"
3488
+ },
3489
+ {
3490
+ inputs: [
3491
+ {
3492
+ internalType: "address",
3493
+ name: "recipient",
3494
+ type: "address"
3495
+ }
3496
+ ],
3497
+ name: "getLatestFinalizedTxCount",
3498
+ outputs: [
3499
+ {
3500
+ internalType: "uint256",
3501
+ name: "",
3502
+ type: "uint256"
3503
+ }
3504
+ ],
3505
+ stateMutability: "view",
3506
+ type: "function"
3507
+ },
3508
+ {
3509
+ inputs: [
3510
+ {
3511
+ internalType: "address",
3512
+ name: "recipient",
3513
+ type: "address"
3514
+ }
3515
+ ],
3516
+ name: "getLatestPendingTxCount",
3517
+ outputs: [
3518
+ {
3519
+ internalType: "uint256",
3520
+ name: "",
3521
+ type: "uint256"
3522
+ }
3523
+ ],
3524
+ stateMutability: "view",
3525
+ type: "function"
3526
+ },
3527
+ {
3528
+ inputs: [
3529
+ {
3530
+ internalType: "address",
3531
+ name: "recipient",
3532
+ type: "address"
3533
+ },
3534
+ {
3535
+ internalType: "uint256",
3536
+ name: "slot",
3537
+ type: "uint256"
3538
+ }
3539
+ ],
3540
+ name: "getLatestPendingTxId",
3541
+ outputs: [
3542
+ {
3543
+ internalType: "bytes32",
3544
+ name: "",
3545
+ type: "bytes32"
3546
+ }
3547
+ ],
3548
+ stateMutability: "view",
3549
+ type: "function"
3550
+ },
3551
+ {
3552
+ inputs: [
3553
+ {
3554
+ internalType: "address",
3555
+ name: "recipient",
3556
+ type: "address"
3557
+ }
3558
+ ],
3559
+ name: "getLatestUndeterminedTransaction",
3560
+ outputs: [
3561
+ {
3562
+ components: [
3563
+ {
3564
+ internalType: "uint256",
3565
+ name: "currentTimestamp",
3566
+ type: "uint256"
3567
+ },
3568
+ {
3569
+ internalType: "address",
3570
+ name: "sender",
3571
+ type: "address"
3572
+ },
3573
+ {
3574
+ internalType: "address",
3575
+ name: "recipient",
3576
+ type: "address"
3577
+ },
3578
+ {
3579
+ internalType: "uint256",
3580
+ name: "numOfInitialValidators",
3581
+ type: "uint256"
3582
+ },
3583
+ {
3584
+ internalType: "uint256",
3585
+ name: "txSlot",
3586
+ type: "uint256"
3587
+ },
3588
+ {
3589
+ internalType: "uint256",
3590
+ name: "createdTimestamp",
3591
+ type: "uint256"
3592
+ },
3593
+ {
3594
+ internalType: "uint256",
3595
+ name: "lastVoteTimestamp",
3596
+ type: "uint256"
3597
+ },
3598
+ {
3599
+ internalType: "bytes32",
3600
+ name: "randomSeed",
3601
+ type: "bytes32"
3602
+ },
3603
+ {
3604
+ internalType: "enum ITransactions.ResultType",
3605
+ name: "result",
3606
+ type: "uint8"
3607
+ },
3608
+ {
3609
+ internalType: "bytes",
3610
+ name: "txData",
3611
+ type: "bytes"
3612
+ },
3613
+ {
3614
+ internalType: "bytes",
3615
+ name: "txReceipt",
3616
+ type: "bytes"
3617
+ },
3618
+ {
3619
+ components: [
3620
+ {
3621
+ internalType: "enum IMessages.MessageType",
3622
+ name: "messageType",
3623
+ type: "uint8"
3624
+ },
3625
+ {
3626
+ internalType: "address",
3627
+ name: "recipient",
3628
+ type: "address"
3629
+ },
3630
+ {
3631
+ internalType: "uint256",
3632
+ name: "value",
3633
+ type: "uint256"
3634
+ },
3635
+ {
3636
+ internalType: "bytes",
3637
+ name: "data",
3638
+ type: "bytes"
3639
+ },
3640
+ {
3641
+ internalType: "bool",
3642
+ name: "onAcceptance",
3643
+ type: "bool"
3644
+ }
3645
+ ],
3646
+ internalType: "struct IMessages.SubmittedMessage[]",
3647
+ name: "messages",
3648
+ type: "tuple[]"
3649
+ },
3650
+ {
3651
+ internalType: "enum IQueues.QueueType",
3652
+ name: "queueType",
3653
+ type: "uint8"
3654
+ },
3655
+ {
3656
+ internalType: "uint256",
3657
+ name: "queuePosition",
3658
+ type: "uint256"
3659
+ },
3660
+ {
3661
+ internalType: "address",
3662
+ name: "activator",
3663
+ type: "address"
3664
+ },
3665
+ {
3666
+ internalType: "address",
3667
+ name: "lastLeader",
3668
+ type: "address"
3669
+ },
3670
+ {
3671
+ internalType: "enum ITransactions.TransactionStatus",
3672
+ name: "status",
3673
+ type: "uint8"
3674
+ },
3675
+ {
3676
+ internalType: "bytes32",
3677
+ name: "txId",
3678
+ type: "bytes32"
3679
+ },
3680
+ {
3681
+ components: [
3682
+ {
3683
+ internalType: "uint256",
3684
+ name: "activationBlock",
3685
+ type: "uint256"
3686
+ },
3687
+ {
3688
+ internalType: "uint256",
3689
+ name: "processingBlock",
3690
+ type: "uint256"
3691
+ },
3692
+ {
3693
+ internalType: "uint256",
3694
+ name: "proposalBlock",
3695
+ type: "uint256"
3696
+ }
3697
+ ],
3698
+ internalType: "struct ITransactions.ReadStateBlockRange",
3699
+ name: "readStateBlockRange",
3700
+ type: "tuple"
3701
+ },
3702
+ {
3703
+ internalType: "uint256",
3704
+ name: "numOfRounds",
3705
+ type: "uint256"
3706
+ },
3707
+ {
3708
+ components: [
3709
+ {
3710
+ internalType: "uint256",
3711
+ name: "round",
3712
+ type: "uint256"
3713
+ },
3714
+ {
3715
+ internalType: "uint256",
3716
+ name: "leaderIndex",
3717
+ type: "uint256"
3718
+ },
3719
+ {
3720
+ internalType: "uint256",
3721
+ name: "votesCommitted",
3722
+ type: "uint256"
3723
+ },
3724
+ {
3725
+ internalType: "uint256",
3726
+ name: "votesRevealed",
3727
+ type: "uint256"
3728
+ },
3729
+ {
3730
+ internalType: "uint256",
3731
+ name: "appealBond",
3732
+ type: "uint256"
3733
+ },
3734
+ {
3735
+ internalType: "uint256",
3736
+ name: "rotationsLeft",
3737
+ type: "uint256"
3738
+ },
3739
+ {
3740
+ internalType: "enum ITransactions.ResultType",
3741
+ name: "result",
3742
+ type: "uint8"
3743
+ },
3744
+ {
3745
+ internalType: "address[]",
3746
+ name: "roundValidators",
3747
+ type: "address[]"
3748
+ },
3749
+ {
3750
+ internalType: "bytes32[]",
3751
+ name: "validatorVotesHash",
3752
+ type: "bytes32[]"
3753
+ },
3754
+ {
3755
+ internalType: "enum ITransactions.VoteType[]",
3756
+ name: "validatorVotes",
3757
+ type: "uint8[]"
3758
+ }
3759
+ ],
3760
+ internalType: "struct ITransactions.RoundData",
3761
+ name: "lastRound",
3762
+ type: "tuple"
3763
+ }
3764
+ ],
3765
+ internalType: "struct ConsensusData.TransactionData",
3766
+ name: "txData",
3767
+ type: "tuple"
3768
+ }
3769
+ ],
3770
+ stateMutability: "view",
3771
+ type: "function"
3772
+ },
3773
+ {
3774
+ inputs: [
3775
+ {
3776
+ internalType: "address",
3777
+ name: "recipient",
3778
+ type: "address"
3779
+ }
3780
+ ],
3781
+ name: "getLatestUndeterminedTxCount",
3782
+ outputs: [
3783
+ {
3784
+ internalType: "uint256",
3785
+ name: "",
3786
+ type: "uint256"
3787
+ }
3788
+ ],
3789
+ stateMutability: "view",
3790
+ type: "function"
3791
+ },
3792
+ {
3793
+ inputs: [
3794
+ {
3795
+ internalType: "bytes32",
3796
+ name: "_tx_id",
3797
+ type: "bytes32"
3798
+ }
3799
+ ],
3800
+ name: "getMessagesForTransaction",
3801
+ outputs: [
3802
+ {
3803
+ components: [
3804
+ {
3805
+ internalType: "enum IMessages.MessageType",
3806
+ name: "messageType",
3807
+ type: "uint8"
3808
+ },
3809
+ {
3810
+ internalType: "address",
3811
+ name: "recipient",
3812
+ type: "address"
3813
+ },
3814
+ {
3815
+ internalType: "uint256",
3816
+ name: "value",
3817
+ type: "uint256"
3818
+ },
3819
+ {
3820
+ internalType: "bytes",
3821
+ name: "data",
3822
+ type: "bytes"
3823
+ },
3824
+ {
3825
+ internalType: "bool",
3826
+ name: "onAcceptance",
3827
+ type: "bool"
3828
+ }
3829
+ ],
3830
+ internalType: "struct IMessages.SubmittedMessage[]",
3831
+ name: "",
3832
+ type: "tuple[]"
3833
+ },
3834
+ {
3835
+ internalType: "address",
3836
+ name: "ghostAddress",
3837
+ type: "address"
3838
+ }
3839
+ ],
3840
+ stateMutability: "view",
3841
+ type: "function"
3842
+ },
3843
+ {
3844
+ inputs: [
3845
+ {
3846
+ internalType: "bytes32",
3847
+ name: "_tx_id",
3848
+ type: "bytes32"
3849
+ }
3850
+ ],
3851
+ name: "getReadStateBlockRangeForTransaction",
3852
+ outputs: [
3853
+ {
3854
+ internalType: "uint256",
3855
+ name: "activationBlock",
3856
+ type: "uint256"
3857
+ },
3858
+ {
3859
+ internalType: "uint256",
3860
+ name: "processingBlock",
3861
+ type: "uint256"
3862
+ },
3863
+ {
3864
+ internalType: "uint256",
3865
+ name: "proposalBlock",
3866
+ type: "uint256"
3867
+ }
3868
+ ],
3869
+ stateMutability: "view",
3870
+ type: "function"
3871
+ },
3872
+ {
3873
+ inputs: [
3874
+ {
3875
+ internalType: "address",
3876
+ name: "recipient",
3877
+ type: "address"
3878
+ },
3879
+ {
3880
+ internalType: "uint256",
3881
+ name: "startIndex",
3882
+ type: "uint256"
3883
+ },
3884
+ {
3885
+ internalType: "uint256",
3886
+ name: "endIndex",
3887
+ type: "uint256"
3888
+ }
3889
+ ],
3890
+ name: "getRecipientQueues",
3891
+ outputs: [
3892
+ {
3893
+ components: [
3894
+ {
3895
+ components: [
3896
+ {
3897
+ internalType: "uint256",
3898
+ name: "head",
3899
+ type: "uint256"
3900
+ },
3901
+ {
3902
+ internalType: "uint256",
3903
+ name: "tail",
3904
+ type: "uint256"
3905
+ },
3906
+ {
3907
+ internalType: "bytes32[]",
3908
+ name: "txIds",
3909
+ type: "bytes32[]"
3910
+ }
3911
+ ],
3912
+ internalType: "struct IQueues.QueueInfoView",
3913
+ name: "pending",
3914
+ type: "tuple"
3915
+ },
3916
+ {
3917
+ components: [
3918
+ {
3919
+ internalType: "uint256",
3920
+ name: "head",
3921
+ type: "uint256"
3922
+ },
3923
+ {
3924
+ internalType: "uint256",
3925
+ name: "tail",
3926
+ type: "uint256"
3927
+ },
3928
+ {
3929
+ internalType: "bytes32[]",
3930
+ name: "txIds",
3931
+ type: "bytes32[]"
3932
+ }
3933
+ ],
3934
+ internalType: "struct IQueues.QueueInfoView",
3935
+ name: "accepted",
3936
+ type: "tuple"
3937
+ },
3938
+ {
3939
+ components: [
3940
+ {
3941
+ internalType: "uint256",
3942
+ name: "head",
3943
+ type: "uint256"
3944
+ },
3945
+ {
3946
+ internalType: "uint256",
3947
+ name: "tail",
3948
+ type: "uint256"
3949
+ },
3950
+ {
3951
+ internalType: "bytes32[]",
3952
+ name: "txIds",
3953
+ type: "bytes32[]"
3954
+ }
3955
+ ],
3956
+ internalType: "struct IQueues.QueueInfoView",
3957
+ name: "undetermined",
3958
+ type: "tuple"
3959
+ },
3960
+ {
3961
+ internalType: "uint256",
3962
+ name: "finalizedCount",
3963
+ type: "uint256"
3964
+ },
3965
+ {
3966
+ internalType: "uint256",
3967
+ name: "issuedTxCount",
3968
+ type: "uint256"
3969
+ }
3970
+ ],
3971
+ internalType: "struct IQueues.RecipientQueuesView",
3972
+ name: "",
3973
+ type: "tuple"
3974
+ }
3975
+ ],
3976
+ stateMutability: "view",
3977
+ type: "function"
3978
+ },
3979
+ {
3980
+ inputs: [
3981
+ {
3982
+ internalType: "bytes32",
3983
+ name: "role",
3984
+ type: "bytes32"
3985
+ }
3986
+ ],
3987
+ name: "getRoleAdmin",
3988
+ outputs: [
3989
+ {
3990
+ internalType: "bytes32",
3991
+ name: "",
3992
+ type: "bytes32"
3993
+ }
3994
+ ],
3995
+ stateMutability: "view",
3996
+ type: "function"
3997
+ },
3998
+ {
3999
+ inputs: [],
4000
+ name: "getTotalNumOfTransactions",
4001
+ outputs: [
4002
+ {
4003
+ internalType: "uint256",
4004
+ name: "",
4005
+ type: "uint256"
4006
+ }
4007
+ ],
4008
+ stateMutability: "view",
4009
+ type: "function"
4010
+ },
4011
+ {
4012
+ inputs: [
4013
+ {
4014
+ internalType: "bytes32",
4015
+ name: "_tx_id",
4016
+ type: "bytes32"
4017
+ }
4018
+ ],
4019
+ name: "getTransactionAllData",
4020
+ outputs: [
4021
+ {
4022
+ components: [
4023
+ {
4024
+ internalType: "bytes32",
4025
+ name: "id",
4026
+ type: "bytes32"
4027
+ },
4028
+ {
4029
+ internalType: "address",
4030
+ name: "sender",
4031
+ type: "address"
4032
+ },
4033
+ {
4034
+ internalType: "address",
4035
+ name: "recipient",
4036
+ type: "address"
4037
+ },
4038
+ {
4039
+ internalType: "uint256",
4040
+ name: "numOfInitialValidators",
4041
+ type: "uint256"
4042
+ },
4043
+ {
4044
+ internalType: "uint256",
4045
+ name: "txSlot",
4046
+ type: "uint256"
4047
+ },
4048
+ {
4049
+ internalType: "address",
4050
+ name: "activator",
4051
+ type: "address"
4052
+ },
4053
+ {
4054
+ internalType: "enum ITransactions.TransactionStatus",
4055
+ name: "status",
4056
+ type: "uint8"
4057
+ },
4058
+ {
4059
+ internalType: "enum ITransactions.TransactionStatus",
4060
+ name: "previousStatus",
4061
+ type: "uint8"
4062
+ },
4063
+ {
4064
+ components: [
4065
+ {
4066
+ internalType: "uint256",
4067
+ name: "created",
4068
+ type: "uint256"
4069
+ },
4070
+ {
4071
+ internalType: "uint256",
4072
+ name: "pending",
4073
+ type: "uint256"
4074
+ },
4075
+ {
4076
+ internalType: "uint256",
4077
+ name: "activated",
4078
+ type: "uint256"
4079
+ },
4080
+ {
4081
+ internalType: "uint256",
4082
+ name: "proposed",
4083
+ type: "uint256"
4084
+ },
4085
+ {
4086
+ internalType: "uint256",
4087
+ name: "committed",
4088
+ type: "uint256"
4089
+ },
4090
+ {
4091
+ internalType: "uint256",
4092
+ name: "lastVote",
4093
+ type: "uint256"
4094
+ },
4095
+ {
4096
+ internalType: "uint256",
4097
+ name: "appealSubmitted",
4098
+ type: "uint256"
4099
+ }
4100
+ ],
4101
+ internalType: "struct ITransactions.Timestamps",
4102
+ name: "timestamps",
4103
+ type: "tuple"
4104
+ },
4105
+ {
4106
+ internalType: "bytes32",
4107
+ name: "randomSeed",
4108
+ type: "bytes32"
4109
+ },
4110
+ {
4111
+ internalType: "bool",
4112
+ name: "onAcceptanceMessages",
4113
+ type: "bool"
4114
+ },
4115
+ {
4116
+ internalType: "enum ITransactions.ResultType",
4117
+ name: "result",
4118
+ type: "uint8"
4119
+ },
4120
+ {
4121
+ components: [
4122
+ {
4123
+ internalType: "uint256",
4124
+ name: "activationBlock",
4125
+ type: "uint256"
4126
+ },
4127
+ {
4128
+ internalType: "uint256",
4129
+ name: "processingBlock",
4130
+ type: "uint256"
4131
+ },
4132
+ {
4133
+ internalType: "uint256",
4134
+ name: "proposalBlock",
4135
+ type: "uint256"
4136
+ }
4137
+ ],
4138
+ internalType: "struct ITransactions.ReadStateBlockRange",
4139
+ name: "readStateBlockRange",
4140
+ type: "tuple"
4141
+ },
4142
+ {
4143
+ internalType: "bytes",
4144
+ name: "txData",
4145
+ type: "bytes"
4146
+ },
4147
+ {
4148
+ internalType: "bytes",
4149
+ name: "txReceipt",
4150
+ type: "bytes"
4151
+ },
4152
+ {
4153
+ components: [
4154
+ {
4155
+ internalType: "enum IMessages.MessageType",
4156
+ name: "messageType",
4157
+ type: "uint8"
4158
+ },
4159
+ {
4160
+ internalType: "address",
4161
+ name: "recipient",
4162
+ type: "address"
4163
+ },
4164
+ {
4165
+ internalType: "uint256",
4166
+ name: "value",
4167
+ type: "uint256"
4168
+ },
4169
+ {
4170
+ internalType: "bytes",
4171
+ name: "data",
4172
+ type: "bytes"
4173
+ },
4174
+ {
4175
+ internalType: "bool",
4176
+ name: "onAcceptance",
4177
+ type: "bool"
4178
+ }
4179
+ ],
4180
+ internalType: "struct IMessages.SubmittedMessage[]",
4181
+ name: "messages",
4182
+ type: "tuple[]"
4183
+ },
4184
+ {
4185
+ internalType: "address[]",
4186
+ name: "consumedValidators",
4187
+ type: "address[]"
4188
+ },
4189
+ {
4190
+ components: [
4191
+ {
4192
+ internalType: "uint256",
4193
+ name: "round",
4194
+ type: "uint256"
4195
+ },
4196
+ {
4197
+ internalType: "uint256",
4198
+ name: "leaderIndex",
4199
+ type: "uint256"
4200
+ },
4201
+ {
4202
+ internalType: "uint256",
4203
+ name: "votesCommitted",
4204
+ type: "uint256"
4205
+ },
4206
+ {
4207
+ internalType: "uint256",
4208
+ name: "votesRevealed",
4209
+ type: "uint256"
4210
+ },
4211
+ {
4212
+ internalType: "uint256",
4213
+ name: "appealBond",
4214
+ type: "uint256"
4215
+ },
4216
+ {
4217
+ internalType: "uint256",
4218
+ name: "rotationsLeft",
4219
+ type: "uint256"
4220
+ },
4221
+ {
4222
+ internalType: "enum ITransactions.ResultType",
4223
+ name: "result",
4224
+ type: "uint8"
4225
+ },
4226
+ {
4227
+ internalType: "address[]",
4228
+ name: "roundValidators",
4229
+ type: "address[]"
4230
+ },
4231
+ {
4232
+ internalType: "bytes32[]",
4233
+ name: "validatorVotesHash",
4234
+ type: "bytes32[]"
4235
+ },
4236
+ {
4237
+ internalType: "enum ITransactions.VoteType[]",
4238
+ name: "validatorVotes",
4239
+ type: "uint8[]"
4240
+ }
4241
+ ],
4242
+ internalType: "struct ITransactions.RoundData[]",
4243
+ name: "roundData",
4244
+ type: "tuple[]"
4245
+ }
4246
+ ],
4247
+ internalType: "struct ITransactions.Transaction",
4248
+ name: "transaction",
4249
+ type: "tuple"
4250
+ }
4251
+ ],
4252
+ stateMutability: "view",
4253
+ type: "function"
4254
+ },
4255
+ {
4256
+ inputs: [
4257
+ {
4258
+ internalType: "bytes32",
4259
+ name: "_tx_id",
4260
+ type: "bytes32"
4261
+ },
4262
+ {
4263
+ internalType: "uint256",
4264
+ name: "_timestamp",
4265
+ type: "uint256"
4266
+ }
4267
+ ],
4268
+ name: "getTransactionData",
4269
+ outputs: [
4270
+ {
4271
+ components: [
4272
+ {
4273
+ internalType: "uint256",
4274
+ name: "currentTimestamp",
4275
+ type: "uint256"
4276
+ },
4277
+ {
4278
+ internalType: "address",
4279
+ name: "sender",
4280
+ type: "address"
4281
+ },
4282
+ {
4283
+ internalType: "address",
4284
+ name: "recipient",
4285
+ type: "address"
4286
+ },
4287
+ {
4288
+ internalType: "uint256",
4289
+ name: "numOfInitialValidators",
4290
+ type: "uint256"
4291
+ },
4292
+ {
4293
+ internalType: "uint256",
4294
+ name: "txSlot",
4295
+ type: "uint256"
4296
+ },
4297
+ {
4298
+ internalType: "uint256",
4299
+ name: "createdTimestamp",
4300
+ type: "uint256"
4301
+ },
4302
+ {
4303
+ internalType: "uint256",
4304
+ name: "lastVoteTimestamp",
4305
+ type: "uint256"
4306
+ },
4307
+ {
4308
+ internalType: "bytes32",
4309
+ name: "randomSeed",
4310
+ type: "bytes32"
4311
+ },
4312
+ {
4313
+ internalType: "enum ITransactions.ResultType",
4314
+ name: "result",
4315
+ type: "uint8"
4316
+ },
4317
+ {
4318
+ internalType: "bytes",
4319
+ name: "txData",
4320
+ type: "bytes"
4321
+ },
4322
+ {
4323
+ internalType: "bytes",
4324
+ name: "txReceipt",
4325
+ type: "bytes"
4326
+ },
4327
+ {
4328
+ components: [
4329
+ {
4330
+ internalType: "enum IMessages.MessageType",
4331
+ name: "messageType",
4332
+ type: "uint8"
4333
+ },
4334
+ {
4335
+ internalType: "address",
4336
+ name: "recipient",
4337
+ type: "address"
4338
+ },
4339
+ {
4340
+ internalType: "uint256",
4341
+ name: "value",
4342
+ type: "uint256"
4343
+ },
4344
+ {
4345
+ internalType: "bytes",
4346
+ name: "data",
4347
+ type: "bytes"
4348
+ },
4349
+ {
4350
+ internalType: "bool",
4351
+ name: "onAcceptance",
4352
+ type: "bool"
4353
+ }
4354
+ ],
4355
+ internalType: "struct IMessages.SubmittedMessage[]",
4356
+ name: "messages",
4357
+ type: "tuple[]"
4358
+ },
4359
+ {
4360
+ internalType: "enum IQueues.QueueType",
4361
+ name: "queueType",
4362
+ type: "uint8"
4363
+ },
4364
+ {
4365
+ internalType: "uint256",
4366
+ name: "queuePosition",
4367
+ type: "uint256"
4368
+ },
4369
+ {
4370
+ internalType: "address",
4371
+ name: "activator",
4372
+ type: "address"
4373
+ },
4374
+ {
4375
+ internalType: "address",
4376
+ name: "lastLeader",
4377
+ type: "address"
4378
+ },
4379
+ {
4380
+ internalType: "enum ITransactions.TransactionStatus",
4381
+ name: "status",
4382
+ type: "uint8"
4383
+ },
4384
+ {
4385
+ internalType: "bytes32",
4386
+ name: "txId",
4387
+ type: "bytes32"
4388
+ },
4389
+ {
4390
+ components: [
4391
+ {
4392
+ internalType: "uint256",
4393
+ name: "activationBlock",
4394
+ type: "uint256"
4395
+ },
4396
+ {
4397
+ internalType: "uint256",
4398
+ name: "processingBlock",
4399
+ type: "uint256"
4400
+ },
4401
+ {
4402
+ internalType: "uint256",
4403
+ name: "proposalBlock",
4404
+ type: "uint256"
4405
+ }
4406
+ ],
4407
+ internalType: "struct ITransactions.ReadStateBlockRange",
4408
+ name: "readStateBlockRange",
4409
+ type: "tuple"
4410
+ },
4411
+ {
4412
+ internalType: "uint256",
4413
+ name: "numOfRounds",
4414
+ type: "uint256"
4415
+ },
4416
+ {
4417
+ components: [
4418
+ {
4419
+ internalType: "uint256",
4420
+ name: "round",
4421
+ type: "uint256"
4422
+ },
4423
+ {
4424
+ internalType: "uint256",
4425
+ name: "leaderIndex",
4426
+ type: "uint256"
4427
+ },
4428
+ {
4429
+ internalType: "uint256",
4430
+ name: "votesCommitted",
4431
+ type: "uint256"
4432
+ },
4433
+ {
4434
+ internalType: "uint256",
4435
+ name: "votesRevealed",
4436
+ type: "uint256"
4437
+ },
4438
+ {
4439
+ internalType: "uint256",
4440
+ name: "appealBond",
4441
+ type: "uint256"
4442
+ },
4443
+ {
4444
+ internalType: "uint256",
4445
+ name: "rotationsLeft",
4446
+ type: "uint256"
4447
+ },
4448
+ {
4449
+ internalType: "enum ITransactions.ResultType",
4450
+ name: "result",
4451
+ type: "uint8"
4452
+ },
4453
+ {
4454
+ internalType: "address[]",
4455
+ name: "roundValidators",
4456
+ type: "address[]"
4457
+ },
4458
+ {
4459
+ internalType: "bytes32[]",
4460
+ name: "validatorVotesHash",
4461
+ type: "bytes32[]"
4462
+ },
4463
+ {
4464
+ internalType: "enum ITransactions.VoteType[]",
4465
+ name: "validatorVotes",
4466
+ type: "uint8[]"
4467
+ }
4468
+ ],
4469
+ internalType: "struct ITransactions.RoundData",
4470
+ name: "lastRound",
4471
+ type: "tuple"
4472
+ }
4473
+ ],
4474
+ internalType: "struct ConsensusData.TransactionData",
4475
+ name: "",
4476
+ type: "tuple"
4477
+ }
4478
+ ],
4479
+ stateMutability: "view",
4480
+ type: "function"
4481
+ },
4482
+ {
4483
+ inputs: [
4484
+ {
4485
+ internalType: "uint256",
4486
+ name: "startIndex",
4487
+ type: "uint256"
4488
+ },
4489
+ {
4490
+ internalType: "uint256",
4491
+ name: "endIndex",
4492
+ type: "uint256"
4493
+ }
4494
+ ],
4495
+ name: "getTransactionIndexToTxId",
4496
+ outputs: [
4497
+ {
4498
+ internalType: "bytes32[]",
4499
+ name: "",
4500
+ type: "bytes32[]"
4501
+ }
4502
+ ],
4503
+ stateMutability: "view",
4504
+ type: "function"
4505
+ },
4506
+ {
4507
+ inputs: [
4508
+ {
4509
+ internalType: "bytes32",
4510
+ name: "_tx_id",
4511
+ type: "bytes32"
4512
+ },
4513
+ {
4514
+ internalType: "uint256",
4515
+ name: "_timestamp",
4516
+ type: "uint256"
4517
+ }
4518
+ ],
4519
+ name: "getTransactionStatus",
4520
+ outputs: [
4521
+ {
4522
+ internalType: "enum ITransactions.TransactionStatus",
4523
+ name: "",
4524
+ type: "uint8"
4525
+ }
4526
+ ],
4527
+ stateMutability: "view",
4528
+ type: "function"
4529
+ },
4530
+ {
4531
+ inputs: [
4532
+ {
4533
+ internalType: "bytes32",
4534
+ name: "_tx_id",
4535
+ type: "bytes32"
4536
+ }
4537
+ ],
4538
+ name: "getValidatorsForLastAppeal",
4539
+ outputs: [
4540
+ {
4541
+ internalType: "address[]",
4542
+ name: "",
4543
+ type: "address[]"
4544
+ }
4545
+ ],
4546
+ stateMutability: "view",
4547
+ type: "function"
4548
+ },
4549
+ {
4550
+ inputs: [
4551
+ {
4552
+ internalType: "bytes32",
4553
+ name: "_tx_id",
4554
+ type: "bytes32"
4555
+ }
4556
+ ],
4557
+ name: "getValidatorsForLastRound",
4558
+ outputs: [
4559
+ {
4560
+ internalType: "address[]",
4561
+ name: "",
4562
+ type: "address[]"
4563
+ }
4564
+ ],
4565
+ stateMutability: "view",
4566
+ type: "function"
4567
+ },
4568
+ {
4569
+ inputs: [
4570
+ {
4571
+ internalType: "bytes32",
4572
+ name: "role",
4573
+ type: "bytes32"
4574
+ },
4575
+ {
4576
+ internalType: "address",
4577
+ name: "account",
4578
+ type: "address"
4579
+ }
4580
+ ],
4581
+ name: "grantRole",
4582
+ outputs: [],
4583
+ stateMutability: "nonpayable",
4584
+ type: "function"
4585
+ },
4586
+ {
4587
+ inputs: [
4588
+ {
4589
+ internalType: "bytes32",
4590
+ name: "role",
4591
+ type: "bytes32"
4592
+ },
4593
+ {
4594
+ internalType: "address",
4595
+ name: "account",
4596
+ type: "address"
4597
+ }
4598
+ ],
4599
+ name: "hasRole",
4600
+ outputs: [
4601
+ {
4602
+ internalType: "bool",
4603
+ name: "",
4604
+ type: "bool"
4605
+ }
4606
+ ],
4607
+ stateMutability: "view",
4608
+ type: "function"
4609
+ },
4610
+ {
4611
+ inputs: [
4612
+ {
4613
+ internalType: "bytes32",
4614
+ name: "_tx_id",
4615
+ type: "bytes32"
4616
+ }
4617
+ ],
4618
+ name: "hasTransactionOnAcceptanceMessages",
4619
+ outputs: [
4620
+ {
4621
+ internalType: "bool",
4622
+ name: "",
4623
+ type: "bool"
4624
+ }
4625
+ ],
4626
+ stateMutability: "view",
4627
+ type: "function"
4628
+ },
4629
+ {
4630
+ inputs: [
4631
+ {
4632
+ internalType: "bytes32",
4633
+ name: "_tx_id",
4634
+ type: "bytes32"
4635
+ }
4636
+ ],
4637
+ name: "hasTransactionOnFinalizationMessages",
4638
+ outputs: [
4639
+ {
4640
+ internalType: "bool",
4641
+ name: "",
4642
+ type: "bool"
4643
+ }
4644
+ ],
4645
+ stateMutability: "view",
4646
+ type: "function"
4647
+ },
4648
+ {
4649
+ inputs: [
4650
+ {
4651
+ internalType: "address",
4652
+ name: "_consensusMain",
4653
+ type: "address"
4654
+ },
4655
+ {
4656
+ internalType: "address",
4657
+ name: "_transactions",
4658
+ type: "address"
4659
+ },
4660
+ {
4661
+ internalType: "address",
4662
+ name: "_queues",
4663
+ type: "address"
4664
+ }
4665
+ ],
4666
+ name: "initialize",
4667
+ outputs: [],
4668
+ stateMutability: "nonpayable",
4669
+ type: "function"
4670
+ },
4671
+ {
4672
+ inputs: [],
4673
+ name: "owner",
4674
+ outputs: [
4675
+ {
4676
+ internalType: "address",
4677
+ name: "",
4678
+ type: "address"
4679
+ }
4680
+ ],
4681
+ stateMutability: "view",
4682
+ type: "function"
4683
+ },
4684
+ {
4685
+ inputs: [],
4686
+ name: "pendingOwner",
4687
+ outputs: [
4688
+ {
4689
+ internalType: "address",
4690
+ name: "",
4691
+ type: "address"
4692
+ }
4693
+ ],
4694
+ stateMutability: "view",
4695
+ type: "function"
4696
+ },
4697
+ {
4698
+ inputs: [],
4699
+ name: "queues",
4700
+ outputs: [
4701
+ {
4702
+ internalType: "contract IQueues",
4703
+ name: "",
4704
+ type: "address"
4705
+ }
4706
+ ],
4707
+ stateMutability: "view",
4708
+ type: "function"
4709
+ },
4710
+ {
4711
+ inputs: [],
4712
+ name: "renounceOwnership",
4713
+ outputs: [],
4714
+ stateMutability: "nonpayable",
4715
+ type: "function"
4716
+ },
4717
+ {
4718
+ inputs: [
4719
+ {
4720
+ internalType: "bytes32",
4721
+ name: "role",
4722
+ type: "bytes32"
4723
+ },
4724
+ {
4725
+ internalType: "address",
4726
+ name: "callerConfirmation",
4727
+ type: "address"
4728
+ }
4729
+ ],
4730
+ name: "renounceRole",
4731
+ outputs: [],
4732
+ stateMutability: "nonpayable",
4733
+ type: "function"
4734
+ },
4735
+ {
4736
+ inputs: [
4737
+ {
4738
+ internalType: "bytes32",
4739
+ name: "role",
4740
+ type: "bytes32"
4741
+ },
4742
+ {
4743
+ internalType: "address",
4744
+ name: "account",
4745
+ type: "address"
4746
+ }
4747
+ ],
4748
+ name: "revokeRole",
4749
+ outputs: [],
4750
+ stateMutability: "nonpayable",
4751
+ type: "function"
4752
+ },
4753
+ {
4754
+ inputs: [
4755
+ {
4756
+ internalType: "address",
4757
+ name: "_consensusMain",
4758
+ type: "address"
4759
+ }
4760
+ ],
4761
+ name: "setConsensusMain",
4762
+ outputs: [],
4763
+ stateMutability: "nonpayable",
4764
+ type: "function"
4765
+ },
4766
+ {
4767
+ inputs: [
4768
+ {
4769
+ internalType: "address",
4770
+ name: "_queues",
4771
+ type: "address"
4772
+ }
4773
+ ],
4774
+ name: "setQueues",
4775
+ outputs: [],
4776
+ stateMutability: "nonpayable",
4777
+ type: "function"
4778
+ },
4779
+ {
4780
+ inputs: [
4781
+ {
4782
+ internalType: "address",
4783
+ name: "_transactions",
4784
+ type: "address"
4785
+ }
4786
+ ],
4787
+ name: "setTransactions",
4788
+ outputs: [],
4789
+ stateMutability: "nonpayable",
4790
+ type: "function"
4791
+ },
4792
+ {
4793
+ inputs: [
4794
+ {
4795
+ internalType: "bytes4",
4796
+ name: "interfaceId",
4797
+ type: "bytes4"
4798
+ }
4799
+ ],
4800
+ name: "supportsInterface",
4801
+ outputs: [
4802
+ {
4803
+ internalType: "bool",
4804
+ name: "",
4805
+ type: "bool"
4806
+ }
4807
+ ],
4808
+ stateMutability: "view",
4809
+ type: "function"
4810
+ },
4811
+ {
4812
+ inputs: [],
4813
+ name: "transactions",
4814
+ outputs: [
4815
+ {
4816
+ internalType: "contract ITransactions",
4817
+ name: "",
4818
+ type: "address"
4819
+ }
4820
+ ],
4821
+ stateMutability: "view",
4822
+ type: "function"
4823
+ },
4824
+ {
4825
+ inputs: [
4826
+ {
4827
+ internalType: "address",
4828
+ name: "newOwner",
4829
+ type: "address"
4830
+ }
4831
+ ],
4832
+ name: "transferOwnership",
4833
+ outputs: [],
4834
+ stateMutability: "nonpayable",
4835
+ type: "function"
4836
+ }
4837
+ ],
4838
+ bytecode: ""
4839
+ };
4840
+ var studionet = defineChain({
4841
+ id: 61999,
4842
+ name: "Genlayer Studio Network",
4843
+ rpcUrls: {
4844
+ default: {
4845
+ http: [SIMULATOR_JSON_RPC_URL]
4846
+ }
4847
+ },
4848
+ nativeCurrency: {
4849
+ name: "GEN Token",
4850
+ symbol: "GEN",
4851
+ decimals: 18
4852
+ },
4853
+ blockExplorers: {
4854
+ default: {
4855
+ name: "GenLayer Explorer",
4856
+ url: EXPLORER_URL
4857
+ }
4858
+ },
4859
+ testnet: true,
4860
+ consensusMainContract: CONSENSUS_MAIN_CONTRACT,
4861
+ consensusDataContract: CONSENSUS_DATA_CONTRACT,
4862
+ defaultNumberOfInitialValidators: 5,
4863
+ defaultConsensusMaxRotations: 3
4864
+ });
4865
+
4866
+ // src/config/snapID.ts
4867
+ var snapID = {
4868
+ local: "local:http://localhost:8081",
4869
+ npm: "npm:genlayer-wallet-plugin"
4870
+ };
4871
+
4872
+ // src/wallet/connect.ts
4873
+ var networks = {
4874
+ localnet,
4875
+ studionet,
4876
+ testnetAsimov
800
4877
  };
801
- var connect = async (client, network = "localnet", snapSource = "npm") => {
4878
+ var connect = async (client, network = "studionet", snapSource = "npm") => {
802
4879
  if (!window.ethereum) {
803
4880
  throw new Error("MetaMask is not installed.");
804
4881
  }
805
- if (network === "testnet" || network === "mainnet") {
4882
+ if (network === "mainnet") {
806
4883
  throw new Error(`${network} is not available yet. Please use localnet.`);
807
4884
  }
808
4885
  const selectedNetwork = networks[network];
@@ -895,7 +4972,7 @@ function walletActions(client) {
895
4972
  function chainActions(client) {
896
4973
  return {
897
4974
  initializeConsensusSmartContract: async (forceReset = false) => {
898
- if (client.chain?.id !== testnet.id) {
4975
+ if (client.chain?.id === testnetAsimov.id) {
899
4976
  return;
900
4977
  }
901
4978
  if (!forceReset && client.chain.consensusMainContract?.address && client.chain.consensusMainContract?.abi) {