evm-contracts-tools 0.0.46 → 0.0.48

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 (48) hide show
  1. package/Makefile +13 -0
  2. package/dist/evm-contract-call/evm-contract-call.js +1 -1
  3. package/dist/evm-contract-deployment-abi/evm-contract-deployment-abi.js +2 -0
  4. package/dist/evm-contract-deployment-abi/fs-worker.js +1 -0
  5. package/dist/evm-contract-deployment-abi/index.html +31 -0
  6. package/dist/evm-contract-deployment-address/evm-contract-deployment-address.js +1 -1
  7. package/dist/evm-contract-deployment-bytecode/evm-contract-deployment-bytecode.js +2 -0
  8. package/dist/evm-contract-deployment-bytecode/fs-worker.js +1 -0
  9. package/dist/evm-contract-deployment-bytecode/index.html +31 -0
  10. package/dist/evm-contract-deployment-compiler-output/evm-contract-deployment-compiler-output.js +2 -0
  11. package/dist/evm-contract-deployment-compiler-output/fs-worker.js +1 -0
  12. package/dist/evm-contract-deployment-compiler-output/index.html +31 -0
  13. package/dist/evm-contract-deployment-networks/evm-contract-deployment-networks.js +1 -1
  14. package/dist/evm-contract-deployment-versions/evm-contract-deployment-versions.js +1 -1
  15. package/dist/evm-contract-deployments-dir/evm-contract-deployments-dir.js +1 -1
  16. package/dist/evm-contracts-tools/evm-contracts-tools.js +1 -1
  17. package/dist/libevm-contract-call/libevm-contract-call.js +1 -1
  18. package/dist/libevm-contract-deployment-abi/fs-worker.js +1 -0
  19. package/dist/libevm-contract-deployment-abi/index.html +24 -0
  20. package/dist/libevm-contract-deployment-abi/libevm-contract-deployment-abi.js +2 -0
  21. package/dist/libevm-contract-deployment-address/libevm-contract-deployment-address.js +1 -1
  22. package/dist/libevm-contract-deployment-bytecode/fs-worker.js +1 -0
  23. package/dist/libevm-contract-deployment-bytecode/index.html +24 -0
  24. package/dist/libevm-contract-deployment-bytecode/libevm-contract-deployment-bytecode.js +2 -0
  25. package/dist/libevm-contract-deployment-compiler-output/fs-worker.js +1 -0
  26. package/dist/libevm-contract-deployment-compiler-output/index.html +24 -0
  27. package/dist/libevm-contract-deployment-networks/libevm-contract-deployment-networks.js +1 -1
  28. package/dist/libevm-contract-deployment-versions/libevm-contract-deployment-versions.js +1 -1
  29. package/dist/libevm-contract-deployments-dir/libevm-contract-deployments-dir.js +1 -1
  30. package/evm-contract-call +44 -40
  31. package/evm-contract-deployment-abi +538 -0
  32. package/evm-contract-deployment-address +34 -29
  33. package/evm-contract-deployment-bytecode +538 -0
  34. package/evm-contract-deployment-compiler-output +537 -0
  35. package/evm-contract-deployments-dir +24 -34
  36. package/lib/address-check +0 -0
  37. package/lib/evm-contract-call-dynamic +46 -17
  38. package/lib/evm-contract-call-static +0 -0
  39. package/libevm-contract-call +0 -18
  40. package/libevm-contract-deployment +650 -0
  41. package/libevm-contract-deployment-abi +446 -0
  42. package/libevm-contract-deployment-address +71 -402
  43. package/libevm-contract-deployment-bytecode +446 -0
  44. package/libevm-contract-deployment-compiler-output +446 -0
  45. package/libevm-contract-deployment-networks +28 -72
  46. package/libevm-contract-deployment-versions +26 -50
  47. package/libevm-contract-deployments-dir +13 -21
  48. package/package.json +54 -15
@@ -2,26 +2,29 @@
2
2
 
3
3
  // SPDX-License-Identifier: AGPL-3.0-or-later
4
4
 
5
- /** ----------------------------------------------------------------------
5
+ /** ----------------------------------------------------------------
6
+ * fs-utils
7
+ * ----------------------------------------------------------------
6
8
  * Copyright ©
7
9
  * Pellegrino Prevete
8
10
  * 2024, 2025, 2026
9
11
  *
10
12
  * All rights reserved
11
- * ----------------------------------------------------------------------
13
+ * ----------------------------------------------------------------
12
14
  *
13
- * This program is free software: you can redistribute it and/or modify
14
- * it under the terms of the GNU General Public License as published by
15
- * the Free Software Foundation, either version 3 of the License, or
16
- * (at your option) any later version.
15
+ * This program is free software: you can redistribute it and/or
16
+ * modify it under the terms of the GNU General Public License as
17
+ * published by the Free Software Foundation, either version 3 of
18
+ * the License, or (at your option) any later version.
17
19
  *
18
20
  * This program is distributed in the hope that it will be useful,
19
21
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
22
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
23
  * GNU General Public License for more details.
22
24
  *
23
- * You should have received a copy of the GNU General Public License
24
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
25
+ * You should have received a copy of the GNU General Public
26
+ * License along with this program.
27
+ * If not, see <https://www.gnu.org/licenses/>.
25
28
  */
