@gearbox-protocol/sdk 14.12.0-next.7 → 14.12.0-next.9
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/dev/AccountOpener.js +7 -13
- package/dist/cjs/history/classifyMulticallOperations.js +2 -0
- package/dist/cjs/history/mapOperations.js +7 -0
- package/dist/cjs/plugins/adapters/abi/iConvexV1BoosterAdapter.js +143 -0
- package/dist/cjs/plugins/adapters/abi/index.js +2 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +36 -0
- package/dist/cjs/plugins/adapters/contracts/AbstractCurveAdapter.js +66 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +19 -0
- package/dist/cjs/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/CamelotV3AdapterContract.js +20 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +18 -0
- package/dist/cjs/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +28 -2
- package/dist/cjs/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +2 -7
- package/dist/cjs/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +2 -7
- package/dist/cjs/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +2 -7
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterDeposit.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +2 -7
- package/dist/cjs/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +2 -7
- package/dist/cjs/plugins/adapters/contracts/DaiUsdsAdapterContract.js +14 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626AdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +14 -0
- package/dist/cjs/plugins/adapters/contracts/FluidDexAdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +21 -0
- package/dist/cjs/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +10 -0
- package/dist/cjs/plugins/adapters/contracts/LidoV1AdapterContract.js +11 -0
- package/dist/cjs/plugins/adapters/contracts/MellowDVVAdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/MellowWrapperAdapterContract.js +11 -0
- package/dist/cjs/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +10 -0
- package/dist/cjs/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +12 -0
- package/dist/cjs/plugins/adapters/contracts/PendleRouterAdapterContract.js +58 -0
- package/dist/cjs/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +11 -0
- package/dist/cjs/plugins/adapters/contracts/SecuritizeSwapAdapterContract.js +22 -1
- package/dist/cjs/plugins/adapters/contracts/StakingRewardsAdapterContract.js +17 -0
- package/dist/cjs/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +10 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV2AdapterContract.js +10 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV3AdapterContract.js +20 -0
- package/dist/cjs/plugins/adapters/contracts/UniswapV4AdapterContract.js +15 -0
- package/dist/cjs/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +14 -0
- package/dist/cjs/plugins/adapters/contracts/VelodromeV2AdapterContract.js +10 -0
- package/dist/cjs/plugins/adapters/contracts/WstETHV1AdapterContract.js +15 -0
- package/dist/cjs/preview/parse/classifyInnerOperations.js +14 -1
- package/dist/cjs/preview/prerequisites/buildPrerequisites.js +3 -8
- package/dist/cjs/preview/preview/errors.js +16 -0
- package/dist/cjs/preview/preview/previewOpenCreditAccount.js +56 -25
- package/dist/cjs/preview/preview/{extractExpectedBalanceChanges.js → unwrapNativeCollateral.js} +20 -23
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +3 -4
- package/dist/cjs/sdk/base/BaseContract.js +4 -2
- package/dist/cjs/sdk/base/ChainContractsRegister.js +1 -0
- package/dist/cjs/sdk/router/AbstractRouterContract.js +21 -27
- package/dist/cjs/sdk/router/RouterV310Contract.js +11 -12
- package/dist/cjs/sdk/router/helpers.js +0 -5
- package/dist/cjs/sdk/utils/AddressMap.js +6 -0
- package/dist/cjs/sdk/utils/AssetsMap.js +61 -0
- package/dist/cjs/sdk/utils/index.js +2 -0
- package/dist/esm/dev/AccountOpener.js +8 -13
- package/dist/esm/history/classifyMulticallOperations.js +2 -0
- package/dist/esm/history/mapOperations.js +7 -0
- package/dist/esm/plugins/adapters/abi/iConvexV1BoosterAdapter.js +119 -0
- package/dist/esm/plugins/adapters/abi/index.js +1 -0
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +36 -0
- package/dist/esm/plugins/adapters/contracts/AbstractCurveAdapter.js +42 -0
- package/dist/esm/plugins/adapters/contracts/BalancerV3RouterAdapterContract.js +22 -1
- package/dist/esm/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.js +18 -1
- package/dist/esm/plugins/adapters/contracts/CamelotV3AdapterContract.js +23 -1
- package/dist/esm/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.js +22 -1
- package/dist/esm/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.js +30 -2
- package/dist/esm/plugins/adapters/contracts/Curve2AssetsAdapterContract.js +2 -7
- package/dist/esm/plugins/adapters/contracts/Curve3AssetsAdapterContract.js +2 -7
- package/dist/esm/plugins/adapters/contracts/Curve4AssetsAdapterContract.js +2 -7
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterDeposit.js +2 -2
- package/dist/esm/plugins/adapters/contracts/CurveV1AdapterStETHContract.js +2 -7
- package/dist/esm/plugins/adapters/contracts/CurveV1StableNGAdapterContract.js +2 -7
- package/dist/esm/plugins/adapters/contracts/DaiUsdsAdapterContract.js +17 -1
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +19 -1
- package/dist/esm/plugins/adapters/contracts/ERC4626ReferralAdapterContract.js +17 -1
- package/dist/esm/plugins/adapters/contracts/FluidDexAdapterContract.js +18 -1
- package/dist/esm/plugins/adapters/contracts/InfinifiGatewayAdapterContract.js +24 -1
- package/dist/esm/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.js +13 -1
- package/dist/esm/plugins/adapters/contracts/LidoV1AdapterContract.js +14 -1
- package/dist/esm/plugins/adapters/contracts/MellowDVVAdapterContract.js +18 -1
- package/dist/esm/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.js +18 -1
- package/dist/esm/plugins/adapters/contracts/MellowWrapperAdapterContract.js +14 -1
- package/dist/esm/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.js +13 -1
- package/dist/esm/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.js +15 -1
- package/dist/esm/plugins/adapters/contracts/PendleRouterAdapterContract.js +61 -1
- package/dist/esm/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.js +14 -1
- package/dist/esm/plugins/adapters/contracts/SecuritizeSwapAdapterContract.js +25 -2
- package/dist/esm/plugins/adapters/contracts/StakingRewardsAdapterContract.js +20 -1
- package/dist/esm/plugins/adapters/contracts/TraderJoeRouterAdapterContract.js +13 -1
- package/dist/esm/plugins/adapters/contracts/UniswapV2AdapterContract.js +10 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV3AdapterContract.js +20 -0
- package/dist/esm/plugins/adapters/contracts/UniswapV4AdapterContract.js +18 -1
- package/dist/esm/plugins/adapters/contracts/UpshiftVaultAdapterContract.js +17 -1
- package/dist/esm/plugins/adapters/contracts/VelodromeV2AdapterContract.js +13 -1
- package/dist/esm/plugins/adapters/contracts/WstETHV1AdapterContract.js +18 -1
- package/dist/esm/preview/parse/classifyInnerOperations.js +14 -1
- package/dist/esm/preview/prerequisites/buildPrerequisites.js +4 -8
- package/dist/esm/preview/preview/errors.js +15 -0
- package/dist/esm/preview/preview/previewOpenCreditAccount.js +59 -26
- package/dist/esm/preview/preview/unwrapNativeCollateral.js +21 -0
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +4 -5
- package/dist/esm/sdk/base/BaseContract.js +4 -2
- package/dist/esm/sdk/base/ChainContractsRegister.js +1 -0
- package/dist/esm/sdk/router/AbstractRouterContract.js +25 -29
- package/dist/esm/sdk/router/RouterV310Contract.js +11 -12
- package/dist/esm/sdk/router/helpers.js +0 -4
- package/dist/esm/sdk/utils/AddressMap.js +6 -0
- package/dist/esm/sdk/utils/AssetsMap.js +37 -0
- package/dist/esm/sdk/utils/index.js +1 -0
- package/dist/types/common-utils/utils/strategies/assets/assets.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/credit-managers/get-wallet-balances-allowed-on-cm.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/strategy-info/calculate-total-apy.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/strategy-info/calculate-total-points.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/tokens/add-amount-in-target.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/tokens/get-list-with-amount-in-target.d.ts +1 -1
- package/dist/types/common-utils/utils/strategies/types/strategy-earnings.d.ts +1 -1
- package/dist/types/common-utils/utils/validation/validate-balances.d.ts +1 -1
- package/dist/types/common-utils/utils/validation/validate-open-account.d.ts +1 -1
- package/dist/types/common-utils/utils/validation/validate-quota.d.ts +1 -1
- package/dist/types/common-utils/utils/validation/validate-token-to-obtain.d.ts +1 -1
- package/dist/types/plugins/adapters/abi/iConvexV1BoosterAdapter.d.ts +204 -0
- package/dist/types/plugins/adapters/abi/index.d.ts +1 -0
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +21 -3
- package/dist/types/plugins/adapters/contracts/AbstractCurveAdapter.d.ts +18 -0
- package/dist/types/plugins/adapters/contracts/BalancerV3RouterAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/BalancerV3WrapperAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/CamelotV3AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +8 -6
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +3 -6
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +3 -6
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +3 -6
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +2 -2
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +3 -6
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +3 -6
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/FluidDexAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/InfinifiGatewayAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/KelpLRTDepositPoolAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/MellowWrapperAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/MidasIssuanceVaultAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/MidasRedemptionVaultAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/PendleRouterAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/SecuritizeOnRampAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/SecuritizeSwapAdapterContract.d.ts +15 -3
- package/dist/types/plugins/adapters/contracts/StakingRewardsAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/TraderJoeRouterAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +3 -1
- package/dist/types/plugins/adapters/contracts/UniswapV3AdapterContract.d.ts +3 -1
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/UpshiftVaultAdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/VelodromeV2AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +4 -2
- package/dist/types/plugins/adapters/types.d.ts +10 -0
- package/dist/types/preview/parse/types-adapters.d.ts +5 -1
- package/dist/types/preview/parse/types-facades.d.ts +23 -1
- package/dist/types/preview/preview/errors.d.ts +12 -0
- package/dist/types/preview/preview/types.d.ts +9 -1
- package/dist/types/preview/preview/unwrapNativeCollateral.d.ts +20 -0
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +1 -1
- package/dist/types/sdk/accounts/types.d.ts +2 -2
- package/dist/types/sdk/base/BaseContract.d.ts +1 -1
- package/dist/types/sdk/base/TokensMeta.d.ts +1 -1
- package/dist/types/sdk/base/types.d.ts +18 -0
- package/dist/types/sdk/pools/types.d.ts +1 -1
- package/dist/types/sdk/router/AbstractRouterContract.d.ts +5 -5
- package/dist/types/sdk/router/helpers.d.ts +1 -2
- package/dist/types/sdk/router/types.d.ts +1 -15
- package/dist/types/sdk/utils/AddressMap.d.ts +4 -0
- package/dist/types/sdk/utils/AssetsMap.d.ts +26 -0
- package/dist/types/sdk/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/esm/preview/preview/extractExpectedBalanceChanges.js +0 -24
- package/dist/types/preview/preview/extractExpectedBalanceChanges.d.ts +0 -21
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local copy of the Convex V1 Booster adapter ABI.
|
|
3
|
+
*
|
|
4
|
+
* The ABI published by `@gearbox-protocol/integrations-v3` is generated from
|
|
5
|
+
* `IConvexV1BoosterAdapter.sol`, which declares `depositDiff`/`withdrawDiff`
|
|
6
|
+
* args as `(leftoverAmount, _pid, ...)`, while the deployed implementation
|
|
7
|
+
* (`ConvexV1_Booster.sol`) — and the calldata encoded by the router — uses
|
|
8
|
+
* `(_pid, leftoverAmount, ...)`. Selectors only depend on types, so encoding
|
|
9
|
+
* works on-chain, but decoding with the interface ABI yields swapped argument
|
|
10
|
+
* names. This copy fixes the argument order to match the implementation.
|
|
11
|
+
*/
|
|
12
|
+
export declare const iConvexV1BoosterAdapterAbi: readonly [{
|
|
13
|
+
readonly type: "function";
|
|
14
|
+
readonly inputs: readonly [];
|
|
15
|
+
readonly name: "contractType";
|
|
16
|
+
readonly outputs: readonly [{
|
|
17
|
+
readonly name: "";
|
|
18
|
+
readonly internalType: "bytes32";
|
|
19
|
+
readonly type: "bytes32";
|
|
20
|
+
}];
|
|
21
|
+
readonly stateMutability: "view";
|
|
22
|
+
}, {
|
|
23
|
+
readonly type: "function";
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
readonly name: "creditManager";
|
|
26
|
+
readonly outputs: readonly [{
|
|
27
|
+
readonly name: "";
|
|
28
|
+
readonly internalType: "address";
|
|
29
|
+
readonly type: "address";
|
|
30
|
+
}];
|
|
31
|
+
readonly stateMutability: "view";
|
|
32
|
+
}, {
|
|
33
|
+
readonly type: "function";
|
|
34
|
+
readonly inputs: readonly [{
|
|
35
|
+
readonly name: "_pid";
|
|
36
|
+
readonly internalType: "uint256";
|
|
37
|
+
readonly type: "uint256";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly internalType: "uint256";
|
|
41
|
+
readonly type: "uint256";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "_stake";
|
|
44
|
+
readonly internalType: "bool";
|
|
45
|
+
readonly type: "bool";
|
|
46
|
+
}];
|
|
47
|
+
readonly name: "deposit";
|
|
48
|
+
readonly outputs: readonly [{
|
|
49
|
+
readonly name: "useSafePrices";
|
|
50
|
+
readonly internalType: "bool";
|
|
51
|
+
readonly type: "bool";
|
|
52
|
+
}];
|
|
53
|
+
readonly stateMutability: "nonpayable";
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "function";
|
|
56
|
+
readonly inputs: readonly [{
|
|
57
|
+
readonly name: "_pid";
|
|
58
|
+
readonly internalType: "uint256";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "leftoverAmount";
|
|
62
|
+
readonly internalType: "uint256";
|
|
63
|
+
readonly type: "uint256";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "_stake";
|
|
66
|
+
readonly internalType: "bool";
|
|
67
|
+
readonly type: "bool";
|
|
68
|
+
}];
|
|
69
|
+
readonly name: "depositDiff";
|
|
70
|
+
readonly outputs: readonly [{
|
|
71
|
+
readonly name: "useSafePrices";
|
|
72
|
+
readonly internalType: "bool";
|
|
73
|
+
readonly type: "bool";
|
|
74
|
+
}];
|
|
75
|
+
readonly stateMutability: "nonpayable";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "function";
|
|
78
|
+
readonly inputs: readonly [{
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly internalType: "uint256";
|
|
81
|
+
readonly type: "uint256";
|
|
82
|
+
}];
|
|
83
|
+
readonly name: "pidToConvexToken";
|
|
84
|
+
readonly outputs: readonly [{
|
|
85
|
+
readonly name: "";
|
|
86
|
+
readonly internalType: "address";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
}];
|
|
89
|
+
readonly stateMutability: "view";
|
|
90
|
+
}, {
|
|
91
|
+
readonly type: "function";
|
|
92
|
+
readonly inputs: readonly [{
|
|
93
|
+
readonly name: "";
|
|
94
|
+
readonly internalType: "uint256";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
}];
|
|
97
|
+
readonly name: "pidToCurveToken";
|
|
98
|
+
readonly outputs: readonly [{
|
|
99
|
+
readonly name: "";
|
|
100
|
+
readonly internalType: "address";
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
}];
|
|
103
|
+
readonly stateMutability: "view";
|
|
104
|
+
}, {
|
|
105
|
+
readonly type: "function";
|
|
106
|
+
readonly inputs: readonly [{
|
|
107
|
+
readonly name: "";
|
|
108
|
+
readonly internalType: "uint256";
|
|
109
|
+
readonly type: "uint256";
|
|
110
|
+
}];
|
|
111
|
+
readonly name: "pidToPhantomToken";
|
|
112
|
+
readonly outputs: readonly [{
|
|
113
|
+
readonly name: "";
|
|
114
|
+
readonly internalType: "address";
|
|
115
|
+
readonly type: "address";
|
|
116
|
+
}];
|
|
117
|
+
readonly stateMutability: "view";
|
|
118
|
+
}, {
|
|
119
|
+
readonly type: "function";
|
|
120
|
+
readonly inputs: readonly [];
|
|
121
|
+
readonly name: "serialize";
|
|
122
|
+
readonly outputs: readonly [{
|
|
123
|
+
readonly name: "serializedData";
|
|
124
|
+
readonly internalType: "bytes";
|
|
125
|
+
readonly type: "bytes";
|
|
126
|
+
}];
|
|
127
|
+
readonly stateMutability: "view";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
readonly inputs: readonly [];
|
|
131
|
+
readonly name: "targetContract";
|
|
132
|
+
readonly outputs: readonly [{
|
|
133
|
+
readonly name: "";
|
|
134
|
+
readonly internalType: "address";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}];
|
|
137
|
+
readonly stateMutability: "view";
|
|
138
|
+
}, {
|
|
139
|
+
readonly type: "function";
|
|
140
|
+
readonly inputs: readonly [];
|
|
141
|
+
readonly name: "updateSupportedPids";
|
|
142
|
+
readonly outputs: readonly [];
|
|
143
|
+
readonly stateMutability: "nonpayable";
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "function";
|
|
146
|
+
readonly inputs: readonly [];
|
|
147
|
+
readonly name: "version";
|
|
148
|
+
readonly outputs: readonly [{
|
|
149
|
+
readonly name: "";
|
|
150
|
+
readonly internalType: "uint256";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
}];
|
|
153
|
+
readonly stateMutability: "view";
|
|
154
|
+
}, {
|
|
155
|
+
readonly type: "function";
|
|
156
|
+
readonly inputs: readonly [{
|
|
157
|
+
readonly name: "_pid";
|
|
158
|
+
readonly internalType: "uint256";
|
|
159
|
+
readonly type: "uint256";
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "";
|
|
162
|
+
readonly internalType: "uint256";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
}];
|
|
165
|
+
readonly name: "withdraw";
|
|
166
|
+
readonly outputs: readonly [{
|
|
167
|
+
readonly name: "useSafePrices";
|
|
168
|
+
readonly internalType: "bool";
|
|
169
|
+
readonly type: "bool";
|
|
170
|
+
}];
|
|
171
|
+
readonly stateMutability: "nonpayable";
|
|
172
|
+
}, {
|
|
173
|
+
readonly type: "function";
|
|
174
|
+
readonly inputs: readonly [{
|
|
175
|
+
readonly name: "_pid";
|
|
176
|
+
readonly internalType: "uint256";
|
|
177
|
+
readonly type: "uint256";
|
|
178
|
+
}, {
|
|
179
|
+
readonly name: "leftoverAmount";
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly type: "uint256";
|
|
182
|
+
}];
|
|
183
|
+
readonly name: "withdrawDiff";
|
|
184
|
+
readonly outputs: readonly [{
|
|
185
|
+
readonly name: "useSafePrices";
|
|
186
|
+
readonly internalType: "bool";
|
|
187
|
+
readonly type: "bool";
|
|
188
|
+
}];
|
|
189
|
+
readonly stateMutability: "nonpayable";
|
|
190
|
+
}, {
|
|
191
|
+
readonly type: "event";
|
|
192
|
+
readonly anonymous: false;
|
|
193
|
+
readonly inputs: readonly [{
|
|
194
|
+
readonly name: "pid";
|
|
195
|
+
readonly internalType: "uint256";
|
|
196
|
+
readonly type: "uint256";
|
|
197
|
+
readonly indexed: true;
|
|
198
|
+
}];
|
|
199
|
+
readonly name: "AddSupportedPid";
|
|
200
|
+
}, {
|
|
201
|
+
readonly type: "error";
|
|
202
|
+
readonly inputs: readonly [];
|
|
203
|
+
readonly name: "UnsupportedPidException";
|
|
204
|
+
}];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type Abi, type Address } from "viem";
|
|
1
|
+
import { type Abi, type Address, type DecodeFunctionDataReturnType, type Hex } from "viem";
|
|
2
2
|
import { type CallTrace } from "../../../common-utils/utils/trace.js";
|
|
3
|
-
import type { ConstructOptions, ParsedCallV2, RelaxedBaseParams } from "../../../sdk/index.js";
|
|
3
|
+
import type { AddressMap, AssetsMap, ConstructOptions, ParsedCallV2, RelaxedBaseParams } from "../../../sdk/index.js";
|
|
4
4
|
import { BaseContract } from "../../../sdk/index.js";
|
|
5
5
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
6
|
-
import type { AdapterContractStateHuman, AdapterContractType, AdapterProtocolOperation } from "../types.js";
|
|
6
|
+
import type { AdapterContractStateHuman, AdapterContractType, AdapterProtocolOperation, DiffLeftover } from "../types.js";
|
|
7
7
|
export interface ConcreteAdapterContractOptions {
|
|
8
8
|
baseParams: RelaxedBaseParams;
|
|
9
9
|
}
|
|
@@ -36,6 +36,24 @@ export declare class AbstractAdapterContract<const abi extends Abi | readonly un
|
|
|
36
36
|
* @param strict When true, throws instead of returning `undefined`
|
|
37
37
|
*/
|
|
38
38
|
parseProtocolCall(trace: CallTrace, strict?: boolean): AdapterProtocolOperation | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Applies the balance changes implied by a router-generated diff-style
|
|
41
|
+
* adapter call to a map of credit-account token balances.
|
|
42
|
+
*
|
|
43
|
+
* @param balances - Token balances before the call. Mutated in place.
|
|
44
|
+
* @param calldata - Raw ABI-encoded adapter calldata.
|
|
45
|
+
* @throws When the calldata cannot be decoded or the adapter (or the
|
|
46
|
+
* specific function) has no balance-changes support.
|
|
47
|
+
*/
|
|
48
|
+
previewBalanceChanges(balances: AssetsMap, calldata: Hex): void;
|
|
49
|
+
/**
|
|
50
|
+
* Resolves which tokens the diff-style call spends down to which leftovers.
|
|
51
|
+
*
|
|
52
|
+
* @param decoded - The viem-decoded adapter call
|
|
53
|
+
* @param _balances - Token balances before the call
|
|
54
|
+
* @throws When the adapter (or the specific function) has no balance-changes support
|
|
55
|
+
*/
|
|
56
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, _balances: AddressMap<bigint>): DiffLeftover[];
|
|
39
57
|
/**
|
|
40
58
|
* Classifies an adapter call into a {@link LegacyAdapterOperation} using the
|
|
41
59
|
* parsed call and credit-account transfer deltas.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Abi, Address, DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { AddressMap, ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
|
+
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
5
|
+
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
|
+
export declare abstract class AbstractCurveAdapterContract<const abi extends Abi | readonly unknown[], const protocolAbi extends Abi | readonly unknown[]> extends AbstractAdapterContract<abi, protocolAbi> {
|
|
7
|
+
abstract get tokens(): readonly Address[];
|
|
8
|
+
abstract get lpToken(): Address;
|
|
9
|
+
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
10
|
+
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
11
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
12
|
+
/**
|
|
13
|
+
* Resolves a Curve pool coin index to its token address.
|
|
14
|
+
*
|
|
15
|
+
* @throws When the index is out of range for the pool.
|
|
16
|
+
*/
|
|
17
|
+
protected curveCoin(i: bigint | number): Address;
|
|
18
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import type { ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { AddressMap, ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
export declare enum BalancerV3PoolStatus {
|
|
@@ -451,5 +452,6 @@ export declare class BalancerV3RouterAdapterContract extends AbstractAdapterCont
|
|
|
451
452
|
version: number;
|
|
452
453
|
contractType?: string;
|
|
453
454
|
};
|
|
455
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
454
456
|
}
|
|
455
457
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import type { ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { AddressMap, ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
@@ -164,5 +165,6 @@ export declare class BalancerV3WrapperAdapterContract extends AbstractAdapterCon
|
|
|
164
165
|
version: number;
|
|
165
166
|
contractType?: string;
|
|
166
167
|
};
|
|
168
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
167
169
|
}
|
|
168
170
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import type { ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import type { AddressMap, ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
export interface CamelotPool {
|
|
@@ -655,5 +656,6 @@ export declare class CamelotV3AdapterContract extends AbstractAdapterContract<ab
|
|
|
655
656
|
version: number;
|
|
656
657
|
contractType?: string;
|
|
657
658
|
};
|
|
659
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
658
660
|
}
|
|
659
661
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
4
5
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -690,5 +691,6 @@ export declare class ConvexV1BaseRewardPoolAdapterContract extends AbstractAdapt
|
|
|
690
691
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L76-L83
|
|
691
692
|
*/
|
|
692
693
|
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
694
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
693
695
|
}
|
|
694
696
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
4
5
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
7
|
interface ConvexV1BoosterPool {
|
|
@@ -54,11 +55,11 @@ declare const abi: readonly [{
|
|
|
54
55
|
}, {
|
|
55
56
|
readonly type: "function";
|
|
56
57
|
readonly inputs: readonly [{
|
|
57
|
-
readonly name: "
|
|
58
|
+
readonly name: "_pid";
|
|
58
59
|
readonly internalType: "uint256";
|
|
59
60
|
readonly type: "uint256";
|
|
60
61
|
}, {
|
|
61
|
-
readonly name: "
|
|
62
|
+
readonly name: "leftoverAmount";
|
|
62
63
|
readonly internalType: "uint256";
|
|
63
64
|
readonly type: "uint256";
|
|
64
65
|
}, {
|
|
@@ -172,11 +173,11 @@ declare const abi: readonly [{
|
|
|
172
173
|
}, {
|
|
173
174
|
readonly type: "function";
|
|
174
175
|
readonly inputs: readonly [{
|
|
175
|
-
readonly name: "
|
|
176
|
+
readonly name: "_pid";
|
|
176
177
|
readonly internalType: "uint256";
|
|
177
178
|
readonly type: "uint256";
|
|
178
179
|
}, {
|
|
179
|
-
readonly name: "
|
|
180
|
+
readonly name: "leftoverAmount";
|
|
180
181
|
readonly internalType: "uint256";
|
|
181
182
|
readonly type: "uint256";
|
|
182
183
|
}];
|
|
@@ -421,5 +422,6 @@ export declare class ConvexV1BoosterAdapterContract extends AbstractAdapterContr
|
|
|
421
422
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L84-L91
|
|
422
423
|
*/
|
|
423
424
|
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
425
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
424
426
|
}
|
|
425
427
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions
|
|
3
|
-
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
2
|
+
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
4
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
7
6
|
readonly type: "function";
|
|
8
7
|
readonly inputs: readonly [{
|
|
@@ -1753,7 +1752,7 @@ declare const protocolAbi: readonly [{
|
|
|
1753
1752
|
readonly stateMutability: "view";
|
|
1754
1753
|
}];
|
|
1755
1754
|
type protocolAbi = typeof protocolAbi;
|
|
1756
|
-
export declare class Curve2AssetsAdapterContract extends
|
|
1755
|
+
export declare class Curve2AssetsAdapterContract extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1757
1756
|
#private;
|
|
1758
1757
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1759
1758
|
get token(): Address;
|
|
@@ -1775,7 +1774,5 @@ export declare class Curve2AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1775
1774
|
version: number;
|
|
1776
1775
|
contractType?: string;
|
|
1777
1776
|
};
|
|
1778
|
-
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1777
|
}
|
|
1781
1778
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions
|
|
3
|
-
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
2
|
+
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
4
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
7
6
|
readonly type: "function";
|
|
8
7
|
readonly inputs: readonly [{
|
|
@@ -1753,7 +1752,7 @@ declare const protocolAbi: readonly [{
|
|
|
1753
1752
|
readonly stateMutability: "view";
|
|
1754
1753
|
}];
|
|
1755
1754
|
type protocolAbi = typeof protocolAbi;
|
|
1756
|
-
export declare class Curve3AssetsAdapterContract extends
|
|
1755
|
+
export declare class Curve3AssetsAdapterContract extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1757
1756
|
#private;
|
|
1758
1757
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1759
1758
|
get token(): Address;
|
|
@@ -1775,7 +1774,5 @@ export declare class Curve3AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1775
1774
|
version: number;
|
|
1776
1775
|
contractType?: string;
|
|
1777
1776
|
};
|
|
1778
|
-
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1777
|
}
|
|
1781
1778
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions
|
|
3
|
-
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
2
|
+
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
4
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
7
6
|
readonly type: "function";
|
|
8
7
|
readonly inputs: readonly [{
|
|
@@ -1753,7 +1752,7 @@ declare const protocolAbi: readonly [{
|
|
|
1753
1752
|
readonly stateMutability: "view";
|
|
1754
1753
|
}];
|
|
1755
1754
|
type protocolAbi = typeof protocolAbi;
|
|
1756
|
-
export declare class Curve4AssetsAdapterContract extends
|
|
1755
|
+
export declare class Curve4AssetsAdapterContract extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1757
1756
|
#private;
|
|
1758
1757
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1759
1758
|
get token(): Address;
|
|
@@ -1775,7 +1774,5 @@ export declare class Curve4AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1775
1774
|
version: number;
|
|
1776
1775
|
contractType?: string;
|
|
1777
1776
|
};
|
|
1778
|
-
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1777
|
}
|
|
1781
1778
|
export {};
|
|
@@ -2,7 +2,7 @@ import { type Address } from "viem";
|
|
|
2
2
|
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
5
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
6
|
declare const abi: readonly [{
|
|
7
7
|
readonly type: "function";
|
|
8
8
|
readonly inputs: readonly [{
|
|
@@ -1029,7 +1029,7 @@ declare const protocolAbi: readonly [{
|
|
|
1029
1029
|
readonly stateMutability: "view";
|
|
1030
1030
|
}];
|
|
1031
1031
|
type protocolAbi = typeof protocolAbi;
|
|
1032
|
-
export declare class CurveV1AdapterDeposit extends
|
|
1032
|
+
export declare class CurveV1AdapterDeposit extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1033
1033
|
#private;
|
|
1034
1034
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1035
1035
|
get token(): Address;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions
|
|
3
|
-
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
2
|
+
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
4
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
7
6
|
readonly type: "function";
|
|
8
7
|
readonly inputs: readonly [{
|
|
@@ -1753,7 +1752,7 @@ declare const protocolAbi: readonly [{
|
|
|
1753
1752
|
readonly stateMutability: "view";
|
|
1754
1753
|
}];
|
|
1755
1754
|
type protocolAbi = typeof protocolAbi;
|
|
1756
|
-
export declare class CurveV1AdapterStETHContract extends
|
|
1755
|
+
export declare class CurveV1AdapterStETHContract extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1757
1756
|
#private;
|
|
1758
1757
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1759
1758
|
get token(): Address;
|
|
@@ -1762,7 +1761,5 @@ export declare class CurveV1AdapterStETHContract extends AbstractAdapterContract
|
|
|
1762
1761
|
get nCoins(): number;
|
|
1763
1762
|
get use256(): boolean;
|
|
1764
1763
|
get tokens(): [Address, Address];
|
|
1765
|
-
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1766
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1767
1764
|
}
|
|
1768
1765
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions
|
|
3
|
-
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
2
|
+
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
4
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
|
-
import {
|
|
4
|
+
import { AbstractCurveAdapterContract } from "./AbstractCurveAdapter.js";
|
|
6
5
|
declare const abi: readonly [{
|
|
7
6
|
readonly type: "function";
|
|
8
7
|
readonly inputs: readonly [{
|
|
@@ -1721,7 +1720,7 @@ declare const protocolAbi: readonly [{
|
|
|
1721
1720
|
readonly stateMutability: "view";
|
|
1722
1721
|
}];
|
|
1723
1722
|
type protocolAbi = typeof protocolAbi;
|
|
1724
|
-
export declare class CurveV1StableNGAdapterContract extends
|
|
1723
|
+
export declare class CurveV1StableNGAdapterContract extends AbstractCurveAdapterContract<abi, protocolAbi> {
|
|
1725
1724
|
#private;
|
|
1726
1725
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
1727
1726
|
get token(): Address;
|
|
@@ -1745,7 +1744,5 @@ export declare class CurveV1StableNGAdapterContract extends AbstractAdapterContr
|
|
|
1745
1744
|
version: number;
|
|
1746
1745
|
contractType?: string;
|
|
1747
1746
|
};
|
|
1748
|
-
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1749
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1750
1747
|
}
|
|
1751
1748
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
4
5
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -205,5 +206,6 @@ export declare class DaiUsdsAdapterContract extends AbstractAdapterContract<abi,
|
|
|
205
206
|
};
|
|
206
207
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L51-L68 */
|
|
207
208
|
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
209
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
208
210
|
}
|
|
209
211
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
4
5
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -672,5 +673,6 @@ export declare class ERC4626AdapterContract extends AbstractAdapterContract<abi,
|
|
|
672
673
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L32-L38
|
|
673
674
|
*/
|
|
674
675
|
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
676
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
675
677
|
}
|
|
676
678
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions, type ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
3
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
+
import type { DiffLeftover } from "../types.js";
|
|
4
5
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
5
6
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
6
7
|
declare const abi: readonly [{
|
|
@@ -299,5 +300,6 @@ export declare class ERC4626ReferralAdapterContract extends AbstractAdapterContr
|
|
|
299
300
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L32-L38
|
|
300
301
|
*/
|
|
301
302
|
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
303
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
302
304
|
}
|
|
303
305
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
@@ -252,5 +253,6 @@ export declare class FluidDexAdapterContract extends AbstractAdapterContract<abi
|
|
|
252
253
|
version: number;
|
|
253
254
|
contractType?: string;
|
|
254
255
|
};
|
|
256
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
255
257
|
}
|
|
256
258
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
@@ -483,5 +484,6 @@ export declare class InfinifiGatewayAdapterContract extends AbstractAdapterContr
|
|
|
483
484
|
version: number;
|
|
484
485
|
contractType?: string;
|
|
485
486
|
};
|
|
487
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
486
488
|
}
|
|
487
489
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import { type ConstructOptions } from "../../../sdk/index.js";
|
|
1
|
+
import { type Address, type DecodeFunctionDataReturnType } from "viem";
|
|
2
|
+
import { type AddressMap, type ConstructOptions } from "../../../sdk/index.js";
|
|
3
|
+
import type { DiffLeftover } from "../types.js";
|
|
3
4
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
4
5
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
5
6
|
declare const abi: readonly [{
|
|
@@ -249,5 +250,6 @@ export declare class KelpLRTDepositPoolAdapterContract extends AbstractAdapterCo
|
|
|
249
250
|
version: number;
|
|
250
251
|
contractType?: string;
|
|
251
252
|
};
|
|
253
|
+
protected decodeDiffLeftovers(decoded: DecodeFunctionDataReturnType<abi>, balances: AddressMap<bigint>): DiffLeftover[];
|
|
252
254
|
}
|
|
253
255
|
export {};
|