@gearbox-protocol/sdk 3.0.0-vfour.214 → 3.0.0-vfour.215
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/index.cjs +5 -5
- package/dist/cjs/sdk/index.cjs +16 -3
- package/dist/esm/dev/index.mjs +5 -5
- package/dist/esm/sdk/index.mjs +16 -3
- package/package.json +1 -1
package/dist/cjs/dev/index.cjs
CHANGED
|
@@ -2123,6 +2123,11 @@ var SDKExample = class {
|
|
|
2123
2123
|
ignoreUpdateablePrices: true,
|
|
2124
2124
|
marketConfigurators
|
|
2125
2125
|
});
|
|
2126
|
+
try {
|
|
2127
|
+
await this.#sdk.marketRegister.loadZappers();
|
|
2128
|
+
} catch (e) {
|
|
2129
|
+
this.#logger?.error(`failed to load zappers: ${e}`);
|
|
2130
|
+
}
|
|
2126
2131
|
await this.#safeMigrateFaucet(addressProvider);
|
|
2127
2132
|
const puTx = await this.#sdk.priceFeeds.getUpdatePriceFeedsTx(marketConfigurators);
|
|
2128
2133
|
const updater = viem.createWalletClient({
|
|
@@ -2138,11 +2143,6 @@ var SDKExample = class {
|
|
|
2138
2143
|
const hash = await sdk.sendRawTx(updater, { tx: puTx });
|
|
2139
2144
|
await publicClient.waitForTransactionReceipt({ hash });
|
|
2140
2145
|
await this.#sdk.marketRegister.loadMarkets(marketConfigurators, true);
|
|
2141
|
-
try {
|
|
2142
|
-
await this.#sdk.marketRegister.loadZappers();
|
|
2143
|
-
} catch (e) {
|
|
2144
|
-
this.#logger?.error(`failed to load zappers: ${e}`);
|
|
2145
|
-
}
|
|
2146
2146
|
this.#logger?.info("attached sdk");
|
|
2147
2147
|
if (outFile) {
|
|
2148
2148
|
try {
|
package/dist/cjs/sdk/index.cjs
CHANGED
|
@@ -65648,11 +65648,24 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
65648
65648
|
abi: iPeripheryCompressorAbi,
|
|
65649
65649
|
address: pcAddr,
|
|
65650
65650
|
functionName: "getZappers",
|
|
65651
|
-
args: [m.configurator, m.pool.pool.address]
|
|
65651
|
+
args: [m.configurator.address, m.pool.pool.address]
|
|
65652
65652
|
})),
|
|
65653
|
-
allowFailure:
|
|
65653
|
+
allowFailure: true
|
|
65654
65654
|
});
|
|
65655
|
-
|
|
65655
|
+
const zappers = [];
|
|
65656
|
+
for (let i = 0; i < resp.length; i++) {
|
|
65657
|
+
const { status, result, error } = resp[i];
|
|
65658
|
+
const marketConfigurator = this.markets[i].configurator.address;
|
|
65659
|
+
const pool = this.markets[i].pool.pool.address;
|
|
65660
|
+
if (status === "success") {
|
|
65661
|
+
zappers.push(...result);
|
|
65662
|
+
} else {
|
|
65663
|
+
this.#logger?.error(
|
|
65664
|
+
`failed to load zapper for market configurator ${this.labelAddress(marketConfigurator)} and pool ${this.labelAddress(pool)}: ${error}`
|
|
65665
|
+
);
|
|
65666
|
+
}
|
|
65667
|
+
}
|
|
65668
|
+
this.#zappers = zappers;
|
|
65656
65669
|
const zappersTokens = this.#zappers.flatMap((z) => [z.tokenIn, z.tokenOut]);
|
|
65657
65670
|
for (const t of zappersTokens) {
|
|
65658
65671
|
this.sdk.tokensMeta.upsert(t.addr, t);
|
package/dist/esm/dev/index.mjs
CHANGED
|
@@ -2121,6 +2121,11 @@ var SDKExample = class {
|
|
|
2121
2121
|
ignoreUpdateablePrices: true,
|
|
2122
2122
|
marketConfigurators
|
|
2123
2123
|
});
|
|
2124
|
+
try {
|
|
2125
|
+
await this.#sdk.marketRegister.loadZappers();
|
|
2126
|
+
} catch (e) {
|
|
2127
|
+
this.#logger?.error(`failed to load zappers: ${e}`);
|
|
2128
|
+
}
|
|
2124
2129
|
await this.#safeMigrateFaucet(addressProvider);
|
|
2125
2130
|
const puTx = await this.#sdk.priceFeeds.getUpdatePriceFeedsTx(marketConfigurators);
|
|
2126
2131
|
const updater = createWalletClient({
|
|
@@ -2136,11 +2141,6 @@ var SDKExample = class {
|
|
|
2136
2141
|
const hash = await sendRawTx(updater, { tx: puTx });
|
|
2137
2142
|
await publicClient.waitForTransactionReceipt({ hash });
|
|
2138
2143
|
await this.#sdk.marketRegister.loadMarkets(marketConfigurators, true);
|
|
2139
|
-
try {
|
|
2140
|
-
await this.#sdk.marketRegister.loadZappers();
|
|
2141
|
-
} catch (e) {
|
|
2142
|
-
this.#logger?.error(`failed to load zappers: ${e}`);
|
|
2143
|
-
}
|
|
2144
2144
|
this.#logger?.info("attached sdk");
|
|
2145
2145
|
if (outFile) {
|
|
2146
2146
|
try {
|
package/dist/esm/sdk/index.mjs
CHANGED
|
@@ -65641,11 +65641,24 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
65641
65641
|
abi: iPeripheryCompressorAbi,
|
|
65642
65642
|
address: pcAddr,
|
|
65643
65643
|
functionName: "getZappers",
|
|
65644
|
-
args: [m.configurator, m.pool.pool.address]
|
|
65644
|
+
args: [m.configurator.address, m.pool.pool.address]
|
|
65645
65645
|
})),
|
|
65646
|
-
allowFailure:
|
|
65646
|
+
allowFailure: true
|
|
65647
65647
|
});
|
|
65648
|
-
|
|
65648
|
+
const zappers = [];
|
|
65649
|
+
for (let i = 0; i < resp.length; i++) {
|
|
65650
|
+
const { status, result, error } = resp[i];
|
|
65651
|
+
const marketConfigurator = this.markets[i].configurator.address;
|
|
65652
|
+
const pool = this.markets[i].pool.pool.address;
|
|
65653
|
+
if (status === "success") {
|
|
65654
|
+
zappers.push(...result);
|
|
65655
|
+
} else {
|
|
65656
|
+
this.#logger?.error(
|
|
65657
|
+
`failed to load zapper for market configurator ${this.labelAddress(marketConfigurator)} and pool ${this.labelAddress(pool)}: ${error}`
|
|
65658
|
+
);
|
|
65659
|
+
}
|
|
65660
|
+
}
|
|
65661
|
+
this.#zappers = zappers;
|
|
65649
65662
|
const zappersTokens = this.#zappers.flatMap((z) => [z.tokenIn, z.tokenOut]);
|
|
65650
65663
|
for (const t of zappersTokens) {
|
|
65651
65664
|
this.sdk.tokensMeta.upsert(t.addr, t);
|