@gearbox-protocol/sdk 3.0.0-vfour.386 → 3.0.0-vfour.388
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/cjs/sdk/market/credit/CreditSuite.js +6 -5
- package/dist/cjs/sdk/plugins/V300StalenessPeriodPlugin.js +13 -6
- package/dist/esm/sdk/market/credit/CreditSuite.js +6 -5
- package/dist/esm/sdk/plugins/V300StalenessPeriodPlugin.js +13 -6
- package/dist/types/sdk/base/types.d.ts +10 -10
- package/dist/types/sdk/market/credit/CreditConfiguratorV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditConfiguratorV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditFacadeV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditManagerV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditManagerV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/credit/CreditSuite.d.ts +3 -1
- package/dist/types/sdk/market/credit/createCreditConfigurator.d.ts +2 -2
- package/dist/types/sdk/market/credit/createCreditFacade.d.ts +2 -2
- package/dist/types/sdk/market/credit/createCreditManager.d.ts +2 -2
- package/dist/types/sdk/market/pool/GaugeContract.d.ts +2 -2
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/pool/PoolV300Contract.d.ts +3 -3
- package/dist/types/sdk/market/pool/PoolV310Contract.d.ts +3 -3
- package/dist/types/sdk/market/pool/TumblerContract.d.ts +2 -2
- package/dist/types/sdk/market/pool/createPool.d.ts +2 -2
- package/dist/types/sdk/market/pool/createPoolQuotaKeeper.d.ts +2 -2
- package/dist/types/sdk/market/pool/createRateKeeper.d.ts +2 -2
- package/package.json +1 -1
|
@@ -42,17 +42,18 @@ class CreditSuite extends import_base.SDKConstruct {
|
|
|
42
42
|
creditManager;
|
|
43
43
|
creditFacade;
|
|
44
44
|
creditConfigurator;
|
|
45
|
+
state;
|
|
45
46
|
constructor(sdk, marketData, index) {
|
|
46
47
|
super(sdk);
|
|
47
48
|
const { creditManagers, pool } = marketData;
|
|
48
|
-
|
|
49
|
-
const { name } =
|
|
49
|
+
this.state = creditManagers[index];
|
|
50
|
+
const { name } = this.state.creditManager;
|
|
50
51
|
this.name = name;
|
|
51
52
|
this.pool = pool.baseParams.addr;
|
|
52
53
|
this.underlying = pool.underlying;
|
|
53
|
-
this.creditManager = (0, import_createCreditManager.default)(sdk,
|
|
54
|
-
this.creditFacade = (0, import_createCreditFacade.default)(sdk,
|
|
55
|
-
this.creditConfigurator = (0, import_createCreditConfigurator.default)(sdk,
|
|
54
|
+
this.creditManager = (0, import_createCreditManager.default)(sdk, this.state);
|
|
55
|
+
this.creditFacade = (0, import_createCreditFacade.default)(sdk, this.state);
|
|
56
|
+
this.creditConfigurator = (0, import_createCreditConfigurator.default)(sdk, this.state);
|
|
56
57
|
}
|
|
57
58
|
async tvl() {
|
|
58
59
|
const tvl = 0n;
|
|
@@ -51,10 +51,16 @@ class V300StalenessPeriodPlugin extends import_base.SDKConstruct {
|
|
|
51
51
|
}
|
|
52
52
|
const events = await this.client.getLogs({
|
|
53
53
|
address: addresses,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
events: [
|
|
55
|
+
(0, import_viem.getAbiItem)({
|
|
56
|
+
abi: import_v300.iPriceOracleV300Abi,
|
|
57
|
+
name: "SetReservePriceFeed"
|
|
58
|
+
}),
|
|
59
|
+
(0, import_viem.getAbiItem)({
|
|
60
|
+
abi: import_v300.iPriceOracleV300Abi,
|
|
61
|
+
name: "SetPriceFeed"
|
|
62
|
+
})
|
|
63
|
+
],
|
|
58
64
|
fromBlock,
|
|
59
65
|
toBlock,
|
|
60
66
|
strict: true
|
|
@@ -68,9 +74,10 @@ class V300StalenessPeriodPlugin extends import_base.SDKConstruct {
|
|
|
68
74
|
const token = (0, import_viem.getAddress)(e.args.token);
|
|
69
75
|
const stalenessPeriod = e.args.stalenessPeriod;
|
|
70
76
|
for (const o of oracles) {
|
|
71
|
-
const
|
|
77
|
+
const map = e.eventName === "SetReservePriceFeed" ? o.reservePriceFeeds : o.mainPriceFeeds;
|
|
78
|
+
const pf = map.get(token);
|
|
72
79
|
if ((0, import_utils.hexEq)(pf?.address, priceFeed) && (0, import_utils.hexEq)(o.address, oracle)) {
|
|
73
|
-
|
|
80
|
+
map.upsert(
|
|
74
81
|
token,
|
|
75
82
|
new import_market.PriceFeedRef(this.sdk, priceFeed, stalenessPeriod)
|
|
76
83
|
);
|
|
@@ -9,17 +9,18 @@ class CreditSuite extends SDKConstruct {
|
|
|
9
9
|
creditManager;
|
|
10
10
|
creditFacade;
|
|
11
11
|
creditConfigurator;
|
|
12
|
+
state;
|
|
12
13
|
constructor(sdk, marketData, index) {
|
|
13
14
|
super(sdk);
|
|
14
15
|
const { creditManagers, pool } = marketData;
|
|
15
|
-
|
|
16
|
-
const { name } =
|
|
16
|
+
this.state = creditManagers[index];
|
|
17
|
+
const { name } = this.state.creditManager;
|
|
17
18
|
this.name = name;
|
|
18
19
|
this.pool = pool.baseParams.addr;
|
|
19
20
|
this.underlying = pool.underlying;
|
|
20
|
-
this.creditManager = createCreditManager(sdk,
|
|
21
|
-
this.creditFacade = createCreditFacade(sdk,
|
|
22
|
-
this.creditConfigurator = createCreditConfigurator(sdk,
|
|
21
|
+
this.creditManager = createCreditManager(sdk, this.state);
|
|
22
|
+
this.creditFacade = createCreditFacade(sdk, this.state);
|
|
23
|
+
this.creditConfigurator = createCreditConfigurator(sdk, this.state);
|
|
23
24
|
}
|
|
24
25
|
async tvl() {
|
|
25
26
|
const tvl = 0n;
|
|
@@ -28,10 +28,16 @@ class V300StalenessPeriodPlugin extends SDKConstruct {
|
|
|
28
28
|
}
|
|
29
29
|
const events = await this.client.getLogs({
|
|
30
30
|
address: addresses,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
events: [
|
|
32
|
+
getAbiItem({
|
|
33
|
+
abi: iPriceOracleV300Abi,
|
|
34
|
+
name: "SetReservePriceFeed"
|
|
35
|
+
}),
|
|
36
|
+
getAbiItem({
|
|
37
|
+
abi: iPriceOracleV300Abi,
|
|
38
|
+
name: "SetPriceFeed"
|
|
39
|
+
})
|
|
40
|
+
],
|
|
35
41
|
fromBlock,
|
|
36
42
|
toBlock,
|
|
37
43
|
strict: true
|
|
@@ -45,9 +51,10 @@ class V300StalenessPeriodPlugin extends SDKConstruct {
|
|
|
45
51
|
const token = getAddress(e.args.token);
|
|
46
52
|
const stalenessPeriod = e.args.stalenessPeriod;
|
|
47
53
|
for (const o of oracles) {
|
|
48
|
-
const
|
|
54
|
+
const map = e.eventName === "SetReservePriceFeed" ? o.reservePriceFeeds : o.mainPriceFeeds;
|
|
55
|
+
const pf = map.get(token);
|
|
49
56
|
if (hexEq(pf?.address, priceFeed) && hexEq(o.address, oracle)) {
|
|
50
|
-
|
|
57
|
+
map.upsert(
|
|
51
58
|
token,
|
|
52
59
|
new PriceFeedRef(this.sdk, priceFeed, stalenessPeriod)
|
|
53
60
|
);
|
|
@@ -17,21 +17,21 @@ export type RewardInfo = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunctio
|
|
|
17
17
|
export type MarketData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iMarketCompressorAbi, "getMarkets">["outputs"]>>;
|
|
18
18
|
export type GaugeData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iGaugeCompressorAbi, "getGauge">["outputs"]>>;
|
|
19
19
|
export type ConnectedBotData = Unarray<AbiParametersToPrimitiveTypes<ExtractAbiFunction<typeof iPeripheryCompressorAbi, "getConnectedBots">["outputs"]>>;
|
|
20
|
-
export type
|
|
21
|
-
export type CreditManagerState =
|
|
22
|
-
export type CreditFacadeState =
|
|
23
|
-
export type CreditConfiguratorState =
|
|
24
|
-
export type AdapterData = Unarray<
|
|
20
|
+
export type CreditSuiteState = Unarray<MarketData["creditManagers"]>;
|
|
21
|
+
export type CreditManagerState = CreditSuiteState["creditManager"];
|
|
22
|
+
export type CreditFacadeState = CreditSuiteState["creditFacade"];
|
|
23
|
+
export type CreditConfiguratorState = CreditSuiteState["creditConfigurator"];
|
|
24
|
+
export type AdapterData = Unarray<CreditSuiteState["adapters"]>;
|
|
25
25
|
export type TokenMetaData = Unarray<MarketData["tokens"]>;
|
|
26
|
-
export type
|
|
27
|
-
export type
|
|
28
|
-
export type QuotaState = Unarray<
|
|
29
|
-
export type
|
|
26
|
+
export type PoolState = MarketData["pool"];
|
|
27
|
+
export type PoolQuotaKeeperState = MarketData["poolQuotaKeeper"];
|
|
28
|
+
export type QuotaState = Unarray<PoolQuotaKeeperState["quotas"]>;
|
|
29
|
+
export type RateKeeperState = MarketData["rateKeeper"];
|
|
30
30
|
export type PriceOracleData = MarketData["priceOracleData"];
|
|
31
31
|
export type PriceFeedMapEntry = Unarray<PriceOracleData["priceFeedMapping"]>;
|
|
32
32
|
export type PriceFeedTreeNode = Unarray<PriceOracleData["priceFeedStructure"]>;
|
|
33
33
|
export type PriceFeedAnswer = PriceFeedTreeNode["answer"];
|
|
34
|
-
export type CreditManagerDebtParams = Unarray<
|
|
34
|
+
export type CreditManagerDebtParams = Unarray<PoolState["creditManagerDebtParams"]>;
|
|
35
35
|
export declare enum VotingContractStatus {
|
|
36
36
|
NOT_ALLOWED = 0,
|
|
37
37
|
ALLOWED = 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, GetEventArgs, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { ICreditConfiguratorContract } from "./types.js";
|
|
@@ -640,7 +640,7 @@ export type RampEvent = GetEventArgs<abi, "ScheduleTokenLiquidationThresholdRamp
|
|
|
640
640
|
export declare class CreditConfiguratorV300Contract extends BaseContract<abi> implements ICreditConfiguratorContract {
|
|
641
641
|
readonly adapters: Address[];
|
|
642
642
|
isPaused: boolean;
|
|
643
|
-
constructor(sdk: GearboxSDK, { creditConfigurator, creditManager }:
|
|
643
|
+
constructor(sdk: GearboxSDK, { creditConfigurator, creditManager }: CreditSuiteState);
|
|
644
644
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
645
645
|
checkRamps(): Promise<RampEvent[]>;
|
|
646
646
|
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { RampEvent } from "./CreditConfiguratorV300Contract.js";
|
|
@@ -486,7 +486,7 @@ type abi = typeof abi;
|
|
|
486
486
|
export declare class CreditConfiguratorV310Contract extends BaseContract<abi> implements ICreditConfiguratorContract {
|
|
487
487
|
readonly adapters: Address[];
|
|
488
488
|
isPaused: boolean;
|
|
489
|
-
constructor(sdk: GearboxSDK, { creditConfigurator, creditManager }:
|
|
489
|
+
constructor(sdk: GearboxSDK, { creditConfigurator, creditManager }: CreditSuiteState);
|
|
490
490
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
491
491
|
checkRamps(): Promise<RampEvent[]>;
|
|
492
492
|
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditFacadeState,
|
|
2
|
+
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { CreditFacadeStateHuman, MultiCall, RawTx } from "../../types/index.js";
|
|
@@ -778,7 +778,7 @@ export interface CreditFacadeV300Contract extends Omit<CreditFacadeState, "baseP
|
|
|
778
778
|
}
|
|
779
779
|
export declare class CreditFacadeV300Contract extends BaseContract<abi> {
|
|
780
780
|
readonly underlying: Address;
|
|
781
|
-
constructor(sdk: GearboxSDK, { creditFacade, creditManager }:
|
|
781
|
+
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
782
782
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
783
783
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
784
784
|
encodeOnDemandPriceUpdates(updates: OnDemandPriceUpdate[]): MultiCall[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Address, ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditFacadeState,
|
|
2
|
+
import type { CreditFacadeState, CreditSuiteState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { CreditFacadeStateHuman, MultiCall, RawTx } from "../../types/index.js";
|
|
@@ -851,7 +851,7 @@ export interface CreditFacadeV310Contract extends Omit<CreditFacadeState, "baseP
|
|
|
851
851
|
}
|
|
852
852
|
export declare class CreditFacadeV310Contract extends BaseContract<abi> {
|
|
853
853
|
readonly underlying: Address;
|
|
854
|
-
constructor(sdk: GearboxSDK, { creditFacade, creditManager }:
|
|
854
|
+
constructor(sdk: GearboxSDK, { creditFacade, creditManager }: CreditSuiteState);
|
|
855
855
|
stateHuman(raw?: boolean): CreditFacadeStateHuman;
|
|
856
856
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
857
857
|
encodeOnDemandPriceUpdates(updates: OnDemandPriceUpdate[]): MultiCall[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address, ContractEventName, Log } from "viem";
|
|
2
2
|
import { iCreditManagerV300Abi } from "../../../abi/v300.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { CreditManagerState, CreditSuiteState } from "../../base/index.js";
|
|
4
4
|
import { BaseContract } from "../../base/index.js";
|
|
5
5
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
6
6
|
import type { CreditManagerStateHuman } from "../../types/index.js";
|
|
@@ -1035,7 +1035,7 @@ export declare class CreditManagerV300Contract extends BaseContract<abi> impleme
|
|
|
1035
1035
|
* Mapping token address => liquidation threshold
|
|
1036
1036
|
*/
|
|
1037
1037
|
readonly liquidationThresholds: AddressMap<number>;
|
|
1038
|
-
constructor(sdk: GearboxSDK, { creditManager, adapters }:
|
|
1038
|
+
constructor(sdk: GearboxSDK, { creditManager, adapters }: CreditSuiteState);
|
|
1039
1039
|
stateHuman(raw?: boolean): CreditManagerStateHuman;
|
|
1040
1040
|
get collateralTokens(): Address[];
|
|
1041
1041
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Address, ContractEventName, Log } from "viem";
|
|
2
2
|
import { iCreditManagerV310Abi } from "../../../abi/v310.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { CreditManagerState, CreditSuiteState } from "../../base/index.js";
|
|
4
4
|
import { BaseContract } from "../../base/index.js";
|
|
5
5
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
6
6
|
import type { CreditManagerStateHuman } from "../../types/index.js";
|
|
@@ -992,7 +992,7 @@ export declare class CreditManagerV310Contract extends BaseContract<abi> impleme
|
|
|
992
992
|
* Mapping token address => liquidation threshold
|
|
993
993
|
*/
|
|
994
994
|
readonly liquidationThresholds: AddressMap<number>;
|
|
995
|
-
constructor(sdk: GearboxSDK, { creditManager, adapters }:
|
|
995
|
+
constructor(sdk: GearboxSDK, { creditManager, adapters }: CreditSuiteState);
|
|
996
996
|
stateHuman(raw?: boolean): CreditManagerStateHuman;
|
|
997
997
|
get collateralTokens(): Address[];
|
|
998
998
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import {
|
|
2
|
+
import type { CreditSuiteState, MarketData } from "../../base/index.js";
|
|
3
|
+
import { SDKConstruct } from "../../base/index.js";
|
|
3
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
4
5
|
import type { CreditSuiteStateHuman, TVL } from "../../types/index.js";
|
|
5
6
|
import type { CreditFacadeContract, ICreditConfiguratorContract, ICreditManagerContract } from "./types.js";
|
|
@@ -10,6 +11,7 @@ export declare class CreditSuite extends SDKConstruct {
|
|
|
10
11
|
readonly creditManager: ICreditManagerContract;
|
|
11
12
|
readonly creditFacade: CreditFacadeContract;
|
|
12
13
|
readonly creditConfigurator: ICreditConfiguratorContract;
|
|
14
|
+
readonly state: CreditSuiteState;
|
|
13
15
|
constructor(sdk: GearboxSDK, marketData: MarketData, index: number);
|
|
14
16
|
tvl(): Promise<TVL>;
|
|
15
17
|
get dirty(): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreditSuiteState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { ICreditConfiguratorContract } from "./types.js";
|
|
4
|
-
export default function createCreditConfigurator(sdk: GearboxSDK, data:
|
|
4
|
+
export default function createCreditConfigurator(sdk: GearboxSDK, data: CreditSuiteState): ICreditConfiguratorContract;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreditSuiteState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { CreditFacadeContract } from "./types.js";
|
|
4
|
-
export default function createCreditFacade(sdk: GearboxSDK, data:
|
|
4
|
+
export default function createCreditFacade(sdk: GearboxSDK, data: CreditSuiteState): CreditFacadeContract;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreditSuiteState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { ICreditManagerContract } from "./types.js";
|
|
4
|
-
export default function createCreditManager(sdk: GearboxSDK, data:
|
|
4
|
+
export default function createCreditManager(sdk: GearboxSDK, data: CreditSuiteState): ICreditManagerContract;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { GaugeStateHuman } from "../../types/index.js";
|
|
@@ -353,7 +353,7 @@ export declare class GaugeContract extends BaseContract<abi> implements IRateKee
|
|
|
353
353
|
readonly epochFrozen: boolean;
|
|
354
354
|
readonly epochLastUpdate: number;
|
|
355
355
|
readonly rates: AddressMap<number>;
|
|
356
|
-
constructor(sdk: GearboxSDK, pool:
|
|
356
|
+
constructor(sdk: GearboxSDK, pool: PoolState, gauge: RateKeeperState);
|
|
357
357
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
358
358
|
stateHuman(raw?: boolean): GaugeStateHuman;
|
|
359
359
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract,
|
|
2
|
+
import type { IBaseContract, PoolQuotaKeeperState, PoolState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
@@ -442,7 +442,7 @@ type abi = typeof abi;
|
|
|
442
442
|
export declare class PoolQuotaKeeperV300Contract extends BaseContract<abi> implements IBaseContract {
|
|
443
443
|
readonly decimals: number;
|
|
444
444
|
readonly quotas: AddressMap<QuotaState>;
|
|
445
|
-
constructor(sdk: GearboxSDK, pool:
|
|
445
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState);
|
|
446
446
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
447
447
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
448
448
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract,
|
|
2
|
+
import type { IBaseContract, PoolQuotaKeeperState, PoolState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
@@ -472,7 +472,7 @@ type abi = typeof abi;
|
|
|
472
472
|
export declare class PoolQuotaKeeperV310Contract extends BaseContract<abi> implements IBaseContract {
|
|
473
473
|
readonly decimals: number;
|
|
474
474
|
readonly quotas: AddressMap<QuotaState>;
|
|
475
|
-
constructor(sdk: GearboxSDK, pool:
|
|
475
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState);
|
|
476
476
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
477
477
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
478
478
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditManagerDebtParams,
|
|
2
|
+
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
@@ -1096,11 +1096,11 @@ declare const abi: readonly [{
|
|
|
1096
1096
|
readonly anonymous: false;
|
|
1097
1097
|
}];
|
|
1098
1098
|
type abi = typeof abi;
|
|
1099
|
-
export interface PoolV300Contract extends Omit<
|
|
1099
|
+
export interface PoolV300Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1100
1100
|
}
|
|
1101
1101
|
export declare class PoolV300Contract extends BaseContract<abi> {
|
|
1102
1102
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1103
|
-
constructor(sdk: GearboxSDK, data:
|
|
1103
|
+
constructor(sdk: GearboxSDK, data: PoolState);
|
|
1104
1104
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1105
1105
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1106
1106
|
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, DecodeFunctionDataReturnType, Log } from "viem";
|
|
2
|
-
import type { CreditManagerDebtParams,
|
|
2
|
+
import type { CreditManagerDebtParams, PoolState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolStateHuman } from "../../types/index.js";
|
|
@@ -1128,11 +1128,11 @@ declare const abi: readonly [{
|
|
|
1128
1128
|
readonly anonymous: false;
|
|
1129
1129
|
}];
|
|
1130
1130
|
type abi = typeof abi;
|
|
1131
|
-
export interface PoolV310Contract extends Omit<
|
|
1131
|
+
export interface PoolV310Contract extends Omit<PoolState, "baseParams" | "creditManagerDebtParams">, BaseContract<abi> {
|
|
1132
1132
|
}
|
|
1133
1133
|
export declare class PoolV310Contract extends BaseContract<abi> {
|
|
1134
1134
|
readonly creditManagerDebtParams: AddressMap<CreditManagerDebtParams>;
|
|
1135
|
-
constructor(sdk: GearboxSDK, data:
|
|
1135
|
+
constructor(sdk: GearboxSDK, data: PoolState);
|
|
1136
1136
|
stateHuman(raw?: boolean): PoolStateHuman;
|
|
1137
1137
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
1138
1138
|
protected parseFunctionParams(params: DecodeFunctionDataReturnType<abi>): Array<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type {
|
|
2
|
+
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { TumblerStateHuman } from "../../types/index.js";
|
|
@@ -183,7 +183,7 @@ type abi = typeof abi;
|
|
|
183
183
|
export declare class TumblerContract extends BaseContract<abi> implements IRateKeeperContract {
|
|
184
184
|
readonly epochLength: bigint;
|
|
185
185
|
readonly rates: AddressMap<number>;
|
|
186
|
-
constructor(sdk: GearboxSDK, pool:
|
|
186
|
+
constructor(sdk: GearboxSDK, pool: PoolState, tumbler: RateKeeperState);
|
|
187
187
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
188
188
|
stateHuman(raw?: boolean): TumblerStateHuman;
|
|
189
189
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PoolContract } from "./types.js";
|
|
4
|
-
export default function createPool(sdk: GearboxSDK, data:
|
|
4
|
+
export default function createPool(sdk: GearboxSDK, data: PoolState): PoolContract;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolQuotaKeeperState, PoolState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PoolQuotaKeeperContract } from "./types.js";
|
|
4
|
-
export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool:
|
|
4
|
+
export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool: PoolState, pqk: PoolQuotaKeeperState): PoolQuotaKeeperContract;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolState, RateKeeperState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { IRateKeeperContract } from "./types.js";
|
|
4
|
-
export default function createRateKeeper(sdk: GearboxSDK, pool:
|
|
4
|
+
export default function createRateKeeper(sdk: GearboxSDK, pool: PoolState, data: RateKeeperState): IRateKeeperContract;
|