evm-contracts-tools 0.0.69 → 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,n){n.a(t,async(t,e)=>{try{const r=await n.e(35).then(()=>n(35)),o=r._argv_get,a=r._argv_url_get,i=r._cmdline_check,s=r._echo,c=r._exit,l=r._get,d=r._global_get,u=r._get_date_human,p=r._msg_info,f=r._msg_error,m=r._override_set,g=r._printf,_=r._set,w=await n.e(825).then(()=>n(825)),h=w._evm_contract_deployment_address,y=w._contract_version_auto_detect,b=w._deployments_dir_auto_detect,v=w._networks_all_auto_detect,k=w._target_app_auto_detect;function j(){_("app","name","evm-contract-deployments-address.js"),_("app","opts",[]),_("runtime","environment",""),_("resolve","date",""),_("target","networks",[]),_("networks","ids",[]),_("networks","all",[]),_("target","app",""),_("target","contract",""),_("contract","version",""),_("user","defined",""),_("configuration","format",""),_("deployments","dir","");const t=d();t.quiet="",t.verbose=""}async function $(t){m("resolve","date",u()),m("configuration","format","bash"),v(),m("user","defined","n"),console.log(user_defined),await k(),await b(),console.log(deployments_dir),await y()}function E(){let t;const e=[`${l("app","name")} configuration:`,` Resolve date: ${resolve_date}`,` Runtime environment: ${runtime_environment}`,` Target networks: ${target_networks}`,` Network ID (chain ID): ${network_ids}`,` All networks: ${networks_all}`,` Target application: ${target_app}`,` User-defined address: ${user_defined}`,` Deployments path: ${deployments_dir}`];for(t of e)p(t)}function S(t){let e;const n=["","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 n)s(e);c(t)}async function O(){let t,e;const n=await o({booleans:["A","networks-all","u","user-defined","h","help","v","verbose"]}),r=n._,a=d();a.quiet="y",_("runtime","environment","node"),n.h&&(t=!0),n.help&&(t=!0),(r.indexOf("--help")>-1||r.indexOf("-h")>-1)&&(t=!0),t&&(quiet="n",await $(),S(0)),(void 0===n||n._.length<1)&&(e="Target contract argument required.",f("Target contract argument required.",0),S(1)),_("target","contract",n._[0]);const i=l("target","networks");"n"in n&&i.push(n.n.toString()),"network"in n&&i.push(n.network.toString()),_("target","networks",i);const s=l("network","ids");"i"in n&&s.push(n.i.toString()),"network-id"in n&&s.push(n["network-id"].toString()),_("network","ids",s),"a"in n&&_("target","app",n.a),"target-app"in n&&_("target","app",n["target-app"]),(n.A||n["networks-all"])&&_("networks","all","y"),(n.u||n["user-defined"])&&_("user","defined","y"),"f"in n&&_("configuration","format",n.f),"configuration-format"in n&&_("configuration","format",n["configuration-format"]),(n.v||n.verbose)&&(a.quiet="n")}function A(){_("runtime","environment","browser"),_("target","networks",a("network")),_("networks","ids",a("network_id")),_("networks","all",a("networks_all")[0]),_("target","app",a("target_app")[0]),_("target","contract",a("target_contract")[0]),_("contract","version",a("contract_version")[0]),_("user","defined",a("user_defined")[0]),_("configuration","format",a("configuration_format")[0]),_("deployments","dir",a("deployments_dir")[0]);const t=d();t.quiet=a("quiet"),0===quiet.length&&(t.quiet="n")}async function P(t){let e;const n=await h.apply(null,t),r=typeof n;if("object"==r)for(e of n)s(e);else"string"==r&&g(n)}async function T(){await $(),E();const t=[target_networks,network_ids,networks_all,target_app,target_contract,contract_version,user_defined,configuration_format,deployments_dir];await P(t)}j(),await i("evm-contract-deployment-address.js")||await i("evm-contract-deployment-address")?await O():A(),T(),e()}catch(q){e(q)}},1)}};const e={};function n(r){const o=e[r];if(void 0!==o)return o.exports;const a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.m=t,(()=>{const t=Symbol("webpack queues"),e=Symbol("webpack exports"),r=Symbol("webpack error"),o=t=>{t?.d<1&&(t.d=1,t.forEach(t=>t.r--),t.forEach(t=>t.r--?t.r++:t()))};n.a=(n,a,i)=>{let s;i&&((s=[]).d=-1);const c=new Set,l=n.exports;let d,u,p;const f=new Promise((t,e)=>{p=e,u=t});f[e]=l,f[t]=t=>(s&&t(s),c.forEach(t),f.catch(t=>{})),n.exports=f,a(n=>{let a;d=(n=>n.map(n=>{if(null!==n&&"object"==typeof n){if(n[t])return n;if(n.then){const a=[];a.d=0,n.then(t=>{i[e]=t,o(a)},t=>{i[r]=t,o(a)});const i={};return i[t]=t=>t(a),i}}const a={};return a[t]=t=>{},a[e]=n,a}))(n);const i=()=>d.map(t=>{if(t[r])throw t[r];return t[e]}),l=new Promise(e=>{a=()=>e(i),a.r=0;const n=t=>t!==s&&!c.has(t)&&(c.add(t),t&&!t.d&&(a.r++,t.push(a)));d.forEach(e=>e[t](n))});return a.r?l:i()},t=>(t?p(f[r]=t):u(l),o(s))),s?.d<0&&(s.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}const a=Object.create(null);n.r(a);const i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(t=>i[t]=()=>r[t]);return i.default=()=>r,n.d(a,i),a}})(),n.d=(t,e)=>{if(Array.isArray(e))for(var r=0;r<e.length;){var o=e[r++],a=e[r++],i=0===a?{enumerable:!0,value:e[r++]}:{enumerable:!0,get:a};n.o(t,o)||Object.defineProperty(t,o,i)}else for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.f={},n.e=t=>{const e=[];return n.f.j(t,e),Promise.all(e)},n.u=t=>t+".evm-contract-deployment-address.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="evm-contracts-tools:";n.l=(r,o,a,i)=>{if(t[r])return void t[r].push(o);let s,c;if(void 0!==a){const t=document.getElementsByTagName("script");for(var l=0;l<t.length;l++){const n=t[l];if(n.getAttribute("src")==r||n.getAttribute("data-webpack")==e+a){s=n;break}}}s||(c=!0,s=document.createElement("script"),s.charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",e+a),s.src=r),t[r]=[o];const d=(e,n)=>{s.onerror=s.onload=null,clearTimeout(u);const o=t[r];if(delete t[r],s.parentNode?.removeChild(s),o?.forEach(t=>t(n)),e)return e(n)},u=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),c&&document.head.appendChild(s)}})(),n.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{let t;n.g.importScripts&&(t=n.g.location+"");const e=n.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const n=e.getElementsByTagName("script");if(n.length){let e=n.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=n[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),n.p=t})(),(()=>{const t={792:0};n.f.j=(e,r)=>{let o=n.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{const a=new Promise((n,r)=>o=t[e]=[n,r]);r.push(o[2]=a);const i=new Error,s=r=>{if(n.o(t,e)&&(o=t[e],0!==o&&(t[e]=void 0),o)){const t=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;i.message="Loading chunk "+e+" failed.\n("+t+": "+n+")",i.name="ChunkLoadError",i.type=t,i.request=n,i.event=r,o[1](i)}};n.l(n.p+n.u(e),s,"chunk-"+e,e)}};const e=(e,r)=>{let[o,a,i]=r;var s,c,l=0;if(o.some(e=>0!==t[e])){for(s in a)n.o(a,s)&&(n.m[s]=a[s]);i&&i(n)}for(e&&e(r);l<o.length;l++)c=o[l],n.o(t,c)&&t[c]&&t[c][0](),t[c]=0},r=self.webpackChunkevm_contracts_tools=self.webpackChunkevm_contracts_tools||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})(),n(122)})();
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)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var t={825(t,e,r){r.a(t,async(t,o)=>{try{r.d(e,{_evm_contract_deployment_address:()=>v});const n=await r.e(35).then(()=>r(35)),i=(n._basename,n._chmod,n._cp,n._dir_exists,n._echo),c=n._echo2,a=n._file_exists,s=n._file_read,l=n._from_bash_ass_array,d=n._global_get,f=(n._homedir_get,n._json_read),u=(n._lib_get,n._mkdir,n._msg_info),p=n._msg_error,h=(n._override_set,n._path_join),_=(n._pwd,n._require,await r.e(486).then(()=>r(486))),m=(_._config_file_path_check,_._configuration_format_check),y=(_._contract_version_auto_detect,_._deployments_dir_auto_detect,_._network_check),w=(_._networks_all_auto_detect,_._target_app_auto_detect,_._user_deployments_check),g=(await r.e(822).then(()=>r(822)))._evm_contract_deployment_networks;async function b(t,e,o,n,_,y){let w,g,b,v,k,$,j,E,P;const O=d().quiet;E="Reading address from configuration file.",u(E);const S=typeof _;if("bash"==(y=m(y)))g="sh";else{if("json"!=y)throw E=`Unknown configuration format ${y}'.`,p(E,0),E;g="json"}const x=[o,n];for(P of($=!1,x))if(b=h([t,e,P,`config.${g}`]),a(b)){$=!0;break}if(!$)throw E=`No network '${o}' deployment configuration for contract '${e}' found at path '${t}'.`,p(E,0),E;if("json"==y)w=f(b),j="contract-address";else{if("bash"!=y)throw E=`Unknown configuration format '${y}'.`,p(E,0),E;w=l(s(b)),j="contract_address"}if("undefined"===S||""==_){E="No version selected, retrieving.",u(E),k=await r.e(724).then(()=>r(724));const t=k._evm_contract_deployment_versions;v=[b,"y","n",y];try{E="Running '_evm_contract_deployment_versions' with arguments:",u(E),"n"==O&&i(v),E=`Got contract version '${_=await t.apply(null,v)}'.`,u(E)}catch(t){throw E="Error while running '_evm_contract_deployment_versions' with arguments:",p(E,0),c(v),t}}const T=w[j][_],A=typeof T;if("undefined"===A||""==T)throw E=`No '${e}' version '${_}' contract deployment specified for network '${o}' for directory at path '${t}'.`,p(E,0),E;return"string"==A&&(E=`Got contract address '${T}'`,u(E)),T}async function v(t,e,o,n,i,a,s,l,f){let h,_,v,k,$,j,E,P,O,S;l=m(l);const x=d().quiet,T=(await r.e(419).then(()=>r(419)))._evm_contract_deployments_dir,A=[],C=[],N=typeof f;if(void 0!==s&&""!==s||(k="User defined not specified, setting default (n).",u(k),s="n"),"undefined"===N||""===f)try{f=await T(n,s)}catch(t){throw k="Error while retrieving system deployments directory location for auto-detection.",p(k,0),p(t,0),t}if("n"==s){if(""===n)throw k="A target application needs to be specified with option '-a' if not enabling user-defined deployments with '-u' and specifying a deployments directory path with '-d'.",p(k,0),k;try{S=await T(n,s)}catch(t){throw k="Error while retrieving system deployments directory location.",p(k,0),p(t,0),t}if(f!=S)throw k="To set a custom deployments directory path you need to enable the user-defined deployments switch with '-u'."+p(k,0),k}else{if("y"!=s)throw k=`The 'user-defined' switch argument can be 'y' or 'n', current value '${s}'.`,p(k,0),{msg:k};if(""!=n)try{O=await T(n,s)}catch(t){throw k="Error while retrieving user deployments directory location.",p(k,0),p(t,0),t}f!=O?(k=`Using custom deployments directory path '${f}'.`,u(k)):w(n,f)}if("y"==o){k="Selecting all networks.",u(k);try{t=await g(`${f}/${i}`,o)}catch(t){throw k=`Error while retrieving networks for contract '${i}'.`,p(k,0),c(t),t}}for($ of(k=`Getting '${i}' contract address for libEVM app '${n}' for networks with RPCs '${t}' and chain ID '${e}', (user-defined contracts: '${s}'), by looking for configuration files of type '${l}'.`,u(k),t))P="",j=[f,i,$,""],await y.apply(null,j),C.push([f,i,$,"",a,l]);for($ of e)E="",j=[f,i,"",$],await y.apply(null,j),C.push([f,i,"",$,a,l]);for(_ of C){try{k="Running _contract_address_get with parameters:",u(k),"n"==x&&c(_),v=await b.apply(null,_)}catch(t){throw k="Error while running _contract_address_get with parameters:",p(k,0),c(_),c(t),k}A.push(v)}const q={};for(h of A)q[h]=1;return Object.keys(q)}o()}catch(k){o(k)}},1)}};const e={};function r(o){const n=e[o];if(void 0!==n)return n.exports;const i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.m=t,(()=>{const t=Symbol("webpack queues"),e=Symbol("webpack exports"),o=Symbol("webpack error"),n=t=>{t?.d<1&&(t.d=1,t.forEach(t=>t.r--),t.forEach(t=>t.r--?t.r++:t()))};r.a=(r,i,c)=>{let a;c&&((a=[]).d=-1);const s=new Set,l=r.exports;let d,f,u;const p=new Promise((t,e)=>{u=e,f=t});p[e]=l,p[t]=t=>(a&&t(a),s.forEach(t),p.catch(t=>{})),r.exports=p,i(r=>{let i;d=(r=>r.map(r=>{if(null!==r&&"object"==typeof r){if(r[t])return r;if(r.then){const i=[];i.d=0,r.then(t=>{c[e]=t,n(i)},t=>{c[o]=t,n(i)});const c={};return c[t]=t=>t(i),c}}const i={};return i[t]=t=>{},i[e]=r,i}))(r);const c=()=>d.map(t=>{if(t[o])throw t[o];return t[e]}),l=new Promise(e=>{i=()=>e(c),i.r=0;const r=t=>t!==a&&!s.has(t)&&(s.add(t),t&&!t.d&&(i.r++,t.push(i)));d.forEach(e=>e[t](r))});return i.r?l:c()},t=>(t?u(p[o]=t):f(l),n(a))),a?.d<0&&(a.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;r.t=function(o,n){if(1&n&&(o=this(o)),8&n)return o;if("object"==typeof o&&o){if(4&n&&o.__esModule)return o;if(16&n&&"function"==typeof o.then)return o}const i=Object.create(null);r.r(i);const c={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&o;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(t=>c[t]=()=>o[t]);return c.default=()=>o,r.d(i,c),i}})(),r.d=(t,e)=>{if(Array.isArray(e))for(var o=0;o<e.length;){var n=e[o++],i=e[o++],c=0===i?{enumerable:!0,value:e[o++]}:{enumerable:!0,get:i};r.o(t,n)||Object.defineProperty(t,n,c)}else for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.f={},r.e=t=>{const e=[];return r.f.j(t,e),Promise.all(e)},r.u=t=>t+".libevm-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=(o,n,i,c)=>{if(t[o])return void t[o].push(n);let a,s;if(void 0!==i){const t=document.getElementsByTagName("script");for(var l=0;l<t.length;l++){const r=t[l];if(r.getAttribute("src")==o||r.getAttribute("data-webpack")==e+i){a=r;break}}}a||(s=!0,a=document.createElement("script"),a.charset="utf-8",r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",e+i),a.src=o),t[o]=[n];const d=(e,r)=>{a.onerror=a.onload=null,clearTimeout(f);const n=t[o];if(delete t[o],a.parentNode?.removeChild(a),n?.forEach(t=>t(r)),e)return e(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}})(),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,o)=>{let n=r.o(t,e)?t[e]:void 0;if(0!==n)if(n)o.push(n[2]);else{const i=new Promise((r,o)=>n=t[e]=[r,o]);o.push(n[2]=i);const c=new Error,a=o=>{if(r.o(t,e)&&(n=t[e],0!==n&&(t[e]=void 0),n)){const t=o&&("load"===o.type?"missing":o.type),r=o&&o.target&&o.target.src;c.message="Loading chunk "+e+" failed.\n("+t+": "+r+")",c.name="ChunkLoadError",c.type=t,c.request=r,c.event=o,n[1](c)}};r.l(r.p+r.u(e),a,"chunk-"+e,e)}};const e=(e,o)=>{let[n,i,c]=o;var a,s,l=0;if(n.some(e=>0!==t[e])){for(a in i)r.o(i,a)&&(r.m[a]=i[a]);c&&c(r)}for(e&&e(o);l<n.length;l++)s=n[l],r.o(t,s)&&t[s]&&t[s][0](),t[s]=0},o=self.webpackChunkevm_contracts_tools=self.webpackChunkevm_contracts_tools||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})(),r(825)})();
1
+ (()=>{"use strict";var e={825(e,t,o){o.a(e,async(e,r)=>{try{o.d(t,{_evm_contract_deployment_address:()=>v});const n=await o.e(35).then(()=>o(35)),i=(n._basename,n._chmod,n._cp,n._dir_exists,n._echo),c=n._echo2,a=n._file_exists,s=n._file_read,l=n._from_bash_ass_array,d=n._global_get,f=(n._homedir_get,n._json_read),u=(n._lib_get,n._mkdir,n._msg_info),p=n._msg_error,h=(n._override_set,n._path_join),_=(n._pwd,n._require,await o.e(486).then(()=>o(486))),m=(_._config_file_path_check,_._configuration_format_check),y=(_._contract_version_auto_detect,_._deployments_dir_auto_detect,_._network_check),w=(_._networks_all_auto_detect,_._target_app_auto_detect,_._user_deployments_check),g=(await o.e(822).then(()=>o(822)))._evm_contract_deployment_networks;async function b(e,t,r,n,_,y){let w,g,b,v,k,$,j,E,P;const O=d().quiet;E="Reading address from configuration file.",u(E);const S=typeof _;if("bash"==(y=m(y)))g="sh";else{if("json"!=y)throw E=`Unknown configuration format ${y}'.`,p(E,0),E;g="json"}const x=[r,n];for(P of($=!1,x))if(b=h([e,t,P,`config.${g}`]),a(b)){$=!0;break}if(!$)throw E=`No network '${r}' deployment configuration for contract '${t}' found at path '${e}'.`,p(E,0),E;if("json"==y)w=f(b),j="contract-address";else{if("bash"!=y)throw E=`Unknown configuration format '${y}'.`,p(E,0),E;w=l(s(b)),j="contract_address"}if("undefined"===S||""==_){E="No version selected, retrieving.",u(E),k=await o.e(724).then(()=>o(724));const e=k._evm_contract_deployment_versions;v=[b,"y","n",y];try{E="Running '_evm_contract_deployment_versions' with arguments:",u(E),"n"==O&&i(v),E=`Got contract version '${_=await e.apply(null,v)}'.`,u(E)}catch(e){throw E="Error while running '_evm_contract_deployment_versions' with arguments:",p(E,0),c(v),e}}const T=w[j][_],A=typeof T;if("undefined"===A||""==T)throw E=`No '${t}' version '${_}' contract deployment specified for network '${r}' for directory at path '${e}'.`,p(E,0),E;return"string"==A&&(E=`Got contract address '${T}'`,u(E)),T}async function v(e,t,r,n,i,a,s,l,f){let h,_,v,k,$,j,E,P,O,S;l=m(l);const x=d().quiet,T=(await o.e(419).then(()=>o(419)))._evm_contract_deployments_dir,A=[],C=[],N=typeof f;if(void 0!==s&&""!==s||(k="User defined not specified, setting default (n).",u(k),s="n"),"undefined"===N||""===f)try{k="Deployments directory undefined, auto-detecting.",u(k),f=await T(n,s)}catch(e){throw k="Error while retrieving system deployments directory location for auto-detection.",p(k,0),p(e,0),e}if("n"==s){if(""===n)throw k="A target application needs to be specified with option '-a' if not enabling user-defined deployments with '-u' and specifying a deployments directory path with '-d'.",p(k,0),k;try{S=await T(n,s)}catch(e){throw k="Error while retrieving system deployments directory location.",p(k,0),p(e,0),e}if(f!=S)throw k="To set a custom deployments directory path you need to enable the user-defined deployments switch with '-u'."+p(k,0),k}else{if("y"!=s)throw k=`The 'user-defined' switch argument can be 'y' or 'n', current value '${s}'.`,p(k,0),{msg:k};if(""!=n)try{O=await T(n,s)}catch(e){throw k="Error while retrieving user deployments directory location.",p(k,0),p(e,0),e}f!=O?(k=`Using custom deployments directory path '${f}'.`,u(k)):w(n,f)}if("y"==r){k="Selecting all networks.",u(k);try{e=await g(`${f}/${i}`,r)}catch(e){throw k=`Error while retrieving networks for contract '${i}'.`,p(k,0),c(e),e}}for($ of(k=`Getting '${i}' contract address for libEVM app '${n}' for networks with RPCs '${e}' and chain ID '${t}', (user-defined contracts: '${s}'), by looking for configuration files of type '${l}'.`,u(k),e))P="",j=[f,i,$,""],await y.apply(null,j),C.push([f,i,$,"",a,l]);for($ of t)E="",j=[f,i,"",$],await y.apply(null,j),C.push([f,i,"",$,a,l]);for(_ of C){try{k="Running _contract_address_get with parameters:",u(k),"n"==x&&c(_),v=await b.apply(null,_)}catch(e){throw k="Error while running _contract_address_get with parameters:",p(k,0),c(_),c(e),k}A.push(v)}const q={};for(h of A)q[h]=1;return Object.keys(q)}r()}catch(k){r(k)}},1)}};const t={};function o(r){const n=t[r];if(void 0!==n)return n.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,o),i.exports}o.m=e,(()=>{const e=Symbol("webpack queues"),t=Symbol("webpack exports"),r=Symbol("webpack error"),n=e=>{e?.d<1&&(e.d=1,e.forEach(e=>e.r--),e.forEach(e=>e.r--?e.r++:e()))};o.a=(o,i,c)=>{let a;c&&((a=[]).d=-1);const s=new Set,l=o.exports;let d,f,u;const p=new Promise((e,t)=>{u=t,f=e});p[t]=l,p[e]=e=>(a&&e(a),s.forEach(e),p.catch(e=>{})),o.exports=p,i(o=>{let i;d=(o=>o.map(o=>{if(null!==o&&"object"==typeof o){if(o[e])return o;if(o.then){const i=[];i.d=0,o.then(e=>{c[t]=e,n(i)},e=>{c[r]=e,n(i)});const c={};return c[e]=e=>e(i),c}}const i={};return i[e]=e=>{},i[t]=o,i}))(o);const c=()=>d.map(e=>{if(e[r])throw e[r];return e[t]}),l=new Promise(t=>{i=()=>t(c),i.r=0;const o=e=>e!==a&&!s.has(e)&&(s.add(e),e&&!e.d&&(i.r++,e.push(i)));d.forEach(t=>t[e](o))});return i.r?l:c()},e=>(e?u(p[r]=e):f(l),n(a))),a?.d<0&&(a.d=0)}})(),(()=>{const e=Object.getPrototypeOf;let t;o.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}const i=Object.create(null);o.r(i);const c={};t=t||[null,e({}),e([]),e(e)];for(var a=2&n&&r;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(e=>c[e]=()=>r[e]);return c.default=()=>r,o.d(i,c),i}})(),o.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var n=t[r++],i=t[r++],c=0===i?{enumerable:!0,value:t[r++]}:{enumerable:!0,get:i};o.o(e,n)||Object.defineProperty(e,n,c)}else for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.f={},o.e=e=>{const t=[];return o.f.j(e,t),Promise.all(t)},o.u=e=>e+".libevm-contract-deployment-address.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="evm-contracts-tools:";o.l=(r,n,i,c)=>{if(e[r])return void e[r].push(n);let a,s;if(void 0!==i){const e=document.getElementsByTagName("script");for(var l=0;l<e.length;l++){const o=e[l];if(o.getAttribute("src")==r||o.getAttribute("data-webpack")==t+i){a=o;break}}}a||(s=!0,a=document.createElement("script"),a.charset="utf-8",o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",t+i),a.src=r),e[r]=[n];const d=(t,o)=>{a.onerror=a.onload=null,clearTimeout(f);const n=e[r];if(delete e[r],a.parentNode?.removeChild(a),n?.forEach(e=>e(o)),t)return t(o)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}})(),o.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;o.g.importScripts&&(e=o.g.location+"");const t=o.g.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const o=t.getElementsByTagName("script");if(o.length){let t=o.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=o[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),o.p=e})(),(()=>{const e={792:0};o.f.j=(t,r)=>{let n=o.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{const i=new Promise((o,r)=>n=e[t]=[o,r]);r.push(n[2]=i);const c=new Error,a=r=>{if(o.o(e,t)&&(n=e[t],0!==n&&(e[t]=void 0),n)){const e=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+e+": "+o+")",c.name="ChunkLoadError",c.type=e,c.request=o,c.event=r,n[1](c)}};o.l(o.p+o.u(t),a,"chunk-"+t,t)}};const t=(t,r)=>{let[n,i,c]=r;var a,s,l=0;if(n.some(t=>0!==e[t])){for(a in i)o.o(i,a)&&(o.m[a]=i[a]);c&&c(o)}for(t&&t(r);l<n.length;l++)s=n[l],o.o(e,s)&&e[s]&&e[s][0](),e[s]=0},r=self.webpackChunkevm_contracts_tools=self.webpackChunkevm_contracts_tools||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),o(825)})();
package/eslint.config.mjs CHANGED
@@ -35,7 +35,6 @@ const
35
35
  _ignores = [
36
36
  "build/**",
37
37
  "dist/**",
38
- "node_modules/**",
39
38
  "eslint.config.js",
40
39
  "evm-contract-call.js",
41
40
  "**/*.evm-contract-call.js",
@@ -73,7 +72,8 @@ const
73
72
  "**/*.libevm-contract-deployment-versions.js",
74
73
  "libevm-contract-deployments-dir.js",
75
74
  "**/*.libevm-contract-deployments-dir.js",
76
- "man/**"
75
+ "man/**",
76
+ "node_modules/**"
77
77
  ];
