evm-contracts-tools 0.0.72 → 0.0.74

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={632(t,e,a){a.a(t,async(t,e)=>{try{const r=await a.e(35).then(()=>a(35)),o=r._argv_get,c=r._argv_url_get,n=r._cmdline_check,i=r._echo,l=r._echo2,s=r._exit,u=r._get,d=r._get_date_human,p=r._global_get,_=(r._homedir_get,r._msg_info),m=r._msg_error,h=r._override_set,f=r._printf,g=r._require,w=r._set,y=await g("libevm"),b=y._libevm_cmdline_parse,v=y._libevm_global_variables,$=y._libevm_url_parse,k=y._wallet_overrides_set,x=await a.e(679).then(()=>a(679)),C=(x._artifact_local_auto_detect,x._address_check),E=x._cache_dir_auto_detect,D=x._call_auth_auto_detect,I=x._contract_abi_auto_detect,A=x._contract_address_auto_detect,P=x._contract_bytecode_auto_detect,S=x._contract_compiler_output_auto_detect,j=x._data_dir_auto_detect,q=(x._default_artifact_path_get,x._deployments_dir_auto_detect),M=x._evm_contract_call,T=x._help_display_check,B=x._target_app_auto_detect,O=x._target_contract_auto_detect;function W(){w("app","name","evm-contract-call.js"),w("app","opts",[]),w("runtime","environment",""),w("call","date",""),w("cache","dir",""),w("data","dir",""),w("wallet","name",""),w("retries","max",""),w("rpc","selection",""),w("call","type",""),w("output","file",""),w("index","retrieve",""),w("target","app",""),w("target","contract",""),w("contract","address",""),w("contract","bytecode",""),w("contract","compiler_output",""),w("contract","abi",""),w("contract","method",""),w("method","args",[]),w("price","gas",""),w("measure","unit","");const t=p();t.quiet="",t.verbose=""}async function R(){let t,e,a;const r=p().quiet;t=u("contract","abi"),e=u("contract","bytecode");const o=u("contract","compiler_output"),c=u("contract","address"),n=u("target","contract"),s=typeof c,d=typeof t,h=typeof e,f=typeof o;if("undefined"!==s&&"string"===s)if(0<c.length){if("array"===d)throw a="Contract ABI with type array not implemented.",m(a,0),a;if("string"!==d)throw a=`Unknown type '${d}' for contract ABI (must be string).`,m(a,0),a;if(0<t.length)a="Selecting contract ABI:",_(a),"n"==r&&i(t);else{a=`Specified no contract ABI for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await I()}catch(t){throw a="Error auto-detecting contract ABI.",m(a,0),t}}if(t=u("contract","abi"),"array"===h)throw a="Contract bytecode with type array not implemented.",m(a,0),a;if("string"!==h)throw a=`Unknown type '${h}' for contract bytecode (must be string).`,m(a,0),a;if(0<e.length)a="Selecting contract Bytecode:",_(a),"n"==r&&i(e);else{a=`Specified no contract bytecode for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await P()}catch(t){throw a="Error running '_contract_bytecode_auto_detect'.",m(a,0),t}}if(e=u("contract","bytecode"),"array"===f)throw a="Contract compiler output with type array not implemented.",m(a,0),a;if("string"!==f)throw a=`Unknown type '${f}' for contract compiler output (must be string).`,m(a,0),a;if(0<o.length)a="Selecting contract compiler output:",_(a),"n"==r&&i(o);else{a=`Specified no contract compiler output for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await S()}catch(r){let o;if(o=!1,a="Error auto-detecting contract compiler output.",""!==t&&""!==e&&(o=!0),!o)throw m(a,0),a="Either one between the contract abi plus the bytecode or the contract compiler output must be available to perform a call.",m(a,0),r;_(a),a="Performing call using ABI and and bytecode.",_(a)}}}else a="No address in input, artifacts detection skipped.",_(a);else a=`Uknown type for contract address (type '${s}'):`,m(a,0),l(c)}async function V(t){let e,a,r;t=T(t);const o=p();""==o.quiet&&(o.quiet="y"),u("target","app");const c=u("target","networks");await E(),await j(),h("call","date",d()),h("output","file",""),h("wallet","name","default"),h("retries","max","300"),h("rpc","selection","kirsh"),h("call","type","static"),D(),h("call","timeout","300000"),h("measure","unit","ether"),h("msg","value","0");const n=["evm-wallet",wallet_name,call_auth,"n",c];try{await k.apply(null,n)}catch(t){throw r="Error running '_wallet_overrides_set' with arguments:",m(r,0),l(t),t}if(!t){try{await B()}catch(t){throw r="Error auto-detecting target application.",m(r,0),t}try{await q()}catch(t){throw r="Error auto-detecting deployments directory.",m(r,0),t}try{await O()}catch(t){throw r="Error auto-detecting target contract.",m(r,0),t}try{await A()}catch(t){throw r="Error auto-detecting contract address.",m(r,0),t}try{a=u("contract","address"),e=await C(a)}catch(t){throw r=`Error detecting validity of address '${a}'`,m(r,0),l(t),t}if(!e)throw r=`Contract address '${contract_address}' is invalid.`,m(r,0),r;h("index","retrieve","n");try{await R()}catch(t){throw r="Error running '_artifacts_auto_detect'.",m(r,0),l(t),t}}}function N(){let t;const e=[`${u("app","name")} configuration:`,` Call date: ${call_date}`,` Runtime environment: ${runtime_environment}`,` Call type: ${call_type}`,` Call authentication: ${call_auth}`," Application options:",` Cache directory: ${cache_dir}`,` Data directory: ${data_dir}`," Credentials options:",` Wallet name: ${wallet_name}`,` Wallet address: ${api_key}`,` Wallet path: ${wallet_path}`,` Wallet password: ${wallet_password}`,` Wallet seed: ${wallet_seed}`," Network options:",` Target networks: ${target_networks}`,` Max retries: ${retries_max}`,` Call timeout: ${call_timeout}`,` API key: ${api_key}`,` RPC selection method: ${rpc_selection}`,` Gas price: ${price_gas}`," Contract options:",` Target application: ${target_app}`,` Target contract: ${target_contract}`,` Contract address: ${contract_address}`,` Contract ABI: ${contract_abi}`,` Contract bytecode: ${contract_bytecode}`,` Retrieve from Index: ${index_retrieve}`,` Contract compiler output: ${contract_compiler_output}`," Call options:",` Message value: ${msg_value}`,` Measure unit: ${measure_unit}`,` Contract method: ${contract_method}`,` Method arguments: ${method_args}`];for(t of e)_(t)}function U(t){let e;const a=["","Runs a smart contract function.","","Usage:","",` ${u("app","name")}`," [options]"," <contract-address>"," <contract-method>"," ([method-args])",""," networks:"," all those supported by"," 'evm-chains-info' as well"," as directly RPC addresses",""," options:",""," -t --call-type It can be 'static' or 'dynamic'.",` <call-type> Default: '${call_type}`,""," -o --output-file If specified saves the call output"," <file-path> at the specified location, otherwise it"," will print it on stdout.",` Default: '${output_file}`,""," -t --call-type It can be 'static' or 'dynamic'."," call options:",` -V --msg-value How much '${measure_unit} to attach to the`," <msg-value> transaction.",` Default: '${msg_value}'`,""," -u --measure-unit Measure unit for the transacion."," <measure-unit> It can be 'ether' or 'wei'.",` Default: '${measure_unit}'`,""," -P --price-gas I dont remember. It can be 'idontknow'."," <price-gas>",` Default: '${price_gas}'`,""," -r --retries-max Maximum number of retries before"," <retries-max> Declaring the call failed.",` Default: '${retries_max}'`,""," -T --call-timeout Maximum number of milliseconds before"," <call-timeout> declaring the call failed.",` Default: '${call_timeout}'`,""," contract options:",""," -A --abi Contract ABI path.",` <contract-abi> Default: '${contract_abi}'.`,""," -B --bytecode Contract bytecode path.",` <contract-bytecode> Default: '${contract_bytecode}'.`,""," -C --compiler-output Contract compiler output path"," <contract-bytecode> (the hardhat artifact.",` Default: '${contract_compiler_output}'.`,""," -I --index-retrieve Enables retrieving contract's artifacts"," from the EVM Contracts Source Index.",` Default: '${index_retrieve}'.`,""," credentials options:",""," -N --wallet-name EVM Wallet name.",` <wallet-name> Default: '${wallet_name}'.`,""," -w --wallet-path EVM Wallet path.",` <wallet-path> Default: '${wallet_path}'.`,""," -p --wallet-password EVM Wallet password file.",` <wallet-password> Default: '${wallet_password}'.`,""," -s --wallet-seed EVM Wallet seed file.",` <wallet-seed> Default: '${wallet_seed}'.`,""," -k --api-key Etherscan-like service key file.",` <api-key> Default: '${api_key}'.`,""," libEVM options:",""," -K --app Target application.",` Default: '${target_app}'`,""," -a --auth Call authentication.",` Default: '${call_auth}'`,""," -n --network EVM network name. Accepted"," <network> values are all those supported by"," 'evm-chains-info' and RPC addresses.",` Default: '${target_network}'.`,""," -S --rpc-selection RPC selection method. It can be"," <rpc-selection> 'kirsh', 'random' or 'all'.",` Default: '${rpc_selection}'.`,""," Application options:",""," -W --cache-dir Cache directory.",` Default: '${cache_dir}'`,""," -D --data-dir Data directory.",` Default: '${data_dir}'`," -h --help This message.",""," -v --verbose Enable verbose output.",""];for(e of a)i(e);s(t)}async function G(){let t,e,a;const r=await o({booleans:["a","auth","h","help","I","index-retrieve","v","verbose"],string:!0}),c=r._,n=p();n.quiet="y",w("runtime","environment","node"),1==r.h&&(t=!0),1==r.help&&(t=!0),(c.indexOf("--help")>-1||c.indexOf("-h")>-1)&&(t=!0),t&&(n.quiet="n",await V(t),U(0)),(void 0===r||r._.length<1)&&(a="Contract address argument required.",m(a,0),U(1)),w("contract","address",r._[0]),(void 0===r||r._.length<2)&&(a="Contract method argument required.",m(a,0),U(1)),w("contract","method",r._[1]);try{const t=r._.length;e=await r._.slice(2,t)}catch(t){throw a="Error slicing '_argv'.",m(a,0),t}w("method","args",e),"t"in r&&w("call","type",r.t),"call-type"in r&&w("call","type",r["call-type"]),"o"in r&&w("output","file",r.o),"output-file"in r&&w("output","file",r["output-file"]),"T"in r&&w("call","timeout",r.t),"call-timeout"in r&&w("call","timeout",r["call-timeout"]),"I"in r&&w("index","retrieve",r.I),"index_retrieve"in r&&w("index","retrieve",r["index-retrieve"]),"app"in r&&w("target","app",r.app),"K"in r&&w("target","app",r.K),"cache-dir"in r&&w("cache","dir",r["cache-dir"]),"W"in r&&w("cache","dir",r.W),"data-dir"in r&&w("data","dir",r["data-dir"]),"D"in r&&w("data","dir",r.D),"P"in r&&w("price","gas",r.P),"price-gas"in r&&w("price","gas",r["price-gas"]),"u"in r&&w("measure","unit",r.u),"measure-unit"in r&&w("measure","unit",r["measure-unit"]),"V"in r&&w("msg","value",r.V),"msg-value"in r&&w("msg","value",r["msg-value"]),"r"in r&&w("retries","max",r.r),"retries-max"in r&&w("retries","max",r["retries-max"]),"S"in r&&w("rpc","selection",r.S),"rpc-selection"in r&&w("rpc","selection",r["rpc-selection"]),"A"in r&&w("contract","abi",r.A),"abi"in r&&w("contract","abi",r.abi),"B"in r&&w("contract","bytecode",r.B),"bytecode"in r&&w("contract","bytecode",r.bytecode),"C"in r&&w("contract","compiler_output",r.C),"compiler-output"in r&&w("contract","compiler_output",r["compiler-output"]),"a"in r&&w("call","auth","y"),"auth"in r&&w("call","auth","y"),b(r),(r.v||r.verbose)&&(n.quiet="n")}function K(){let t,e;w("runtime","environment","browser"),w("call","type",c("call_type")[0]),w("call","timeout",c("call_timeout")[0]),w("index","retrieve",c("index_retrieve")[0]),w("target","app",c("app")[0]),w("data","dir",c("data_dir")[0]),w("cache","dir",c("cache_dir")[0]),w("price","gas",c("price_gas")[0]),w("measure","unit",c("measure_unit")[0]),w("msg","value",c("msg_value")[0]),w("retries","max",c("retries_max")[0]),w("rpc","selection",c("rpc_selection")[0]),w("contract","abi",c("abi")[0]),w("contract","bytecode",c("bytecode")[0]),w("contract","compiler_output",c("compiler_output")[0]),w("rpc","selection",c("rpc_selection")[0]);const a=u("target","networks");for(e of c("network"))a.push(e);w("target","networks",a);const r=u("method","args");for(t of c("method_args"))r.push(t);w("method","args",r);const o=p();o.quiet=c("quiet"),0===o.quiet.length&&(o.quiet="n")}async function L(t){let e,a,r,o;try{r=await M.apply(null,t),o=typeof r,e=`Got results '${r}' (type '${o}').`,_(e)}catch(a){throw e=`Error running '_evm_contract_call' with options '${t}'.`,m(e,0),l(a),a}if("array"==o)for(a of r)await f(a);else if("object"==o)for(a in r)e=`Got result '${a}':`,_(e),await f(r[a]);else{if("string"!=o)throw"undefined"==o?(e="No results",m(e,0),e):(e=`Result type '${o}'.`,m(e,0),e);f(r)}return r}async function F(){let t,e,a;try{a=await V()}catch(t){throw e="Error setting up overrides.",m(e,0),t}const r=p().quiet;N(),w("app","opts",[call_type,call_timeout,wallet_name,wallet_path,wallet_password,wallet_seed,api_key,msg_value,price_gas,measure_unit,retries_max,target_networks,rpc_selection,contract_address,contract_abi,contract_bytecode,contract_compiler_output,contract_method,method_args]);const o=u("app","opts");try{e="Running '_evm_contract_call_cmdline' with parameters:",_(e),"n"==r&&i(o),t=await L(o),e="Done running '_evm_contract_call_cmdline' with parameters:",_(e),"n"==r&&i(o)}catch(t){throw e=`Running '_evm_contract_call_cmdline' with parameters '${o}' failed.`,m(e,0),l(t),t}return s(0),t}await n("evm-contract-call.js")||await n("evm-contract-call")||await n("./evm-contract-call")?(W(),v(),await G()):(K(),$());try{await F()}catch(H){throw m("Error running 'main'.",0),l(H),H}e()}catch(z){e(z)}},1)}};const e={};function a(r){const o=e[r];if(void 0!==o)return o.exports;const c=e[r]={exports:{}};return t[r](c,c.exports,a),c.exports}a.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()))};a.a=(a,c,n)=>{let i;n&&((i=[]).d=-1);const l=new Set,s=a.exports;let u,d,p;const _=new Promise((t,e)=>{p=e,d=t});_[e]=s,_[t]=t=>(i&&t(i),l.forEach(t),_.catch(t=>{})),a.exports=_,c(a=>{let c;u=(a=>a.map(a=>{if(null!==a&&"object"==typeof a){if(a[t])return a;if(a.then){const c=[];c.d=0,a.then(t=>{n[e]=t,o(c)},t=>{n[r]=t,o(c)});const n={};return n[t]=t=>t(c),n}}const c={};return c[t]=t=>{},c[e]=a,c}))(a);const n=()=>u.map(t=>{if(t[r])throw t[r];return t[e]}),s=new Promise(e=>{c=()=>e(n),c.r=0;const a=t=>t!==i&&!l.has(t)&&(l.add(t),t&&!t.d&&(c.r++,t.push(c)));u.forEach(e=>e[t](a))});return c.r?s:n()},t=>(t?p(_[r]=t):d(s),o(i))),i?.d<0&&(i.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;a.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 c=Object.create(null);a.r(c);const n={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&r;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(t=>n[t]=()=>r[t]);return n.default=()=>r,a.d(c,n),c}})(),a.d=(t,e)=>{if(Array.isArray(e))for(var r=0;r<e.length;){var o=e[r++],c=e[r++],n=0===c?{enumerable:!0,value:e[r++]}:{enumerable:!0,get:c};a.o(t,o)||Object.defineProperty(t,o,n)}else for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.f={},a.e=t=>{const e=[];return a.f.j(t,e),Promise.all(e)},a.u=t=>t+".evm-contract-call.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="evm-contracts-tools:";a.l=(r,o,c,n)=>{if(t[r])return void t[r].push(o);let i,l;if(void 0!==c){const t=document.getElementsByTagName("script");for(var s=0;s<t.length;s++){const a=t[s];if(a.getAttribute("src")==r||a.getAttribute("data-webpack")==e+c){i=a;break}}}i||(l=!0,i=document.createElement("script"),i.charset="utf-8",a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",e+c),i.src=r),t[r]=[o];const u=(e,a)=>{i.onerror=i.onload=null,clearTimeout(d);const o=t[r];if(delete t[r],i.parentNode?.removeChild(i),o?.forEach(t=>t(a)),e)return e(a)},d=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),l&&document.head.appendChild(i)}})(),a.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{let t;a.g.importScripts&&(t=a.g.location+"");const e=a.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const a=e.getElementsByTagName("script");if(a.length){let e=a.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=a[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),a.p=t})(),(()=>{const t={792:0};a.f.j=(e,r)=>{let o=a.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{const c=new Promise((a,r)=>o=t[e]=[a,r]);r.push(o[2]=c);const n=new Error,i=r=>{if(a.o(t,e)&&(o=t[e],0!==o&&(t[e]=void 0),o)){const t=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+t+": "+a+")",n.name="ChunkLoadError",n.type=t,n.request=a,n.event=r,o[1](n)}};a.l(a.p+a.u(e),i,"chunk-"+e,e)}};const e=(e,r)=>{let[o,c,n]=r;var i,l,s=0;if(o.some(e=>0!==t[e])){for(i in c)a.o(c,i)&&(a.m[i]=c[i]);n&&n(a)}for(e&&e(r);s<o.length;s++)l=o[s],a.o(t,l)&&t[l]&&t[l][0](),t[l]=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))})(),a(632)})();
1
+ (()=>{"use strict";var t={632(t,e,a){a.a(t,async(t,e)=>{try{const r=await a.e(35).then(()=>a(35)),o=r._argv_get,c=r._argv_url_get,n=r._cmdline_check,i=r._echo,l=r._echo2,s=r._exit,u=r._get,p=r._get_date_human,d=r._global_get,_=(r._homedir_get,r._msg_info),m=r._msg_error,h=r._override_set,f=r._printf,g=r._require,y=r._set,w=await g("libevm"),b=w._libevm_cmdline_parse,v=w._libevm_global_variables,$=w._libevm_url_parse,k=w._wallet_overrides_set,x=await a.e(679).then(()=>a(679)),C=(x._artifact_local_auto_detect,x._address_check),E=x._cache_dir_auto_detect,D=x._call_auth_auto_detect,A=x._contract_abi_auto_detect,I=x._contract_address_auto_detect,P=x._contract_bytecode_auto_detect,S=x._contract_compiler_output_auto_detect,j=x._data_dir_auto_detect,q=(x._default_artifact_path_get,x._deployments_dir_auto_detect),M=x._evm_contract_call,T=x._help_display_check,B=x._target_app_auto_detect,O=x._target_contract_auto_detect;function W(){y("app","name","evm-contract-call.js"),y("app","opts",[]),y("runtime","environment",""),y("call","date",""),y("cache","dir",""),y("data","dir",""),y("wallet","name",""),y("retries","max",""),y("rpc","selection",""),y("call","type",""),y("output","file",""),y("index","retrieve",""),y("target","app",""),y("target","contract",""),y("contract","address",""),y("contract","bytecode",""),y("contract","compiler_output",""),y("contract","abi",""),y("contract","method",""),y("method","args",[]),y("price","gas",""),y("measure","unit","");const t=d();t.quiet="",t.verbose=""}async function R(){let t,e,a;const r=d().quiet;t=u("contract","abi"),e=u("contract","bytecode");const o=u("contract","compiler_output"),c=u("contract","address"),n=u("target","contract"),s=typeof c,p=typeof t,h=typeof e,f=typeof o;if("undefined"!==s&&"string"===s)if(0<c.length){if("array"===p)throw a="Contract ABI with type array not implemented.",m(a,0),a;if("string"!==p)throw a=`Unknown type '${p}' for contract ABI (must be string).`,m(a,0),a;if(0<t.length)a="Selecting contract ABI:",_(a),"n"==r&&i(t);else{a=`Specified no contract ABI for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await A()}catch(t){throw a="Error auto-detecting contract ABI.",m(a,0),t}}if(t=u("contract","abi"),"array"===h)throw a="Contract bytecode with type array not implemented.",m(a,0),a;if("string"!==h)throw a=`Unknown type '${h}' for contract bytecode (must be string).`,m(a,0),a;if(0<e.length)a="Selecting contract Bytecode:",_(a),"n"==r&&i(e);else{a=`Specified no contract bytecode for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await P()}catch(t){throw a="Error running '_contract_bytecode_auto_detect'.",m(a,0),t}}if(e=u("contract","bytecode"),"array"===f)throw a="Contract compiler output with type array not implemented.",m(a,0),a;if("string"!==f)throw a=`Unknown type '${f}' for contract compiler output (must be string).`,m(a,0),a;if(0<o.length)a="Selecting contract compiler output:",_(a),"n"==r&&i(o);else{a=`Specified no contract compiler output for contract '${n}' and address '${c}', auto-detecting.`,_(a);try{await S()}catch(r){let o;if(o=!1,a="Error auto-detecting contract compiler output.",""!==t&&""!==e&&(o=!0),!o)throw m(a,0),a="Either one between the contract abi plus the bytecode or the contract compiler output must be available to perform a call.",m(a,0),r;_(a),a="Performing call using ABI and and bytecode.",_(a)}}}else a="No address in input, artifacts detection skipped.",_(a);else a=`Uknown type for contract address (type '${s}'):`,m(a,0),l(c)}async function V(t){let e,a,r;t=T(t);const o=d();""==o.quiet&&(o.quiet="y"),u("target","app");const c=u("target","networks");await E(),await j(),h("call","date",p()),h("output","file",""),h("wallet","name","default"),h("retries","max","300"),h("rpc","selection","kirsh"),h("call","type","static"),D(),h("call","timeout","300000"),h("measure","unit","ether"),h("msg","value","0");const n=["evm-wallet",wallet_name,call_auth,"n",c];try{await k.apply(null,n)}catch(t){throw r="Error running '_wallet_overrides_set' with arguments:",m(r,0),l(t),t}if(!t){try{await B()}catch(t){throw r="Error auto-detecting target application.",m(r,0),t}try{await q()}catch(t){throw r="Error auto-detecting deployments directory.",m(r,0),t}try{await O()}catch(t){throw r="Error auto-detecting target contract.",m(r,0),t}try{await I()}catch(t){throw r="Error auto-detecting contract address.",m(r,0),t}try{a=u("contract","address"),e=await C(a)}catch(t){throw r=`Error detecting validity of address '${a}'`,m(r,0),l(t),t}if(!e)throw r=`Contract address '${contract_address}' is invalid.`,m(r,0),r;h("index","retrieve","n");try{await R()}catch(t){throw r="Error running '_artifacts_auto_detect'.",m(r,0),l(t),t}}}function N(){let t;const e=[`${u("app","name")} configuration:`,` Call date: ${call_date}`,` Runtime environment: ${runtime_environment}`,` Call type: ${call_type}`,` Call authentication: ${call_auth}`," Application options:",` Cache directory: ${cache_dir}`,` Data directory: ${data_dir}`," Credentials options:",` Wallet name: ${wallet_name}`,` Wallet address: ${api_key}`,` Wallet path: ${wallet_path}`,` Wallet password: ${wallet_password}`,` Wallet seed: ${wallet_seed}`," Network options:",` Target networks: ${target_networks}`,` Max retries: ${retries_max}`,` Call timeout: ${call_timeout}`,` API key: ${api_key}`,` RPC selection method: ${rpc_selection}`,` Gas price: ${price_gas}`," Contract options:",` Target application: ${target_app}`,` Target contract: ${target_contract}`,` Contract address: ${contract_address}`,` Contract ABI: ${contract_abi}`,` Contract bytecode: ${contract_bytecode}`,` Retrieve from Index: ${index_retrieve}`,` Contract compiler output: ${contract_compiler_output}`," Call options:",` Message value: ${msg_value}`,` Measure unit: ${measure_unit}`,` Contract method: ${contract_method}`,` Method arguments: ${method_args}`];for(t of e)_(t)}function U(t){let e;const a=["","Runs a smart contract function.","","Usage:","",` ${u("app","name")}`," [options]"," <contract-address>"," <contract-method>"," ([method-args])",""," networks:"," all those supported by"," 'evm-chains-info' as well"," as directly RPC addresses",""," options:",""," -t <call-type>, --call-type <type>",""," It can be 'static' or 'dynamic'.",` Default: '${call_type}`,""," -o <output-file>, --output-file <path>",""," If specified saves the call output"," at the specified location, otherwise it"," will print it on stdout.",` Default: '${output_file}`,""," -t <call-type, --call-type <type>",""," It can be 'static' or 'dynamic'.",""," call options:",""," -V <msg-value>, --msg-value <value>","",` How much '${measure_unit} to attach to the`," transaction.",` Default: '${msg_value}'`,""," -u (-U) <measure-unit>, --measure-unit <unit>",""," Measure unit for the transaction."," It can be 'ether' or 'wei'.",` Default: '${measure_unit}'`,""," -P <price-gas>, --price-gas <amount>",""," It can be (probably) be 'auto', 'fast',"," 'nextblock' or an integer.",` Default: '${price_gas}'`,""," -r <retries-max>, --retries-max <amount>",""," Maximum number of retries before"," declaring the call failed.",` Default: '${retries_max}'`,""," -T <call-timeout>, --call-timeout <milliseconds>",""," Maximum number of milliseconds before"," to wait declaring the call failed.",` Default: '${call_timeout}'`,""," contract options:",""," -A <contract-abi>, --abi <path>",""," Contract ABI path.",` Default: '${contract_abi}'.`,""," -B <contract-bytecode>, --bytecode <path>",""," Contract bytecode path.",` Default: '${contract_bytecode}'.`,""," -C <compiler-output>, --compiler-output <path>",""," Contract compiler output path"," (the hardhat artifact.",` Default: '${contract_compiler_output}'.`,""," -I, --index-retrieve",""," Enables retrieving contract's artifacts"," from the EVM Contracts Source Index.",` Default: '${index_retrieve}'.`,""," credentials options:",""," -N <wallet-name>, --wallet-name <name>",""," EVM Wallet name.",` Default: '${wallet_name}'.`,""," -w <wallet-path>, --wallet-path <path>",""," EVM Wallet path.",` Default: '${wallet_path}'.`,""," -p <wallet-password>, --wallet-password <path>",""," EVM Wallet password file.",` Default: '${wallet_password}'.`,""," -s <wallet-seed>, --wallet-seed <path>",""," EVM Wallet seed file.",` Default: '${wallet_seed}'.`,""," -k <api-key>, --api-key <path>",""," Etherscan-like service key file.",` Default: '${api_key}'.`,""," libEVM options:",""," -K <target-app>, --app <application-name>",""," Target application.",` Default: '${target_app}'`,""," -a, --auth",""," Call authentication.",` Default: '${call_auth}'`,""," -n <network>, --network <target-network>",""," EVM network name. Accepted"," values are all those supported by"," 'evm-chains-info' and RPC addresses.",` Default: '${target_network}'.`,""," -S <rpc-selection> --rpc-selection <criterium>",""," RPC selection method. It can be"," 'kirsh', 'random' or 'all'.",` Default: '${rpc_selection}'.`,""," Application options:",""," -W <cache-dir>, --cache-dir <path>",""," Cache directory.",` Default: '${cache_dir}'`,""," -D <data-dir>, --data-dir <path>",""," Data directory.",` Default: '${data_dir}'`,""," -h, --help",""," This message.",""," -v, --verbose",""," Enable verbose output.",""];for(e of a)i(e);s(t)}async function G(){let t,e,a;const r=await o({booleans:["a","auth","h","help","I","index-retrieve","v","verbose"],string:!0}),c=r._,n=d();n.quiet="y",y("runtime","environment","node"),1==r.h&&(t=!0),1==r.help&&(t=!0),(c.indexOf("--help")>-1||c.indexOf("-h")>-1)&&(t=!0),t&&(n.quiet="n",await V(t),U(0)),(void 0===r||r._.length<1)&&(a="Contract address argument required.",m(a,0),U(1)),y("contract","address",r._[0]),(void 0===r||r._.length<2)&&(a="Contract method argument required.",m(a,0),U(1)),y("contract","method",r._[1]);try{const t=r._.length;e=await r._.slice(2,t)}catch(t){throw a="Error slicing '_argv'.",m(a,0),t}y("method","args",e),"t"in r&&y("call","type",r.t),"call-type"in r&&y("call","type",r["call-type"]),"o"in r&&y("output","file",r.o),"output-file"in r&&y("output","file",r["output-file"]),"T"in r&&y("call","timeout",r.t),"call-timeout"in r&&y("call","timeout",r["call-timeout"]),"I"in r&&y("index","retrieve",r.I),"index_retrieve"in r&&y("index","retrieve",r["index-retrieve"]),"app"in r&&y("target","app",r.app),"K"in r&&y("target","app",r.K),"cache-dir"in r&&y("cache","dir",r["cache-dir"]),"W"in r&&y("cache","dir",r.W),"data-dir"in r&&y("data","dir",r["data-dir"]),"D"in r&&y("data","dir",r.D),"P"in r&&y("price","gas",r.P),"price-gas"in r&&y("price","gas",r["price-gas"]),"u"in r&&y("measure","unit",r.u),"measure-unit"in r&&y("measure","unit",r["measure-unit"]),"V"in r&&y("msg","value",r.V),"msg-value"in r&&y("msg","value",r["msg-value"]),"r"in r&&y("retries","max",r.r),"retries-max"in r&&y("retries","max",r["retries-max"]),"S"in r&&y("rpc","selection",r.S),"rpc-selection"in r&&y("rpc","selection",r["rpc-selection"]),"A"in r&&y("contract","abi",r.A),"abi"in r&&y("contract","abi",r.abi),"B"in r&&y("contract","bytecode",r.B),"bytecode"in r&&y("contract","bytecode",r.bytecode),"C"in r&&y("contract","compiler_output",r.C),"compiler-output"in r&&y("contract","compiler_output",r["compiler-output"]),"a"in r&&y("call","auth","y"),"auth"in r&&y("call","auth","y"),b(r),(r.v||r.verbose)&&(n.quiet="n")}function K(){let t,e;y("runtime","environment","browser"),y("call","type",c("call_type")[0]),y("call","timeout",c("call_timeout")[0]),y("index","retrieve",c("index_retrieve")[0]),y("target","app",c("app")[0]),y("data","dir",c("data_dir")[0]),y("cache","dir",c("cache_dir")[0]),y("price","gas",c("price_gas")[0]),y("measure","unit",c("measure_unit")[0]),y("msg","value",c("msg_value")[0]),y("retries","max",c("retries_max")[0]),y("rpc","selection",c("rpc_selection")[0]),y("contract","abi",c("abi")[0]),y("contract","bytecode",c("bytecode")[0]),y("contract","compiler_output",c("compiler_output")[0]),y("rpc","selection",c("rpc_selection")[0]);const a=u("target","networks");for(e of c("network"))a.push(e);y("target","networks",a);const r=u("method","args");for(t of c("method_args"))r.push(t);y("method","args",r);const o=d();o.quiet=c("quiet"),0===o.quiet.length&&(o.quiet="n")}async function L(t){let e,a,r,o;try{r=await M.apply(null,t),o=typeof r,e=`Got results '${r}' (type '${o}').`,_(e)}catch(a){throw e=`Error running '_evm_contract_call' with options '${t}'.`,m(e,0),l(a),a}if("array"==o)for(a of r)await f(a);else if("object"==o)for(a in r)e=`Got result '${a}':`,_(e),await f(r[a]);else{if("string"!=o)throw"undefined"==o?(e="No results",m(e,0),e):(e=`Result type '${o}'.`,m(e,0),e);f(r)}return r}async function F(){let t,e,a;try{a=await V()}catch(t){throw e="Error setting up overrides.",m(e,0),t}const r=d().quiet;N(),y("app","opts",[call_type,call_timeout,wallet_name,wallet_path,wallet_password,wallet_seed,api_key,msg_value,price_gas,measure_unit,retries_max,target_networks,rpc_selection,contract_address,contract_abi,contract_bytecode,contract_compiler_output,contract_method,method_args]);const o=u("app","opts");try{e="Running '_evm_contract_call_cmdline' with parameters:",_(e),"n"==r&&i(o),t=await L(o),e="Done running '_evm_contract_call_cmdline' with parameters:",_(e),"n"==r&&i(o)}catch(t){throw e=`Running '_evm_contract_call_cmdline' with parameters '${o}' failed.`,m(e,0),l(t),t}return s(0),t}await n("evm-contract-call.js")||await n("evm-contract-call")||await n("./evm-contract-call")?(W(),v(),await G()):(K(),$());try{await F()}catch(H){throw m("Error running 'main'.",0),l(H),H}e()}catch(z){e(z)}},1)}};const e={};function a(r){const o=e[r];if(void 0!==o)return o.exports;const c=e[r]={exports:{}};return t[r](c,c.exports,a),c.exports}a.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()))};a.a=(a,c,n)=>{let i;n&&((i=[]).d=-1);const l=new Set,s=a.exports;let u,p,d;const _=new Promise((t,e)=>{d=e,p=t});_[e]=s,_[t]=t=>(i&&t(i),l.forEach(t),_.catch(t=>{})),a.exports=_,c(a=>{let c;u=(a=>a.map(a=>{if(null!==a&&"object"==typeof a){if(a[t])return a;if(a.then){const c=[];c.d=0,a.then(t=>{n[e]=t,o(c)},t=>{n[r]=t,o(c)});const n={};return n[t]=t=>t(c),n}}const c={};return c[t]=t=>{},c[e]=a,c}))(a);const n=()=>u.map(t=>{if(t[r])throw t[r];return t[e]}),s=new Promise(e=>{c=()=>e(n),c.r=0;const a=t=>t!==i&&!l.has(t)&&(l.add(t),t&&!t.d&&(c.r++,t.push(c)));u.forEach(e=>e[t](a))});return c.r?s:n()},t=>(t?d(_[r]=t):p(s),o(i))),i?.d<0&&(i.d=0)}})(),(()=>{const t=Object.getPrototypeOf;let e;a.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 c=Object.create(null);a.r(c);const n={};e=e||[null,t({}),t([]),t(t)];for(var i=2&o&&r;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=t(i))Object.getOwnPropertyNames(i).forEach(t=>n[t]=()=>r[t]);return n.default=()=>r,a.d(c,n),c}})(),a.d=(t,e)=>{if(Array.isArray(e))for(var r=0;r<e.length;){var o=e[r++],c=e[r++],n=0===c?{enumerable:!0,value:e[r++]}:{enumerable:!0,get:c};a.o(t,o)||Object.defineProperty(t,o,n)}else for(var o in e)a.o(e,o)&&!a.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},a.f={},a.e=t=>{const e=[];return a.f.j(t,e),Promise.all(e)},a.u=t=>t+".evm-contract-call.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="evm-contracts-tools:";a.l=(r,o,c,n)=>{if(t[r])return void t[r].push(o);let i,l;if(void 0!==c){const t=document.getElementsByTagName("script");for(var s=0;s<t.length;s++){const a=t[s];if(a.getAttribute("src")==r||a.getAttribute("data-webpack")==e+c){i=a;break}}}i||(l=!0,i=document.createElement("script"),i.charset="utf-8",a.nc&&i.setAttribute("nonce",a.nc),i.setAttribute("data-webpack",e+c),i.src=r),t[r]=[o];const u=(e,a)=>{i.onerror=i.onload=null,clearTimeout(p);const o=t[r];if(delete t[r],i.parentNode?.removeChild(i),o?.forEach(t=>t(a)),e)return e(a)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),l&&document.head.appendChild(i)}})(),a.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{let t;a.g.importScripts&&(t=a.g.location+"");const e=a.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const a=e.getElementsByTagName("script");if(a.length){let e=a.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=a[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),a.p=t})(),(()=>{const t={792:0};a.f.j=(e,r)=>{let o=a.o(t,e)?t[e]:void 0;if(0!==o)if(o)r.push(o[2]);else{const c=new Promise((a,r)=>o=t[e]=[a,r]);r.push(o[2]=c);const n=new Error,i=r=>{if(a.o(t,e)&&(o=t[e],0!==o&&(t[e]=void 0),o)){const t=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;n.message="Loading chunk "+e+" failed.\n("+t+": "+a+")",n.name="ChunkLoadError",n.type=t,n.request=a,n.event=r,o[1](n)}};a.l(a.p+a.u(e),i,"chunk-"+e,e)}};const e=(e,r)=>{let[o,c,n]=r;var i,l,s=0;if(o.some(e=>0!==t[e])){for(i in c)a.o(c,i)&&(a.m[i]=c[i]);n&&n(a)}for(e&&e(r);s<o.length;s++)l=o[s],a.o(t,l)&&t[l]&&t[l][0](),t[l]=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))})(),a(632)})();
@@ -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,i=n._cmdline_check,s=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): ${network_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)s(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 i=l("target","networks");"n"in r&&i.push(r.n.toString()),"network"in r&&i.push(r.network.toString()),h("target","networks",i);const s=l("network","ids");"i"in r&&s.push(r.i.toString()),"network-id"in r&&s.push(r["network-id"].toString()),h("network","ids",s),"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)s(r);else"string"==o&&g(n)}async function q(){let t,e;await $(),S();const r=[target_networks,network_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 i("evm-contract-deployment-address.js")||await i("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,i)=>{let s;i&&((s=[]).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=>(s&&t(s),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=>{i[e]=t,o(a)},t=>{i[n]=t,o(a)});const i={};return i[t]=t=>t(a),i}}const a={};return a[t]=t=>{},a[e]=r,a}))(r);const i=()=>l.map(t=>{if(t[n])throw t[n];return t[e]}),d=new Promise(e=>{a=()=>e(i),a.r=0;const r=t=>t!==s&&!c.has(t)&&(c.add(t),t&&!t.d&&(a.r++,t.push(a)));l.forEach(e=>e[t](r))});return a.r?d:i()},t=>(t?p(f[n]=t):u(d),o(s))),s?.d<0&&(s.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 i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&o&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(t=>i[t]=()=>n[t]);return i.default=()=>n,r.d(a,i),a}})(),r.d=(t,e)=>{if(Array.isArray(e))for(var n=0;n<e.length;){var o=e[n++],a=e[n++],i=0===a?{enumerable:!0,value:e[n++]}:{enumerable:!0,get:a};r.o(t,o)||Object.defineProperty(t,o,i)}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,i)=>{if(t[n])return void t[n].push(o);let s,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){s=r;break}}}s||(c=!0,s=document.createElement("script"),s.charset="utf-8",r.nc&&s.setAttribute("nonce",r.nc),s.setAttribute("data-webpack",e+a),s.src=n),t[n]=[o];const l=(e,r)=>{s.onerror=s.onload=null,clearTimeout(u);const o=t[n];if(delete t[n],s.parentNode?.removeChild(s),o?.forEach(t=>t(r)),e)return e(r)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),c&&document.head.appendChild(s)}})(),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 i=new Error,s=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;i.message="Loading chunk "+e+" failed.\n("+t+": "+r+")",i.name="ChunkLoadError",i.type=t,i.request=r,i.event=n,o[1](i)}};r.l(r.p+r.u(e),s,"chunk-"+e,e)}};const e=(e,n)=>{let[o,a,i]=n;var s,c,d=0;if(o.some(e=>0!==t[e])){for(s in a)r.o(a,s)&&(r.m[s]=a[s]);i&&i(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
+ (()=>{"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,g=n._override_set,_=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){g("resolve","date",p()),g("configuration","format","bash"),k(),g("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&&_(n)}async function q(){let t,e;try{await $()}catch(t){throw e="Error setting overrides.",m(e,0),t}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(e,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)})();
package/evm-contract-call CHANGED
@@ -972,96 +972,149 @@ function
972
972
  "",
973
973
  " options:",
974
974
  "",
975
- " -t --call-type It can be 'static' or 'dynamic'.",
976
- ` <call-type> Default: '${call_type}`,
975
+ " -t <call-type>, --call-type <type>",
977
976
  "",
978
- " -o --output-file If specified saves the call output",
979
- " <file-path> at the specified location, otherwise it",
980
- " will print it on stdout.",
981
- ` Default: '${output_file}`,
977
+ " It can be 'static' or 'dynamic'.",
978
+ ` Default: '${call_type}`,
979
+ "",
980
+ " -o <output-file>, --output-file <path>",
981
+ "",
982
+ " If specified saves the call output",
983
+ " at the specified location, otherwise it",
984
+ " will print it on stdout.",
985
+ ` Default: '${output_file}`,
986
+ "",
987
+ " -t <call-type, --call-type <type>",
988
+ "",
989
+ " It can be 'static' or 'dynamic'.",
982
990
  "",
983
- " -t --call-type It can be 'static' or 'dynamic'.",
984
991
  " call options:",
985
- ` -V --msg-value How much '${measure_unit} to attach to the`,
986
- ` <msg-value> transaction.`,
987
- ` Default: '${msg_value}'`,
988
992
  "",
989
- " -u --measure-unit Measure unit for the transacion.",
990
- ` <measure-unit> It can be 'ether' or 'wei'.`,
991
- ` Default: '${measure_unit}'`,
993
+ ` -V <msg-value>, --msg-value <value>`,
994
+ "",
995
+ ` How much '${measure_unit} to attach to the`,
996
+ ` transaction.`,
997
+ ` Default: '${msg_value}'`,
998
+ "",
999
+ " -u (-U) <measure-unit>, --measure-unit <unit>",
1000
+ "",
1001
+ " Measure unit for the transaction.",
1002
+ ` It can be 'ether' or 'wei'.`,
1003
+ ` Default: '${measure_unit}'`,
992
1004
  "",
993
- " -P --price-gas I dont remember. It can be 'idontknow'.",
994
- " <price-gas>",
995
- ` Default: '${price_gas}'`,
1005
+ " -P <price-gas>, --price-gas <amount>",
996
1006
  "",
997
- " -r --retries-max Maximum number of retries before",
998
- ` <retries-max> Declaring the call failed.`,
999
- ` Default: '${retries_max}'`,
1007
+ " It can be (probably) be 'auto', 'fast',",
1008
+ " 'nextblock' or an integer.",
1009
+ ` Default: '${price_gas}'`,
1000
1010
  "",
1001
- " -T --call-timeout Maximum number of milliseconds before",
1002
- " <call-timeout> declaring the call failed.",
1003
- ` Default: '${call_timeout}'`,
1011
+ " -r <retries-max>, --retries-max <amount>",
1012
+ "",
1013
+ " Maximum number of retries before",
1014
+ ` declaring the call failed.`,
1015
+ ` Default: '${retries_max}'`,
1016
+ "",
1017
+ " -T <call-timeout>, --call-timeout <milliseconds>",
1018
+ "",
1019
+ " Maximum number of milliseconds before",
1020
+ " to wait declaring the call failed.",
1021
+ ` Default: '${call_timeout}'`,
1004
1022
  "",
1005
1023
  " contract options:",
1006
1024
  "",
1007
- " -A --abi Contract ABI path.",
1008
- ` <contract-abi> Default: '${contract_abi}'.`,
1025
+ " -A <contract-abi>, --abi <path>",
1026
+ "",
1027
+ " Contract ABI path.",
1028
+ ` Default: '${contract_abi}'.`,
1029
+ "",
1030
+ " -B <contract-bytecode>, --bytecode <path>",
1031
+ "",
1032
+ " Contract bytecode path.",
1033
+ ` Default: '${contract_bytecode}'.`,
1034
+ "",
1035
+ " -C <compiler-output>, --compiler-output <path>",
1009
1036
  "",
1010
- " -B --bytecode Contract bytecode path.",
1011
- ` <contract-bytecode> Default: '${contract_bytecode}'.`,
1037
+ " Contract compiler output path",
1038
+ ` (the hardhat artifact.`,
1039
+ ` Default: '${contract_compiler_output}'.`,
1012
1040
  "",
1013
- " -C --compiler-output Contract compiler output path",
1014
- ` <contract-bytecode> (the hardhat artifact.`,
1015
- ` Default: '${contract_compiler_output}'.`,
1041
+ " -I, --index-retrieve",
1016
1042
  "",
1017
- " -I --index-retrieve Enables retrieving contract's artifacts",
1018
- ` from the EVM Contracts Source Index.`,
1019
- ` Default: '${index_retrieve}'.`,
1043
+ " Enables retrieving contract's artifacts",
1044
+ ` from the EVM Contracts Source Index.`,
1045
+ ` Default: '${index_retrieve}'.`,
1020
1046
  "",
1021
1047
  " credentials options:",
1022
1048
  "",
1023
- " -N --wallet-name EVM Wallet name.",
1024
- ` <wallet-name> Default: '${wallet_name}'.`,
1049
+ " -N <wallet-name>, --wallet-name <name>",
1025
1050
  "",
1026
- " -w --wallet-path EVM Wallet path.",
1027
- ` <wallet-path> Default: '${wallet_path}'.`,
1051
+ " EVM Wallet name.",
1052
+ ` Default: '${wallet_name}'.`,
1028
1053
  "",
1029
- " -p --wallet-password EVM Wallet password file.",
1030
- ` <wallet-password> Default: '${wallet_password}'.`,
1054
+ " -w <wallet-path>, --wallet-path <path>",
1031
1055
  "",
1032
- " -s --wallet-seed EVM Wallet seed file.",
1033
- ` <wallet-seed> Default: '${wallet_seed}'.`,
1056
+ " EVM Wallet path.",
1057
+ ` Default: '${wallet_path}'.`,
1034
1058
  "",
1035
- " -k --api-key Etherscan-like service key file.",
1036
- ` <api-key> Default: '${api_key}'.`,
1059
+ " -p <wallet-password>, --wallet-password <path>",
1060
+ "",
1061
+ " EVM Wallet password file.",
1062
+ ` Default: '${wallet_password}'.`,
1063
+ "",
1064
+ " -s <wallet-seed>, --wallet-seed <path>",
1065
+ "",
1066
+ " EVM Wallet seed file.",
1067
+ ` Default: '${wallet_seed}'.`,
1068
+ "",
1069
+ " -k <api-key>, --api-key <path>",
1070
+ "",
1071
+ " Etherscan-like service key file.",
1072
+ ` Default: '${api_key}'.`,
1037
1073
  "",
1038
1074
  " libEVM options:",
1039
1075
  "",
1040
- " -K --app Target application.",
1041
- ` Default: '${target_app}'`,
1076
+ " -K <target-app>, --app <application-name>",
1077
+ "",
1078
+ " Target application.",
1079
+ ` Default: '${target_app}'`,
1080
+ "",
1081
+ " -a, --auth",
1042
1082
  "",
1043
- " -a --auth Call authentication.",
1044
- ` Default: '${call_auth}'`,
1083
+ " Call authentication.",
1084
+ ` Default: '${call_auth}'`,
1045
1085
  "",
1046
- " -n --network EVM network name. Accepted",
1047
- " <network> values are all those supported by",
1048
- ` 'evm-chains-info' and RPC addresses.`,
1049
- ` Default: '${target_network}'.`,
1086
+ " -n <network>, --network <target-network>",
1050
1087
  "",
1051
- " -S --rpc-selection RPC selection method. It can be",
1052
- " <rpc-selection> 'kirsh', 'random' or 'all'.",
1053
- ` Default: '${rpc_selection}'.`,
1088
+ " EVM network name. Accepted",
1089
+ " values are all those supported by",
1090
+ ` 'evm-chains-info' and RPC addresses.`,
1091
+ ` Default: '${target_network}'.`,
1092
+ "",
1093
+ " -S <rpc-selection> --rpc-selection <criterium>",
1094
+ "",
1095
+ " RPC selection method. It can be",
1096
+ " 'kirsh', 'random' or 'all'.",
1097
+ ` Default: '${rpc_selection}'.`,
1054
1098
  "",
1055
1099
  " Application options:",
1056
1100
  "",
1057
- " -W --cache-dir Cache directory.",
1058
- ` Default: '${cache_dir}'`,
1101
+ " -W <cache-dir>, --cache-dir <path>",
1102
+ "",
1103
+ " Cache directory.",
1104
+ ` Default: '${cache_dir}'`,
1105
+ "",
1106
+ " -D <data-dir>, --data-dir <path>",
1107
+ "",
1108
+ " Data directory.",
1109
+ ` Default: '${data_dir}'`,
1110
+ "",
1111
+ " -h, --help",
1112
+ "",
1113
+ " This message.",
1059
1114
  "",
1060
- " -D --data-dir Data directory.",
1061
- ` Default: '${data_dir}'`,
1062
- " -h --help This message.",
1115
+ " -v, --verbose",
1063
1116
  "",
1064
- " -v --verbose Enable verbose output.",
1117
+ " Enable verbose output.",
1065
1118
  ""
1066
1119
  ];
1067
1120
  for ( _line of _text ) {
@@ -180,7 +180,7 @@ function
180
180
  "networks",
181
181
  []);
182
182
  /* global
183
- network_ids:
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): ${network_ids}`,
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
- _network_ids =
463
+ _networks_ids =
464
464
  _get(
465
- "network",
465
+ "networks",
466
466
  "ids");
467
467
  if ( "i" in _argv ) {
468
- _network_ids.push(
468
+ _networks_ids.push(
469
469
  _argv[
470
470
  "i"].toString());
471
471
  }
472
472
  if ( "network-id" in _argv ) {
473
- _network_ids.push(
473
+ _networks_ids.push(
474
474
  _argv[
475
475
  "network-id"].toString());
476
476
  }
477
477
  _set(
478
478
  "network",
479
479
  "ids",
480
- _network_ids);
480
+ _networks_ids);
481
481
  if ( "a" in _argv ) {
482
482
  _set(
483
483
  "target",
@@ -657,14 +657,25 @@ async function
657
657
  let
658
658
  _address,
659
659
  _msg;
660
- const
661
- _overrides_set_up =
662
- await _overrides_set();
660
+ try {
661
+ const
662
+ _overrides_set_up =
663
+ await _overrides_set();
664
+ }
665
+ catch(
666
+ _error) {
667
+ _msg =
668
+ "Error setting overrides.";
669
+ _msg_error(
670
+ _msg,
671
+ 0);
672
+ throw _error;
673
+ }
663
674
  _config_show();
664
675
  const
665
676
  app_opts = [
666
677
  target_networks,
667
- network_ids,
678
+ networks_ids,
668
679
  networks_all,
669
680
  target_app,
670
681
  target_contract,
@@ -2002,12 +2002,14 @@ async function
2002
2002
  _config_ext,
2003
2003
  _contract,
2004
2004
  _deployments_dir,
2005
- _evm_contracts_deployment_versions,
2005
+ _evm_contract_deployment_networks,
2006
+ _evm_contract_deployment_versions,
2006
2007
  _found,
2007
2008
  _net,
2008
2009
  _network,
2009
2010
  _network_id,
2010
2011
  _networks,
2012
+ _path_join_args,
2011
2013
  _version,
2012
2014
  _msg;
2013
2015
  _networks =
@@ -2020,6 +2022,21 @@ async function
2020
2022
  _get(
2021
2023
  "deployments",
2022
2024
  "dir");
2025
+ const
2026
+ _target_networks =
2027
+ _get(
2028
+ "target",
2029
+ "networks");
2030
+ const
2031
+ _networks_ids =
2032
+ _get(
2033
+ "networks",
2034
+ "ids");
2035
+ const
2036
+ _networks_all =
2037
+ _get(
2038
+ "networks",
2039
+ "all");
2023
2040
  _found =
2024
2041
  false;
2025
2042
  if ( configuration_format == "bash" ) {
@@ -2042,14 +2059,12 @@ async function
2042
2059
  _deployments_dir);
2043
2060
  if ( _deployments_dir_type !== "undefined" &&
2044
2061
  deployments_dir !== "" ) {
2045
- _deployments =
2046
- deployments_dir;
2047
- if ( 0 < target_networks.length ) {
2062
+ if ( 0 < _target_networks.length ) {
2048
2063
  _network =
2049
- target_networks[
2064
+ _target_networks[
2050
2065
  0];
2051
2066
  }
2052
- if ( 0 < networks_ids.length ) {
2067
+ if ( 0 < _networks_ids.length ) {
2053
2068
  _network_id =
2054
2069
  _networks_ids[
2055
2070
  0];
@@ -2057,14 +2072,48 @@ async function
2057
2072
  const
2058
2073
  _deployments_path =
2059
2074
  _path_join( [
2060
- _deployments,
2075
+ _deployments_dir,
2061
2076
  _contract ] );
2062
- if ( networks_all == "n" ) {
2063
- _networks.push(
2064
- _network,
2065
- _network_id);
2077
+ if ( _networks_all == "n" ) {
2078
+ const
2079
+ _network_type =
2080
+ typeof(
2081
+ _network);
2082
+ if ( _network_type !== "undefined" ) {
2083
+ _networks.push(
2084
+ _network);
2085
+ }
2086
+ const
2087
+ _network_id_type =
2088
+ typeof(
2089
+ _network_id);
2090
+ if ( _network_id_type !== "undefined" ) {
2091
+ _networks.push(
2092
+ _network_id);
2093
+ }
2066
2094
  }
2067
- else if ( networks_all == "y" ) {
2095
+ else if ( _networks_all == "y" ) {
2096
+ _evm_contract_deployment_networks =
2097
+ _get(
2098
+ "_evm_contract",
2099
+ "deployment_networks");
2100
+ try {
2101
+ _evm_contract_deployment_networks =
2102
+ await _evm_contract_deployment_networks_check(
2103
+ _evm_contract_deployment_networks);
2104
+ }
2105
+ catch(
2106
+ _error) {
2107
+ _msg =
2108
+ "Error running " +
2109
+ "'_evm_contract_deployment_networks_check'.";
2110
+ _msg_error(
2111
+ _msg,
2112
+ 0);
2113
+ _echo2(
2114
+ _error);
2115
+ throw _error;
2116
+ }
2068
2117
  const
2069
2118
  _evm_contract_deployment_networks_args = [
2070
2119
  _deployments_path,
@@ -2072,21 +2121,42 @@ async function
2072
2121
  "n", // Display safest
2073
2122
  "n" // Display cheapest
2074
2123
  ];
2075
- _networks_new =
2076
- await _evm_contract_deployment_networks.apply(
2077
- null,
2078
- _evm_contract_deployment_networks_args);
2124
+ const
2125
+ _networks_new =
2126
+ await _evm_contract_deployment_networks.apply(
2127
+ null,
2128
+ _evm_contract_deployment_networks_args);
2079
2129
  _networks =
2080
2130
  _networks.concat(
2081
2131
  _networks_new);
2082
2132
  }
2133
+ _msg =
2134
+ `Input networks '${_networks}'.`;
2135
+ _msg_info(
2136
+ _msg);
2083
2137
  for ( _net of _networks ) {
2084
- _config =
2085
- _path_join( [
2138
+ _path_join_args = [
2086
2139
  _deployments_path,
2087
2140
  _net,
2088
2141
  `config.${_config_ext}`
2089
- ]);
2142
+ ];
2143
+ try {
2144
+ _config =
2145
+ _path_join(
2146
+ _path_join_args);
2147
+ }
2148
+ catch(
2149
+ _error) {
2150
+ _msg =
2151
+ "Error running '_path_join' " +
2152
+ "with arguments:";
2153
+ _msg_error(
2154
+ _msg,
2155
+ 0);
2156
+ _echo2(
2157
+ _path_join_args);
2158
+ throw _error;
2159
+ }
2090
2160
  if ( _file_exists(
2091
2161
  _config) ) {
2092
2162
  _found =
@@ -2098,6 +2168,13 @@ async function
2098
2168
  _msg);
2099
2169
  break;
2100
2170
  }
2171
+ else {
2172
+ _msg =
2173
+ "Deployment at location " +
2174
+ `'${_config}' not found.`;
2175
+ _msg_info(
2176
+ _msg);
2177
+ }
2101
2178
  }
2102
2179
  if ( ! _found ) {
2103
2180
  _msg =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  { "name": "evm-contracts-tools",
2
2
  "version":
3
- "0.0.72",
3
+ "0.0.74",
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": {
@@ -124,13 +124,13 @@
124
124
  "ethers":
125
125
  "^6.13.2",
126
126
  "evm-chains-info":
127
- "^0.0.39",
127
+ "^0.0.41",
128
128
  "evm-transactions-tools":
129
129
  "^0.1.10000000000001",
130
130
  "evm-wallet":
131
131
  "npm:evm-wallet.js@^0.0.103",
132
132
  "libevm":
133
- "^0.0.46",
133
+ "^0.0.50",
134
134
  "ws":
135
135
  "^8.21.0",
136
136
  "yargs":
@@ -146,7 +146,7 @@
146
146
  "evm-wallet.js":
147
147
  "npm:evm-wallet.js@^0.0.103",
148
148
  "libevm":
149
- "^0.0.46"
149
+ "^0.0.50"
150
150
  },
151
151
  "type":
152
152
  "module",