evm-contracts-tools 0.0.72 → 0.0.73
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 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var t={122(t,e,r){r.a(t,async(t,e)=>{try{const n=await r.e(35).then(()=>r(35)),o=n._argv_get,a=n._argv_url_get,
|
|
1
|
+
(()=>{"use strict";var t={122(t,e,r){r.a(t,async(t,e)=>{try{const n=await r.e(35).then(()=>r(35)),o=n._argv_get,a=n._argv_url_get,s=n._cmdline_check,i=n._echo,c=n._echo2,d=n._exit,l=n._get,u=n._global_get,p=n._get_date_human,f=n._msg_info,m=n._msg_error,_=n._override_set,g=n._printf,h=n._set,w=await r.e(825).then(()=>r(825)),y=w._evm_contract_deployment_address,v=w._contract_version_auto_detect,b=w._deployments_dir_auto_detect,k=w._networks_all_auto_detect,E=w._target_app_auto_detect;function j(){h("app","name","evm-contract-deployments-address.js"),h("app","opts",[]),h("runtime","environment",""),h("resolve","date",""),h("target","networks",[]),h("networks","ids",[]),h("networks","all",[]),h("target","app",""),h("target","contract",""),h("contract","version",""),h("user","defined",""),h("configuration","format",""),h("deployments","dir","");const t=u();t.quiet="",t.verbose=""}async function $(t){_("resolve","date",p()),_("configuration","format","bash"),k(),_("user","defined","n"),""!=l("target","contract")&&(await E(),await b(),await v())}function S(){let t;const e=[`${l("app","name")} configuration:`,` Resolve date: ${resolve_date}`,` Runtime environment: ${runtime_environment}`,` Target networks: ${target_networks}`,` Network ID (chain ID): ${networks_ids}`,` All networks: ${networks_all}`,` Target application: ${target_app}`,` User-defined address: ${user_defined}`,` Deployments path: ${deployments_dir}`];for(t of e)f(t)}function O(t){let e;const r=["","Returns an EVM network's contract deployment address","","Usage:","",` ${app_name}`," [options]"," <target-contract>",""," networks:"," All those supported"," by 'evm-chains-info'.",""," options:",""," -n, --network <network> EVM network name."," -i, --chain-id <number> EVM network id (chain ID)."," -a, --target-app <app> Application whose target"," contract is part of.",` Default: '${target_app}'`," -A, --networks-all Returns address for all"," available networks.",` Default: '${networks_all}'`," -V, --contract-version <version> Contract version.",` Default: '${contract_version}'`," -u, --user-defined Returns contract address for"," user-defined file system"," deployment instead of the system"," one.",` Default: '${user_defined}'`," -d, --deployments-dir <dir> Specify contract deployments"," directory path.",` Default: '${deployments_dir}'`," -f, --configuration-format <format> Specify contract deployments"," directory path.",` Default: '${configuration_format}'`,""," -h --help This message."," -v --verbose Enable verbose output.",""];for(e of r)i(e);d(t)}async function A(){let t,e;const r=await o({booleans:["A","networks-all","u","user-defined","h","help","v","verbose"]}),n=r._,a=u();a.quiet="y",h("runtime","environment","node"),r.h&&(t=!0),r.help&&(t=!0),(n.indexOf("--help")>-1||n.indexOf("-h")>-1)&&(t=!0),t&&(quiet="n",await $(),O(0)),(void 0===r||r._.length<1)&&(e="Target contract argument required.",m("Target contract argument required.",0),O(1)),h("target","contract",r._[0]);const s=l("target","networks");"n"in r&&s.push(r.n.toString()),"network"in r&&s.push(r.network.toString()),h("target","networks",s);const i=l("networks","ids");"i"in r&&i.push(r.i.toString()),"network-id"in r&&i.push(r["network-id"].toString()),h("network","ids",i),"a"in r&&h("target","app",r.a),"target-app"in r&&h("target","app",r["target-app"]),(r.A||r["networks-all"])&&h("networks","all","y"),(r.u||r["user-defined"])&&h("user","defined","y"),"f"in r&&h("configuration","format",r.f),"configuration-format"in r&&h("configuration","format",r["configuration-format"]),(r.v||r.verbose)&&(a.quiet="n")}function P(){h("runtime","environment","browser"),h("target","networks",a("network")),h("networks","ids",a("network_id")),h("networks","all",a("networks_all")[0]),h("target","app",a("target_app")[0]),h("target","contract",a("target_contract")[0]),h("contract","version",a("contract_version")[0]),h("user","defined",a("user_defined")[0]),h("configuration","format",a("configuration_format")[0]),h("deployments","dir",a("deployments_dir")[0]);const t=u();t.quiet=a("quiet"),0===quiet.length&&(t.quiet="n")}async function T(t){let e,r,n;try{n=await y.apply(null,t)}catch(r){throw e="Error running '_evm_contract_deployment_address' with arguments:",m("Error running '_evm_contract_deployment_address' with arguments:",0),c(t),c(r),r}const o=typeof n;if("object"==o)for(r of n)i(r);else"string"==o&&g(n)}async function q(){let t,e;await $(),S();const r=[target_networks,networks_ids,networks_all,target_app,target_contract,contract_version,user_defined,configuration_format,deployments_dir];try{t=await T(r)}catch(t){throw e="Error running '_evm_contract_deployment_adress_cmdline' with arguments:",m("Error running '_evm_contract_deployment_adress_cmdline' with arguments:",0),c(t),t}}j(),await s("evm-contract-deployment-address.js")||await s("evm-contract-deployment-address")?await A():P();try{q()}catch(x){const D=`Error running '${app_name}'.`;m(D,0),c(x)}e()}catch(C){e(C)}},1)}};const e={};function r(n){const o=e[n];if(void 0!==o)return o.exports;const a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.m=t,(()=>{const t=Symbol("webpack queues"),e=Symbol("webpack exports"),n=Symbol("webpack error"),o=t=>{t?.d<1&&(t.d=1,t.forEach(t=>t.r--),t.forEach(t=>t.r--?t.r++:t()))};r.a=(r,a,s)=>{let i;s&&((i=[]).d=-1);const c=new Set,d=r.exports;let l,u,p;const f=new Promise((t,e)=>{p=e,u=t});f[e]=d,f[t]=t=>(i&&t(i),c.forEach(t),f.catch(t=>{})),r.exports=f,a(r=>{let a;l=(r=>r.map(r=>{if(null!==r&&"object"==typeof r){if(r[t])return r;if(r.then){const a=[];a.d=0,r.then(t=>{s[e]=t,o(a)},t=>{s[n]=t,o(a)});const s={};return s[t]=t=>t(a),s}}const a={};return a[t]=t=>{},a[e]=r,a}))(r);const s=()=>l.map(t=>{if(t[n])throw t[n];return t[e]}),d=new Promise(e=>{a=()=>e(s),a.r=0;const r=t=>t!==i&&!c.has(t)&&(c.add(t),t&&!t.d&&(a.r++,t.push(a)));l.forEach(e=>e[t](r))});return a.r?d:s()},t=>(t?p(f[n]=t):u(d),o(i))),i?.d<0&&(i.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}const a=Object.create(null);r.r(a);const s={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&n;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(t=>s[t]=()=>n[t]);return s.default=()=>n,r.d(a,s),a}})(),r.d=(t,e)=>{if(Array.isArray(e))for(var n=0;n<e.length;){var o=e[n++],a=e[n++],s=0===a?{enumerable:!0,value:e[n++]}:{enumerable:!0,get:a};r.o(t,o)||Object.defineProperty(t,o,s)}else for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.f={},r.e=t=>{const e=[];return r.f.j(t,e),Promise.all(e)},r.u=t=>t+".evm-contract-deployment-address.js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="evm-contracts-tools:";r.l=(n,o,a,s)=>{if(t[n])return void t[n].push(o);let i,c;if(void 0!==a){const t=document.getElementsByTagName("script");for(var d=0;d<t.length;d++){const r=t[d];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==e+a){i=r;break}}}i||(c=!0,i=document.createElement("script"),i.charset="utf-8",r.nc&&i.setAttribute("nonce",r.nc),i.setAttribute("data-webpack",e+a),i.src=n),t[n]=[o];const l=(e,r)=>{i.onerror=i.onload=null,clearTimeout(u);const o=t[n];if(delete t[n],i.parentNode?.removeChild(i),o?.forEach(t=>t(r)),e)return e(r)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=l.bind(null,i.onerror),i.onload=l.bind(null,i.onload),c&&document.head.appendChild(i)}})(),r.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{let t;r.g.importScripts&&(t=r.g.location+"");const e=r.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const r=e.getElementsByTagName("script");if(r.length){let e=r.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=r[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=t})(),(()=>{const t={792:0};r.f.j=(e,n)=>{let o=r.o(t,e)?t[e]:void 0;if(0!==o)if(o)n.push(o[2]);else{const a=new Promise((r,n)=>o=t[e]=[r,n]);n.push(o[2]=a);const s=new Error,i=n=>{if(r.o(t,e)&&(o=t[e],0!==o&&(t[e]=void 0),o)){const t=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+t+": "+r+")",s.name="ChunkLoadError",s.type=t,s.request=r,s.event=n,o[1](s)}};r.l(r.p+r.u(e),i,"chunk-"+e,e)}};const e=(e,n)=>{let[o,a,s]=n;var i,c,d=0;if(o.some(e=>0!==t[e])){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);s&&s(r)}for(e&&e(n);d<o.length;d++)c=o[d],r.o(t,c)&&t[c]&&t[c][0](),t[c]=0},n=self.webpackChunkevm_contracts_tools=self.webpackChunkevm_contracts_tools||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),r(122)})();
|
|
@@ -180,7 +180,7 @@ function
|
|
|
180
180
|
"networks",
|
|
181
181
|
[]);
|
|
182
182
|
/* global
|
|
183
|
-
|
|
183
|
+
networks_ids:
|
|
184
184
|
writable */
|
|
185
185
|
_set(
|
|
186
186
|
"networks",
|
|
@@ -292,7 +292,7 @@ function
|
|
|
292
292
|
` Resolve date: ${resolve_date}`,
|
|
293
293
|
` Runtime environment: ${runtime_environment}`,
|
|
294
294
|
` Target networks: ${target_networks}`,
|
|
295
|
-
` Network ID (chain ID): ${
|
|
295
|
+
` Network ID (chain ID): ${networks_ids}`,
|
|
296
296
|
` All networks: ${networks_all}`,
|
|
297
297
|
` Target application: ${target_app}`,
|
|
298
298
|
` User-defined address: ${user_defined}`,
|
|
@@ -460,24 +460,24 @@ async function
|
|
|
460
460
|
"networks",
|
|
461
461
|
_target_networks);
|
|
462
462
|
const
|
|
463
|
-
|
|
463
|
+
_networks_ids =
|
|
464
464
|
_get(
|
|
465
|
-
"
|
|
465
|
+
"networks",
|
|
466
466
|
"ids");
|
|
467
467
|
if ( "i" in _argv ) {
|
|
468
|
-
|
|
468
|
+
_networks_ids.push(
|
|
469
469
|
_argv[
|
|
470
470
|
"i"].toString());
|
|
471
471
|
}
|
|
472
472
|
if ( "network-id" in _argv ) {
|
|
473
|
-
|
|
473
|
+
_networks_ids.push(
|
|
474
474
|
_argv[
|
|
475
475
|
"network-id"].toString());
|
|
476
476
|
}
|
|
477
477
|
_set(
|
|
478
478
|
"network",
|
|
479
479
|
"ids",
|
|
480
|
-
|
|
480
|
+
_networks_ids);
|
|
481
481
|
if ( "a" in _argv ) {
|
|
482
482
|
_set(
|
|
483
483
|
"target",
|
|
@@ -664,7 +664,7 @@ async function
|
|
|
664
664
|
const
|
|
665
665
|
app_opts = [
|
|
666
666
|
target_networks,
|
|
667
|
-
|
|
667
|
+
networks_ids,
|
|
668
668
|
networks_all,
|
|
669
669
|
target_app,
|
|
670
670
|
target_contract,
|
|
@@ -2002,7 +2002,7 @@ async function
|
|
|
2002
2002
|
_config_ext,
|
|
2003
2003
|
_contract,
|
|
2004
2004
|
_deployments_dir,
|
|
2005
|
-
|
|
2005
|
+
_evm_contract_deployment_versions,
|
|
2006
2006
|
_found,
|
|
2007
2007
|
_net,
|
|
2008
2008
|
_network,
|
|
@@ -2042,8 +2042,6 @@ async function
|
|
|
2042
2042
|
_deployments_dir);
|
|
2043
2043
|
if ( _deployments_dir_type !== "undefined" &&
|
|
2044
2044
|
deployments_dir !== "" ) {
|
|
2045
|
-
_deployments =
|
|
2046
|
-
deployments_dir;
|
|
2047
2045
|
if ( 0 < target_networks.length ) {
|
|
2048
2046
|
_network =
|
|
2049
2047
|
target_networks[
|
|
@@ -2057,7 +2055,7 @@ async function
|
|
|
2057
2055
|
const
|
|
2058
2056
|
_deployments_path =
|
|
2059
2057
|
_path_join( [
|
|
2060
|
-
|
|
2058
|
+
_deployments_dir,
|
|
2061
2059
|
_contract ] );
|
|
2062
2060
|
if ( networks_all == "n" ) {
|
|
2063
2061
|
_networks.push(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{ "name": "evm-contracts-tools",
|
|
2
2
|
"version":
|
|
3
|
-
"0.0.
|
|
3
|
+
"0.0.73",
|
|
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": {
|