78
78
 
79
79
  export default defineConfig([
@@ -123,7 +123,7 @@ export default defineConfig([
123
123
  "prefer-const":
124
124
  "error" },
125
125
  files: [
126
- "**/*.{cjs,js}",
126
+ "**/*.{cjs,js}",
127
127
  ],
128
128
  languageOptions:
129
129
  { sourceType:
@@ -62,6 +62,11 @@ const
62
62
  const
63
63
  _echo =
64
64
  _libcrash._echo;
65
+ /* global
66
+ _echo2 */
67
+ const
68
+ _echo2 =
69
+ _libcrash._echo2;
65
70
  /* global
66
71
  _exit */
67
72
  const
@@ -175,7 +180,7 @@ function
175
180
  "networks",
176
181
  []);
177
182
  /* global
178
- network_ids:
183
+ networks_ids:
179
184
  writable */
180
185
  _set(
181
186
  "networks",
@@ -260,12 +265,16 @@ async function
260
265
  "user",
261
266
  "defined",
262
267
  "n");
263
- console.log(
264
- user_defined);
265
- await _target_app_auto_detect();
266
- await _deployments_dir_auto_detect();
267
- console.log(deployments_dir);
268
- await _contract_version_auto_detect();
268
+ const
269
+ _target_contract =
270
+ _get(
271
+ "target",
272
+ "contract");
273
+ if ( _target_contract != "" ) {
274
+ await _target_app_auto_detect();
275
+ await _deployments_dir_auto_detect();
276
+ await _contract_version_auto_detect();
277
+ }
269
278
  }
270
279
 
271
280
  function
@@ -283,7 +292,7 @@ function
283
292
  ` Resolve date: ${resolve_date}`,
284
293
  ` Runtime environment: ${runtime_environment}`,
285
294
  ` Target networks: ${target_networks}`,
286
- ` Network ID (chain ID): ${network_ids}`,
295
+ ` Network ID (chain ID): ${networks_ids}`,
287
296
  ` All networks: ${networks_all}`,
288
297
  ` Target application: ${target_app}`,
289
298
  ` User-defined address: ${user_defined}`,
@@ -451,24 +460,24 @@ async function
451
460
  "networks",
452
461
  _target_networks);
453
462
  const
454
- _network_ids =
463
+ _networks_ids =
455
464
  _get(
456
- "network",
465
+ "networks",
457
466
  "ids");
458
467
  if ( "i" in _argv ) {
459
- _network_ids.push(
468
+ _networks_ids.push(
460
469
  _argv[
461
470
  "i"].toString());
462
471
  }
463
472
  if ( "network-id" in _argv ) {
464
- _network_ids.push(
473
+ _networks_ids.push(
465
474
  _argv[
466
475
  "network-id"].toString());
467
476
  }
468
477
  _set(
469
478
  "network",
470
479
  "ids",
471
- _network_ids);
480
+ _networks_ids);
472
481
  if ( "a" in _argv ) {
473
482
  _set(
474
483
  "target",
@@ -604,12 +613,29 @@ async function
604
613
  _evm_contract_deployment_address_cmdline(
605
614
  _app_opts) {
606
615
  let
607
- _result;
608
- const
616
+ _msg,
617
+ _result,
618
+ _results;
619
+ try {
609
620
  _results =
610
621
  await _evm_contract_deployment_address.apply(
611
622
  null,
612
623
  _app_opts);
624
+ }
625
+ catch(
626
+ _error) {
627
+ _msg =
628
+ "Error running '_evm_contract_deployment_address' " +
629
+ "with arguments:";
630
+ _msg_error(
631
+ _msg,
632
+ 0);
633
+ _echo2(
634
+ _app_opts);
635
+ _echo2(
636
+ _error);
637
+ throw _error;
638
+ }
613
639
  const
614
640
  _results_type =
615
641
  typeof(
@@ -628,6 +654,9 @@ async function
628
654
 
629
655
  async function
630
656
  _main() {
657
+ let
658
+ _address,
659
+ _msg;
631
660
  const
632
661
  _overrides_set_up =
633
662
  await _overrides_set();
@@ -635,7 +664,7 @@ async function
635
664
  const
636
665
  app_opts = [
637
666
  target_networks,
638
- network_ids,
667
+ networks_ids,
639
668
  networks_all,
640
669
  target_app,
641
670
  target_contract,
@@ -644,10 +673,24 @@ async function
644
673
  configuration_format,
645
674
  deployments_dir,
646
675
  ];
647
- const
676
+ try {
648
677
  _address =
649
678
  await _evm_contract_deployment_address_cmdline(
650
679
  app_opts);
680
+ }
681
+ catch(
682
+ _error) {
683
+ _msg =
684
+ "Error running " +
685
+ `'_evm_contract_deployment_adress_cmdline' ` +
686
+ "with arguments:";
687
+ _msg_error(
688
+ _msg,
689
+ 0);
690
+ _echo2(
691
+ _error);
692
+ throw _error;
693
+ }
651
694
  }
652
695
 
653
696
  _global_variables();
@@ -660,4 +703,17 @@ if ( await _cmdline_check(
660
703
  else{
661
704
  _url_parse();
662
705
  }
663
- _main();
706
+ try {
707
+ _main();
708
+ }
709
+ catch(
710
+ _error) {
711
+ const
712
+ _msg =
713
+ `Error running '${app_name}'.`;
714
+ _msg_error(
715
+ _msg,
716
+ 0);
717
+ _echo2(
718
+ _error);
719
+ }
@@ -451,9 +451,21 @@ async function
451
451
  _msg_info(
452
452
  _msg);
453
453
  }
454
- _app =
455
- _app_check(
456
- _app);
454
+ try {
455
+ _app =
456
+ _app_check(
457
+ _app);
458
+ }
459
+ catch(
460
+ _error) {
461
+ _msg =
462
+ "Error running '_app_check' " +
463
+ `for application '${_app}'.`;
464
+ _msg_error(
465
+ _msg,
466
+ 0);
467
+ throw _error;
468
+ }
457
469
  const
458
470
  _contract_type =
459
471
  typeof(
@@ -762,9 +774,21 @@ async function
762
774
  _msg_info(
763
775
  _msg);
764
776
  }
765
- _app =
766
- _app_check(
767
- _app);
777
+ try {
778
+ _app =
779
+ _app_check(
780
+ _app);
781
+ }
782
+ catch(
783
+ _error) {
784
+ _msg =
785
+ "Error running '_app_check' " +
786
+ `for application '${_app}'.`;
787
+ _msg_error(
788
+ _msg,
789
+ 0);
790
+ throw _error;
791
+ }
768
792
  const
769
793
  _contract_type =
770
794
  typeof(
@@ -1055,9 +1079,21 @@ async function
1055
1079
  _msg_info(
1056
1080
  _msg);
1057
1081
  }
1058
- _app =
1059
- _app_check(
1060
- _app);
1082
+ try {
1083
+ _app =
1084
+ _app_check(
1085
+ _app);
1086
+ }
1087
+ catch(
1088
+ _error) {
1089
+ _msg =
1090
+ "Error running '_app_check' " +
1091
+ `for application '${_app}'.`;
1092
+ _msg_error(
1093
+ _msg,
1094
+ 0);
1095
+ throw _error;
1096
+ }
1061
1097
  const
1062
1098
  _contract_type =
1063
1099
  typeof(
@@ -1700,9 +1736,21 @@ async function
1700
1736
  _error);
1701
1737
  throw _error;
1702
1738
  }
1703
- _app =
1704
- _app_check(
1705
- _app);
1739
+ try {
1740
+ _app =
1741
+ _app_check(
1742
+ _app);
1743
+ }
1744
+ catch(
1745
+ _error) {
1746
+ _msg =
1747
+ "Error running '_app_check' " +
1748
+ `for application '${_app}'.`;
1749
+ _msg_error(
1750
+ _msg,
1751
+ 0);
1752
+ throw _error;
1753
+ }
1706
1754
  _user_defined =
1707
1755
  _user_defined_check(
1708
1756
  _user_defined);
@@ -1750,9 +1798,21 @@ async function
1750
1798
  _get(
1751
1799
  "target",
1752
1800
  "app");
1753
- _app =
1754
- _app_check(
1755
- _app);
1801
+ try {
1802
+ _app =
1803
+ _app_check(
1804
+ _app);
1805
+ }
1806
+ catch(
1807
+ _error) {
1808
+ _msg =
1809
+ "Error running '_app_check' " +
1810
+ `for application '${_app}'.`;
1811
+ _msg_error(
1812
+ _msg,
1813
+ 0);
1814
+ throw _error;
1815
+ }
1756
1816
  if ( _app != "" ) {
1757
1817
  _user_defined =
1758
1818
  _get(
@@ -1942,7 +2002,7 @@ async function
1942
2002
  _config_ext,
1943
2003
  _contract,
1944
2004
  _deployments_dir,
1945
- _evm_contracts_deployment_versions,
2005
+ _evm_contract_deployment_versions,
1946
2006
  _found,
1947
2007
  _net,
1948
2008
  _network,
@@ -1982,22 +2042,20 @@ async function
1982
2042
  _deployments_dir);
1983
2043
  if ( _deployments_dir_type !== "undefined" &&
1984
2044
  deployments_dir !== "" ) {
1985
- _deployments =
1986
- deployments_dir;
1987
2045
  if ( 0 < target_networks.length ) {
1988
2046
  _network =
1989
2047
  target_networks[
1990
2048
  0];
1991
2049
  }
1992
- if ( 0 < network_ids.length ) {
2050
+ if ( 0 < networks_ids.length ) {
1993
2051
  _network_id =
1994
- _network_ids[
2052
+ _networks_ids[
1995
2053
  0];
1996
2054
  }
1997
2055
  const
1998
2056
  _deployments_path =
1999
2057
  _path_join( [
2000
- _deployments,
2058
+ _deployments_dir,
2001
2059
  _contract ] );
2002
2060
  if ( networks_all == "n" ) {
2003
2061
  _networks.push(
@@ -2106,8 +2164,18 @@ function
2106
2164
  _networks_all;
2107
2165
  _networks_all =
2108
2166
  "n";
2109
- if ( target_networks.length < 1 &&
2110
- network_ids.length < 1 ) {
2167
+ const
2168
+ _target_networks =
2169
+ _get(
2170
+ "target",
2171
+ "networks");
2172
+ const
2173
+ _networks_ids =
2174
+ _get(
2175
+ "networks",
2176
+ "ids");
2177
+ if ( _target_networks.length < 1 &&
2178
+ _networks_ids.length < 1 ) {
2111
2179
  _networks_all =
2112
2180
  "y";
2113
2181
  }
@@ -2535,7 +2603,8 @@ async function
2535
2603
  let
2536
2604
  _address_missing,
2537
2605
  _app,
2538
- _evm_contract_deployments_dir;
2606
+ _evm_contract_deployments_dir,
2607
+ _msg;
2539
2608
  const
2540
2609
  _contract_address =
2541
2610
  _get(
@@ -2587,6 +2656,12 @@ async function
2587
2656
  _app =
2588
2657
  "";
2589
2658
  if ( ! _address_missing ) {
2659
+ _msg =
2660
+ "Determining LibEVM application name " +
2661
+ "for contract with address " +
2662
+ `'${_contract_address}'.`;
2663
+ _msg_info(
2664
+ _msg);
2590
2665
  const
2591
2666
  _dir_current_name =
2592
2667
  _basename(
@@ -2663,6 +2738,12 @@ async function
2663
2738
  _msg);
2664
2739
  }
2665
2740
  }
2741
+ else {
2742
+ _msg =
2743
+ "No contract address defined.";
2744
+ _msg_info(
2745
+ _msg);
2746
+ }
2666
2747
  _override_set(
2667
2748
  "target",
2668
2749
  "app",
@@ -411,7 +411,7 @@ async function
411
411
  async function
412
412
  _evm_contract_deployment_address(
413
413
  _target_networks,
414
- _network_ids,
414
+ _networks_ids,
415
415
  _networks_all,
416
416
  _target_app,
417
417
  _target_contract,
@@ -474,6 +474,11 @@ async function
474
474
  if ( _deployments_dir_type === "undefined" ||
475
475
  _deployments_dir === "" ) {
476
476
  try {
477
+ _msg =
478
+ "Deployments directory undefined, " +
479
+ "auto-detecting.";
480
+ _msg_info(
481
+ _msg);
477
482
  _deployments_dir =
478
483
  await _evm_contract_deployments_dir(
479
484
  _target_app,
@@ -614,7 +619,7 @@ async function
614
619
  `Getting '${_target_contract}' contract address for ` +
615
620
  `libEVM app '${_target_app}' ` +
616
621
  `for networks with RPCs '${_target_networks}' ` +
617
- `and chain ID '${_network_ids}', (user-defined contracts: ` +
622
+ `and chain ID '${_networks_ids}', (user-defined contracts: ` +
618
623
  `'${_user_defined}'), by looking for configuration files ` +
619
624
  `of type '${_configuration_format}'.`;
620
625
  _msg_info(
@@ -645,7 +650,7 @@ async function
645
650
  _configuration_format
646
651
  ] );
647
652
  }
648
- for ( _network of _network_ids ) {
653
+ for ( _network of _networks_ids ) {
649
654
  _target_network =
650
655
  "";
651
656
  _network_check_args = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "evm-contracts-tools",
2
2
  "version":
3
- "0.0.69",
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": {
@@ -128,7 +128,7 @@
128
128
  "evm-transactions-tools":
129
129
  "^0.1.10000000000001",
130
130
  "evm-wallet":
131
- "npm:evm-wallet.js@^0.0.102",
131
+ "npm:evm-wallet.js@^0.0.103",
132
132
  "libevm":
133
133
  "^0.0.46",
134
134
  "ws":
@@ -142,9 +142,9 @@
142
142
  "evm-contracts-tools":
143
143
  "./evm-contracts-tools",
144
144
  "evm-wallet":
145
- "npm:evm-wallet.js@^0.0.102",
145
+ "npm:evm-wallet.js@^0.0.103",
146
146
  "evm-wallet.js":
147
- "npm:evm-wallet.js@^0.0.102",
147
+ "npm:evm-wallet.js@^0.0.103",
148
148
  "libevm":
149
149
  "^0.0.46"
150
150
  },
@@ -69,7 +69,7 @@ const
69
69
  "webpack");
70
70
  const
71
71
  _ignore_plugin =
72
- _webpack.IgnorePlugin;
72
+ _webpack.IgnorePlugin;
73
73
  const
74
74
  _node_fs_ignore_plugin =
75
75
  new _ignore_plugin(