26
29
 
27
30
  const
@@ -681,11 +684,23 @@ async function
681
684
  } catch (
682
685
  _error) {
683
686
  if ( "code" in _error ) {
684
- if ( _error[
685
- "code"] == -32010 ) {
686
- _msg_info(
687
+ const
688
+ _code =
689
+ _error[
690
+ "code"];
691
+ _msg =
687
692
  _error[
688
- "message"]);
693
+ "message"];
694
+ if ( _code == -32010 ) {
695
+ _msg_info(
696
+ _msg);
697
+ }
698
+ else if ( _code == -32000 ) {
699
+ _msg =
700
+ _error[
701
+ "message"]
702
+ _msg_info(
703
+ _msg);
689
704
  }
690
705
  else {
691
706
  _msg =
@@ -705,11 +720,17 @@ async function
705
720
  _msg_info(
706
721
  _msg);
707
722
  throw _error;
708
- };
723
+ }
709
724
  return [ _tx,
710
725
  _receipt];
711
726
  }
712
727
 
728
+ function
729
+ _receipt_cost_get(
730
+ _receipt) {
731
+
732
+ }
733
+
713
734
  async function
714
735
  _contract_run(
715
736
  _retries_max,
@@ -732,6 +753,7 @@ async function
732
753
  let
733
754
  _msg,
734
755
  _receipt,
756
+ _receipt_type,
735
757
  _tx,
736
758
  _tx_cost,
737
759
  _contract_call_dynamic_opts,
@@ -850,16 +872,17 @@ async function
850
872
  await _contract_call_dynamic.apply(
851
873
  null,
852
874
  _contract_call_dynamic_opts);
853
- if ( typeof(
854
- _receipt) == "undefined" ) {
875
+ _receipt_type =
876
+ typeof(
877
+ _receipt);
878
+ if ( _receipt_type == "undefined" ) {
855
879
  _msg_error_transaction_undefined(
856
880
  _attempt);
857
881
  _msg =
858
882
  "No receipt, transaction may have failed.";
859
883
  throw _msg;
860
884
  }
861
- else if ( typeof(
862
- _receipt) != "undefined" ) {
885
+ else if ( _receipt_type != "undefined" ) {
863
886
  _msg =
864
887
  `Transaction no. '${_tx.nonce}'.`;
865
888
  _msg_info(
@@ -879,6 +902,12 @@ async function
879
902
  _receipt);
880
903
  }
881
904
  if ( _receipt.hash != undefined ) {
905
+ _receipt_tx_cost_get(
906
+ _receipt,
907
+ _measure_unit);
908
+ _receipt_display(
909
+ _receipt,
910
+ _measure_unit);
882
911
  _msg =
883
912
  `Transaction hash: '${_receipt.hash}'.`;
884
913
  _msg_info(
File without changes
@@ -67,64 +67,46 @@ const
67
67
  "crash-js");
68
68
  /* global
69
69
  _dirname */
70
- /* eslint-disable-next-line
71
- no-global-assign */
72
70
  const
73
71
  _dirname =
74
72
  _libcrash_module._dirname;
75
73
  /* global
76
74
  _file_exists */
77
- /* eslint-disable-next-line
78
- no-global-assign */
79
75
  const
80
76
  _file_exists =
81
77
  _libcrash_module._file_exists;
82
78
  /* global
83
79
  _homedir_get */
84
- /* eslint-disable-next-line
85
- no-global-assign */
86
80
  const
87
81
  _homedir_get =
88
82
  _libcrash_module._homedir_get;
89
83
  /* global
90
84
  _json_read */
91
- /* eslint-disable-next-line
92
- no-global-assign */
93
85
  const
94
86
  _json_read =
95
87
  _libcrash_module._json_read;
96
88
  /* global
97
89
  _lib_get */
98
- /* eslint-disable-next-line
99
- no-global-assign */
100
90
  const
101
91
  _lib_get =
102
92
  _libcrash_module._lib_get;
103
93
  /* global
104
94
  _msg_info */
105
- /* eslint-disable-next-line
106
- no-global-assign */
107
95
  const
108
96
  _msg_info =
109
97
  _libcrash_module._msg_info;
110
98
  /* global
111
99
  _msg_error */
112
- /* eslint-disable-next-line
113
- no-global-assign */
114
100
  const
115
101
  _msg_error =
116
102
  _libcrash_module._msg_error;
117
103
  /* global
118
104
  _path_join */
119
- /* eslint-disable-next-line
120
- no-global-assign */
121
105
  const
122
106
  _path_join =
123
107
  _libcrash_module._path_join;
124
108
  /* global
125
109
  _range */
126
- /* eslint-disable-next-line
127
- no-global-assign */
128
110
  const
129
111
  _range =
130
112
  _libcrash_module._range;