@oddmaki-protocol/sdk 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -8158,6 +8158,15 @@ declare class VenueModule extends BaseModule {
8158
8158
  * Check if a user can create markets on a venue.
8159
8159
  */
8160
8160
  canCreateMarket(user: `0x${string}`, venueId: bigint): Promise<boolean>;
8161
+ /**
8162
+ * Get the current protocol fee in basis points. Snapshotted per market at creation.
8163
+ */
8164
+ getProtocolFeeBps(): Promise<bigint>;
8165
+ /**
8166
+ * Set the protocol fee in basis points. Owner-only. Max 200 bps (2%).
8167
+ * Only affects markets created after this call (existing markets retain their snapshot).
8168
+ */
8169
+ setProtocolFeeBps(bps: bigint): Promise<`0x${string}`>;
8161
8170
  }
8162
8171
 
8163
8172
  /**
@@ -8293,6 +8302,42 @@ interface SubgraphMarketPriceData {
8293
8302
  * @returns Price as percentage (0-100)
8294
8303
  */
8295
8304
  declare function getOutcomePrice(market: SubgraphMarketPriceData, outcomeIndex: number): number;
8305
+ /**
8306
+ * Top-of-book entry from subgraph TopOfBook entity.
8307
+ */
8308
+ interface TopOfBookEntry {
8309
+ outcome: string;
8310
+ side: string;
8311
+ topTick: string;
8312
+ }
8313
+ /**
8314
+ * Input for calculateChancePercent — accepts subgraph market data.
8315
+ */
8316
+ interface ChancePercentInput {
8317
+ tickSize: string;
8318
+ status?: string;
8319
+ resolvedOutcome?: number | string | null;
8320
+ lastPriceTick_0?: string | null;
8321
+ lastPriceTick_1?: string | null;
8322
+ lastTradeTimestamp_0?: string | null;
8323
+ lastTradeTimestamp_1?: string | null;
8324
+ topOfBook?: TopOfBookEntry[];
8325
+ }
8326
+ /**
8327
+ * Calculate the "chance %" for a binary market using a Polymarket-style waterfall:
8328
+ *
8329
+ * 1. **Implied mark price** (midpoint of implied Yes bid/ask) — if spread ≤ $0.10
8330
+ * 2. **Last trade** (most recent trade from either side) — if book empty or spread > $0.10
8331
+ * 3. **50%** — no data
8332
+ *
8333
+ * Implied prices account for cross-outcome liquidity via mint/merge paths:
8334
+ * - No BUY at tick N → implied Yes ASK at (maxTicks - N) via Mint path
8335
+ * - No SELL at tick N → implied Yes BID at (maxTicks - N) via Merge path
8336
+ *
8337
+ * @param market - Subgraph market data with top-of-book and last trade info
8338
+ * @returns Chance percentage (0-100)
8339
+ */
8340
+ declare function calculateChancePercent(market: ChancePercentInput): number;
8296
8341
 
8297
8342
  declare class MarketModule extends BaseModule {
8298
8343
  /**
@@ -9007,10 +9052,12 @@ declare class PublicModule extends BaseModule {
9007
9052
  */
9008
9053
  mergeAndSortFeed(feedData: any, sortBy?: 'created' | 'volume', limit?: number): Array<any>;
9009
9054
  /**
9010
- * Calculate probability for a market using last trade price
9055
+ * Calculate probability for a market using mark price waterfall.
9011
9056
  * Returns probability as a decimal string (e.g., "0.65" for 65%)
9012
9057
  *
9013
- * @param market - Market object from subgraph
9058
+ * Uses Polymarket-style pricing: implied midpoint → last trade → default 50%.
9059
+ *
9060
+ * @param market - Market object from subgraph (with topOfBook and timestamp fields)
9014
9061
  * @returns Probability string or null if no data available
9015
9062
  */
9016
9063
  calculateMarketProbability(market: any): string | null;
@@ -9163,6 +9210,16 @@ declare class UmaModule extends BaseModule {
9163
9210
  outcome: string;
9164
9211
  autoApprove?: boolean;
9165
9212
  }): Promise<`0x${string}`>;
