@oddmaki-protocol/sdk 1.3.0 → 1.4.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/dist/index.d.mts CHANGED
@@ -8088,21 +8088,24 @@ declare abstract class BaseModule {
8088
8088
 
8089
8089
  declare class VenueModule extends BaseModule {
8090
8090
  /**
8091
- * Create a new venue
8091
+ * Create a new venue.
8092
8092
  *
8093
- * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals!
8094
- * Most venues use USDC (6 decimals), so amounts should use parseUnits("amount", 6).
8093
+ * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals.
8094
+ * Most venues use USDC (6 decimals), so amounts should use `parseUnits("amount", 6)`.
8095
8095
  *
8096
- * Example for USDC-based venue:
8097
- * - marketCreationFee: parseUnits("10", 6) // 10 USDC
8098
- * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
8099
- * - umaMinBond: parseUnits("1", 6) // 1 USDC
8100
- * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
8096
+ * Example for a USDC-based venue:
8097
+ * - marketCreationFee: 0n // free creation, or parseUnits("10", 6) for 10 USDC
8098
+ * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
8099
+ * - umaMinBond: parseUnits("1", 6) // 1 USDC
8100
+ * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
8101
8101
  *
8102
- * @param params.marketCreationFee - Upfront fee (min 5e6 for USDC, split 50/50 protocol/venue)
8103
- * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units)
8104
- * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units)
8105
- * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g., 0.01e18)
8102
+ * @param params.marketCreationFee - Upfront fee in collateral units charged on `createMarket`.
8103
+ * Can be zero. When non-zero, split 50/50 between protocol and venue.
8104
+ * When zero, gate market creation via `creationAccessControl` to deter spam.
8105
+ * Mutable post-creation via `updateMarketCreationFee`.
8106
+ * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units).
8107
+ * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units).
8108
+ * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g. 0.01e18).
8106
8109
  */
8107
8110
  createVenue(params: {
8108
8111
  name: string;
@@ -8144,6 +8147,19 @@ declare class VenueModule extends BaseModule {
8144
8147
  creationAccessControl: `0x${string}`;
8145
8148
  feeRecipient: `0x${string}`;
8146
8149
  }): Promise<`0x${string}`>;
8150
+ /**
8151
+ * Update the upfront market creation fee for a venue. Operator-only.
8152
+ *
8153
+ * Affects only markets created after this call — existing markets keep their snapshot.
8154
+ * Pass `0n` for free creation; if you do, gate `createMarket` via `creationAccessControl`
8155
+ * to deter spam.
8156
+ *
8157
+ * @param params.newFee - New fee in collateral token units (e.g. `parseUnits("10", 6)` for 10 USDC).
8158
+ */
8159
+ updateMarketCreationFee(params: {
8160
+ venueId: bigint;
8161
+ newFee: bigint;
8162
+ }): Promise<`0x${string}`>;
8147
8163
  /**
8148
8164
  * Update venue oracle parameters (UMA reward and min bond)
8149
8165
  */
@@ -9603,11 +9619,6 @@ declare const CONTRACT_ADDRESSES: {
9603
9619
  readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest";
9604
9620
  };
9605
9621
  };
9606
- declare const SUBGRAPH_IDS: {
9607
- readonly 8453: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ";
9608
- readonly 84532: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b";
9609
- };
9610
- declare function buildSubgraphGatewayUrl(chainId: number, apiKey: string): string | undefined;
9611
9622
  declare const DEFAULT_CHAIN: {
9612
9623
  blockExplorers: {
9613
9624
  readonly default: {
@@ -10283,6 +10294,25 @@ var VenueFacet = [
10283
10294
  ],
10284
10295
  stateMutability: "nonpayable"
10285
10296
  },
10297
+ {
10298
+ type: "function",
10299
+ name: "updateVenueMarketCreationFee",
10300
+ inputs: [
10301
+ {
10302
+ name: "venueId",
10303
+ type: "uint256",
10304
+ internalType: "uint256"
10305
+ },
10306
+ {
10307
+ name: "newFee",
10308
+ type: "uint256",
10309
+ internalType: "uint256"
10310
+ }
10311
+ ],
10312
+ outputs: [
10313
+ ],
10314
+ stateMutability: "nonpayable"
10315
+ },
10286
10316
  {
10287
10317
  type: "function",
10288
10318
  name: "updateVenueOracleParams",
@@ -10388,6 +10418,25 @@ var VenueFacet = [
10388
10418
  ],
10389
10419
  anonymous: false
10390
10420
  },
10421
+ {
10422
+ type: "event",
10423
+ name: "VenueMarketCreationFeeUpdated",
10424
+ inputs: [
10425
+ {
10426
+ name: "venueId",
10427
+ type: "uint256",
10428
+ indexed: true,
10429
+ internalType: "uint256"
10430
+ },
10431
+ {
10432
+ name: "newFee",
10433
+ type: "uint256",
10434
+ indexed: false,
10435
+ internalType: "uint256"
10436
+ }
10437
+ ],
10438
+ anonymous: false
10439
+ },
10391
10440
  {
10392
10441
  type: "event",
10393
10442
  name: "VenueOracleParamsUpdated",
@@ -10494,12 +10543,6 @@ var VenueFacet = [
10494
10543
  inputs: [
10495
10544
  ]
10496
10545
  },
10497
- {
10498
- type: "error",
10499
- name: "InvalidMarketCreationFee",
10500
- inputs: [
10501
- ]
10502
- },
10503
10546
  {
10504
10547
  type: "error",
10505
10548
  name: "InvalidTickSize",
@@ -17343,4 +17386,4 @@ declare function parseMetadata<T extends {
17343
17386
 
17344
17387
  declare const version = "0.1.0";
17345
17388
 
17346
- 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, type MarketStatus, 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, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SUBGRAPH_IDS, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle as UmaOracleABI, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, buildSubgraphGatewayUrl, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
17389
+ 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, type MarketStatus, 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, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle as UmaOracleABI, 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
@@ -8088,21 +8088,24 @@ declare abstract class BaseModule {
8088
8088
 
8089
8089
  declare class VenueModule extends BaseModule {
8090
8090
  /**
8091
- * Create a new venue
8091
+ * Create a new venue.
8092
8092
  *
8093
- * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals!
8094
- * Most venues use USDC (6 decimals), so amounts should use parseUnits("amount", 6).
8093
+ * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals.
8094
+ * Most venues use USDC (6 decimals), so amounts should use `parseUnits("amount", 6)`.
8095
8095
  *
8096
- * Example for USDC-based venue:
8097
- * - marketCreationFee: parseUnits("10", 6) // 10 USDC
8098
- * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
8099
- * - umaMinBond: parseUnits("1", 6) // 1 USDC
8100
- * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
8096
+ * Example for a USDC-based venue:
8097
+ * - marketCreationFee: 0n // free creation, or parseUnits("10", 6) for 10 USDC
8098
+ * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
8099
+ * - umaMinBond: parseUnits("1", 6) // 1 USDC
8100
+ * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
8101
8101
  *
8102
- * @param params.marketCreationFee - Upfront fee (min 5e6 for USDC, split 50/50 protocol/venue)
8103
- * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units)
8104
- * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units)
8105
- * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g., 0.01e18)
8102
+ * @param params.marketCreationFee - Upfront fee in collateral units charged on `createMarket`.
8103
+ * Can be zero. When non-zero, split 50/50 between protocol and venue.
8104
+ * When zero, gate market creation via `creationAccessControl` to deter spam.
8105
+ * Mutable post-creation via `updateMarketCreationFee`.
8106
+ * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units).
8107
+ * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units).
8108
+ * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g. 0.01e18).
8106
8109
  */
8107
8110
  createVenue(params: {
8108
8111
  name: string;
@@ -8144,6 +8147,19 @@ declare class VenueModule extends BaseModule {
8144
8147
  creationAccessControl: `0x${string}`;
8145
8148
  feeRecipient: `0x${string}`;
8146
8149
  }): Promise<`0x${string}`>;
8150
+ /**
8151
+ * Update the upfront market creation fee for a venue. Operator-only.
8152
+ *
8153
+ * Affects only markets created after this call — existing markets keep their snapshot.
8154
+ * Pass `0n` for free creation; if you do, gate `createMarket` via `creationAccessControl`
8155
+ * to deter spam.
8156
+ *
8157
+ * @param params.newFee - New fee in collateral token units (e.g. `parseUnits("10", 6)` for 10 USDC).
8158
+ */
8159
+ updateMarketCreationFee(params: {
8160
+ venueId: bigint;
8161
+ newFee: bigint;
8162
+ }): Promise<`0x${string}`>;
8147
8163
  /**
8148
8164
  * Update venue oracle parameters (UMA reward and min bond)
8149
8165
  */
@@ -9603,11 +9619,6 @@ declare const CONTRACT_ADDRESSES: {
9603
9619
  readonly subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest";
9604
9620
  };
9605
9621
  };
9606
- declare const SUBGRAPH_IDS: {
9607
- readonly 8453: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ";
9608
- readonly 84532: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b";
9609
- };
9610
- declare function buildSubgraphGatewayUrl(chainId: number, apiKey: string): string | undefined;
9611
9622
  declare const DEFAULT_CHAIN: {
9612
9623
  blockExplorers: {
9613
9624
  readonly default: {
@@ -10283,6 +10294,25 @@ var VenueFacet = [
10283
10294
  ],
10284
10295
  stateMutability: "nonpayable"
10285
10296
  },
10297
+ {
10298
+ type: "function",
10299
+ name: "updateVenueMarketCreationFee",
10300
+ inputs: [
10301
+ {
10302
+ name: "venueId",
10303
+ type: "uint256",
10304
+ internalType: "uint256"
10305
+ },
10306
+ {
10307
+ name: "newFee",
10308
+ type: "uint256",
10309
+ internalType: "uint256"
10310
+ }
10311
+ ],
10312
+ outputs: [
10313
+ ],
10314
+ stateMutability: "nonpayable"
10315
+ },
10286
10316
  {
10287
10317
  type: "function",
10288
10318
  name: "updateVenueOracleParams",
@@ -10388,6 +10418,25 @@ var VenueFacet = [
10388
10418
  ],
10389
10419
  anonymous: false
10390
10420
  },
10421
+ {
10422
+ type: "event",
10423
+ name: "VenueMarketCreationFeeUpdated",
10424
+ inputs: [
10425
+ {
10426
+ name: "venueId",
10427
+ type: "uint256",
10428
+ indexed: true,
10429
+ internalType: "uint256"
10430
+ },
10431
+ {
10432
+ name: "newFee",
10433
+ type: "uint256",
10434
+ indexed: false,
10435
+ internalType: "uint256"
10436
+ }
10437
+ ],
10438
+ anonymous: false
10439
+ },
10391
10440
  {
10392
10441
  type: "event",
10393
10442
  name: "VenueOracleParamsUpdated",
@@ -10494,12 +10543,6 @@ var VenueFacet = [
10494
10543
  inputs: [
10495
10544
  ]
10496
10545
  },
10497
- {
10498
- type: "error",
10499
- name: "InvalidMarketCreationFee",
10500
- inputs: [
10501
- ]
10502
- },
10503
10546
  {
10504
10547
  type: "error",
10505
10548
  name: "InvalidTickSize",
@@ -17343,4 +17386,4 @@ declare function parseMetadata<T extends {
17343
17386
 
17344
17387
  declare const version = "0.1.0";
17345
17388
 
17346
- 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, type MarketStatus, 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, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SUBGRAPH_IDS, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle as UmaOracleABI, VALID_TICK_SIZES, VaultFacet as VaultFacetABI, VenueFacet as VenueFacetABI, type VenueMetadata, VenueModule, WhitelistAccessControl as WhitelistAccessControlABI, buildSubgraphGatewayUrl, calculateChancePercent, clearDecimalsCache, createExpiry, createOddMakiClient, formatAmount, formatAncillaryData, formatTimestamp, getCachedTokenDecimals, getOutcomePrice, getTokenDecimals, isValidTickSize, parseAmount, parseAncillaryData, parseMetadata, parseTokenAmount, priceToTick, resolveIPFSUri, tickToPercentage, tickToPrice, version };
17389
+ 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, type MarketStatus, 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, type PythUpdate, ResolutionFacet as ResolutionFacetABI, SubgraphClient, type SubgraphMarketPriceData, TICK_SIZE_FINE, TICK_SIZE_STANDARD, TagsFacet as TagsFacetABI, TokenModule, type TopOfBookEntry, TradeModule, UMA_DEFAULTS, UmaModule, UmaOracle as UmaOracleABI, 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.js CHANGED
@@ -19,14 +19,6 @@ var CONTRACT_ADDRESSES = {
19
19
  subgraph: "https://api.studio.thegraph.com/query/1716020/oddmaki-base/version/latest"
20
20
  }
21
21
  };
22
- var SUBGRAPH_IDS = {
23
- [chains.base.id]: "CxoYVjELrNCMLopAmVshnfVAie7yH6QZyCSKD3r41XSQ",
24
- [chains.baseSepolia.id]: "DCnd3ozSyvYxRg7kmZYiDWGBiJCe6QHwu8M93jMN1Q3b"
25
- };
26
- function buildSubgraphGatewayUrl(chainId, apiKey) {
27
- const id = SUBGRAPH_IDS[chainId];
28
- return id ? `https://gateway.thegraph.com/api/${apiKey}/subgraphs/id/${id}` : void 0;
29
- }
30
22
  var DEFAULT_CHAIN = chains.base;
31
23
  var SubgraphClient = class {
32
24
  constructor(endpoint) {
@@ -403,6 +395,24 @@ var VenueFacet_default = [
403
395
  outputs: [],
404
396
  stateMutability: "nonpayable"
405
397
  },
398
+ {
399
+ type: "function",
400
+ name: "updateVenueMarketCreationFee",
401
+ inputs: [
402
+ {
403
+ name: "venueId",
404
+ type: "uint256",
405
+ internalType: "uint256"
406
+ },
407
+ {
408
+ name: "newFee",
409
+ type: "uint256",
410
+ internalType: "uint256"
411
+ }
412
+ ],
413
+ outputs: [],
414
+ stateMutability: "nonpayable"
415
+ },
406
416
  {
407
417
  type: "function",
408
418
  name: "updateVenueOracleParams",
@@ -507,6 +517,25 @@ var VenueFacet_default = [
507
517
  ],
508
518
  anonymous: false
509
519
  },
520
+ {
521
+ type: "event",
522
+ name: "VenueMarketCreationFeeUpdated",
523
+ inputs: [
524
+ {
525
+ name: "venueId",
526
+ type: "uint256",
527
+ indexed: true,
528
+ internalType: "uint256"
529
+ },
530
+ {
531
+ name: "newFee",
532
+ type: "uint256",
533
+ indexed: false,
534
+ internalType: "uint256"
535
+ }
536
+ ],
537
+ anonymous: false
538
+ },
510
539
  {
511
540
  type: "event",
512
541
  name: "VenueOracleParamsUpdated",
@@ -611,11 +640,6 @@ var VenueFacet_default = [
611
640
  name: "InvalidFeeRecipient",
612
641
  inputs: []
613
642
  },
614
- {
615
- type: "error",
616
- name: "InvalidMarketCreationFee",
617
- inputs: []
618
- },
619
643
  {
620
644
  type: "error",
621
645
  name: "InvalidTickSize",
@@ -7095,21 +7119,24 @@ var UmaOracle_default = [
7095
7119
  // src/modules/venue.ts
7096
7120
  var VenueModule = class extends BaseModule {
7097
7121
  /**
7098
- * Create a new venue
7122
+ * Create a new venue.
7099
7123
  *
7100
- * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals!
7101
- * Most venues use USDC (6 decimals), so amounts should use parseUnits("amount", 6).
7124
+ * IMPORTANT: Fee and bond amounts must match your intended collateral token decimals.
7125
+ * Most venues use USDC (6 decimals), so amounts should use `parseUnits("amount", 6)`.
7102
7126
  *
7103
- * Example for USDC-based venue:
7104
- * - marketCreationFee: parseUnits("10", 6) // 10 USDC
7105
- * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
7106
- * - umaMinBond: parseUnits("1", 6) // 1 USDC
7107
- * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
7127
+ * Example for a USDC-based venue:
7128
+ * - marketCreationFee: 0n // free creation, or parseUnits("10", 6) for 10 USDC
7129
+ * - umaRewardAmount: parseUnits("5", 6) // 5 USDC
7130
+ * - umaMinBond: parseUnits("1", 6) // 1 USDC
7131
+ * - defaultTickSize: parseEther("0.01") // 0.01 per tick (always 18 decimals)
7108
7132
  *
7109
- * @param params.marketCreationFee - Upfront fee (min 5e6 for USDC, split 50/50 protocol/venue)
7110
- * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units)
7111
- * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units)
7112
- * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g., 0.01e18)
7133
+ * @param params.marketCreationFee - Upfront fee in collateral units charged on `createMarket`.
7134
+ * Can be zero. When non-zero, split 50/50 between protocol and venue.
7135
+ * When zero, gate market creation via `creationAccessControl` to deter spam.
7136
+ * Mutable post-creation via `updateMarketCreationFee`.
7137
+ * @param params.umaRewardAmount - Default reward for UMA asserters (in collateral token units).
7138
+ * @param params.umaMinBond - Minimum bond for UMA assertions (in collateral token units).
7139
+ * @param params.defaultTickSize - Price increment per tick (always 1e18 scale, e.g. 0.01e18).
7113
7140
  */
7114
7141
  async createVenue(params) {
7115
7142
  const wallet = this.walletClient;
@@ -7199,6 +7226,27 @@ var VenueModule = class extends BaseModule {
7199
7226
  });
7200
7227
  return wallet.writeContract(request);
7201
7228
  }
7229
+ /**
7230
+ * Update the upfront market creation fee for a venue. Operator-only.
7231
+ *
7232
+ * Affects only markets created after this call — existing markets keep their snapshot.
7233
+ * Pass `0n` for free creation; if you do, gate `createMarket` via `creationAccessControl`
7234
+ * to deter spam.
7235
+ *
7236
+ * @param params.newFee - New fee in collateral token units (e.g. `parseUnits("10", 6)` for 10 USDC).
7237
+ */
7238
+ async updateMarketCreationFee(params) {
7239
+ const wallet = this.walletClient;
7240
+ const account = await this.getSignerAccount();
7241
+ const { request } = await this.publicClient.simulateContract({
7242
+ address: this.config.diamondAddress,
7243
+ abi: VenueFacet_default,
7244
+ functionName: "updateVenueMarketCreationFee",
7245
+ args: [params.venueId, params.newFee],
7246
+ account
7247
+ });
7248
+ return wallet.writeContract(request);
7249
+ }
7202
7250
  /**
7203
7251
  * Update venue oracle parameters (UMA reward and min bond)
7204
7252
  */
@@ -11410,7 +11458,6 @@ exports.ProtocolFacetABI = ProtocolFacet_default;
11410
11458
  exports.PublicModule = PublicModule;
11411
11459
  exports.PythResolutionFacetABI = PythResolutionFacet_default;
11412
11460
  exports.ResolutionFacetABI = ResolutionFacet_default;
11413
- exports.SUBGRAPH_IDS = SUBGRAPH_IDS;
11414
11461
  exports.SubgraphClient = SubgraphClient;
11415
11462
  exports.TICK_SIZE_FINE = TICK_SIZE_FINE;
11416
11463
  exports.TICK_SIZE_STANDARD = TICK_SIZE_STANDARD;
@@ -11425,7 +11472,6 @@ exports.VaultFacetABI = VaultFacet_default;
11425
11472
  exports.VenueFacetABI = VenueFacet_default;
11426
11473
  exports.VenueModule = VenueModule;
11427
11474
  exports.WhitelistAccessControlABI = WhitelistAccessControl_default;
11428
- exports.buildSubgraphGatewayUrl = buildSubgraphGatewayUrl;
11429
11475
  exports.calculateChancePercent = calculateChancePercent;
11430
11476
  exports.clearDecimalsCache = clearDecimalsCache;
11431
11477
  exports.createExpiry = createExpiry;