@somnia-chain/contracts-sdk 0.2.0 → 0.3.5
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 +32 -1
- package/dist/abis.d.ts +21 -1
- package/dist/abis.js +17 -1
- package/dist/enumerate.d.ts +56 -0
- package/dist/enumerate.js +70 -0
- package/dist/gen/abi/somnia-accounts/SafeProxyFactory.d.ts +2 -0
- package/dist/gen/abi/somnia-accounts/SafeProxyFactory.js +3 -0
- package/dist/gen/abi/somnia-dex-protocol/dream-vault.implementation.d.ts +2 -2
- package/dist/gen/abi/somnia-dex-protocol/dream-vault.implementation.js +2 -2
- package/dist/gen/abi/somnia-markets/BinaryMarketsModule.d.ts +2 -2
- package/dist/gen/abi/somnia-markets/BinaryMarketsModule.js +2 -2
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.js +3 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy1.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy1.js +3 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy2.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy2.js +3 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy3.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy3.js +3 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy4.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy4.js +3 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy5.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/FeedMarketCreator.legacy5.js +3 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.js +3 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.legacy1.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.legacy1.js +3 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.legacy2.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/PriceFeedOracleAdapter.legacy2.js +3 -0
- package/dist/gen/abi/somnia-markets/venue-2.marketCreator.js +4 -0
- package/dist/gen/abi/somnia-markets/venue-4.marketCreator.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/venue-4.marketCreator.js +3 -0
- package/dist/gen/abi/somnia-markets/venue-4.marketCreatorPolicy.d.ts +2 -0
- package/dist/gen/abi/somnia-markets/venue-4.marketCreatorPolicy.js +3 -0
- package/dist/gen/abi/somnia-markets/venue-5.marketCreator.d.ts +2 -2
- package/dist/gen/abi/somnia-markets/venue-5.marketCreator.js +2 -2
- package/dist/gen/abis/{9611b42c6d5f.d.ts → 2fd67c1745ef.d.ts} +35 -2
- package/dist/gen/abis/{9611b42c6d5f.js → 2fd67c1745ef.js} +44 -2
- package/dist/gen/abis/44d37d7ba560.d.ts +180 -0
- package/dist/gen/abis/44d37d7ba560.js +233 -0
- package/dist/gen/abis/{49cb4deac436.d.ts → 88eb6f69cc13.d.ts} +145 -57
- package/dist/gen/abis/{49cb4deac436.js → 88eb6f69cc13.js} +183 -70
- package/dist/gen/abis/89e2309cce3a.d.ts +1010 -0
- package/dist/gen/abis/89e2309cce3a.js +1301 -0
- package/dist/gen/abis/a032a21f83aa.d.ts +1048 -0
- package/dist/gen/abis/a032a21f83aa.js +1371 -0
- package/dist/gen/abis-index.d.ts +6999 -4643
- package/dist/gen/abis-index.js +10 -4
- package/dist/gen/meta.d.ts +2 -2
- package/dist/gen/meta.js +2 -2
- package/dist/gen/registry.d.ts +213 -43
- package/dist/gen/registry.js +213 -43
- package/dist/index.d.ts +54 -4
- package/dist/index.js +16 -22
- package/package.json +1 -1
package/dist/gen/registry.js
CHANGED
|
@@ -87,6 +87,15 @@ export const hideki2Testnet = {
|
|
|
87
87
|
"status": "active",
|
|
88
88
|
"version": "v1"
|
|
89
89
|
},
|
|
90
|
+
"SafeProxyFactory": {
|
|
91
|
+
"abi": "sha256:44d37d7ba560dba7bd43fa13576d99f6a5639c68466445e79fe5bfbd73cdfd39",
|
|
92
|
+
"address": "0xAfa267D254E572E896C1f624b699Bcac9b511915",
|
|
93
|
+
"contract": "SafeProxyFactory",
|
|
94
|
+
"kind": "singleton",
|
|
95
|
+
"startBlock": 12840290,
|
|
96
|
+
"status": "active",
|
|
97
|
+
"version": "v1"
|
|
98
|
+
},
|
|
90
99
|
"SomniaAccountFactory": {
|
|
91
100
|
"abi": "sha256:1a5696b34cbfca5b274e5369ac92d345cab05ea79e7f60f16c9a46766955f02e",
|
|
92
101
|
"address": "0xdb0BE5722dE0dCb80c58878A53A507232362b301",
|
|
@@ -125,6 +134,13 @@ export const hideki2Testnet = {
|
|
|
125
134
|
"status": "active",
|
|
126
135
|
"version": "addr:0x2c99948a"
|
|
127
136
|
},
|
|
137
|
+
"liquidationEngine": {
|
|
138
|
+
"address": "0xA66d3C24Ad4a389d863846905D8173e1017e9F4D",
|
|
139
|
+
"kind": "singleton",
|
|
140
|
+
"startBlock": 780459,
|
|
141
|
+
"status": "active",
|
|
142
|
+
"version": "addr:0xa66d3c24"
|
|
143
|
+
},
|
|
128
144
|
"somniaAgents": {
|
|
129
145
|
"abi": "sha256:ecc4ba1d4404f9487b4d5d3e2b34ef1b7a1d9d188dbc94925ee07cd57d02943e",
|
|
130
146
|
"address": "0x7407cb35a17D511D1Bd32dD726ADb8D5344ECbE3",
|
|
@@ -164,13 +180,13 @@ export const hideki2Testnet = {
|
|
|
164
180
|
"version": "addr:0xaf327764"
|
|
165
181
|
},
|
|
166
182
|
"dream-vault.implementation": {
|
|
167
|
-
"abi": "sha256:
|
|
168
|
-
"address": "
|
|
183
|
+
"abi": "sha256:2fd67c1745efce166a36400ea59978db635369bd47dc332c67a001b5e92fdfa7",
|
|
184
|
+
"address": "0x35B045231A69BcE4e35db8597cfb341D9Dc8cdC4",
|
|
169
185
|
"contract": "DreamVault",
|
|
170
186
|
"kind": "implementation",
|
|
171
187
|
"startBlock": 5322619,
|
|
172
188
|
"status": "active",
|
|
173
|
-
"version": "addr:
|
|
189
|
+
"version": "addr:0x35b04523"
|
|
174
190
|
},
|
|
175
191
|
"manual-oracles.ADA_manual": {
|
|
176
192
|
"abi": "sha256:b127df9297ace91638fdd9d7f147863291f83ffa34677cb6d87d8f211ffe6a5b",
|
|
@@ -1063,6 +1079,15 @@ export const hideki2Testnet = {
|
|
|
1063
1079
|
"status": "active",
|
|
1064
1080
|
"version": "addr:0x1a483b48"
|
|
1065
1081
|
},
|
|
1082
|
+
"prophecy-oracle": {
|
|
1083
|
+
"abi": "sha256:ecc4ba1d4404f9487b4d5d3e2b34ef1b7a1d9d188dbc94925ee07cd57d02943e",
|
|
1084
|
+
"address": "0xc09b648aDf093808A0478eb12Bc4eBa709413463",
|
|
1085
|
+
"contract": "ERC1967Proxy",
|
|
1086
|
+
"kind": "singleton",
|
|
1087
|
+
"startBlock": 3567925,
|
|
1088
|
+
"status": "active",
|
|
1089
|
+
"version": "addr:0xc09b648a"
|
|
1090
|
+
},
|
|
1066
1091
|
"settlement-scheduler": {
|
|
1067
1092
|
"abi": "sha256:ecc4ba1d4404f9487b4d5d3e2b34ef1b7a1d9d188dbc94925ee07cd57d02943e",
|
|
1068
1093
|
"address": "0x9345df09F70EFe1F7d5608cD4e9f4a9871647E52",
|
|
@@ -1111,14 +1136,14 @@ export const hideki2Testnet = {
|
|
|
1111
1136
|
"version": "2"
|
|
1112
1137
|
},
|
|
1113
1138
|
"BinaryMarketsModule": {
|
|
1114
|
-
"abi": "sha256:
|
|
1139
|
+
"abi": "sha256:88eb6f69cc133fbfe2018ac3d4117fd00acbac9f546b2abdff8ea4c592fcb2b9",
|
|
1115
1140
|
"address": "0x3ecC694Cef705358864a646142ac17A90E29e388",
|
|
1116
1141
|
"contract": "BinaryMarketsModule",
|
|
1117
|
-
"implementation": "
|
|
1142
|
+
"implementation": "0x4E903688f1E0c8989594e12A130b59E44b671e96",
|
|
1118
1143
|
"kind": "proxy",
|
|
1119
1144
|
"startBlock": 840122,
|
|
1120
1145
|
"status": "active",
|
|
1121
|
-
"version": "
|
|
1146
|
+
"version": "7"
|
|
1122
1147
|
},
|
|
1123
1148
|
"BinaryPoolBeacon": {
|
|
1124
1149
|
"address": "0x85C01B5ef4F4ed59caC69749565e309f01b14Dbc",
|
|
@@ -1167,11 +1192,11 @@ export const hideki2Testnet = {
|
|
|
1167
1192
|
"abi": "sha256:4d8bacb29f205eb1576c7b10bdcd8b3d47eb489ba1a1f7a9b9d5050c72272386",
|
|
1168
1193
|
"address": "0x2802504314685D89bF6C992CA5a8e7cC78bc0294",
|
|
1169
1194
|
"contract": "MarketsCore",
|
|
1170
|
-
"implementation": "
|
|
1195
|
+
"implementation": "0x5Bbf0bB267b40e47d1f39e15D58DDA7e4A909792",
|
|
1171
1196
|
"kind": "proxy",
|
|
1172
1197
|
"startBlock": 840122,
|
|
1173
1198
|
"status": "active",
|
|
1174
|
-
"version": "
|
|
1199
|
+
"version": "2"
|
|
1175
1200
|
},
|
|
1176
1201
|
"OracleCore": {
|
|
1177
1202
|
"address": "0x463711Ab0C84Bdf9faf1925162885ACA74ed95a9",
|
|
@@ -1184,21 +1209,21 @@ export const hideki2Testnet = {
|
|
|
1184
1209
|
"abi": "sha256:96e8cf2c064f642e2df70855aaf0836c27730980ac8532bfdf7e5542d1ca9896",
|
|
1185
1210
|
"address": "0xe40db387cC98601Dd11bd634fF2f3AD5686dE32b",
|
|
1186
1211
|
"contract": "OracleHub",
|
|
1187
|
-
"implementation": "
|
|
1212
|
+
"implementation": "0x70d7Ff071940a1f28b17c2ff68609866B0bF684c",
|
|
1188
1213
|
"kind": "proxy",
|
|
1189
1214
|
"startBlock": 840122,
|
|
1190
1215
|
"status": "active",
|
|
1191
|
-
"version": "
|
|
1216
|
+
"version": "3"
|
|
1192
1217
|
},
|
|
1193
1218
|
"OutcomeToken6909": {
|
|
1194
1219
|
"abi": "sha256:3197a9b71399493025e3b29f4bdbe029755c7215e83b89238af50755de56b7fe",
|
|
1195
1220
|
"address": "0xB52c5934113Af5c0Bb20eb3C72290C8215f755b9",
|
|
1196
1221
|
"contract": "OutcomeToken6909",
|
|
1197
|
-
"implementation": "
|
|
1222
|
+
"implementation": "0xc54550817FA968f377CE03Cf9706Af744d16A7f6",
|
|
1198
1223
|
"kind": "proxy",
|
|
1199
1224
|
"startBlock": 840122,
|
|
1200
1225
|
"status": "active",
|
|
1201
|
-
"version": "
|
|
1226
|
+
"version": "2"
|
|
1202
1227
|
},
|
|
1203
1228
|
"venue-1.marketCreator": {
|
|
1204
1229
|
"abi": "sha256:072309c539e433439b1cfa50e63e3e7eac37910968bd705fad1469ed184ef2f6",
|
|
@@ -1316,6 +1341,15 @@ export const somniaMainnet = {
|
|
|
1316
1341
|
"status": "active",
|
|
1317
1342
|
"version": "v1"
|
|
1318
1343
|
},
|
|
1344
|
+
"SafeProxyFactory": {
|
|
1345
|
+
"abi": "sha256:44d37d7ba560dba7bd43fa13576d99f6a5639c68466445e79fe5bfbd73cdfd39",
|
|
1346
|
+
"address": "0xAfa267D254E572E896C1f624b699Bcac9b511915",
|
|
1347
|
+
"contract": "SafeProxyFactory",
|
|
1348
|
+
"kind": "singleton",
|
|
1349
|
+
"startBlock": 427798384,
|
|
1350
|
+
"status": "active",
|
|
1351
|
+
"version": "v1"
|
|
1352
|
+
},
|
|
1319
1353
|
"SomniaAccountFactory": {
|
|
1320
1354
|
"abi": "sha256:1a5696b34cbfca5b274e5369ac92d345cab05ea79e7f60f16c9a46766955f02e",
|
|
1321
1355
|
"address": "0xdb0BE5722dE0dCb80c58878A53A507232362b301",
|
|
@@ -1664,14 +1698,14 @@ export const somniaMainnet = {
|
|
|
1664
1698
|
"version": "2"
|
|
1665
1699
|
},
|
|
1666
1700
|
"BinaryMarketsModule": {
|
|
1667
|
-
"abi": "sha256:
|
|
1701
|
+
"abi": "sha256:88eb6f69cc133fbfe2018ac3d4117fd00acbac9f546b2abdff8ea4c592fcb2b9",
|
|
1668
1702
|
"address": "0x3ecC694Cef705358864a646142ac17A90E29e388",
|
|
1669
1703
|
"contract": "BinaryMarketsModule",
|
|
1670
|
-
"implementation": "
|
|
1704
|
+
"implementation": "0x4E903688f1E0c8989594e12A130b59E44b671e96",
|
|
1671
1705
|
"kind": "proxy",
|
|
1672
1706
|
"startBlock": 364232548,
|
|
1673
1707
|
"status": "active",
|
|
1674
|
-
"version": "
|
|
1708
|
+
"version": "6"
|
|
1675
1709
|
},
|
|
1676
1710
|
"BinaryPoolBeacon": {
|
|
1677
1711
|
"address": "0x85C01B5ef4F4ed59caC69749565e309f01b14Dbc",
|
|
@@ -1708,6 +1742,24 @@ export const somniaMainnet = {
|
|
|
1708
1742
|
"status": "active",
|
|
1709
1743
|
"version": "1"
|
|
1710
1744
|
},
|
|
1745
|
+
"FeedMarketCreator": {
|
|
1746
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
1747
|
+
"address": "0xfad8eDa4d50e876ba548BeD191Df1e2Af26783dF",
|
|
1748
|
+
"contract": "FeedMarketCreator",
|
|
1749
|
+
"implementation": "0x44E8CaEbAb3D5E939FF65A32dfBd4f6f6be50D22",
|
|
1750
|
+
"kind": "proxy",
|
|
1751
|
+
"startBlock": 426841377,
|
|
1752
|
+
"status": "active",
|
|
1753
|
+
"version": "1"
|
|
1754
|
+
},
|
|
1755
|
+
"FeedMarketCreator.legacy1": {
|
|
1756
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
1757
|
+
"address": "0xfe81C4e8EfFb7df27Eb21881f80AF2BF8DCF0c39",
|
|
1758
|
+
"contract": "FeedMarketCreator",
|
|
1759
|
+
"kind": "singleton",
|
|
1760
|
+
"status": "active",
|
|
1761
|
+
"version": "legacy-1"
|
|
1762
|
+
},
|
|
1711
1763
|
"MarketCreatorFactory": {
|
|
1712
1764
|
"abi": "sha256:cf9c2beac2109000bb6b4d1f2068ff1bcd1b5d0470b9ca97c41b31f779982826",
|
|
1713
1765
|
"address": "0xE6bEE93cE87c9E6e62aCb621caa7832EE47b4F6B",
|
|
@@ -1729,11 +1781,11 @@ export const somniaMainnet = {
|
|
|
1729
1781
|
"abi": "sha256:4d8bacb29f205eb1576c7b10bdcd8b3d47eb489ba1a1f7a9b9d5050c72272386",
|
|
1730
1782
|
"address": "0x2802504314685D89bF6C992CA5a8e7cC78bc0294",
|
|
1731
1783
|
"contract": "MarketsCore",
|
|
1732
|
-
"implementation": "
|
|
1784
|
+
"implementation": "0x5Bbf0bB267b40e47d1f39e15D58DDA7e4A909792",
|
|
1733
1785
|
"kind": "proxy",
|
|
1734
1786
|
"startBlock": 364232548,
|
|
1735
1787
|
"status": "active",
|
|
1736
|
-
"version": "
|
|
1788
|
+
"version": "2"
|
|
1737
1789
|
},
|
|
1738
1790
|
"OracleCore": {
|
|
1739
1791
|
"address": "0x463711Ab0C84Bdf9faf1925162885ACA74ed95a9",
|
|
@@ -1746,20 +1798,30 @@ export const somniaMainnet = {
|
|
|
1746
1798
|
"abi": "sha256:96e8cf2c064f642e2df70855aaf0836c27730980ac8532bfdf7e5542d1ca9896",
|
|
1747
1799
|
"address": "0xe40db387cC98601Dd11bd634fF2f3AD5686dE32b",
|
|
1748
1800
|
"contract": "OracleHub",
|
|
1749
|
-
"implementation": "
|
|
1801
|
+
"implementation": "0x70d7Ff071940a1f28b17c2ff68609866B0bF684c",
|
|
1750
1802
|
"kind": "proxy",
|
|
1751
1803
|
"startBlock": 364232548,
|
|
1752
1804
|
"status": "active",
|
|
1753
|
-
"version": "
|
|
1805
|
+
"version": "3"
|
|
1754
1806
|
},
|
|
1755
1807
|
"OutcomeToken6909": {
|
|
1756
1808
|
"abi": "sha256:3197a9b71399493025e3b29f4bdbe029755c7215e83b89238af50755de56b7fe",
|
|
1757
1809
|
"address": "0xB52c5934113Af5c0Bb20eb3C72290C8215f755b9",
|
|
1758
1810
|
"contract": "OutcomeToken6909",
|
|
1759
|
-
"implementation": "
|
|
1811
|
+
"implementation": "0xc54550817FA968f377CE03Cf9706Af744d16A7f6",
|
|
1760
1812
|
"kind": "proxy",
|
|
1761
1813
|
"startBlock": 364232548,
|
|
1762
1814
|
"status": "active",
|
|
1815
|
+
"version": "2"
|
|
1816
|
+
},
|
|
1817
|
+
"PriceFeedOracleAdapter": {
|
|
1818
|
+
"abi": "sha256:a032a21f83aae76653320a00184cd18a9199c6f12926c4e9d49de5a827699e5c",
|
|
1819
|
+
"address": "0x9f6231199b7B9922427e7686313a08a1f0A4FB8E",
|
|
1820
|
+
"contract": "PriceFeedOracleAdapter",
|
|
1821
|
+
"implementation": "0x722af209e0cd3d2633612bDFE26Ec1b2e4b9Edf3",
|
|
1822
|
+
"kind": "proxy",
|
|
1823
|
+
"startBlock": 426841360,
|
|
1824
|
+
"status": "active",
|
|
1763
1825
|
"version": "1"
|
|
1764
1826
|
},
|
|
1765
1827
|
"venue-1.marketCreator": {
|
|
@@ -1811,20 +1873,20 @@ export const somniaMainnet = {
|
|
|
1811
1873
|
"version": "1"
|
|
1812
1874
|
},
|
|
1813
1875
|
"venue-5.marketCreator": {
|
|
1814
|
-
"abi": "sha256:
|
|
1815
|
-
"address": "
|
|
1816
|
-
"contract": "
|
|
1876
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
1877
|
+
"address": "0xfad8eDa4d50e876ba548BeD191Df1e2Af26783dF",
|
|
1878
|
+
"contract": "FeedMarketCreator",
|
|
1817
1879
|
"kind": "singleton",
|
|
1818
1880
|
"status": "active",
|
|
1819
|
-
"version": "
|
|
1881
|
+
"version": "4"
|
|
1820
1882
|
},
|
|
1821
1883
|
"venue-5.marketCreatorPolicy": {
|
|
1822
1884
|
"abi": "sha256:c76e9681cb2ff8c1220b018d85fd392d16c0cacc229ea8bcef37b1f51fb98c3a",
|
|
1823
|
-
"address": "
|
|
1885
|
+
"address": "0xC7f2E6AC430586Ff4A64849047523AA9A7699a3E",
|
|
1824
1886
|
"contract": "MarketCreatorPolicy",
|
|
1825
1887
|
"kind": "singleton",
|
|
1826
1888
|
"status": "active",
|
|
1827
|
-
"version": "
|
|
1889
|
+
"version": "addr:0xc7f2e6ac"
|
|
1828
1890
|
}
|
|
1829
1891
|
}
|
|
1830
1892
|
}
|
|
@@ -1887,6 +1949,15 @@ export const somniaTestnet = {
|
|
|
1887
1949
|
"status": "active",
|
|
1888
1950
|
"version": "v1"
|
|
1889
1951
|
},
|
|
1952
|
+
"SafeProxyFactory": {
|
|
1953
|
+
"abi": "sha256:44d37d7ba560dba7bd43fa13576d99f6a5639c68466445e79fe5bfbd73cdfd39",
|
|
1954
|
+
"address": "0xAfa267D254E572E896C1f624b699Bcac9b511915",
|
|
1955
|
+
"contract": "SafeProxyFactory",
|
|
1956
|
+
"kind": "singleton",
|
|
1957
|
+
"startBlock": 503594557,
|
|
1958
|
+
"status": "active",
|
|
1959
|
+
"version": "v1"
|
|
1960
|
+
},
|
|
1890
1961
|
"SomniaAccountFactory": {
|
|
1891
1962
|
"abi": "sha256:1a5696b34cbfca5b274e5369ac92d345cab05ea79e7f60f16c9a46766955f02e",
|
|
1892
1963
|
"address": "0xdb0BE5722dE0dCb80c58878A53A507232362b301",
|
|
@@ -1941,6 +2012,13 @@ export const somniaTestnet = {
|
|
|
1941
2012
|
"status": "active",
|
|
1942
2013
|
"version": "addr:0x4045424b"
|
|
1943
2014
|
},
|
|
2015
|
+
"liquidationEngine": {
|
|
2016
|
+
"address": "0xe01ef816783DC5f95B1982cacF9d0E3DB1bC2f28",
|
|
2017
|
+
"kind": "singleton",
|
|
2018
|
+
"startBlock": 327531609,
|
|
2019
|
+
"status": "active",
|
|
2020
|
+
"version": "addr:0xe01ef816"
|
|
2021
|
+
},
|
|
1944
2022
|
"somniaAgents": {
|
|
1945
2023
|
"address": "0x037Bb9C718F3f7fe5eCBDB0b600D607b52706776",
|
|
1946
2024
|
"kind": "singleton",
|
|
@@ -2230,13 +2308,13 @@ export const somniaTestnet = {
|
|
|
2230
2308
|
"version": "addr:0xedc670d6"
|
|
2231
2309
|
},
|
|
2232
2310
|
"dream-vault.implementation": {
|
|
2233
|
-
"abi": "sha256:
|
|
2234
|
-
"address": "
|
|
2311
|
+
"abi": "sha256:2fd67c1745efce166a36400ea59978db635369bd47dc332c67a001b5e92fdfa7",
|
|
2312
|
+
"address": "0x2630945a1f9c324f912A7cE9555483816e092Ade",
|
|
2235
2313
|
"contract": "DreamVault",
|
|
2236
2314
|
"kind": "implementation",
|
|
2237
2315
|
"startBlock": 496077557,
|
|
2238
2316
|
"status": "active",
|
|
2239
|
-
"version": "addr:
|
|
2317
|
+
"version": "addr:0x2630945a"
|
|
2240
2318
|
},
|
|
2241
2319
|
"linked-wallet-registry.registryImplementation": {
|
|
2242
2320
|
"abi": "sha256:4030909740896b8a7cecb27b6dfbb8be862ddce2c044d644b2dcb38fb39406a3",
|
|
@@ -3611,14 +3689,14 @@ export const somniaTestnet = {
|
|
|
3611
3689
|
"version": "2"
|
|
3612
3690
|
},
|
|
3613
3691
|
"BinaryMarketsModule": {
|
|
3614
|
-
"abi": "sha256:
|
|
3692
|
+
"abi": "sha256:88eb6f69cc133fbfe2018ac3d4117fd00acbac9f546b2abdff8ea4c592fcb2b9",
|
|
3615
3693
|
"address": "0x3ecC694Cef705358864a646142ac17A90E29e388",
|
|
3616
3694
|
"contract": "BinaryMarketsModule",
|
|
3617
|
-
"implementation": "
|
|
3695
|
+
"implementation": "0x4E903688f1E0c8989594e12A130b59E44b671e96",
|
|
3618
3696
|
"kind": "proxy",
|
|
3619
3697
|
"startBlock": 440002713,
|
|
3620
3698
|
"status": "active",
|
|
3621
|
-
"version": "
|
|
3699
|
+
"version": "7"
|
|
3622
3700
|
},
|
|
3623
3701
|
"BinaryPoolBeacon": {
|
|
3624
3702
|
"address": "0x85C01B5ef4F4ed59caC69749565e309f01b14Dbc",
|
|
@@ -3655,6 +3733,56 @@ export const somniaTestnet = {
|
|
|
3655
3733
|
"status": "active",
|
|
3656
3734
|
"version": "1"
|
|
3657
3735
|
},
|
|
3736
|
+
"FeedMarketCreator": {
|
|
3737
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3738
|
+
"address": "0xD584e651008538b5C6B1C777cD4fbD54cC19a291",
|
|
3739
|
+
"contract": "FeedMarketCreator",
|
|
3740
|
+
"implementation": "0xFc1c136e2dD9FA840ABB3A11839F67dd13e4C69F",
|
|
3741
|
+
"kind": "proxy",
|
|
3742
|
+
"startBlock": 502185025,
|
|
3743
|
+
"status": "active",
|
|
3744
|
+
"version": "1"
|
|
3745
|
+
},
|
|
3746
|
+
"FeedMarketCreator.legacy1": {
|
|
3747
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3748
|
+
"address": "0x3Cfec8A401aFF74CC28434C46e7c143fE493B42c",
|
|
3749
|
+
"contract": "FeedMarketCreator",
|
|
3750
|
+
"kind": "singleton",
|
|
3751
|
+
"status": "active",
|
|
3752
|
+
"version": "legacy-1"
|
|
3753
|
+
},
|
|
3754
|
+
"FeedMarketCreator.legacy2": {
|
|
3755
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3756
|
+
"address": "0xD00635E502eAa62436207900F00c33588931a341",
|
|
3757
|
+
"contract": "FeedMarketCreator",
|
|
3758
|
+
"kind": "singleton",
|
|
3759
|
+
"status": "active",
|
|
3760
|
+
"version": "legacy-2"
|
|
3761
|
+
},
|
|
3762
|
+
"FeedMarketCreator.legacy3": {
|
|
3763
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3764
|
+
"address": "0xCd757472662f80779c09C431f8FAd2624566Cd02",
|
|
3765
|
+
"contract": "FeedMarketCreator",
|
|
3766
|
+
"kind": "singleton",
|
|
3767
|
+
"status": "active",
|
|
3768
|
+
"version": "legacy-3"
|
|
3769
|
+
},
|
|
3770
|
+
"FeedMarketCreator.legacy4": {
|
|
3771
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3772
|
+
"address": "0xDcc4B37a097751C9302AB54E7cEfc84f33571470",
|
|
3773
|
+
"contract": "FeedMarketCreator",
|
|
3774
|
+
"kind": "singleton",
|
|
3775
|
+
"status": "active",
|
|
3776
|
+
"version": "legacy-4"
|
|
3777
|
+
},
|
|
3778
|
+
"FeedMarketCreator.legacy5": {
|
|
3779
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3780
|
+
"address": "0x94D963B6670AB96E78C8d0C46ca35D196d606EFE",
|
|
3781
|
+
"contract": "FeedMarketCreator",
|
|
3782
|
+
"kind": "singleton",
|
|
3783
|
+
"status": "active",
|
|
3784
|
+
"version": "legacy-5"
|
|
3785
|
+
},
|
|
3658
3786
|
"MarketCreatorFactory": {
|
|
3659
3787
|
"abi": "sha256:cf9c2beac2109000bb6b4d1f2068ff1bcd1b5d0470b9ca97c41b31f779982826",
|
|
3660
3788
|
"address": "0xE6bEE93cE87c9E6e62aCb621caa7832EE47b4F6B",
|
|
@@ -3676,11 +3804,11 @@ export const somniaTestnet = {
|
|
|
3676
3804
|
"abi": "sha256:4d8bacb29f205eb1576c7b10bdcd8b3d47eb489ba1a1f7a9b9d5050c72272386",
|
|
3677
3805
|
"address": "0x2802504314685D89bF6C992CA5a8e7cC78bc0294",
|
|
3678
3806
|
"contract": "MarketsCore",
|
|
3679
|
-
"implementation": "
|
|
3807
|
+
"implementation": "0x5Bbf0bB267b40e47d1f39e15D58DDA7e4A909792",
|
|
3680
3808
|
"kind": "proxy",
|
|
3681
3809
|
"startBlock": 440002713,
|
|
3682
3810
|
"status": "active",
|
|
3683
|
-
"version": "
|
|
3811
|
+
"version": "2"
|
|
3684
3812
|
},
|
|
3685
3813
|
"OracleCore": {
|
|
3686
3814
|
"address": "0x463711Ab0C84Bdf9faf1925162885ACA74ed95a9",
|
|
@@ -3693,22 +3821,48 @@ export const somniaTestnet = {
|
|
|
3693
3821
|
"abi": "sha256:96e8cf2c064f642e2df70855aaf0836c27730980ac8532bfdf7e5542d1ca9896",
|
|
3694
3822
|
"address": "0xe40db387cC98601Dd11bd634fF2f3AD5686dE32b",
|
|
3695
3823
|
"contract": "OracleHub",
|
|
3696
|
-
"implementation": "
|
|
3824
|
+
"implementation": "0x70d7Ff071940a1f28b17c2ff68609866B0bF684c",
|
|
3697
3825
|
"kind": "proxy",
|
|
3698
3826
|
"startBlock": 440002713,
|
|
3699
3827
|
"status": "active",
|
|
3700
|
-
"version": "
|
|
3828
|
+
"version": "3"
|
|
3701
3829
|
},
|
|
3702
3830
|
"OutcomeToken6909": {
|
|
3703
3831
|
"abi": "sha256:3197a9b71399493025e3b29f4bdbe029755c7215e83b89238af50755de56b7fe",
|
|
3704
3832
|
"address": "0xB52c5934113Af5c0Bb20eb3C72290C8215f755b9",
|
|
3705
3833
|
"contract": "OutcomeToken6909",
|
|
3706
|
-
"implementation": "
|
|
3834
|
+
"implementation": "0xc54550817FA968f377CE03Cf9706Af744d16A7f6",
|
|
3707
3835
|
"kind": "proxy",
|
|
3708
3836
|
"startBlock": 440002713,
|
|
3709
3837
|
"status": "active",
|
|
3838
|
+
"version": "2"
|
|
3839
|
+
},
|
|
3840
|
+
"PriceFeedOracleAdapter": {
|
|
3841
|
+
"abi": "sha256:a032a21f83aae76653320a00184cd18a9199c6f12926c4e9d49de5a827699e5c",
|
|
3842
|
+
"address": "0x3c2a814e63fac034E57c58B09e0c38Be983c23Ea",
|
|
3843
|
+
"contract": "PriceFeedOracleAdapter",
|
|
3844
|
+
"implementation": "0x0D0E8FBB6503642b9Dcd878eB0e249e039fBC79e",
|
|
3845
|
+
"kind": "proxy",
|
|
3846
|
+
"startBlock": 502184995,
|
|
3847
|
+
"status": "active",
|
|
3710
3848
|
"version": "1"
|
|
3711
3849
|
},
|
|
3850
|
+
"PriceFeedOracleAdapter.legacy1": {
|
|
3851
|
+
"abi": "sha256:a032a21f83aae76653320a00184cd18a9199c6f12926c4e9d49de5a827699e5c",
|
|
3852
|
+
"address": "0xC3F494a5a509041f154415066a5f835EC42901F2",
|
|
3853
|
+
"contract": "PriceFeedOracleAdapter",
|
|
3854
|
+
"kind": "singleton",
|
|
3855
|
+
"status": "active",
|
|
3856
|
+
"version": "legacy-1"
|
|
3857
|
+
},
|
|
3858
|
+
"PriceFeedOracleAdapter.legacy2": {
|
|
3859
|
+
"abi": "sha256:a032a21f83aae76653320a00184cd18a9199c6f12926c4e9d49de5a827699e5c",
|
|
3860
|
+
"address": "0x3e9ea7EC9F36E3d36B7a25Db6e5c27652AAb3747",
|
|
3861
|
+
"contract": "PriceFeedOracleAdapter",
|
|
3862
|
+
"kind": "singleton",
|
|
3863
|
+
"status": "active",
|
|
3864
|
+
"version": "legacy-2"
|
|
3865
|
+
},
|
|
3712
3866
|
"venue-1.marketCreator": {
|
|
3713
3867
|
"abi": "sha256:072309c539e433439b1cfa50e63e3e7eac37910968bd705fad1469ed184ef2f6",
|
|
3714
3868
|
"address": "0x46fB24eb2E8563299D954d950278ad9C814F2594",
|
|
@@ -3726,20 +3880,20 @@ export const somniaTestnet = {
|
|
|
3726
3880
|
"version": "1"
|
|
3727
3881
|
},
|
|
3728
3882
|
"venue-2.marketCreator": {
|
|
3729
|
-
"abi": "sha256:
|
|
3730
|
-
"address": "
|
|
3731
|
-
"contract": "
|
|
3883
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3884
|
+
"address": "0xD584e651008538b5C6B1C777cD4fbD54cC19a291",
|
|
3885
|
+
"contract": "FeedMarketCreator",
|
|
3732
3886
|
"kind": "singleton",
|
|
3733
3887
|
"status": "active",
|
|
3734
|
-
"version": "
|
|
3888
|
+
"version": "3"
|
|
3735
3889
|
},
|
|
3736
3890
|
"venue-2.marketCreatorPolicy": {
|
|
3737
3891
|
"abi": "sha256:c76e9681cb2ff8c1220b018d85fd392d16c0cacc229ea8bcef37b1f51fb98c3a",
|
|
3738
|
-
"address": "
|
|
3892
|
+
"address": "0x98d32ab2DbF26DB7210E55CE42F8C334d937db25",
|
|
3739
3893
|
"contract": "MarketCreatorPolicy",
|
|
3740
3894
|
"kind": "singleton",
|
|
3741
3895
|
"status": "active",
|
|
3742
|
-
"version": "
|
|
3896
|
+
"version": "addr:0x98d32ab2"
|
|
3743
3897
|
},
|
|
3744
3898
|
"venue-3.marketCreator": {
|
|
3745
3899
|
"abi": "sha256:072309c539e433439b1cfa50e63e3e7eac37910968bd705fad1469ed184ef2f6",
|
|
@@ -3756,6 +3910,22 @@ export const somniaTestnet = {
|
|
|
3756
3910
|
"kind": "singleton",
|
|
3757
3911
|
"status": "active",
|
|
3758
3912
|
"version": "1"
|
|
3913
|
+
},
|
|
3914
|
+
"venue-4.marketCreator": {
|
|
3915
|
+
"abi": "sha256:89e2309cce3a7aa4b38161ad2b7011e7e500250c2b5c7adbcfd93ae352aae322",
|
|
3916
|
+
"address": "0xDcc4B37a097751C9302AB54E7cEfc84f33571470",
|
|
3917
|
+
"contract": "FeedMarketCreator",
|
|
3918
|
+
"kind": "singleton",
|
|
3919
|
+
"status": "active",
|
|
3920
|
+
"version": "4"
|
|
3921
|
+
},
|
|
3922
|
+
"venue-4.marketCreatorPolicy": {
|
|
3923
|
+
"abi": "sha256:c76e9681cb2ff8c1220b018d85fd392d16c0cacc229ea8bcef37b1f51fb98c3a",
|
|
3924
|
+
"address": "0x5CAC4EFf2cEC4D4A484431E3A6CABD3638B60c34",
|
|
3925
|
+
"contract": "MarketCreatorPolicy",
|
|
3926
|
+
"kind": "singleton",
|
|
3927
|
+
"status": "active",
|
|
3928
|
+
"version": "addr:0x5cac4eff"
|
|
3759
3929
|
}
|
|
3760
3930
|
}
|
|
3761
3931
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,19 @@ export type ProjectSlug<N extends NetworkSlug> = keyof Registry[N]["contracts"]
|
|
|
7
7
|
export type ContractName<N extends NetworkSlug, P extends ProjectSlug<N>> = keyof Registry[N]["contracts"][P] & string;
|
|
8
8
|
export type Address = `0x${string}`;
|
|
9
9
|
export type AbiDigest = `sha256:${string}`;
|
|
10
|
+
/**
|
|
11
|
+
* What a deployment is, structurally. `proxy` and `beacon-proxy` carry an
|
|
12
|
+
* `implementation`; `implementation` and `beacon` are the targets behind one
|
|
13
|
+
* and are recorded in their own right so an upgrade has something to point at;
|
|
14
|
+
* `external` is a contract Somnia depends on but did not deploy.
|
|
15
|
+
*/
|
|
16
|
+
export type DeploymentKind = "singleton" | "proxy" | "beacon" | "beacon-proxy" | "implementation" | "external";
|
|
17
|
+
/**
|
|
18
|
+
* Whether a deployment is the one to use. `superseded` and `retired` records
|
|
19
|
+
* are kept rather than deleted — decoding an old transaction needs the address
|
|
20
|
+
* that was current when it was sent.
|
|
21
|
+
*/
|
|
22
|
+
export type ContractStatus = "active" | "superseded" | "retired";
|
|
10
23
|
/** One deployment's record; narrow it by passing slugs and a name. The `abi` field is a digest — resolve it via the `./abis` entry point or a per-contract `./abi/*` module. */
|
|
11
24
|
export type ContractEntry<N extends NetworkSlug = NetworkSlug, P extends ProjectSlug<N> = ProjectSlug<N>, C extends ContractName<N, P> = ContractName<N, P>> = Registry[N]["contracts"][P][C];
|
|
12
25
|
type DistributedOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
|
|
@@ -46,24 +59,61 @@ export declare function tryAddress(net: NetworkSlug, project: string, name: stri
|
|
|
46
59
|
export interface ListedContract {
|
|
47
60
|
network: NetworkSlug;
|
|
48
61
|
project: string;
|
|
62
|
+
/** The registry's name for this deployment — a role, like `BTC_reader`. */
|
|
49
63
|
name: string;
|
|
50
64
|
address: Address;
|
|
51
|
-
kind:
|
|
52
|
-
status:
|
|
65
|
+
kind: DeploymentKind;
|
|
66
|
+
status: ContractStatus;
|
|
53
67
|
version: string;
|
|
68
|
+
/**
|
|
69
|
+
* The Solidity contract name, where a source states it. Absent where no
|
|
70
|
+
* source did: the registry records a name only from a broadcast log or a
|
|
71
|
+
* repo declaration, never a guess. This is also the key the per-contract
|
|
72
|
+
* `./abi/<project>/<contract>` modules are published under, so an
|
|
73
|
+
* enumerated deployment can reach its typed ABI only when this is set —
|
|
74
|
+
* and it is set on exactly the deployments that have an `abi` digest.
|
|
75
|
+
*/
|
|
76
|
+
contract?: string;
|
|
54
77
|
implementation?: Address;
|
|
55
78
|
startBlock?: number;
|
|
56
79
|
abi?: AbiDigest;
|
|
57
80
|
}
|
|
58
81
|
/** Enumerate a network's deployments, optionally one project's. */
|
|
59
82
|
export declare function contracts(net: NetworkSlug, project?: string): ListedContract[];
|
|
83
|
+
export interface AllContractsOptions {
|
|
84
|
+
/**
|
|
85
|
+
* Include networks the registry has retired. Off by default: a retired
|
|
86
|
+
* network's addresses still exist but answer on a chain that was wiped, so
|
|
87
|
+
* showing them beside live ones is how a dashboard displays a balance that
|
|
88
|
+
* is not there.
|
|
89
|
+
*/
|
|
90
|
+
includeRetiredNetworks?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Include deployments superseded by a later one. Off by default — the
|
|
93
|
+
* registry publishes only each deployment's current release, so this
|
|
94
|
+
* changes nothing today and keeps meaning the same thing if that changes.
|
|
95
|
+
*/
|
|
96
|
+
includeSuperseded?: boolean;
|
|
97
|
+
project?: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Every current deployment, across every live network.
|
|
101
|
+
*
|
|
102
|
+
* The one call a dashboard wants: enumerating per network means knowing the
|
|
103
|
+
* slugs, remembering that retired ones exist, and filtering status by hand at
|
|
104
|
+
* every call site — three chances to show a wiped testnet's addresses as
|
|
105
|
+
* current. Ordered by network slug, then project, then name, so a rendered
|
|
106
|
+
* list is stable between releases.
|
|
107
|
+
*/
|
|
108
|
+
export declare function allContracts(opts?: AllContractsOptions): ListedContract[];
|
|
60
109
|
export interface ContractIdentity {
|
|
61
110
|
network: NetworkSlug;
|
|
62
111
|
project: string;
|
|
63
112
|
name: string;
|
|
64
|
-
kind:
|
|
65
|
-
status:
|
|
113
|
+
kind: DeploymentKind;
|
|
114
|
+
status: ContractStatus;
|
|
66
115
|
address: Address;
|
|
116
|
+
contract?: string;
|
|
67
117
|
implementation?: Address;
|
|
68
118
|
abi?: AbiDigest;
|
|
69
119
|
/** "address" — the queried address is the deployment; "implementation" — it is the implementation behind one. */
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { registry } from "./gen/registry.js";
|
|
2
|
+
import { buildIdentityIndex, listAll, listContracts } from "./enumerate.js";
|
|
2
3
|
export * from "./gen/registry.js";
|
|
3
4
|
export { registryVersion } from "./gen/meta.js";
|
|
4
5
|
function info(slug) {
|
|
@@ -56,20 +57,22 @@ export function tryAddress(net, project, name) {
|
|
|
56
57
|
const book = registry[net]?.contracts;
|
|
57
58
|
return book?.[project]?.[name]?.address ?? null;
|
|
58
59
|
}
|
|
60
|
+
const books = registry;
|
|
59
61
|
/** Enumerate a network's deployments, optionally one project's. */
|
|
60
62
|
export function contracts(net, project) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
63
|
+
return listContracts(books, net, project);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Every current deployment, across every live network.
|
|
67
|
+
*
|
|
68
|
+
* The one call a dashboard wants: enumerating per network means knowing the
|
|
69
|
+
* slugs, remembering that retired ones exist, and filtering status by hand at
|
|
70
|
+
* every call site — three chances to show a wiped testnet's addresses as
|
|
71
|
+
* current. Ordered by network slug, then project, then name, so a rendered
|
|
72
|
+
* list is stable between releases.
|
|
73
|
+
*/
|
|
74
|
+
export function allContracts(opts = {}) {
|
|
75
|
+
return listAll(books, opts);
|
|
73
76
|
}
|
|
74
77
|
const identityIndex = new Map();
|
|
75
78
|
/**
|
|
@@ -81,16 +84,7 @@ const identityIndex = new Map();
|
|
|
81
84
|
export function identify(net, addr) {
|
|
82
85
|
let index = identityIndex.get(net);
|
|
83
86
|
if (!index) {
|
|
84
|
-
index =
|
|
85
|
-
for (const entry of contracts(net)) {
|
|
86
|
-
const identity = { ...entry, matchedBy: "address" };
|
|
87
|
-
index.set(entry.address.toLowerCase(), identity);
|
|
88
|
-
if (entry.implementation) {
|
|
89
|
-
const viaImpl = entry.implementation.toLowerCase();
|
|
90
|
-
if (!index.has(viaImpl))
|
|
91
|
-
index.set(viaImpl, { ...identity, matchedBy: "implementation" });
|
|
92
|
-
}
|
|
93
|
-
}
|
|
87
|
+
index = buildIdentityIndex(books, net);
|
|
94
88
|
identityIndex.set(net, index);
|
|
95
89
|
}
|
|
96
90
|
return index.get(addr.toLowerCase()) ?? null;
|
package/package.json
CHANGED