@gearbox-protocol/deploy-tools 5.11.16 → 5.11.18
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 +15 -11
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -399347,16 +399347,20 @@ import { readFile as readFile5, writeFile as writeFile3 } from "node:fs/promises
|
|
|
399347
399347
|
import path4 from "node:path";
|
|
399348
399348
|
|
|
399349
399349
|
// ../../packages/shared/dist/etherscan.js
|
|
399350
|
+
var ALT_API_URLS = {
|
|
399351
|
+
146: "https://api.sonicscan.org/api"
|
|
399352
|
+
};
|
|
399350
399353
|
function etherscanApiUrl(chainId) {
|
|
399351
|
-
|
|
399352
|
-
|
|
399353
|
-
|
|
399354
|
-
|
|
399355
|
-
|
|
399356
|
-
|
|
399357
|
-
|
|
399358
|
-
|
|
399359
|
-
|
|
399354
|
+
for (const chain of Object.values(chains)) {
|
|
399355
|
+
if (chain.id === chainId) {
|
|
399356
|
+
const url = chain.blockExplorers?.default?.apiUrl ?? ALT_API_URLS[chainId];
|
|
399357
|
+
if (url) {
|
|
399358
|
+
return url;
|
|
399359
|
+
}
|
|
399360
|
+
throw new Error(`etherscan api for ${chainId} not configured`);
|
|
399361
|
+
}
|
|
399362
|
+
}
|
|
399363
|
+
throw new Error(`unsupported chain id: ${chainId}`);
|
|
399360
399364
|
}
|
|
399361
399365
|
|
|
399362
399366
|
// ../../node_modules/zod/lib/index.mjs
|
|
@@ -407922,7 +407926,7 @@ var EtherscanVerifier = class extends ProviderBase {
|
|
|
407922
407926
|
await writeFile3(cacheFile, json_stringify(result));
|
|
407923
407927
|
}
|
|
407924
407928
|
async #fetch(address) {
|
|
407925
|
-
const url = `${this.etherscanBase}
|
|
407929
|
+
const url = `${this.etherscanBase}?module=contract&action=getsourcecode&address=${address}&apikey=${this.etherscanApiKey}`;
|
|
407926
407930
|
const _fetch = async () => {
|
|
407927
407931
|
const resp = await fetch(url);
|
|
407928
407932
|
const data = await resp.json();
|
|
@@ -414220,7 +414224,7 @@ function getRenderer(opts) {
|
|
|
414220
414224
|
var package_default = {
|
|
414221
414225
|
name: "@gearbox-protocol/deploy-tools",
|
|
414222
414226
|
description: "Gearbox deploy tools",
|
|
414223
|
-
version: "5.11.
|
|
414227
|
+
version: "5.11.18",
|
|
414224
414228
|
homepage: "https://gearbox.fi",
|
|
414225
414229
|
keywords: [
|
|
414226
414230
|
"gearbox"
|