@gearbox-protocol/sdk 14.11.0-next.9 → 14.11.1
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/common-utils/utils/index.js +0 -2
- package/dist/cjs/dev/index.js +1 -3
- package/dist/cjs/dev/isOutOfSyncError.js +3 -1
- package/dist/cjs/history/assembleOperations.js +6 -6
- package/dist/cjs/history/classifyMulticallOperations.js +25 -31
- package/dist/cjs/{preview/trace → history}/errors.js +26 -0
- package/dist/cjs/history/extractProtocolCalls.js +53 -0
- package/dist/cjs/{preview/trace → history}/extractTransfers.js +23 -11
- package/dist/cjs/{preview/trace → history}/findFacadeCalls.js +3 -3
- package/dist/cjs/history/index.js +2 -0
- package/dist/cjs/{preview/parse/types-facades.js → history/inner-operations.js} +2 -2
- package/dist/cjs/{preview/parse/types-adapters.js → history/internal-types.js} +2 -2
- package/dist/cjs/history/parseCreditAccountTransaction.js +6 -5
- package/dist/cjs/history/toLegacyOperation.js +2 -6
- package/dist/cjs/{common-utils/utils/trace.js → history/trace-utils.js} +5 -62
- package/dist/cjs/permissionless/bindings/pricefeeds/curve-twap.js +2 -2
- package/dist/cjs/plugins/adapters/contracts/AbstractAdapter.js +37 -25
- package/dist/cjs/plugins/adapters/contracts/AccountMigratorAdapterContract.js +0 -9
- package/dist/esm/common-utils/utils/index.js +0 -1
- package/dist/esm/dev/index.js +0 -1
- package/dist/esm/dev/isOutOfSyncError.js +3 -1
- package/dist/esm/history/assembleOperations.js +6 -8
- package/dist/esm/history/classifyMulticallOperations.js +23 -29
- package/dist/esm/{preview/trace → history}/errors.js +24 -0
- package/dist/esm/history/extractProtocolCalls.js +32 -0
- package/dist/esm/{preview/trace → history}/extractTransfers.js +23 -11
- package/dist/esm/{preview/trace → history}/findFacadeCalls.js +2 -4
- package/dist/esm/history/index.js +1 -0
- package/dist/esm/history/parseCreditAccountTransaction.js +4 -3
- package/dist/esm/history/toLegacyOperation.js +2 -6
- package/dist/esm/history/trace-utils.js +36 -0
- package/dist/esm/permissionless/bindings/pricefeeds/curve-twap.js +2 -2
- package/dist/esm/plugins/adapters/contracts/AbstractAdapter.js +38 -28
- package/dist/esm/plugins/adapters/contracts/AccountMigratorAdapterContract.js +0 -9
- package/dist/types/common-utils/utils/index.d.ts +0 -1
- package/dist/types/dev/index.d.ts +0 -1
- package/dist/types/history/assembleOperations.d.ts +6 -11
- package/dist/types/history/classifyMulticallOperations.d.ts +9 -21
- package/dist/types/{preview/trace → history}/errors.d.ts +10 -0
- package/dist/types/history/extractProtocolCalls.d.ts +8 -0
- package/dist/types/{preview/trace → history}/extractTransfers.d.ts +7 -15
- package/dist/types/{preview/trace → history}/findFacadeCalls.d.ts +2 -3
- package/dist/types/history/index.d.ts +1 -0
- package/dist/types/history/inner-operations.d.ts +57 -0
- package/dist/types/history/internal-types.d.ts +47 -0
- package/dist/types/history/mapOperations.d.ts +9 -7
- package/dist/types/history/trace-utils.d.ts +12 -0
- package/dist/types/history/types.d.ts +71 -22
- package/dist/types/plugins/adapters/contracts/AbstractAdapter.d.ts +17 -16
- package/dist/types/plugins/adapters/contracts/AccountMigratorAdapterContract.d.ts +1 -10
- package/dist/types/plugins/adapters/contracts/ConvexV1BaseRewardPoolAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/ConvexV1BoosterAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/Curve2AssetsAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/Curve3AssetsAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/Curve4AssetsAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterDeposit.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/CurveV1AdapterStETHContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/CurveV1StableNGAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/DaiUsdsAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/ERC4626AdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/ERC4626ReferralAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/LidoV1AdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/MellowDVVAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/MellowERC4626VaultAdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/UniswapV2AdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/UniswapV4AdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/contracts/WstETHV1AdapterContract.d.ts +1 -1
- package/dist/types/plugins/adapters/transferHelpers.d.ts +1 -1
- package/dist/types/plugins/adapters/types.d.ts +46 -8
- package/package.json +12 -17
- package/dist/cjs/dev/verifyTestnet.js +0 -124
- package/dist/cjs/plugins/adapters/transfers.js +0 -16
- package/dist/cjs/preview/index.js +0 -28
- package/dist/cjs/preview/package.json +0 -1
- package/dist/cjs/preview/parse/classifyInnerOperations.js +0 -92
- package/dist/cjs/preview/parse/errors.js +0 -47
- package/dist/cjs/preview/parse/extractExpectedBalanceChanges.js +0 -48
- package/dist/cjs/preview/parse/index.js +0 -34
- package/dist/cjs/preview/parse/parseFacadeOperationCalldata.js +0 -115
- package/dist/cjs/preview/parse/parseOperationCalldata.js +0 -46
- package/dist/cjs/preview/parse/parsePoolOperationCalldata.js +0 -77
- package/dist/cjs/preview/parse/types-pools.js +0 -16
- package/dist/cjs/preview/parse/types.js +0 -37
- package/dist/cjs/preview/prerequisites/AllowancePrerequisite.js +0 -78
- package/dist/cjs/preview/prerequisites/BalancePrerequisite.js +0 -77
- package/dist/cjs/preview/prerequisites/Prerequisite.js +0 -85
- package/dist/cjs/preview/prerequisites/buildPrerequisites.js +0 -187
- package/dist/cjs/preview/prerequisites/index.js +0 -34
- package/dist/cjs/preview/prerequisites/prepareAction.js +0 -48
- package/dist/cjs/preview/prerequisites/runPrerequisites.js +0 -71
- package/dist/cjs/preview/prerequisites/types.js +0 -16
- package/dist/cjs/preview/simulate/constants.js +0 -28
- package/dist/cjs/preview/simulate/errors.js +0 -98
- package/dist/cjs/preview/simulate/extractERC20Transfers.js +0 -47
- package/dist/cjs/preview/simulate/holders.js +0 -45
- package/dist/cjs/preview/simulate/index.js +0 -40
- package/dist/cjs/preview/simulate/simulateFacadeOperation.js +0 -30
- package/dist/cjs/preview/simulate/simulateOperation.js +0 -37
- package/dist/cjs/preview/simulate/simulatePoolOpMulticall.js +0 -155
- package/dist/cjs/preview/simulate/simulatePoolOpV1.js +0 -106
- package/dist/cjs/preview/simulate/simulatePoolOperation.js +0 -62
- package/dist/cjs/preview/simulate/types.js +0 -16
- package/dist/cjs/preview/trace/extractAdapterCallTraces.js +0 -58
- package/dist/cjs/preview/trace/index.js +0 -30
- package/dist/cjs/preview/trace/types.js +0 -16
- package/dist/esm/common-utils/utils/trace.js +0 -93
- package/dist/esm/dev/verifyTestnet.js +0 -98
- package/dist/esm/preview/index.js +0 -4
- package/dist/esm/preview/package.json +0 -1
- package/dist/esm/preview/parse/classifyInnerOperations.js +0 -68
- package/dist/esm/preview/parse/errors.js +0 -22
- package/dist/esm/preview/parse/extractExpectedBalanceChanges.js +0 -24
- package/dist/esm/preview/parse/index.js +0 -7
- package/dist/esm/preview/parse/parseFacadeOperationCalldata.js +0 -91
- package/dist/esm/preview/parse/parseOperationCalldata.js +0 -25
- package/dist/esm/preview/parse/parsePoolOperationCalldata.js +0 -53
- package/dist/esm/preview/parse/types-facades.js +0 -0
- package/dist/esm/preview/parse/types-pools.js +0 -0
- package/dist/esm/preview/parse/types.js +0 -9
- package/dist/esm/preview/prerequisites/AllowancePrerequisite.js +0 -57
- package/dist/esm/preview/prerequisites/BalancePrerequisite.js +0 -56
- package/dist/esm/preview/prerequisites/Prerequisite.js +0 -63
- package/dist/esm/preview/prerequisites/buildPrerequisites.js +0 -163
- package/dist/esm/preview/prerequisites/index.js +0 -7
- package/dist/esm/preview/prerequisites/prepareAction.js +0 -23
- package/dist/esm/preview/prerequisites/runPrerequisites.js +0 -47
- package/dist/esm/preview/prerequisites/types.js +0 -0
- package/dist/esm/preview/simulate/constants.js +0 -4
- package/dist/esm/preview/simulate/errors.js +0 -75
- package/dist/esm/preview/simulate/extractERC20Transfers.js +0 -23
- package/dist/esm/preview/simulate/holders.js +0 -21
- package/dist/esm/preview/simulate/index.js +0 -12
- package/dist/esm/preview/simulate/simulateFacadeOperation.js +0 -6
- package/dist/esm/preview/simulate/simulateOperation.js +0 -13
- package/dist/esm/preview/simulate/simulatePoolOpMulticall.js +0 -130
- package/dist/esm/preview/simulate/simulatePoolOpV1.js +0 -82
- package/dist/esm/preview/simulate/simulatePoolOperation.js +0 -41
- package/dist/esm/preview/simulate/types.js +0 -0
- package/dist/esm/preview/trace/extractAdapterCallTraces.js +0 -40
- package/dist/esm/preview/trace/index.js +0 -5
- package/dist/esm/preview/trace/types.js +0 -0
- package/dist/types/common-utils/utils/trace.d.ts +0 -73
- package/dist/types/dev/verifyTestnet.d.ts +0 -82
- package/dist/types/plugins/adapters/transfers.d.ts +0 -17
- package/dist/types/preview/index.d.ts +0 -4
- package/dist/types/preview/parse/classifyInnerOperations.d.ts +0 -21
- package/dist/types/preview/parse/errors.d.ts +0 -17
- package/dist/types/preview/parse/extractExpectedBalanceChanges.d.ts +0 -22
- package/dist/types/preview/parse/index.d.ts +0 -7
- package/dist/types/preview/parse/parseFacadeOperationCalldata.d.ts +0 -19
- package/dist/types/preview/parse/parseOperationCalldata.d.ts +0 -23
- package/dist/types/preview/parse/parsePoolOperationCalldata.d.ts +0 -17
- package/dist/types/preview/parse/types-adapters.d.ts +0 -69
- package/dist/types/preview/parse/types-facades.d.ts +0 -157
- package/dist/types/preview/parse/types-pools.d.ts +0 -55
- package/dist/types/preview/parse/types.d.ts +0 -44
- package/dist/types/preview/prerequisites/AllowancePrerequisite.d.ts +0 -24
- package/dist/types/preview/prerequisites/BalancePrerequisite.d.ts +0 -23
- package/dist/types/preview/prerequisites/Prerequisite.d.ts +0 -60
- package/dist/types/preview/prerequisites/buildPrerequisites.d.ts +0 -16
- package/dist/types/preview/prerequisites/index.d.ts +0 -7
- package/dist/types/preview/prerequisites/prepareAction.d.ts +0 -52
- package/dist/types/preview/prerequisites/runPrerequisites.d.ts +0 -12
- package/dist/types/preview/prerequisites/types.d.ts +0 -78
- package/dist/types/preview/simulate/constants.d.ts +0 -6
- package/dist/types/preview/simulate/errors.d.ts +0 -51
- package/dist/types/preview/simulate/extractERC20Transfers.d.ts +0 -11
- package/dist/types/preview/simulate/holders.d.ts +0 -7
- package/dist/types/preview/simulate/index.d.ts +0 -9
- package/dist/types/preview/simulate/simulateFacadeOperation.d.ts +0 -25
- package/dist/types/preview/simulate/simulateOperation.d.ts +0 -20
- package/dist/types/preview/simulate/simulatePoolOpMulticall.d.ts +0 -28
- package/dist/types/preview/simulate/simulatePoolOpV1.d.ts +0 -14
- package/dist/types/preview/simulate/simulatePoolOperation.d.ts +0 -8
- package/dist/types/preview/simulate/types.d.ts +0 -79
- package/dist/types/preview/trace/extractAdapterCallTraces.d.ts +0 -23
- package/dist/types/preview/trace/index.d.ts +0 -5
- package/dist/types/preview/trace/types.d.ts +0 -21
- /package/dist/esm/{plugins/adapters/transfers.js → history/inner-operations.js} +0 -0
- /package/dist/esm/{preview/parse/types-adapters.js → history/internal-types.js} +0 -0
|
@@ -12,15 +12,6 @@ class AccountMigratorAdapterContract extends AbstractAdapterContract {
|
|
|
12
12
|
`classifyLegacyOperation is not supported for legacy adapter: ${this.contractType}`
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
16
|
-
* The account-migrator adapter's `execute` targets the migrator bot, not an
|
|
17
|
-
* external protocol, so there is no protocol-level call to recover. Returning
|
|
18
|
-
* `undefined` keeps the `protocol` field aligned with its external-protocol
|
|
19
|
-
* semantics (see {@link TraceAdapterExt}).
|
|
20
|
-
*/
|
|
21
|
-
parseProtocolCall(_trace, _strict) {
|
|
22
|
-
return void 0;
|
|
23
|
-
}
|
|
24
15
|
}
|
|
25
16
|
export {
|
|
26
17
|
AccountMigratorAdapterContract
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import type { TokenTransfer } from "../preview/parse/index.js";
|
|
3
|
-
import { type FacadeParsedCall, type WithdrawCollateralEventInfo } from "../preview/trace/index.js";
|
|
4
2
|
import type { AddressMap, ChainContractsRegister } from "../sdk/index.js";
|
|
5
|
-
import type {
|
|
3
|
+
import type { WithdrawCollateralEventInfo } from "./extractTransfers.js";
|
|
4
|
+
import type { ExecuteResult, FacadeParsedCall } from "./internal-types.js";
|
|
5
|
+
import type { FacadeOperationMetadata, OuterFacadeOperation } from "./types.js";
|
|
6
6
|
export interface AssembleOperationsInput {
|
|
7
7
|
facadeCalls: FacadeParsedCall[];
|
|
8
|
-
|
|
9
|
-
* ERC-20 transfers grouped per facade `Execute` event, one inner array per
|
|
10
|
-
* Execute event across the whole transaction, in emission order. Sliced per
|
|
11
|
-
* facade call and consumed one inner array per adapter/unknown inner call.
|
|
12
|
-
*/
|
|
13
|
-
executeTransfers: TokenTransfer[][];
|
|
8
|
+
executeResults: ExecuteResult[];
|
|
14
9
|
register: ChainContractsRegister;
|
|
15
10
|
underlying: Address;
|
|
16
11
|
liquidationRemainingFunds?: bigint;
|
|
@@ -22,8 +17,8 @@ export interface AssembleOperationsInput {
|
|
|
22
17
|
* Combines parsed facade calls with per-Execute transfer data into
|
|
23
18
|
* fully classified {@link OuterFacadeOperation} entries.
|
|
24
19
|
*
|
|
25
|
-
* The flat `
|
|
20
|
+
* The flat `executeResults` array (one entry per Execute event across
|
|
26
21
|
* the entire transaction) is sliced per facade call based on how many
|
|
27
22
|
* adapter/unknown inner calls each one contains.
|
|
28
23
|
*/
|
|
29
|
-
export declare function assembleOperations(input: AssembleOperationsInput): Omit<OuterFacadeOperation, keyof
|
|
24
|
+
export declare function assembleOperations(input: AssembleOperationsInput): Omit<OuterFacadeOperation, keyof FacadeOperationMetadata>[];
|
|
@@ -1,23 +1,12 @@
|
|
|
1
|
-
import { type Address } from "viem";
|
|
2
|
-
import type { CallTrace } from "../common-utils/utils/trace.js";
|
|
3
|
-
import type { TokenTransfer } from "../preview/parse/index.js";
|
|
4
|
-
import { type WithdrawCollateralEventInfo } from "../preview/trace/index.js";
|
|
1
|
+
import { type Address, type Hex } from "viem";
|
|
5
2
|
import type { AddressMap, ChainContractsRegister, ParsedCallV2 } from "../sdk/index.js";
|
|
6
|
-
import type {
|
|
3
|
+
import type { WithdrawCollateralEventInfo } from "./extractTransfers.js";
|
|
4
|
+
import type { InnerOperation } from "./inner-operations.js";
|
|
5
|
+
import type { ExecuteResult } from "./internal-types.js";
|
|
7
6
|
export interface ClassifyMulticallOperationsInput {
|
|
8
7
|
innerCalls: ParsedCallV2[];
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* one inner array per Execute event, in order. One inner array is consumed
|
|
12
|
-
* per adapter/unknown inner call.
|
|
13
|
-
*/
|
|
14
|
-
executeTransfers: TokenTransfer[][];
|
|
15
|
-
/**
|
|
16
|
-
* Adapter-level call traces (one per Execute event, in order) used to recover
|
|
17
|
-
* the protocol-level call for adapter inner calls. See
|
|
18
|
-
* `extractAdapterCallTraces`.
|
|
19
|
-
*/
|
|
20
|
-
adapterTraces: CallTrace[];
|
|
8
|
+
executeResults: ExecuteResult[];
|
|
9
|
+
protocolCalldatas: Hex[];
|
|
21
10
|
register: ChainContractsRegister;
|
|
22
11
|
creditAccount: Address;
|
|
23
12
|
underlying: Address;
|
|
@@ -28,10 +17,9 @@ export interface ClassifyMulticallOperationsInput {
|
|
|
28
17
|
/**
|
|
29
18
|
* Classifies each multicall inner call into a {@link InnerOperation}:
|
|
30
19
|
*
|
|
31
|
-
* - **Adapter calls** (target registered as an adapter):
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* next entry from `executeTransfers` (one Execute event per adapter call).
|
|
20
|
+
* - **Adapter calls** (target registered as an adapter): delegates to
|
|
21
|
+
* `adapter.parseAdapterOperation()` and consumes the next entry from
|
|
22
|
+
* `executeTransfers` (one Execute event per adapter call).
|
|
35
23
|
*
|
|
36
24
|
* - **Facade self-calls** (`increaseDebt`, `updateQuota`, etc.): mapped
|
|
37
25
|
* directly from `functionName` / `rawArgs`. No transfer consumed.
|
|
@@ -9,6 +9,16 @@ export declare class TransferAlignmentError extends Error {
|
|
|
9
9
|
export declare class WithdrawCollateralAlignmentError extends Error {
|
|
10
10
|
constructor(expected: number, actual: number);
|
|
11
11
|
}
|
|
12
|
+
export declare class ProtocolCallNotFoundError extends Error {
|
|
13
|
+
readonly targetContract: Address;
|
|
14
|
+
readonly executeIndex: number;
|
|
15
|
+
constructor(targetContract: Address, executeIndex: number);
|
|
16
|
+
}
|
|
17
|
+
export declare class AdapterTraceAlignmentError extends Error {
|
|
18
|
+
readonly expected: number;
|
|
19
|
+
readonly actual: number;
|
|
20
|
+
constructor(expected: number, actual: number);
|
|
21
|
+
}
|
|
12
22
|
export declare class UnexpectedFacadeEventOrderError extends Error {
|
|
13
23
|
constructor(e: {
|
|
14
24
|
eventName: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Hex } from "viem";
|
|
2
|
+
import type { CallTrace, ExecuteResult } from "./internal-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Extracts calldata sent to target contract for each Execute event.
|
|
5
|
+
*
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function extractProtocolCalls(facadeTrace: CallTrace, executeResults: ExecuteResult[]): Hex[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type Address, type Log } from "viem";
|
|
2
|
-
import { AddressMap } from "
|
|
3
|
-
import type {
|
|
2
|
+
import { AddressMap } from "../sdk/index.js";
|
|
3
|
+
import type { ExecuteResult } from "./internal-types.js";
|
|
4
|
+
import type { DirectTransferInfo } from "./types.js";
|
|
4
5
|
type RawLog = Log<bigint | number, number, false>;
|
|
5
6
|
/**
|
|
6
7
|
* Effective `withdrawCollateral` outcome decoded from the facade's
|
|
@@ -17,25 +18,16 @@ export interface WithdrawCollateralEventInfo {
|
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Extracts per-adapter-call token balance changes and detects direct
|
|
20
|
-
*
|
|
21
|
+
* transfers into and out of the credit account (deposits and withdrawals
|
|
22
|
+
* performed independently of the facade).
|
|
21
23
|
*
|
|
22
24
|
* @param logs - raw viem Log[] from transaction receipt, sorted by logIndex
|
|
23
25
|
* @param facadeAddress - the credit facade address (sole boundary event source)
|
|
24
26
|
* @param creditAccount - the credit account address to track
|
|
25
27
|
*/
|
|
26
28
|
export interface ExtractTransfersResult {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* Execute event across the whole transaction, in emission order. Each inner
|
|
30
|
-
* array holds the transfers to/from the credit account that occurred between
|
|
31
|
-
* that Execute boundary and the previous one.
|
|
32
|
-
*/
|
|
33
|
-
executeTransfers: TokenTransfer[][];
|
|
34
|
-
/**
|
|
35
|
-
* ERC-20 transfers that are not part of a facade `Execute` event and are
|
|
36
|
-
* direct incoming transfers to the credit account.
|
|
37
|
-
*/
|
|
38
|
-
directTransfers: TokenTransfer[];
|
|
29
|
+
executeResults: ExecuteResult[];
|
|
30
|
+
directTransfers: DirectTransferInfo[];
|
|
39
31
|
liquidationRemainingFunds?: bigint;
|
|
40
32
|
/** Maps phantom token address to its deposited (underlying) token address. */
|
|
41
33
|
phantomTokens: AddressMap<Address>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
import type { FacadeParsedCall } from "./types.js";
|
|
2
|
+
import type { ChainContractsRegister } from "../sdk/index.js";
|
|
3
|
+
import type { CallTrace, FacadeParsedCall } from "./internal-types.js";
|
|
5
4
|
/**
|
|
6
5
|
* Walks a `debug_traceTransaction` callTracer tree, finds all non-reverted
|
|
7
6
|
* calls to the credit facade, parses them via the register, and returns
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
import type { AdapterOperation } from "../plugins/adapters/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Increase debt (borrow more).
|
|
5
|
+
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L149-L154
|
|
6
|
+
*/
|
|
7
|
+
export interface IncreaseDebtOp {
|
|
8
|
+
operation: "IncreaseBorrowedAmount";
|
|
9
|
+
token: Address;
|
|
10
|
+
amount: bigint;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Decrease debt (repay).
|
|
14
|
+
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L155-L161
|
|
15
|
+
*/
|
|
16
|
+
export interface DecreaseDebtOp {
|
|
17
|
+
operation: "DecreaseBorrowedAmount";
|
|
18
|
+
token: Address;
|
|
19
|
+
amount: bigint;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Add collateral to credit account.
|
|
23
|
+
*/
|
|
24
|
+
export interface AddCollateralOp {
|
|
25
|
+
operation: "AddCollateral";
|
|
26
|
+
token: Address;
|
|
27
|
+
amount: bigint;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Withdraw collateral from credit account.
|
|
31
|
+
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L162-L171
|
|
32
|
+
*/
|
|
33
|
+
export interface WithdrawCollateralOp {
|
|
34
|
+
operation: "WithdrawCollateral";
|
|
35
|
+
token: Address;
|
|
36
|
+
amount: bigint;
|
|
37
|
+
to: Address;
|
|
38
|
+
phantomToken?: Address;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Update token quota on credit account.
|
|
42
|
+
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L172-L178
|
|
43
|
+
*/
|
|
44
|
+
export interface UpdateQuotaOp {
|
|
45
|
+
operation: "UpdateQuota";
|
|
46
|
+
token: Address;
|
|
47
|
+
change: bigint;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Union of facade inner-call operation types (non-adapter credit account operations).
|
|
51
|
+
* Discriminated on the `operation` field.
|
|
52
|
+
*/
|
|
53
|
+
export type InnerFacadeOperation = IncreaseDebtOp | DecreaseDebtOp | AddCollateralOp | WithdrawCollateralOp | UpdateQuotaOp;
|
|
54
|
+
/**
|
|
55
|
+
* All operations that can happen within a CreditFacade's multicall and that we're interested in.
|
|
56
|
+
*/
|
|
57
|
+
export type InnerOperation = AdapterOperation | InnerFacadeOperation;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
import type { TokenTransfer } from "../plugins/adapters/index.js";
|
|
3
|
+
import type { ParsedCallV2 } from "../sdk/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* A single frame from Ethereum's `debug_traceTransaction` callTracer output.
|
|
6
|
+
* Recursive: each frame may contain nested sub-calls.
|
|
7
|
+
*/
|
|
8
|
+
export interface CallTrace {
|
|
9
|
+
from: Address;
|
|
10
|
+
to: Address;
|
|
11
|
+
input: Hex;
|
|
12
|
+
output: Hex;
|
|
13
|
+
value: Hex;
|
|
14
|
+
/** "CALL", "DELEGATECALL", "STATICCALL", "CREATE", etc. */
|
|
15
|
+
type: string;
|
|
16
|
+
/** Present when the call reverted (e.g. "execution reverted"). */
|
|
17
|
+
error?: string;
|
|
18
|
+
/** ABI-encoded revert data, if available. */
|
|
19
|
+
revertReason?: Hex;
|
|
20
|
+
calls?: CallTrace[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The set of credit facade entry-point functions that produce history operations.
|
|
24
|
+
*/
|
|
25
|
+
export type FacadeCallType = "MultiCall" | "BotMulticall" | "OpenCreditAccount" | "CloseCreditAccount" | "LiquidateCreditAccount" | "PartiallyLiquidateCreditAccount";
|
|
26
|
+
/**
|
|
27
|
+
* A parsed credit facade call extracted from a call trace,
|
|
28
|
+
* with inner multicall calls already decoded.
|
|
29
|
+
*/
|
|
30
|
+
export interface FacadeParsedCall {
|
|
31
|
+
operation: FacadeCallType;
|
|
32
|
+
creditAccount: Address;
|
|
33
|
+
/** The full ParsedCallV2 from facade calldata parsing. */
|
|
34
|
+
parsed: ParsedCallV2;
|
|
35
|
+
/** Inner multicall entries from rawArgs.calls (empty for partiallyLiquidateCreditAccount). */
|
|
36
|
+
innerCalls: ParsedCallV2[];
|
|
37
|
+
/** The full call trace node for this facade call (used to extract protocol-level calldata). */
|
|
38
|
+
trace: CallTrace;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Data extracted from a single Execute event: the ERC-20 transfers that
|
|
42
|
+
* occurred between Execute boundaries and the target contract address.
|
|
43
|
+
*/
|
|
44
|
+
export interface ExecuteResult {
|
|
45
|
+
transfers: TokenTransfer[];
|
|
46
|
+
targetContract: Address;
|
|
47
|
+
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { AdapterOperation
|
|
1
|
+
import type { AdapterOperation } from "../plugins/adapters/index.js";
|
|
2
|
+
import type { AddCollateralOp, DecreaseDebtOp, IncreaseDebtOp, UpdateQuotaOp, WithdrawCollateralOp } from "./inner-operations.js";
|
|
3
|
+
import type { CloseCreditAccountOperation, CreditAccountOperation, DirectTokenTransferOperation, FacadeOperationMetadata, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, PartialLiquidationOperation } from "./types.js";
|
|
2
4
|
/**
|
|
3
5
|
* Visitor that maps each operation node in a {@link CreditAccountOperation}
|
|
4
6
|
* tree to a new representation.
|
|
5
7
|
*
|
|
6
8
|
*/
|
|
7
9
|
export interface OperationVisitor<TInner, TOuter> {
|
|
8
|
-
Execute(op: AdapterOperation, ctx:
|
|
9
|
-
IncreaseBorrowedAmount(op: IncreaseDebtOp, ctx:
|
|
10
|
-
DecreaseBorrowedAmount(op: DecreaseDebtOp, ctx:
|
|
11
|
-
AddCollateral(op: AddCollateralOp, ctx:
|
|
12
|
-
WithdrawCollateral(op: WithdrawCollateralOp, ctx:
|
|
13
|
-
UpdateQuota(op: UpdateQuotaOp, ctx:
|
|
10
|
+
Execute(op: AdapterOperation, ctx: FacadeOperationMetadata): TInner;
|
|
11
|
+
IncreaseBorrowedAmount(op: IncreaseDebtOp, ctx: FacadeOperationMetadata): TInner;
|
|
12
|
+
DecreaseBorrowedAmount(op: DecreaseDebtOp, ctx: FacadeOperationMetadata): TInner;
|
|
13
|
+
AddCollateral(op: AddCollateralOp, ctx: FacadeOperationMetadata): TInner;
|
|
14
|
+
WithdrawCollateral(op: WithdrawCollateralOp, ctx: FacadeOperationMetadata): TInner;
|
|
15
|
+
UpdateQuota(op: UpdateQuotaOp, ctx: FacadeOperationMetadata): TInner;
|
|
14
16
|
DirectTokenTransfer(op: DirectTokenTransferOperation): TOuter;
|
|
15
17
|
MultiCall(op: MulticallOperation, multicall: TInner[]): TOuter;
|
|
16
18
|
OpenCreditAccount(op: OpenCreditAccountOperation, multicall: TInner[]): TOuter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Address } from "viem";
|
|
2
|
+
import type { CallTrace } from "./internal-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Finds the first non-reverted CALL to `target` anywhere in a trace subtree.
|
|
5
|
+
*/
|
|
6
|
+
export declare function findCallTo(node: CallTrace, target: Address): CallTrace | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* DFS walk of the call trace tree, collecting non-reverted CALL entries
|
|
9
|
+
* to the given address.
|
|
10
|
+
* Does not recurse into children of matched nodes
|
|
11
|
+
*/
|
|
12
|
+
export declare function collectTraces(node: CallTrace, target: Address): CallTrace[];
|
|
@@ -1,28 +1,77 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
export type { AddCollateralOp, DecreaseDebtOp, FacadeOperationMetadata, IncreaseDebtOp, InnerFacadeOperation, OperationMetadata, UpdateQuotaOp, WithdrawCollateralOp, } from "../preview/parse/index.js";
|
|
1
|
+
import type { Address, Hex } from "viem";
|
|
2
|
+
import type { InnerOperation } from "./inner-operations.js";
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `
|
|
4
|
+
* An ERC-20 Transfer into or out of the credit account that was not part of
|
|
5
|
+
* any facade operation (multicall, liquidation, etc.).
|
|
6
|
+
*
|
|
7
|
+
* `from`/`to` are the raw transfer endpoints: an inbound transfer (manual
|
|
8
|
+
* top-up / deposit) has `to` == the credit account, an outbound transfer
|
|
9
|
+
* (direct withdrawal) has `from` == the credit account.
|
|
9
10
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
export interface DirectTransferInfo {
|
|
12
|
+
token: Address;
|
|
13
|
+
from: Address;
|
|
14
|
+
to: Address;
|
|
15
|
+
amount: bigint;
|
|
16
|
+
}
|
|
17
|
+
export interface OperationMetadata {
|
|
18
|
+
txHash: Hex;
|
|
19
|
+
blockNumber: number;
|
|
20
|
+
timestamp: number;
|
|
21
|
+
}
|
|
22
|
+
export interface FacadeOperationMetadata extends OperationMetadata {
|
|
23
|
+
creditManager: Address;
|
|
24
|
+
creditFacade: Address;
|
|
25
|
+
}
|
|
26
|
+
export interface MulticallOperation extends FacadeOperationMetadata {
|
|
27
|
+
operation: "MultiCall" | "BotMulticall";
|
|
28
|
+
creditAccount: Address;
|
|
29
|
+
multicall: InnerOperation[];
|
|
30
|
+
}
|
|
31
|
+
export interface OpenCreditAccountOperation extends FacadeOperationMetadata {
|
|
32
|
+
operation: "OpenCreditAccount";
|
|
33
|
+
creditAccount: Address;
|
|
34
|
+
onBehalfOf: Address;
|
|
35
|
+
referralCode: bigint;
|
|
36
|
+
multicall: InnerOperation[];
|
|
37
|
+
}
|
|
38
|
+
export interface CloseCreditAccountOperation extends FacadeOperationMetadata {
|
|
39
|
+
operation: "CloseCreditAccount";
|
|
40
|
+
creditAccount: Address;
|
|
41
|
+
multicall: InnerOperation[];
|
|
42
|
+
}
|
|
43
|
+
export interface LiquidateCreditAccountOperation extends FacadeOperationMetadata {
|
|
44
|
+
operation: "LiquidateCreditAccount";
|
|
45
|
+
creditAccount: Address;
|
|
46
|
+
to: Address;
|
|
47
|
+
token: Address;
|
|
48
|
+
remainingFunds: bigint;
|
|
49
|
+
multicall: InnerOperation[];
|
|
50
|
+
}
|
|
51
|
+
export interface PartialLiquidationOperation extends FacadeOperationMetadata {
|
|
52
|
+
operation: "PartiallyLiquidateCreditAccount";
|
|
53
|
+
creditAccount: Address;
|
|
54
|
+
token: Address;
|
|
55
|
+
repaidAmount: bigint;
|
|
56
|
+
minSeizedAmount: bigint;
|
|
57
|
+
to: Address;
|
|
58
|
+
}
|
|
59
|
+
export interface DirectTokenTransferOperation extends OperationMetadata {
|
|
60
|
+
operation: "DirectTokenTransfer";
|
|
61
|
+
protocol: Address;
|
|
62
|
+
token: Address;
|
|
63
|
+
from: Address;
|
|
64
|
+
to: Address;
|
|
65
|
+
creditAccount: Address;
|
|
66
|
+
amount: bigint;
|
|
67
|
+
}
|
|
13
68
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* {@link OperationMetadata} that is only known once the transaction is mined.
|
|
69
|
+
* Discriminated union of all facade-level operation types.
|
|
70
|
+
* One per facade entry-point call within a transaction.
|
|
17
71
|
*/
|
|
18
|
-
export type HistoryFacadeMetadata = FacadeOperationMetadata & OperationMetadata;
|
|
19
|
-
export type AdapterOperation = BaseAdapterOperation<HistoryAdapterExt>;
|
|
20
|
-
export type InnerOperation = BaseInnerOperation<HistoryAdapterExt>;
|
|
21
|
-
export type MulticallOperation = Omit<BaseMulticallOperation<HistoryAdapterExt>, "expectedBalanceChanges"> & OperationMetadata;
|
|
22
|
-
export type OpenCreditAccountOperation = Omit<BaseOpenCreditAccountOperation<HistoryAdapterExt>, "expectedBalanceChanges"> & OperationMetadata;
|
|
23
|
-
export type CloseCreditAccountOperation = Omit<BaseCloseCreditAccountOperation<HistoryAdapterExt>, "expectedBalanceChanges"> & OperationMetadata;
|
|
24
|
-
export type LiquidateCreditAccountOperation = Omit<BaseLiquidateCreditAccountOperation<HistoryAdapterExt>, "expectedBalanceChanges"> & OperationMetadata;
|
|
25
|
-
export type PartialLiquidationOperation = BasePartialLiquidationOperation & OperationMetadata;
|
|
26
|
-
export type DirectTokenTransferOperation = BaseDirectTokenTransferOperation & OperationMetadata;
|
|
27
72
|
export type OuterFacadeOperation = MulticallOperation | OpenCreditAccountOperation | CloseCreditAccountOperation | LiquidateCreditAccountOperation | PartialLiquidationOperation;
|
|
73
|
+
/**
|
|
74
|
+
* Discriminated union of all credit account operation types
|
|
75
|
+
* (facade operations + direct token transfers).
|
|
76
|
+
*/
|
|
28
77
|
export type CreditAccountOperation = OuterFacadeOperation | DirectTokenTransferOperation;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type Abi, type Address } from "viem";
|
|
2
|
-
import { type CallTrace } from "../../../common-utils/utils/trace.js";
|
|
1
|
+
import { type Abi, type Address, type Hex, type PartialBy } from "viem";
|
|
3
2
|
import type { ConstructOptions, ParsedCallV2, RelaxedBaseParams } from "../../../sdk/index.js";
|
|
4
3
|
import { BaseContract } from "../../../sdk/index.js";
|
|
5
4
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
6
|
-
import type { AdapterContractStateHuman, AdapterContractType,
|
|
5
|
+
import type { AdapterContractStateHuman, AdapterContractType, AdapterOperation, TokenTransfer } from "../types.js";
|
|
7
6
|
export interface ConcreteAdapterContractOptions {
|
|
8
7
|
baseParams: RelaxedBaseParams;
|
|
9
8
|
}
|
|
@@ -23,19 +22,23 @@ export declare class AbstractAdapterContract<const abi extends Abi | readonly un
|
|
|
23
22
|
get adapterType(): AdapterContractType;
|
|
24
23
|
stateHuman(raw?: boolean): AdapterContractStateHuman;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* performed by this adapter, recovered from its adapter-level call trace.
|
|
25
|
+
* Builds an {@link AdapterOperation} from a parsed call and ordered transfer entries.
|
|
28
26
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
27
|
+
* Returns `PartialBy<AdapterOperation, "targetContract">` because the adapter
|
|
28
|
+
* may not have `targetContract` (adapters created without SDK do not have serializedParams)
|
|
31
29
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
* @param protocolCalldata Raw calldata of the actual CALL to targetContract, extracted from trace
|
|
31
|
+
* @param strict When true, throws if protocol ABI is missing or decode fails
|
|
32
|
+
*/
|
|
33
|
+
parseAdapterOperation(parsed: ParsedCallV2, transfers: TokenTransfer[], creditAccount: Address, protocolCalldata: Hex, strict?: boolean): PartialBy<AdapterOperation, "protocol">;
|
|
34
|
+
/**
|
|
35
|
+
* Decodes protocol-level function name and args from the raw calldata
|
|
36
|
+
* sent to targetContract.
|
|
37
37
|
*/
|
|
38
|
-
parseProtocolCall(
|
|
38
|
+
protected parseProtocolCall(calldata: Hex, strict?: boolean): {
|
|
39
|
+
protocolFunctionName: string;
|
|
40
|
+
protocolArgs: Record<string, unknown>;
|
|
41
|
+
};
|
|
39
42
|
/**
|
|
40
43
|
* Classifies an adapter call into a {@link LegacyAdapterOperation} using the
|
|
41
44
|
* parsed call and credit-account transfer deltas.
|
|
@@ -47,8 +50,6 @@ export declare class AbstractAdapterContract<const abi extends Abi | readonly un
|
|
|
47
50
|
* Override in protocol-specific subclasses for richer classification.
|
|
48
51
|
*
|
|
49
52
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/account_operation.go#L238-L264
|
|
50
|
-
*
|
|
51
|
-
* @deprecated Eventually will be gone, exists to produce output that legacy UI can display
|
|
52
53
|
*/
|
|
53
|
-
classifyLegacyOperation(_parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
54
|
+
protected classifyLegacyOperation(_parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
54
55
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { CallTrace } from "../../../common-utils/utils/trace.js";
|
|
2
1
|
import type { ConstructOptions, ParsedCallV2 } from "../../../sdk/index.js";
|
|
3
2
|
import type { LegacyAdapterOperation, Transfers } from "../legacyAdapterOperations.js";
|
|
4
|
-
import type { AdapterProtocolOperation } from "../types.js";
|
|
5
3
|
import type { ConcreteAdapterContractOptions } from "./AbstractAdapter.js";
|
|
6
4
|
import { AbstractAdapterContract } from "./AbstractAdapter.js";
|
|
7
5
|
declare const abi: readonly [{
|
|
@@ -469,13 +467,6 @@ type protocolAbi = typeof protocolAbi;
|
|
|
469
467
|
export declare class AccountMigratorAdapterContract extends AbstractAdapterContract<abi, protocolAbi> {
|
|
470
468
|
constructor(options: ConstructOptions, args: ConcreteAdapterContractOptions);
|
|
471
469
|
/** Legacy adapter not present in integrations-v3. */
|
|
472
|
-
classifyLegacyOperation(_parsed: ParsedCallV2, _transfers: Transfers): LegacyAdapterOperation;
|
|
473
|
-
/**
|
|
474
|
-
* The account-migrator adapter's `execute` targets the migrator bot, not an
|
|
475
|
-
* external protocol, so there is no protocol-level call to recover. Returning
|
|
476
|
-
* `undefined` keeps the `protocol` field aligned with its external-protocol
|
|
477
|
-
* semantics (see {@link TraceAdapterExt}).
|
|
478
|
-
*/
|
|
479
|
-
parseProtocolCall(_trace: CallTrace, _strict?: boolean): AdapterProtocolOperation | undefined;
|
|
470
|
+
protected classifyLegacyOperation(_parsed: ParsedCallV2, _transfers: Transfers): LegacyAdapterOperation;
|
|
480
471
|
}
|
|
481
472
|
export {};
|
|
@@ -689,6 +689,6 @@ export declare class ConvexV1BaseRewardPoolAdapterContract extends AbstractAdapt
|
|
|
689
689
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L200-L262
|
|
690
690
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L76-L83
|
|
691
691
|
*/
|
|
692
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
692
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
693
693
|
}
|
|
694
694
|
export {};
|
|
@@ -420,6 +420,6 @@ export declare class ConvexV1BoosterAdapterContract extends AbstractAdapterContr
|
|
|
420
420
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L166-L199
|
|
421
421
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L84-L91
|
|
422
422
|
*/
|
|
423
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
423
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
424
424
|
}
|
|
425
425
|
export {};
|
|
@@ -1776,6 +1776,6 @@ export declare class Curve2AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1776
1776
|
contractType?: string;
|
|
1777
1777
|
};
|
|
1778
1778
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1779
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1780
|
}
|
|
1781
1781
|
export {};
|
|
@@ -1776,6 +1776,6 @@ export declare class Curve3AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1776
1776
|
contractType?: string;
|
|
1777
1777
|
};
|
|
1778
1778
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1779
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1780
|
}
|
|
1781
1781
|
export {};
|
|
@@ -1776,6 +1776,6 @@ export declare class Curve4AssetsAdapterContract extends AbstractAdapterContract
|
|
|
1776
1776
|
contractType?: string;
|
|
1777
1777
|
};
|
|
1778
1778
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1779
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1779
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1780
1780
|
}
|
|
1781
1781
|
export {};
|
|
@@ -1040,6 +1040,6 @@ export declare class CurveV1AdapterDeposit extends AbstractAdapterContract<abi,
|
|
|
1040
1040
|
get tokens(): [Address, Address, Address, Address];
|
|
1041
1041
|
get underlyings(): [Address, Address, Address, Address];
|
|
1042
1042
|
/** Legacy adapter not present in integrations-v3. Go: Curve operations via operation_type.go L132-L164 */
|
|
1043
|
-
classifyLegacyOperation(_parsed: ParsedCallV2, _transfers: Transfers): LegacyAdapterOperation;
|
|
1043
|
+
protected classifyLegacyOperation(_parsed: ParsedCallV2, _transfers: Transfers): LegacyAdapterOperation;
|
|
1044
1044
|
}
|
|
1045
1045
|
export {};
|
|
@@ -1763,6 +1763,6 @@ export declare class CurveV1AdapterStETHContract extends AbstractAdapterContract
|
|
|
1763
1763
|
get use256(): boolean;
|
|
1764
1764
|
get tokens(): [Address, Address];
|
|
1765
1765
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1766
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1766
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1767
1767
|
}
|
|
1768
1768
|
export {};
|
|
@@ -1746,6 +1746,6 @@ export declare class CurveV1StableNGAdapterContract extends AbstractAdapterContr
|
|
|
1746
1746
|
contractType?: string;
|
|
1747
1747
|
};
|
|
1748
1748
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L132-L164 */
|
|
1749
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1749
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
1750
1750
|
}
|
|
1751
1751
|
export {};
|
|
@@ -204,6 +204,6 @@ export declare class DaiUsdsAdapterContract extends AbstractAdapterContract<abi,
|
|
|
204
204
|
contractType?: string;
|
|
205
205
|
};
|
|
206
206
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L51-L68 */
|
|
207
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
207
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
208
208
|
}
|
|
209
209
|
export {};
|
|
@@ -671,6 +671,6 @@ export declare class ERC4626AdapterContract extends AbstractAdapterContract<abi,
|
|
|
671
671
|
*
|
|
672
672
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L32-L38
|
|
673
673
|
*/
|
|
674
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
674
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
675
675
|
}
|
|
676
676
|
export {};
|
|
@@ -298,6 +298,6 @@ export declare class ERC4626ReferralAdapterContract extends AbstractAdapterContr
|
|
|
298
298
|
/**
|
|
299
299
|
* @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type_v3.go#L32-L38
|
|
300
300
|
*/
|
|
301
|
-
classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
301
|
+
protected classifyLegacyOperation(parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
302
302
|
}
|
|
303
303
|
export {};
|
|
@@ -213,6 +213,6 @@ export declare class LidoV1AdapterContract extends AbstractAdapterContract<abi,
|
|
|
213
213
|
contractType?: string;
|
|
214
214
|
};
|
|
215
215
|
/** @see https://github.com/Gearbox-protocol/charts_server/blob/master/core/operation_type.go#L277-L282 */
|
|
216
|
-
classifyLegacyOperation(_parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
216
|
+
protected classifyLegacyOperation(_parsed: ParsedCallV2, transfers: Transfers): LegacyAdapterOperation;
|
|
217
217
|
}
|
|
218
218
|
export {};
|