@oddmaki-protocol/sdk 0.1.0 → 0.2.0
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/README.md +5 -3
- package/dist/index.d.mts +1074 -177
- package/dist/index.d.ts +1074 -177
- package/dist/index.js +1323 -281
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1323 -281
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -10
package/dist/index.js
CHANGED
|
@@ -7,9 +7,9 @@ var graphqlRequest = require('graphql-request');
|
|
|
7
7
|
// src/client.ts
|
|
8
8
|
var CONTRACT_ADDRESSES = {
|
|
9
9
|
[chains.baseSepolia.id]: {
|
|
10
|
-
diamond: "
|
|
10
|
+
diamond: "0x2612a6949a4eeafa0bc39a7d82e0c926d4180d99",
|
|
11
11
|
conditionalTokens: "0x7364747372Ac4a175B5326f5B2C9CB1C271d32e8",
|
|
12
|
-
usdc: "
|
|
12
|
+
usdc: "0x643a4ec97528c719bbaa5457806d6898321df7d4",
|
|
13
13
|
subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki/version/latest"
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -399,6 +399,31 @@ var VenueFacet_default = [
|
|
|
399
399
|
outputs: [],
|
|
400
400
|
stateMutability: "nonpayable"
|
|
401
401
|
},
|
|
402
|
+
{
|
|
403
|
+
type: "event",
|
|
404
|
+
name: "VenueAccessControlUpdated",
|
|
405
|
+
inputs: [
|
|
406
|
+
{
|
|
407
|
+
name: "venueId",
|
|
408
|
+
type: "uint256",
|
|
409
|
+
indexed: true,
|
|
410
|
+
internalType: "uint256"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "tradingAccessControl",
|
|
414
|
+
type: "address",
|
|
415
|
+
indexed: false,
|
|
416
|
+
internalType: "address"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
name: "creationAccessControl",
|
|
420
|
+
type: "address",
|
|
421
|
+
indexed: false,
|
|
422
|
+
internalType: "address"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
anonymous: false
|
|
426
|
+
},
|
|
402
427
|
{
|
|
403
428
|
type: "event",
|
|
404
429
|
name: "VenueCreated",
|
|
@@ -564,6 +589,11 @@ var VenueFacet_default = [
|
|
|
564
589
|
name: "InvalidMarketCreationFee",
|
|
565
590
|
inputs: []
|
|
566
591
|
},
|
|
592
|
+
{
|
|
593
|
+
type: "error",
|
|
594
|
+
name: "InvalidTickSize",
|
|
595
|
+
inputs: []
|
|
596
|
+
},
|
|
567
597
|
{
|
|
568
598
|
type: "error",
|
|
569
599
|
name: "InvalidVenueFee",
|
|
@@ -579,6 +609,11 @@ var VenueFacet_default = [
|
|
|
579
609
|
name: "OnlyVenueOperator",
|
|
580
610
|
inputs: []
|
|
581
611
|
},
|
|
612
|
+
{
|
|
613
|
+
type: "error",
|
|
614
|
+
name: "ProtocolPaused",
|
|
615
|
+
inputs: []
|
|
616
|
+
},
|
|
582
617
|
{
|
|
583
618
|
type: "error",
|
|
584
619
|
name: "VenueInactive",
|
|
@@ -588,6 +623,11 @@ var VenueFacet_default = [
|
|
|
588
623
|
type: "error",
|
|
589
624
|
name: "VenueNotFound",
|
|
590
625
|
inputs: []
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
type: "error",
|
|
629
|
+
name: "VenueSuspended",
|
|
630
|
+
inputs: []
|
|
591
631
|
}
|
|
592
632
|
];
|
|
593
633
|
|
|
@@ -859,6 +899,16 @@ var MarketsFacet_default = [
|
|
|
859
899
|
name: "tickSize",
|
|
860
900
|
type: "uint256",
|
|
861
901
|
internalType: "uint256"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
name: "venueFeeBps",
|
|
905
|
+
type: "uint256",
|
|
906
|
+
internalType: "uint256"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
name: "creatorFeeBps",
|
|
910
|
+
type: "uint256",
|
|
911
|
+
internalType: "uint256"
|
|
862
912
|
}
|
|
863
913
|
]
|
|
864
914
|
}
|
|
@@ -1060,14 +1110,8 @@ var MarketsFacet_default = [
|
|
|
1060
1110
|
},
|
|
1061
1111
|
{
|
|
1062
1112
|
type: "event",
|
|
1063
|
-
name: "
|
|
1113
|
+
name: "MarketCreationFeeCollected",
|
|
1064
1114
|
inputs: [
|
|
1065
|
-
{
|
|
1066
|
-
name: "marketId",
|
|
1067
|
-
type: "uint256",
|
|
1068
|
-
indexed: true,
|
|
1069
|
-
internalType: "uint256"
|
|
1070
|
-
},
|
|
1071
1115
|
{
|
|
1072
1116
|
name: "venueId",
|
|
1073
1117
|
type: "uint256",
|
|
@@ -1075,17 +1119,29 @@ var MarketsFacet_default = [
|
|
|
1075
1119
|
internalType: "uint256"
|
|
1076
1120
|
},
|
|
1077
1121
|
{
|
|
1078
|
-
name: "
|
|
1122
|
+
name: "payer",
|
|
1079
1123
|
type: "address",
|
|
1080
1124
|
indexed: true,
|
|
1081
1125
|
internalType: "address"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
name: "protocolShare",
|
|
1129
|
+
type: "uint256",
|
|
1130
|
+
indexed: false,
|
|
1131
|
+
internalType: "uint256"
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "venueShare",
|
|
1135
|
+
type: "uint256",
|
|
1136
|
+
indexed: false,
|
|
1137
|
+
internalType: "uint256"
|
|
1082
1138
|
}
|
|
1083
1139
|
],
|
|
1084
1140
|
anonymous: false
|
|
1085
1141
|
},
|
|
1086
1142
|
{
|
|
1087
1143
|
type: "event",
|
|
1088
|
-
name: "
|
|
1144
|
+
name: "MarketPausedEvent",
|
|
1089
1145
|
inputs: [
|
|
1090
1146
|
{
|
|
1091
1147
|
name: "marketId",
|
|
@@ -1110,31 +1166,25 @@ var MarketsFacet_default = [
|
|
|
1110
1166
|
},
|
|
1111
1167
|
{
|
|
1112
1168
|
type: "event",
|
|
1113
|
-
name: "
|
|
1169
|
+
name: "MarketUnpausedEvent",
|
|
1114
1170
|
inputs: [
|
|
1115
1171
|
{
|
|
1116
|
-
name: "
|
|
1172
|
+
name: "marketId",
|
|
1117
1173
|
type: "uint256",
|
|
1118
1174
|
indexed: true,
|
|
1119
1175
|
internalType: "uint256"
|
|
1120
1176
|
},
|
|
1121
1177
|
{
|
|
1122
|
-
name: "
|
|
1123
|
-
type: "address",
|
|
1124
|
-
indexed: true,
|
|
1125
|
-
internalType: "address"
|
|
1126
|
-
},
|
|
1127
|
-
{
|
|
1128
|
-
name: "protocolShare",
|
|
1178
|
+
name: "venueId",
|
|
1129
1179
|
type: "uint256",
|
|
1130
|
-
indexed:
|
|
1180
|
+
indexed: true,
|
|
1131
1181
|
internalType: "uint256"
|
|
1132
1182
|
},
|
|
1133
1183
|
{
|
|
1134
|
-
name: "
|
|
1135
|
-
type: "
|
|
1136
|
-
indexed:
|
|
1137
|
-
internalType: "
|
|
1184
|
+
name: "operator",
|
|
1185
|
+
type: "address",
|
|
1186
|
+
indexed: true,
|
|
1187
|
+
internalType: "address"
|
|
1138
1188
|
}
|
|
1139
1189
|
],
|
|
1140
1190
|
anonymous: false
|
|
@@ -1220,6 +1270,11 @@ var MarketsFacet_default = [
|
|
|
1220
1270
|
],
|
|
1221
1271
|
anonymous: false
|
|
1222
1272
|
},
|
|
1273
|
+
{
|
|
1274
|
+
type: "error",
|
|
1275
|
+
name: "CollateralNotWhitelisted",
|
|
1276
|
+
inputs: []
|
|
1277
|
+
},
|
|
1223
1278
|
{
|
|
1224
1279
|
type: "error",
|
|
1225
1280
|
name: "CreationAccessDenied",
|
|
@@ -1267,42 +1322,42 @@ var MarketsFacet_default = [
|
|
|
1267
1322
|
},
|
|
1268
1323
|
{
|
|
1269
1324
|
type: "error",
|
|
1270
|
-
name: "
|
|
1325
|
+
name: "MarketGroupNotFound",
|
|
1271
1326
|
inputs: []
|
|
1272
1327
|
},
|
|
1273
1328
|
{
|
|
1274
1329
|
type: "error",
|
|
1275
|
-
name: "
|
|
1330
|
+
name: "MarketNotPlaceholder",
|
|
1276
1331
|
inputs: []
|
|
1277
1332
|
},
|
|
1278
1333
|
{
|
|
1279
1334
|
type: "error",
|
|
1280
|
-
name: "
|
|
1335
|
+
name: "NotGroupCreator",
|
|
1281
1336
|
inputs: []
|
|
1282
1337
|
},
|
|
1283
1338
|
{
|
|
1284
1339
|
type: "error",
|
|
1285
|
-
name: "
|
|
1340
|
+
name: "OnlyVenueOperator",
|
|
1286
1341
|
inputs: []
|
|
1287
1342
|
},
|
|
1288
1343
|
{
|
|
1289
1344
|
type: "error",
|
|
1290
|
-
name: "
|
|
1345
|
+
name: "OracleAlreadyExists",
|
|
1291
1346
|
inputs: []
|
|
1292
1347
|
},
|
|
1293
1348
|
{
|
|
1294
1349
|
type: "error",
|
|
1295
|
-
name: "
|
|
1350
|
+
name: "OracleCtfNotSet",
|
|
1296
1351
|
inputs: []
|
|
1297
1352
|
},
|
|
1298
1353
|
{
|
|
1299
1354
|
type: "error",
|
|
1300
|
-
name: "
|
|
1355
|
+
name: "OracleNotInitialized",
|
|
1301
1356
|
inputs: []
|
|
1302
1357
|
},
|
|
1303
1358
|
{
|
|
1304
1359
|
type: "error",
|
|
1305
|
-
name: "
|
|
1360
|
+
name: "ProtocolPaused",
|
|
1306
1361
|
inputs: []
|
|
1307
1362
|
},
|
|
1308
1363
|
{
|
|
@@ -1339,6 +1394,11 @@ var MarketsFacet_default = [
|
|
|
1339
1394
|
type: "error",
|
|
1340
1395
|
name: "VenueNotFound",
|
|
1341
1396
|
inputs: []
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
type: "error",
|
|
1400
|
+
name: "VenueSuspended",
|
|
1401
|
+
inputs: []
|
|
1342
1402
|
}
|
|
1343
1403
|
];
|
|
1344
1404
|
|
|
@@ -1357,6 +1417,30 @@ var LimitOrdersFacet_default = [
|
|
|
1357
1417
|
outputs: [],
|
|
1358
1418
|
stateMutability: "nonpayable"
|
|
1359
1419
|
},
|
|
1420
|
+
{
|
|
1421
|
+
type: "function",
|
|
1422
|
+
name: "cancelOrdersOnResolvedMarket",
|
|
1423
|
+
inputs: [
|
|
1424
|
+
{
|
|
1425
|
+
name: "marketId",
|
|
1426
|
+
type: "uint256",
|
|
1427
|
+
internalType: "uint256"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
name: "orderIds",
|
|
1431
|
+
type: "uint256[]",
|
|
1432
|
+
internalType: "uint256[]"
|
|
1433
|
+
}
|
|
1434
|
+
],
|
|
1435
|
+
outputs: [
|
|
1436
|
+
{
|
|
1437
|
+
name: "cancelledCount",
|
|
1438
|
+
type: "uint256",
|
|
1439
|
+
internalType: "uint256"
|
|
1440
|
+
}
|
|
1441
|
+
],
|
|
1442
|
+
stateMutability: "nonpayable"
|
|
1443
|
+
},
|
|
1360
1444
|
{
|
|
1361
1445
|
type: "function",
|
|
1362
1446
|
name: "expireOrders",
|
|
@@ -1672,6 +1756,11 @@ var LimitOrdersFacet_default = [
|
|
|
1672
1756
|
name: "BatchTooLarge",
|
|
1673
1757
|
inputs: []
|
|
1674
1758
|
},
|
|
1759
|
+
{
|
|
1760
|
+
type: "error",
|
|
1761
|
+
name: "BatchTooLarge",
|
|
1762
|
+
inputs: []
|
|
1763
|
+
},
|
|
1675
1764
|
{
|
|
1676
1765
|
type: "error",
|
|
1677
1766
|
name: "InvalidOutcome",
|
|
@@ -1694,17 +1783,17 @@ var LimitOrdersFacet_default = [
|
|
|
1694
1783
|
},
|
|
1695
1784
|
{
|
|
1696
1785
|
type: "error",
|
|
1697
|
-
name: "
|
|
1786
|
+
name: "MarketNotResolved",
|
|
1698
1787
|
inputs: []
|
|
1699
1788
|
},
|
|
1700
1789
|
{
|
|
1701
1790
|
type: "error",
|
|
1702
|
-
name: "
|
|
1791
|
+
name: "MarketPaused",
|
|
1703
1792
|
inputs: []
|
|
1704
1793
|
},
|
|
1705
1794
|
{
|
|
1706
1795
|
type: "error",
|
|
1707
|
-
name: "
|
|
1796
|
+
name: "OrderExpired",
|
|
1708
1797
|
inputs: []
|
|
1709
1798
|
},
|
|
1710
1799
|
{
|
|
@@ -1712,6 +1801,26 @@ var LimitOrdersFacet_default = [
|
|
|
1712
1801
|
name: "OrderTooSmall",
|
|
1713
1802
|
inputs: []
|
|
1714
1803
|
},
|
|
1804
|
+
{
|
|
1805
|
+
type: "error",
|
|
1806
|
+
name: "ProtocolPaused",
|
|
1807
|
+
inputs: []
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
type: "error",
|
|
1811
|
+
name: "TradingAccessDenied",
|
|
1812
|
+
inputs: []
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
type: "error",
|
|
1816
|
+
name: "TransferFailed",
|
|
1817
|
+
inputs: []
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
type: "error",
|
|
1821
|
+
name: "TransferFromFailed",
|
|
1822
|
+
inputs: []
|
|
1823
|
+
},
|
|
1715
1824
|
{
|
|
1716
1825
|
type: "error",
|
|
1717
1826
|
name: "VenueInactive",
|
|
@@ -1721,6 +1830,11 @@ var LimitOrdersFacet_default = [
|
|
|
1721
1830
|
type: "error",
|
|
1722
1831
|
name: "VenueNotFound",
|
|
1723
1832
|
inputs: []
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
type: "error",
|
|
1836
|
+
name: "VenueSuspended",
|
|
1837
|
+
inputs: []
|
|
1724
1838
|
}
|
|
1725
1839
|
];
|
|
1726
1840
|
|
|
@@ -1885,55 +1999,6 @@ var MatchingFacet_default = [
|
|
|
1885
1999
|
],
|
|
1886
2000
|
anonymous: false
|
|
1887
2001
|
},
|
|
1888
|
-
{
|
|
1889
|
-
type: "event",
|
|
1890
|
-
name: "TradeExecuted",
|
|
1891
|
-
inputs: [
|
|
1892
|
-
{
|
|
1893
|
-
name: "marketId",
|
|
1894
|
-
type: "uint256",
|
|
1895
|
-
indexed: true,
|
|
1896
|
-
internalType: "uint256"
|
|
1897
|
-
},
|
|
1898
|
-
{
|
|
1899
|
-
name: "outcomeId",
|
|
1900
|
-
type: "uint256",
|
|
1901
|
-
indexed: true,
|
|
1902
|
-
internalType: "uint256"
|
|
1903
|
-
},
|
|
1904
|
-
{
|
|
1905
|
-
name: "fillId",
|
|
1906
|
-
type: "uint256",
|
|
1907
|
-
indexed: true,
|
|
1908
|
-
internalType: "uint256"
|
|
1909
|
-
},
|
|
1910
|
-
{
|
|
1911
|
-
name: "priceTick",
|
|
1912
|
-
type: "uint256",
|
|
1913
|
-
indexed: false,
|
|
1914
|
-
internalType: "uint256"
|
|
1915
|
-
},
|
|
1916
|
-
{
|
|
1917
|
-
name: "quantity",
|
|
1918
|
-
type: "uint256",
|
|
1919
|
-
indexed: false,
|
|
1920
|
-
internalType: "uint256"
|
|
1921
|
-
},
|
|
1922
|
-
{
|
|
1923
|
-
name: "cumulativeVolume",
|
|
1924
|
-
type: "uint256",
|
|
1925
|
-
indexed: false,
|
|
1926
|
-
internalType: "uint256"
|
|
1927
|
-
},
|
|
1928
|
-
{
|
|
1929
|
-
name: "timestamp",
|
|
1930
|
-
type: "uint256",
|
|
1931
|
-
indexed: false,
|
|
1932
|
-
internalType: "uint256"
|
|
1933
|
-
}
|
|
1934
|
-
],
|
|
1935
|
-
anonymous: false
|
|
1936
|
-
},
|
|
1937
2002
|
{
|
|
1938
2003
|
type: "event",
|
|
1939
2004
|
name: "OrderDeleted",
|
|
@@ -2017,7 +2082,7 @@ var MatchingFacet_default = [
|
|
|
2017
2082
|
},
|
|
2018
2083
|
{
|
|
2019
2084
|
type: "event",
|
|
2020
|
-
name: "
|
|
2085
|
+
name: "SurplusRouted",
|
|
2021
2086
|
inputs: [
|
|
2022
2087
|
{
|
|
2023
2088
|
name: "marketId",
|
|
@@ -2026,19 +2091,13 @@ var MatchingFacet_default = [
|
|
|
2026
2091
|
internalType: "uint256"
|
|
2027
2092
|
},
|
|
2028
2093
|
{
|
|
2029
|
-
name: "
|
|
2094
|
+
name: "fillId",
|
|
2030
2095
|
type: "uint256",
|
|
2031
2096
|
indexed: true,
|
|
2032
2097
|
internalType: "uint256"
|
|
2033
2098
|
},
|
|
2034
2099
|
{
|
|
2035
|
-
name: "
|
|
2036
|
-
type: "uint8",
|
|
2037
|
-
indexed: false,
|
|
2038
|
-
internalType: "enum Side"
|
|
2039
|
-
},
|
|
2040
|
-
{
|
|
2041
|
-
name: "bestTick",
|
|
2100
|
+
name: "amount",
|
|
2042
2101
|
type: "uint256",
|
|
2043
2102
|
indexed: false,
|
|
2044
2103
|
internalType: "uint256"
|
|
@@ -2047,29 +2106,198 @@ var MatchingFacet_default = [
|
|
|
2047
2106
|
anonymous: false
|
|
2048
2107
|
},
|
|
2049
2108
|
{
|
|
2050
|
-
type: "
|
|
2051
|
-
name: "
|
|
2052
|
-
inputs: [
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2109
|
+
type: "event",
|
|
2110
|
+
name: "SurplusRouted",
|
|
2111
|
+
inputs: [
|
|
2112
|
+
{
|
|
2113
|
+
name: "marketId",
|
|
2114
|
+
type: "uint256",
|
|
2115
|
+
indexed: true,
|
|
2116
|
+
internalType: "uint256"
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
name: "fillId",
|
|
2120
|
+
type: "uint256",
|
|
2121
|
+
indexed: true,
|
|
2122
|
+
internalType: "uint256"
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
name: "amount",
|
|
2126
|
+
type: "uint256",
|
|
2127
|
+
indexed: false,
|
|
2128
|
+
internalType: "uint256"
|
|
2129
|
+
}
|
|
2130
|
+
],
|
|
2131
|
+
anonymous: false
|
|
2132
|
+
},
|
|
2133
|
+
{
|
|
2134
|
+
type: "event",
|
|
2135
|
+
name: "TopOfBookChanged",
|
|
2136
|
+
inputs: [
|
|
2137
|
+
{
|
|
2138
|
+
name: "marketId",
|
|
2139
|
+
type: "uint256",
|
|
2140
|
+
indexed: true,
|
|
2141
|
+
internalType: "uint256"
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
name: "outcomeId",
|
|
2145
|
+
type: "uint256",
|
|
2146
|
+
indexed: true,
|
|
2147
|
+
internalType: "uint256"
|
|
2148
|
+
},
|
|
2149
|
+
{
|
|
2150
|
+
name: "side",
|
|
2151
|
+
type: "uint8",
|
|
2152
|
+
indexed: false,
|
|
2153
|
+
internalType: "enum Side"
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
name: "bestTick",
|
|
2157
|
+
type: "uint256",
|
|
2158
|
+
indexed: false,
|
|
2159
|
+
internalType: "uint256"
|
|
2160
|
+
}
|
|
2161
|
+
],
|
|
2162
|
+
anonymous: false
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
type: "event",
|
|
2166
|
+
name: "TradeExecuted",
|
|
2167
|
+
inputs: [
|
|
2168
|
+
{
|
|
2169
|
+
name: "marketId",
|
|
2170
|
+
type: "uint256",
|
|
2171
|
+
indexed: true,
|
|
2172
|
+
internalType: "uint256"
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
name: "outcomeId",
|
|
2176
|
+
type: "uint256",
|
|
2177
|
+
indexed: true,
|
|
2178
|
+
internalType: "uint256"
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
name: "fillId",
|
|
2182
|
+
type: "uint256",
|
|
2183
|
+
indexed: true,
|
|
2184
|
+
internalType: "uint256"
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
name: "priceTick",
|
|
2188
|
+
type: "uint256",
|
|
2189
|
+
indexed: false,
|
|
2190
|
+
internalType: "uint256"
|
|
2191
|
+
},
|
|
2192
|
+
{
|
|
2193
|
+
name: "quantity",
|
|
2194
|
+
type: "uint256",
|
|
2195
|
+
indexed: false,
|
|
2196
|
+
internalType: "uint256"
|
|
2197
|
+
},
|
|
2198
|
+
{
|
|
2199
|
+
name: "cumulativeVolume",
|
|
2200
|
+
type: "uint256",
|
|
2201
|
+
indexed: false,
|
|
2202
|
+
internalType: "uint256"
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
name: "timestamp",
|
|
2206
|
+
type: "uint256",
|
|
2207
|
+
indexed: false,
|
|
2208
|
+
internalType: "uint256"
|
|
2209
|
+
}
|
|
2210
|
+
],
|
|
2211
|
+
anonymous: false
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
type: "event",
|
|
2215
|
+
name: "TradeExecuted",
|
|
2216
|
+
inputs: [
|
|
2217
|
+
{
|
|
2218
|
+
name: "marketId",
|
|
2219
|
+
type: "uint256",
|
|
2220
|
+
indexed: true,
|
|
2221
|
+
internalType: "uint256"
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
name: "outcomeId",
|
|
2225
|
+
type: "uint256",
|
|
2226
|
+
indexed: true,
|
|
2227
|
+
internalType: "uint256"
|
|
2228
|
+
},
|
|
2229
|
+
{
|
|
2230
|
+
name: "fillId",
|
|
2231
|
+
type: "uint256",
|
|
2232
|
+
indexed: true,
|
|
2233
|
+
internalType: "uint256"
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
name: "priceTick",
|
|
2237
|
+
type: "uint256",
|
|
2238
|
+
indexed: false,
|
|
2239
|
+
internalType: "uint256"
|
|
2240
|
+
},
|
|
2241
|
+
{
|
|
2242
|
+
name: "quantity",
|
|
2243
|
+
type: "uint256",
|
|
2244
|
+
indexed: false,
|
|
2245
|
+
internalType: "uint256"
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
name: "cumulativeVolume",
|
|
2249
|
+
type: "uint256",
|
|
2250
|
+
indexed: false,
|
|
2251
|
+
internalType: "uint256"
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
name: "timestamp",
|
|
2255
|
+
type: "uint256",
|
|
2256
|
+
indexed: false,
|
|
2257
|
+
internalType: "uint256"
|
|
2258
|
+
}
|
|
2259
|
+
],
|
|
2260
|
+
anonymous: false
|
|
2261
|
+
},
|
|
2262
|
+
{
|
|
2263
|
+
type: "error",
|
|
2264
|
+
name: "ApproveFailed",
|
|
2265
|
+
inputs: []
|
|
2266
|
+
},
|
|
2267
|
+
{
|
|
2268
|
+
type: "error",
|
|
2269
|
+
name: "MarketNotActive",
|
|
2270
|
+
inputs: []
|
|
2271
|
+
},
|
|
2272
|
+
{
|
|
2273
|
+
type: "error",
|
|
2274
|
+
name: "MarketPaused",
|
|
2275
|
+
inputs: []
|
|
2276
|
+
},
|
|
2277
|
+
{
|
|
2278
|
+
type: "error",
|
|
2279
|
+
name: "ProtocolPaused",
|
|
2280
|
+
inputs: []
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
type: "error",
|
|
2284
|
+
name: "TransferFailed",
|
|
2285
|
+
inputs: []
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
type: "error",
|
|
2289
|
+
name: "VenueInactive",
|
|
2067
2290
|
inputs: []
|
|
2068
2291
|
},
|
|
2069
2292
|
{
|
|
2070
2293
|
type: "error",
|
|
2071
2294
|
name: "VenueNotFound",
|
|
2072
2295
|
inputs: []
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
type: "error",
|
|
2299
|
+
name: "VenueSuspended",
|
|
2300
|
+
inputs: []
|
|
2073
2301
|
}
|
|
2074
2302
|
];
|
|
2075
2303
|
|
|
@@ -2673,6 +2901,11 @@ var MarketGroupFacet_default = [
|
|
|
2673
2901
|
],
|
|
2674
2902
|
anonymous: false
|
|
2675
2903
|
},
|
|
2904
|
+
{
|
|
2905
|
+
type: "error",
|
|
2906
|
+
name: "CollateralNotWhitelisted",
|
|
2907
|
+
inputs: []
|
|
2908
|
+
},
|
|
2676
2909
|
{
|
|
2677
2910
|
type: "error",
|
|
2678
2911
|
name: "CreationAccessDenied",
|
|
@@ -2693,6 +2926,11 @@ var MarketGroupFacet_default = [
|
|
|
2693
2926
|
name: "InvalidQuestion",
|
|
2694
2927
|
inputs: []
|
|
2695
2928
|
},
|
|
2929
|
+
{
|
|
2930
|
+
type: "error",
|
|
2931
|
+
name: "InvalidTickSize",
|
|
2932
|
+
inputs: []
|
|
2933
|
+
},
|
|
2696
2934
|
{
|
|
2697
2935
|
type: "error",
|
|
2698
2936
|
name: "MarketGroupNotFound",
|
|
@@ -2703,6 +2941,11 @@ var MarketGroupFacet_default = [
|
|
|
2703
2941
|
name: "NotGroupCreator",
|
|
2704
2942
|
inputs: []
|
|
2705
2943
|
},
|
|
2944
|
+
{
|
|
2945
|
+
type: "error",
|
|
2946
|
+
name: "ProtocolPaused",
|
|
2947
|
+
inputs: []
|
|
2948
|
+
},
|
|
2706
2949
|
{
|
|
2707
2950
|
type: "error",
|
|
2708
2951
|
name: "TooManyTags",
|
|
@@ -2722,6 +2965,11 @@ var MarketGroupFacet_default = [
|
|
|
2722
2965
|
type: "error",
|
|
2723
2966
|
name: "VenueNotFound",
|
|
2724
2967
|
inputs: []
|
|
2968
|
+
},
|
|
2969
|
+
{
|
|
2970
|
+
type: "error",
|
|
2971
|
+
name: "VenueSuspended",
|
|
2972
|
+
inputs: []
|
|
2725
2973
|
}
|
|
2726
2974
|
];
|
|
2727
2975
|
|
|
@@ -2789,73 +3037,134 @@ var MarketOrdersFacet_default = [
|
|
|
2789
3037
|
stateMutability: "nonpayable"
|
|
2790
3038
|
},
|
|
2791
3039
|
{
|
|
2792
|
-
type: "
|
|
2793
|
-
name: "
|
|
3040
|
+
type: "function",
|
|
3041
|
+
name: "placeMarketSell",
|
|
2794
3042
|
inputs: [
|
|
2795
3043
|
{
|
|
2796
3044
|
name: "marketId",
|
|
2797
3045
|
type: "uint256",
|
|
2798
|
-
indexed: true,
|
|
2799
|
-
internalType: "uint256"
|
|
2800
|
-
},
|
|
2801
|
-
{
|
|
2802
|
-
name: "fillId",
|
|
2803
|
-
type: "uint256",
|
|
2804
|
-
indexed: true,
|
|
2805
|
-
internalType: "uint256"
|
|
2806
|
-
},
|
|
2807
|
-
{
|
|
2808
|
-
name: "protocolFee",
|
|
2809
|
-
type: "uint256",
|
|
2810
|
-
indexed: false,
|
|
2811
3046
|
internalType: "uint256"
|
|
2812
3047
|
},
|
|
2813
3048
|
{
|
|
2814
|
-
name: "
|
|
3049
|
+
name: "outcomeId",
|
|
2815
3050
|
type: "uint256",
|
|
2816
|
-
indexed: false,
|
|
2817
3051
|
internalType: "uint256"
|
|
2818
3052
|
},
|
|
2819
3053
|
{
|
|
2820
|
-
name: "
|
|
3054
|
+
name: "tokenAmount",
|
|
2821
3055
|
type: "uint256",
|
|
2822
|
-
indexed: false,
|
|
2823
3056
|
internalType: "uint256"
|
|
2824
3057
|
},
|
|
2825
3058
|
{
|
|
2826
|
-
name: "
|
|
3059
|
+
name: "minPriceTick",
|
|
2827
3060
|
type: "uint256",
|
|
2828
|
-
indexed: false,
|
|
2829
3061
|
internalType: "uint256"
|
|
2830
3062
|
},
|
|
2831
3063
|
{
|
|
2832
|
-
name: "
|
|
2833
|
-
type: "
|
|
2834
|
-
|
|
2835
|
-
internalType: "uint256"
|
|
3064
|
+
name: "orderType",
|
|
3065
|
+
type: "uint8",
|
|
3066
|
+
internalType: "enum MarketOrderType"
|
|
2836
3067
|
}
|
|
2837
3068
|
],
|
|
2838
|
-
|
|
2839
|
-
},
|
|
2840
|
-
{
|
|
2841
|
-
type: "event",
|
|
2842
|
-
name: "MarketOrderExecuted",
|
|
2843
|
-
inputs: [
|
|
2844
|
-
{
|
|
2845
|
-
name: "buyer",
|
|
2846
|
-
type: "address",
|
|
2847
|
-
indexed: true,
|
|
2848
|
-
internalType: "address"
|
|
2849
|
-
},
|
|
2850
|
-
{
|
|
2851
|
-
name: "marketId",
|
|
2852
|
-
type: "uint256",
|
|
2853
|
-
indexed: true,
|
|
2854
|
-
internalType: "uint256"
|
|
2855
|
-
},
|
|
3069
|
+
outputs: [
|
|
2856
3070
|
{
|
|
2857
|
-
name: "
|
|
2858
|
-
type: "
|
|
3071
|
+
name: "result",
|
|
3072
|
+
type: "tuple",
|
|
3073
|
+
internalType: "struct MarketSellResult",
|
|
3074
|
+
components: [
|
|
3075
|
+
{
|
|
3076
|
+
name: "tokensSold",
|
|
3077
|
+
type: "uint256",
|
|
3078
|
+
internalType: "uint256"
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
name: "avgPrice",
|
|
3082
|
+
type: "uint256",
|
|
3083
|
+
internalType: "uint256"
|
|
3084
|
+
},
|
|
3085
|
+
{
|
|
3086
|
+
name: "collateralReceived",
|
|
3087
|
+
type: "uint256",
|
|
3088
|
+
internalType: "uint256"
|
|
3089
|
+
},
|
|
3090
|
+
{
|
|
3091
|
+
name: "unsoldTokens",
|
|
3092
|
+
type: "uint256",
|
|
3093
|
+
internalType: "uint256"
|
|
3094
|
+
}
|
|
3095
|
+
]
|
|
3096
|
+
}
|
|
3097
|
+
],
|
|
3098
|
+
stateMutability: "nonpayable"
|
|
3099
|
+
},
|
|
3100
|
+
{
|
|
3101
|
+
type: "event",
|
|
3102
|
+
name: "FeesDistributed",
|
|
3103
|
+
inputs: [
|
|
3104
|
+
{
|
|
3105
|
+
name: "marketId",
|
|
3106
|
+
type: "uint256",
|
|
3107
|
+
indexed: true,
|
|
3108
|
+
internalType: "uint256"
|
|
3109
|
+
},
|
|
3110
|
+
{
|
|
3111
|
+
name: "fillId",
|
|
3112
|
+
type: "uint256",
|
|
3113
|
+
indexed: true,
|
|
3114
|
+
internalType: "uint256"
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
name: "protocolFee",
|
|
3118
|
+
type: "uint256",
|
|
3119
|
+
indexed: false,
|
|
3120
|
+
internalType: "uint256"
|
|
3121
|
+
},
|
|
3122
|
+
{
|
|
3123
|
+
name: "venueNetFee",
|
|
3124
|
+
type: "uint256",
|
|
3125
|
+
indexed: false,
|
|
3126
|
+
internalType: "uint256"
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
name: "creatorFee",
|
|
3130
|
+
type: "uint256",
|
|
3131
|
+
indexed: false,
|
|
3132
|
+
internalType: "uint256"
|
|
3133
|
+
},
|
|
3134
|
+
{
|
|
3135
|
+
name: "operatorFee",
|
|
3136
|
+
type: "uint256",
|
|
3137
|
+
indexed: false,
|
|
3138
|
+
internalType: "uint256"
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
name: "totalFee",
|
|
3142
|
+
type: "uint256",
|
|
3143
|
+
indexed: false,
|
|
3144
|
+
internalType: "uint256"
|
|
3145
|
+
}
|
|
3146
|
+
],
|
|
3147
|
+
anonymous: false
|
|
3148
|
+
},
|
|
3149
|
+
{
|
|
3150
|
+
type: "event",
|
|
3151
|
+
name: "MarketOrderExecuted",
|
|
3152
|
+
inputs: [
|
|
3153
|
+
{
|
|
3154
|
+
name: "buyer",
|
|
3155
|
+
type: "address",
|
|
3156
|
+
indexed: true,
|
|
3157
|
+
internalType: "address"
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
name: "marketId",
|
|
3161
|
+
type: "uint256",
|
|
3162
|
+
indexed: true,
|
|
3163
|
+
internalType: "uint256"
|
|
3164
|
+
},
|
|
3165
|
+
{
|
|
3166
|
+
name: "outcomeId",
|
|
3167
|
+
type: "uint256",
|
|
2859
3168
|
indexed: false,
|
|
2860
3169
|
internalType: "uint256"
|
|
2861
3170
|
},
|
|
@@ -2886,6 +3195,55 @@ var MarketOrdersFacet_default = [
|
|
|
2886
3195
|
],
|
|
2887
3196
|
anonymous: false
|
|
2888
3197
|
},
|
|
3198
|
+
{
|
|
3199
|
+
type: "event",
|
|
3200
|
+
name: "MarketSellExecuted",
|
|
3201
|
+
inputs: [
|
|
3202
|
+
{
|
|
3203
|
+
name: "seller",
|
|
3204
|
+
type: "address",
|
|
3205
|
+
indexed: true,
|
|
3206
|
+
internalType: "address"
|
|
3207
|
+
},
|
|
3208
|
+
{
|
|
3209
|
+
name: "marketId",
|
|
3210
|
+
type: "uint256",
|
|
3211
|
+
indexed: true,
|
|
3212
|
+
internalType: "uint256"
|
|
3213
|
+
},
|
|
3214
|
+
{
|
|
3215
|
+
name: "outcomeId",
|
|
3216
|
+
type: "uint256",
|
|
3217
|
+
indexed: false,
|
|
3218
|
+
internalType: "uint256"
|
|
3219
|
+
},
|
|
3220
|
+
{
|
|
3221
|
+
name: "tokensSold",
|
|
3222
|
+
type: "uint256",
|
|
3223
|
+
indexed: false,
|
|
3224
|
+
internalType: "uint256"
|
|
3225
|
+
},
|
|
3226
|
+
{
|
|
3227
|
+
name: "collateralReceived",
|
|
3228
|
+
type: "uint256",
|
|
3229
|
+
indexed: false,
|
|
3230
|
+
internalType: "uint256"
|
|
3231
|
+
},
|
|
3232
|
+
{
|
|
3233
|
+
name: "avgPrice",
|
|
3234
|
+
type: "uint256",
|
|
3235
|
+
indexed: false,
|
|
3236
|
+
internalType: "uint256"
|
|
3237
|
+
},
|
|
3238
|
+
{
|
|
3239
|
+
name: "unsoldTokens",
|
|
3240
|
+
type: "uint256",
|
|
3241
|
+
indexed: false,
|
|
3242
|
+
internalType: "uint256"
|
|
3243
|
+
}
|
|
3244
|
+
],
|
|
3245
|
+
anonymous: false
|
|
3246
|
+
},
|
|
2889
3247
|
{
|
|
2890
3248
|
type: "event",
|
|
2891
3249
|
name: "OrderDeleted",
|
|
@@ -2965,6 +3323,11 @@ var MarketOrdersFacet_default = [
|
|
|
2965
3323
|
name: "InvalidMaxPrice",
|
|
2966
3324
|
inputs: []
|
|
2967
3325
|
},
|
|
3326
|
+
{
|
|
3327
|
+
type: "error",
|
|
3328
|
+
name: "InvalidMinPrice",
|
|
3329
|
+
inputs: []
|
|
3330
|
+
},
|
|
2968
3331
|
{
|
|
2969
3332
|
type: "error",
|
|
2970
3333
|
name: "InvalidOutcome",
|
|
@@ -2977,17 +3340,32 @@ var MarketOrdersFacet_default = [
|
|
|
2977
3340
|
},
|
|
2978
3341
|
{
|
|
2979
3342
|
type: "error",
|
|
2980
|
-
name: "
|
|
3343
|
+
name: "MarketPaused",
|
|
2981
3344
|
inputs: []
|
|
2982
3345
|
},
|
|
2983
3346
|
{
|
|
2984
3347
|
type: "error",
|
|
2985
|
-
name: "
|
|
3348
|
+
name: "NoLiquidityAvailable",
|
|
2986
3349
|
inputs: []
|
|
2987
3350
|
},
|
|
2988
3351
|
{
|
|
2989
3352
|
type: "error",
|
|
2990
|
-
name: "
|
|
3353
|
+
name: "ProtocolPaused",
|
|
3354
|
+
inputs: []
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
type: "error",
|
|
3358
|
+
name: "TradingAccessDenied",
|
|
3359
|
+
inputs: []
|
|
3360
|
+
},
|
|
3361
|
+
{
|
|
3362
|
+
type: "error",
|
|
3363
|
+
name: "TransferFailed",
|
|
3364
|
+
inputs: []
|
|
3365
|
+
},
|
|
3366
|
+
{
|
|
3367
|
+
type: "error",
|
|
3368
|
+
name: "TransferFromFailed",
|
|
2991
3369
|
inputs: []
|
|
2992
3370
|
},
|
|
2993
3371
|
{
|
|
@@ -2999,6 +3377,21 @@ var MarketOrdersFacet_default = [
|
|
|
2999
3377
|
type: "error",
|
|
3000
3378
|
name: "VenueNotFound",
|
|
3001
3379
|
inputs: []
|
|
3380
|
+
},
|
|
3381
|
+
{
|
|
3382
|
+
type: "error",
|
|
3383
|
+
name: "VenueSuspended",
|
|
3384
|
+
inputs: []
|
|
3385
|
+
},
|
|
3386
|
+
{
|
|
3387
|
+
type: "error",
|
|
3388
|
+
name: "ZeroCollateralAmount",
|
|
3389
|
+
inputs: []
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
type: "error",
|
|
3393
|
+
name: "ZeroTokenAmount",
|
|
3394
|
+
inputs: []
|
|
3002
3395
|
}
|
|
3003
3396
|
];
|
|
3004
3397
|
|
|
@@ -3213,6 +3606,50 @@ var ResolutionFacet_default = [
|
|
|
3213
3606
|
],
|
|
3214
3607
|
anonymous: false
|
|
3215
3608
|
},
|
|
3609
|
+
{
|
|
3610
|
+
type: "event",
|
|
3611
|
+
name: "MarketGroupResolved",
|
|
3612
|
+
inputs: [
|
|
3613
|
+
{
|
|
3614
|
+
name: "groupId",
|
|
3615
|
+
type: "uint256",
|
|
3616
|
+
indexed: true,
|
|
3617
|
+
internalType: "uint256"
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
name: "winningMarketId",
|
|
3621
|
+
type: "uint256",
|
|
3622
|
+
indexed: true,
|
|
3623
|
+
internalType: "uint256"
|
|
3624
|
+
}
|
|
3625
|
+
],
|
|
3626
|
+
anonymous: false
|
|
3627
|
+
},
|
|
3628
|
+
{
|
|
3629
|
+
type: "event",
|
|
3630
|
+
name: "MarketResolved",
|
|
3631
|
+
inputs: [
|
|
3632
|
+
{
|
|
3633
|
+
name: "marketId",
|
|
3634
|
+
type: "uint256",
|
|
3635
|
+
indexed: true,
|
|
3636
|
+
internalType: "uint256"
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
name: "questionId",
|
|
3640
|
+
type: "bytes32",
|
|
3641
|
+
indexed: true,
|
|
3642
|
+
internalType: "bytes32"
|
|
3643
|
+
},
|
|
3644
|
+
{
|
|
3645
|
+
name: "outcome",
|
|
3646
|
+
type: "string",
|
|
3647
|
+
indexed: false,
|
|
3648
|
+
internalType: "string"
|
|
3649
|
+
}
|
|
3650
|
+
],
|
|
3651
|
+
anonymous: false
|
|
3652
|
+
},
|
|
3216
3653
|
{
|
|
3217
3654
|
type: "event",
|
|
3218
3655
|
name: "MarketResolved",
|
|
@@ -3383,20 +3820,109 @@ var VaultFacet_default = [
|
|
|
3383
3820
|
stateMutability: "nonpayable"
|
|
3384
3821
|
},
|
|
3385
3822
|
{
|
|
3386
|
-
type: "
|
|
3387
|
-
name: "
|
|
3388
|
-
inputs: [
|
|
3823
|
+
type: "event",
|
|
3824
|
+
name: "CtfUpdated",
|
|
3825
|
+
inputs: [
|
|
3826
|
+
{
|
|
3827
|
+
name: "ctf",
|
|
3828
|
+
type: "address",
|
|
3829
|
+
indexed: true,
|
|
3830
|
+
internalType: "address"
|
|
3831
|
+
}
|
|
3832
|
+
],
|
|
3833
|
+
anonymous: false
|
|
3389
3834
|
},
|
|
3390
3835
|
{
|
|
3391
|
-
type: "
|
|
3392
|
-
name: "
|
|
3393
|
-
inputs: [
|
|
3836
|
+
type: "event",
|
|
3837
|
+
name: "PositionSplit",
|
|
3838
|
+
inputs: [
|
|
3839
|
+
{
|
|
3840
|
+
name: "trader",
|
|
3841
|
+
type: "address",
|
|
3842
|
+
indexed: true,
|
|
3843
|
+
internalType: "address"
|
|
3844
|
+
},
|
|
3845
|
+
{
|
|
3846
|
+
name: "marketId",
|
|
3847
|
+
type: "uint256",
|
|
3848
|
+
indexed: true,
|
|
3849
|
+
internalType: "uint256"
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
name: "amount",
|
|
3853
|
+
type: "uint256",
|
|
3854
|
+
indexed: false,
|
|
3855
|
+
internalType: "uint256"
|
|
3856
|
+
}
|
|
3857
|
+
],
|
|
3858
|
+
anonymous: false
|
|
3859
|
+
},
|
|
3860
|
+
{
|
|
3861
|
+
type: "event",
|
|
3862
|
+
name: "PositionsMerged",
|
|
3863
|
+
inputs: [
|
|
3864
|
+
{
|
|
3865
|
+
name: "trader",
|
|
3866
|
+
type: "address",
|
|
3867
|
+
indexed: true,
|
|
3868
|
+
internalType: "address"
|
|
3869
|
+
},
|
|
3870
|
+
{
|
|
3871
|
+
name: "marketId",
|
|
3872
|
+
type: "uint256",
|
|
3873
|
+
indexed: true,
|
|
3874
|
+
internalType: "uint256"
|
|
3875
|
+
},
|
|
3876
|
+
{
|
|
3877
|
+
name: "amount",
|
|
3878
|
+
type: "uint256",
|
|
3879
|
+
indexed: false,
|
|
3880
|
+
internalType: "uint256"
|
|
3881
|
+
}
|
|
3882
|
+
],
|
|
3883
|
+
anonymous: false
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
type: "error",
|
|
3887
|
+
name: "ApproveFailed",
|
|
3888
|
+
inputs: []
|
|
3889
|
+
},
|
|
3890
|
+
{
|
|
3891
|
+
type: "error",
|
|
3892
|
+
name: "MarketNotActive",
|
|
3893
|
+
inputs: []
|
|
3394
3894
|
},
|
|
3395
3895
|
{
|
|
3396
3896
|
type: "error",
|
|
3397
3897
|
name: "MarketNotFound",
|
|
3398
3898
|
inputs: []
|
|
3399
3899
|
},
|
|
3900
|
+
{
|
|
3901
|
+
type: "error",
|
|
3902
|
+
name: "MarketPaused",
|
|
3903
|
+
inputs: []
|
|
3904
|
+
},
|
|
3905
|
+
{
|
|
3906
|
+
type: "error",
|
|
3907
|
+
name: "NotContractOwner",
|
|
3908
|
+
inputs: [
|
|
3909
|
+
{
|
|
3910
|
+
name: "_user",
|
|
3911
|
+
type: "address",
|
|
3912
|
+
internalType: "address"
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
name: "_contractOwner",
|
|
3916
|
+
type: "address",
|
|
3917
|
+
internalType: "address"
|
|
3918
|
+
}
|
|
3919
|
+
]
|
|
3920
|
+
},
|
|
3921
|
+
{
|
|
3922
|
+
type: "error",
|
|
3923
|
+
name: "ProtocolPaused",
|
|
3924
|
+
inputs: []
|
|
3925
|
+
},
|
|
3400
3926
|
{
|
|
3401
3927
|
type: "error",
|
|
3402
3928
|
name: "TransferFailed",
|
|
@@ -3406,6 +3932,21 @@ var VaultFacet_default = [
|
|
|
3406
3932
|
type: "error",
|
|
3407
3933
|
name: "TransferFromFailed",
|
|
3408
3934
|
inputs: []
|
|
3935
|
+
},
|
|
3936
|
+
{
|
|
3937
|
+
type: "error",
|
|
3938
|
+
name: "VenueInactive",
|
|
3939
|
+
inputs: []
|
|
3940
|
+
},
|
|
3941
|
+
{
|
|
3942
|
+
type: "error",
|
|
3943
|
+
name: "VenueNotFound",
|
|
3944
|
+
inputs: []
|
|
3945
|
+
},
|
|
3946
|
+
{
|
|
3947
|
+
type: "error",
|
|
3948
|
+
name: "VenueSuspended",
|
|
3949
|
+
inputs: []
|
|
3409
3950
|
}
|
|
3410
3951
|
];
|
|
3411
3952
|
|
|
@@ -3482,6 +4023,19 @@ var NegRiskFacet_default = [
|
|
|
3482
4023
|
|
|
3483
4024
|
// src/contracts/abis/ProtocolFacet.json
|
|
3484
4025
|
var ProtocolFacet_default = [
|
|
4026
|
+
{
|
|
4027
|
+
type: "function",
|
|
4028
|
+
name: "getProtocolPaused",
|
|
4029
|
+
inputs: [],
|
|
4030
|
+
outputs: [
|
|
4031
|
+
{
|
|
4032
|
+
name: "",
|
|
4033
|
+
type: "bool",
|
|
4034
|
+
internalType: "bool"
|
|
4035
|
+
}
|
|
4036
|
+
],
|
|
4037
|
+
stateMutability: "view"
|
|
4038
|
+
},
|
|
3485
4039
|
{
|
|
3486
4040
|
type: "function",
|
|
3487
4041
|
name: "getProtocolTreasury",
|
|
@@ -3521,6 +4075,69 @@ var ProtocolFacet_default = [
|
|
|
3521
4075
|
],
|
|
3522
4076
|
stateMutability: "view"
|
|
3523
4077
|
},
|
|
4078
|
+
{
|
|
4079
|
+
type: "function",
|
|
4080
|
+
name: "getVenueSuspended",
|
|
4081
|
+
inputs: [
|
|
4082
|
+
{
|
|
4083
|
+
name: "venueId",
|
|
4084
|
+
type: "uint256",
|
|
4085
|
+
internalType: "uint256"
|
|
4086
|
+
}
|
|
4087
|
+
],
|
|
4088
|
+
outputs: [
|
|
4089
|
+
{
|
|
4090
|
+
name: "",
|
|
4091
|
+
type: "bool",
|
|
4092
|
+
internalType: "bool"
|
|
4093
|
+
}
|
|
4094
|
+
],
|
|
4095
|
+
stateMutability: "view"
|
|
4096
|
+
},
|
|
4097
|
+
{
|
|
4098
|
+
type: "function",
|
|
4099
|
+
name: "isCollateralWhitelisted",
|
|
4100
|
+
inputs: [
|
|
4101
|
+
{
|
|
4102
|
+
name: "token",
|
|
4103
|
+
type: "address",
|
|
4104
|
+
internalType: "address"
|
|
4105
|
+
}
|
|
4106
|
+
],
|
|
4107
|
+
outputs: [
|
|
4108
|
+
{
|
|
4109
|
+
name: "",
|
|
4110
|
+
type: "bool",
|
|
4111
|
+
internalType: "bool"
|
|
4112
|
+
}
|
|
4113
|
+
],
|
|
4114
|
+
stateMutability: "view"
|
|
4115
|
+
},
|
|
4116
|
+
{
|
|
4117
|
+
type: "function",
|
|
4118
|
+
name: "pauseProtocol",
|
|
4119
|
+
inputs: [],
|
|
4120
|
+
outputs: [],
|
|
4121
|
+
stateMutability: "nonpayable"
|
|
4122
|
+
},
|
|
4123
|
+
{
|
|
4124
|
+
type: "function",
|
|
4125
|
+
name: "setCollateralWhitelisted",
|
|
4126
|
+
inputs: [
|
|
4127
|
+
{
|
|
4128
|
+
name: "token",
|
|
4129
|
+
type: "address",
|
|
4130
|
+
internalType: "address"
|
|
4131
|
+
},
|
|
4132
|
+
{
|
|
4133
|
+
name: "whitelisted",
|
|
4134
|
+
type: "bool",
|
|
4135
|
+
internalType: "bool"
|
|
4136
|
+
}
|
|
4137
|
+
],
|
|
4138
|
+
outputs: [],
|
|
4139
|
+
stateMutability: "nonpayable"
|
|
4140
|
+
},
|
|
3524
4141
|
{
|
|
3525
4142
|
type: "function",
|
|
3526
4143
|
name: "setProtocolTreasury",
|
|
@@ -3560,6 +4177,62 @@ var ProtocolFacet_default = [
|
|
|
3560
4177
|
outputs: [],
|
|
3561
4178
|
stateMutability: "nonpayable"
|
|
3562
4179
|
},
|
|
4180
|
+
{
|
|
4181
|
+
type: "function",
|
|
4182
|
+
name: "suspendVenue",
|
|
4183
|
+
inputs: [
|
|
4184
|
+
{
|
|
4185
|
+
name: "venueId",
|
|
4186
|
+
type: "uint256",
|
|
4187
|
+
internalType: "uint256"
|
|
4188
|
+
}
|
|
4189
|
+
],
|
|
4190
|
+
outputs: [],
|
|
4191
|
+
stateMutability: "nonpayable"
|
|
4192
|
+
},
|
|
4193
|
+
{
|
|
4194
|
+
type: "function",
|
|
4195
|
+
name: "unpauseProtocol",
|
|
4196
|
+
inputs: [],
|
|
4197
|
+
outputs: [],
|
|
4198
|
+
stateMutability: "nonpayable"
|
|
4199
|
+
},
|
|
4200
|
+
{
|
|
4201
|
+
type: "function",
|
|
4202
|
+
name: "unsuspendVenue",
|
|
4203
|
+
inputs: [
|
|
4204
|
+
{
|
|
4205
|
+
name: "venueId",
|
|
4206
|
+
type: "uint256",
|
|
4207
|
+
internalType: "uint256"
|
|
4208
|
+
}
|
|
4209
|
+
],
|
|
4210
|
+
outputs: [],
|
|
4211
|
+
stateMutability: "nonpayable"
|
|
4212
|
+
},
|
|
4213
|
+
{
|
|
4214
|
+
type: "function",
|
|
4215
|
+
name: "withdrawERC20",
|
|
4216
|
+
inputs: [
|
|
4217
|
+
{
|
|
4218
|
+
name: "token",
|
|
4219
|
+
type: "address",
|
|
4220
|
+
internalType: "address"
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
name: "recipient",
|
|
4224
|
+
type: "address",
|
|
4225
|
+
internalType: "address"
|
|
4226
|
+
},
|
|
4227
|
+
{
|
|
4228
|
+
name: "amount",
|
|
4229
|
+
type: "uint256",
|
|
4230
|
+
internalType: "uint256"
|
|
4231
|
+
}
|
|
4232
|
+
],
|
|
4233
|
+
outputs: [],
|
|
4234
|
+
stateMutability: "nonpayable"
|
|
4235
|
+
},
|
|
3563
4236
|
{
|
|
3564
4237
|
type: "function",
|
|
3565
4238
|
name: "withdrawETH",
|
|
@@ -3573,6 +4246,50 @@ var ProtocolFacet_default = [
|
|
|
3573
4246
|
outputs: [],
|
|
3574
4247
|
stateMutability: "nonpayable"
|
|
3575
4248
|
},
|
|
4249
|
+
{
|
|
4250
|
+
type: "event",
|
|
4251
|
+
name: "CollateralWhitelistUpdated",
|
|
4252
|
+
inputs: [
|
|
4253
|
+
{
|
|
4254
|
+
name: "token",
|
|
4255
|
+
type: "address",
|
|
4256
|
+
indexed: true,
|
|
4257
|
+
internalType: "address"
|
|
4258
|
+
},
|
|
4259
|
+
{
|
|
4260
|
+
name: "whitelisted",
|
|
4261
|
+
type: "bool",
|
|
4262
|
+
indexed: false,
|
|
4263
|
+
internalType: "bool"
|
|
4264
|
+
}
|
|
4265
|
+
],
|
|
4266
|
+
anonymous: false
|
|
4267
|
+
},
|
|
4268
|
+
{
|
|
4269
|
+
type: "event",
|
|
4270
|
+
name: "ERC20Withdrawn",
|
|
4271
|
+
inputs: [
|
|
4272
|
+
{
|
|
4273
|
+
name: "token",
|
|
4274
|
+
type: "address",
|
|
4275
|
+
indexed: true,
|
|
4276
|
+
internalType: "address"
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
name: "recipient",
|
|
4280
|
+
type: "address",
|
|
4281
|
+
indexed: true,
|
|
4282
|
+
internalType: "address"
|
|
4283
|
+
},
|
|
4284
|
+
{
|
|
4285
|
+
name: "amount",
|
|
4286
|
+
type: "uint256",
|
|
4287
|
+
indexed: false,
|
|
4288
|
+
internalType: "uint256"
|
|
4289
|
+
}
|
|
4290
|
+
],
|
|
4291
|
+
anonymous: false
|
|
4292
|
+
},
|
|
3576
4293
|
{
|
|
3577
4294
|
type: "event",
|
|
3578
4295
|
name: "EthWithdrawn",
|
|
@@ -3592,6 +4309,19 @@ var ProtocolFacet_default = [
|
|
|
3592
4309
|
],
|
|
3593
4310
|
anonymous: false
|
|
3594
4311
|
},
|
|
4312
|
+
{
|
|
4313
|
+
type: "event",
|
|
4314
|
+
name: "ProtocolPausedEvent",
|
|
4315
|
+
inputs: [
|
|
4316
|
+
{
|
|
4317
|
+
name: "caller",
|
|
4318
|
+
type: "address",
|
|
4319
|
+
indexed: true,
|
|
4320
|
+
internalType: "address"
|
|
4321
|
+
}
|
|
4322
|
+
],
|
|
4323
|
+
anonymous: false
|
|
4324
|
+
},
|
|
3595
4325
|
{
|
|
3596
4326
|
type: "event",
|
|
3597
4327
|
name: "ProtocolTreasuryUpdated",
|
|
@@ -3605,6 +4335,19 @@ var ProtocolFacet_default = [
|
|
|
3605
4335
|
],
|
|
3606
4336
|
anonymous: false
|
|
3607
4337
|
},
|
|
4338
|
+
{
|
|
4339
|
+
type: "event",
|
|
4340
|
+
name: "ProtocolUnpausedEvent",
|
|
4341
|
+
inputs: [
|
|
4342
|
+
{
|
|
4343
|
+
name: "caller",
|
|
4344
|
+
type: "address",
|
|
4345
|
+
indexed: true,
|
|
4346
|
+
internalType: "address"
|
|
4347
|
+
}
|
|
4348
|
+
],
|
|
4349
|
+
anonymous: false
|
|
4350
|
+
},
|
|
3608
4351
|
{
|
|
3609
4352
|
type: "event",
|
|
3610
4353
|
name: "UmaIdentifierUpdated",
|
|
@@ -3631,6 +4374,44 @@ var ProtocolFacet_default = [
|
|
|
3631
4374
|
],
|
|
3632
4375
|
anonymous: false
|
|
3633
4376
|
},
|
|
4377
|
+
{
|
|
4378
|
+
type: "event",
|
|
4379
|
+
name: "VenueSuspendedEvent",
|
|
4380
|
+
inputs: [
|
|
4381
|
+
{
|
|
4382
|
+
name: "venueId",
|
|
4383
|
+
type: "uint256",
|
|
4384
|
+
indexed: true,
|
|
4385
|
+
internalType: "uint256"
|
|
4386
|
+
},
|
|
4387
|
+
{
|
|
4388
|
+
name: "caller",
|
|
4389
|
+
type: "address",
|
|
4390
|
+
indexed: true,
|
|
4391
|
+
internalType: "address"
|
|
4392
|
+
}
|
|
4393
|
+
],
|
|
4394
|
+
anonymous: false
|
|
4395
|
+
},
|
|
4396
|
+
{
|
|
4397
|
+
type: "event",
|
|
4398
|
+
name: "VenueUnsuspendedEvent",
|
|
4399
|
+
inputs: [
|
|
4400
|
+
{
|
|
4401
|
+
name: "venueId",
|
|
4402
|
+
type: "uint256",
|
|
4403
|
+
indexed: true,
|
|
4404
|
+
internalType: "uint256"
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
name: "caller",
|
|
4408
|
+
type: "address",
|
|
4409
|
+
indexed: true,
|
|
4410
|
+
internalType: "address"
|
|
4411
|
+
}
|
|
4412
|
+
],
|
|
4413
|
+
anonymous: false
|
|
4414
|
+
},
|
|
3634
4415
|
{
|
|
3635
4416
|
type: "error",
|
|
3636
4417
|
name: "NotContractOwner",
|
|
@@ -3646,6 +4427,16 @@ var ProtocolFacet_default = [
|
|
|
3646
4427
|
internalType: "address"
|
|
3647
4428
|
}
|
|
3648
4429
|
]
|
|
4430
|
+
},
|
|
4431
|
+
{
|
|
4432
|
+
type: "error",
|
|
4433
|
+
name: "TransferFailed",
|
|
4434
|
+
inputs: []
|
|
4435
|
+
},
|
|
4436
|
+
{
|
|
4437
|
+
type: "error",
|
|
4438
|
+
name: "VenueNotFound",
|
|
4439
|
+
inputs: []
|
|
3649
4440
|
}
|
|
3650
4441
|
];
|
|
3651
4442
|
|
|
@@ -3655,11 +4446,23 @@ var AccessControlFacet_default = [
|
|
|
3655
4446
|
type: "function",
|
|
3656
4447
|
name: "canTradeOnMarket",
|
|
3657
4448
|
inputs: [
|
|
3658
|
-
{
|
|
3659
|
-
|
|
4449
|
+
{
|
|
4450
|
+
name: "user",
|
|
4451
|
+
type: "address",
|
|
4452
|
+
internalType: "address"
|
|
4453
|
+
},
|
|
4454
|
+
{
|
|
4455
|
+
name: "marketId",
|
|
4456
|
+
type: "uint256",
|
|
4457
|
+
internalType: "uint256"
|
|
4458
|
+
}
|
|
3660
4459
|
],
|
|
3661
4460
|
outputs: [
|
|
3662
|
-
{
|
|
4461
|
+
{
|
|
4462
|
+
name: "",
|
|
4463
|
+
type: "bool",
|
|
4464
|
+
internalType: "bool"
|
|
4465
|
+
}
|
|
3663
4466
|
],
|
|
3664
4467
|
stateMutability: "view"
|
|
3665
4468
|
},
|
|
@@ -3667,12 +4470,28 @@ var AccessControlFacet_default = [
|
|
|
3667
4470
|
type: "function",
|
|
3668
4471
|
name: "deployNFTGatedAC",
|
|
3669
4472
|
inputs: [
|
|
3670
|
-
{
|
|
3671
|
-
|
|
3672
|
-
|
|
4473
|
+
{
|
|
4474
|
+
name: "nftContract",
|
|
4475
|
+
type: "address",
|
|
4476
|
+
internalType: "address"
|
|
4477
|
+
},
|
|
4478
|
+
{
|
|
4479
|
+
name: "isERC1155",
|
|
4480
|
+
type: "bool",
|
|
4481
|
+
internalType: "bool"
|
|
4482
|
+
},
|
|
4483
|
+
{
|
|
4484
|
+
name: "tokenId",
|
|
4485
|
+
type: "uint256",
|
|
4486
|
+
internalType: "uint256"
|
|
4487
|
+
}
|
|
3673
4488
|
],
|
|
3674
4489
|
outputs: [
|
|
3675
|
-
{
|
|
4490
|
+
{
|
|
4491
|
+
name: "acContract",
|
|
4492
|
+
type: "address",
|
|
4493
|
+
internalType: "address"
|
|
4494
|
+
}
|
|
3676
4495
|
],
|
|
3677
4496
|
stateMutability: "nonpayable"
|
|
3678
4497
|
},
|
|
@@ -3680,11 +4499,23 @@ var AccessControlFacet_default = [
|
|
|
3680
4499
|
type: "function",
|
|
3681
4500
|
name: "deployTokenGatedAC",
|
|
3682
4501
|
inputs: [
|
|
3683
|
-
{
|
|
3684
|
-
|
|
4502
|
+
{
|
|
4503
|
+
name: "token",
|
|
4504
|
+
type: "address",
|
|
4505
|
+
internalType: "address"
|
|
4506
|
+
},
|
|
4507
|
+
{
|
|
4508
|
+
name: "minBalance",
|
|
4509
|
+
type: "uint256",
|
|
4510
|
+
internalType: "uint256"
|
|
4511
|
+
}
|
|
3685
4512
|
],
|
|
3686
4513
|
outputs: [
|
|
3687
|
-
{
|
|
4514
|
+
{
|
|
4515
|
+
name: "acContract",
|
|
4516
|
+
type: "address",
|
|
4517
|
+
internalType: "address"
|
|
4518
|
+
}
|
|
3688
4519
|
],
|
|
3689
4520
|
stateMutability: "nonpayable"
|
|
3690
4521
|
},
|
|
@@ -3693,7 +4524,11 @@ var AccessControlFacet_default = [
|
|
|
3693
4524
|
name: "deployWhitelistAC",
|
|
3694
4525
|
inputs: [],
|
|
3695
4526
|
outputs: [
|
|
3696
|
-
{
|
|
4527
|
+
{
|
|
4528
|
+
name: "acContract",
|
|
4529
|
+
type: "address",
|
|
4530
|
+
internalType: "address"
|
|
4531
|
+
}
|
|
3697
4532
|
],
|
|
3698
4533
|
stateMutability: "nonpayable"
|
|
3699
4534
|
},
|
|
@@ -3701,10 +4536,18 @@ var AccessControlFacet_default = [
|
|
|
3701
4536
|
type: "function",
|
|
3702
4537
|
name: "getMarketTradingAccessControl",
|
|
3703
4538
|
inputs: [
|
|
3704
|
-
{
|
|
4539
|
+
{
|
|
4540
|
+
name: "marketId",
|
|
4541
|
+
type: "uint256",
|
|
4542
|
+
internalType: "uint256"
|
|
4543
|
+
}
|
|
3705
4544
|
],
|
|
3706
4545
|
outputs: [
|
|
3707
|
-
{
|
|
4546
|
+
{
|
|
4547
|
+
name: "",
|
|
4548
|
+
type: "address",
|
|
4549
|
+
internalType: "address"
|
|
4550
|
+
}
|
|
3708
4551
|
],
|
|
3709
4552
|
stateMutability: "view"
|
|
3710
4553
|
},
|
|
@@ -3712,47 +4555,114 @@ var AccessControlFacet_default = [
|
|
|
3712
4555
|
type: "function",
|
|
3713
4556
|
name: "removeMarketTradingAccessControl",
|
|
3714
4557
|
inputs: [
|
|
3715
|
-
{
|
|
4558
|
+
{
|
|
4559
|
+
name: "marketId",
|
|
4560
|
+
type: "uint256",
|
|
4561
|
+
internalType: "uint256"
|
|
4562
|
+
}
|
|
3716
4563
|
],
|
|
3717
4564
|
outputs: [],
|
|
3718
4565
|
stateMutability: "nonpayable"
|
|
3719
4566
|
},
|
|
3720
4567
|
{
|
|
3721
|
-
type: "function",
|
|
3722
|
-
name: "setMarketTradingAccessControl",
|
|
3723
|
-
inputs: [
|
|
3724
|
-
{
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
4568
|
+
type: "function",
|
|
4569
|
+
name: "setMarketTradingAccessControl",
|
|
4570
|
+
inputs: [
|
|
4571
|
+
{
|
|
4572
|
+
name: "marketId",
|
|
4573
|
+
type: "uint256",
|
|
4574
|
+
internalType: "uint256"
|
|
4575
|
+
},
|
|
4576
|
+
{
|
|
4577
|
+
name: "acContract",
|
|
4578
|
+
type: "address",
|
|
4579
|
+
internalType: "address"
|
|
4580
|
+
}
|
|
4581
|
+
],
|
|
4582
|
+
outputs: [],
|
|
4583
|
+
stateMutability: "nonpayable"
|
|
4584
|
+
},
|
|
4585
|
+
{
|
|
4586
|
+
type: "event",
|
|
4587
|
+
name: "AccessControlDeployed",
|
|
4588
|
+
inputs: [
|
|
4589
|
+
{
|
|
4590
|
+
name: "deployer",
|
|
4591
|
+
type: "address",
|
|
4592
|
+
indexed: true,
|
|
4593
|
+
internalType: "address"
|
|
4594
|
+
},
|
|
4595
|
+
{
|
|
4596
|
+
name: "acContract",
|
|
4597
|
+
type: "address",
|
|
4598
|
+
indexed: true,
|
|
4599
|
+
internalType: "address"
|
|
4600
|
+
},
|
|
4601
|
+
{
|
|
4602
|
+
name: "acType",
|
|
4603
|
+
type: "string",
|
|
4604
|
+
indexed: false,
|
|
4605
|
+
internalType: "string"
|
|
4606
|
+
}
|
|
4607
|
+
],
|
|
4608
|
+
anonymous: false
|
|
4609
|
+
},
|
|
4610
|
+
{
|
|
4611
|
+
type: "event",
|
|
4612
|
+
name: "MarketTradingAccessControlRemoved",
|
|
4613
|
+
inputs: [
|
|
4614
|
+
{
|
|
4615
|
+
name: "marketId",
|
|
4616
|
+
type: "uint256",
|
|
4617
|
+
indexed: true,
|
|
4618
|
+
internalType: "uint256"
|
|
4619
|
+
}
|
|
4620
|
+
],
|
|
4621
|
+
anonymous: false
|
|
4622
|
+
},
|
|
4623
|
+
{
|
|
4624
|
+
type: "event",
|
|
4625
|
+
name: "MarketTradingAccessControlSet",
|
|
4626
|
+
inputs: [
|
|
4627
|
+
{
|
|
4628
|
+
name: "marketId",
|
|
4629
|
+
type: "uint256",
|
|
4630
|
+
indexed: true,
|
|
4631
|
+
internalType: "uint256"
|
|
4632
|
+
},
|
|
4633
|
+
{
|
|
4634
|
+
name: "acContract",
|
|
4635
|
+
type: "address",
|
|
4636
|
+
indexed: true,
|
|
4637
|
+
internalType: "address"
|
|
4638
|
+
}
|
|
4639
|
+
],
|
|
4640
|
+
anonymous: false
|
|
4641
|
+
},
|
|
4642
|
+
{
|
|
4643
|
+
type: "error",
|
|
4644
|
+
name: "OnlyVenueOperator",
|
|
4645
|
+
inputs: []
|
|
4646
|
+
},
|
|
4647
|
+
{
|
|
4648
|
+
type: "error",
|
|
4649
|
+
name: "ProtocolPaused",
|
|
4650
|
+
inputs: []
|
|
3729
4651
|
},
|
|
3730
4652
|
{
|
|
3731
|
-
type: "
|
|
3732
|
-
name: "
|
|
3733
|
-
inputs: [
|
|
3734
|
-
{ name: "deployer", type: "address", indexed: true, internalType: "address" },
|
|
3735
|
-
{ name: "acContract", type: "address", indexed: true, internalType: "address" },
|
|
3736
|
-
{ name: "acType", type: "string", indexed: false, internalType: "string" }
|
|
3737
|
-
],
|
|
3738
|
-
anonymous: false
|
|
4653
|
+
type: "error",
|
|
4654
|
+
name: "VenueInactive",
|
|
4655
|
+
inputs: []
|
|
3739
4656
|
},
|
|
3740
4657
|
{
|
|
3741
|
-
type: "
|
|
3742
|
-
name: "
|
|
3743
|
-
inputs: [
|
|
3744
|
-
{ name: "marketId", type: "uint256", indexed: true, internalType: "uint256" }
|
|
3745
|
-
],
|
|
3746
|
-
anonymous: false
|
|
4658
|
+
type: "error",
|
|
4659
|
+
name: "VenueNotFound",
|
|
4660
|
+
inputs: []
|
|
3747
4661
|
},
|
|
3748
4662
|
{
|
|
3749
|
-
type: "
|
|
3750
|
-
name: "
|
|
3751
|
-
inputs: [
|
|
3752
|
-
{ name: "marketId", type: "uint256", indexed: true, internalType: "uint256" },
|
|
3753
|
-
{ name: "acContract", type: "address", indexed: true, internalType: "address" }
|
|
3754
|
-
],
|
|
3755
|
-
anonymous: false
|
|
4663
|
+
type: "error",
|
|
4664
|
+
name: "VenueSuspended",
|
|
4665
|
+
inputs: []
|
|
3756
4666
|
}
|
|
3757
4667
|
];
|
|
3758
4668
|
|
|
@@ -3858,10 +4768,10 @@ var TagsFacet_default = [
|
|
|
3858
4768
|
var MetadataFacet_default = [
|
|
3859
4769
|
{
|
|
3860
4770
|
type: "function",
|
|
3861
|
-
name: "
|
|
4771
|
+
name: "updateMarketGroupMetadata",
|
|
3862
4772
|
inputs: [
|
|
3863
4773
|
{
|
|
3864
|
-
name: "
|
|
4774
|
+
name: "groupId",
|
|
3865
4775
|
type: "uint256",
|
|
3866
4776
|
internalType: "uint256"
|
|
3867
4777
|
},
|
|
@@ -3876,10 +4786,10 @@ var MetadataFacet_default = [
|
|
|
3876
4786
|
},
|
|
3877
4787
|
{
|
|
3878
4788
|
type: "function",
|
|
3879
|
-
name: "
|
|
4789
|
+
name: "updateMarketMetadata",
|
|
3880
4790
|
inputs: [
|
|
3881
4791
|
{
|
|
3882
|
-
name: "
|
|
4792
|
+
name: "marketId",
|
|
3883
4793
|
type: "uint256",
|
|
3884
4794
|
internalType: "uint256"
|
|
3885
4795
|
},
|
|
@@ -3894,10 +4804,10 @@ var MetadataFacet_default = [
|
|
|
3894
4804
|
},
|
|
3895
4805
|
{
|
|
3896
4806
|
type: "event",
|
|
3897
|
-
name: "
|
|
4807
|
+
name: "MarketGroupMetadataUpdated",
|
|
3898
4808
|
inputs: [
|
|
3899
4809
|
{
|
|
3900
|
-
name: "
|
|
4810
|
+
name: "groupId",
|
|
3901
4811
|
type: "uint256",
|
|
3902
4812
|
indexed: true,
|
|
3903
4813
|
internalType: "uint256"
|
|
@@ -3913,10 +4823,10 @@ var MetadataFacet_default = [
|
|
|
3913
4823
|
},
|
|
3914
4824
|
{
|
|
3915
4825
|
type: "event",
|
|
3916
|
-
name: "
|
|
4826
|
+
name: "MarketMetadataUpdated",
|
|
3917
4827
|
inputs: [
|
|
3918
4828
|
{
|
|
3919
|
-
name: "
|
|
4829
|
+
name: "marketId",
|
|
3920
4830
|
type: "uint256",
|
|
3921
4831
|
indexed: true,
|
|
3922
4832
|
internalType: "uint256"
|
|
@@ -4266,25 +5176,6 @@ var PythResolutionFacet_default = [
|
|
|
4266
5176
|
],
|
|
4267
5177
|
anonymous: false
|
|
4268
5178
|
},
|
|
4269
|
-
{
|
|
4270
|
-
type: "event",
|
|
4271
|
-
name: "MarketGroupResolved",
|
|
4272
|
-
inputs: [
|
|
4273
|
-
{
|
|
4274
|
-
name: "groupId",
|
|
4275
|
-
type: "uint256",
|
|
4276
|
-
indexed: true,
|
|
4277
|
-
internalType: "uint256"
|
|
4278
|
-
},
|
|
4279
|
-
{
|
|
4280
|
-
name: "winningMarketId",
|
|
4281
|
-
type: "uint256",
|
|
4282
|
-
indexed: true,
|
|
4283
|
-
internalType: "uint256"
|
|
4284
|
-
}
|
|
4285
|
-
],
|
|
4286
|
-
anonymous: false
|
|
4287
|
-
},
|
|
4288
5179
|
{
|
|
4289
5180
|
type: "event",
|
|
4290
5181
|
name: "MarketResolved",
|
|
@@ -4509,16 +5400,6 @@ var PythResolutionFacet_default = [
|
|
|
4509
5400
|
name: "InvalidTickSize",
|
|
4510
5401
|
inputs: []
|
|
4511
5402
|
},
|
|
4512
|
-
{
|
|
4513
|
-
type: "error",
|
|
4514
|
-
name: "InvalidTickSize",
|
|
4515
|
-
inputs: []
|
|
4516
|
-
},
|
|
4517
|
-
{
|
|
4518
|
-
type: "error",
|
|
4519
|
-
name: "InvalidTickSize",
|
|
4520
|
-
inputs: []
|
|
4521
|
-
},
|
|
4522
5403
|
{
|
|
4523
5404
|
type: "error",
|
|
4524
5405
|
name: "MarketNotActive",
|
|
@@ -4965,11 +5846,26 @@ var BatchOrdersFacet_default = [
|
|
|
4965
5846
|
|
|
4966
5847
|
// src/contracts/abis/WhitelistAccessControl.json
|
|
4967
5848
|
var WhitelistAccessControl_default = [
|
|
5849
|
+
{
|
|
5850
|
+
type: "constructor",
|
|
5851
|
+
inputs: [
|
|
5852
|
+
{
|
|
5853
|
+
name: "_owner",
|
|
5854
|
+
type: "address",
|
|
5855
|
+
internalType: "address"
|
|
5856
|
+
}
|
|
5857
|
+
],
|
|
5858
|
+
stateMutability: "nonpayable"
|
|
5859
|
+
},
|
|
4968
5860
|
{
|
|
4969
5861
|
type: "function",
|
|
4970
5862
|
name: "addToWhitelist",
|
|
4971
5863
|
inputs: [
|
|
4972
|
-
{
|
|
5864
|
+
{
|
|
5865
|
+
name: "users",
|
|
5866
|
+
type: "address[]",
|
|
5867
|
+
internalType: "address[]"
|
|
5868
|
+
}
|
|
4973
5869
|
],
|
|
4974
5870
|
outputs: [],
|
|
4975
5871
|
stateMutability: "nonpayable"
|
|
@@ -4978,10 +5874,18 @@ var WhitelistAccessControl_default = [
|
|
|
4978
5874
|
type: "function",
|
|
4979
5875
|
name: "isAllowed",
|
|
4980
5876
|
inputs: [
|
|
4981
|
-
{
|
|
5877
|
+
{
|
|
5878
|
+
name: "user",
|
|
5879
|
+
type: "address",
|
|
5880
|
+
internalType: "address"
|
|
5881
|
+
}
|
|
4982
5882
|
],
|
|
4983
5883
|
outputs: [
|
|
4984
|
-
{
|
|
5884
|
+
{
|
|
5885
|
+
name: "",
|
|
5886
|
+
type: "bool",
|
|
5887
|
+
internalType: "bool"
|
|
5888
|
+
}
|
|
4985
5889
|
],
|
|
4986
5890
|
stateMutability: "view"
|
|
4987
5891
|
},
|
|
@@ -4990,7 +5894,11 @@ var WhitelistAccessControl_default = [
|
|
|
4990
5894
|
name: "owner",
|
|
4991
5895
|
inputs: [],
|
|
4992
5896
|
outputs: [
|
|
4993
|
-
{
|
|
5897
|
+
{
|
|
5898
|
+
name: "",
|
|
5899
|
+
type: "address",
|
|
5900
|
+
internalType: "address"
|
|
5901
|
+
}
|
|
4994
5902
|
],
|
|
4995
5903
|
stateMutability: "view"
|
|
4996
5904
|
},
|
|
@@ -4998,7 +5906,11 @@ var WhitelistAccessControl_default = [
|
|
|
4998
5906
|
type: "function",
|
|
4999
5907
|
name: "removeFromWhitelist",
|
|
5000
5908
|
inputs: [
|
|
5001
|
-
{
|
|
5909
|
+
{
|
|
5910
|
+
name: "users",
|
|
5911
|
+
type: "address[]",
|
|
5912
|
+
internalType: "address[]"
|
|
5913
|
+
}
|
|
5002
5914
|
],
|
|
5003
5915
|
outputs: [],
|
|
5004
5916
|
stateMutability: "nonpayable"
|
|
@@ -5007,7 +5919,11 @@ var WhitelistAccessControl_default = [
|
|
|
5007
5919
|
type: "function",
|
|
5008
5920
|
name: "transferOwnership",
|
|
5009
5921
|
inputs: [
|
|
5010
|
-
{
|
|
5922
|
+
{
|
|
5923
|
+
name: "newOwner",
|
|
5924
|
+
type: "address",
|
|
5925
|
+
internalType: "address"
|
|
5926
|
+
}
|
|
5011
5927
|
],
|
|
5012
5928
|
outputs: [],
|
|
5013
5929
|
stateMutability: "nonpayable"
|
|
@@ -5016,10 +5932,18 @@ var WhitelistAccessControl_default = [
|
|
|
5016
5932
|
type: "function",
|
|
5017
5933
|
name: "whitelist",
|
|
5018
5934
|
inputs: [
|
|
5019
|
-
{
|
|
5935
|
+
{
|
|
5936
|
+
name: "",
|
|
5937
|
+
type: "address",
|
|
5938
|
+
internalType: "address"
|
|
5939
|
+
}
|
|
5020
5940
|
],
|
|
5021
5941
|
outputs: [
|
|
5022
|
-
{
|
|
5942
|
+
{
|
|
5943
|
+
name: "",
|
|
5944
|
+
type: "bool",
|
|
5945
|
+
internalType: "bool"
|
|
5946
|
+
}
|
|
5023
5947
|
],
|
|
5024
5948
|
stateMutability: "view"
|
|
5025
5949
|
},
|
|
@@ -5027,7 +5951,12 @@ var WhitelistAccessControl_default = [
|
|
|
5027
5951
|
type: "event",
|
|
5028
5952
|
name: "AddedToWhitelist",
|
|
5029
5953
|
inputs: [
|
|
5030
|
-
{
|
|
5954
|
+
{
|
|
5955
|
+
name: "users",
|
|
5956
|
+
type: "address[]",
|
|
5957
|
+
indexed: false,
|
|
5958
|
+
internalType: "address[]"
|
|
5959
|
+
}
|
|
5031
5960
|
],
|
|
5032
5961
|
anonymous: false
|
|
5033
5962
|
},
|
|
@@ -5035,8 +5964,18 @@ var WhitelistAccessControl_default = [
|
|
|
5035
5964
|
type: "event",
|
|
5036
5965
|
name: "OwnershipTransferred",
|
|
5037
5966
|
inputs: [
|
|
5038
|
-
{
|
|
5039
|
-
|
|
5967
|
+
{
|
|
5968
|
+
name: "previousOwner",
|
|
5969
|
+
type: "address",
|
|
5970
|
+
indexed: true,
|
|
5971
|
+
internalType: "address"
|
|
5972
|
+
},
|
|
5973
|
+
{
|
|
5974
|
+
name: "newOwner",
|
|
5975
|
+
type: "address",
|
|
5976
|
+
indexed: true,
|
|
5977
|
+
internalType: "address"
|
|
5978
|
+
}
|
|
5040
5979
|
],
|
|
5041
5980
|
anonymous: false
|
|
5042
5981
|
},
|
|
@@ -5044,14 +5983,53 @@ var WhitelistAccessControl_default = [
|
|
|
5044
5983
|
type: "event",
|
|
5045
5984
|
name: "RemovedFromWhitelist",
|
|
5046
5985
|
inputs: [
|
|
5047
|
-
{
|
|
5986
|
+
{
|
|
5987
|
+
name: "users",
|
|
5988
|
+
type: "address[]",
|
|
5989
|
+
indexed: false,
|
|
5990
|
+
internalType: "address[]"
|
|
5991
|
+
}
|
|
5048
5992
|
],
|
|
5049
5993
|
anonymous: false
|
|
5994
|
+
},
|
|
5995
|
+
{
|
|
5996
|
+
type: "error",
|
|
5997
|
+
name: "OnlyOwner",
|
|
5998
|
+
inputs: []
|
|
5999
|
+
},
|
|
6000
|
+
{
|
|
6001
|
+
type: "error",
|
|
6002
|
+
name: "ZeroAddress",
|
|
6003
|
+
inputs: []
|
|
5050
6004
|
}
|
|
5051
6005
|
];
|
|
5052
6006
|
|
|
5053
6007
|
// src/contracts/abis/ConditionalTokens.json
|
|
5054
6008
|
var ConditionalTokens_default = [
|
|
6009
|
+
{
|
|
6010
|
+
type: "function",
|
|
6011
|
+
name: "balanceOf",
|
|
6012
|
+
inputs: [
|
|
6013
|
+
{
|
|
6014
|
+
name: "account",
|
|
6015
|
+
type: "address",
|
|
6016
|
+
internalType: "address"
|
|
6017
|
+
},
|
|
6018
|
+
{
|
|
6019
|
+
name: "id",
|
|
6020
|
+
type: "uint256",
|
|
6021
|
+
internalType: "uint256"
|
|
6022
|
+
}
|
|
6023
|
+
],
|
|
6024
|
+
outputs: [
|
|
6025
|
+
{
|
|
6026
|
+
name: "",
|
|
6027
|
+
type: "uint256",
|
|
6028
|
+
internalType: "uint256"
|
|
6029
|
+
}
|
|
6030
|
+
],
|
|
6031
|
+
stateMutability: "view"
|
|
6032
|
+
},
|
|
5055
6033
|
{
|
|
5056
6034
|
type: "function",
|
|
5057
6035
|
name: "getCollectionId",
|
|
@@ -5330,30 +6308,6 @@ var ConditionalTokens_default = [
|
|
|
5330
6308
|
],
|
|
5331
6309
|
outputs: [],
|
|
5332
6310
|
stateMutability: "nonpayable"
|
|
5333
|
-
},
|
|
5334
|
-
{
|
|
5335
|
-
type: "function",
|
|
5336
|
-
name: "balanceOf",
|
|
5337
|
-
inputs: [
|
|
5338
|
-
{
|
|
5339
|
-
name: "account",
|
|
5340
|
-
type: "address",
|
|
5341
|
-
internalType: "address"
|
|
5342
|
-
},
|
|
5343
|
-
{
|
|
5344
|
-
name: "id",
|
|
5345
|
-
type: "uint256",
|
|
5346
|
-
internalType: "uint256"
|
|
5347
|
-
}
|
|
5348
|
-
],
|
|
5349
|
-
outputs: [
|
|
5350
|
-
{
|
|
5351
|
-
name: "",
|
|
5352
|
-
type: "uint256",
|
|
5353
|
-
internalType: "uint256"
|
|
5354
|
-
}
|
|
5355
|
-
],
|
|
5356
|
-
stateMutability: "view"
|
|
5357
6311
|
}
|
|
5358
6312
|
];
|
|
5359
6313
|
|
|
@@ -6775,6 +7729,80 @@ var TradeModule = class extends BaseModule {
|
|
|
6775
7729
|
});
|
|
6776
7730
|
return result;
|
|
6777
7731
|
}
|
|
7732
|
+
/**
|
|
7733
|
+
* Execute a market sell order (FOK or FAK)
|
|
7734
|
+
*
|
|
7735
|
+
* @param params.marketId - The market to sell on
|
|
7736
|
+
* @param params.outcomeId - Which outcome to sell (0=YES, 1=NO)
|
|
7737
|
+
* @param params.tokenAmount - Amount of outcome tokens to sell
|
|
7738
|
+
* @param params.minPriceTick - Minimum price tick willing to accept (slippage protection)
|
|
7739
|
+
* @param params.orderType - 0=FOK (Fill-Or-Kill), 1=FAK (Fill-And-Kill)
|
|
7740
|
+
*/
|
|
7741
|
+
async placeMarketSell(params) {
|
|
7742
|
+
const wallet = this.walletClient;
|
|
7743
|
+
const [account] = await wallet.getAddresses();
|
|
7744
|
+
const { request } = await this.publicClient.simulateContract({
|
|
7745
|
+
address: this.config.diamondAddress,
|
|
7746
|
+
abi: MarketOrdersFacet_default,
|
|
7747
|
+
functionName: "placeMarketSell",
|
|
7748
|
+
args: [
|
|
7749
|
+
params.marketId,
|
|
7750
|
+
params.outcomeId,
|
|
7751
|
+
params.tokenAmount,
|
|
7752
|
+
params.minPriceTick,
|
|
7753
|
+
params.orderType
|
|
7754
|
+
],
|
|
7755
|
+
account
|
|
7756
|
+
});
|
|
7757
|
+
return wallet.writeContract(request);
|
|
7758
|
+
}
|
|
7759
|
+
/**
|
|
7760
|
+
* Execute a market sell order with simple string inputs (recommended for frontends)
|
|
7761
|
+
* @param params.amount - Token amount as decimal string (e.g., "100.5")
|
|
7762
|
+
* @param params.minPrice - Minimum price as decimal string (e.g., "0.70")
|
|
7763
|
+
* @param params.orderType - 'FOK' or 'FAK' (default: 'FAK')
|
|
7764
|
+
*/
|
|
7765
|
+
async placeMarketSellSimple(params) {
|
|
7766
|
+
const tradingData = await this.publicClient.readContract({
|
|
7767
|
+
address: this.config.diamondAddress,
|
|
7768
|
+
abi: MarketsFacet_default,
|
|
7769
|
+
functionName: "getMarketTradingData",
|
|
7770
|
+
args: [params.marketId]
|
|
7771
|
+
});
|
|
7772
|
+
const collateralToken = tradingData.collateralToken;
|
|
7773
|
+
const decimals = await getCachedTokenDecimals(this.publicClient, collateralToken);
|
|
7774
|
+
const tokenAmount = parseTokenAmount(params.amount, decimals);
|
|
7775
|
+
const minPriceTick = priceToTick(params.minPrice);
|
|
7776
|
+
const orderType = params.orderType === "FOK" ? 0 : 1;
|
|
7777
|
+
return this.placeMarketSell({
|
|
7778
|
+
marketId: params.marketId,
|
|
7779
|
+
outcomeId: params.outcomeId,
|
|
7780
|
+
tokenAmount,
|
|
7781
|
+
minPriceTick,
|
|
7782
|
+
orderType
|
|
7783
|
+
});
|
|
7784
|
+
}
|
|
7785
|
+
/**
|
|
7786
|
+
* Preview a market sell order (simulate transaction)
|
|
7787
|
+
*/
|
|
7788
|
+
async previewMarketSell(params) {
|
|
7789
|
+
const wallet = this.walletClient;
|
|
7790
|
+
const [account] = await wallet.getAddresses();
|
|
7791
|
+
const { result } = await this.publicClient.simulateContract({
|
|
7792
|
+
address: this.config.diamondAddress,
|
|
7793
|
+
abi: MarketOrdersFacet_default,
|
|
7794
|
+
functionName: "placeMarketSell",
|
|
7795
|
+
args: [
|
|
7796
|
+
params.marketId,
|
|
7797
|
+
params.outcomeId,
|
|
7798
|
+
params.tokenAmount,
|
|
7799
|
+
params.minPriceTick,
|
|
7800
|
+
params.orderType
|
|
7801
|
+
],
|
|
7802
|
+
account
|
|
7803
|
+
});
|
|
7804
|
+
return result;
|
|
7805
|
+
}
|
|
6778
7806
|
/**
|
|
6779
7807
|
* Watch for MarketOrderExecuted events
|
|
6780
7808
|
*/
|
|
@@ -6787,6 +7815,18 @@ var TradeModule = class extends BaseModule {
|
|
|
6787
7815
|
onLogs
|
|
6788
7816
|
});
|
|
6789
7817
|
}
|
|
7818
|
+
/**
|
|
7819
|
+
* Watch for MarketSellExecuted events
|
|
7820
|
+
*/
|
|
7821
|
+
watchMarketSell(marketId, onLogs) {
|
|
7822
|
+
return this.publicClient.watchContractEvent({
|
|
7823
|
+
address: this.config.diamondAddress,
|
|
7824
|
+
abi: MarketOrdersFacet_default,
|
|
7825
|
+
eventName: "MarketSellExecuted",
|
|
7826
|
+
args: { marketId },
|
|
7827
|
+
onLogs
|
|
7828
|
+
});
|
|
7829
|
+
}
|
|
6790
7830
|
/**
|
|
6791
7831
|
* Check whether any orders are matchable in the given market.
|
|
6792
7832
|
* Returns a preview of which fill paths have crossing conditions,
|
|
@@ -7148,6 +8188,7 @@ var GET_MARKET = graphqlRequest.gql`
|
|
|
7148
8188
|
question
|
|
7149
8189
|
outcomes
|
|
7150
8190
|
status
|
|
8191
|
+
resolvedOutcome
|
|
7151
8192
|
collateralToken
|
|
7152
8193
|
conditionId
|
|
7153
8194
|
tickSize
|
|
@@ -7452,6 +8493,7 @@ var GET_GROUP_MARKETS = graphqlRequest.gql`
|
|
|
7452
8493
|
question
|
|
7453
8494
|
outcomes
|
|
7454
8495
|
status
|
|
8496
|
+
resolvedOutcome
|
|
7455
8497
|
collateralToken
|
|
7456
8498
|
conditionId
|
|
7457
8499
|
tickSize
|