9213
+ /**
9214
+ * Get the effective bond for a market, accounting for UMA's minimum bond.
9215
+ * The contract uses max(requiredBond, oo.getMinimumBond(currency)).
9216
+ */
9217
+ getEffectiveBond(marketId: bigint): Promise<{
9218
+ requiredBond: bigint;
9219
+ minimumBond: bigint;
9220
+ effectiveBond: bigint;
9221
+ currency: Address;
9222
+ }>;
9166
9223
  /**
9167
9224
  * Settle an assertion after the liveness period
9168
9225
  */
@@ -9776,14 +9833,27 @@ declare const DEFAULT_CHAIN: {
9776
9833
  */
9777
9834
  /**
9778
9835
  * Fee Constants
9779
- * Fixed protocol-level fee tiers (not configurable per-market)
9836
+ * Protocol fee is configurable on-chain (0-200 bps) and snapshotted per market at creation.
9837
+ * These are the default values set at deployment.
9780
9838
  */
9781
9839
  declare const PROTOCOL_FEES: {
9782
- /** Protocol fee: 20 bps (0.20%) */
9783
- readonly PROTOCOL_FEE_BPS: 20n;
9840
+ /** Protocol fee: 50 bps (0.50%) — configurable via ProtocolFacet.setProtocolFeeBps() */
9841
+ readonly PROTOCOL_FEE_BPS: 50n;
9784
9842
  /** Operator fee: 10 bps (0.10%) for match operators */
9785
9843
  readonly OPERATOR_FEE_BPS: 10n;
9786
9844
  };
9845
+ /**
9846
+ * Recommended UMA Oracle defaults for USDC venues (6 decimals).
9847
+ * Based on Polymarket's production configuration.
9848
+ */
9849
+ declare const UMA_DEFAULTS: {
9850
+ /** Recommended reward: 5 USDC. Incentivizes third-party resolution. */
9851
+ readonly REWARD_USDC: 5000000n;
9852
+ /** Recommended minimum bond: 750 USDC. Matches Polymarket's production bond. */
9853
+ readonly MIN_BOND_USDC: 750000000n;
9854
+ /** Default liveness period: 2 hours (7200 seconds). */
9855
+ readonly LIVENESS: 7200n;
9856
+ };
9787
9857
 
9788
9858
  var VenueFacet = [
9789
9859
  {
@@ -10346,6 +10416,12 @@ var VenueFacet = [
10346
10416
  inputs: [
10347
10417
  ]
10348
10418
  },
10419
+ {
10420
+ type: "error",
10421
+ name: "InvalidUmaMinBond",
10422
+ inputs: [
10423
+ ]
10424
+ },
10349
10425
  {
10350
10426
  type: "error",
10351
10427
  name: "InvalidVenueFee",
@@ -10668,6 +10744,11 @@ var MarketsFacet = [
10668
10744
  name: "creatorFeeBps",
10669
10745
  type: "uint256",
10670
10746
  internalType: "uint256"
10747
+ },
10748
+ {
10749
+ name: "protocolFeeBps",
10750
+ type: "uint256",
10751
+ internalType: "uint256"
10671
10752
  }
10672
10753
  ]
10673
10754
  }
@@ -11803,6 +11884,25 @@ var MatchingFacet = [
11803
11884
  ],
11804
11885
  anonymous: false
11805
11886
  },
11887
+ {
11888
+ type: "event",
11889
+ name: "OrderAutoCancelled",
11890
+ inputs: [
11891
+ {
11892
+ name: "orderId",
11893
+ type: "uint256",
11894
+ indexed: true,
11895
+ internalType: "uint256"
11896
+ },
11897
+ {
11898
+ name: "refundedCollateral",
11899
+ type: "uint256",
11900
+ indexed: false,
11901
+ internalType: "uint256"
11902
+ }
11903
+ ],
11904
+ anonymous: false
11905
+ },
11806
11906
  {
11807
11907
  type: "event",
11808
11908
  name: "OrderDeleted",
@@ -12564,6 +12664,11 @@ var MarketGroupFacet = [
12564
12664
  name: "liveness",
12565
12665
  type: "uint64",
12566
12666
  internalType: "uint64"
12667
+ },
12668
+ {
12669
+ name: "reward",
12670
+ type: "uint256",
12671
+ internalType: "uint256"
12567
12672
  }
12568
12673
  ]
12569
12674
  }
