@gearbox-protocol/sdk 8.14.0 → 8.14.2
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.
|
@@ -43,6 +43,7 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
43
43
|
#anvil;
|
|
44
44
|
#logger;
|
|
45
45
|
#borrower;
|
|
46
|
+
#depositor;
|
|
46
47
|
#faucet;
|
|
47
48
|
#poolDepositMultiplier;
|
|
48
49
|
#minDebtMultiplier;
|
|
@@ -60,6 +61,7 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
60
61
|
this.#logger?.warn("faucet not found, will not claim from faucet");
|
|
61
62
|
}
|
|
62
63
|
this.#borrower = options.borrower;
|
|
64
|
+
this.#depositor = options.depositor;
|
|
63
65
|
this.#poolDepositMultiplier = options.poolDepositMultiplier ?? 11000n;
|
|
64
66
|
this.#minDebtMultiplier = options.minDebtMultiplier ?? 10100n;
|
|
65
67
|
}
|
|
@@ -314,7 +316,7 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
314
316
|
this.#logger?.debug(
|
|
315
317
|
`total USD to claim from faucet: ${(0, import_sdk.formatBN)(totalUSD, 8)}`
|
|
316
318
|
);
|
|
317
|
-
const depositor = await this.#createAccount();
|
|
319
|
+
const depositor = this.#depositor ?? await this.#createAccount();
|
|
318
320
|
this.#logger?.debug(`created depositor ${depositor.address}`);
|
|
319
321
|
await this.#claimFromFaucet(depositor, "depositor", totalUSD);
|
|
320
322
|
const results = [];
|
|
@@ -35,6 +35,7 @@ class AccountOpener extends SDKConstruct {
|
|
|
35
35
|
#anvil;
|
|
36
36
|
#logger;
|
|
37
37
|
#borrower;
|
|
38
|
+
#depositor;
|
|
38
39
|
#faucet;
|
|
39
40
|
#poolDepositMultiplier;
|
|
40
41
|
#minDebtMultiplier;
|
|
@@ -52,6 +53,7 @@ class AccountOpener extends SDKConstruct {
|
|
|
52
53
|
this.#logger?.warn("faucet not found, will not claim from faucet");
|
|
53
54
|
}
|
|
54
55
|
this.#borrower = options.borrower;
|
|
56
|
+
this.#depositor = options.depositor;
|
|
55
57
|
this.#poolDepositMultiplier = options.poolDepositMultiplier ?? 11000n;
|
|
56
58
|
this.#minDebtMultiplier = options.minDebtMultiplier ?? 10100n;
|
|
57
59
|
}
|
|
@@ -306,7 +308,7 @@ class AccountOpener extends SDKConstruct {
|
|
|
306
308
|
this.#logger?.debug(
|
|
307
309
|
`total USD to claim from faucet: ${formatBN(totalUSD, 8)}`
|
|
308
310
|
);
|
|
309
|
-
const depositor = await this.#createAccount();
|
|
311
|
+
const depositor = this.#depositor ?? await this.#createAccount();
|
|
310
312
|
this.#logger?.debug(`created depositor ${depositor.address}`);
|
|
311
313
|
await this.#claimFromFaucet(depositor, "depositor", totalUSD);
|
|
312
314
|
const results = [];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type Account, type Address, type PublicClient, type WalletClient } from "viem";
|
|
2
2
|
import { type ILogger } from "../sdk/index.js";
|
|
3
3
|
interface ClaimFromFaucetOptions {
|
|
4
4
|
publicClient: PublicClient;
|
|
5
5
|
wallet: WalletClient;
|
|
6
6
|
faucet: Address;
|
|
7
|
-
claimer:
|
|
7
|
+
claimer: Account;
|
|
8
8
|
role?: string;
|
|
9
9
|
amountUSD?: bigint | ((minAmountUSD: bigint) => bigint);
|
|
10
10
|
gasMultiplier?: bigint;
|