@gearbox-protocol/deploy-tools 5.11.15 → 5.11.17
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/index.mjs +19 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -399348,15 +399348,16 @@ import path4 from "node:path";
|
|
|
399348
399348
|
|
|
399349
399349
|
// ../../packages/shared/dist/etherscan.js
|
|
399350
399350
|
function etherscanApiUrl(chainId) {
|
|
399351
|
-
|
|
399352
|
-
|
|
399353
|
-
|
|
399354
|
-
|
|
399355
|
-
|
|
399356
|
-
|
|
399357
|
-
|
|
399358
|
-
|
|
399359
|
-
|
|
399351
|
+
for (const chain of Object.values(chains)) {
|
|
399352
|
+
if (chain.id === chainId) {
|
|
399353
|
+
const url = chain.blockExplorers?.default?.apiUrl;
|
|
399354
|
+
if (url) {
|
|
399355
|
+
return url;
|
|
399356
|
+
}
|
|
399357
|
+
throw new Error(`etherscan api for ${chainId} not configured`);
|
|
399358
|
+
}
|
|
399359
|
+
}
|
|
399360
|
+
throw new Error(`unsupported chain id: ${chainId}`);
|
|
399360
399361
|
}
|
|
399361
399362
|
|
|
399362
399363
|
// ../../node_modules/zod/lib/index.mjs
|
|
@@ -407676,7 +407677,6 @@ var NetworkMismatchError = class extends Error {
|
|
|
407676
407677
|
};
|
|
407677
407678
|
var ProviderBase = class {
|
|
407678
407679
|
logger = log_default;
|
|
407679
|
-
// #service?: SafeApiKit;
|
|
407680
407680
|
#service;
|
|
407681
407681
|
#initialized = false;
|
|
407682
407682
|
#client;
|
|
@@ -407699,9 +407699,13 @@ var ProviderBase = class {
|
|
|
407699
407699
|
});
|
|
407700
407700
|
this.#network = await detectNetwork(this.#client);
|
|
407701
407701
|
this.#chainId = chains[this.#network].id;
|
|
407702
|
-
|
|
407703
|
-
|
|
407704
|
-
|
|
407702
|
+
try {
|
|
407703
|
+
this.#service = new import_api_kit.default.default({
|
|
407704
|
+
chainId: BigInt(this.#chainId)
|
|
407705
|
+
});
|
|
407706
|
+
} catch (e) {
|
|
407707
|
+
this.logger.error(`failed to instantiate SafeApiKit: ${e}`);
|
|
407708
|
+
}
|
|
407705
407709
|
if (this.#options.addressProviderJson) {
|
|
407706
407710
|
try {
|
|
407707
407711
|
this.logger.debug(`reading address provider json ${this.#options.addressProviderJson}`);
|
|
@@ -407919,7 +407923,7 @@ var EtherscanVerifier = class extends ProviderBase {
|
|
|
407919
407923
|
await writeFile3(cacheFile, json_stringify(result));
|
|
407920
407924
|
}
|
|
407921
407925
|
async #fetch(address) {
|
|
407922
|
-
const url = `${this.etherscanBase}
|
|
407926
|
+
const url = `${this.etherscanBase}?module=contract&action=getsourcecode&address=${address}&apikey=${this.etherscanApiKey}`;
|
|
407923
407927
|
const _fetch = async () => {
|
|
407924
407928
|
const resp = await fetch(url);
|
|
407925
407929
|
const data = await resp.json();
|
|
@@ -414217,7 +414221,7 @@ function getRenderer(opts) {
|
|
|
414217
414221
|
var package_default = {
|
|
414218
414222
|
name: "@gearbox-protocol/deploy-tools",
|
|
414219
414223
|
description: "Gearbox deploy tools",
|
|
414220
|
-
version: "5.11.
|
|
414224
|
+
version: "5.11.17",
|
|
414221
414225
|
homepage: "https://gearbox.fi",
|
|
414222
414226
|
keywords: [
|
|
414223
414227
|
"gearbox"
|