@@ -12710,6 +12815,12 @@ var MarketGroupFacet = [
12710
12815
  type: "bytes32[]",
12711
12816
  indexed: false,
12712
12817
  internalType: "bytes32[]"
12818
+ },
12819
+ {
12820
+ name: "reward",
12821
+ type: "uint256",
12822
+ indexed: false,
12823
+ internalType: "uint256"
12713
12824
  }
12714
12825
  ],
12715
12826
  anonymous: false
@@ -13330,6 +13441,11 @@ var ResolutionFacet = [
13330
13441
  name: "settled",
13331
13442
  type: "bool",
13332
13443
  internalType: "bool"
13444
+ },
13445
+ {
13446
+ name: "asserter",
13447
+ type: "address",
13448
+ internalType: "address"
13333
13449
  }
13334
13450
  ]
13335
13451
  }
@@ -13520,6 +13636,31 @@ var ResolutionFacet = [
13520
13636
  ],
13521
13637
  anonymous: false
13522
13638
  },
13639
+ {
13640
+ type: "event",
13641
+ name: "RewardPaid",
13642
+ inputs: [
13643
+ {
13644
+ name: "assertionId",
13645
+ type: "bytes32",
13646
+ indexed: true,
13647
+ internalType: "bytes32"
13648
+ },
13649
+ {
13650
+ name: "asserter",
13651
+ type: "address",
13652
+ indexed: true,
13653
+ internalType: "address"
13654
+ },
13655
+ {
13656
+ name: "reward",
13657
+ type: "uint256",
13658
+ indexed: false,
13659
+ internalType: "uint256"
13660
+ }
13661
+ ],
13662
+ anonymous: false
13663
+ },
13523
13664
  {
13524
13665
  type: "error",
13525
13666
  name: "ApproveFailed",
@@ -13580,6 +13721,12 @@ var ResolutionFacet = [
13580
13721
  inputs: [
13581
13722
  ]
13582
13723
  },
13724
+ {
13725
+ type: "error",
13726
+ name: "TransferFailed",
13727
+ inputs: [
13728
+ ]
13729
+ },
13583
13730
  {
13584
13731
  type: "error",
13585
13732
  name: "TransferFromFailed",
@@ -13895,6 +14042,20 @@ var NegRiskFacet = [
13895
14042
  ];
13896
14043
 
13897
14044
  var ProtocolFacet = [
14045
+ {
14046
+ type: "function",
14047
+ name: "getProtocolFeeBps",
14048
+ inputs: [
14049
+ ],
14050
+ outputs: [
14051
+ {
14052
+ name: "",
14053
+ type: "uint256",
14054
+ internalType: "uint256"
14055
+ }
14056
+ ],
14057
+ stateMutability: "view"
14058
+ },
13898
14059
  {
13899
14060
  type: "function",
13900
14061
  name: "getProtocolPaused",
@@ -14017,6 +14178,20 @@ var ProtocolFacet = [
14017
14178
  ],
14018
14179
  stateMutability: "nonpayable"
14019
14180
  },
14181
+ {
14182
+ type: "function",
14183
+ name: "setProtocolFeeBps",
14184
+ inputs: [
14185
+ {
14186
+ name: "bps",
14187
+ type: "uint256",
14188
+ internalType: "uint256"
14189
+ }
14190
+ ],
14191
+ outputs: [
14192
+ ],
14193
+ stateMutability: "nonpayable"
14194
+ },
14020
14195
  {
14021
14196
  type: "function",
14022
14197
  name: "setProtocolTreasury",
@@ -14197,6 +14372,19 @@ var ProtocolFacet = [
14197
14372
  ],
14198
14373
  anonymous: false
14199
14374
  },
14375
+ {
14376
+ type: "event",
14377
+ name: "ProtocolFeeBpsUpdated",
14378
+ inputs: [
14379
+ {
14380
+ name: "bps",
14381
+ type: "uint256",
14382
+ indexed: false,
14383
+ internalType: "uint256"
14384
+ }
14385
+ ],
14386
+ anonymous: false
14387
+ },
14200
14388
  {
14201
14389
  type: "event",
14202
14390
  name: "ProtocolPausedEvent",
@@ -16678,4 +16866,4 @@ declare function parseMetadata<T extends {
16678
16866
 
16679
16867
  declare const version = "0.1.0";
16680
16868
 
16681
- export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, TradeModule, UmaModule, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
16869
+ export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, type ChancePercentInput, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
package/dist/index.d.ts CHANGED
@@ -8158,6 +8158,15 @@ declare class VenueModule extends BaseModule {
8158
8158
  * Check if a user can create markets on a venue.
8159
8159
  */
8160
8160
  canCreateMarket(user: `0x${string}`, venueId: bigint): Promise<boolean>;
8161
+ /**
8162
+ * Get the current protocol fee in basis points. Snapshotted per market at creation.
8163
+ */
8164
+ getProtocolFeeBps(): Promise<bigint>;
8165
+ /**
8166
+ * Set the protocol fee in basis points. Owner-only. Max 200 bps (2%).
8167
+ * Only affects markets created after this call (existing markets retain their snapshot).
8168
+ */
8169
+ setProtocolFeeBps(bps: bigint): Promise<`0x${string}`>;
8161
8170
  }
8162
8171
 
8163
8172
  /**
@@ -8293,6 +8302,42 @@ interface SubgraphMarketPriceData {
8293
8302
  * @returns Price as percentage (0-100)
8294
8303
  */
8295
8304
  declare function getOutcomePrice(market: SubgraphMarketPriceData, outcomeIndex: number): number;
8305
+ /**
8306
+ * Top-of-book entry from subgraph TopOfBook entity.
8307
+ */
8308
+ interface TopOfBookEntry {
8309
+ outcome: string;
8310
+ side: string;
8311
+ topTick: string;
8312
+ }
8313
+ /**
8314
+ * Input for calculateChancePercent — accepts subgraph market data.
8315
+ */
8316
+ interface ChancePercentInput {
8317
+ tickSize: string;
8318
+ status?: string;
8319
+ resolvedOutcome?: number | string | null;
8320
+ lastPriceTick_0?: string | null;
8321
+ lastPriceTick_1?: string | null;
8322
+ lastTradeTimestamp_0?: string | null;
8323
+ lastTradeTimestamp_1?: string | null;
8324
+ topOfBook?: TopOfBookEntry[];
8325
+ }
8326
+ /**
8327
+ * Calculate the "chance %" for a binary market using a Polymarket-style waterfall:
8328
+ *
8329
+ * 1. **Implied mark price** (midpoint of implied Yes bid/ask) — if spread ≤ $0.10
8330
+ * 2. **Last trade** (most recent trade from either side) — if book empty or spread > $0.10
8331
+ * 3. **50%** — no data
8332
+ *
8333
+ * Implied prices account for cross-outcome liquidity via mint/merge paths:
8334
+ * - No BUY at tick N → implied Yes ASK at (maxTicks - N) via Mint path
8335
+ * - No SELL at tick N → implied Yes BID at (maxTicks - N) via Merge path
8336
+ *
8337
+ * @param market - Subgraph market data with top-of-book and last trade info
8338
+ * @returns Chance percentage (0-100)
8339
+ */
8340
+ declare function calculateChancePercent(market: ChancePercentInput): number;
8296
8341
 
8297
8342
  declare class MarketModule extends BaseModule {
8298
8343
  /**
@@ -9007,10 +9052,12 @@ declare class PublicModule extends BaseModule {
9007
9052
  */
9008
9053
  mergeAndSortFeed(feedData: any, sortBy?: 'created' | 'volume', limit?: number): Array<any>;
9009
9054
  /**
9010
- * Calculate probability for a market using last trade price
9055
+ * Calculate probability for a market using mark price waterfall.
9011
9056
  * Returns probability as a decimal string (e.g., "0.65" for 65%)
9012
9057
  *
9013
- * @param market - Market object from subgraph
9058
+ * Uses Polymarket-style pricing: implied midpoint → last trade → default 50%.
9059
+ *
9060
+ * @param market - Market object from subgraph (with topOfBook and timestamp fields)
9014
9061
  * @returns Probability string or null if no data available
9015
9062
  */
9016
9063
  calculateMarketProbability(market: any): string | null;
@@ -9163,6 +9210,16 @@ declare class UmaModule extends BaseModule {
9163
9210
  outcome: string;
9164
9211
  autoApprove?: boolean;
9165
9212
  }): Promise<`0x${string}`>;
9213
+ /**
9214
+ * Get the effective bond for a market, accounting for UMA's minimum bond.
9215
+ * The contract uses max(requiredBond, oo.getMinimumBond(currency)).
9216
+ */
9217
+ getEffectiveBond(marketId: bigint): Promise<{
9218
+ requiredBond: bigint;
9219
+ minimumBond: bigint;
9220
+ effectiveBond: bigint;
9221
+ currency: Address;
9222
+ }>;
9166
9223
  /**
9167
9224
  * Settle an assertion after the liveness period
9168
9225
  */
@@ -9776,14 +9833,27 @@ declare const DEFAULT_CHAIN: {
9776
9833
  */
9777
9834
  /**
9778
9835
  * Fee Constants
9779
- * Fixed protocol-level fee tiers (not configurable per-market)
9836
+ * Protocol fee is configurable on-chain (0-200 bps) and snapshotted per market at creation.
9837
+ * These are the default values set at deployment.
9780
9838
  */
9781
9839
  declare const PROTOCOL_FEES: {
9782
- /** Protocol fee: 20 bps (0.20%) */
9783
- readonly PROTOCOL_FEE_BPS: 20n;
9840
+ /** Protocol fee: 50 bps (0.50%) — configurable via ProtocolFacet.setProtocolFeeBps() */
9841
+ readonly PROTOCOL_FEE_BPS: 50n;
9784
9842
  /** Operator fee: 10 bps (0.10%) for match operators */
9785
9843
  readonly OPERATOR_FEE_BPS: 10n;
9786
9844
  };
9845
+ /**
9846
+ * Recommended UMA Oracle defaults for USDC venues (6 decimals).
9847
+ * Based on Polymarket's production configuration.
9848
+ */
9849
+ declare const UMA_DEFAULTS: {
9850
+ /** Recommended reward: 5 USDC. Incentivizes third-party resolution. */
9851
+ readonly REWARD_USDC: 5000000n;
9852
+ /** Recommended minimum bond: 750 USDC. Matches Polymarket's production bond. */
9853
+ readonly MIN_BOND_USDC: 750000000n;
9854
+ /** Default liveness period: 2 hours (7200 seconds). */
9855
+ readonly LIVENESS: 7200n;
9856
+ };
9787
9857
 
9788
9858
  var VenueFacet = [
9789
9859
  {
@@ -10346,6 +10416,12 @@ var VenueFacet = [
10346
10416
  inputs: [
10347
10417
  ]
10348
10418
  },
10419
+ {
10420
+ type: "error",
10421
+ name: "InvalidUmaMinBond",
10422
+ inputs: [
10423
+ ]
10424
+ },
10349
10425
  {
10350
10426
  type: "error",
10351
10427
  name: "InvalidVenueFee",
@@ -10668,6 +10744,11 @@ var MarketsFacet = [
10668
10744
  name: "creatorFeeBps",
10669
10745
  type: "uint256",
10670
10746
  internalType: "uint256"
10747
+ },
10748
+ {
10749
+ name: "protocolFeeBps",
10750
+ type: "uint256",
10751
+ internalType: "uint256"
10671
10752
  }
10672
10753
  ]
10673
10754
  }
@@ -11803,6 +11884,25 @@ var MatchingFacet = [
11803
11884
  ],
11804
11885
  anonymous: false
11805
11886
  },
11887
+ {
11888
+ type: "event",
11889
+ name: "OrderAutoCancelled",
11890
+ inputs: [
11891
+ {
11892
+ name: "orderId",
11893
+ type: "uint256",
11894
+ indexed: true,
11895
+ internalType: "uint256"
11896
+ },
11897
+ {
11898
+ name: "refundedCollateral",
11899
+ type: "uint256",
11900
+ indexed: false,
11901
+ internalType: "uint256"
11902
+ }
11903
+ ],
11904
+ anonymous: false
11905
+ },
11806
11906
  {
11807
11907
  type: "event",
11808
11908
  name: "OrderDeleted",
@@ -12564,6 +12664,11 @@ var MarketGroupFacet = [
12564
12664
  name: "liveness",
12565
12665
  type: "uint64",
12566
12666
  internalType: "uint64"
12667
+ },
12668
+ {
12669
+ name: "reward",
12670
+ type: "uint256",
12671
+ internalType: "uint256"
12567
12672
  }
12568
12673
  ]
12569
12674
  }
@@ -12710,6 +12815,12 @@ var MarketGroupFacet = [
12710
12815
  type: "bytes32[]",
12711
12816
  indexed: false,
12712
12817
  internalType: "bytes32[]"
12818
+ },
12819
+ {
12820
+ name: "reward",
12821
+ type: "uint256",
12822
+ indexed: false,
12823
+ internalType: "uint256"
12713
12824
  }
12714
12825
  ],
12715
12826
  anonymous: false
@@ -13330,6 +13441,11 @@ var ResolutionFacet = [
13330
13441
  name: "settled",
13331
13442
  type: "bool",
13332
13443
  internalType: "bool"
13444
+ },
13445
+ {
13446
+ name: "asserter",
13447
+ type: "address",
13448
+ internalType: "address"
13333
13449
  }
13334
13450
  ]
13335
13451
  }
@@ -13520,6 +13636,31 @@ var ResolutionFacet = [
13520
13636
  ],
13521
13637
  anonymous: false
13522
13638
  },
13639
+ {
13640
+ type: "event",
13641
+ name: "RewardPaid",
13642
+ inputs: [
13643
+ {
13644
+ name: "assertionId",
13645
+ type: "bytes32",
13646
+ indexed: true,
13647
+ internalType: "bytes32"
13648
+ },
13649
+ {
13650
+ name: "asserter",
13651
+ type: "address",
13652
+ indexed: true,
13653
+ internalType: "address"
13654
+ },
13655
+ {
13656
+ name: "reward",
13657
+ type: "uint256",
13658
+ indexed: false,
13659
+ internalType: "uint256"
13660
+ }
13661
+ ],
13662
+ anonymous: false
13663
+ },
13523
13664
  {
13524
13665
  type: "error",
13525
13666
  name: "ApproveFailed",
@@ -13580,6 +13721,12 @@ var ResolutionFacet = [
13580
13721
  inputs: [
13581
13722
  ]
13582
13723
  },
13724
+ {
13725
+ type: "error",
13726
+ name: "TransferFailed",
13727
+ inputs: [
13728
+ ]
13729
+ },
13583
13730
  {
13584
13731
  type: "error",
13585
13732
  name: "TransferFromFailed",
@@ -13895,6 +14042,20 @@ var NegRiskFacet = [
13895
14042
  ];
13896
14043
 
13897
14044
  var ProtocolFacet = [
14045
+ {
14046
+ type: "function",
14047
+ name: "getProtocolFeeBps",
14048
+ inputs: [
14049
+ ],
14050
+ outputs: [
14051
+ {
14052
+ name: "",
14053
+ type: "uint256",
14054
+ internalType: "uint256"
14055
+ }
14056
+ ],
14057
+ stateMutability: "view"
14058
+ },
13898
14059
  {
13899
14060
  type: "function",
13900
14061
  name: "getProtocolPaused",
@@ -14017,6 +14178,20 @@ var ProtocolFacet = [
14017
14178
  ],
14018
14179
  stateMutability: "nonpayable"
14019
14180
  },
14181
+ {
14182
+ type: "function",
14183
+ name: "setProtocolFeeBps",
14184
+ inputs: [
14185
+ {
14186
+ name: "bps",
14187
+ type: "uint256",
14188
+ internalType: "uint256"
14189
+ }
14190
+ ],
14191
+ outputs: [
14192
+ ],
14193
+ stateMutability: "nonpayable"
14194
+ },
14020
14195
  {
14021
14196
  type: "function",
14022
14197
  name: "setProtocolTreasury",
@@ -14197,6 +14372,19 @@ var ProtocolFacet = [
14197
14372
  ],
14198
14373
  anonymous: false
14199
14374
  },
14375
+ {
14376
+ type: "event",
14377
+ name: "ProtocolFeeBpsUpdated",
14378
+ inputs: [
14379
+ {
14380
+ name: "bps",
14381
+ type: "uint256",
14382
+ indexed: false,
14383
+ internalType: "uint256"
14384
+ }
14385
+ ],
14386
+ anonymous: false
14387
+ },
14200
14388
  {
14201
14389
  type: "event",
14202
14390
  name: "ProtocolPausedEvent",
@@ -16678,4 +16866,4 @@ declare function parseMetadata<T extends {
16678
16866
 
16679
16867
  declare const version = "0.1.0";
16680
16868
 
16681
- export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, TradeModule, UmaModule, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
16869
+ export { AccessControlFacet as AccessControlFacetABI, AccessControlModule, BatchOrdersFacet as BatchOrdersFacetABI, CONTRACT_ADDRESSES, type ChancePercentInput, ConditionalTokens as ConditionalTokensABI, DEFAULT_CHAIN, ERC20 as ERC20ABI, FeedProvider, GET_ALL_MARKETS_FEED, GET_ALL_MARKETS_FEED_BY_VOLUME, GET_CHART_TRADES, GET_CHART_TRADES_ALL, GET_GROUP_MARKETS, GET_LEADERBOARD, GET_MARKET, GET_MARKETS, GET_MARKETS_WITH_PRICING, GET_MARKET_GROUP, GET_MARKET_GROUPS, GET_MARKET_GROUP_ITEM, GET_MARKET_TOP_HOLDERS, GET_ORDERS, GET_PROTOCOL_STATS, GET_QUESTION, GET_QUESTIONS, GET_RECENT_MARKETS, GET_RECENT_TRADES, GET_TOP_OF_BOOK, GET_TRADER_CLOSED_POSITIONS, GET_TRADER_FILLS, GET_TRADER_POSITIONS, GET_TRADER_PROFILE, GET_TRADES, GET_UNIFIED_MARKET_FEED, GET_UNIFIED_MARKET_FEED_BY_VOLUME, GET_USER, GET_VENUES, LimitOrdersFacet as LimitOrdersFacetABI, MarketGroupFacet as MarketGroupFacetABI, type MarketMetadata, MarketModule, MarketOrdersFacet as MarketOrdersFacetABI, type MarketQuestion, MarketsFacet as MarketsFacetABI, MatchingFacet as MatchingFacetABI, MetadataFacet as MetadataFacetABI, NegRiskFacet as NegRiskFacetABI, OddMakiClient, type OddMakiClientConfig, type OddMakiConfig, OrderBookFacet as OrderBookFacetABI, PROTOCOL_FEES, type PriceMarketData, PriceMarketFacet as PriceMarketFacetABI, PriceMarketModule, ProtocolFacet as ProtocolFacetABI, PublicModule, PythResolutionFacet as PythResolutionFacetABI, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };