evm-contracts-tools 0.0.47 → 0.0.49

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.
Files changed (31) hide show
  1. package/dist/evm-contract-call/evm-contract-call.js +1 -1
  2. package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +2 -0
  3. package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +2 -0
  4. package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +2 -0
  5. package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +2 -0
  6. package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -1
  7. package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -1
  8. package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.js +1 -1
  9. package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -1
  10. package/dist/libevm-contract-call/libevm-contract-call.js +1 -1
  11. package/dist/libevm-contract-deployment-abi/libevm-contract-deployment-abi.js +1 -1
  12. package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +2 -0
  13. package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +2 -0
  14. package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -1
  15. package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -1
  16. package/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -1
  17. package/evm-contract-deployment-abi +19 -21
  18. package/evm-contract-deployment-address +11 -11
  19. package/evm-contract-deployment-bytecode +18 -20
  20. package/evm-contract-deployment-compiler-output +19 -22
  21. package/evm-contract-deployments-dir +24 -34
  22. package/libevm-contract-call +0 -18
  23. package/libevm-contract-deployment +650 -0
  24. package/libevm-contract-deployment-abi +13 -32
  25. package/libevm-contract-deployment-address +20 -37
  26. package/libevm-contract-deployment-bytecode +13 -33
  27. package/libevm-contract-deployment-compiler-output +41 -458
  28. package/libevm-contract-deployment-networks +28 -72
  29. package/libevm-contract-deployment-versions +26 -50
  30. package/libevm-contract-deployments-dir +13 -21
  31. package/package.json +14 -11
@@ -30,8 +30,6 @@
30
30
 
31
31
  /* eslint-disable
32
32
  no-unused-vars */
33
- /* eslint-disable
34
- no-useless-assignment */
35
33
 
36
34
  const
37
35
  _libcrash_module =
@@ -39,74 +37,68 @@ const
39
37
  "crash-js");
40
38
  /* global
41
39
  _dir_exists */
42
- /* eslint-disable-next-line
43
- no-global-assign */
44
40
  const
45
41
  _dir_exists =
46
42
  _libcrash_module._dir_exists;
47
43
  /* global
48
44
  _file_exists */
49
- /* eslint-disable-next-line
50
- no-global-assign */
51
45
  const
52
46
  _file_exists =
53
47
  _libcrash_module._file_exists;
54
48
  /* global
55
49
  _homedir_get */
56
- /* eslint-disable-next-line
57
- no-global-assign */
58
50
  const
59
51
  _homedir_get =
60
52
  _libcrash_module._homedir_get;
61
53
  /* global
62
54
  _json_read */
63
- /* eslint-disable-next-line
64
- no-global-assign */
65
55
  const
66
56
  _json_read =
67
57
  _libcrash_module._json_read;
68
58
  /* global
69
59
  _lib_get */
70
- /* eslint-disable-next-line
71
- no-global-assign */
72
60
  const
73
61
  _lib_get =
74
62
  _libcrash_module._lib_get;
75
63
  /* global
76
64
  _ls */
77
- /* eslint-disable-next-line
78
- no-global-assign */
79
65
  const
80
66
  _ls =
81
67
  _libcrash_module._ls;
68
+ /* global
69
+ _msg_error */
70
+ const
71
+ _msg_error =
72
+ _libcrash_module._msg_error;
82
73
  /* global
83
74
  _msg_info */
84
- /* eslint-disable-next-line
85
- no-global-assign */
86
75
  const
87
76
  _msg_info =
88
77
  _libcrash_module._msg_info;
89
78
  /* global
90
- _msg_error */
91
- /* eslint-disable-next-line
92
- no-global-assign */
79
+ _msg_warning */
93
80
  const
94
- _msg_error =
95
- _libcrash_module._msg_error;
81
+ _msg_warning =
82
+ _libcrash_module._msg_warning;
96
83
  /* global
97
84
  _path_join */
98
- /* eslint-disable-next-line
99
- no-global-assign */
100
85
  const
