@gearbox-protocol/cli-utils 5.61.0 → 5.61.2
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.
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { RevolverTransport, } from "@gearbox-protocol/sdk/dev";
|
|
2
2
|
import { getAlchemyUrl, getAnkrUrl, getDrpcUrl, getErpcKey, getThirdWebUrl, } from "./providers.js";
|
|
3
|
+
/**
|
|
4
|
+
* Take the last two parts for top-level domain (e.g., "google.com" from "a.b.c.google.com")
|
|
5
|
+
**/
|
|
6
|
+
function getTopLevelDomain({ hostname }) {
|
|
7
|
+
const parts = hostname.split(".");
|
|
8
|
+
return parts.length >= 2 ? parts.slice(-2).join(".") : hostname;
|
|
9
|
+
}
|
|
3
10
|
function getProviders(config) {
|
|
4
11
|
const { network, enabledProviders, alchemyKeys = [], ankrKeys = [], drpcKeys = [], thirdwebKeys = [], jsonRpcProviders = [], erpcProjectId, erpcUrl, } = config;
|
|
5
12
|
const result = [];
|
|
@@ -53,7 +60,7 @@ function getProviders(config) {
|
|
|
53
60
|
};
|
|
54
61
|
}
|
|
55
62
|
return {
|
|
56
|
-
name: urlObj
|
|
63
|
+
name: getTopLevelDomain(urlObj),
|
|
57
64
|
url: cleanUrl,
|
|
58
65
|
httpClientOptions,
|
|
59
66
|
};
|
|
@@ -69,7 +76,15 @@ function getProviders(config) {
|
|
|
69
76
|
break;
|
|
70
77
|
}
|
|
71
78
|
}
|
|
72
|
-
return result
|
|
79
|
+
return result
|
|
80
|
+
.map(p => ({
|
|
81
|
+
...p,
|
|
82
|
+
httpClientOptions: {
|
|
83
|
+
...p.httpClientOptions,
|
|
84
|
+
methods: { exclude: ["eth_fillTransaction"] },
|
|
85
|
+
},
|
|
86
|
+
}))
|
|
87
|
+
.filter(p => !!p.url);
|
|
73
88
|
}
|
|
74
89
|
export function createRevolverTransport(providers, config) {
|
|
75
90
|
return RevolverTransport.create({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/cli-utils",
|
|
3
3
|
"description": "Utils for creating cli apps",
|
|
4
|
-
"version": "5.61.
|
|
4
|
+
"version": "5.61.2",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"package:version": "yarn version"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
33
|
-
"@aws-sdk/client-ssm": "^3.
|
|
32
|
+
"@aws-sdk/client-secrets-manager": "^3.943.0",
|
|
33
|
+
"@aws-sdk/client-ssm": "^3.943.0",
|
|
34
34
|
"@gearbox-protocol/sdk": ">=11.8.4",
|
|
35
|
-
"abitype": "^1.2.
|
|
35
|
+
"abitype": "^1.2.1",
|
|
36
36
|
"commander": "^14.0.2",
|
|
37
37
|
"lodash-es": "^4.17.21",
|
|
38
|
-
"viem": "^2.
|
|
38
|
+
"viem": "^2.41.2",
|
|
39
39
|
"yaml": "^2.8.2",
|
|
40
40
|
"zod": "^4.1.13"
|
|
41
41
|
},
|