evm-contracts-tools 0.0.77 → 0.0.78

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 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)})();
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,$,"",n,s],await y.apply(null,j),C.push([f,i,$,"",a,l]);for($ of t)E="",j=[f,i,"",$,n,s],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)})();
@@ -636,7 +636,9 @@ async function
636
636
  _deployments_dir,
637
637
  _target_contract,
638
638
  _network,
639
- _target_network_id
639
+ _target_network_id,
640
+ _target_app,
641
+ _user_defined
640
642
  ];
641
643
  await _network_check.apply(
642
644
  null,
@@ -657,7 +659,9 @@ async function
657
659
  _deployments_dir,
658
660
  _target_contract,
659
661
  _target_network,
660
- _network
662
+ _network,
663
+ _target_app,
664
+ _user_defined
661
665
  ];
662
666
  await _network_check.apply(
663
667
  null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "evm-contracts-tools",
2
2
  "version":
3
- "0.0.77",
3
+ "0.0.78",
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": {