timelock-sdk 0.0.177 → 0.0.178
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{client-BiwrAgwX.d.ts → client-BClT812n.d.cts} +705 -705
- package/dist/{client-BFfw9ee6.d.cts → client-DNpVpttQ.d.ts} +686 -686
- package/dist/client.cjs +76 -63
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +79 -66
- package/dist/client.js.map +1 -1
- package/dist/package.d.cts +1 -1
- package/dist/package.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./optionsMarket-c4hgszY_.cjs";
|
|
2
|
-
import { A as useCurrentPrice, Bt as useMarketVolume, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Gt as useTimelockConfig, Ht as useMarketData, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as TimelockProvider, Vt as useMarketState, Wt as useCurrentMarket, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption } from "./client-
|
|
2
|
+
import { A as useCurrentPrice, Bt as useMarketVolume, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Gt as useTimelockConfig, Ht as useMarketData, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as TimelockProvider, Vt as useMarketState, Wt as useCurrentMarket, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption } from "./client-BClT812n.cjs";
|
|
3
3
|
export { ExerciseOptionEvent, ExtendEvent, LiquidityBlockData, MintOptionEvent, OptionData, OptionEvent, OptionPricingParams, PoolKey, PricingParams, StaticPricingParams, TimelockProvider, TokenData, UniswapPoolData, batchGetAmountsFromLiquidity, useActiveUserOptions, useActiveUserPerps, useApproval, useBurnLiquidity, useClosePerp, useClosedUserOptions, useClosedUserPerps, useCurrentMarket, useCurrentPrice, useCurrentTick, useExerciseOption, useExtendOption, useFeeRates, useGuardianGlobalState, useLens, useLiquidityBlocks, useMarketData, useMarketPriceHistory, useMarketState, useMarketVolume, useMaxPositionSize, useMintLiquidity, useMintOption, useMintPerp, useOperatorPerms, useOptionPnl, useOptionPremium, useOptionPricingParams, useOptionTimeline, usePauseGlobalTrading, usePauseMarketTrading, usePerpsOperator, usePoolData, usePriceAtSqrtPriceX96, usePriceAtTick, usePriceHistory, usePricingParams, useSetOperatorPerms, useStaticPricingParams, useTimelockConfig, useTokenBalance, useTokenData, useUpdateMarketFees, useUpdateMarketPricing, useUserOperators, useUserPerps, useVaultData, useVaultTVL };
|
package/dist/client.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "./optionsMarket-2HZ-p_dl.js";
|
|
2
|
-
import { A as useCurrentPrice, Bt as useMarketVolume, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Gt as useTimelockConfig, Ht as useMarketData, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as TimelockProvider, Vt as useMarketState, Wt as useCurrentMarket, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption } from "./client-
|
|
2
|
+
import { A as useCurrentPrice, Bt as useMarketVolume, C as useLiquidityBlocks, Ct as useMintOption, D as usePriceAtSqrtPriceX96, E as usePriceHistory, Gt as useTimelockConfig, Ht as useMarketData, M as UniswapPoolData, N as usePoolData, O as usePriceAtTick, S as LiquidityBlockData, St as useClosedUserOptions, T as useMarketPriceHistory, Ut as TimelockProvider, Vt as useMarketState, Wt as useCurrentMarket, _ as useTokenData, _t as useOptionPremium, a as OptionPricingParams, at as useActiveUserPerps, b as batchGetAmountsFromLiquidity, bt as OptionData, c as usePricingParams, ct as usePerpsOperator, d as usePauseMarketTrading, dt as ExerciseOptionEvent, f as usePauseGlobalTrading, ft as ExtendEvent, g as TokenData, gt as useExtendOption, h as useTokenBalance, ht as useOptionTimeline, i as useOptionPricingParams, it as useOperatorPerms, j as PoolKey, k as useCurrentTick, l as useUpdateMarketFees, lt as useClosePerp, m as useApproval, mt as OptionEvent, n as useUpdateMarketPricing, nt as useSetOperatorPerms, o as PricingParams, ot as useClosedUserPerps, p as useGuardianGlobalState, pt as MintOptionEvent, r as useStaticPricingParams, rt as useUserOperators, s as StaticPricingParams, st as useUserPerps, t as useLens, u as useFeeRates, ut as useMintPerp, v as useVaultTVL, vt as useOptionPnl, w as useBurnLiquidity, wt as useMaxPositionSize, x as useMintLiquidity, xt as useActiveUserOptions, y as useVaultData, yt as useExerciseOption } from "./client-DNpVpttQ.js";
|
|
3
3
|
export { ExerciseOptionEvent, ExtendEvent, LiquidityBlockData, MintOptionEvent, OptionData, OptionEvent, OptionPricingParams, PoolKey, PricingParams, StaticPricingParams, TimelockProvider, TokenData, UniswapPoolData, batchGetAmountsFromLiquidity, useActiveUserOptions, useActiveUserPerps, useApproval, useBurnLiquidity, useClosePerp, useClosedUserOptions, useClosedUserPerps, useCurrentMarket, useCurrentPrice, useCurrentTick, useExerciseOption, useExtendOption, useFeeRates, useGuardianGlobalState, useLens, useLiquidityBlocks, useMarketData, useMarketPriceHistory, useMarketState, useMarketVolume, useMaxPositionSize, useMintLiquidity, useMintOption, useMintPerp, useOperatorPerms, useOptionPnl, useOptionPremium, useOptionPricingParams, useOptionTimeline, usePauseGlobalTrading, usePauseMarketTrading, usePerpsOperator, usePoolData, usePriceAtSqrtPriceX96, usePriceAtTick, usePriceHistory, usePricingParams, useSetOperatorPerms, useStaticPricingParams, useTimelockConfig, useTokenBalance, useTokenData, useUpdateMarketFees, useUpdateMarketPricing, useUserOperators, useUserPerps, useVaultData, useVaultTVL };
|
package/dist/client.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
import { i as erc20Abi$1, n as optionsMarketAbi, r as lensAbi, t as statelessStateViewAbi } from "./statelessStateView-MGdfMvC4.js";
|
|
5
|
-
import { A as token1ToToken0, B as swappers, D as roundTick, F as getStateView, I as getTimelockLens, L as getTimelockMarket, N as getPriceHistory, O as token0ToToken1, P as getErc20, V as timelockFactories, b as getPriceAtSqrtPriceX96, f as wrapAmount, j as token1ToToken0AtTick, k as token0ToToken1AtTick, m as wrapPrice, r as EMPTY_ARRAY, t as getPayoutAtPrice, v as getAmountsFromLiquidity, x as getPriceAtTick, y as getNearestValidStrikeTick } from "./optionUtils-DV3VdMvm.js";
|
|
5
|
+
import { A as token1ToToken0, B as swappers, D as roundTick, F as getStateView, I as getTimelockLens, L as getTimelockMarket, N as getPriceHistory, O as token0ToToken1, P as getErc20, V as timelockFactories, b as getPriceAtSqrtPriceX96, f as wrapAmount, j as token1ToToken0AtTick, k as token0ToToken1AtTick, m as wrapPrice, r as EMPTY_ARRAY$1, t as getPayoutAtPrice, v as getAmountsFromLiquidity, x as getPriceAtTick, y as getNearestValidStrikeTick } from "./optionUtils-DV3VdMvm.js";
|
|
6
6
|
import { n as guardianAbi, r as singleOwnerVaultAbi, t as factoryAbi } from "./factory-y-iVl_er.js";
|
|
7
7
|
import { decodeAbiParameters, decodeEventLog, encodeAbiParameters, encodeFunctionData, erc20Abi, maxUint256, zeroAddress } from "viem";
|
|
8
8
|
import React, { createContext, useContext, useEffect, useMemo } from "react";
|
|
@@ -882,7 +882,7 @@ const useUserOptions = (userAddr, marketAddr, active = false) => {
|
|
|
882
882
|
enabled: !!userAddr && !!marketAddr && !!graphqlClient
|
|
883
883
|
});
|
|
884
884
|
return {
|
|
885
|
-
data: data || EMPTY_ARRAY,
|
|
885
|
+
data: data || EMPTY_ARRAY$1,
|
|
886
886
|
...rest
|
|
887
887
|
};
|
|
888
888
|
};
|
|
@@ -1002,7 +1002,7 @@ const useOptionTimeline = (marketAddr, optionId) => {
|
|
|
1002
1002
|
enabled: !!marketAddr && optionId !== void 0 && !!graphqlClient
|
|
1003
1003
|
});
|
|
1004
1004
|
return {
|
|
1005
|
-
data: data || EMPTY_ARRAY,
|
|
1005
|
+
data: data || EMPTY_ARRAY$1,
|
|
1006
1006
|
...rest
|
|
1007
1007
|
};
|
|
1008
1008
|
};
|
|
@@ -1080,6 +1080,66 @@ const usePerpsOperator = () => {
|
|
|
1080
1080
|
};
|
|
1081
1081
|
};
|
|
1082
1082
|
|
|
1083
|
+
//#endregion
|
|
1084
|
+
//#region src/hooks/operators/useUserOperators.ts
|
|
1085
|
+
const useUserOperators = (userAddr, marketAddr) => {
|
|
1086
|
+
const { graphqlClient } = useTimelockConfig();
|
|
1087
|
+
const { data, ...rest } = useQuery({
|
|
1088
|
+
queryKey: [
|
|
1089
|
+
"userOperators",
|
|
1090
|
+
(userAddr === null || userAddr === void 0 ? void 0 : userAddr.toLowerCase()) || "--",
|
|
1091
|
+
(marketAddr === null || marketAddr === void 0 ? void 0 : marketAddr.toLowerCase()) || "--"
|
|
1092
|
+
],
|
|
1093
|
+
queryFn: async () => {
|
|
1094
|
+
if (!userAddr || !marketAddr) return void 0;
|
|
1095
|
+
return (await graphqlClient.GetUserMarketOperators({
|
|
1096
|
+
userAddr: userAddr.toLowerCase(),
|
|
1097
|
+
marketAddr: marketAddr.toLowerCase()
|
|
1098
|
+
})).UserMarketOperator.map((operator) => ({
|
|
1099
|
+
...operator,
|
|
1100
|
+
spendingApproval: BigInt(operator.spendingApproval),
|
|
1101
|
+
operatorAddr: operator.operator.address.toLowerCase()
|
|
1102
|
+
}));
|
|
1103
|
+
},
|
|
1104
|
+
enabled: !!userAddr && !!marketAddr && !!graphqlClient
|
|
1105
|
+
});
|
|
1106
|
+
return {
|
|
1107
|
+
...rest,
|
|
1108
|
+
data: data || EMPTY_ARRAY$1
|
|
1109
|
+
};
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
//#endregion
|
|
1113
|
+
//#region src/hooks/operators/useSetOperatorPerms.ts
|
|
1114
|
+
const useSetOperatorPerms = (marketAddr) => {
|
|
1115
|
+
const queryClient = useQueryClient();
|
|
1116
|
+
const client = useClient();
|
|
1117
|
+
const { address } = useConnection();
|
|
1118
|
+
const { writeContractAsync } = useWriteContract();
|
|
1119
|
+
const setOperatorPerms = async ({ operator, canExtend, canExercise, canTransfer, canMint, spendingApproval }) => {
|
|
1120
|
+
if (!client || !address) throw new Error("Wallet not connected");
|
|
1121
|
+
if (!marketAddr) throw new Error("Market address not available");
|
|
1122
|
+
const hash = await writeContractAsync({
|
|
1123
|
+
address: marketAddr,
|
|
1124
|
+
abi: optionsMarketAbi,
|
|
1125
|
+
functionName: "setOperatorPerms",
|
|
1126
|
+
args: [
|
|
1127
|
+
operator,
|
|
1128
|
+
canExtend,
|
|
1129
|
+
canExercise,
|
|
1130
|
+
canTransfer,
|
|
1131
|
+
canMint,
|
|
1132
|
+
spendingApproval
|
|
1133
|
+
]
|
|
1134
|
+
});
|
|
1135
|
+
await waitForTransactionReceipt(client, { hash });
|
|
1136
|
+
queryClient.invalidateQueries({ queryKey: ["userOperators"] });
|
|
1137
|
+
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1138
|
+
return hash;
|
|
1139
|
+
};
|
|
1140
|
+
return useMutation({ mutationFn: setOperatorPerms });
|
|
1141
|
+
};
|
|
1142
|
+
|
|
1083
1143
|
//#endregion
|
|
1084
1144
|
//#region src/hooks/perps/useMintPerp.ts
|
|
1085
1145
|
const useMintPerp = (marketAddr) => {
|
|
@@ -1088,9 +1148,13 @@ const useMintPerp = (marketAddr) => {
|
|
|
1088
1148
|
const { address } = useConnection();
|
|
1089
1149
|
const { operator, address: operatorAddr, signMessage: { mutateAsync: signMessage } } = usePerpsOperator();
|
|
1090
1150
|
const { askForApproval } = useApproval();
|
|
1151
|
+
const { data: operators } = useUserOperators(address, marketAddr);
|
|
1152
|
+
const { mutateAsync: setOperatorPerms } = useSetOperatorPerms(marketAddr);
|
|
1091
1153
|
const { poolManager, poolKey, optionAssetIsToken0, payoutAsset } = useMarketData(marketAddr);
|
|
1092
1154
|
const { tickSpacing } = usePoolData(poolManager, poolKey);
|
|
1093
1155
|
const { refetch: refetchCurrentTick } = useCurrentTick(poolManager, poolKey);
|
|
1156
|
+
const userPerms = operatorAddr ? operators.find((o) => o.operatorAddr.toLowerCase() === operatorAddr.toLowerCase()) : void 0;
|
|
1157
|
+
const hasEnoughPerms = userPerms && userPerms.canMint && userPerms.canExtend && userPerms.canExercise;
|
|
1094
1158
|
const mintPerp = async (data) => {
|
|
1095
1159
|
const { optionType, amount, duration, strikeTick } = data;
|
|
1096
1160
|
if (!client || !address) throw new Error("Wallet not connected");
|
|
@@ -1110,7 +1174,16 @@ const useMintPerp = (marketAddr) => {
|
|
|
1110
1174
|
duration,
|
|
1111
1175
|
0
|
|
1112
1176
|
]);
|
|
1113
|
-
|
|
1177
|
+
const maxPremium = (premium + protocolFee) * 11n / 10n;
|
|
1178
|
+
if (!hasEnoughPerms) await setOperatorPerms({
|
|
1179
|
+
operator: operatorAddr,
|
|
1180
|
+
canMint: true,
|
|
1181
|
+
canExtend: true,
|
|
1182
|
+
canExercise: true,
|
|
1183
|
+
canTransfer: (userPerms === null || userPerms === void 0 ? void 0 : userPerms.canTransfer) || false,
|
|
1184
|
+
spendingApproval: maxPremium
|
|
1185
|
+
});
|
|
1186
|
+
await askForApproval(payoutAsset, marketAddr, maxPremium);
|
|
1114
1187
|
await operator.mintPerp({
|
|
1115
1188
|
marketAddr,
|
|
1116
1189
|
amount,
|
|
@@ -1144,7 +1217,7 @@ const useClosePerp = () => {
|
|
|
1144
1217
|
|
|
1145
1218
|
//#endregion
|
|
1146
1219
|
//#region src/hooks/perps/useUserPerps.ts
|
|
1147
|
-
const EMPTY_ARRAY
|
|
1220
|
+
const EMPTY_ARRAY = [];
|
|
1148
1221
|
const useUserPerps = (marketAddr, userAddr, type) => {
|
|
1149
1222
|
const { operator } = usePerpsOperator();
|
|
1150
1223
|
userAddr = userAddr === null || userAddr === void 0 ? void 0 : userAddr.toLowerCase();
|
|
@@ -1162,7 +1235,7 @@ const useUserPerps = (marketAddr, userAddr, type) => {
|
|
|
1162
1235
|
refetchInterval: 1e4
|
|
1163
1236
|
});
|
|
1164
1237
|
return {
|
|
1165
|
-
data: data || EMPTY_ARRAY
|
|
1238
|
+
data: data || EMPTY_ARRAY,
|
|
1166
1239
|
...rest
|
|
1167
1240
|
};
|
|
1168
1241
|
};
|
|
@@ -1243,66 +1316,6 @@ const useOperatorPerms = (marketAddr, userAddr, operatorAddr) => {
|
|
|
1243
1316
|
};
|
|
1244
1317
|
};
|
|
1245
1318
|
|
|
1246
|
-
//#endregion
|
|
1247
|
-
//#region src/hooks/operators/useUserOperators.ts
|
|
1248
|
-
const useUserOperators = (userAddr, marketAddr) => {
|
|
1249
|
-
const { graphqlClient } = useTimelockConfig();
|
|
1250
|
-
const { data, ...rest } = useQuery({
|
|
1251
|
-
queryKey: [
|
|
1252
|
-
"userOperators",
|
|
1253
|
-
(userAddr === null || userAddr === void 0 ? void 0 : userAddr.toLowerCase()) || "--",
|
|
1254
|
-
(marketAddr === null || marketAddr === void 0 ? void 0 : marketAddr.toLowerCase()) || "--"
|
|
1255
|
-
],
|
|
1256
|
-
queryFn: async () => {
|
|
1257
|
-
if (!userAddr || !marketAddr) return void 0;
|
|
1258
|
-
return (await graphqlClient.GetUserMarketOperators({
|
|
1259
|
-
userAddr: userAddr.toLowerCase(),
|
|
1260
|
-
marketAddr: marketAddr.toLowerCase()
|
|
1261
|
-
})).UserMarketOperator.map((operator) => ({
|
|
1262
|
-
...operator,
|
|
1263
|
-
spendingApproval: BigInt(operator.spendingApproval),
|
|
1264
|
-
operatorAddr: operator.operator.address.toLowerCase()
|
|
1265
|
-
}));
|
|
1266
|
-
},
|
|
1267
|
-
enabled: !!userAddr && !!marketAddr && !!graphqlClient
|
|
1268
|
-
});
|
|
1269
|
-
return {
|
|
1270
|
-
...rest,
|
|
1271
|
-
data: data || EMPTY_ARRAY
|
|
1272
|
-
};
|
|
1273
|
-
};
|
|
1274
|
-
|
|
1275
|
-
//#endregion
|
|
1276
|
-
//#region src/hooks/operators/useSetOperatorPerms.ts
|
|
1277
|
-
const useSetOperatorPerms = (marketAddr) => {
|
|
1278
|
-
const queryClient = useQueryClient();
|
|
1279
|
-
const client = useClient();
|
|
1280
|
-
const { address } = useConnection();
|
|
1281
|
-
const { writeContractAsync } = useWriteContract();
|
|
1282
|
-
const setOperatorPerms = async ({ operator, canExtend, canExercise, canTransfer, canMint, spendingApproval }) => {
|
|
1283
|
-
if (!client || !address) throw new Error("Wallet not connected");
|
|
1284
|
-
if (!marketAddr) throw new Error("Market address not available");
|
|
1285
|
-
const hash = await writeContractAsync({
|
|
1286
|
-
address: marketAddr,
|
|
1287
|
-
abi: optionsMarketAbi,
|
|
1288
|
-
functionName: "setOperatorPerms",
|
|
1289
|
-
args: [
|
|
1290
|
-
operator,
|
|
1291
|
-
canExtend,
|
|
1292
|
-
canExercise,
|
|
1293
|
-
canTransfer,
|
|
1294
|
-
canMint,
|
|
1295
|
-
spendingApproval
|
|
1296
|
-
]
|
|
1297
|
-
});
|
|
1298
|
-
await waitForTransactionReceipt(client, { hash });
|
|
1299
|
-
queryClient.invalidateQueries({ queryKey: ["userOperators"] });
|
|
1300
|
-
queryClient.invalidateQueries({ queryKey: ["readContract"] });
|
|
1301
|
-
return hash;
|
|
1302
|
-
};
|
|
1303
|
-
return useMutation({ mutationFn: setOperatorPerms });
|
|
1304
|
-
};
|
|
1305
|
-
|
|
1306
1319
|
//#endregion
|
|
1307
1320
|
//#region src/hooks/pool/usePriceHistory.ts
|
|
1308
1321
|
const usePriceHistory = (pool, token, resolution, startTimestamp, endTimestamp) => {
|