rain-sdk-v2 2.0.14 → 2.0.15

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
@@ -609,6 +609,19 @@ const result = await rain.getEntryShares({
609
609
  // result.expectedReward = expected reward amount
610
610
  ```
611
611
 
612
+ ### `getClaimableAmount(params): Promise<bigint>`
613
+
614
+ Get the total claimable amount for a user on a specific option.
615
+
616
+ ```typescript
617
+ const claimable = await rain.getClaimableAmount({
618
+ marketContractAddress: '0x...',
619
+ userAddress: '0x...',
620
+ option: 1n, // 1-based option index
621
+ });
622
+ // claimable = total claimable amount in base token wei
623
+ ```
624
+
612
625
  ### `getDisputeWindow(params): Promise<bigint>`
613
626
 
614
627
  Get the dispute window duration (in seconds) for a market contract.
package/dist/Rain.d.ts CHANGED
@@ -68,6 +68,11 @@ export declare class Rain {
68
68
  userAddress: `0x${string}`;
69
69
  option: bigint;
70
70
  }): Promise<bigint[]>;
71
+ getClaimableAmount(params: {
72
+ marketContractAddress: `0x${string}`;
73
+ userAddress: `0x${string}`;
74
+ option: bigint;
75
+ }): Promise<bigint>;
71
76
  buildSplitTx(params: SplitTxParams & {
72
77
  walletAddress: `0x${string}`;
73
78
  }): Promise<RawTransaction[]>;
package/dist/Rain.js CHANGED
@@ -19,6 +19,7 @@ import { loginUser } from './auth/login.js';
19
19
  import { getUserOptionLPShares } from './markets/getUserOptionLPShares.js';
20
20
  import { getUserOptionShares } from './markets/getUserOptionShares.js';
21
21
  import { getDynamicPayout } from './markets/getDynamicPayout.js';
22
+ import { getClaimableAmount } from './markets/getClaimableAmount.js';
22
23
  import { getUserSharesInEscrow } from './markets/getUserSharesInEscrow.js';
23
24
  import { getOptionClaimed } from './markets/getOptionClaimed.js';
24
25
  import { getDisputeWindow } from './markets/getDisputeWindow.js';
@@ -140,6 +141,9 @@ export class Rain {
140
141
  async getDynamicPayout(params) {
141
142
  return getDynamicPayout({ ...params, rpcUrl: this.rpcUrl });
142
143
  }
144
+ async getClaimableAmount(params) {
145
+ return getClaimableAmount({ ...params, rpcUrl: this.rpcUrl });
146
+ }
143
147
  async buildSplitTx(params) {
144
148
  return buildSplitRawTx({ ...params, rpcUrl: this.rpcUrl });
145
149
  }
@@ -3000,4 +3000,22 @@ export declare const MarketsAbi: readonly [{
3000
3000
  readonly type: "error";
3001
3001
  readonly name: "WinnerOutOfBound";
3002
3002
  readonly inputs: readonly [];
3003
+ }, {
3004
+ readonly type: "function";
3005
+ readonly name: "getClaimableAmount";
3006
+ readonly inputs: readonly [{
3007
+ readonly name: "user";
3008
+ readonly type: "address";
3009
+ readonly internalType: "address";
3010
+ }, {
3011
+ readonly name: "option";
3012
+ readonly type: "uint256";
3013
+ readonly internalType: "uint256";
3014
+ }];
3015
+ readonly outputs: readonly [{
3016
+ readonly name: "totalClaimable";
3017
+ readonly type: "uint256";
3018
+ readonly internalType: "uint256";
3019
+ }];
3020
+ readonly stateMutability: "view";
3003
3021
  }];
@@ -1,3 +1,3 @@
1
1
  // Diamond proxy constructor ABI (for reference only — not used by SDK):
2
2
  // export const MarketsDiamondAbi = [{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"initialLiquidity","type":"uint256"},{"internalType":"uint256[]","name":"liquidityPercentages","type":"uint256[]"},{"internalType":"uint256[]","name":"initialYesPrices","type":"uint256[]"},{"internalType":"bool","name":"isPublic","type":"bool"},{"internalType":"bool","name":"resolverIsAI","type":"bool"},{"internalType":"address","name":"deployerContract","type":"address"},{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"usdt","type":"address"},{"internalType":"address","name":"poolOwner","type":"address"},{"internalType":"address","name":"platformAddress","type":"address"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"disputeResolver","type":"address"},{"internalType":"address","name":"rainToken","type":"address"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"uint256","name":"baseTokenDecimals","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"numberOfOptions","type":"uint256"},{"internalType":"uint256","name":"platformFee","type":"uint256"},{"internalType":"uint256","name":"liquidityFee","type":"uint256"},{"internalType":"uint256","name":"creatorFee","type":"uint256"},{"internalType":"uint256","name":"resultResolverFee","type":"uint256"},{"internalType":"uint256","name":"closingFee","type":"uint256"},{"internalType":"uint256","name":"oracleFixedFee","type":"uint256"},{"internalType":"uint256","name":"oracleEndTime","type":"uint256"},{"internalType":"string","name":"ipfsUri","type":"string"},{"components":[{"internalType":"enum IRainDeployer.TokenPool","name":"tokenPool","type":"uint8"},{"internalType":"bool","name":"isAllowed","type":"bool"},{"internalType":"address","name":"routerAddress","type":"address"},{"internalType":"address","name":"routerHelper","type":"address"},{"internalType":"bytes","name":"pathUSDTToToken","type":"bytes"},{"internalType":"bytes","name":"pathTokenToUSDT","type":"bytes"},{"internalType":"bytes","name":"pathTokenWETH","type":"bytes"}],"internalType":"struct IRainDeployer.TokenData","name":"tokenData","type":"tuple"},{"internalType":"enum Types.TradingModel","name":"tradingModel","type":"uint8"}],"internalType":"struct IRainPool.Params","name":"params","type":"tuple"}],"stateMutability":"payable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}] as const
3
- export const MarketsAbi = [{ "type": "function", "name": "APPEAL_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_FEE_MAX", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_WINDOW", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "FACTORY", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "FEE_MAGNIFICATION", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "MAKER_REBATE_FEE", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ORDER_EXECUTION_FEE", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "PRICE_MAGNIFICATION", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "RESOLUTION_FEE_MAX", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "RESOLUTION_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "TICK_SPACING", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ammNoReserve", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ammYesReserve", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "baseToken", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "baseTokenDecimals", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "buyOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "headIndex", "type": "int256", "internalType": "int256" }, { "name": "tailIndex", "type": "int256", "internalType": "int256" }, { "name": "count", "type": "int256", "internalType": "int256" }, { "name": "isInitialized", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "calculateBaseTokenOracleFixedFee", "inputs": [{ "name": "oracleFixedFee", "type": "uint256", "internalType": "uint256" }, { "name": "tokenData", "type": "tuple", "internalType": "struct IRainDeployer.TokenData", "components": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenWETH", "type": "bytes", "internalType": "bytes" }] }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "cancelBuyOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8[]", "internalType": "uint8[]" }, { "name": "price", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "orderID", "type": "uint256[]", "internalType": "uint256[]" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "cancelSellOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8[]", "internalType": "uint8[]" }, { "name": "price", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "orderID", "type": "uint256[]", "internalType": "uint256[]" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "chooseWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "claim", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closePool", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closePool", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "internalType": "uint8" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closingFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "creatorFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "disputeResolver", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "endTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "enterLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "totalAmount", "type": "uint256", "internalType": "uint256" }, { "name": "minYesToDeposit", "type": "uint256", "internalType": "uint256" }, { "name": "minNoToDeposit", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "enterLiquidityBatch", "inputs": [{ "name": "totalAmount", "type": "uint256", "internalType": "uint256" }, { "name": "percentages", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "minYesToDeposit", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "minNoToDeposit", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "enterOption", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "minSharesOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "feePerLPShareX128", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "firstBuyOrderPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "firstSellOrderPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getAmountRequired", "inputs": [{ "name": "targetPrice", "type": "uint256", "internalType": "uint256" }, { "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "requiredAmount", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getCreatorReward", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "creatorReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getCurrentPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getDisputeAppealFee", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "getDynamicPayout", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "dynamicPayout", "type": "uint256[]", "internalType": "uint256[]" }], "stateMutability": "view" }, { "type": "function", "name": "getEntryShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "returnedShares", "type": "uint256", "internalType": "uint256" }, { "name": "expectedReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getImpactedPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getLiquidityReward", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "liquidityReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getRemovedLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "yesBack", "type": "uint256", "internalType": "uint256" }, { "name": "noBack", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getResolverBondAmount", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "resolverBondAmount", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "getResolverReward", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "resolverReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getReturnedLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "totalAmount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "returnedShares", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "returnedAmounts", "type": "uint256[]", "internalType": "uint256[]" }], "stateMutability": "view" }, { "type": "function", "name": "getReturnedShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getSharesReward", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "sharesReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ipfsUri", "inputs": [], "outputs": [{ "name": "", "type": "string", "internalType": "string" }], "stateMutability": "view" }, { "type": "function", "name": "isOptionAppealed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "isOptionDisputed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "isPublic", "inputs": [], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "liquidityFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "merge", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "numberOfOptions", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "openDispute", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "optionAppeal", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint256", "internalType": "uint256" }, { "name": "disputer", "type": "address", "internalType": "address" }, { "name": "appealResolver", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionClaimed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionClosingShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionCreatorShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionDispute", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint256", "internalType": "uint256" }, { "name": "disputer", "type": "address", "internalType": "address" }, { "name": "_disputeResolver", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionEndTime", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionEndTimeCache", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionFinalized", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionFirstClaim", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionOrderBookShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPerSideFunds", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPerSideShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPlatformShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionProposedWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolutionProposer", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolved", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolver", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolverBond", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolverShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionState", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "enum Types.PoolState" }], "stateMutability": "view" }, { "type": "function", "name": "optionTotalFunds", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionTotalShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], "stateMutability": "view" }, { "type": "function", "name": "optionWinningPoolShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "oracleEndTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "oracleFixedFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "orderBook", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "exists", "type": "bool", "internalType": "bool" }, { "name": "index", "type": "int256", "internalType": "int256" }], "stateMutability": "view" }, { "type": "function", "name": "ordersAdded", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ordersRemoved", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "placeBuyOrder", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "postOnly", "type": "bool", "internalType": "bool" }], "outputs": [{ "name": "orderID", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "placeSellOrder", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "shares", "type": "uint256", "internalType": "uint256" }, { "name": "postOnly", "type": "bool", "internalType": "bool" }], "outputs": [{ "name": "orderID", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "platformAddress", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "platformFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "poolOwner", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "rainToken", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "referrer", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "removeLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "internalType": "uint256" }, { "name": "minYesOut", "type": "uint256", "internalType": "uint256" }, { "name": "minNoOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "resolver", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "resolverIsAI", "inputs": [], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "resolverShareUSDT", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "resultResolverFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "sellOption", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "minAmountOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "sellOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "headIndex", "type": "int256", "internalType": "int256" }, { "name": "tailIndex", "type": "int256", "internalType": "int256" }, { "name": "count", "type": "int256", "internalType": "int256" }, { "name": "isInitialized", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "split", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "startTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "swapOracleFixedFee", "inputs": [{ "name": "baseToken", "type": "address", "internalType": "address" }, { "name": "tokenData", "type": "tuple", "internalType": "struct IRainDeployer.TokenData", "components": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenWETH", "type": "bytes", "internalType": "bytes" }] }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "tokenData", "inputs": [], "outputs": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToWETH", "type": "bytes", "internalType": "bytes" }], "stateMutability": "view" }, { "type": "function", "name": "tooEarly", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "totalMarketFunds", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalMarketShares", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalOptionLPShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalOrders", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "tradingModel", "inputs": [], "outputs": [{ "name": "", "type": "uint8", "internalType": "enum Types.TradingModel" }], "stateMutability": "view" }, { "type": "function", "name": "usdt", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "userActiveBuyOrders", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userActiveSellOrders", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userFeeDebtX128", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userFundsPerSideInEscrow", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userOptionLPShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userOptionPerSideShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userSharesPerSideInEscrow", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "event", "name": "AddLiquidity", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "AppealFeeRefunded", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "appealFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealedWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CancelBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderBaseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderCreator", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "CancelSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderCreator", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ChooseWinner", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ChooseWinnerAppeal", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ChooseWinnerDispute", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Claim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winnerSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "winningReward", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ClaimSwapFees", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ClosePool", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "side", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ClosingShareClaim", "inputs": [{ "name": "closer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "closingShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CreateOracle", "inputs": [{ "name": "creatorContract", "type": "address", "indexed": true, "internalType": "address" }, { "name": "createdContract", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CreatorClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "DisputeFeeRefunded", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "disputeFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "EnterOption", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": false, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ExecuteBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "taker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ExecuteSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "taker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "MakerRebate", "inputs": [{ "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Merge", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "OpenAppeal", "inputs": [{ "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "currentWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealFee", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "OpenDispute", "inputs": [{ "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "currentWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputeFee", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "PlaceBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "PlaceSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "PlatformClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Price", "inputs": [{ "name": "option", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "yesReserve", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "noReserve", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionTotalFunds", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "RainTokenBurned", "inputs": [{ "name": "amountBurned", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ReferrerClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "RemoveLiquidity", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseTokensReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "yesReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "noReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "feesEarned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ResolutionProposed", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ResolutionProposerRefund", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ResolverClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ResolverSet", "inputs": [{ "name": "resolver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "SellOption", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": false, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "Split", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "TooEarly", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "error", "name": "AlreadyClaimed", "inputs": [] }, { "type": "error", "name": "AlreadyInitialized", "inputs": [] }, { "type": "error", "name": "AmountTooSmall", "inputs": [] }, { "type": "error", "name": "ArrayLengthMismatch", "inputs": [] }, { "type": "error", "name": "CallerNotOrderPlacer", "inputs": [] }, { "type": "error", "name": "DeadlineExpired", "inputs": [] }, { "type": "error", "name": "DisputeAlreadyOpened", "inputs": [] }, { "type": "error", "name": "DisputeWindowEnded", "inputs": [] }, { "type": "error", "name": "DisputeWindowNotEnded", "inputs": [] }, { "type": "error", "name": "EndPriceTooHigh", "inputs": [] }, { "type": "error", "name": "EndPriceTooLow", "inputs": [] }, { "type": "error", "name": "EndTImeLessThanStartTime", "inputs": [] }, { "type": "error", "name": "IneligibleToClaim", "inputs": [] }, { "type": "error", "name": "InsufficientAmount", "inputs": [] }, { "type": "error", "name": "InsufficientLPShares", "inputs": [] }, { "type": "error", "name": "InsufficientUserShares", "inputs": [] }, { "type": "error", "name": "InvalidAmount", "inputs": [] }, { "type": "error", "name": "InvalidCall", "inputs": [] }, { "type": "error", "name": "InvalidCaller", "inputs": [] }, { "type": "error", "name": "InvalidInitialLiquidity", "inputs": [] }, { "type": "error", "name": "InvalidLiquidityPercentage", "inputs": [] }, { "type": "error", "name": "InvalidOption", "inputs": [] }, { "type": "error", "name": "InvalidOptions", "inputs": [] }, { "type": "error", "name": "InvalidOracleEndTime", "inputs": [] }, { "type": "error", "name": "InvalidOracleFixedFee", "inputs": [] }, { "type": "error", "name": "InvalidPoolState", "inputs": [] }, { "type": "error", "name": "InvalidPrice", "inputs": [] }, { "type": "error", "name": "InvalidSide", "inputs": [] }, { "type": "error", "name": "LPSharesZero", "inputs": [] }, { "type": "error", "name": "LinkedListNotInitalized", "inputs": [] }, { "type": "error", "name": "MaximumOptionsExceeded", "inputs": [] }, { "type": "error", "name": "NoIncreaseNeeded", "inputs": [] }, { "type": "error", "name": "NoOwnerSet", "inputs": [] }, { "type": "error", "name": "NoPlatformSet", "inputs": [] }, { "type": "error", "name": "NoRewardToClaim", "inputs": [] }, { "type": "error", "name": "NoTokenSet", "inputs": [] }, { "type": "error", "name": "NotPoolManager", "inputs": [] }, { "type": "error", "name": "OnlyAuthority", "inputs": [] }, { "type": "error", "name": "OnlyOwner", "inputs": [] }, { "type": "error", "name": "OnlyResolver", "inputs": [] }, { "type": "error", "name": "OracleNotFinalized", "inputs": [] }, { "type": "error", "name": "OrderAlreadyExists", "inputs": [] }, { "type": "error", "name": "OrderBookPhaseNotOpen", "inputs": [] }, { "type": "error", "name": "OrderDoesNotExist", "inputs": [] }, { "type": "error", "name": "OrderWouldCross", "inputs": [] }, { "type": "error", "name": "PoolClosed", "inputs": [] }, { "type": "error", "name": "PoolNotClosed", "inputs": [] }, { "type": "error", "name": "PoolOpen", "inputs": [] }, { "type": "error", "name": "SaleNotLive", "inputs": [] }, { "type": "error", "name": "SaleStillLive", "inputs": [] }, { "type": "error", "name": "SlippageExceeded", "inputs": [] }, { "type": "error", "name": "StartTimeEnded", "inputs": [] }, { "type": "error", "name": "UserBuyOrderExist", "inputs": [] }, { "type": "error", "name": "UserBuyOrderLimitReached", "inputs": [] }, { "type": "error", "name": "UserSellOrderExist", "inputs": [] }, { "type": "error", "name": "UserSellOrderLimitReached", "inputs": [] }, { "type": "error", "name": "VotingEnded", "inputs": [] }, { "type": "error", "name": "WinnerAlreadyFinalized", "inputs": [] }, { "type": "error", "name": "WinnerNotDecided", "inputs": [] }, { "type": "error", "name": "WinnerOutOfBound", "inputs": [] }];
3
+ export const MarketsAbi = [{ "type": "function", "name": "APPEAL_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_FEE_MAX", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "DISPUTE_WINDOW", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "FACTORY", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "FEE_MAGNIFICATION", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "MAKER_REBATE_FEE", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ORDER_EXECUTION_FEE", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "PRICE_MAGNIFICATION", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "RESOLUTION_FEE_MAX", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "RESOLUTION_FEE_MIN", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "TICK_SPACING", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ammNoReserve", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ammYesReserve", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "baseToken", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "baseTokenDecimals", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "buyOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "headIndex", "type": "int256", "internalType": "int256" }, { "name": "tailIndex", "type": "int256", "internalType": "int256" }, { "name": "count", "type": "int256", "internalType": "int256" }, { "name": "isInitialized", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "calculateBaseTokenOracleFixedFee", "inputs": [{ "name": "oracleFixedFee", "type": "uint256", "internalType": "uint256" }, { "name": "tokenData", "type": "tuple", "internalType": "struct IRainDeployer.TokenData", "components": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenWETH", "type": "bytes", "internalType": "bytes" }] }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "cancelBuyOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8[]", "internalType": "uint8[]" }, { "name": "price", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "orderID", "type": "uint256[]", "internalType": "uint256[]" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "cancelSellOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8[]", "internalType": "uint8[]" }, { "name": "price", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "orderID", "type": "uint256[]", "internalType": "uint256[]" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "chooseWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "claim", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closePool", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closePool", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "internalType": "uint8" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "closingFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "creatorFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "disputeResolver", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "endTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "enterLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "totalAmount", "type": "uint256", "internalType": "uint256" }, { "name": "minYesToDeposit", "type": "uint256", "internalType": "uint256" }, { "name": "minNoToDeposit", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "enterLiquidityBatch", "inputs": [{ "name": "totalAmount", "type": "uint256", "internalType": "uint256" }, { "name": "percentages", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "minYesToDeposit", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "minNoToDeposit", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "enterOption", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "minSharesOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "feePerLPShareX128", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "firstBuyOrderPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "firstSellOrderPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getAmountRequired", "inputs": [{ "name": "targetPrice", "type": "uint256", "internalType": "uint256" }, { "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "requiredAmount", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getCreatorReward", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "creatorReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getCurrentPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getDisputeAppealFee", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "getDynamicPayout", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "dynamicPayout", "type": "uint256[]", "internalType": "uint256[]" }], "stateMutability": "view" }, { "type": "function", "name": "getEntryShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "returnedShares", "type": "uint256", "internalType": "uint256" }, { "name": "expectedReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getImpactedPrice", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getLiquidityReward", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "liquidityReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getRemovedLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "yesBack", "type": "uint256", "internalType": "uint256" }, { "name": "noBack", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getResolverBondAmount", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "resolverBondAmount", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "getResolverReward", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "resolverReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getReturnedLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "totalAmount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "returnedShares", "type": "uint256[]", "internalType": "uint256[]" }, { "name": "returnedAmounts", "type": "uint256[]", "internalType": "uint256[]" }], "stateMutability": "view" }, { "type": "function", "name": "getReturnedShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "getSharesReward", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "sharesReward", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ipfsUri", "inputs": [], "outputs": [{ "name": "", "type": "string", "internalType": "string" }], "stateMutability": "view" }, { "type": "function", "name": "isOptionAppealed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "isOptionDisputed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "isPublic", "inputs": [], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "liquidityFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "merge", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "numberOfOptions", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "openDispute", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "optionAppeal", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint256", "internalType": "uint256" }, { "name": "disputer", "type": "address", "internalType": "address" }, { "name": "appealResolver", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionClaimed", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionClosingShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionCreatorShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionDispute", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "disputeFee", "type": "uint256", "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint256", "internalType": "uint256" }, { "name": "disputer", "type": "address", "internalType": "address" }, { "name": "_disputeResolver", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionEndTime", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionEndTimeCache", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionFinalized", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionFirstClaim", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionOrderBookShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPerSideFunds", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPerSideShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionPlatformShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionProposedWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolutionProposer", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolved", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolver", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolverBond", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionResolverShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionState", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "enum Types.PoolState" }], "stateMutability": "view" }, { "type": "function", "name": "optionTotalFunds", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionTotalShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "optionWinner", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint8", "internalType": "uint8" }], "stateMutability": "view" }, { "type": "function", "name": "optionWinningPoolShare", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "oracleEndTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "oracleFixedFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "orderBook", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "exists", "type": "bool", "internalType": "bool" }, { "name": "index", "type": "int256", "internalType": "int256" }], "stateMutability": "view" }, { "type": "function", "name": "ordersAdded", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "ordersRemoved", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "placeBuyOrder", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "postOnly", "type": "bool", "internalType": "bool" }], "outputs": [{ "name": "orderID", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "placeSellOrder", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }, { "name": "shares", "type": "uint256", "internalType": "uint256" }, { "name": "postOnly", "type": "bool", "internalType": "bool" }], "outputs": [{ "name": "orderID", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "platformAddress", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "platformFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "poolOwner", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "rainToken", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "referrer", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "removeLiquidity", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "internalType": "uint256" }, { "name": "minYesOut", "type": "uint256", "internalType": "uint256" }, { "name": "minNoOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "resolver", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "resolverIsAI", "inputs": [], "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "resolverShareUSDT", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "resultResolverFee", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "sellOption", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }, { "name": "minAmountOut", "type": "uint256", "internalType": "uint256" }, { "name": "deadline", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "sellOrders", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "price", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "headIndex", "type": "int256", "internalType": "int256" }, { "name": "tailIndex", "type": "int256", "internalType": "int256" }, { "name": "count", "type": "int256", "internalType": "int256" }, { "name": "isInitialized", "type": "bool", "internalType": "bool" }], "stateMutability": "view" }, { "type": "function", "name": "split", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "amount", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "startTime", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "swapOracleFixedFee", "inputs": [{ "name": "baseToken", "type": "address", "internalType": "address" }, { "name": "tokenData", "type": "tuple", "internalType": "struct IRainDeployer.TokenData", "components": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenWETH", "type": "bytes", "internalType": "bytes" }] }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "tokenData", "inputs": [], "outputs": [{ "name": "tokenPool", "type": "uint8", "internalType": "enum IRainDeployer.TokenPool" }, { "name": "isAllowed", "type": "bool", "internalType": "bool" }, { "name": "routerAddress", "type": "address", "internalType": "address" }, { "name": "routerHelper", "type": "address", "internalType": "address" }, { "name": "pathUSDTToToken", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToUSDT", "type": "bytes", "internalType": "bytes" }, { "name": "pathTokenToWETH", "type": "bytes", "internalType": "bytes" }], "stateMutability": "view" }, { "type": "function", "name": "tooEarly", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", "name": "totalMarketFunds", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalMarketShares", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalOptionLPShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "totalOrders", "inputs": [], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "nonpayable" }, { "type": "function", "name": "tradingModel", "inputs": [], "outputs": [{ "name": "", "type": "uint8", "internalType": "enum Types.TradingModel" }], "stateMutability": "view" }, { "type": "function", "name": "usdt", "inputs": [], "outputs": [{ "name": "", "type": "address", "internalType": "address" }], "stateMutability": "view" }, { "type": "function", "name": "userActiveBuyOrders", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userActiveSellOrders", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userFeeDebtX128", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userFundsPerSideInEscrow", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userOptionLPShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userOptionPerSideShares", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "function", "name": "userSharesPerSideInEscrow", "inputs": [{ "name": "option", "type": "uint256", "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "internalType": "uint8" }, { "name": "user", "type": "address", "internalType": "address" }], "outputs": [{ "name": "", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }, { "type": "event", "name": "AddLiquidity", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "AppealFeeRefunded", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "appealFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealedWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CancelBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderBaseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderCreator", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "CancelSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderCreator", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ChooseWinner", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ChooseWinnerAppeal", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ChooseWinnerDispute", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "platformShare", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winningShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Claim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "winnerSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "winningReward", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ClaimSwapFees", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ClosePool", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "side", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ClosingShareClaim", "inputs": [{ "name": "closer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "closingShare", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CreateOracle", "inputs": [{ "name": "creatorContract", "type": "address", "indexed": true, "internalType": "address" }, { "name": "createdContract", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "CreatorClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "DisputeFeeRefunded", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "disputeFee", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "EnterOption", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": false, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ExecuteBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "taker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ExecuteSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "taker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "MakerRebate", "inputs": [{ "name": "maker", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Merge", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "OpenAppeal", "inputs": [{ "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "currentWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "appealFee", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "OpenDispute", "inputs": [{ "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "currentWinner", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "disputeFee", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "PlaceBuyOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "PlaceSellOrder", "inputs": [{ "name": "orderOption", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderOptionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "orderPrice", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "orderID", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "maker", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "PlatformClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "Price", "inputs": [{ "name": "option", "type": "uint256", "indexed": true, "internalType": "uint256" }, { "name": "yesReserve", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "noReserve", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionTotalFunds", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "RainTokenBurned", "inputs": [{ "name": "amountBurned", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ReferrerClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "RemoveLiquidity", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "lpShares", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "baseTokensReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "yesReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "noReturned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "feesEarned", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "ResolutionProposed", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ResolutionProposerRefund", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "event", "name": "ResolverClaim", "inputs": [{ "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "ResolverSet", "inputs": [{ "name": "resolver", "type": "address", "indexed": true, "internalType": "address" }, { "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }], "anonymous": false }, { "type": "event", "name": "SellOption", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "optionSide", "type": "uint8", "indexed": false, "internalType": "uint8" }, { "name": "baseAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "sharesAmount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": false, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "Split", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "wallet", "type": "address", "indexed": true, "internalType": "address" }], "anonymous": false }, { "type": "event", "name": "TooEarly", "inputs": [{ "name": "option", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "resolutionProposer", "type": "address", "indexed": true, "internalType": "address" }, { "name": "resolverBond", "type": "uint256", "indexed": false, "internalType": "uint256" }, { "name": "proposedWinner", "type": "uint8", "indexed": false, "internalType": "uint8" }], "anonymous": false }, { "type": "error", "name": "AlreadyClaimed", "inputs": [] }, { "type": "error", "name": "AlreadyInitialized", "inputs": [] }, { "type": "error", "name": "AmountTooSmall", "inputs": [] }, { "type": "error", "name": "ArrayLengthMismatch", "inputs": [] }, { "type": "error", "name": "CallerNotOrderPlacer", "inputs": [] }, { "type": "error", "name": "DeadlineExpired", "inputs": [] }, { "type": "error", "name": "DisputeAlreadyOpened", "inputs": [] }, { "type": "error", "name": "DisputeWindowEnded", "inputs": [] }, { "type": "error", "name": "DisputeWindowNotEnded", "inputs": [] }, { "type": "error", "name": "EndPriceTooHigh", "inputs": [] }, { "type": "error", "name": "EndPriceTooLow", "inputs": [] }, { "type": "error", "name": "EndTImeLessThanStartTime", "inputs": [] }, { "type": "error", "name": "IneligibleToClaim", "inputs": [] }, { "type": "error", "name": "InsufficientAmount", "inputs": [] }, { "type": "error", "name": "InsufficientLPShares", "inputs": [] }, { "type": "error", "name": "InsufficientUserShares", "inputs": [] }, { "type": "error", "name": "InvalidAmount", "inputs": [] }, { "type": "error", "name": "InvalidCall", "inputs": [] }, { "type": "error", "name": "InvalidCaller", "inputs": [] }, { "type": "error", "name": "InvalidInitialLiquidity", "inputs": [] }, { "type": "error", "name": "InvalidLiquidityPercentage", "inputs": [] }, { "type": "error", "name": "InvalidOption", "inputs": [] }, { "type": "error", "name": "InvalidOptions", "inputs": [] }, { "type": "error", "name": "InvalidOracleEndTime", "inputs": [] }, { "type": "error", "name": "InvalidOracleFixedFee", "inputs": [] }, { "type": "error", "name": "InvalidPoolState", "inputs": [] }, { "type": "error", "name": "InvalidPrice", "inputs": [] }, { "type": "error", "name": "InvalidSide", "inputs": [] }, { "type": "error", "name": "LPSharesZero", "inputs": [] }, { "type": "error", "name": "LinkedListNotInitalized", "inputs": [] }, { "type": "error", "name": "MaximumOptionsExceeded", "inputs": [] }, { "type": "error", "name": "NoIncreaseNeeded", "inputs": [] }, { "type": "error", "name": "NoOwnerSet", "inputs": [] }, { "type": "error", "name": "NoPlatformSet", "inputs": [] }, { "type": "error", "name": "NoRewardToClaim", "inputs": [] }, { "type": "error", "name": "NoTokenSet", "inputs": [] }, { "type": "error", "name": "NotPoolManager", "inputs": [] }, { "type": "error", "name": "OnlyAuthority", "inputs": [] }, { "type": "error", "name": "OnlyOwner", "inputs": [] }, { "type": "error", "name": "OnlyResolver", "inputs": [] }, { "type": "error", "name": "OracleNotFinalized", "inputs": [] }, { "type": "error", "name": "OrderAlreadyExists", "inputs": [] }, { "type": "error", "name": "OrderBookPhaseNotOpen", "inputs": [] }, { "type": "error", "name": "OrderDoesNotExist", "inputs": [] }, { "type": "error", "name": "OrderWouldCross", "inputs": [] }, { "type": "error", "name": "PoolClosed", "inputs": [] }, { "type": "error", "name": "PoolNotClosed", "inputs": [] }, { "type": "error", "name": "PoolOpen", "inputs": [] }, { "type": "error", "name": "SaleNotLive", "inputs": [] }, { "type": "error", "name": "SaleStillLive", "inputs": [] }, { "type": "error", "name": "SlippageExceeded", "inputs": [] }, { "type": "error", "name": "StartTimeEnded", "inputs": [] }, { "type": "error", "name": "UserBuyOrderExist", "inputs": [] }, { "type": "error", "name": "UserBuyOrderLimitReached", "inputs": [] }, { "type": "error", "name": "UserSellOrderExist", "inputs": [] }, { "type": "error", "name": "UserSellOrderLimitReached", "inputs": [] }, { "type": "error", "name": "VotingEnded", "inputs": [] }, { "type": "error", "name": "WinnerAlreadyFinalized", "inputs": [] }, { "type": "error", "name": "WinnerNotDecided", "inputs": [] }, { "type": "error", "name": "WinnerOutOfBound", "inputs": [] }, { "type": "function", "name": "getClaimableAmount", "inputs": [{ "name": "user", "type": "address", "internalType": "address" }, { "name": "option", "type": "uint256", "internalType": "uint256" }], "outputs": [{ "name": "totalClaimable", "type": "uint256", "internalType": "uint256" }], "stateMutability": "view" }];
@@ -0,0 +1,6 @@
1
+ export declare function getClaimableAmount(params: {
2
+ marketContractAddress: `0x${string}`;
3
+ userAddress: `0x${string}`;
4
+ option: bigint;
5
+ rpcUrl: string;
6
+ }): Promise<bigint>;
@@ -0,0 +1,19 @@
1
+ import { createPublicClient, http, parseAbi } from 'viem';
2
+ import { arbitrum } from 'viem/chains';
3
+ const claimableAmountAbi = parseAbi([
4
+ 'function getClaimableAmount(address user, uint256 option) view returns (uint256 totalClaimable)',
5
+ ]);
6
+ export async function getClaimableAmount(params) {
7
+ const { marketContractAddress, userAddress, option, rpcUrl } = params;
8
+ const client = createPublicClient({
9
+ chain: arbitrum,
10
+ transport: http(rpcUrl),
11
+ });
12
+ const amount = await client.readContract({
13
+ address: marketContractAddress,
14
+ abi: claimableAmountAbi,
15
+ functionName: 'getClaimableAmount',
16
+ args: [userAddress, option],
17
+ });
18
+ return amount;
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rain-sdk-v2",
3
- "version": "2.0.14",
3
+ "version": "2.0.15",
4
4
  "type": "module",
5
5
  "description": "Rain SDK V2 — TypeScript SDK for Rain prediction markets on Arbitrum. Market creation, trading, liquidity, order book, split/merge, dispute, and smart account support.",
6
6
  "main": "dist/index.js",