101
86
  _path_join =
102
87
  _libcrash_module._path_join;
103
88
  /* global
104
89
  _stat */
105
- /* eslint-disable-next-line
106
- no-global-assign */
107
90
  const
108
91
  _stat =
109
92
  _libcrash_module._stat;
93
+ const
94
+ _libevm_contract_deployment_module =
95
+ require(
96
+ "./libevm-contract-deployment");
97
+ /* global
98
+ _network_check */
99
+ const
100
+ _network_check =
101
+ _libevm_contract_deployment_module._network_check;
110
102
  const
111
103
  _libevm_contract_deployments_dir_module =
112
104
  require(
@@ -188,44 +180,6 @@ function
188
180
  }
189
181
  }
190
182
 
191
- async function
192
- _network_check(
193
- _deployments,
194
- _contract,
195
- _target_network,
196
- _target_network_id) {
197
- let
198
- _msg,
199
- _network_id,
200
- _networks;
201
- _networks = [
202
- // I need to write that first apparently
203
- _evm_contract_deployment_networks
204
- ];
205
- _app_check(
206
- _app);
207
- if ( typeof(
208
- _type) == "undefined" ||
209
- _type == "" ) {
210
- _type =
211
- "system";
212
- }
213
- let
214
- _conf_dir;
215
- if ( _type == "system" ) {
216
- _conf_dir =
217
- await _lib_get();
218
- }
219
- else if ( _type == "user" ) {
220
- const
221
- _homedir =
222
- _homedir_get();
223
- _conf_dir =
224
- `${_homedir}/.config`;
225
- }
226
- return `${_conf_dir}/${_app}/deployments`;
227
- }
228
-
229
183
  async function
230
184
  _networks_find(
231
185
  _deployment_dir) {
@@ -249,12 +203,13 @@ async function
249
203
  if ( ! _file_is_dir ) {
250
204
  const
251
205
  _msg =
252
- `There shouldn't be a file into ` +
206
+ `There shouldn't be the file ` +
207
+ `'${_file}' into ` +
253
208
  `this directory.`;
254
209
  _msg_warning(
255
- _msg)
210
+ _msg);
256
211
  _stat(
257
- _file_info);
212
+ _path);
258
213
  }
259
214
  else {
260
215
  _networks.push(
@@ -270,8 +225,6 @@ async function
270
225
  _display_all,
271
226
  _display_safest,
272
227
  _display_cheapest) {
273
- let
274
- _networks;
275
228
  const
276
229
  _deployment_dir_type =
277
230
  typeof(
@@ -285,13 +238,16 @@ async function
285
238
  _msg,
286
239
  1);
287
240
  }
288
- _networks =
289
- await _networks_find(
290
- _deployment_dir);
241
+ const
242
+ _networks =
243
+ await _networks_find(
244
+ _deployment_dir);
291
245
  return _networks;
292
246
  }
293
247
 
294
248
  module.exports = {
295
249
  _evm_contract_deployment_networks:
296
- _evm_contract_deployment_networks
250
+ _evm_contract_deployment_networks,
251
+ _network_check:
252
+ _network_check
297
253
  };
@@ -30,8 +30,6 @@
30
30
 
31
31
  /* eslint-disable
32
32
  no-unused-vars */
33
- /* eslint-disable
34
- no-useless-assignment */
35
33
 
36
34
  /* EVM Contracts tools global variables */
37
35
  /* global
@@ -61,79 +59,53 @@
61
59
  target_networks:
62
60
  writable */
63
61
 
62
+ /* global
63
+ config_file:
64
+ writable */
65
+
64
66
  const
65
67
  _libcrash_module =
66
68
  require(
67
69
  "crash-js");
68
70
  /* global
69
71
  _file_read */
70
- /* eslint-disable-next-line
71
- no-global-assign */
72
72
  const
73
73
  _file_read =
74
74
  _libcrash_module._file_read;
75
75
  /* global
76
76
  _from_bash_ass_array */
