ethershell 0.2.0-beta.0 → 0.2.2-beta.0
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ethershell",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2-beta.0",
|
|
5
5
|
"description": "Interactive JavaScript console for Ethereum smart contract management",
|
|
6
6
|
"author": "Alireza Kiakojouri (alirezaethdev@gmail.com)",
|
|
7
7
|
"repository": {
|
|
@@ -73,20 +73,22 @@ let storedCompConfig;
|
|
|
73
73
|
let configObj;
|
|
74
74
|
|
|
75
75
|
// 1) Load config file
|
|
76
|
+
/**
|
|
77
|
+
* The specific RPC endpoint URL saved on storage before.
|
|
78
|
+
* @type {string}
|
|
79
|
+
*/
|
|
80
|
+
let storedUrl;
|
|
76
81
|
if(!fs.existsSync(configPath)){
|
|
77
82
|
storedCompConfig = null;
|
|
83
|
+
storedUrl = null;
|
|
78
84
|
} else {
|
|
79
85
|
configObj = JSON.parse(fs.readFileSync(configPath));
|
|
80
86
|
storedCompConfig = configObj;
|
|
87
|
+
storedUrl = configObj.providerEndpoint;
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
// 2) Set Provider to Memory:
|
|
84
91
|
// Initialize provider with default URL
|
|
85
|
-
/**
|
|
86
|
-
* The specific RPC endpoint URL saved on storage before.
|
|
87
|
-
* @type {string}
|
|
88
|
-
*/
|
|
89
|
-
const storedUrl = configObj.providerEndpoint;
|
|
90
92
|
if(storedUrl) {
|
|
91
93
|
provider = new ethers.JsonRpcProvider(storedUrl);
|
|
92
94
|
currentUrl = storedUrl;
|