@gensyn-ai/gensyn-delphi-sdk 1.2.1 → 2.0.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 CHANGED
@@ -8,6 +8,39 @@ TypeScript SDK for agents to interact with the Delphi information market platfor
8
8
  npm install @gensyn-ai/gensyn-delphi-sdk
9
9
  ```
10
10
 
11
+ ## Upgrading to 2.0.0
12
+
13
+ 2.0.0 adds support for the automated-settlement deployment, which now receives every new
14
+ market on every network. Most code needs no change — all trading, quoting, redemption and
15
+ liquidation call signatures are identical across both deployments. Three things are breaking.
16
+
17
+ **1. The default subgraph no longer exposes `gatewayWinnerSubmitteds`.** The default
18
+ `subgraphUrl` now points at `delphi-testnet-autoset` / `delphi-mainnet-autoset`, where the
19
+ settlement entity is `gatewayMarketSettleds` with an identical payload. `SubgraphClient` throws
20
+ on GraphQL errors, so a query for the old entity fails hard rather than returning empty. Rename
21
+ the entity, or set `DELPHI_SUBGRAPH_URL` to the previous `delphi-testnet` / `delphi-mainnet`
22
+ subgraphs to keep querying legacy history. `gatewayBuys`, `gatewaySells`, `gatewayRedemptions`
23
+ and `gatewayLiquidations` are unchanged.
24
+
25
+ **2. Status fields are narrowed to `MarketStatus`, with a new `failed` member.**
26
+ `Market.status`, `Position.marketStatus` and `ListMarketsParams.status` were `string` and are now
27
+ the union `"open" | "awaiting_settlement" | "settled" | "expired" | "failed"`. Passing a
28
+ dynamically-typed `string` to the `status` filter needs a cast or validation, and an exhaustive
29
+ `switch` over a status needs a `failed` arm. `failed` markets have no winning outcome, so they
30
+ exit through `liquidate()` — see [Market Lifecycle](#market-lifecycle).
31
+
32
+ **3. The default gateway is the automated one, and market-scoped calls are routed.**
33
+ `gatewayAddress` / `factoryAddress` now default to the automated-settlement contracts, with the
34
+ originals available as `legacyGatewayAddress` / `legacyFactoryAddress`. Every market-scoped call
35
+ resolves its owning gateway first, so addresses from either deployment work without configuration.
36
+ Setting `gatewayAddress` or `DELPHI_GATEWAY_CONTRACT` now **pins every call to that gateway and
37
+ disables routing** — previously it simply set the only gateway there was. Unset it unless you are
38
+ targeting a local deployment.
39
+
40
+ New in this release: `resolveGateway()`, `getMarketStatus()`,
41
+ `SubgraphClient.getMarketSettlement()`, the `MarketStatus` type, and
42
+ `LIQUIDATABLE_MARKET_STATUSES`.
43
+
11
44
  ## Quick Start
12
45
 
13
46
  ```typescript
