@gearbox-protocol/sdk 3.0.0-next.39 → 3.0.0-next.40
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MultiCall } from "../pathfinder/core";
|
|
2
2
|
import { ChartsCreditManagerPayload, CreditManagerDataPayload, QuotaInfo } from "../payload/creditManager";
|
|
3
3
|
import { LinearModel } from "../payload/pool";
|
|
4
|
+
import { Asset } from "./assets";
|
|
4
5
|
import { PoolType } from "./pool";
|
|
5
6
|
export declare class CreditManagerData {
|
|
6
7
|
readonly address: string;
|
|
@@ -46,6 +47,8 @@ export declare class CreditManagerData {
|
|
|
46
47
|
encodeEnableTokenV3(token: string): MultiCall;
|
|
47
48
|
encodeDisableTokenV2(token: string): MultiCall;
|
|
48
49
|
encodeDisableTokenV3(token: string): MultiCall;
|
|
50
|
+
encodeRevertIfReceivedLessThanV2(assets: Array<Asset>): MultiCall;
|
|
51
|
+
encodeRevertIfReceivedLessThanV3(assets: Array<Asset>): MultiCall;
|
|
49
52
|
encodeUpdateQuotaV3(token: string, quotaChange: bigint, minQuota: bigint): MultiCall;
|
|
50
53
|
static withdrawAllAndUnwrap_Convex(address: string, claim: boolean): MultiCall;
|
|
51
54
|
}
|
|
@@ -176,6 +176,18 @@ class CreditManagerData {
|
|
|
176
176
|
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("disableToken", [token]),
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
+
encodeRevertIfReceivedLessThanV2(assets) {
|
|
180
|
+
return {
|
|
181
|
+
target: this.creditFacade,
|
|
182
|
+
callData: types_1.ICreditFacadeV2Extended__factory.createInterface().encodeFunctionData("revertIfReceivedLessThan", [assets]),
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
encodeRevertIfReceivedLessThanV3(assets) {
|
|
186
|
+
return {
|
|
187
|
+
target: this.creditFacade,
|
|
188
|
+
callData: types_1.ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData("revertIfReceivedLessThan", [assets.map(a => ({ token: a.token, amount: a.balance }))]),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
179
191
|
encodeUpdateQuotaV3(token, quotaChange, minQuota) {
|
|
180
192
|
return {
|
|
181
193
|
target: this.creditFacade,
|