@gearbox-protocol/sdk 11.8.3 → 11.8.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.
- package/dist/cjs/dev/AccountOpener.js +20 -0
- package/dist/cjs/sdk/chain/chains.js +1 -1
- package/dist/cjs/sdk/sdk-legacy/tokens/tokenData.js +0 -1
- package/dist/esm/dev/AccountOpener.js +20 -0
- package/dist/esm/sdk/chain/chains.js +1 -1
- package/dist/esm/sdk/sdk-legacy/tokens/tokenData.js +0 -1
- package/package.json +1 -1
|
@@ -77,6 +77,18 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
77
77
|
this.#poolDepositMultiplier = BigInt(poolDepositMultiplier);
|
|
78
78
|
this.#minDebtMultiplier = BigInt(minDebtMultiplier);
|
|
79
79
|
this.#leverageDelta = BigInt(leverageDelta);
|
|
80
|
+
this.#logger?.info(
|
|
81
|
+
{
|
|
82
|
+
borrower: (0, import_accounts.privateKeyToAccount)(this.borrowerKey).address,
|
|
83
|
+
depositor: (0, import_accounts.privateKeyToAccount)(this.depositorKey).address,
|
|
84
|
+
faucet: this.faucet,
|
|
85
|
+
poolDepositMultiplier: this.#poolDepositMultiplier.toString(),
|
|
86
|
+
minDebtMultiplier: this.#minDebtMultiplier.toString(),
|
|
87
|
+
leverageDelta: this.#leverageDelta.toString(),
|
|
88
|
+
allowMint: this.#allowMint
|
|
89
|
+
},
|
|
90
|
+
"account opener options"
|
|
91
|
+
);
|
|
80
92
|
}
|
|
81
93
|
get borrower() {
|
|
82
94
|
if (!this.#borrower) {
|
|
@@ -94,6 +106,14 @@ class AccountOpener extends import_sdk.SDKConstruct {
|
|
|
94
106
|
* Tries to open account with underlying only in each CM
|
|
95
107
|
*/
|
|
96
108
|
async openCreditAccounts(targets, depositIntoPools = true, claimFromFaucet2 = true) {
|
|
109
|
+
this.#logger?.info(
|
|
110
|
+
{
|
|
111
|
+
targets,
|
|
112
|
+
depositIntoPools,
|
|
113
|
+
claimFromFaucet: claimFromFaucet2
|
|
114
|
+
},
|
|
115
|
+
"opening credit accounts"
|
|
116
|
+
);
|
|
97
117
|
let deposits = [];
|
|
98
118
|
if (depositIntoPools) {
|
|
99
119
|
try {
|
|
@@ -60,7 +60,6 @@ const HUMAN_READABLE_TITLES = {
|
|
|
60
60
|
["0xd412ca00d177eba2843348f9c50dd17bfce32c40".toLowerCase()]: "pzETH\xA0\u2192\xA0wstETH",
|
|
61
61
|
["0x26c98674e623647f11909791593fa3b6e9406c67".toLowerCase()]: "steak7LRT\xA0\u2192\xA0wstETH",
|
|
62
62
|
["0x9fb930eacadad079683a4758424a53b9b3692775".toLowerCase()]: "Re7LRT\xA0\u2192\xA0wstETH",
|
|
63
|
-
STT: "SOMI",
|
|
64
63
|
ETHPlus: "ETH+"
|
|
65
64
|
};
|
|
66
65
|
class TokenData {
|
|
@@ -69,6 +69,18 @@ class AccountOpener extends SDKConstruct {
|
|
|
69
69
|
this.#poolDepositMultiplier = BigInt(poolDepositMultiplier);
|
|
70
70
|
this.#minDebtMultiplier = BigInt(minDebtMultiplier);
|
|
71
71
|
this.#leverageDelta = BigInt(leverageDelta);
|
|
72
|
+
this.#logger?.info(
|
|
73
|
+
{
|
|
74
|
+
borrower: privateKeyToAccount(this.borrowerKey).address,
|
|
75
|
+
depositor: privateKeyToAccount(this.depositorKey).address,
|
|
76
|
+
faucet: this.faucet,
|
|
77
|
+
poolDepositMultiplier: this.#poolDepositMultiplier.toString(),
|
|
78
|
+
minDebtMultiplier: this.#minDebtMultiplier.toString(),
|
|
79
|
+
leverageDelta: this.#leverageDelta.toString(),
|
|
80
|
+
allowMint: this.#allowMint
|
|
81
|
+
},
|
|
82
|
+
"account opener options"
|
|
83
|
+
);
|
|
72
84
|
}
|
|
73
85
|
get borrower() {
|
|
74
86
|
if (!this.#borrower) {
|
|
@@ -86,6 +98,14 @@ class AccountOpener extends SDKConstruct {
|
|
|
86
98
|
* Tries to open account with underlying only in each CM
|
|
87
99
|
*/
|
|
88
100
|
async openCreditAccounts(targets, depositIntoPools = true, claimFromFaucet2 = true) {
|
|
101
|
+
this.#logger?.info(
|
|
102
|
+
{
|
|
103
|
+
targets,
|
|
104
|
+
depositIntoPools,
|
|
105
|
+
claimFromFaucet: claimFromFaucet2
|
|
106
|
+
},
|
|
107
|
+
"opening credit accounts"
|
|
108
|
+
);
|
|
89
109
|
let deposits = [];
|
|
90
110
|
if (depositIntoPools) {
|
|
91
111
|
try {
|
|
@@ -37,7 +37,6 @@ const HUMAN_READABLE_TITLES = {
|
|
|
37
37
|
["0xd412ca00d177eba2843348f9c50dd17bfce32c40".toLowerCase()]: "pzETH\xA0\u2192\xA0wstETH",
|
|
38
38
|
["0x26c98674e623647f11909791593fa3b6e9406c67".toLowerCase()]: "steak7LRT\xA0\u2192\xA0wstETH",
|
|
39
39
|
["0x9fb930eacadad079683a4758424a53b9b3692775".toLowerCase()]: "Re7LRT\xA0\u2192\xA0wstETH",
|
|
40
|
-
STT: "SOMI",
|
|
41
40
|
ETHPlus: "ETH+"
|
|
42
41
|
};
|
|
43
42
|
class TokenData {
|