@gearbox-protocol/sdk 18.1.0 → 18.2.0-next.2
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/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +179 -0
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +534 -0
- package/dist/cjs/abi/router/treehouseWorker.js +885 -0
- package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +3 -0
- package/dist/cjs/onchain/market/adapters/types.js +3 -0
- package/dist/cjs/permissionless/api/GearboxPermissionless.js +12 -5
- package/dist/cjs/permissionless/api/analytics/PermissionlessAnalytics.js +50 -0
- package/dist/cjs/permissionless/api/analytics/index.js +4 -0
- package/dist/cjs/permissionless/api/analytics/schemas.js +27 -0
- package/dist/cjs/permissionless/api/analytics/types.js +1 -0
- package/dist/cjs/permissionless/api/index.js +3 -0
- package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +69 -0
- package/dist/cjs/permissionless/api/oracles/schemas.js +36 -0
- package/dist/cjs/permissionless/index.js +2 -0
- package/dist/esm/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js +178 -0
- package/dist/esm/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.js +533 -0
- package/dist/esm/abi/router/treehouseWorker.js +884 -0
- package/dist/esm/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +3 -0
- package/dist/esm/onchain/market/adapters/types.js +3 -0
- package/dist/esm/permissionless/api/GearboxPermissionless.js +12 -5
- package/dist/esm/permissionless/api/analytics/PermissionlessAnalytics.js +49 -0
- package/dist/esm/permissionless/api/analytics/index.js +2 -0
- package/dist/esm/permissionless/api/analytics/schemas.js +25 -0
- package/dist/esm/permissionless/api/analytics/types.js +1 -0
- package/dist/esm/permissionless/api/index.js +3 -1
- package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +70 -1
- package/dist/esm/permissionless/api/oracles/schemas.js +33 -1
- package/dist/esm/permissionless/index.js +2 -1
- package/dist/types/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.d.ts +148 -0
- package/dist/types/abi/compressors/subcompressors/withdrawal/treehouseWithdrawalSubcompressor.d.ts +440 -0
- package/dist/types/abi/router/treehouseWorker.d.ts +728 -0
- package/dist/types/onchain/market/adapters/types.d.ts +4 -1
- package/dist/types/permissionless/api/GearboxPermissionless.d.ts +11 -5
- package/dist/types/permissionless/api/analytics/PermissionlessAnalytics.d.ts +38 -0
- package/dist/types/permissionless/api/analytics/index.d.ts +3 -0
- package/dist/types/permissionless/api/analytics/schemas.d.ts +32 -0
- package/dist/types/permissionless/api/analytics/types.d.ts +38 -0
- package/dist/types/permissionless/api/index.d.ts +5 -2
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +55 -1
- package/dist/types/permissionless/api/oracles/index.d.ts +2 -2
- package/dist/types/permissionless/api/oracles/schemas.d.ts +55 -0
- package/dist/types/permissionless/api/oracles/types.d.ts +92 -0
- package/dist/types/permissionless/index.d.ts +4 -2
- package/package.json +1 -1
|
@@ -33,6 +33,7 @@ const adapterActionSignatures = {
|
|
|
33
33
|
311: "function setPairStatusBatch((address,address,address,uint8,uint8)[])"
|
|
34
34
|
},
|
|
35
35
|
["TRADERJOE_ROUTER"]: { 310: "function setPoolStatusBatch((address,address,uint256,uint8,bool)[])" },
|
|
36
|
+
["TREEHOUSE_ROUTER"]: { 310: "function setAssetStatusBatch(address[],bool[])" },
|
|
36
37
|
["UNISWAP_V2_ROUTER"]: { 310: "function setPairStatusBatch((address,address,bool)[])" },
|
|
37
38
|
["UNISWAP_V3_ROUTER"]: { 310: "function setPoolStatusBatch((address,address,uint24,bool)[])" },
|
|
38
39
|
["UNISWAP_V4_GATEWAY"]: { 310: "function setPoolKeyStatusBatch(((address,address,uint24,int24,address),bool)[])" },
|
|
@@ -36,6 +36,9 @@ const adapterConstructorAbi = {
|
|
|
36
36
|
["UNISWAP_V4_GATEWAY"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
37
37
|
["VELODROME_V2_ROUTER"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
38
38
|
["SECURITIZE_ONRAMP"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
39
|
+
["TREEHOUSE_FASTLANE"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
40
|
+
["TREEHOUSE_GATEWAY"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
41
|
+
["TREEHOUSE_ROUTER"]: { 310: require_onchain_market_adapters_abi_conctructorAbiPatterns.BASIC_ADAPTER_ABI },
|
|
39
42
|
["CURVE_V1_2ASSETS"]: { 311: require_onchain_market_adapters_abi_conctructorAbiPatterns.CURVE_V1_ADAPTER_311_ABI },
|
|
40
43
|
["CURVE_V1_3ASSETS"]: { 311: require_onchain_market_adapters_abi_conctructorAbiPatterns.CURVE_V1_ADAPTER_311_ABI },
|
|
41
44
|
["CURVE_V1_4ASSETS"]: { 311: require_onchain_market_adapters_abi_conctructorAbiPatterns.CURVE_V1_ADAPTER_311_ABI },
|
|
@@ -34,6 +34,9 @@ let AdapterType = /* @__PURE__ */ function(AdapterType) {
|
|
|
34
34
|
AdapterType["SECURITIZE_REDEMPTION"] = "SECURITIZE_REDEMPTION";
|
|
35
35
|
AdapterType["STAKING_REWARDS"] = "STAKING_REWARDS";
|
|
36
36
|
AdapterType["TRADERJOE_ROUTER"] = "TRADERJOE_ROUTER";
|
|
37
|
+
AdapterType["TREEHOUSE_FASTLANE"] = "TREEHOUSE_FASTLANE";
|
|
38
|
+
AdapterType["TREEHOUSE_GATEWAY"] = "TREEHOUSE_GATEWAY";
|
|
39
|
+
AdapterType["TREEHOUSE_ROUTER"] = "TREEHOUSE_ROUTER";
|
|
37
40
|
AdapterType["UNISWAP_V2_ROUTER"] = "UNISWAP_V2_ROUTER";
|
|
38
41
|
AdapterType["UNISWAP_V3_ROUTER"] = "UNISWAP_V3_ROUTER";
|
|
39
42
|
AdapterType["UNISWAP_V4_GATEWAY"] = "UNISWAP_V4_GATEWAY";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_permissionless_api_analytics_PermissionlessAnalytics = require("./analytics/PermissionlessAnalytics.js");
|
|
2
3
|
const require_permissionless_api_chains_ChainsNamespace = require("./chains/ChainsNamespace.js");
|
|
3
4
|
const require_permissionless_api_deploy_PermissionlessDeploy = require("./deploy/PermissionlessDeploy.js");
|
|
4
5
|
const require_permissionless_api_oracles_PermissionlessOracles = require("./oracles/PermissionlessOracles.js");
|
|
@@ -25,11 +26,11 @@ const require_permissionless_api_transactions_InstanceOwnerTransactions = requir
|
|
|
25
26
|
* const store = await permissionless.oracles.store({ chainId: chain.chainId });
|
|
26
27
|
* ```
|
|
27
28
|
*
|
|
28
|
-
* Only what needs a server goes to one. {@link chains}
|
|
29
|
-
* are the backend's reads; {@link deploy} and
|
|
30
|
-
* target chain directly, because everything
|
|
31
|
-
* and a round trip would only move the
|
|
32
|
-
* that has to sign for it.
|
|
29
|
+
* Only what needs a server goes to one. {@link chains}, {@link oracles} and
|
|
30
|
+
* {@link analytics} are the backend's reads; {@link deploy} and
|
|
31
|
+
* {@link transactions} read the target chain directly, because everything
|
|
32
|
+
* they answer is derived from there and a round trip would only move the
|
|
33
|
+
* derivation further from the wallet that has to sign for it.
|
|
33
34
|
**/
|
|
34
35
|
var GearboxPermissionless = class {
|
|
35
36
|
/**
|
|
@@ -42,6 +43,11 @@ var GearboxPermissionless = class {
|
|
|
42
43
|
**/
|
|
43
44
|
oracles;
|
|
44
45
|
/**
|
|
46
|
+
* Namespace for history: what a feed's price did over a window, see
|
|
47
|
+
* {@link PermissionlessAnalytics}.
|
|
48
|
+
**/
|
|
49
|
+
analytics;
|
|
50
|
+
/**
|
|
45
51
|
* Namespace for the Safe batches an instance owner executes. Backend-free,
|
|
46
52
|
* see {@link InstanceOwnerTransactions}.
|
|
47
53
|
**/
|
|
@@ -54,6 +60,7 @@ var GearboxPermissionless = class {
|
|
|
54
60
|
constructor(options = {}) {
|
|
55
61
|
this.chains = new require_permissionless_api_chains_ChainsNamespace.ChainsNamespace(options);
|
|
56
62
|
this.oracles = new require_permissionless_api_oracles_PermissionlessOracles.PermissionlessOracles(options, this.chains);
|
|
63
|
+
this.analytics = new require_permissionless_api_analytics_PermissionlessAnalytics.PermissionlessAnalytics(options);
|
|
57
64
|
this.transactions = new require_permissionless_api_transactions_InstanceOwnerTransactions.InstanceOwnerTransactions(this.chains, this.oracles);
|
|
58
65
|
this.deploy = new require_permissionless_api_deploy_PermissionlessDeploy.PermissionlessDeploy(this.chains);
|
|
59
66
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_offchain_AbstractOffchainNamespace = require("../../../offchain/AbstractOffchainNamespace.js");
|
|
3
|
+
const require_permissionless_api_analytics_schemas = require("./schemas.js");
|
|
4
|
+
//#region src/permissionless/api/analytics/PermissionlessAnalytics.ts
|
|
5
|
+
/**
|
|
6
|
+
* History of the permissionless stack: what a thing did, rather than what it
|
|
7
|
+
* is.
|
|
8
|
+
*
|
|
9
|
+
* Separate from {@link PermissionlessOracles} because the two are read on
|
|
10
|
+
* different clocks. A feed's identity settles when a curator uploads it and
|
|
11
|
+
* is read once per page; its price moves every block and is re-read whenever
|
|
12
|
+
* a window changes. Folding the series into the feed would make every range
|
|
13
|
+
* switch re-fetch the identity, and every identity read carry a series the
|
|
14
|
+
* caller may never draw.
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const chart = await permissionless.analytics.priceChart({
|
|
18
|
+
* chainId: 1,
|
|
19
|
+
* address: feed,
|
|
20
|
+
* range: "1w",
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
**/
|
|
24
|
+
var PermissionlessAnalytics = class extends require_offchain_AbstractOffchainNamespace.AbstractOffchainNamespace {
|
|
25
|
+
constructor(options) {
|
|
26
|
+
super("PermissionlessAnalytics", {
|
|
27
|
+
...options,
|
|
28
|
+
chainIds: []
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The price one feed reported over a window.
|
|
33
|
+
*
|
|
34
|
+
* Backend-only by construction: the chain serves the present, and
|
|
35
|
+
* reconstructing a series from it would mean an archive read per point.
|
|
36
|
+
*
|
|
37
|
+
* @throws When the PriceFeedStore does not carry the feed. An address the
|
|
38
|
+
* store never held has no indexed history, and answering an empty series
|
|
39
|
+
* would read as "no price yet" rather than as the mistake it is.
|
|
40
|
+
**/
|
|
41
|
+
async priceChart({ chainId, address, range }) {
|
|
42
|
+
return this.getData({
|
|
43
|
+
path: `/pfs/${chainId}/price-feed/${address}/chart`,
|
|
44
|
+
query: { range },
|
|
45
|
+
schema: require_permissionless_api_analytics_schemas.priceFeedChartSchema
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
exports.PermissionlessAnalytics = PermissionlessAnalytics;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_permissionless_api_analytics_PermissionlessAnalytics = require("./PermissionlessAnalytics.js");
|
|
3
|
+
require("./types.js");
|
|
4
|
+
exports.PermissionlessAnalytics = require_permissionless_api_analytics_PermissionlessAnalytics.PermissionlessAnalytics;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_model_charts = require("../../../model/charts.js");
|
|
3
|
+
let zod_v4 = require("zod/v4");
|
|
4
|
+
//#region src/permissionless/api/analytics/schemas.ts
|
|
5
|
+
/**
|
|
6
|
+
* Runtime schemas for {@link ./types.js}.
|
|
7
|
+
*
|
|
8
|
+
* Loose for the same reason the oracles schemas are: the backend assembles
|
|
9
|
+
* these rows from its own indexes and may report more about a window than the
|
|
10
|
+
* hand-written types declare.
|
|
11
|
+
**/
|
|
12
|
+
/** {@link PriceFeedChartPoint} */
|
|
13
|
+
const priceFeedChartPointSchema = zod_v4.z.looseObject({
|
|
14
|
+
timestamp: zod_v4.z.number(),
|
|
15
|
+
value: zod_v4.z.number()
|
|
16
|
+
});
|
|
17
|
+
/** {@link PriceFeedPriceChart} */
|
|
18
|
+
const priceFeedChartSchema = zod_v4.z.looseObject({
|
|
19
|
+
range: zod_v4.z.enum(require_model_charts.CHART_RANGES),
|
|
20
|
+
from: zod_v4.z.number(),
|
|
21
|
+
to: zod_v4.z.number(),
|
|
22
|
+
intervalSeconds: zod_v4.z.number(),
|
|
23
|
+
points: zod_v4.z.array(priceFeedChartPointSchema)
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
exports.priceFeedChartPointSchema = priceFeedChartPointSchema;
|
|
27
|
+
exports.priceFeedChartSchema = priceFeedChartSchema;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_permissionless_api_analytics_PermissionlessAnalytics = require("./analytics/PermissionlessAnalytics.js");
|
|
3
|
+
require("./analytics/index.js");
|
|
2
4
|
const require_permissionless_api_errors = require("./errors.js");
|
|
3
5
|
const require_permissionless_api_chains_ChainsNamespace = require("./chains/ChainsNamespace.js");
|
|
4
6
|
require("./chains/index.js");
|
|
@@ -17,6 +19,7 @@ exports.GET_PRICES_CHUNK_SIZE = require_permissionless_api_oracles_Permissionles
|
|
|
17
19
|
exports.GET_PRICES_GAS_LIMIT_BY_CHAIN_ID = require_permissionless_api_oracles_PermissionlessOracles.GET_PRICES_GAS_LIMIT_BY_CHAIN_ID;
|
|
18
20
|
exports.GearboxPermissionless = require_permissionless_api_GearboxPermissionless.GearboxPermissionless;
|
|
19
21
|
exports.InstanceOwnerTransactions = require_permissionless_api_transactions_InstanceOwnerTransactions.InstanceOwnerTransactions;
|
|
22
|
+
exports.PermissionlessAnalytics = require_permissionless_api_analytics_PermissionlessAnalytics.PermissionlessAnalytics;
|
|
20
23
|
exports.PermissionlessChainUnreachableError = require_permissionless_api_errors.PermissionlessChainUnreachableError;
|
|
21
24
|
exports.PermissionlessDeploy = require_permissionless_api_deploy_PermissionlessDeploy.PermissionlessDeploy;
|
|
22
25
|
exports.PermissionlessNotAttachedError = require_permissionless_api_errors.PermissionlessNotAttachedError;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_model_opportunities_schema = require("../../../model/opportunities.schema.js");
|
|
2
3
|
const require_offchain_AbstractOffchainNamespace = require("../../../offchain/AbstractOffchainNamespace.js");
|
|
3
4
|
const require_permissionless_utils_price_update_get_prices = require("../../utils/price-update/get-prices.js");
|
|
4
5
|
const require_permissionless_api_oracles_schemas = require("./schemas.js");
|
|
@@ -37,9 +38,77 @@ var PermissionlessOracles = class extends require_offchain_AbstractOffchainNames
|
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
41
|
+
* One feed of the store: what it is, which assets it may price, and which
|
|
42
|
+
* market slots it currently fills.
|
|
43
|
+
*
|
|
44
|
+
* Singular where {@link store} is plural, and not a filter over it: the
|
|
45
|
+
* store answers what a list renders, while this answers what a feed is used
|
|
46
|
+
* for, which the store does not carry at all.
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* const { priceFeed, markets } = await permissionless.oracles.feed({
|
|
50
|
+
* chainId: 1,
|
|
51
|
+
* address: feed,
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @throws When the store does not carry the feed. A private draft is not
|
|
56
|
+
* here — it lives in whichever app wrote it.
|
|
57
|
+
**/
|
|
58
|
+
async feed({ chainId, address }) {
|
|
59
|
+
return this.getData({
|
|
60
|
+
path: `/pfs/${chainId}/price-feed/${address}`,
|
|
61
|
+
schema: require_permissionless_api_oracles_schemas.priceFeedDetailsSchema
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The feeds one feed reads from, recursively.
|
|
66
|
+
*
|
|
67
|
+
* Answers for any feed the chain has indexed, store member or not: a
|
|
68
|
+
* composite feed's children are rarely in the store themselves, and a tree
|
|
69
|
+
* that stopped at the first of them would not be one.
|
|
70
|
+
*
|
|
71
|
+
* ```ts
|
|
72
|
+
* const tree = await permissionless.oracles.dependencies({
|
|
73
|
+
* chainId: 1,
|
|
74
|
+
* address: feed,
|
|
75
|
+
* });
|
|
76
|
+
* ```
|
|
77
|
+
**/
|
|
78
|
+
async dependencies({ chainId, address }) {
|
|
79
|
+
return this.getData({
|
|
80
|
+
path: `/pfs/${chainId}/price-feed/${address}/graph`,
|
|
81
|
+
schema: require_model_opportunities_schema.priceFeedDataSchema
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* What the market values each of one feed's assets at.
|
|
86
|
+
*
|
|
87
|
+
* Prefer this over {@link prices} whenever the caller is looking at a single
|
|
88
|
+
* feed. That one prices the whole store, which costs the backend one
|
|
89
|
+
* `totalSupply` call per asset of every market on the chain; this costs it
|
|
90
|
+
* one price lookup and one multicall over the feed's own assets.
|
|
91
|
+
*
|
|
92
|
+
* ```ts
|
|
93
|
+
* const { marketCaps } = await permissionless.oracles.feedMarketCaps({
|
|
94
|
+
* chainId: 1,
|
|
95
|
+
* address: feed,
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
**/
|
|
99
|
+
async feedMarketCaps({ chainId, address }) {
|
|
100
|
+
return this.getData({
|
|
101
|
+
path: `/pfs/${chainId}/price-feed/${address}/market-caps`,
|
|
102
|
+
schema: require_permissionless_api_oracles_schemas.priceFeedMarketCapsSchema
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
40
106
|
* A price per feed, and a market cap per feed and asset. The feeds the
|
|
41
107
|
* indexer has not seen are read off the chain by the backend, so the store
|
|
42
108
|
* is priced whole.
|
|
109
|
+
*
|
|
110
|
+
* Chain-wide, and priced accordingly — see {@link feedMarketCaps} for one
|
|
111
|
+
* feed.
|
|
43
112
|
**/
|
|
44
113
|
async prices({ chainId }) {
|
|
45
114
|
return this.getData({
|
|
@@ -44,8 +44,44 @@ const pricesSchema = zod_v4.z.looseObject({
|
|
|
44
44
|
marketCaps: require_permissionless_api_schemas.addressRecord(require_permissionless_api_schemas.addressRecord(zod_v4.z.string().nullable())),
|
|
45
45
|
time: zod_v4.z.number()
|
|
46
46
|
});
|
|
47
|
+
/** {@link PermissionlessPriceFeedAsset} */
|
|
48
|
+
const priceFeedAssetSchema = zod_v4.z.looseObject({
|
|
49
|
+
address: require_permissionless_api_schemas.addressSchema,
|
|
50
|
+
symbol: zod_v4.z.string(),
|
|
51
|
+
name: zod_v4.z.string(),
|
|
52
|
+
decimals: zod_v4.z.number()
|
|
53
|
+
});
|
|
54
|
+
/** {@link PermissionlessPriceFeedMarket} */
|
|
55
|
+
const priceFeedMarketSchema = zod_v4.z.looseObject({
|
|
56
|
+
market: require_permissionless_api_schemas.addressSchema,
|
|
57
|
+
marketConfigurator: require_permissionless_api_schemas.addressSchema,
|
|
58
|
+
curatorName: zod_v4.z.string().nullable(),
|
|
59
|
+
marketName: zod_v4.z.string().nullable(),
|
|
60
|
+
token: require_permissionless_api_schemas.addressSchema,
|
|
61
|
+
tokenSymbol: zod_v4.z.string().nullable(),
|
|
62
|
+
underlyingSymbol: zod_v4.z.string().nullable(),
|
|
63
|
+
reserve: zod_v4.z.boolean(),
|
|
64
|
+
isUnderlying: zod_v4.z.boolean(),
|
|
65
|
+
quotaLimit: zod_v4.z.number().nullable()
|
|
66
|
+
});
|
|
67
|
+
/** {@link PermissionlessPriceFeedDetails} */
|
|
68
|
+
const priceFeedDetailsSchema = zod_v4.z.looseObject({
|
|
69
|
+
chainId: zod_v4.z.number(),
|
|
70
|
+
priceFeed: priceFeedSchema,
|
|
71
|
+
assets: zod_v4.z.array(priceFeedAssetSchema),
|
|
72
|
+
markets: zod_v4.z.array(priceFeedMarketSchema)
|
|
73
|
+
});
|
|
74
|
+
/** {@link PermissionlessPriceFeedMarketCaps} */
|
|
75
|
+
const priceFeedMarketCapsSchema = zod_v4.z.looseObject({
|
|
76
|
+
marketCaps: require_permissionless_api_schemas.addressRecord(zod_v4.z.string().nullable()),
|
|
77
|
+
time: zod_v4.z.number()
|
|
78
|
+
});
|
|
47
79
|
//#endregion
|
|
48
80
|
exports.assetSchema = assetSchema;
|
|
81
|
+
exports.priceFeedAssetSchema = priceFeedAssetSchema;
|
|
82
|
+
exports.priceFeedDetailsSchema = priceFeedDetailsSchema;
|
|
83
|
+
exports.priceFeedMarketCapsSchema = priceFeedMarketCapsSchema;
|
|
84
|
+
exports.priceFeedMarketSchema = priceFeedMarketSchema;
|
|
49
85
|
exports.priceFeedSchema = priceFeedSchema;
|
|
50
86
|
exports.priceFeedStoreSchema = priceFeedStoreSchema;
|
|
51
87
|
exports.pricesSchema = pricesSchema;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_permissionless_api_analytics_PermissionlessAnalytics = require("./api/analytics/PermissionlessAnalytics.js");
|
|
2
3
|
const require_permissionless_api_errors = require("./api/errors.js");
|
|
3
4
|
const require_permissionless_api_chains_ChainsNamespace = require("./api/chains/ChainsNamespace.js");
|
|
4
5
|
const require_permissionless_api_deploy_effective_staleness = require("./api/deploy/effective-staleness.js");
|
|
@@ -68,6 +69,7 @@ exports.MarketConfiguratorContract = require_permissionless_bindings_market_conf
|
|
|
68
69
|
exports.MarketConfiguratorFactoryContract = require_permissionless_bindings_market_configurator_factory.MarketConfiguratorFactoryContract;
|
|
69
70
|
exports.PRICE_FEED_STORE = require_permissionless_utils_literals.PRICE_FEED_STORE;
|
|
70
71
|
exports.PUBLIC_CREATE2_FACTORY = require_permissionless_utils_create2.PUBLIC_CREATE2_FACTORY;
|
|
72
|
+
exports.PermissionlessAnalytics = require_permissionless_api_analytics_PermissionlessAnalytics.PermissionlessAnalytics;
|
|
71
73
|
exports.PermissionlessChainUnreachableError = require_permissionless_api_errors.PermissionlessChainUnreachableError;
|
|
72
74
|
exports.PermissionlessDeploy = require_permissionless_api_deploy_PermissionlessDeploy.PermissionlessDeploy;
|
|
73
75
|
exports.PermissionlessNotAttachedError = require_permissionless_api_errors.PermissionlessNotAttachedError;
|
package/dist/esm/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
//#region src/abi/compressors/subcompressors/liquidation/treehouseLiquidationSubcompressor.ts
|
|
2
|
+
const treehouseLiquidationSubcompressorAbi = [
|
|
3
|
+
{
|
|
4
|
+
type: "function",
|
|
5
|
+
name: "contractType",
|
|
6
|
+
inputs: [],
|
|
7
|
+
outputs: [{
|
|
8
|
+
name: "",
|
|
9
|
+
type: "bytes32",
|
|
10
|
+
internalType: "bytes32"
|
|
11
|
+
}],
|
|
12
|
+
stateMutability: "view"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "function",
|
|
16
|
+
name: "getLiquidationData",
|
|
17
|
+
inputs: [
|
|
18
|
+
{
|
|
19
|
+
name: "liquidator",
|
|
20
|
+
type: "address",
|
|
21
|
+
internalType: "address"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "creditAccount",
|
|
25
|
+
type: "address",
|
|
26
|
+
internalType: "address"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "phantomToken",
|
|
30
|
+
type: "address",
|
|
31
|
+
internalType: "address"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "priceUpdates",
|
|
35
|
+
type: "tuple[]",
|
|
36
|
+
internalType: "struct PriceUpdate[]",
|
|
37
|
+
components: [{
|
|
38
|
+
name: "priceFeed",
|
|
39
|
+
type: "address",
|
|
40
|
+
internalType: "address"
|
|
41
|
+
}, {
|
|
42
|
+
name: "data",
|
|
43
|
+
type: "bytes",
|
|
44
|
+
internalType: "bytes"
|
|
45
|
+
}]
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
outputs: [{
|
|
49
|
+
name: "data",
|
|
50
|
+
type: "tuple",
|
|
51
|
+
internalType: "struct LiquidationData",
|
|
52
|
+
components: [
|
|
53
|
+
{
|
|
54
|
+
name: "requiredToken",
|
|
55
|
+
type: "address",
|
|
56
|
+
internalType: "address"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "requiredAmount",
|
|
60
|
+
type: "uint256",
|
|
61
|
+
internalType: "uint256"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "expectedOutputs",
|
|
65
|
+
type: "tuple[]",
|
|
66
|
+
internalType: "struct LiquidationOutput[]",
|
|
67
|
+
components: [
|
|
68
|
+
{
|
|
69
|
+
name: "token",
|
|
70
|
+
type: "address",
|
|
71
|
+
internalType: "address"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "amount",
|
|
75
|
+
type: "uint256",
|
|
76
|
+
internalType: "uint256"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "delayed",
|
|
80
|
+
type: "bool",
|
|
81
|
+
internalType: "bool"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "redeemerAddress",
|
|
85
|
+
type: "address",
|
|
86
|
+
internalType: "address"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "claimableAt",
|
|
90
|
+
type: "uint256",
|
|
91
|
+
internalType: "uint256"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "liquidationCall",
|
|
97
|
+
type: "tuple",
|
|
98
|
+
internalType: "struct MultiCall",
|
|
99
|
+
components: [{
|
|
100
|
+
name: "target",
|
|
101
|
+
type: "address",
|
|
102
|
+
internalType: "address"
|
|
103
|
+
}, {
|
|
104
|
+
name: "callData",
|
|
105
|
+
type: "bytes",
|
|
106
|
+
internalType: "bytes"
|
|
107
|
+
}]
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "isLiquidatorEligible",
|
|
111
|
+
type: "bool",
|
|
112
|
+
internalType: "bool"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "isCreditAccountFrozen",
|
|
116
|
+
type: "bool",
|
|
117
|
+
internalType: "bool"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "kycProtocol",
|
|
121
|
+
type: "string",
|
|
122
|
+
internalType: "string"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "kycToken",
|
|
126
|
+
type: "address",
|
|
127
|
+
internalType: "address"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}],
|
|
131
|
+
stateMutability: "nonpayable"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: "function",
|
|
135
|
+
name: "getRWALiquidatorInfo",
|
|
136
|
+
inputs: [{
|
|
137
|
+
name: "token",
|
|
138
|
+
type: "address",
|
|
139
|
+
internalType: "address"
|
|
140
|
+
}],
|
|
141
|
+
outputs: [{
|
|
142
|
+
name: "info",
|
|
143
|
+
type: "tuple",
|
|
144
|
+
internalType: "struct RWALiquidatorInfo",
|
|
145
|
+
components: [
|
|
146
|
+
{
|
|
147
|
+
name: "gateway",
|
|
148
|
+
type: "address",
|
|
149
|
+
internalType: "address"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "liquidatorAddress",
|
|
153
|
+
type: "address",
|
|
154
|
+
internalType: "address"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: "contractType",
|
|
158
|
+
type: "bytes32",
|
|
159
|
+
internalType: "bytes32"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}],
|
|
163
|
+
stateMutability: "view"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "function",
|
|
167
|
+
name: "version",
|
|
168
|
+
inputs: [],
|
|
169
|
+
outputs: [{
|
|
170
|
+
name: "",
|
|
171
|
+
type: "uint256",
|
|
172
|
+
internalType: "uint256"
|
|
173
|
+
}],
|
|
174
|
+
stateMutability: "view"
|
|
175
|
+
}
|
|
176
|
+
];
|
|
177
|
+
//#endregion
|
|
178
|
+
export { treehouseLiquidationSubcompressorAbi };
|