timelock-sdk 0.0.160 → 0.0.162
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/abis.cjs +1 -1
- package/dist/abis.d.cts +1 -1
- package/dist/abis.d.ts +1 -1
- package/dist/abis.js +1 -1
- package/dist/{client-DmXuKRhM.d.cts → client-BFhMekeP.d.ts} +4146 -511
- package/dist/{client-Dx6YoDji.d.ts → client-BVPR3obW.d.cts} +4733 -1098
- package/dist/client.cjs +15 -38
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/client.js +15 -38
- package/dist/client.js.map +1 -1
- package/dist/{optionUtils-B-TKN7Ni.cjs → optionUtils-R9Y-jxoz.cjs} +4 -4
- package/dist/{optionUtils-B-TKN7Ni.cjs.map → optionUtils-R9Y-jxoz.cjs.map} +1 -1
- package/dist/{optionUtils-CL-MSoFS.js → optionUtils-fCYueZl2.js} +4 -4
- package/dist/{optionUtils-CL-MSoFS.js.map → optionUtils-fCYueZl2.js.map} +1 -1
- package/dist/{optionsMarket-BbXpQnpV.js → optionsMarket-CWigPja1.js} +20 -1
- package/dist/optionsMarket-CWigPja1.js.map +1 -0
- package/dist/{optionsMarket-DtjLm46g.cjs → optionsMarket-CtlBxuj0.cjs} +20 -1
- package/dist/optionsMarket-CtlBxuj0.cjs.map +1 -0
- package/dist/package.cjs +2 -2
- package/dist/package.d.cts +2 -2
- package/dist/package.d.ts +2 -2
- package/dist/package.js +2 -2
- package/dist/{uniswapMathLens-Ds8UmCMU.d.ts → uniswapMathLens-B6gp2UGI.d.cts} +19 -1
- package/dist/{uniswapMathLens-BoQxBJoY.d.cts → uniswapMathLens-oe-gukfo.d.ts} +19 -1
- package/package.json +1 -1
- package/dist/optionsMarket-BbXpQnpV.js.map +0 -1
- package/dist/optionsMarket-DtjLm46g.cjs.map +0 -1
package/dist/client.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
const require_optionUtils = require('./optionUtils-
|
|
5
|
-
const require_optionsMarket = require('./optionsMarket-
|
|
4
|
+
const require_optionUtils = require('./optionUtils-R9Y-jxoz.cjs');
|
|
5
|
+
const require_optionsMarket = require('./optionsMarket-CtlBxuj0.cjs');
|
|
6
6
|
const require_singleOwnerVault = require('./singleOwnerVault-GCpQV7pN.cjs');
|
|
7
7
|
let viem = require("viem");
|
|
8
8
|
let react = require("react");
|
|
@@ -2522,33 +2522,17 @@ const useUpdateMarketFees = (marketAddr) => {
|
|
|
2522
2522
|
//#endregion
|
|
2523
2523
|
//#region src/hooks/pricing/useMarketPricing.ts
|
|
2524
2524
|
const useMarketPricing = (marketAddr) => {
|
|
2525
|
+
const { timelockLens } = useLens();
|
|
2525
2526
|
const { data: { optionPricing } } = useMarketState(marketAddr);
|
|
2526
2527
|
return (0, wagmi.useReadContract)({
|
|
2527
|
-
address:
|
|
2528
|
-
abi:
|
|
2529
|
-
|
|
2530
|
-
name: "readState",
|
|
2531
|
-
outputs: [{
|
|
2532
|
-
name: "",
|
|
2533
|
-
type: "bytes"
|
|
2534
|
-
}],
|
|
2535
|
-
stateMutability: "view",
|
|
2536
|
-
type: "function"
|
|
2537
|
-
}],
|
|
2538
|
-
functionName: "readState",
|
|
2528
|
+
address: timelockLens === null || timelockLens === void 0 ? void 0 : timelockLens.address,
|
|
2529
|
+
abi: require_optionsMarket.lensAbi,
|
|
2530
|
+
functionName: "getPricingParams",
|
|
2539
2531
|
query: {
|
|
2540
2532
|
enabled: !!optionPricing,
|
|
2541
|
-
select: (rawData) => {
|
|
2542
|
-
const [pricingModel] = (0, viem.decodeAbiParameters)([{
|
|
2543
|
-
name: "model",
|
|
2544
|
-
type: "uint8"
|
|
2545
|
-
}], rawData);
|
|
2533
|
+
select: ([pricingModel, rawData]) => {
|
|
2546
2534
|
if (pricingModel === 0) {
|
|
2547
|
-
const [
|
|
2548
|
-
{
|
|
2549
|
-
name: "pricingModel",
|
|
2550
|
-
type: "uint8"
|
|
2551
|
-
},
|
|
2535
|
+
const [logicContract, iv, riskFreeRate, minPremiumDailyRate, minPremiumAmount] = (0, viem.decodeAbiParameters)([
|
|
2552
2536
|
{
|
|
2553
2537
|
name: "logicContract",
|
|
2554
2538
|
type: "address"
|
|
@@ -2579,20 +2563,13 @@ const useMarketPricing = (marketAddr) => {
|
|
|
2579
2563
|
minPremiumAmount
|
|
2580
2564
|
};
|
|
2581
2565
|
} else if (pricingModel === 1) {
|
|
2582
|
-
const [
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
type: "uint32"
|
|
2590
|
-
},
|
|
2591
|
-
{
|
|
2592
|
-
name: "minFundingAmount",
|
|
2593
|
-
type: "uint128"
|
|
2594
|
-
}
|
|
2595
|
-
], rawData);
|
|
2566
|
+
const [dailyFundingRate, minFundingAmount] = (0, viem.decodeAbiParameters)([{
|
|
2567
|
+
name: "dailyFundingRate",
|
|
2568
|
+
type: "uint32"
|
|
2569
|
+
}, {
|
|
2570
|
+
name: "minFundingAmount",
|
|
2571
|
+
type: "uint128"
|
|
2572
|
+
}], rawData);
|
|
2596
2573
|
return {
|
|
2597
2574
|
model: "static",
|
|
2598
2575
|
dailyFundingRate,
|