@gearbox-protocol/sdk 9.11.1 → 9.12.0
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/plugins/adapters/AdaptersPlugin.js +127 -0
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +95 -0
- package/dist/cjs/plugins/adapters/abi/conctructorAbi.js +154 -0
- package/dist/cjs/plugins/adapters/abi/conctructorAbiPatterns.js +99 -0
- package/dist/cjs/plugins/adapters/abi/index.js +26 -0
- package/dist/cjs/plugins/adapters/abi/utils.js +86 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +39 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +51 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +56 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +69 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +61 -0
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +69 -0
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +63 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +58 -0
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/InfraredVaultAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +56 -0
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +52 -0
- package/dist/cjs/plugins/adapters/contracts/MellowClaimerAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +49 -0
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +78 -0
- package/dist/cjs/plugins/adapters/contracts/MellowVaultAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +73 -0
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +77 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +177 -0
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +52 -0
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +60 -0
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/YearnV2AdapterContract.js +46 -0
- package/dist/cjs/plugins/adapters/contracts/index.js +90 -0
- package/dist/cjs/plugins/adapters/contracts/types.js +60 -0
- package/dist/cjs/plugins/adapters/index.js +28 -0
- package/dist/cjs/plugins/adapters/package.json +1 -0
- package/dist/cjs/plugins/adapters/types.js +63 -0
- package/dist/esm/plugins/adapters/AdaptersPlugin.js +137 -0
- package/dist/esm/plugins/adapters/abi/actionAbi.js +69 -0
- package/dist/esm/plugins/adapters/abi/conctructorAbi.js +141 -0
- package/dist/esm/plugins/adapters/abi/conctructorAbiPatterns.js +66 -0
- package/dist/esm/plugins/adapters/abi/index.js +3 -0
- package/dist/esm/plugins/adapters/abi/utils.js +64 -0
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +15 -0
- package/dist/esm/plugins/adapters/contracts/BalancerV2VaultAdapterContract.js +27 -0
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +32 -0
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +42 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +45 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +37 -0
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +45 -0
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +39 -0
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/EqualizerRouterAdapterContract.js +34 -0
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/InfraredVaultAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.js +32 -0
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +28 -0
- package/dist/esm/plugins/adapters/contracts/MellowClaimerAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +25 -0
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +54 -0
- package/dist/esm/plugins/adapters/contracts/MellowVaultAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +49 -0
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +55 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +155 -0
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +28 -0
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +36 -0
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/YearnV2AdapterContract.js +22 -0
- package/dist/esm/plugins/adapters/contracts/index.js +35 -0
- package/dist/esm/plugins/adapters/contracts/types.js +33 -0
- package/dist/esm/plugins/adapters/index.js +4 -0
- package/dist/esm/plugins/adapters/package.json +1 -0
- package/dist/esm/plugins/adapters/types.js +39 -0
- package/dist/types/plugins/adapters/AdaptersPlugin.d.ts +11 -0
- package/dist/types/plugins/adapters/abi/actionAbi.d.ts +21 -0
- package/dist/types/plugins/adapters/abi/conctructorAbi.d.ts +7 -0
- package/dist/types/plugins/adapters/abi/conctructorAbiPatterns.d.ts +112 -0
- package/dist/types/plugins/adapters/abi/index.d.ts +3 -0
- package/dist/types/plugins/adapters/abi/utils.d.ts +30 -0
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +13 -0
- package/dist/types/plugins/adapters/contracts/BalancerV2VaultAdapterContract.d.ts +482 -0
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +198 -0
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +441 -0
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +284 -0
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +208 -0
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +481 -0
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +534 -0
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +535 -0
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +146 -0
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +190 -0
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +242 -0
- package/dist/types/plugins/adapters/contracts/EqualizerRouterAdapterContract.d.ts +225 -0
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +130 -0
- package/dist/types/plugins/adapters/contracts/InfraredVaultAdapterContract.d.ts +198 -0
- package/dist/types/plugins/adapters/contracts/KodiakIslandGatewayAdapterContract.d.ts +396 -0
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +121 -0
- package/dist/types/plugins/adapters/contracts/MellowClaimerAdapterContract.d.ts +257 -0
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +232 -0
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +195 -0
- package/dist/types/plugins/adapters/contracts/MellowVaultAdapterContract.d.ts +203 -0
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +161 -0
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +823 -0
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +210 -0
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +349 -0
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +216 -0
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +384 -0
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +269 -0
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +247 -0
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +127 -0
- package/dist/types/plugins/adapters/contracts/YearnV2AdapterContract.d.ts +185 -0
- package/dist/types/plugins/adapters/contracts/index.d.ts +35 -0
- package/dist/types/plugins/adapters/contracts/types.d.ts +23 -0
- package/dist/types/plugins/adapters/index.d.ts +4 -0
- package/dist/types/plugins/adapters/types.d.ts +39 -0
- package/package.json +2 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export * from "./AbstractAdapter.js";
|
|
2
|
+
export * from "./BalancerV2VaultAdapterContract.js";
|
|
3
|
+
export * from "./BalancerV3RouterAdapterContract.js";
|
|
4
|
+
export * from "./CamelotV3AdapterContract.js";
|
|
5
|
+
export * from "./ConvexV1BaseRewardPoolAdapterContract.js";
|
|
6
|
+
export * from "./ConvexV1BoosterAdapterContract.js";
|
|
7
|
+
export * from "./Curve2AssetsAdapterContract.js";
|
|
8
|
+
export * from "./Curve3AssetsAdapterContract.js";
|
|
9
|
+
export * from "./Curve4AssetsAdapterContract.js";
|
|
10
|
+
export * from "./CurveV1AdapterDeposit.js";
|
|
11
|
+
export * from "./CurveV1AdapterStETHContract.js";
|
|
12
|
+
export * from "./CurveV1StableNGAdapterContract.js";
|
|
13
|
+
export * from "./DaiUsdsAdapterContract.js";
|
|
14
|
+
export * from "./EqualizerRouterAdapterContract.js";
|
|
15
|
+
export * from "./ERC4626AdapterContract.js";
|
|
16
|
+
export * from "./ERC4626ReferralAdapterContract.js";
|
|
17
|
+
export * from "./FluidDexAdapterContract.js";
|
|
18
|
+
export * from "./InfraredVaultAdapterContract.js";
|
|
19
|
+
export * from "./KodiakIslandGatewayAdapterContract.js";
|
|
20
|
+
export * from "./LidoV1AdapterContract.js";
|
|
21
|
+
export * from "./MellowClaimerAdapterContract.js";
|
|
22
|
+
export * from "./MellowDVVAdapterContract.js";
|
|
23
|
+
export * from "./MellowERC4626VaultAdapterContract.js";
|
|
24
|
+
export * from "./MellowVaultAdapterContract.js";
|
|
25
|
+
export * from "./MellowWrapperAdapterContract.js";
|
|
26
|
+
export * from "./PendleRouterAdapterContract.js";
|
|
27
|
+
export * from "./StakingRewardsAdapterContract.js";
|
|
28
|
+
export * from "./TraderJoeRouterAdapterContract.js";
|
|
29
|
+
export * from "./types.js";
|
|
30
|
+
export * from "./UniswapV2AdapterContract.js";
|
|
31
|
+
export * from "./UniswapV3AdapterContract.js";
|
|
32
|
+
export * from "./UpshiftVaultAdapterContract.js";
|
|
33
|
+
export * from "./VelodromeV2AdapterContract.js";
|
|
34
|
+
export * from "./WstETHV1AdapterContract.js";
|
|
35
|
+
export * from "./YearnV2AdapterContract.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var BalancerV2PoolStatus = /* @__PURE__ */ ((BalancerV2PoolStatus2) => {
|
|
2
|
+
BalancerV2PoolStatus2[BalancerV2PoolStatus2["NOT_ALLOWED"] = 0] = "NOT_ALLOWED";
|
|
3
|
+
BalancerV2PoolStatus2[BalancerV2PoolStatus2["ALLOWED"] = 1] = "ALLOWED";
|
|
4
|
+
BalancerV2PoolStatus2[BalancerV2PoolStatus2["SWAP_ONLY"] = 2] = "SWAP_ONLY";
|
|
5
|
+
BalancerV2PoolStatus2[BalancerV2PoolStatus2["WITHDRAWAL_ONLY"] = 3] = "WITHDRAWAL_ONLY";
|
|
6
|
+
return BalancerV2PoolStatus2;
|
|
7
|
+
})(BalancerV2PoolStatus || {});
|
|
8
|
+
var KodiakIslandStatus = /* @__PURE__ */ ((KodiakIslandStatus2) => {
|
|
9
|
+
KodiakIslandStatus2[KodiakIslandStatus2["NOT_ALLOWED"] = 0] = "NOT_ALLOWED";
|
|
10
|
+
KodiakIslandStatus2[KodiakIslandStatus2["ALLOWED"] = 1] = "ALLOWED";
|
|
11
|
+
KodiakIslandStatus2[KodiakIslandStatus2["SWAP_AND_EXIT_ONLY"] = 2] = "SWAP_AND_EXIT_ONLY";
|
|
12
|
+
KodiakIslandStatus2[KodiakIslandStatus2["EXIT_ONLY"] = 3] = "EXIT_ONLY";
|
|
13
|
+
return KodiakIslandStatus2;
|
|
14
|
+
})(KodiakIslandStatus || {});
|
|
15
|
+
var PendlePairStatus = /* @__PURE__ */ ((PendlePairStatus2) => {
|
|
16
|
+
PendlePairStatus2[PendlePairStatus2["NOT_ALLOWED"] = 0] = "NOT_ALLOWED";
|
|
17
|
+
PendlePairStatus2[PendlePairStatus2["ALLOWED"] = 1] = "ALLOWED";
|
|
18
|
+
PendlePairStatus2[PendlePairStatus2["EXIT_ONLY"] = 2] = "EXIT_ONLY";
|
|
19
|
+
return PendlePairStatus2;
|
|
20
|
+
})(PendlePairStatus || {});
|
|
21
|
+
var TraderJoePoolVersion = /* @__PURE__ */ ((TraderJoePoolVersion2) => {
|
|
22
|
+
TraderJoePoolVersion2[TraderJoePoolVersion2["V1"] = 0] = "V1";
|
|
23
|
+
TraderJoePoolVersion2[TraderJoePoolVersion2["V2"] = 1] = "V2";
|
|
24
|
+
TraderJoePoolVersion2[TraderJoePoolVersion2["V2_1"] = 2] = "V2_1";
|
|
25
|
+
TraderJoePoolVersion2[TraderJoePoolVersion2["V2_2"] = 3] = "V2_2";
|
|
26
|
+
return TraderJoePoolVersion2;
|
|
27
|
+
})(TraderJoePoolVersion || {});
|
|
28
|
+
export {
|
|
29
|
+
BalancerV2PoolStatus,
|
|
30
|
+
KodiakIslandStatus,
|
|
31
|
+
PendlePairStatus,
|
|
32
|
+
TraderJoePoolVersion
|
|
33
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "module","sideEffects":false}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var AdapterType = /* @__PURE__ */ ((AdapterType2) => {
|
|
2
|
+
AdapterType2["BALANCER_V3_ROUTER"] = "BALANCER_V3_ROUTER";
|
|
3
|
+
AdapterType2["BALANCER_VAULT"] = "BALANCER_VAULT";
|
|
4
|
+
AdapterType2["CAMELOT_V3_ROUTER"] = "CAMELOT_V3_ROUTER";
|
|
5
|
+
AdapterType2["CURVE_STABLE_NG"] = "CURVE_STABLE_NG";
|
|
6
|
+
AdapterType2["CURVE_V1_2ASSETS"] = "CURVE_V1_2ASSETS";
|
|
7
|
+
AdapterType2["CURVE_V1_3ASSETS"] = "CURVE_V1_3ASSETS";
|
|
8
|
+
AdapterType2["CURVE_V1_4ASSETS"] = "CURVE_V1_4ASSETS";
|
|
9
|
+
AdapterType2["CURVE_V1_STECRV_POOL"] = "CURVE_V1_STECRV_POOL";
|
|
10
|
+
AdapterType2["CURVE_V1_WRAPPER"] = "CURVE_V1_WRAPPER";
|
|
11
|
+
AdapterType2["CVX_V1_BASE_REWARD_POOL"] = "CVX_V1_BASE_REWARD_POOL";
|
|
12
|
+
AdapterType2["CVX_V1_BOOSTER"] = "CVX_V1_BOOSTER";
|
|
13
|
+
AdapterType2["DAI_USDS_EXCHANGE"] = "DAI_USDS_EXCHANGE";
|
|
14
|
+
AdapterType2["EQUALIZER_ROUTER"] = "EQUALIZER_ROUTER";
|
|
15
|
+
AdapterType2["ERC4626_VAULT"] = "ERC4626_VAULT";
|
|
16
|
+
AdapterType2["ERC4626_VAULT_REFERRAL"] = "ERC4626_VAULT_REFERRAL";
|
|
17
|
+
AdapterType2["FLUID_DEX"] = "FLUID_DEX";
|
|
18
|
+
AdapterType2["INFRARED_VAULT"] = "INFRARED_VAULT";
|
|
19
|
+
AdapterType2["KODIAK_ISLAND_GATEWAY"] = "KODIAK_ISLAND_GATEWAY";
|
|
20
|
+
AdapterType2["LIDO_V1"] = "LIDO_V1";
|
|
21
|
+
AdapterType2["LIDO_WSTETH_V1"] = "LIDO_WSTETH_V1";
|
|
22
|
+
AdapterType2["MELLOW_CLAIMER"] = "MELLOW_CLAIMER";
|
|
23
|
+
AdapterType2["MELLOW_DVV"] = "MELLOW_DVV";
|
|
24
|
+
AdapterType2["MELLOW_ERC4626_VAULT"] = "MELLOW_ERC4626_VAULT";
|
|
25
|
+
AdapterType2["MELLOW_LRT_VAULT"] = "MELLOW_LRT_VAULT";
|
|
26
|
+
AdapterType2["MELLOW_WRAPPER"] = "MELLOW_WRAPPER";
|
|
27
|
+
AdapterType2["PENDLE_ROUTER"] = "PENDLE_ROUTER";
|
|
28
|
+
AdapterType2["STAKING_REWARDS"] = "STAKING_REWARDS";
|
|
29
|
+
AdapterType2["TRADERJOE_ROUTER"] = "TRADERJOE_ROUTER";
|
|
30
|
+
AdapterType2["UNISWAP_V2_ROUTER"] = "UNISWAP_V2_ROUTER";
|
|
31
|
+
AdapterType2["UNISWAP_V3_ROUTER"] = "UNISWAP_V3_ROUTER";
|
|
32
|
+
AdapterType2["UPSHIFT_VAULT"] = "UPSHIFT_VAULT";
|
|
33
|
+
AdapterType2["VELODROME_V2_ROUTER"] = "VELODROME_V2_ROUTER";
|
|
34
|
+
AdapterType2["YEARN_V2"] = "YEARN_V2";
|
|
35
|
+
return AdapterType2;
|
|
36
|
+
})(AdapterType || {});
|
|
37
|
+
export {
|
|
38
|
+
AdapterType
|
|
39
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BaseState, IBaseContract, IGearboxSDKPlugin } from "../../sdk/index.js";
|
|
2
|
+
import { BasePlugin } from "../../sdk/index.js";
|
|
3
|
+
export declare class AdaptersPlugin extends BasePlugin<{}> implements IGearboxSDKPlugin<{}> {
|
|
4
|
+
readonly name = "Adapters";
|
|
5
|
+
readonly version = 1;
|
|
6
|
+
readonly loaded = true;
|
|
7
|
+
createContract(data: BaseState): IBaseContract | undefined;
|
|
8
|
+
load(_force?: boolean): Promise<{}>;
|
|
9
|
+
stateHuman(_?: boolean): {};
|
|
10
|
+
get state(): {};
|
|
11
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Hex } from "viem";
|
|
2
|
+
import type { PartialRecord } from "../../../sdk/index.js";
|
|
3
|
+
import { AdapterType, type VersionedAbi } from "../types";
|
|
4
|
+
/**
|
|
5
|
+
* Mapping from adapter type to ABI for decoding deploy params
|
|
6
|
+
* These ABIs correspond to the constructor parameters used in each adapter's getDeployParams method
|
|
7
|
+
* Based on the actual encodeAbiParameters calls in the adapter implementations
|
|
8
|
+
*/
|
|
9
|
+
export declare const adapterActionSignatures: PartialRecord<AdapterType, Record<number, string>>;
|
|
10
|
+
/**
|
|
11
|
+
* Mapping of adapter types to their parsed ABIs
|
|
12
|
+
*/
|
|
13
|
+
export declare const adapterActionAbi: PartialRecord<AdapterType, VersionedAbi>;
|
|
14
|
+
/**
|
|
15
|
+
* Mapping of function selectors to their corresponding adapter types and signatures
|
|
16
|
+
*/
|
|
17
|
+
export declare const adapterActionSelectors: Record<Hex, {
|
|
18
|
+
signature: string;
|
|
19
|
+
version: number;
|
|
20
|
+
adapterType: string;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AdapterType, type VersionedAbi } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Mapping from adapter type to ABI for decoding deploy params
|
|
4
|
+
* These ABIs correspond to the constructor parameters used in each adapter's getDeployParams method
|
|
5
|
+
* Based on the actual encodeAbiParameters calls in the adapter implementations
|
|
6
|
+
*/
|
|
7
|
+
export declare const adapterConstructorAbi: Record<AdapterType, VersionedAbi>;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export declare const BASIC_ADAPTER_ABI: readonly [{
|
|
2
|
+
readonly type: "address";
|
|
3
|
+
readonly name: "creditManager";
|
|
4
|
+
}, {
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
readonly name: "target";
|
|
7
|
+
}];
|
|
8
|
+
export declare const STAKED_TOKEN_ADAPTER_ABI: readonly [{
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly name: "creditManager";
|
|
11
|
+
}, {
|
|
12
|
+
readonly type: "address";
|
|
13
|
+
readonly name: "target";
|
|
14
|
+
}, {
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
readonly name: "stakedToken";
|
|
17
|
+
}];
|
|
18
|
+
export declare const LP_ADAPTER_ABI: readonly [{
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
readonly name: "creditManager";
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "address";
|
|
23
|
+
readonly name: "target";
|
|
24
|
+
}, {
|
|
25
|
+
readonly type: "address";
|
|
26
|
+
readonly name: "lpToken";
|
|
27
|
+
}];
|
|
28
|
+
export declare const GATEWAY_ADAPTER_ABI: readonly [{
|
|
29
|
+
readonly type: "address";
|
|
30
|
+
readonly name: "creditManager";
|
|
31
|
+
}, {
|
|
32
|
+
readonly type: "address";
|
|
33
|
+
readonly name: "target";
|
|
34
|
+
}, {
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly name: "gateway";
|
|
37
|
+
}];
|
|
38
|
+
export declare const ADDRESS_REFERRAL_ADAPTER_ABI: readonly [{
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
readonly name: "creditManager";
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly name: "target";
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "address";
|
|
46
|
+
readonly name: "referral";
|
|
47
|
+
}];
|
|
48
|
+
export declare const UINT_REFERRAL_ADAPTER_ABI: readonly [{
|
|
49
|
+
readonly type: "address";
|
|
50
|
+
readonly name: "creditManager";
|
|
51
|
+
}, {
|
|
52
|
+
readonly type: "address";
|
|
53
|
+
readonly name: "target";
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "uint16";
|
|
56
|
+
readonly name: "referral";
|
|
57
|
+
}];
|
|
58
|
+
export declare const CURVE_V1_ADAPTER_310_ABI: readonly [{
|
|
59
|
+
readonly type: "address";
|
|
60
|
+
readonly name: "creditManager";
|
|
61
|
+
}, {
|
|
62
|
+
readonly type: "address";
|
|
63
|
+
readonly name: "target";
|
|
64
|
+
}, {
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
readonly name: "lpToken";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly name: "basePool";
|
|
70
|
+
}];
|
|
71
|
+
export declare const CURVE_V1_ADAPTER_311_ABI: readonly [{
|
|
72
|
+
readonly type: "address";
|
|
73
|
+
readonly name: "creditManager";
|
|
74
|
+
}, {
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
readonly name: "target";
|
|
77
|
+
}, {
|
|
78
|
+
readonly type: "address";
|
|
79
|
+
readonly name: "lpToken";
|
|
80
|
+
}, {
|
|
81
|
+
readonly type: "address";
|
|
82
|
+
readonly name: "basePool";
|
|
83
|
+
}, {
|
|
84
|
+
readonly type: "bool";
|
|
85
|
+
readonly name: "use256";
|
|
86
|
+
}];
|
|
87
|
+
export declare const CURVE_V1_WRAPPER_ADAPTER_ABI: readonly [{
|
|
88
|
+
readonly type: "address";
|
|
89
|
+
readonly name: "creditManager";
|
|
90
|
+
}, {
|
|
91
|
+
readonly type: "address";
|
|
92
|
+
readonly name: "target";
|
|
93
|
+
}, {
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
readonly name: "lpToken";
|
|
96
|
+
}, {
|
|
97
|
+
readonly type: "uint256";
|
|
98
|
+
readonly name: "nCoins";
|
|
99
|
+
}];
|
|
100
|
+
export declare const STAKING_REWARDS_ADAPTER_ABI: readonly [{
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
readonly name: "creditManager";
|
|
103
|
+
}, {
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
readonly name: "target";
|
|
106
|
+
}, {
|
|
107
|
+
readonly type: "address";
|
|
108
|
+
readonly name: "stakedPhantomToken";
|
|
109
|
+
}, {
|
|
110
|
+
readonly type: "uint16";
|
|
111
|
+
readonly name: "referral";
|
|
112
|
+
}];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AbiParameter, type Hex } from "viem";
|
|
2
|
+
import { AdapterType } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Converts a string to AdapterType if valid, otherwise returns null
|
|
5
|
+
* @param value - The string to convert
|
|
6
|
+
* @returns The AdapterType if valid, null otherwise
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAdapterType(value: string): AdapterType | null;
|
|
9
|
+
/**
|
|
10
|
+
* Get the ABI for decoding deploy params for a specific adapter type
|
|
11
|
+
* @param adapterPostfix Adapter type
|
|
12
|
+
* @param version Adapter version
|
|
13
|
+
* @returns The ABI array for decoding deploy params or null if not found
|
|
14
|
+
*/
|
|
15
|
+
export declare function getAdapterDeployParamsAbi(adapterPostfix: string, version?: number): readonly AbiParameter[] | null;
|
|
16
|
+
export declare function parseAdapterDeployParams(adapterPostfix: string, version: number, data: Hex): Record<string, string> | null;
|
|
17
|
+
/**
|
|
18
|
+
* Check if an adapter type has a deploy params ABI defined
|
|
19
|
+
* @param adapterType The adapter type to check
|
|
20
|
+
* @returns True if the adapter type has an ABI defined
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasAdapterDeployParamsAbi(adapterType: string): adapterType is AdapterType;
|
|
23
|
+
/**
|
|
24
|
+
* Get the ABI for a specific adapter action type
|
|
25
|
+
* @param adapterPostfix Adapter type
|
|
26
|
+
* @param version Adapter version
|
|
27
|
+
* @returns The ABI array for the adapter action or null if not found
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAdapterActionAbi(adapterPostfix: string, version?: number): readonly AbiParameter[] | null;
|
|
30
|
+
export declare function parseAdapterAction(data: Hex): Record<string, string> | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Abi, Address } from "viem";
|
|
2
|
+
import type { AdapterData, GearboxSDK } from "../../../sdk/index.js";
|
|
3
|
+
import { BaseContract } from "../../../sdk/index.js";
|
|
4
|
+
import type { AdapterContractType } from "../types.js";
|
|
5
|
+
export interface AbstractAdapterContractOptions<abi extends Abi | readonly unknown[]> extends AdapterData {
|
|
6
|
+
abi: abi;
|
|
7
|
+
name?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class AbstractAdapterContract<const abi extends Abi | readonly unknown[]> extends BaseContract<abi> {
|
|
10
|
+
readonly targetContract: Address;
|
|
11
|
+
constructor(sdk: GearboxSDK, args: AbstractAdapterContractOptions<abi>);
|
|
12
|
+
get adapterType(): AdapterContractType;
|
|
13
|
+
}
|