rain-sdk-v2 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1074 -0
- package/dist/Rain.d.ts +212 -0
- package/dist/Rain.js +401 -0
- package/dist/RainAA.d.ts +62 -0
- package/dist/RainAA.js +304 -0
- package/dist/abi/CreateMarketAbi.d.ts +1125 -0
- package/dist/abi/CreateMarketAbi.js +1 -0
- package/dist/abi/ERC20Abi.d.ts +89 -0
- package/dist/abi/ERC20Abi.js +119 -0
- package/dist/abi/MarketsAbi.d.ts +2810 -0
- package/dist/abi/MarketsAbi.js +1 -0
- package/dist/abi/OracleAbi.d.ts +11 -0
- package/dist/abi/OracleAbi.js +15 -0
- package/dist/api/comments.d.ts +14 -0
- package/dist/api/comments.js +48 -0
- package/dist/api/dispute.d.ts +3 -0
- package/dist/api/dispute.js +30 -0
- package/dist/api/follow.d.ts +6 -0
- package/dist/api/follow.js +38 -0
- package/dist/api/helpers.d.ts +4 -0
- package/dist/api/helpers.js +26 -0
- package/dist/api/index.d.ts +14 -0
- package/dist/api/index.js +14 -0
- package/dist/api/investments.d.ts +21 -0
- package/dist/api/investments.js +135 -0
- package/dist/api/notifications.d.ts +4 -0
- package/dist/api/notifications.js +24 -0
- package/dist/api/orders.d.ts +8 -0
- package/dist/api/orders.js +40 -0
- package/dist/api/points.d.ts +5 -0
- package/dist/api/points.js +32 -0
- package/dist/api/poolReviews.d.ts +4 -0
- package/dist/api/poolReviews.js +23 -0
- package/dist/api/pools.d.ts +41 -0
- package/dist/api/pools.js +149 -0
- package/dist/api/priceData.d.ts +2 -0
- package/dist/api/priceData.js +9 -0
- package/dist/api/rainBurn.d.ts +3 -0
- package/dist/api/rainBurn.js +15 -0
- package/dist/api/types.d.ts +292 -0
- package/dist/api/types.js +2 -0
- package/dist/api/users.d.ts +15 -0
- package/dist/api/users.js +60 -0
- package/dist/auth/login.d.ts +4 -0
- package/dist/auth/login.js +27 -0
- package/dist/auth/types.d.ts +16 -0
- package/dist/auth/types.js +1 -0
- package/dist/config/environments.d.ts +15 -0
- package/dist/config/environments.js +41 -0
- package/dist/constants/contractmethods.d.ts +15 -0
- package/dist/constants/contractmethods.js +15 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/dist/markets/getDisputeFee.d.ts +5 -0
- package/dist/markets/getDisputeFee.js +19 -0
- package/dist/markets/getOrderInfo.d.ts +53 -0
- package/dist/markets/getOrderInfo.js +80 -0
- package/dist/markets/getResolverBondAmount.d.ts +9 -0
- package/dist/markets/getResolverBondAmount.js +35 -0
- package/dist/markets/getUserOptionLPShares.d.ts +7 -0
- package/dist/markets/getUserOptionLPShares.js +17 -0
- package/dist/markets/getUserOptionShares.d.ts +8 -0
- package/dist/markets/getUserOptionShares.js +17 -0
- package/dist/socket/RainSocket.d.ts +175 -0
- package/dist/socket/RainSocket.js +186 -0
- package/dist/tx/CreateMarket/buildCreateMarketRawTx.d.ts +2 -0
- package/dist/tx/CreateMarket/buildCreateMarketRawTx.js +55 -0
- package/dist/tx/CreateMarket/createMarketValidation.d.ts +2 -0
- package/dist/tx/CreateMarket/createMarketValidation.js +48 -0
- package/dist/tx/CreateMarket/helpers.d.ts +3 -0
- package/dist/tx/CreateMarket/helpers.js +42 -0
- package/dist/tx/buildAddLiquidityRawTx.d.ts +2 -0
- package/dist/tx/buildAddLiquidityRawTx.js +23 -0
- package/dist/tx/buildApprovalRawTx.d.ts +2 -0
- package/dist/tx/buildApprovalRawTx.js +24 -0
- package/dist/tx/buildCalculateWinnerRawTx.d.ts +13 -0
- package/dist/tx/buildCalculateWinnerRawTx.js +37 -0
- package/dist/tx/buildCancelOrdersRawTx.d.ts +3 -0
- package/dist/tx/buildCancelOrdersRawTx.js +43 -0
- package/dist/tx/buildClaimRawTx.d.ts +2 -0
- package/dist/tx/buildClaimRawTx.js +19 -0
- package/dist/tx/buildClosePoolRawTx.d.ts +20 -0
- package/dist/tx/buildClosePoolRawTx.js +95 -0
- package/dist/tx/buildEnterOptionRawTx.d.ts +2 -0
- package/dist/tx/buildEnterOptionRawTx.js +25 -0
- package/dist/tx/buildMergeRawTx.d.ts +2 -0
- package/dist/tx/buildMergeRawTx.js +21 -0
- package/dist/tx/buildOpenDisputeRawTx.d.ts +8 -0
- package/dist/tx/buildOpenDisputeRawTx.js +39 -0
- package/dist/tx/buildPlaceOrderRawTx.d.ts +3 -0
- package/dist/tx/buildPlaceOrderRawTx.js +47 -0
- package/dist/tx/buildRemoveLiquidityRawTx.d.ts +2 -0
- package/dist/tx/buildRemoveLiquidityRawTx.js +23 -0
- package/dist/tx/buildSplitRawTx.d.ts +2 -0
- package/dist/tx/buildSplitRawTx.js +21 -0
- package/dist/tx/types.d.ts +117 -0
- package/dist/tx/types.js +10 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.js +1 -0
- package/dist/utils/helpers.d.ts +4 -0
- package/dist/utils/helpers.js +28 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const CreateMarketAbi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "address", "name": "target", "type": "address" }], "name": "AddressEmptyCode", "type": "error" }, { "inputs": [], "name": "BalanceMismatch", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "implementation", "type": "address" }], "name": "ERC1967InvalidImplementation", "type": "error" }, { "inputs": [], "name": "ERC1967NonPayable", "type": "error" }, { "inputs": [], "name": "FailedCall", "type": "error" }, { "inputs": [], "name": "InsufficientPoolLiquidity", "type": "error" }, { "inputs": [], "name": "InvalidAddress", "type": "error" }, { "inputs": [], "name": "InvalidBytes", "type": "error" }, { "inputs": [], "name": "InvalidInitialLiquidity", "type": "error" }, { "inputs": [], "name": "InvalidInitialization", "type": "error" }, { "inputs": [], "name": "InvalidPath", "type": "error" }, { "inputs": [], "name": "InvalidValue", "type": "error" }, { "inputs": [], "name": "LengthMismatch", "type": "error" }, { "inputs": [], "name": "NotInitializing", "type": "error" }, { "inputs": [], "name": "OnlyCreatedPool", "type": "error" }, { "inputs": [], "name": "OrderBookNotAllowedForPrivatePool", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], "name": "OwnableInvalidOwner", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], "name": "OwnableUnauthorizedAccount", "type": "error" }, { "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], "name": "SafeERC20FailedOperation", "type": "error" }, { "inputs": [], "name": "TokenNotAllowed", "type": "error" }, { "inputs": [], "name": "UUPSUnauthorizedCallContext", "type": "error" }, { "inputs": [{ "internalType": "bytes32", "name": "slot", "type": "bytes32" }], "name": "UUPSUnsupportedProxiableUUID", "type": "error" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenDecimals", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tokenName", "type": "string" }, { "indexed": false, "internalType": "string", "name": "tokenSymbol", "type": "string" }], "name": "ExistingTokenDisallowed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint64", "name": "version", "type": "uint64" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenDecimals", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tokenName", "type": "string" }, { "indexed": false, "internalType": "string", "name": "tokenSymbol", "type": "string" }], "name": "NewTokenAllowed", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "poolAddress", "type": "address" }, { "indexed": true, "internalType": "address", "name": "poolCreator", "type": "address" }, { "indexed": false, "internalType": "string", "name": "uri", "type": "string" }, { "indexed": false, "internalType": "enum Types.TradingModel", "name": "tradingModel", "type": "uint8" }], "name": "PoolCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "poolAddress", "type": "address" }, { "indexed": true, "internalType": "address", "name": "tokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenDecimals", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "tokenName", "type": "string" }, { "indexed": false, "internalType": "string", "name": "tokenSymbol", "type": "string" }], "name": "PoolTokenSet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }], "name": "Upgraded", "type": "event" }, { "inputs": [], "name": "UPGRADE_INTERFACE_VERSION", "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newTokenAddress", "type": "address" }, { "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" }], "name": "allowNewToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "baseToken", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "closingFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "numberOfOracles", "type": "uint256" }, { "internalType": "uint256", "name": "oracleReward", "type": "uint256" }, { "internalType": "uint256", "name": "fixedFee", "type": "uint256" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256", "name": "totalNumberOfOptions", "type": "uint256" }, { "internalType": "string", "name": "questionUri", "type": "string" }], "name": "createOracle", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "bool", "name": "isPublic", "type": "bool" }, { "internalType": "bool", "name": "resolverIsAI", "type": "bool" }, { "internalType": "address", "name": "poolOwner", "type": "address" }, { "internalType": "address", "name": "referrer", "type": "address" }, { "internalType": "uint256", "name": "startTime", "type": "uint256" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256", "name": "numberOfOptions", "type": "uint256" }, { "internalType": "uint256", "name": "oracleEndTime", "type": "uint256" }, { "internalType": "string", "name": "ipfsUri", "type": "string" }, { "internalType": "uint256", "name": "initialLiquidity", "type": "uint256" }, { "internalType": "uint256[]", "name": "liquidityPercentages", "type": "uint256[]" }, { "internalType": "address", "name": "poolResolver", "type": "address" }, { "internalType": "address", "name": "baseToken", "type": "address" }, { "internalType": "enum Types.TradingModel", "name": "tradingModel", "type": "uint8" }], "internalType": "struct IRainDeployer.Params", "name": "params", "type": "tuple" }], "name": "createPool", "outputs": [{ "internalType": "address", "name": "poolInstance", "type": "address" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "createdPools", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "creatorFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondCancelOrderFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondClaimFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondCutFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondDisputeFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondFactory", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondGetterFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondInfoFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondLoupeFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondOracleFeeFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondResolutionFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondSplitMergeFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "diamondTradingFacet", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }], "name": "disallowExistingToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "disputeResolverAI", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "facetFunctionSelectors", "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_oracleFactoryAddress", "type": "address" }, { "internalType": "address", "name": "_baseToken", "type": "address" }, { "internalType": "address", "name": "_platformAddress", "type": "address" }, { "internalType": "address", "name": "_resolverAI", "type": "address" }, { "internalType": "address", "name": "_disputeResolverAI", "type": "address" }, { "internalType": "address", "name": "_rainToken", "type": "address" }, { "internalType": "address", "name": "_diamondFactory", "type": "address" }, { "internalType": "uint256", "name": "_baseTokenDecimals", "type": "uint256" }, { "internalType": "uint256", "name": "_liquidityFee", "type": "uint256" }, { "internalType": "uint256", "name": "_platformFee", "type": "uint256" }, { "internalType": "uint256", "name": "_oracleFixedFee", "type": "uint256" }, { "internalType": "uint256", "name": "_creatorFee", "type": "uint256" }, { "internalType": "uint256", "name": "_resultResolverFee", "type": "uint256" }, { "internalType": "uint256", "name": "_closingFee", "type": "uint256" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "liquidityFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "oracleFactoryAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "oracleFixedFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "platformAddress", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "platformFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "proxiableUUID", "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "rainToken", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "resolverAI", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "resultResolverFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newBaseToken", "type": "address" }], "name": "setBaseToken", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newClosingFee", "type": "uint256" }], "name": "setClosingFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newCreatorFee", "type": "uint256" }], "name": "setCreatorFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondFactory", "type": "address" }], "name": "setDiamondFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDisputeResolverAI", "type": "address" }], "name": "setDisputeResolverAI", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newLiquidityFee", "type": "uint256" }], "name": "setLiquidityFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondCancelOrderFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondCancelOrderFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondClaimFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondClaimFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondCutFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondCutFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondDisputeFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondDisputeFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondGetterFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondGetterFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondInfoFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondInfoFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondLoupeFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondLoupeFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondResolutionFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondResolutionFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondTradingFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewDiamondTradingFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondOracleFeeFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewOracleFeeFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newDiamondSplitMergeFacet", "type": "address" }, { "internalType": "bytes4[]", "name": "newFacetFunctionSelectors", "type": "bytes4[]" }], "name": "setNewSplitMergeFacet", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOracleFactoryAddress", "type": "address" }], "name": "setOracleFactoryAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newOracleFixedFee", "type": "uint256" }], "name": "setOracleFixedFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newPlatformAddress", "type": "address" }], "name": "setPlatformAddress", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newPlatformFee", "type": "uint256" }], "name": "setPlatformFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newResolverAI", "type": "address" }], "name": "setResolverAI", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "newResultResolverFee", "type": "uint256" }], "name": "setResultResolverFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "tokenAddress", "type": "address" }], "name": "tokenData", "outputs": [{ "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" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "upgradeToAndCall", "outputs": [], "stateMutability": "payable", "type": "function" }];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export declare const ERC20Abi: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "address";
|
|
4
|
+
readonly name: "_owner";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
|
+
readonly internalType: "address";
|
|
8
|
+
readonly name: "_spender";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}];
|
|
11
|
+
readonly name: "allowance";
|
|
12
|
+
readonly outputs: readonly [{
|
|
13
|
+
readonly internalType: "uint256";
|
|
14
|
+
readonly name: "";
|
|
15
|
+
readonly type: "uint256";
|
|
16
|
+
}];
|
|
17
|
+
readonly stateMutability: "view";
|
|
18
|
+
readonly type: "function";
|
|
19
|
+
}, {
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly internalType: "uint256";
|
|
26
|
+
readonly name: "amount";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}];
|
|
29
|
+
readonly name: "approve";
|
|
30
|
+
readonly outputs: readonly [{
|
|
31
|
+
readonly internalType: "bool";
|
|
32
|
+
readonly name: "";
|
|
33
|
+
readonly type: "bool";
|
|
34
|
+
}];
|
|
35
|
+
readonly stateMutability: "nonpayable";
|
|
36
|
+
readonly type: "function";
|
|
37
|
+
}, {
|
|
38
|
+
readonly inputs: readonly [{
|
|
39
|
+
readonly internalType: "address";
|
|
40
|
+
readonly name: "account";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
}];
|
|
43
|
+
readonly name: "balanceOf";
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly internalType: "uint256";
|
|
46
|
+
readonly name: "";
|
|
47
|
+
readonly type: "uint256";
|
|
48
|
+
}];
|
|
49
|
+
readonly stateMutability: "view";
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
}, {
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "decimals";
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly internalType: "uint8";
|
|
56
|
+
readonly name: "";
|
|
57
|
+
readonly type: "uint8";
|
|
58
|
+
}];
|
|
59
|
+
readonly stateMutability: "view";
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
}, {
|
|
62
|
+
readonly inputs: readonly [];
|
|
63
|
+
readonly name: "symbol";
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly internalType: "string";
|
|
66
|
+
readonly name: "";
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
}];
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
readonly type: "function";
|
|
71
|
+
}, {
|
|
72
|
+
readonly inputs: readonly [{
|
|
73
|
+
readonly internalType: "address";
|
|
74
|
+
readonly name: "_recipient";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}, {
|
|
77
|
+
readonly internalType: "uint256";
|
|
78
|
+
readonly name: "_amount";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}];
|
|
81
|
+
readonly name: "transfer";
|
|
82
|
+
readonly outputs: readonly [{
|
|
83
|
+
readonly internalType: "bool";
|
|
84
|
+
readonly name: "";
|
|
85
|
+
readonly type: "bool";
|
|
86
|
+
}];
|
|
87
|
+
readonly stateMutability: "nonpayable";
|
|
88
|
+
readonly type: "function";
|
|
89
|
+
}];
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
export const ERC20Abi = [
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "address",
|
|
6
|
+
"name": "_owner",
|
|
7
|
+
"type": "address"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"internalType": "address",
|
|
11
|
+
"name": "_spender",
|
|
12
|
+
"type": "address"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"name": "allowance",
|
|
16
|
+
"outputs": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "uint256",
|
|
19
|
+
"name": "",
|
|
20
|
+
"type": "uint256"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"stateMutability": "view",
|
|
24
|
+
"type": "function"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"inputs": [
|
|
28
|
+
{
|
|
29
|
+
"internalType": "address",
|
|
30
|
+
"name": "spender",
|
|
31
|
+
"type": "address"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"internalType": "uint256",
|
|
35
|
+
"name": "amount",
|
|
36
|
+
"type": "uint256"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"name": "approve",
|
|
40
|
+
"outputs": [
|
|
41
|
+
{
|
|
42
|
+
"internalType": "bool",
|
|
43
|
+
"name": "",
|
|
44
|
+
"type": "bool"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"stateMutability": "nonpayable",
|
|
48
|
+
"type": "function"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"inputs": [
|
|
52
|
+
{
|
|
53
|
+
"internalType": "address",
|
|
54
|
+
"name": "account",
|
|
55
|
+
"type": "address"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"name": "balanceOf",
|
|
59
|
+
"outputs": [
|
|
60
|
+
{
|
|
61
|
+
"internalType": "uint256",
|
|
62
|
+
"name": "",
|
|
63
|
+
"type": "uint256"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"stateMutability": "view",
|
|
67
|
+
"type": "function"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"inputs": [],
|
|
71
|
+
"name": "decimals",
|
|
72
|
+
"outputs": [
|
|
73
|
+
{
|
|
74
|
+
"internalType": "uint8",
|
|
75
|
+
"name": "",
|
|
76
|
+
"type": "uint8"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"stateMutability": "view",
|
|
80
|
+
"type": "function"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"inputs": [],
|
|
84
|
+
"name": "symbol",
|
|
85
|
+
"outputs": [
|
|
86
|
+
{
|
|
87
|
+
"internalType": "string",
|
|
88
|
+
"name": "",
|
|
89
|
+
"type": "string"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"stateMutability": "view",
|
|
93
|
+
"type": "function"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"internalType": "address",
|
|
99
|
+
"name": "_recipient",
|
|
100
|
+
"type": "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"internalType": "uint256",
|
|
104
|
+
"name": "_amount",
|
|
105
|
+
"type": "uint256"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"name": "transfer",
|
|
109
|
+
"outputs": [
|
|
110
|
+
{
|
|
111
|
+
"internalType": "bool",
|
|
112
|
+
"name": "",
|
|
113
|
+
"type": "bool"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"stateMutability": "nonpayable",
|
|
117
|
+
"type": "function"
|
|
118
|
+
}
|
|
119
|
+
];
|