77
- /* eslint-disable-next-line
78
- no-global-assign */
79
77
  const
80
78
  _from_bash_ass_array =
81
79
  _libcrash_module._from_bash_ass_array;
82
80
  /* global
83
81
  _json_read */
84
- /* eslint-disable-next-line
85
- no-global-assign */
86
82
  const
87
83
  _json_read =
88
84
  _libcrash_module._json_read;
89
85
  /* global
90
86
  _msg_info */
91
- /* eslint-disable-next-line
92
- no-global-assign */
93
87
  const
94
88
  _msg_info =
95
89
  _libcrash_module._msg_info;
96
90
  /* global
97
91
  _msg_error */
98
- /* eslint-disable-next-line
99
- no-global-assign */
100
92
  const
101
93
  _msg_error =
102
94
  _libcrash_module._msg_error;
103
-
104
- function
105
- _configuration_format_auto_detect() {
106
- let
107
- _configuration_format;
108
- if ( typeof(
109
- configuration_format) === "undefined" ||
110
- configuration_format == "" ) {
111
- _configuration_format =
112
- "json";
113
- if ( config_file.endsWith(
114
- ".sh") ) {
115
- _configuration_format =
116
- "bash";
117
- }
118
- else if ( config_file.endsWith(
119
- ".json") ) {
120
- _configuration_format =
121
- "json";
122
- }
123
- else {
124
- const
125
- _msg =
126
- "Impossible determining " +
127
- "configuration format from file " +
128
- "extension, defaulting to 'json'.";
129
- _msg_info(
130
- _msg,
131
- 1);
132
- }
133
- configuration_format =
134
- _configuration_format;
135
- }
136
- }
95
+ const
96
+ _libevm_contract_deployment_module =
97
+ require(
98
+ "./libevm-contract-deployment");
99
+ /* global
100
+ _configuration_format_auto_detect */
101
+ const
102
+ _configuration_format_auto_detect =
103
+ _libevm_contract_deployment_module._configuration_format_auto_detect;
104
+ /* global
105
+ _configuration_format_get */
106
+ const
107
+ _configuration_format_get =
108
+ _libevm_contract_deployment_module._configuration_format_get;
137
109
 
138
110
  function
139
111
  _evm_contract_deployment_versions(
@@ -167,12 +139,14 @@ function
167
139
  "contract_address";
168
140
  }
169
141
  else {
170
- _msg =
171
- "Unknown configuration format " +
172
- `'${_configuration_format}'.`;
142
+ const
143
+ _msg =
144
+ "Unknown configuration format " +
145
+ `'${_configuration_format}'.`;
173
146
  _msg_error(
174
147
  _msg,
175
- 1);
148
+ 0);
149
+ throw _msg;
176
150
  }
177
151
  const
178
152
  _contract_addresses =
@@ -197,6 +171,8 @@ function
197
171
  module.exports = {
198
172
  _configuration_format_auto_detect:
199
173
  _configuration_format_auto_detect,
174
+ _configuration_format_get:
175
+ _configuration_format_get,
200
176
  _evm_contract_deployment_versions:
201
177
  _evm_contract_deployment_versions,
202
178
  };
@@ -30,8 +30,6 @@
30
30
 
31
31
  /* eslint-disable
32
32
  no-unused-vars */
33
- /* eslint-disable
34
- no-useless-assignment */
35
33
 
36
34
  const
37
35
  _libcrash_module =
@@ -39,29 +37,21 @@ const
39
37
  "crash-js");
40
38
  /* global
41
39
  _homedir_get */
42
- /* eslint-disable-next-line
43
- no-global-assign */
44
40
  const
45
41
  _homedir_get =
46
42
  _libcrash_module._homedir_get;
47
43
  /* global
48
44
  _lib_get */
49
- /* eslint-disable-next-line
50
- no-global-assign */
51
45
  const
52
46
  _lib_get =
53
47
  _libcrash_module._lib_get;
54
48
  /* global
55
49
  _msg_info */
