@gearbox-protocol/sdk 18.2.0-next.14 → 18.2.0-next.16
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/onchain/index.js +18 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +113 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +258 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +161 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +6 -0
- package/dist/cjs/onchain/market/adapters/abi/index.js +13 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +39 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +230 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +29 -0
- package/dist/cjs/onchain/market/adapters/abi/treehouse/index.js +7 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +72 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +117 -0
- package/dist/cjs/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +61 -0
- package/dist/cjs/onchain/market/adapters/contracts/index.js +6 -0
- package/dist/cjs/onchain/market/adapters/createAdapter.js +6 -0
- package/dist/cjs/onchain/market/adapters/index.js +18 -0
- package/dist/cjs/onchain/market/index.js +18 -0
- package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +53 -7
- package/dist/cjs/permissionless/api/oracles/onchain-feed.js +25 -0
- package/dist/cjs/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
- package/dist/cjs/permissionless/api/transactions/lp-price-feeds.js +10 -4
- package/dist/esm/onchain/index.js +10 -1
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.js +112 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js +257 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.js +160 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/index.js +4 -1
- package/dist/esm/onchain/market/adapters/abi/index.js +8 -1
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.js +38 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.js +229 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/iTreehouseRouter.js +28 -0
- package/dist/esm/onchain/market/adapters/abi/treehouse/index.js +4 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.js +71 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js +116 -0
- package/dist/esm/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.js +60 -0
- package/dist/esm/onchain/market/adapters/contracts/index.js +4 -1
- package/dist/esm/onchain/market/adapters/createAdapter.js +6 -0
- package/dist/esm/onchain/market/adapters/index.js +10 -1
- package/dist/esm/onchain/market/index.js +10 -1
- package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +55 -9
- package/dist/esm/permissionless/api/oracles/onchain-feed.js +24 -0
- package/dist/esm/permissionless/api/transactions/InstanceOwnerTransactions.js +14 -3
- package/dist/esm/permissionless/api/transactions/lp-price-feeds.js +10 -4
- package/dist/types/onchain/index.d.ts +10 -1
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseFastlaneAdapter.d.ts +101 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.d.ts +237 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iTreehouseRouterAdapter.d.ts +146 -0
- package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +4 -1
- package/dist/types/onchain/market/adapters/abi/index.d.ts +8 -1
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseFastlane.d.ts +33 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRedemptionGateway.d.ts +207 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/iTreehouseRouter.d.ts +27 -0
- package/dist/types/onchain/market/adapters/abi/treehouse/index.d.ts +4 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseFastlaneAdapterContract.d.ts +156 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseRedemptionGatewayAdapterContract.d.ts +481 -0
- package/dist/types/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.d.ts +193 -0
- package/dist/types/onchain/market/adapters/contracts/index.d.ts +4 -1
- package/dist/types/onchain/market/adapters/index.d.ts +10 -1
- package/dist/types/onchain/market/index.d.ts +10 -1
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +8 -2
- package/dist/types/permissionless/api/oracles/onchain-feed.d.ts +15 -0
- package/dist/types/permissionless/api/oracles/types.d.ts +12 -3
- package/dist/types/permissionless/api/transactions/lp-price-feeds.d.ts +9 -1
- package/package.json +1 -1
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { AssetsMap } from "../../../utils/AssetsMap.js";
|
|
2
|
+
import { AbstractAdapterContract, ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
3
|
+
import { OnchainSDK } from "../../../OnchainSDK.js";
|
|
4
|
+
import "../../../utils/index.js";
|
|
5
|
+
import { Address, DecodeFunctionDataReturnType } from "viem";
|
|
6
|
+
//#region src/onchain/market/adapters/contracts/TreehouseRouterAdapterContract.d.ts
|
|
7
|
+
declare const abi: readonly [{
|
|
8
|
+
readonly type: "function";
|
|
9
|
+
readonly name: "allowedAssets";
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly outputs: readonly [{
|
|
12
|
+
readonly name: "";
|
|
13
|
+
readonly type: "address[]";
|
|
14
|
+
readonly internalType: "address[]";
|
|
15
|
+
}];
|
|
16
|
+
readonly stateMutability: "view";
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "function";
|
|
19
|
+
readonly name: "contractType";
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly outputs: readonly [{
|
|
22
|
+
readonly name: "";
|
|
23
|
+
readonly type: "bytes32";
|
|
24
|
+
readonly internalType: "bytes32";
|
|
25
|
+
}];
|
|
26
|
+
readonly stateMutability: "view";
|
|
27
|
+
}, {
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
readonly name: "creditManager";
|
|
30
|
+
readonly inputs: readonly [];
|
|
31
|
+
readonly outputs: readonly [{
|
|
32
|
+
readonly name: "";
|
|
33
|
+
readonly type: "address";
|
|
34
|
+
readonly internalType: "address";
|
|
35
|
+
}];
|
|
36
|
+
readonly stateMutability: "view";
|
|
37
|
+
}, {
|
|
38
|
+
readonly type: "function";
|
|
39
|
+
readonly name: "deposit";
|
|
40
|
+
readonly inputs: readonly [{
|
|
41
|
+
readonly name: "token";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly internalType: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "amount";
|
|
46
|
+
readonly type: "uint256";
|
|
47
|
+
readonly internalType: "uint256";
|
|
48
|
+
}];
|
|
49
|
+
readonly outputs: readonly [{
|
|
50
|
+
readonly name: "";
|
|
51
|
+
readonly type: "bool";
|
|
52
|
+
readonly internalType: "bool";
|
|
53
|
+
}];
|
|
54
|
+
readonly stateMutability: "nonpayable";
|
|
55
|
+
}, {
|
|
56
|
+
readonly type: "function";
|
|
57
|
+
readonly name: "depositDiff";
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly name: "token";
|
|
60
|
+
readonly type: "address";
|
|
61
|
+
readonly internalType: "address";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "leftoverAmount";
|
|
64
|
+
readonly type: "uint256";
|
|
65
|
+
readonly internalType: "uint256";
|
|
66
|
+
}];
|
|
67
|
+
readonly outputs: readonly [{
|
|
68
|
+
readonly name: "";
|
|
69
|
+
readonly type: "bool";
|
|
70
|
+
readonly internalType: "bool";
|
|
71
|
+
}];
|
|
72
|
+
readonly stateMutability: "nonpayable";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "function";
|
|
75
|
+
readonly name: "isAssetAllowed";
|
|
76
|
+
readonly inputs: readonly [{
|
|
77
|
+
readonly name: "asset";
|
|
78
|
+
readonly type: "address";
|
|
79
|
+
readonly internalType: "address";
|
|
80
|
+
}];
|
|
81
|
+
readonly outputs: readonly [{
|
|
82
|
+
readonly name: "";
|
|
83
|
+
readonly type: "bool";
|
|
84
|
+
readonly internalType: "bool";
|
|
85
|
+
}];
|
|
86
|
+
readonly stateMutability: "view";
|
|
87
|
+
}, {
|
|
88
|
+
readonly type: "function";
|
|
89
|
+
readonly name: "serialize";
|
|
90
|
+
readonly inputs: readonly [];
|
|
91
|
+
readonly outputs: readonly [{
|
|
92
|
+
readonly name: "serializedData";
|
|
93
|
+
readonly type: "bytes";
|
|
94
|
+
readonly internalType: "bytes";
|
|
95
|
+
}];
|
|
96
|
+
readonly stateMutability: "view";
|
|
97
|
+
}, {
|
|
98
|
+
readonly type: "function";
|
|
99
|
+
readonly name: "setAssetStatusBatch";
|
|
100
|
+
readonly inputs: readonly [{
|
|
101
|
+
readonly name: "assets";
|
|
102
|
+
readonly type: "address[]";
|
|
103
|
+
readonly internalType: "address[]";
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "allowed";
|
|
106
|
+
readonly type: "bool[]";
|
|
107
|
+
readonly internalType: "bool[]";
|
|
108
|
+
}];
|
|
109
|
+
readonly outputs: readonly [];
|
|
110
|
+
readonly stateMutability: "nonpayable";
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
readonly name: "targetContract";
|
|
114
|
+
readonly inputs: readonly [];
|
|
115
|
+
readonly outputs: readonly [{
|
|
116
|
+
readonly name: "";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
readonly internalType: "address";
|
|
119
|
+
}];
|
|
120
|
+
readonly stateMutability: "view";
|
|
121
|
+
}, {
|
|
122
|
+
readonly type: "function";
|
|
123
|
+
readonly name: "version";
|
|
124
|
+
readonly inputs: readonly [];
|
|
125
|
+
readonly outputs: readonly [{
|
|
126
|
+
readonly name: "";
|
|
127
|
+
readonly type: "uint256";
|
|
128
|
+
readonly internalType: "uint256";
|
|
129
|
+
}];
|
|
130
|
+
readonly stateMutability: "view";
|
|
131
|
+
}, {
|
|
132
|
+
readonly type: "event";
|
|
133
|
+
readonly name: "SetAssetStatus";
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "asset";
|
|
136
|
+
readonly type: "address";
|
|
137
|
+
readonly indexed: true;
|
|
138
|
+
readonly internalType: "address";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "allowed";
|
|
141
|
+
readonly type: "bool";
|
|
142
|
+
readonly indexed: false;
|
|
143
|
+
readonly internalType: "bool";
|
|
144
|
+
}];
|
|
145
|
+
readonly anonymous: false;
|
|
146
|
+
}, {
|
|
147
|
+
readonly type: "error";
|
|
148
|
+
readonly name: "InvalidAssetException";
|
|
149
|
+
readonly inputs: readonly [];
|
|
150
|
+
}];
|
|
151
|
+
type abi = typeof abi;
|
|
152
|
+
declare const protocolAbi: readonly [{
|
|
153
|
+
readonly type: "function";
|
|
154
|
+
readonly name: "TASSET";
|
|
155
|
+
readonly inputs: readonly [];
|
|
156
|
+
readonly outputs: readonly [{
|
|
157
|
+
readonly name: "";
|
|
158
|
+
readonly type: "address";
|
|
159
|
+
readonly internalType: "address";
|
|
160
|
+
}];
|
|
161
|
+
readonly stateMutability: "view";
|
|
162
|
+
}, {
|
|
163
|
+
readonly type: "function";
|
|
164
|
+
readonly name: "deposit";
|
|
165
|
+
readonly inputs: readonly [{
|
|
166
|
+
readonly name: "token";
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
readonly internalType: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "amount";
|
|
171
|
+
readonly type: "uint256";
|
|
172
|
+
readonly internalType: "uint256";
|
|
173
|
+
}];
|
|
174
|
+
readonly outputs: readonly [];
|
|
175
|
+
readonly stateMutability: "nonpayable";
|
|
176
|
+
}];
|
|
177
|
+
type protocolAbi = typeof protocolAbi;
|
|
178
|
+
export declare class TreehouseRouterAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
179
|
+
#private;
|
|
180
|
+
constructor(sdk: OnchainSDK, args: ConcreteAdapterContractOptions);
|
|
181
|
+
get allowedAssets(): Address[];
|
|
182
|
+
stateHuman(raw?: boolean): {
|
|
183
|
+
address: string;
|
|
184
|
+
version: number;
|
|
185
|
+
contractType?: string;
|
|
186
|
+
creditManager?: string;
|
|
187
|
+
targetContract?: string;
|
|
188
|
+
allowedAssets: string[] | undefined;
|
|
189
|
+
};
|
|
190
|
+
protected applyBalanceChanges(balances: AssetsMap, decoded: DecodeFunctionDataReturnType<abi>): void;
|
|
191
|
+
}
|
|
192
|
+
//#endregion
|
|
193
|
+
export {};
|
|
@@ -31,10 +31,13 @@ import { SecuritizeOnRampAdapterContract } from "./SecuritizeOnRampAdapterContra
|
|
|
31
31
|
import { SecuritizeRedemptionGatewayAdapterContract } from "./SecuritizeRedemptionGatewayAdapterContract.js";
|
|
32
32
|
import { StakingRewardsAdapterContract } from "./StakingRewardsAdapterContract.js";
|
|
33
33
|
import { TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract } from "./TraderJoeRouterAdapterContract.js";
|
|
34
|
+
import { TreehouseFastlaneAdapterContract } from "./TreehouseFastlaneAdapterContract.js";
|
|
35
|
+
import { TreehouseRedemptionGatewayAdapterContract } from "./TreehouseRedemptionGatewayAdapterContract.js";
|
|
36
|
+
import { TreehouseRouterAdapterContract } from "./TreehouseRouterAdapterContract.js";
|
|
34
37
|
import { UniswapV2AdapterContract } from "./UniswapV2AdapterContract.js";
|
|
35
38
|
import { UniswapV3AdapterContract } from "./UniswapV3AdapterContract.js";
|
|
36
39
|
import { UniswapV4AdapterContract } from "./UniswapV4AdapterContract.js";
|
|
37
40
|
import { UpshiftVaultAdapterContract } from "./UpshiftVaultAdapterContract.js";
|
|
38
41
|
import { VelodromeV2RouterAdapterContract } from "./VelodromeV2AdapterContract.js";
|
|
39
42
|
import { WstETHV1AdapterContract } from "./WstETHV1AdapterContract.js";
|
|
40
|
-
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHV1AdapterContract };
|
|
43
|
+
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, DaiUsdsAdapterContract, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LidoV1AdapterContract, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VelodromeV2RouterAdapterContract, WstETHV1AdapterContract };
|
|
@@ -28,6 +28,9 @@ import { iSecuritizeOnRampAdapterV310Abi } from "./abi/adapters/iSecuritizeOnRam
|
|
|
28
28
|
import { iSecuritizeRedemptionGatewayAdapterV311Abi } from "./abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.js";
|
|
29
29
|
import { iStakingRewardsAdapterAbi } from "./abi/adapters/iStakingRewardsAdapter.js";
|
|
30
30
|
import { iTraderJoeRouterAdapterAbi } from "./abi/adapters/iTraderJoeRouterAdapter.js";
|
|
31
|
+
import { iTreehouseFastlaneAdapterAbi } from "./abi/adapters/iTreehouseFastlaneAdapter.js";
|
|
32
|
+
import { iTreehouseRedemptionGatewayAdapterAbi } from "./abi/adapters/iTreehouseRedemptionGatewayAdapter.js";
|
|
33
|
+
import { iTreehouseRouterAdapterAbi } from "./abi/adapters/iTreehouseRouterAdapter.js";
|
|
31
34
|
import { iUniswapV2AdapterAbi } from "./abi/adapters/iUniswapV2Adapter.js";
|
|
32
35
|
import { iUniswapV3AdapterAbi } from "./abi/adapters/iUniswapV3Adapter.js";
|
|
33
36
|
import { iUniswapV4AdapterAbi, iUniswapV4GatewayAbi } from "./abi/adapters/iUniswapV4Adapter.js";
|
|
@@ -41,6 +44,9 @@ import { iBaseOnRampAbi } from "./abi/securitize/iBaseOnRamp.js";
|
|
|
41
44
|
import { iSecuritizeOnRampAbi } from "./abi/securitize/iSecuritizeOnRamp.js";
|
|
42
45
|
import { iSecuritizeRedemptionGatewayV311Abi } from "./abi/securitize/iSecuritizeRedemptionGatewayV311.js";
|
|
43
46
|
import { iBalancerV3RouterAbi, iBalancerV3WrapperAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3RouterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iDaiUsdsAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iInfinifiGatewayAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iMellowClaimerAbi, iMellowWrapperAbi, iMidasIssuanceVaultV310Abi, iPendleRouterAbi, iStakingRewardsAbi, iTraderJoeRouterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iVelodromeV2RouterAbi, iwstETHAbi, lidoV1_WETHGatewayAbi } from "./abi/targetContractAbi.js";
|
|
47
|
+
import { iTreehouseFastlaneAbi } from "./abi/treehouse/iTreehouseFastlane.js";
|
|
48
|
+
import { iTreehouseRedemptionGatewayAbi } from "./abi/treehouse/iTreehouseRedemptionGateway.js";
|
|
49
|
+
import { iTreehouseRouterAbi } from "./abi/treehouse/iTreehouseRouter.js";
|
|
44
50
|
import { getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, parseAdapterAction, parseAdapterDeployParams } from "./abi/utils.js";
|
|
45
51
|
import "./abi/index.js";
|
|
46
52
|
import { BalancerSwap, BasicSwapCall, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexWithdraw, ConvexWithdrawAndClaim, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveWithdrawal, GetReward, LegacyAdapterOperation, LidoSubmit, MakerDeposit, MakerRedeem, Swap, TokenAmount, Transfers, UniswapSwap, VaultDeposit, WithdrawCollateral, WstETHUnwrap, WstETHWrap } from "./legacyAdapterOperations.js";
|
|
@@ -77,6 +83,9 @@ import { SecuritizeOnRampAdapterContract } from "./contracts/SecuritizeOnRampAda
|
|
|
77
83
|
import { SecuritizeRedemptionGatewayAdapterContract } from "./contracts/SecuritizeRedemptionGatewayAdapterContract.js";
|
|
78
84
|
import { StakingRewardsAdapterContract } from "./contracts/StakingRewardsAdapterContract.js";
|
|
79
85
|
import { TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract } from "./contracts/TraderJoeRouterAdapterContract.js";
|
|
86
|
+
import { TreehouseFastlaneAdapterContract } from "./contracts/TreehouseFastlaneAdapterContract.js";
|
|
87
|
+
import { TreehouseRedemptionGatewayAdapterContract } from "./contracts/TreehouseRedemptionGatewayAdapterContract.js";
|
|
88
|
+
import { TreehouseRouterAdapterContract } from "./contracts/TreehouseRouterAdapterContract.js";
|
|
80
89
|
import { UniswapV2AdapterContract } from "./contracts/UniswapV2AdapterContract.js";
|
|
81
90
|
import { UniswapV3AdapterContract } from "./contracts/UniswapV3AdapterContract.js";
|
|
82
91
|
import { UniswapV4AdapterContract } from "./contracts/UniswapV4AdapterContract.js";
|
|
@@ -87,4 +96,4 @@ import "./contracts/index.js";
|
|
|
87
96
|
import { AdapterFactoryArgs, createAdapter } from "./createAdapter.js";
|
|
88
97
|
import { TokenTransfer } from "./transfers.js";
|
|
89
98
|
import { allTransfersAsTokenAmounts, classifyCurveOperation, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, fnSigToName, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers } from "./transferHelpers.js";
|
|
90
|
-
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BasicSwapCall, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, GetReward, IAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, MakerDeposit, MakerRedeem, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, Swap, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, classifyCurveOperation, createAdapter, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, erc4626ReferralAdapterAbi, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers };
|
|
99
|
+
export { AbstractAdapterContract, AbstractAdapterContractOptions, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BasicSwapCall, CamelotPool, CamelotV3AdapterContract, ConcreteAdapterContractOptions, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, FluidDexAdapterContract, GetReward, IAdapterContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, MakerDeposit, MakerRedeem, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowWrapperAdapterContract, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasRedemptionVaultAdapterContract, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTokenType, SecuritizeOnRampAdapterContract, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, Swap, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, classifyCurveOperation, createAdapter, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, erc4626ReferralAdapterAbi, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, rewardsFromTransfers, swapFromTransfers, toNetTransfers };
|
|
@@ -39,6 +39,9 @@ import { iSecuritizeOnRampAdapterV310Abi } from "./adapters/abi/adapters/iSecuri
|
|
|
39
39
|
import { iSecuritizeRedemptionGatewayAdapterV311Abi } from "./adapters/abi/adapters/iSecuritizeRedemptionGatewayAdapterV311.js";
|
|
40
40
|
import { iStakingRewardsAdapterAbi } from "./adapters/abi/adapters/iStakingRewardsAdapter.js";
|
|
41
41
|
import { iTraderJoeRouterAdapterAbi } from "./adapters/abi/adapters/iTraderJoeRouterAdapter.js";
|
|
42
|
+
import { iTreehouseFastlaneAdapterAbi } from "./adapters/abi/adapters/iTreehouseFastlaneAdapter.js";
|
|
43
|
+
import { iTreehouseRedemptionGatewayAdapterAbi } from "./adapters/abi/adapters/iTreehouseRedemptionGatewayAdapter.js";
|
|
44
|
+
import { iTreehouseRouterAdapterAbi } from "./adapters/abi/adapters/iTreehouseRouterAdapter.js";
|
|
42
45
|
import { iUniswapV2AdapterAbi } from "./adapters/abi/adapters/iUniswapV2Adapter.js";
|
|
43
46
|
import { iUniswapV3AdapterAbi } from "./adapters/abi/adapters/iUniswapV3Adapter.js";
|
|
44
47
|
import { iUniswapV4AdapterAbi, iUniswapV4GatewayAbi } from "./adapters/abi/adapters/iUniswapV4Adapter.js";
|
|
@@ -52,6 +55,9 @@ import { iBaseOnRampAbi } from "./adapters/abi/securitize/iBaseOnRamp.js";
|
|
|
52
55
|
import { iSecuritizeOnRampAbi } from "./adapters/abi/securitize/iSecuritizeOnRamp.js";
|
|
53
56
|
import { iSecuritizeRedemptionGatewayV311Abi } from "./adapters/abi/securitize/iSecuritizeRedemptionGatewayV311.js";
|
|
54
57
|
import { iBalancerV3RouterAbi, iBalancerV3WrapperAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3RouterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iDaiUsdsAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iInfinifiGatewayAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iMellowClaimerAbi, iMellowWrapperAbi, iMidasIssuanceVaultV310Abi, iPendleRouterAbi, iStakingRewardsAbi, iTraderJoeRouterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iVelodromeV2RouterAbi, iwstETHAbi, lidoV1_WETHGatewayAbi } from "./adapters/abi/targetContractAbi.js";
|
|
58
|
+
import { iTreehouseFastlaneAbi } from "./adapters/abi/treehouse/iTreehouseFastlane.js";
|
|
59
|
+
import { iTreehouseRedemptionGatewayAbi } from "./adapters/abi/treehouse/iTreehouseRedemptionGateway.js";
|
|
60
|
+
import { iTreehouseRouterAbi } from "./adapters/abi/treehouse/iTreehouseRouter.js";
|
|
55
61
|
import { getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, hasAdapterDeployParamsAbi, parseAdapterAction, parseAdapterDeployParams } from "./adapters/abi/utils.js";
|
|
56
62
|
import { BalancerSwap, BasicSwapCall, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexWithdraw, ConvexWithdrawAndClaim, CurveAddLiquidity, CurveClaims, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveWithdrawal, GetReward, LegacyAdapterOperation, LidoSubmit, MakerDeposit, MakerRedeem, Swap, TokenAmount, Transfers, UniswapSwap, VaultDeposit, WithdrawCollateral, WstETHUnwrap, WstETHWrap } from "./adapters/legacyAdapterOperations.js";
|
|
57
63
|
import { AbstractAdapterContract, AbstractAdapterContractOptions, ConcreteAdapterContractOptions } from "./adapters/contracts/AbstractAdapter.js";
|
|
@@ -87,6 +93,9 @@ import { SecuritizeOnRampAdapterContract } from "./adapters/contracts/Securitize
|
|
|
87
93
|
import { SecuritizeRedemptionGatewayAdapterContract } from "./adapters/contracts/SecuritizeRedemptionGatewayAdapterContract.js";
|
|
88
94
|
import { StakingRewardsAdapterContract } from "./adapters/contracts/StakingRewardsAdapterContract.js";
|
|
89
95
|
import { TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract } from "./adapters/contracts/TraderJoeRouterAdapterContract.js";
|
|
96
|
+
import { TreehouseFastlaneAdapterContract } from "./adapters/contracts/TreehouseFastlaneAdapterContract.js";
|
|
97
|
+
import { TreehouseRedemptionGatewayAdapterContract } from "./adapters/contracts/TreehouseRedemptionGatewayAdapterContract.js";
|
|
98
|
+
import { TreehouseRouterAdapterContract } from "./adapters/contracts/TreehouseRouterAdapterContract.js";
|
|
90
99
|
import { UniswapV2AdapterContract } from "./adapters/contracts/UniswapV2AdapterContract.js";
|
|
91
100
|
import { UniswapV3AdapterContract } from "./adapters/contracts/UniswapV3AdapterContract.js";
|
|
92
101
|
import { UniswapV4AdapterContract } from "./adapters/contracts/UniswapV4AdapterContract.js";
|
|
@@ -158,4 +167,4 @@ import "./zapper/index.js";
|
|
|
158
167
|
import { MarketRegister, MarketRegistryState, MarketRegistryStateHuman } from "./MarketRegister.js";
|
|
159
168
|
import { DEFAULT_QUOTA_BUFFER_BPS, MAX_LEVERAGE_BUFFER_BPS, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, QuotaMode, StrategyRateInputs, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, healthFactorBps, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, rayToBps, usdToNumber } from "./math.js";
|
|
160
169
|
import { strategyName } from "./strategyName.js";
|
|
161
|
-
export { AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BasicSwapCall, BoundedPriceFeedContract, CamelotPool, CamelotV3AdapterContract, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConstantPriceFeedContract, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, GaugeParams, GetInvestorOptions, GetOpenAccountRequirementsProps, GetReward, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IDegenNFT, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTask, type IPriceUpdater, IRWAFactory, IRateKeeperContract, type IUpdatablePriceFeedContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, InterestRateModelType, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, type LatestUpdate, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MakerDeposit, MakerRedeem, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MaxBorrowAmount, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegistry, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PriceUpdatesCache, PythPriceFeed, QuotaMode, QuotaSlice, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, StrategyCollateralProps, StrategyRateInputs, Swap, type TimestampedCalldata, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, type UpdatablePriceFeedRegistryHooks, type UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
|
|
170
|
+
export { AbstractAdapterContract, AbstractAdapterContractOptions, AbstractLPPriceFeedContract, AbstractPriceFeedContract, AccountMigratorAdapterContract, AdapterContractStateHuman, AdapterContractType, AdapterFactoryArgs, AdapterProtocolOperation, AdapterType, BalanceDelta, BalancerStablePriceFeedContract, BalancerSwap, BalancerV3Pool, BalancerV3PoolStatus, BalancerV3RouterAdapterContract, BalancerV3WrapperAdapterContract, BalancerWeightedPriceFeedContract, BasicSwapCall, BoundedPriceFeedContract, CamelotPool, CamelotV3AdapterContract, CompositePriceFeedContract, CompressorZapperData, ConcreteAdapterContractOptions, ConstantPriceFeedContract, ConvertFn, ConvexDeposit, ConvexDepositAndStake, ConvexStake, ConvexV1BaseRewardPoolAdapterContract, ConvexV1BoosterAdapterContract, ConvexWithdraw, ConvexWithdrawAndClaim, CreditAccountTokenQuota, CreditConfiguratorV310Contract, type abi as CreditFacadeV310Abi, abi as creditFacadeV310Abi, CreditFacadeV310BaseContract, CreditFacadeV310Contract, CreditManagerV310Contract, CreditSuite, CreditSuiteStrategy, Curve2AssetsAdapterContract, Curve3AssetsAdapterContract, Curve4AssetsAdapterContract, CurveAddLiquidity, CurveClaims, CurveCryptoPriceFeedContract, CurveExchange, CurveRemoveLiquidity, CurveRemoveLiquidityOneCoin, CurveStablePriceFeedContract, CurveUSDPriceFeedContract, CurveV1AdapterStETHContract, CurveV1StableNGAdapterContract, CurveWithdrawal, DEFAULT_QUOTA_BUFFER_BPS, DEGEN_NFT_MIDAS, DEGEN_NFT_SECURITIZE, DStokenData, DaiUsdsAdapterContract, DelayedWithdrawalClaim, DelayedWithdrawalRequest, ERC4626AdapterContract, ERC4626ReferralAdapterContract, Erc4626PriceFeedContract, ExpectedBalanceDeltasProps, ExpectedOutput, ExternalPriceFeedContract, FluidDexAdapterContract, GaugeContract, GaugeParams, GetInvestorOptions, GetOpenAccountRequirementsProps, GetReward, IAdapterContract, ICreditConfiguratorContract, ICreditFacadeContract, ICreditManagerContract, IDegenNFT, IERC20ZapperContract, IETHZapperContract, IInterestRateModelContract, IPoolContract, IPriceFeedContract, IPriceOracleContract, type IPriceUpdateTask, type IPriceUpdater, IRWAFactory, IRateKeeperContract, type IUpdatablePriceFeedContract, IZapperContract, InfinifiGatewayAdapterContract, InfinifiUnwindingGatewayAdapterContract, InterestRateModelType, KelpLRTDepositPoolAdapterContract, KelpLRTWithdrawalManagerAdapterContract, type LatestUpdate, LegacyAdapterOperation, LidoSubmit, LidoV1AdapterContract, LinearInterestRateModelContract, LiquidationFees, MAX_LEVERAGE_BUFFER_BPS, MakerDeposit, MakerRedeem, MarketRegister, MarketRegistryState, MarketRegistryStateHuman, MarketSuite, MaxBorrowAmount, MellowClaimerAdapterContract, MellowDVVAdapterContract, MellowERC4626VaultAdapterContract, MellowLRTPriceFeedContract, MellowWrapperAdapterContract, MidasDegenNFT, MidasGatewayAdapterContract, MidasIssuanceVaultAdapterContract, MidasLiquidatorContract, MidasRedemptionVaultAdapterContract, OptimalPartialLiquidationAmounts, OptimalPartialLiquidationAmountsProps, PARTIAL_LIQUIDATION_BUFFER_BPS, PHANTOM_TOKEN_MIDAS_REDEMPTION, PHANTOM_TOKEN_SECURITIZE_REDEMPTION, ParsedZapperDeposit, ParsedZapperOperation, ParsedZapperRedeem, PartialPriceFeedInitError, PartialPriceFeedTreeNode, PendlePair, PendlePairStatus, PendleRouterAdapterContract, PendleTWAPPTPriceFeed, PendleTokenType, PoolQuotaKeeperContract, PoolSuite, PoolV310Contract, PrepareUpdateQuotasProps, PriceFeedConstructorArgs, PriceFeedContractType, PriceFeedRef, PriceFeedRegistry, PriceFeedUsageType, PriceFeedsForAccountOptions, PriceFeedsForTokensOptions, PriceOracleV310Contract, PriceUpdate, PriceUpdatesCache, PythPriceFeed, QuotaMode, QuotaSlice, RWACompressorCall, RWACompressorInvestorData, RWACompressorResponse, RWAFactoryData, RWAFactoryProtocol, RWAFactoryStateHuman, RWAInvestorData, RWARegistry, RWAState, RWAStateHuman, RWAUnderlyingData, RWA_COMPRESSOR_ADDRESS, RWA_LIQUIDATOR_MIDAS, RWA_LIQUIDATOR_SECURITIZE, RampEvent, RateKeeperType, RedstonePriceFeedContract, SecuritizeCreditAccountData, SecuritizeDegenNFT, SecuritizeInvestorData, SecuritizeLiquidatorContract, SecuritizeOnRampAdapterContract, SecuritizeRWAFactory, SecuritizeRWAFactoryStateHuman, SecuritizeRedemptionGatewayAdapterContract, StakingRewardsAdapterContract, StrategyCollateralProps, StrategyRateInputs, Swap, type TimestampedCalldata, TokenAmount, TokenTransfer, TraderJoePool, TraderJoePoolVersion, TraderJoeRouterAdapterContract, Transfers, TreehouseFastlaneAdapterContract, TreehouseRedemptionGatewayAdapterContract, TreehouseRouterAdapterContract, UniswapSwap, UniswapV2AdapterContract, UniswapV3AdapterContract, UniswapV4AdapterContract, UpdatablePriceFeedRegistry, type UpdatablePriceFeedRegistryHooks, type UpdatePriceFeedsResult, UpshiftVaultAdapterContract, VaultDeposit, VelodromeV2RouterAdapterContract, VersionedAbi, WithdrawCollateral, WstETHPriceFeedContract, WstETHUnwrap, WstETHV1AdapterContract, WstETHWrap, YearnPriceFeedContract, ZapperContract, ZapperData, ZeroPriceFeedContract, adapterActionAbi, adapterActionSelectors, adapterActionSignatures, adapterConstructorAbi, allTransfersAsTokenAmounts, bpsToRay, calcBorrowApy, calcEffectiveBorrowApy, calcMaxLeverage, calcNetStrategyApy, calcPositionLeverage, calcQuotaRate, calcUtilization, calcUtilizationRaw, classifyCurveOperation, collateralPriceInUnderlying, createAdapter, createPriceOracle, createZapper, curveAddLiquidityFromTransfers, curveRemoveLiquidityFromTransfers, dominantCollateral, erc4626ReferralAdapterAbi, expectedBalanceDeltas, fnSigToName, getAdapterActionAbi, getAdapterDeployParamsAbi, getAdapterType, getRawPriceUpdates, hasAdapterDeployParamsAbi, healthFactorBps, iBalancerV3RouterAbi, iBalancerV3RouterAdapterAbi, iBalancerV3WrapperAbi, iBalancerV3WrapperAdapterAbi, iBaseOnRampAbi, iBaseRewardPoolAbi, iBoosterAbi, iCamelotV3AdapterAbi, iCamelotV3RouterAbi, iConvexV1BaseRewardPoolAdapterAbi, iConvexV1BoosterAdapterAbi, iCurvePoolAbi, iCurvePoolStableNGAbi, iCurvePool_2Abi, iCurvePool_3Abi, iCurvePool_4Abi, iCurveV1StableNgAdapterAbi, iCurveV1_2AssetsAdapterAbi, iCurveV1_3AssetsAdapterAbi, iCurveV1_4AssetsAdapterAbi, iDaiUsdsAbi, iDaiUsdsAdapterAbi, iERC4626Abi, iERC4626ReferralAbi, iFluidDexAbi, iFluidDexAdapterAbi, iInfinifiGatewayAbi, iInfinifiGatewayAdapterAbi, iInfinifiUnwindingGatewayAbi, iInfinifiUnwindingGatewayAdapterAbi, iKelpLRTDepositPoolGatewayAbi, iKelpLRTWithdrawalManagerGatewayAbi, iKelpLrtDepositPoolAdapterAbi, iKelpLrtDepositPoolGatewayAbi, iKelpLrtWithdrawalManagerAdapterAbi, iKelpLrtWithdrawalManagerGatewayAbi, iLidoV1AdapterAbi, iMellow4626VaultAdapterAbi, iMellowClaimerAbi, iMellowClaimerAdapterAbi, iMellowWrapperAbi, iMellowWrapperAdapterAbi, iMidasGatewayAdapterV311Abi, iMidasGatewayV311Abi, iMidasIssuanceVaultAdapterV310Abi, iMidasIssuanceVaultV310Abi, iMidasRedemptionVaultAdapterV310Abi, iMidasRedemptionVaultGatewayV310Abi, iPendleRouterAbi, iPendleRouterAdapterAbi, iSecuritizeOnRampAbi, iSecuritizeOnRampAdapterV310Abi, iSecuritizeRedemptionGatewayAdapterV311Abi, iSecuritizeRedemptionGatewayV311Abi, iStakingRewardsAbi, iStakingRewardsAdapterAbi, iTraderJoeRouterAbi, iTraderJoeRouterAdapterAbi, iTreehouseFastlaneAbi, iTreehouseFastlaneAdapterAbi, iTreehouseRedemptionGatewayAbi, iTreehouseRedemptionGatewayAdapterAbi, iTreehouseRouterAbi, iTreehouseRouterAdapterAbi, iUniswapV2AdapterAbi, iUniswapV2Router02Abi, iUniswapV3Abi, iUniswapV3AdapterAbi, iUniswapV4AdapterAbi, iUniswapV4GatewayAbi, iUpshiftVaultAdapterAbi, iUpshiftVaultGatewayAbi, iVelodromeV2RouterAbi, iVelodromeV2RouterAdapterAbi, isLPPriceFeed, isRWAFactory, isStrategyCollateral, isUpdatablePriceFeed, iwstETHAbi, iwstEthv1AdapterAbi, lidoV1_WETHGatewayAbi, mellowDvvAdapterAbi, minSeizedAmount, optimalHFForPartialLiquidation, optimalPartialLiquidationAmounts, parseAdapterAction, parseAdapterDeployParams, parsePosNegAmount, pickStrategyTargetCollateral, rayToBps, rewardsFromTransfers, strategyName, swapFromTransfers, toNetTransfers, updatableDependencies, usdToNumber };
|
|
@@ -99,8 +99,14 @@ export declare class PermissionlessOracles extends AbstractOffchainNamespace {
|
|
|
99
99
|
* oracle holds for the slot, read off the chain here — see
|
|
100
100
|
* {@link PermissionlessPriceFeedMarket.marketStalenessPeriod}.
|
|
101
101
|
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
102
|
+
* A feed the store does not carry is read off the chain instead, through
|
|
103
|
+
* the PriceFeedCompressor, and answered with `inStore: false`: its type,
|
|
104
|
+
* version and description are the chain's, while what only the store knows
|
|
105
|
+
* — who deployed it, its staleness period, the assets it may price and the
|
|
106
|
+
* markets it fills — is answered as unknown or empty.
|
|
107
|
+
*
|
|
108
|
+
* @throws When neither the store nor the chain knows the feed. A private
|
|
109
|
+
* draft is not here — it lives in whichever app wrote it.
|
|
104
110
|
**/
|
|
105
111
|
feed({ chainId, address }: PriceFeedArgs): Promise<PermissionlessPriceFeedDetails>;
|
|
106
112
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PriceFeed } from "../../core/pricefeed.js";
|
|
2
|
+
import { TreeNode } from "./stress/classify.js";
|
|
3
|
+
//#region src/permissionless/api/oracles/onchain-feed.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* What the store would say about a feed, from what the chain says instead.
|
|
6
|
+
*
|
|
7
|
+
* Two fields are the store's alone and are answered as unknown rather than
|
|
8
|
+
* guessed: who deployed it is a store row, so it is the zero address, and the
|
|
9
|
+
* staleness period is a store setting a feed that was never added does not
|
|
10
|
+
* have, so it is 0. The compressor reports `PRICE_FEED::EXTERNAL` for a
|
|
11
|
+
* contract it cannot otherwise place; an empty type is the same thing said
|
|
12
|
+
* less clearly.
|
|
13
|
+
*/
|
|
14
|
+
export declare function onchainPriceFeed(node: TreeNode): PriceFeed;
|
|
15
|
+
//#endregion
|
|
@@ -170,9 +170,10 @@ export interface PermissionlessMarketSlot extends PermissionlessIndexedPriceFeed
|
|
|
170
170
|
/**
|
|
171
171
|
* One feed of the store, with everywhere the store lets it be used.
|
|
172
172
|
*
|
|
173
|
-
* Feeds a tree carries but the store never added have no identity to report
|
|
174
|
-
* no status history, hence no name or staleness — so the
|
|
175
|
-
*
|
|
173
|
+
* Feeds a tree carries but the store never added have no identity to report
|
|
174
|
+
* here — no status history, hence no name or staleness — so the backend does
|
|
175
|
+
* not answer for them; the SDK reads them off the chain instead, see
|
|
176
|
+
* {@link PermissionlessPriceFeedDetails.inStore}.
|
|
176
177
|
**/
|
|
177
178
|
export interface PermissionlessIndexedPriceFeedDetails {
|
|
178
179
|
chainId: number;
|
|
@@ -190,6 +191,14 @@ export interface PermissionlessIndexedPriceFeedDetails {
|
|
|
190
191
|
**/
|
|
191
192
|
export interface PermissionlessPriceFeedDetails extends PermissionlessIndexedPriceFeedDetails {
|
|
192
193
|
markets: PermissionlessPriceFeedMarket[];
|
|
194
|
+
/**
|
|
195
|
+
* Whether the answer is the store's.
|
|
196
|
+
*
|
|
197
|
+
* `false` is a deployed feed the store never added, read off the chain
|
|
198
|
+
* instead: `deployedBy` is the zero address, `stalenessPeriod` is 0, and
|
|
199
|
+
* `assets` and `markets` are empty, because all of them are store rows.
|
|
200
|
+
*/
|
|
201
|
+
inStore: boolean;
|
|
193
202
|
}
|
|
194
203
|
/**
|
|
195
204
|
* One feed as a market slot holds it.
|
|
@@ -8,9 +8,17 @@ import { Address, PublicClient } from "viem";
|
|
|
8
8
|
* transaction. Returns nothing when the bound still fits.
|
|
9
9
|
**/
|
|
10
10
|
export declare function updateBounds(client: PublicClient, address: Address): Promise<RawTx[]>;
|
|
11
|
+
/** An LP feed found in a feed tree, with what it calls itself on chain. */
|
|
12
|
+
export interface LPFeed {
|
|
13
|
+
address: Address;
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
11
16
|
/**
|
|
12
17
|
* Of the whole feed tree behind `feeds`, the ones that are LP feeds: the
|
|
13
18
|
* probe keeps whatever answers `getLPExchangeRate`.
|
|
19
|
+
*
|
|
20
|
+
* The trees reach past `feeds` themselves, so an LP feed read inside one of
|
|
21
|
+
* them is among the results whether or not it is one of `feeds`.
|
|
14
22
|
**/
|
|
15
|
-
export declare function getFeedsToUpdate(client: PublicClient, pfCompressor: Address, feeds: Address[]): Promise<
|
|
23
|
+
export declare function getFeedsToUpdate(client: PublicClient, pfCompressor: Address, feeds: Address[]): Promise<LPFeed[]>;
|
|
16
24
|
//#endregion
|