@@ -60,7 +93,10 @@ An API key is required for all REST API endpoints (listing markets, querying pos
60
93
  | `DELPHI_SIGNER_TYPE` | Signing method: `cdp_server_wallet` or `private_key` | `cdp_server_wallet` |
61
94
  | `DELPHI_API_ACCESS_KEY` | REST API key (see [API Key](#api-key) above) | — |
62
95
  | `DELPHI_API_BASE_URL` | Override the REST API base URL | *(network default)* |
63
- | `DELPHI_GATEWAY_CONTRACT` | Override the Gateway contract address | *(network default)* |
96
+ | `DELPHI_GATEWAY_CONTRACT` | Override the Gateway address. Pins **every** call to this gateway and disables per-market routing | *(network default)* |
97
+ | `DELPHI_LEGACY_GATEWAY_CONTRACT` | Override the legacy Gateway address used for legacy markets | *(network default)* |
98
+ | `DELPHI_FACTORY_CONTRACT` | Override the automated-settlement Factory (used to route markets) | *(network default)* |
99
+ | `DELPHI_LEGACY_FACTORY_CONTRACT` | Override the legacy Factory (used to route markets) | *(network default)* |
64
100
  | `DELPHI_TOKEN_ADDRESS` | Override the ERC-20 token (USDC) address | *(network default)* |
65
101
  | `DELPHI_SUBGRAPH_URL` | Override the Goldsky subgraph endpoint | *(network default)* |
66
102
  | `DELPHI_APP_URL` | Override the Delphi app base URL (used to build `marketUrl`) | *(network default)* |
@@ -88,12 +124,72 @@ An API key is required for all REST API endpoints (listing markets, querying pos
88
124
  |---|---|---|
89
125
  | Chain ID | `685685` | `685689` |
90
126
  | RPC URL | `https://gensyn-testnet.g.alchemy.com/public` | `https://gensyn-mainnet.g.alchemy.com/public` |
91
- | Gateway | `0x7b8FDBD187B0Be5e30e48B1995df574A62667147` | `0x4e4e85c52E0F414cc67eE88d0C649Ec81698d700` |
127
+ | Gateway (automated settlement) | `0x22ea355D7218Dc86b4c83732cBbd01f7Ff2332b3` | `0x982a67aE92D8de361957249fB2BB4a62BCc6A8d5` |
128
+ | Factory (automated settlement) | `0x97d2b3F0614C8189343A38094629FCE2910b727A` | `0x9C73417f79a1361c6aF9Bd828343badEE1b84936` |
129
+ | Gateway (legacy) | `0x7b8FDBD187B0Be5e30e48B1995df574A62667147` | `0x4e4e85c52E0F414cc67eE88d0C649Ec81698d700` |
130
+ | Factory (legacy) | `0xd03CEC55802f0D44D844384E1144B25717315E5A` | `0x4596d847eA56DCf9A37944c13793Af802Fc5D1eC` |
92
131
  | Token (USDC) | `0x0724D6079b986F8e44bDafB8a09B60C0bd6A45a1` | `0x5b32c997211621d55a89Cc5abAF1cC21F3A6ddF5` |
93
132
  | API URL | `https://delphi-api.gensyn.ai/` | `https://api.delphi.fyi/` |
94
- | Subgraph URL | [Goldsky endpoint](https://api.goldsky.com/api/public/project_cmnoqdag1obop01z3efnu8ssq/subgraphs/delphi-testnet/1.0.0/gn) | [Goldsky endpoint](https://api.goldsky.com/api/public/project_cmnoqdag1obop01z3efnu8ssq/subgraphs/delphi-mainnet/1.0.0/gn) |
133
+ | Subgraph URL | [Goldsky endpoint](https://api.goldsky.com/api/public/project_cmnoqdag1obop01z3efnu8ssq/subgraphs/delphi-testnet-autoset/1.0.0/gn) | [Goldsky endpoint](https://api.goldsky.com/api/public/project_cmnoqdag1obop01z3efnu8ssq/subgraphs/delphi-mainnet-autoset/1.0.0/gn) |
95
134
  | App URL | `https://testnet.delphi.fyi` | `https://app.delphi.fyi` |
96
135
 
136
+ ### Market Deployments and Gateway Routing
137
+
138
+ Delphi runs two contract deployments side by side on each network:
139
+
140
+ - **Automated settlement** — every new market. Settled by the Truebit oracle relayer, which
141
+ can also report that it *could not* resolve the question, leaving the market `failed`.
142
+ - **Legacy** — markets created before automated settlement, settled manually by the market
143
+ creator. Its factory no longer produces markets, but existing positions there are still
144
+ redeemable and liquidatable.
145
+
146
+ Each gateway only accepts markets deployed by its own factory and reverts with
147
+ `MarketProxyNotDeployedByFactory` for anything else. The client handles this for you: every
148
+ market-scoped call resolves the owning gateway first (one batched `marketProxiesExist` probe
149
+ across both factories, cached per market for the client's lifetime). You can pass a market
150
+ address from either deployment and it just works.
151
+
152
+ Setting `gatewayAddress` (or `DELPHI_GATEWAY_CONTRACT`) pins all calls to that one gateway and
153
+ skips routing — useful for a local deployment, but calls will revert if you pass a market that
154
+ gateway does not own.
155
+
156
+ One caveat: the default `subgraphUrl` indexes the **automated-settlement gateway only**. REST and
157
+ on-chain methods cover both deployments, but subgraph queries for a legacy market return empty.
158
+ Point `subgraphUrl` (or `DELPHI_SUBGRAPH_URL`) at the older `delphi-testnet` / `delphi-mainnet`
159
+ subgraphs to query legacy activity.
160
+
161
+ To resolve a gateway yourself:
162
+
163
+ ```typescript
164
+ const gateway = await client.resolveGateway("0x...");
165
+ ```
166
+
167
+ ### Market Lifecycle
168
+
169
+ | Status | Meaning | How holders exit |
170
+ |---|---|---|
171
+ | `open` | Trading is open | `sellShares` |
172
+ | `awaiting_settlement` | Trading closed, no outcome yet | — |
173
+ | `settled` | A winning outcome was set | `redeemMarket` |
174
+ | `expired` | Settlement deadline passed with no outcome | `liquidate` |
175
+ | `failed` | Settlement ran but could not resolve | `liquidate` |
176
+
177
+ `failed` occurs only on automated-settlement markets. Like `expired` it has **no winning
178
+ outcome**, so `redeem()` reverts — funds are recovered with `liquidate()` instead. If you sweep
179
+ a portfolio with `redeemPositions`, check the status first and route `expired`/`failed` markets
180
+ to `liquidate`:
181
+
182
+ ```typescript
183
+ import { LIQUIDATABLE_MARKET_STATUSES } from "@gensyn-ai/gensyn-delphi-sdk";
184
+
185
+ const status = await client.getMarketStatus(marketAddress);
186
+ if (LIQUIDATABLE_MARKET_STATUSES.includes(status)) {
187
+ await client.liquidate({ marketAddress, outcomeIndices: [0, 1] });
188
+ } else if (status === "settled") {
189
+ await client.redeemMarket({ marketAddress });
190
+ }
191
+ ```
192
+
97
193
  ### Config Object
98
194
 
99
195
  All environment variables can also be passed directly to the constructor, which takes precedence over env vars:
@@ -207,7 +303,7 @@ Each market object includes:
207
303
 
208
304
  ```typescript
209
305
  const { markets } = await client.listMarkets({
210
- status: "open", // "open" | "closed" | "settled"
306
+ status: "open", // "open" | "awaiting_settlement" | "settled" | "expired" | "failed"
211
307
  category: "crypto", // "crypto" | "culture" | "economics" | "miscellaneous" | "politics" | "sports"
212
308
  orderBy: "liquidity", // "liquidity" (default) | "created" | "settles_at"
213
309
  verifiable: true, // filter by verifiable settlement
@@ -315,7 +411,7 @@ for (const result of results) {
315
411
 
316
412
  #### `liquidate(params)`
317
413
 
318
- Liquidate positions on an expired market. Burns shares across the specified outcome indices and returns the collateral tokens.
414
+ Liquidate positions on an `expired` or `failed` market. Burns shares across the specified outcome indices and returns the collateral tokens. This is the exit path for markets with no winning outcome — see [Market Lifecycle](#market-lifecycle).
319
415
 
320
416
  ```typescript
321
417
  const { transactionHash, sharesIn, totalTokensOut } = await client.liquidate({
@@ -324,6 +420,23 @@ const { transactionHash, sharesIn, totalTokensOut } = await client.liquidate({
324
420
  });
325
421
  ```
326
422
 
423
+ #### `getMarketStatus(marketAddress)`
424
+
425
+ Read a market's lifecycle status directly from its gateway. Unlike `getMarket()`, this hits the chain rather than the indexed REST API, so it reflects state that has not been indexed yet.
426
+
427
+ ```typescript
428
+ const status = await client.getMarketStatus("0xMarket");
429
+ // "open" | "awaiting_settlement" | "settled" | "expired" | "failed"
430
+ ```
431
+
432
+ #### `resolveGateway(marketAddress)`
433
+
434
+ Return the gateway address that serves a market — the automated-settlement gateway or the legacy one. Called automatically by every market-scoped method; exposed for callers that need it directly. See [Market Deployments and Gateway Routing](#market-deployments-and-gateway-routing).
435
+
436
+ ```typescript
437
+ const gateway = await client.resolveGateway("0xMarket");
438
+ ```
439
+
327
440
  #### `getTokenAllowance(params)`
328
441
 
329
442
  Read the current ERC-20 allowance your wallet has granted to the gateway.
@@ -391,7 +504,7 @@ Query on-chain event data indexed by the Goldsky subgraph.
391
504
 
392
505
  #### `getSubgraph()`
393
506
 
394
- Access the `SubgraphClient` for querying historical trade data.
507
+ Access the `SubgraphClient` for querying historical trade and settlement data. The default endpoint indexes the automated-settlement gateway — see [Market Deployments and Gateway Routing](#market-deployments-and-gateway-routing).
395
508
 
396
509
  ```typescript
397
510
  const subgraph = client.getSubgraph();
@@ -401,6 +514,11 @@ const { buys, sells } = await subgraph.getMarketTrades("0xMarketProxy", {
401
514
  first: 20,
402
515
  });
403
516
 
517
+ // Fetch how a market settled. `settled` and `failed` are mutually exclusive:
518
+ // a failed market has no winning outcome, so holders exit via liquidate().
519
+ const { settled, failed, resolutionRequests } =
520
+ await subgraph.getMarketSettlement("0xMarketProxy");
521
+
404
522
  // Check subgraph indexing metadata
405
523
  const meta = await subgraph.getMeta();
406
524
 
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Minimal DelphiFactory ABI — only the reads the SDK needs to resolve which
3
+ * deployment (legacy or automated-settlement) a market proxy belongs to.
4
+ *
5
+ * Each gateway serves only the markets deployed by its own factory and reverts
6
+ * with `MarketProxyNotDeployedByFactory` for anything else, so `marketProxyExists`
7
+ * is what lets the client route a call to the correct gateway.
8
+ */
9
+ declare const DELPHI_FACTORY_ABI: readonly [{
10
+ readonly inputs: readonly [];
11
+ readonly name: "IMPLEMENTATION";
12
+ readonly outputs: readonly [{
13
+ readonly internalType: "address";
14
+ readonly name: "";
15
+ readonly type: "address";
16
+ }];
17
+ readonly stateMutability: "view";
18
+ readonly type: "function";
19
+ }, {
20
+ readonly inputs: readonly [];
21
+ readonly name: "getTotalMarketProxiesCount";
22
+ readonly outputs: readonly [{
23
+ readonly internalType: "uint256";
24
+ readonly name: "";
25
+ readonly type: "uint256";
26
+ }];
27
+ readonly stateMutability: "view";
28
+ readonly type: "function";
29
+ }, {
30
+ readonly inputs: readonly [{
31
+ readonly internalType: "address";
32
+ readonly name: "marketProxy";
33
+ readonly type: "address";
34
+ }];
35
+ readonly name: "marketProxyExists";
36
+ readonly outputs: readonly [{
37
+ readonly internalType: "bool";
38
+ readonly name: "";
39
+ readonly type: "bool";
40
+ }];
41
+ readonly stateMutability: "view";
42
+ readonly type: "function";
43
+ }, {
44
+ readonly inputs: readonly [{
45
+ readonly internalType: "address[]";
46
+ readonly name: "marketProxies";
47
+ readonly type: "address[]";
48
+ }];
49
+ readonly name: "marketProxiesExist";
50
+ readonly outputs: readonly [{
51
+ readonly internalType: "bool[]";
52
+ readonly name: "";
53
+ readonly type: "bool[]";
54
+ }];
55
+ readonly stateMutability: "view";
56
+ readonly type: "function";
57
+ }];
58
+ export declare const ABI: readonly [{
59
+ readonly inputs: readonly [];
60
+ readonly name: "IMPLEMENTATION";
61
+ readonly outputs: readonly [{
62
+ readonly internalType: "address";
63
+ readonly name: "";
64
+ readonly type: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ readonly type: "function";
68
+ }, {
69
+ readonly inputs: readonly [];
70
+ readonly name: "getTotalMarketProxiesCount";
71
+ readonly outputs: readonly [{
72
+ readonly internalType: "uint256";
73
+ readonly name: "";
74
+ readonly type: "uint256";
75
+ }];
76
+ readonly stateMutability: "view";
77
+ readonly type: "function";
78
+ }, {
79
+ readonly inputs: readonly [{
80
+ readonly internalType: "address";
81
+ readonly name: "marketProxy";
82
+ readonly type: "address";
83
+ }];
84
+ readonly name: "marketProxyExists";
85
+ readonly outputs: readonly [{
86
+ readonly internalType: "bool";
87
+ readonly name: "";
88
+ readonly type: "bool";
89
+ }];
90
+ readonly stateMutability: "view";
91
+ readonly type: "function";
92
+ }, {
93
+ readonly inputs: readonly [{
94
+ readonly internalType: "address[]";
95
+ readonly name: "marketProxies";
96
+ readonly type: "address[]";
97
+ }];
98
+ readonly name: "marketProxiesExist";
99
+ readonly outputs: readonly [{
100
+ readonly internalType: "bool[]";
101
+ readonly name: "";
102
+ readonly type: "bool[]";
103
+ }];
104
+ readonly stateMutability: "view";
105
+ readonly type: "function";
106
+ }];
107
+ export default DELPHI_FACTORY_ABI;
108
+ //# sourceMappingURL=DelphiFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DelphiFactory.d.ts","sourceRoot":"","sources":["../../src/abi/DelphiFactory.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEA,CAAC;AAEzB,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAqB,CAAC;AACtC,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Minimal DelphiFactory ABI — only the reads the SDK needs to resolve which
3
+ * deployment (legacy or automated-settlement) a market proxy belongs to.
4
+ *
5
+ * Each gateway serves only the markets deployed by its own factory and reverts
6
+ * with `MarketProxyNotDeployedByFactory` for anything else, so `marketProxyExists`
7
+ * is what lets the client route a call to the correct gateway.
8
+ */
9
+ const DELPHI_FACTORY_ABI = [
10
+ {
11
+ "inputs": [],
12
+ "name": "IMPLEMENTATION",
13
+ "outputs": [
14
+ {
15
+ "internalType": "address",
16
+ "name": "",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "view",
21
+ "type": "function"
22
+ },
23
+ {
24
+ "inputs": [],
25
+ "name": "getTotalMarketProxiesCount",
26
+ "outputs": [
27
+ {
28
+ "internalType": "uint256",
29
+ "name": "",
30
+ "type": "uint256"
31
+ }
32
+ ],
33
+ "stateMutability": "view",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "address",
40
+ "name": "marketProxy",
41
+ "type": "address"
42
+ }
43
+ ],
44
+ "name": "marketProxyExists",
45
+ "outputs": [
46
+ {
47
+ "internalType": "bool",
48
+ "name": "",
49
+ "type": "bool"
50
+ }
51
+ ],
52
+ "stateMutability": "view",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address[]",
59
+ "name": "marketProxies",
60
+ "type": "address[]"
61
+ }
62
+ ],
63
+ "name": "marketProxiesExist",
64
+ "outputs": [
65
+ {
66
+ "internalType": "bool[]",
67
+ "name": "",
68
+ "type": "bool[]"
69
+ }
70
+ ],
71
+ "stateMutability": "view",
72
+ "type": "function"
73
+ }
74
+ ];
75
+ export const ABI = DELPHI_FACTORY_ABI;
76
+ export default DELPHI_FACTORY_ABI;
77
+ //# sourceMappingURL=DelphiFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DelphiFactory.js","sourceRoot":"","sources":["../../src/abi/DelphiFactory.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,kBAAkB,GAAG;IACzB;QACE,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,gBAAgB;QACxB,SAAS,EAAE;YACT;gBACE,cAAc,EAAE,SAAS;gBACzB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,SAAS;aAClB;SACF;QACD,iBAAiB,EAAE,MAAM;QACzB,MAAM,EAAE,UAAU;KACnB;IACD;QACE,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE;YACT;gBACE,cAAc,EAAE,SAAS;gBACzB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,SAAS;aAClB;SACF;QACD,iBAAiB,EAAE,MAAM;QACzB,MAAM,EAAE,UAAU;KACnB;IACD;QACE,QAAQ,EAAE;YACR;gBACE,cAAc,EAAE,SAAS;gBACzB,MAAM,EAAE,aAAa;gBACrB,MAAM,EAAE,SAAS;aAClB;SACF;QACD,MAAM,EAAE,mBAAmB;QAC3B,SAAS,EAAE;YACT;gBACE,cAAc,EAAE,MAAM;gBACtB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,MAAM;aACf;SACF;QACD,iBAAiB,EAAE,MAAM;QACzB,MAAM,EAAE,UAAU;KACnB;IACD;QACE,QAAQ,EAAE;YACR;gBACE,cAAc,EAAE,WAAW;gBAC3B,MAAM,EAAE,eAAe;gBACvB,MAAM,EAAE,WAAW;aACpB;SACF;QACD,MAAM,EAAE,oBAAoB;QAC5B,SAAS,EAAE;YACT;gBACE,cAAc,EAAE,QAAQ;gBACxB,MAAM,EAAE,EAAE;gBACV,MAAM,EAAE,QAAQ;aACjB;SACF;QACD,iBAAiB,EAAE,MAAM;QACzB,MAAM,EAAE,UAAU;KACnB;CACqB,CAAC;AAEzB,MAAM,CAAC,MAAM,GAAG,GAAG,kBAAkB,CAAC;AACtC,eAAe,kBAAkB,CAAC"}
@@ -254,6 +254,46 @@ declare const DYNAMIC_PARIMUTUEL_GATEWAY_ABI: readonly [{
254
254
  }];
255
255
  readonly name: "GatewayLiquidation";
256
256
  readonly type: "event";
257
+ }, {
258
+ readonly anonymous: false;
259
+ readonly inputs: readonly [{
260
+ readonly indexed: true;
261
+ readonly internalType: "contract IDynamicParimutuelMarket";
262
+ readonly name: "marketProxy";
263
+ readonly type: "address";
264
+ }];
265
+ readonly name: "GatewayMarketFailed";
266
+ readonly type: "event";
267
+ }, {
268
+ readonly anonymous: false;
269
+ readonly inputs: readonly [{
270
+ readonly indexed: true;
271
+ readonly internalType: "contract IDynamicParimutuelMarket";
272
+ readonly name: "marketProxy";
273
+ readonly type: "address";
274
+ }, {
275
+ readonly indexed: false;
276
+ readonly internalType: "uint256";
277
+ readonly name: "winningOutcomeIdx";
278
+ readonly type: "uint256";
279
+ }, {
280
+ readonly indexed: false;
281
+ readonly internalType: "uint256";
282
+ readonly name: "marketCreatorReward";
283
+ readonly type: "uint256";
284
+ }, {
285
+ readonly indexed: false;
286
+ readonly internalType: "uint256";
287
+ readonly name: "refund";
288
+ readonly type: "uint256";
289
+ }, {
290
+ readonly indexed: false;
291
+ readonly internalType: "uint256";
292
+ readonly name: "marketCreatorTradingFeesCut";
293
+ readonly type: "uint256";
294
+ }];
295
+ readonly name: "GatewayMarketSettled";
296
+ readonly type: "event";
257
297
  }, {
258
298
  readonly anonymous: false;
259
299
  readonly inputs: readonly [{
@@ -349,6 +389,21 @@ declare const DYNAMIC_PARIMUTUEL_GATEWAY_ABI: readonly [{
349
389
  }];
350
390
  readonly name: "Initialized";
351
391
  readonly type: "event";
392
+ }, {
393
+ readonly anonymous: false;
394
+ readonly inputs: readonly [{
395
+ readonly indexed: true;
396
+ readonly internalType: "contract IDynamicParimutuelMarket";
397
+ readonly name: "marketProxy";
398
+ readonly type: "address";
399
+ }, {
400
+ readonly indexed: true;
401
+ readonly internalType: "address";
402
+ readonly name: "keeper";
403
+ readonly type: "address";
404
+ }];
405
+ readonly name: "MarketResolutionRequested";
406
+ readonly type: "event";
352
407
  }, {
353
408
  readonly inputs: readonly [];
354
409
  readonly name: "MIN_SHARES_DELTA";
@@ -539,6 +594,16 @@ declare const DYNAMIC_PARIMUTUEL_GATEWAY_ABI: readonly [{
539
594
  }];
540
595
  readonly stateMutability: "view";
541
596
  readonly type: "function";
597
+ }, {
598
+ readonly inputs: readonly [{
599
+ readonly internalType: "contract IDynamicParimutuelMarket";
600
+ readonly name: "marketProxy";
601
+ readonly type: "address";
602
+ }];
603
+ readonly name: "failMarket";
604
+ readonly outputs: readonly [];
605
+ readonly stateMutability: "nonpayable";
606
+ readonly type: "function";
542
607
  }, {
543
608
  readonly inputs: readonly [{
544
609
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -950,6 +1015,16 @@ declare const DYNAMIC_PARIMUTUEL_GATEWAY_ABI: readonly [{
950
1015
  }];
951
1016
  readonly stateMutability: "view";
952
1017
  readonly type: "function";
1018
+ }, {
1019
+ readonly inputs: readonly [];
1020
+ readonly name: "oracleRelayer";
1021
+ readonly outputs: readonly [{
1022
+ readonly internalType: "address";
1023
+ readonly name: "";
1024
+ readonly type: "address";
1025
+ }];
1026
+ readonly stateMutability: "view";
1027
+ readonly type: "function";
953
1028
  }, {
954
1029
  readonly inputs: readonly [{
955
1030
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -1026,6 +1101,16 @@ declare const DYNAMIC_PARIMUTUEL_GATEWAY_ABI: readonly [{
1026
1101
  }];
1027
1102
  readonly stateMutability: "nonpayable";
1028
1103
  readonly type: "function";
1104
+ }, {
1105
+ readonly inputs: readonly [{
1106
+ readonly internalType: "contract IDynamicParimutuelMarket";
1107
+ readonly name: "marketProxy";
1108
+ readonly type: "address";
1109
+ }];
1110
+ readonly name: "resolveMarket";
1111
+ readonly outputs: readonly [];
1112
+ readonly stateMutability: "nonpayable";
1113
+ readonly type: "function";
1029
1114
  }, {
1030
1115
  readonly inputs: readonly [{
1031
1116
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -1443,6 +1528,46 @@ export declare const ABI: readonly [{
1443
1528
  }];
1444
1529
  readonly name: "GatewayLiquidation";
1445
1530
  readonly type: "event";
1531
+ }, {
1532
+ readonly anonymous: false;
1533
+ readonly inputs: readonly [{
1534
+ readonly indexed: true;
1535
+ readonly internalType: "contract IDynamicParimutuelMarket";
1536
+ readonly name: "marketProxy";
1537
+ readonly type: "address";
1538
+ }];
1539
+ readonly name: "GatewayMarketFailed";
1540
+ readonly type: "event";
1541
+ }, {
1542
+ readonly anonymous: false;
1543
+ readonly inputs: readonly [{
1544
+ readonly indexed: true;
1545
+ readonly internalType: "contract IDynamicParimutuelMarket";
1546
+ readonly name: "marketProxy";
1547
+ readonly type: "address";
1548
+ }, {
1549
+ readonly indexed: false;
1550
+ readonly internalType: "uint256";
1551
+ readonly name: "winningOutcomeIdx";
1552
+ readonly type: "uint256";
1553
+ }, {
1554
+ readonly indexed: false;
1555
+ readonly internalType: "uint256";
1556
+ readonly name: "marketCreatorReward";
1557
+ readonly type: "uint256";
1558
+ }, {
1559
+ readonly indexed: false;
1560
+ readonly internalType: "uint256";
1561
+ readonly name: "refund";
1562
+ readonly type: "uint256";
1563
+ }, {
1564
+ readonly indexed: false;
1565
+ readonly internalType: "uint256";
1566
+ readonly name: "marketCreatorTradingFeesCut";
1567
+ readonly type: "uint256";
1568
+ }];
1569
+ readonly name: "GatewayMarketSettled";
1570
+ readonly type: "event";
1446
1571
  }, {
1447
1572
  readonly anonymous: false;
1448
1573
  readonly inputs: readonly [{
@@ -1538,6 +1663,21 @@ export declare const ABI: readonly [{
1538
1663
  }];
1539
1664
  readonly name: "Initialized";
1540
1665
  readonly type: "event";
1666
+ }, {
1667
+ readonly anonymous: false;
1668
+ readonly inputs: readonly [{
1669
+ readonly indexed: true;
1670
+ readonly internalType: "contract IDynamicParimutuelMarket";
1671
+ readonly name: "marketProxy";
1672
+ readonly type: "address";
1673
+ }, {
1674
+ readonly indexed: true;
1675
+ readonly internalType: "address";
1676
+ readonly name: "keeper";
1677
+ readonly type: "address";
1678
+ }];
1679
+ readonly name: "MarketResolutionRequested";
1680
+ readonly type: "event";
1541
1681
  }, {
1542
1682
  readonly inputs: readonly [];
1543
1683
  readonly name: "MIN_SHARES_DELTA";
@@ -1728,6 +1868,16 @@ export declare const ABI: readonly [{
1728
1868
  }];
1729
1869
  readonly stateMutability: "view";
1730
1870
  readonly type: "function";
1871
+ }, {
1872
+ readonly inputs: readonly [{
1873
+ readonly internalType: "contract IDynamicParimutuelMarket";
1874
+ readonly name: "marketProxy";
1875
+ readonly type: "address";
1876
+ }];
1877
+ readonly name: "failMarket";
1878
+ readonly outputs: readonly [];
1879
+ readonly stateMutability: "nonpayable";
1880
+ readonly type: "function";
1731
1881
  }, {
1732
1882
  readonly inputs: readonly [{
1733
1883
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -2139,6 +2289,16 @@ export declare const ABI: readonly [{
2139
2289
  }];
2140
2290
  readonly stateMutability: "view";
2141
2291
  readonly type: "function";
2292
+ }, {
2293
+ readonly inputs: readonly [];
2294
+ readonly name: "oracleRelayer";
2295
+ readonly outputs: readonly [{
2296
+ readonly internalType: "address";
2297
+ readonly name: "";
2298
+ readonly type: "address";
2299
+ }];
2300
+ readonly stateMutability: "view";
2301
+ readonly type: "function";
2142
2302
  }, {
2143
2303
  readonly inputs: readonly [{
2144
2304
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -2215,6 +2375,16 @@ export declare const ABI: readonly [{
2215
2375
  }];
2216
2376
  readonly stateMutability: "nonpayable";
2217
2377
  readonly type: "function";
2378
+ }, {
2379
+ readonly inputs: readonly [{
2380
+ readonly internalType: "contract IDynamicParimutuelMarket";
2381
+ readonly name: "marketProxy";
2382
+ readonly type: "address";
2383
+ }];
2384
+ readonly name: "resolveMarket";
2385
+ readonly outputs: readonly [];
2386
+ readonly stateMutability: "nonpayable";
2387
+ readonly type: "function";
2218
2388
  }, {
2219
2389
  readonly inputs: readonly [{
2220
2390
  readonly internalType: "contract IDynamicParimutuelMarket";
@@ -1 +1 @@
1
- {"version":3,"file":"DynamicParimutuelGateway.d.ts","sourceRoot":"","sources":["../../src/abi/DynamicParimutuelGateway.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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