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