@oddmaki-protocol/sdk 0.1.3 → 0.3.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 +373 -46
- package/dist/index.d.ts +373 -46
- package/dist/index.js +599 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +598 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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
|
/**
|
|
@@ -8618,10 +8663,53 @@ declare class TradeModule extends BaseModule {
|
|
|
8618
8663
|
qty: bigint;
|
|
8619
8664
|
expiry: bigint;
|
|
8620
8665
|
}): Promise<never>;
|
|
8666
|
+
/**
|
|
8667
|
+
* Execute a market sell order (FOK or FAK)
|
|
8668
|
+
*
|
|
8669
|
+
* @param params.marketId - The market to sell on
|
|
8670
|
+
* @param params.outcomeId - Which outcome to sell (0=YES, 1=NO)
|
|
8671
|
+
* @param params.tokenAmount - Amount of outcome tokens to sell
|
|
8672
|
+
* @param params.minPriceTick - Minimum price tick willing to accept (slippage protection)
|
|
8673
|
+
* @param params.orderType - 0=FOK (Fill-Or-Kill), 1=FAK (Fill-And-Kill)
|
|
8674
|
+
*/
|
|
8675
|
+
placeMarketSell(params: {
|
|
8676
|
+
marketId: bigint;
|
|
8677
|
+
outcomeId: bigint;
|
|
8678
|
+
tokenAmount: bigint;
|
|
8679
|
+
minPriceTick: bigint;
|
|
8680
|
+
orderType: number;
|
|
8681
|
+
}): Promise<`0x${string}`>;
|
|
8682
|
+
/**
|
|
8683
|
+
* Execute a market sell order with simple string inputs (recommended for frontends)
|
|
8684
|
+
* @param params.amount - Token amount as decimal string (e.g., "100.5")
|
|
8685
|
+
* @param params.minPrice - Minimum price as decimal string (e.g., "0.70")
|
|
8686
|
+
* @param params.orderType - 'FOK' or 'FAK' (default: 'FAK')
|
|
8687
|
+
*/
|
|
8688
|
+
placeMarketSellSimple(params: {
|
|
8689
|
+
marketId: bigint;
|
|
8690
|
+
outcomeId: bigint;
|
|
8691
|
+
amount: string;
|
|
8692
|
+
minPrice: string;
|
|
8693
|
+
orderType?: 'FOK' | 'FAK';
|
|
8694
|
+
}): Promise<`0x${string}`>;
|
|
8695
|
+
/**
|
|
8696
|
+
* Preview a market sell order (simulate transaction)
|
|
8697
|
+
*/
|
|
8698
|
+
previewMarketSell(params: {
|
|
8699
|
+
marketId: bigint;
|
|
8700
|
+
outcomeId: bigint;
|
|
8701
|
+
tokenAmount: bigint;
|
|
8702
|
+
minPriceTick: bigint;
|
|
8703
|
+
orderType: number;
|
|
8704
|
+
}): Promise<never>;
|
|
8621
8705
|
/**
|
|
8622
8706
|
* Watch for MarketOrderExecuted events
|
|
8623
8707
|
*/
|
|
8624
8708
|
watchMarketOrder(marketId: bigint, onLogs: (logs: any[]) => void): viem.WatchContractEventReturnType;
|
|
8709
|
+
/**
|
|
8710
|
+
* Watch for MarketSellExecuted events
|
|
8711
|
+
*/
|
|
8712
|
+
watchMarketSell(marketId: bigint, onLogs: (logs: any[]) => void): viem.WatchContractEventReturnType;
|
|
8625
8713
|
/**
|
|
8626
8714
|
* Check whether any orders are matchable in the given market.
|
|
8627
8715
|
* Returns a preview of which fill paths have crossing conditions,
|
|
@@ -8964,10 +9052,12 @@ declare class PublicModule extends BaseModule {
|
|
|
8964
9052
|
*/
|
|
8965
9053
|
mergeAndSortFeed(feedData: any, sortBy?: 'created' | 'volume', limit?: number): Array<any>;
|
|
8966
9054
|
/**
|
|
8967
|
-
* Calculate probability for a market using
|
|
9055
|
+
* Calculate probability for a market using mark price waterfall.
|
|
8968
9056
|
* Returns probability as a decimal string (e.g., "0.65" for 65%)
|
|
8969
9057
|
*
|
|
8970
|
-
*
|
|
9058
|
+
* Uses Polymarket-style pricing: implied midpoint → last trade → default 50%.
|
|
9059
|
+
*
|
|
9060
|
+
* @param market - Market object from subgraph (with topOfBook and timestamp fields)
|
|
8971
9061
|
* @returns Probability string or null if no data available
|
|
8972
9062
|
*/
|
|
8973
9063
|
calculateMarketProbability(market: any): string | null;
|
|
@@ -9120,6 +9210,16 @@ declare class UmaModule extends BaseModule {
|
|
|
9120
9210
|
outcome: string;
|
|
9121
9211
|
autoApprove?: boolean;
|
|
9122
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
|
+
}>;
|
|
9123
9223
|
/**
|
|
9124
9224
|
* Settle an assertion after the liveness period
|
|
9125
9225
|
*/
|
|
@@ -9733,14 +9833,27 @@ declare const DEFAULT_CHAIN: {
|
|
|
9733
9833
|
*/
|
|
9734
9834
|
/**
|
|
9735
9835
|
* Fee Constants
|
|
9736
|
-
*
|
|
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.
|
|
9737
9838
|
*/
|
|
9738
9839
|
declare const PROTOCOL_FEES: {
|
|
9739
|
-
/** Protocol fee:
|
|
9740
|
-
readonly PROTOCOL_FEE_BPS:
|
|
9840
|
+
/** Protocol fee: 50 bps (0.50%) — configurable via ProtocolFacet.setProtocolFeeBps() */
|
|
9841
|
+
readonly PROTOCOL_FEE_BPS: 50n;
|
|
9741
9842
|
/** Operator fee: 10 bps (0.10%) for match operators */
|
|
9742
9843
|
readonly OPERATOR_FEE_BPS: 10n;
|
|
9743
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
|
+
};
|
|
9744
9857
|
|
|
9745
9858
|
var VenueFacet = [
|
|
9746
9859
|
{
|
|
@@ -10303,6 +10416,12 @@ var VenueFacet = [
|
|
|
10303
10416
|
inputs: [
|
|
10304
10417
|
]
|
|
10305
10418
|
},
|
|
10419
|
+
{
|
|
10420
|
+
type: "error",
|
|
10421
|
+
name: "InvalidUmaMinBond",
|
|
10422
|
+
inputs: [
|
|
10423
|
+
]
|
|
10424
|
+
},
|
|
10306
10425
|
{
|
|
10307
10426
|
type: "error",
|
|
10308
10427
|
name: "InvalidVenueFee",
|
|
@@ -10625,6 +10744,11 @@ var MarketsFacet = [
|
|
|
10625
10744
|
name: "creatorFeeBps",
|
|
10626
10745
|
type: "uint256",
|
|
10627
10746
|
internalType: "uint256"
|
|
10747
|
+
},
|
|
10748
|
+
{
|
|
10749
|
+
name: "protocolFeeBps",
|
|
10750
|
+
type: "uint256",
|
|
10751
|
+
internalType: "uint256"
|
|
10628
10752
|
}
|
|
10629
10753
|
]
|
|
10630
10754
|
}
|
|
@@ -11760,6 +11884,25 @@ var MatchingFacet = [
|
|
|
11760
11884
|
],
|
|
11761
11885
|
anonymous: false
|
|
11762
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
|
+
},
|
|
11763
11906
|
{
|
|
11764
11907
|
type: "event",
|
|
11765
11908
|
name: "OrderDeleted",
|
|
@@ -12521,6 +12664,11 @@ var MarketGroupFacet = [
|
|
|
12521
12664
|
name: "liveness",
|
|
12522
12665
|
type: "uint64",
|
|
12523
12666
|
internalType: "uint64"
|
|
12667
|
+
},
|
|
12668
|
+
{
|
|
12669
|
+
name: "reward",
|
|
12670
|
+
type: "uint256",
|
|
12671
|
+
internalType: "uint256"
|
|
12524
12672
|
}
|
|
12525
12673
|
]
|
|
12526
12674
|
}
|
|
@@ -12667,6 +12815,12 @@ var MarketGroupFacet = [
|
|
|
12667
12815
|
type: "bytes32[]",
|
|
12668
12816
|
indexed: false,
|
|
12669
12817
|
internalType: "bytes32[]"
|
|
12818
|
+
},
|
|
12819
|
+
{
|
|
12820
|
+
name: "reward",
|
|
12821
|
+
type: "uint256",
|
|
12822
|
+
indexed: false,
|
|
12823
|
+
internalType: "uint256"
|
|
12670
12824
|
}
|
|
12671
12825
|
],
|
|
12672
12826
|
anonymous: false
|
|
@@ -13287,6 +13441,11 @@ var ResolutionFacet = [
|
|
|
13287
13441
|
name: "settled",
|
|
13288
13442
|
type: "bool",
|
|
13289
13443
|
internalType: "bool"
|
|
13444
|
+
},
|
|
13445
|
+
{
|
|
13446
|
+
name: "asserter",
|
|
13447
|
+
type: "address",
|
|
13448
|
+
internalType: "address"
|
|
13290
13449
|
}
|
|
13291
13450
|
]
|
|
13292
13451
|
}
|
|
@@ -13477,6 +13636,31 @@ var ResolutionFacet = [
|
|
|
13477
13636
|
],
|
|
13478
13637
|
anonymous: false
|
|
13479
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
|
+
},
|
|
13480
13664
|
{
|
|
13481
13665
|
type: "error",
|
|
13482
13666
|
name: "ApproveFailed",
|
|
@@ -13537,6 +13721,12 @@ var ResolutionFacet = [
|
|
|
13537
13721
|
inputs: [
|
|
13538
13722
|
]
|
|
13539
13723
|
},
|
|
13724
|
+
{
|
|
13725
|
+
type: "error",
|
|
13726
|
+
name: "TransferFailed",
|
|
13727
|
+
inputs: [
|
|
13728
|
+
]
|
|
13729
|
+
},
|
|
13540
13730
|
{
|
|
13541
13731
|
type: "error",
|
|
13542
13732
|
name: "TransferFromFailed",
|
|
@@ -13852,6 +14042,20 @@ var NegRiskFacet = [
|
|
|
13852
14042
|
];
|
|
13853
14043
|
|
|
13854
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
|
+
},
|
|
13855
14059
|
{
|
|
13856
14060
|
type: "function",
|
|
13857
14061
|
name: "getProtocolPaused",
|
|
@@ -13974,6 +14178,20 @@ var ProtocolFacet = [
|
|
|
13974
14178
|
],
|
|
13975
14179
|
stateMutability: "nonpayable"
|
|
13976
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
|
+
},
|
|
13977
14195
|
{
|
|
13978
14196
|
type: "function",
|
|
13979
14197
|
name: "setProtocolTreasury",
|
|
@@ -14154,6 +14372,19 @@ var ProtocolFacet = [
|
|
|
14154
14372
|
],
|
|
14155
14373
|
anonymous: false
|
|
14156
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
|
+
},
|
|
14157
14388
|
{
|
|
14158
14389
|
type: "event",
|
|
14159
14390
|
name: "ProtocolPausedEvent",
|
|
@@ -15918,6 +16149,30 @@ var WhitelistAccessControl = [
|
|
|
15918
16149
|
];
|
|
15919
16150
|
|
|
15920
16151
|
var ConditionalTokens = [
|
|
16152
|
+
{
|
|
16153
|
+
type: "function",
|
|
16154
|
+
name: "balanceOf",
|
|
16155
|
+
inputs: [
|
|
16156
|
+
{
|
|
16157
|
+
name: "account",
|
|
16158
|
+
type: "address",
|
|
16159
|
+
internalType: "address"
|
|
16160
|
+
},
|
|
16161
|
+
{
|
|
16162
|
+
name: "id",
|
|
16163
|
+
type: "uint256",
|
|
16164
|
+
internalType: "uint256"
|
|
16165
|
+
}
|
|
16166
|
+
],
|
|
16167
|
+
outputs: [
|
|
16168
|
+
{
|
|
16169
|
+
name: "",
|
|
16170
|
+
type: "uint256",
|
|
16171
|
+
internalType: "uint256"
|
|
16172
|
+
}
|
|
16173
|
+
],
|
|
16174
|
+
stateMutability: "view"
|
|
16175
|
+
},
|
|
15921
16176
|
{
|
|
15922
16177
|
type: "function",
|
|
15923
16178
|
name: "getCollectionId",
|
|
@@ -15940,7 +16195,7 @@ var ConditionalTokens = [
|
|
|
15940
16195
|
],
|
|
15941
16196
|
outputs: [
|
|
15942
16197
|
{
|
|
15943
|
-
name: "",
|
|
16198
|
+
name: "collectionId",
|
|
15944
16199
|
type: "bytes32",
|
|
15945
16200
|
internalType: "bytes32"
|
|
15946
16201
|
}
|
|
@@ -15969,7 +16224,7 @@ var ConditionalTokens = [
|
|
|
15969
16224
|
],
|
|
15970
16225
|
outputs: [
|
|
15971
16226
|
{
|
|
15972
|
-
name: "",
|
|
16227
|
+
name: "conditionId",
|
|
15973
16228
|
type: "bytes32",
|
|
15974
16229
|
internalType: "bytes32"
|
|
15975
16230
|
}
|
|
@@ -15988,13 +16243,37 @@ var ConditionalTokens = [
|
|
|
15988
16243
|
],
|
|
15989
16244
|
outputs: [
|
|
15990
16245
|
{
|
|
15991
|
-
name: "",
|
|
16246
|
+
name: "outcomeSlotCount",
|
|
15992
16247
|
type: "uint256",
|
|
15993
16248
|
internalType: "uint256"
|
|
15994
16249
|
}
|
|
15995
16250
|
],
|
|
15996
16251
|
stateMutability: "view"
|
|
15997
16252
|
},
|
|
16253
|
+
{
|
|
16254
|
+
type: "function",
|
|
16255
|
+
name: "getPositionId",
|
|
16256
|
+
inputs: [
|
|
16257
|
+
{
|
|
16258
|
+
name: "collateralToken",
|
|
16259
|
+
type: "address",
|
|
16260
|
+
internalType: "contract IERC20"
|
|
16261
|
+
},
|
|
16262
|
+
{
|
|
16263
|
+
name: "collectionId",
|
|
16264
|
+
type: "bytes32",
|
|
16265
|
+
internalType: "bytes32"
|
|
16266
|
+
}
|
|
16267
|
+
],
|
|
16268
|
+
outputs: [
|
|
16269
|
+
{
|
|
16270
|
+
name: "positionId",
|
|
16271
|
+
type: "uint256",
|
|
16272
|
+
internalType: "uint256"
|
|
16273
|
+
}
|
|
16274
|
+
],
|
|
16275
|
+
stateMutability: "pure"
|
|
16276
|
+
},
|
|
15998
16277
|
{
|
|
15999
16278
|
type: "function",
|
|
16000
16279
|
name: "mergePositions",
|
|
@@ -16029,6 +16308,49 @@ var ConditionalTokens = [
|
|
|
16029
16308
|
],
|
|
16030
16309
|
stateMutability: "nonpayable"
|
|
16031
16310
|
},
|
|
16311
|
+
{
|
|
16312
|
+
type: "function",
|
|
16313
|
+
name: "payoutDenominator",
|
|
16314
|
+
inputs: [
|
|
16315
|
+
{
|
|
16316
|
+
name: "conditionId",
|
|
16317
|
+
type: "bytes32",
|
|
16318
|
+
internalType: "bytes32"
|
|
16319
|
+
}
|
|
16320
|
+
],
|
|
16321
|
+
outputs: [
|
|
16322
|
+
{
|
|
16323
|
+
name: "",
|
|
16324
|
+
type: "uint256",
|
|
16325
|
+
internalType: "uint256"
|
|
16326
|
+
}
|
|
16327
|
+
],
|
|
16328
|
+
stateMutability: "view"
|
|
16329
|
+
},
|
|
16330
|
+
{
|
|
16331
|
+
type: "function",
|
|
16332
|
+
name: "payoutNumerators",
|
|
16333
|
+
inputs: [
|
|
16334
|
+
{
|
|
16335
|
+
name: "conditionId",
|
|
16336
|
+
type: "bytes32",
|
|
16337
|
+
internalType: "bytes32"
|
|
16338
|
+
},
|
|
16339
|
+
{
|
|
16340
|
+
name: "index",
|
|
16341
|
+
type: "uint256",
|
|
16342
|
+
internalType: "uint256"
|
|
16343
|
+
}
|
|
16344
|
+
],
|
|
16345
|
+
outputs: [
|
|
16346
|
+
{
|
|
16347
|
+
name: "",
|
|
16348
|
+
type: "uint256",
|
|
16349
|
+
internalType: "uint256"
|
|
16350
|
+
}
|
|
16351
|
+
],
|
|
16352
|
+
stateMutability: "view"
|
|
16353
|
+
},
|
|
16032
16354
|
{
|
|
16033
16355
|
type: "function",
|
|
16034
16356
|
name: "prepareCondition",
|
|
@@ -16053,6 +16375,35 @@ var ConditionalTokens = [
|
|
|
16053
16375
|
],
|
|
16054
16376
|
stateMutability: "nonpayable"
|
|
16055
16377
|
},
|
|
16378
|
+
{
|
|
16379
|
+
type: "function",
|
|
16380
|
+
name: "redeemPositions",
|
|
16381
|
+
inputs: [
|
|
16382
|
+
{
|
|
16383
|
+
name: "collateralToken",
|
|
16384
|
+
type: "address",
|
|
16385
|
+
internalType: "contract IERC20"
|
|
16386
|
+
},
|
|
16387
|
+
{
|
|
16388
|
+
name: "parentCollectionId",
|
|
16389
|
+
type: "bytes32",
|
|
16390
|
+
internalType: "bytes32"
|
|
16391
|
+
},
|
|
16392
|
+
{
|
|
16393
|
+
name: "conditionId",
|
|
16394
|
+
type: "bytes32",
|
|
16395
|
+
internalType: "bytes32"
|
|
16396
|
+
},
|
|
16397
|
+
{
|
|
16398
|
+
name: "indexSets",
|
|
16399
|
+
type: "uint256[]",
|
|
16400
|
+
internalType: "uint256[]"
|
|
16401
|
+
}
|
|
16402
|
+
],
|
|
16403
|
+
outputs: [
|
|
16404
|
+
],
|
|
16405
|
+
stateMutability: "nonpayable"
|
|
16406
|
+
},
|
|
16056
16407
|
{
|
|
16057
16408
|
type: "function",
|
|
16058
16409
|
name: "reportPayouts",
|
|
@@ -16113,14 +16464,19 @@ var ERC20 = [
|
|
|
16113
16464
|
type: "constructor",
|
|
16114
16465
|
inputs: [
|
|
16115
16466
|
{
|
|
16116
|
-
name: "
|
|
16467
|
+
name: "_name",
|
|
16117
16468
|
type: "string",
|
|
16118
16469
|
internalType: "string"
|
|
16119
16470
|
},
|
|
16120
16471
|
{
|
|
16121
|
-
name: "
|
|
16472
|
+
name: "_symbol",
|
|
16122
16473
|
type: "string",
|
|
16123
16474
|
internalType: "string"
|
|
16475
|
+
},
|
|
16476
|
+
{
|
|
16477
|
+
name: "_decimals",
|
|
16478
|
+
type: "uint8",
|
|
16479
|
+
internalType: "uint8"
|
|
16124
16480
|
}
|
|
16125
16481
|
],
|
|
16126
16482
|
stateMutability: "nonpayable"
|
|
@@ -16130,12 +16486,12 @@ var ERC20 = [
|
|
|
16130
16486
|
name: "allowance",
|
|
16131
16487
|
inputs: [
|
|
16132
16488
|
{
|
|
16133
|
-
name: "
|
|
16489
|
+
name: "",
|
|
16134
16490
|
type: "address",
|
|
16135
16491
|
internalType: "address"
|
|
16136
16492
|
},
|
|
16137
16493
|
{
|
|
16138
|
-
name: "
|
|
16494
|
+
name: "",
|
|
16139
16495
|
type: "address",
|
|
16140
16496
|
internalType: "address"
|
|
16141
16497
|
}
|
|
@@ -16178,7 +16534,7 @@ var ERC20 = [
|
|
|
16178
16534
|
name: "balanceOf",
|
|
16179
16535
|
inputs: [
|
|
16180
16536
|
{
|
|
16181
|
-
name: "
|
|
16537
|
+
name: "",
|
|
16182
16538
|
type: "address",
|
|
16183
16539
|
internalType: "address"
|
|
16184
16540
|
}
|
|
@@ -16208,49 +16564,20 @@ var ERC20 = [
|
|
|
16208
16564
|
},
|
|
16209
16565
|
{
|
|
16210
16566
|
type: "function",
|
|
16211
|
-
name: "
|
|
16567
|
+
name: "mint",
|
|
16212
16568
|
inputs: [
|
|
16213
16569
|
{
|
|
16214
|
-
name: "
|
|
16215
|
-
type: "address",
|
|
16216
|
-
internalType: "address"
|
|
16217
|
-
},
|
|
16218
|
-
{
|
|
16219
|
-
name: "subtractedValue",
|
|
16220
|
-
type: "uint256",
|
|
16221
|
-
internalType: "uint256"
|
|
16222
|
-
}
|
|
16223
|
-
],
|
|
16224
|
-
outputs: [
|
|
16225
|
-
{
|
|
16226
|
-
name: "",
|
|
16227
|
-
type: "bool",
|
|
16228
|
-
internalType: "bool"
|
|
16229
|
-
}
|
|
16230
|
-
],
|
|
16231
|
-
stateMutability: "nonpayable"
|
|
16232
|
-
},
|
|
16233
|
-
{
|
|
16234
|
-
type: "function",
|
|
16235
|
-
name: "increaseAllowance",
|
|
16236
|
-
inputs: [
|
|
16237
|
-
{
|
|
16238
|
-
name: "spender",
|
|
16570
|
+
name: "to",
|
|
16239
16571
|
type: "address",
|
|
16240
16572
|
internalType: "address"
|
|
16241
16573
|
},
|
|
16242
16574
|
{
|
|
16243
|
-
name: "
|
|
16575
|
+
name: "amount",
|
|
16244
16576
|
type: "uint256",
|
|
16245
16577
|
internalType: "uint256"
|
|
16246
16578
|
}
|
|
16247
16579
|
],
|
|
16248
16580
|
outputs: [
|
|
16249
|
-
{
|
|
16250
|
-
name: "",
|
|
16251
|
-
type: "bool",
|
|
16252
|
-
internalType: "bool"
|
|
16253
|
-
}
|
|
16254
16581
|
],
|
|
16255
16582
|
stateMutability: "nonpayable"
|
|
16256
16583
|
},
|
|
@@ -16539,4 +16866,4 @@ declare function parseMetadata<T extends {
|
|
|
16539
16866
|
|
|
16540
16867
|
declare const version = "0.1.0";
|
|
16541
16868
|
|
|
16542
|
-
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 };
|