@gearbox-protocol/sdk 12.9.3 → 12.9.4

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.
@@ -30,6 +30,7 @@ function parseCreditAccountTransaction(input) {
30
30
  receipt,
31
31
  pool,
32
32
  creditFacade,
33
+ creditManager,
33
34
  creditAccount,
34
35
  underlying,
35
36
  register,
@@ -53,6 +54,7 @@ function parseCreditAccountTransaction(input) {
53
54
  phantomTokens
54
55
  } = (0, import_extractTransfers.extractTransfers)(logs, creditAccount, pool, creditFacade);
55
56
  const meta = {
57
+ creditManager,
56
58
  creditFacade,
57
59
  timestamp,
58
60
  blockNumber,
@@ -56,7 +56,7 @@ function createLegacyVisitor(params) {
56
56
  operation: op.operation,
57
57
  amount: op.amount.toString(),
58
58
  ...innerCommonFields(ctx, params),
59
- protocol: params.creditManager
59
+ protocol: ctx.creditManager
60
60
  };
61
61
  },
62
62
  DecreaseBorrowedAmount(op, ctx) {
@@ -64,7 +64,7 @@ function createLegacyVisitor(params) {
64
64
  operation: op.operation,
65
65
  amount: op.amount.toString(),
66
66
  ...innerCommonFields(ctx, params),
67
- protocol: params.creditManager
67
+ protocol: ctx.creditManager
68
68
  };
69
69
  },
70
70
  AddCollateral(op, ctx) {
@@ -7,6 +7,7 @@ function parseCreditAccountTransaction(input) {
7
7
  receipt,
8
8
  pool,
9
9
  creditFacade,
10
+ creditManager,
10
11
  creditAccount,
11
12
  underlying,
12
13
  register,
@@ -30,6 +31,7 @@ function parseCreditAccountTransaction(input) {
30
31
  phantomTokens
31
32
  } = extractTransfers(logs, creditAccount, pool, creditFacade);
32
33
  const meta = {
34
+ creditManager,
33
35
  creditFacade,
34
36
  timestamp,
35
37
  blockNumber,
@@ -32,7 +32,7 @@ function createLegacyVisitor(params) {
32
32
  operation: op.operation,
33
33
  amount: op.amount.toString(),
34
34
  ...innerCommonFields(ctx, params),
35
- protocol: params.creditManager
35
+ protocol: ctx.creditManager
36
36
  };
37
37
  },
38
38
  DecreaseBorrowedAmount(op, ctx) {
@@ -40,7 +40,7 @@ function createLegacyVisitor(params) {
40
40
  operation: op.operation,
41
41
  amount: op.amount.toString(),
42
42
  ...innerCommonFields(ctx, params),
43
- protocol: params.creditManager
43
+ protocol: ctx.creditManager
44
44
  };
45
45
  },
46
46
  AddCollateral(op, ctx) {
@@ -12,6 +12,7 @@ export interface ParseTransactionInput {
12
12
  * Underlying token of the pool.
13
13
  */
14
14
  underlying: Address;
15
+ creditManager: Address;
15
16
  creditFacade: Address;
16
17
  creditAccount: Address;
17
18
  register: ChainContractsRegister;
@@ -1,4 +1,4 @@
1
- import type { Address, Hex } from "viem";
1
+ import type { Hex } from "viem";
2
2
  import { type OperationVisitor } from "./mapOperations.js";
3
3
  import type { CreditAccountOperation } from "./types.js";
4
4
  export interface LegacyApiOperation {
@@ -13,7 +13,6 @@ export interface LegacyMulticallOp {
13
13
  }
14
14
  export interface LegacyVisitorParams {
15
15
  sessionId: string;
16
- creditManager: Address;
17
16
  }
18
17
  export declare function createLegacyVisitor(params: LegacyVisitorParams): OperationVisitor<LegacyMulticallOp, LegacyApiOperation>;
19
18
  export declare function toLegacyOperations(ops: CreditAccountOperation[], params: LegacyVisitorParams): LegacyApiOperation[];
@@ -15,6 +15,7 @@ export interface OperationMetadata {
15
15
  timestamp: number;
16
16
  }
17
17
  export interface FacadeOperationMetadata extends OperationMetadata {
18
+ creditManager: Address;
18
19
  creditFacade: Address;
19
20
  }
20
21
  export interface MulticallOperation extends FacadeOperationMetadata {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "12.9.3",
3
+ "version": "12.9.4",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",