Skip to content

Commit 32ea61e

Browse files
authored
fix: upgrade to toolbox (#39)
* fix: upgrade to toolbox * fix: remove ntworks
1 parent 0cf8a72 commit 32ea61e

File tree

10 files changed

+29
-1217
lines changed

10 files changed

+29
-1217
lines changed

bun.lockb

29.4 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"out/index.mjs"
1616
],
1717
"devDependencies": {
18-
"@bgd-labs/rpc-env": "^2.3.1",
18+
"@bgd-labs/toolbox": "^0.0.7",
1919
"@biomejs/biome": "1.9.4",
2020
"@types/chalk": "^2.2.0",
2121
"bun-types": "1.1.36",

prepare.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Networks } from "./types";
1+
import { ChainId } from "@bgd-labs/toolbox";
22

33
const packageJson = require("../package.json");
44
export const VERIFY_VERSION = packageJson.version;
@@ -13,7 +13,7 @@ export type ExplorerConfig = {
1313

1414
// custom explorer configs
1515
export const EXPLORER_CONFIGS: Record<string, ExplorerConfig[]> = {
16-
[Networks.metis]: [
16+
[ChainId.metis]: [
1717
{
1818
API_URL: "https://andromeda-explorer.metis.io/api ",
1919
SITE_URL: "https://andromeda-explorer.metis.io",

src/explorers/etherscan.json

Lines changed: 0 additions & 307 deletions
This file was deleted.

src/explorers/etherscan.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import etherscan from "./etherscan.json";
1+
import { etherscanExplorers } from "@bgd-labs/toolbox";
22

33
export function getEtherscan(chainId: number) {
4-
const explorer = etherscan.find((e) => e.chainId === chainId);
4+
const explorer =
5+
etherscanExplorers[chainId as keyof typeof etherscanExplorers];
56
if (explorer)
67
return {
78
API_URL: "https://api.etherscan.io/v2/api",

0 commit comments

Comments
 (0)