56
- /* eslint-disable-next-line
57
- no-global-assign */
58
50
  const
59
51
  _msg_info =
60
52
  _libcrash_module._msg_info;
61
53
  /* global
62
54
  _msg_error */
63
- /* eslint-disable-next-line
64
- no-global-assign */
65
55
  const
66
56
  _msg_error =
67
57
  _libcrash_module._msg_error;
@@ -130,7 +120,6 @@ async function
130
120
  _app,
131
121
  _user_level) {
132
122
  let
133
- _deployments,
134
123
  _deployment_type;
135
124
  _app_check(
136
125
  _app);
@@ -138,22 +127,25 @@ async function
138
127
  _deployment_type =
139
128
  "system";
140
129
  }
141
- else if ( _user_level == "n" ) {
130
+ else if ( _user_level == "y" ) {
142
131
  _deployment_type =
143
- "system";
132
+ "user";
144
133
  }
145
134
  else {
146
- _msg =
147
- "User level argument must be " +
148
- "can be 'y' or 'n'."
135
+ const
136
+ _msg =
137
+ "User level argument must be " +
138
+ "can be 'y' or 'n'.";
149
139
  _msg_error(
150
140
  _msg,
151
- 1);
141
+ 0);
142
+ throw _msg;
152
143
  }
153
- _deployments =
154
- await _default_deployments_dir_get(
155
- _app,
156
- _deployment_type);
144
+ const
145
+ _deployments =
146
+ await _default_deployments_dir_get(
147
+ _app,
148
+ _deployment_type);
157
149
  return _deployments;
158
150
  }
159
151
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "evm-contracts-tools",
2
2
  "version":
3
- "0.0.47",
3
+ "0.0.49",
4
4
  "description":
5
5
  "JavaScript programs and libraries to enable seamless development of native computer applications designed to interact with Ethereum Virtual Machine-compatible networks.",
6
6
  "funding": {
@@ -47,6 +47,7 @@
47
47
  "index.html",
48
48
  "libevm-contract-call",
49
49
  "libevm-contract-call.webpack.config.js",
50
+ "libevm-contract-deployment",
50
51
  "libevm-contract-deployment-address",
51
52
  "libevm-contract-deployment-address.webpack.config.js",
52
53
  "libevm-contract-deployment-abi",
@@ -100,15 +101,17 @@
100
101
  },
101
102
  "devDependencies": {
102
103
  "crash-js-webpack":
103
- "^0.0.42",
104
- "flatted":
105
- "^3.2.9",
104
+ "^0.0.45",
105
+ "brace-expansion":
106
+ "^5.0.9",
106
107
  "eslint":
107
108
  "^10.3.0",
108
- "globals":
109
- "^17.3.0",
110
109
  "@eslint/js":
111
110
  "^10.0.1",
111
+ "fast-uri":
112
+ "^4.1.2",
113
+ "globals":
114
+ "^17.3.0",
112
115
  "safely-serve":
113
116
  "^0.0.10",
114
117
  "webpack":
@@ -118,15 +121,15 @@
118
121
  },
119
122
  "dependencies": {
120
123
  "crash-js":
121
- "^0.11.11111111111111",
124
+ "^0.1111.1111111111111111",
122
125
  "ethers":
123
126
  "^6.13.2",
124
127
  "evm-chains-info":
125
- "^0.0.28",
128
+ "^0.0.30",
126
129
  "evm-transactions-tools":
127
- "^0.0.111",
130
+ "^0.0.1111",
128
131
  "evm-wallet.js":
129
- "^0.0.70",
132
+ "^0.0.72",
130
133
  "libevm":
131
134
  "^0.0.32",
132
135
  "ws":
@@ -138,7 +141,7 @@
138
141
  "evm-contracts-tools":
139
142
  "./evm-contracts-tools",
140
143
  "evm-wallet.js":
141
- "^0.0.70",
144
+ "^0.0.72",
142
145
  "libevm":
143
146
  "^0.0.32"
144
147
  },