@gearbox-protocol/sdk 12.9.4 → 12.9.5
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.
|
@@ -122,6 +122,7 @@ function createLegacyVisitor(params) {
|
|
|
122
122
|
txHash: op.txHash,
|
|
123
123
|
blockNum: op.blockNumber,
|
|
124
124
|
...commonFields(op, params),
|
|
125
|
+
multicall,
|
|
125
126
|
// TODO: missing legacy fields:
|
|
126
127
|
// userFunds: require prices to compute as
|
|
127
128
|
// sum of AddCollateral/WithdrawCollateral amounts denominated in underlying token.
|
|
@@ -129,7 +130,9 @@ function createLegacyVisitor(params) {
|
|
|
129
130
|
//
|
|
130
131
|
// leverage: (userFunds + borrowAmount) / userFunds
|
|
131
132
|
// where borrowAmount = sum of IncreaseDebt amounts in multicall (computable from data)
|
|
132
|
-
|
|
133
|
+
userFunds: "0",
|
|
134
|
+
initialFunds: "0",
|
|
135
|
+
leverage: "0"
|
|
133
136
|
};
|
|
134
137
|
},
|
|
135
138
|
CloseCreditAccount(op, multicall) {
|
|
@@ -138,9 +141,10 @@ function createLegacyVisitor(params) {
|
|
|
138
141
|
txHash: op.txHash,
|
|
139
142
|
blockNum: op.blockNumber,
|
|
140
143
|
...commonFields(op, params),
|
|
144
|
+
multicall,
|
|
141
145
|
// TODO: missing legacy fields:
|
|
142
146
|
// remainingFunds:
|
|
143
|
-
|
|
147
|
+
remainingFunds: "0"
|
|
144
148
|
};
|
|
145
149
|
},
|
|
146
150
|
LiquidateCreditAccount(op, multicall) {
|
|
@@ -98,6 +98,7 @@ function createLegacyVisitor(params) {
|
|
|
98
98
|
txHash: op.txHash,
|
|
99
99
|
blockNum: op.blockNumber,
|
|
100
100
|
...commonFields(op, params),
|
|
101
|
+
multicall,
|
|
101
102
|
// TODO: missing legacy fields:
|
|
102
103
|
// userFunds: require prices to compute as
|
|
103
104
|
// sum of AddCollateral/WithdrawCollateral amounts denominated in underlying token.
|
|
@@ -105,7 +106,9 @@ function createLegacyVisitor(params) {
|
|
|
105
106
|
//
|
|
106
107
|
// leverage: (userFunds + borrowAmount) / userFunds
|
|
107
108
|
// where borrowAmount = sum of IncreaseDebt amounts in multicall (computable from data)
|
|
108
|
-
|
|
109
|
+
userFunds: "0",
|
|
110
|
+
initialFunds: "0",
|
|
111
|
+
leverage: "0"
|
|
109
112
|
};
|
|
110
113
|
},
|
|
111
114
|
CloseCreditAccount(op, multicall) {
|
|
@@ -114,9 +117,10 @@ function createLegacyVisitor(params) {
|
|
|
114
117
|
txHash: op.txHash,
|
|
115
118
|
blockNum: op.blockNumber,
|
|
116
119
|
...commonFields(op, params),
|
|
120
|
+
multicall,
|
|
117
121
|
// TODO: missing legacy fields:
|
|
118
122
|
// remainingFunds:
|
|
119
|
-
|
|
123
|
+
remainingFunds: "0"
|
|
120
124
|
};
|
|
121
125
|
},
|
|
122
126
|
LiquidateCreditAccount(op, multicall) {
|