js-waku-examples/eth-pm/static/js/main.5e2e7b27.js

3 lines
1.6 MiB
JavaScript
Raw Normal View History

2022-09-23 16:00:46 +00:00
/*! For license information please see main.5e2e7b27.js.LICENSE.txt */
(()=>{var __webpack_modules__={86:(e,t,r)=>{"use strict";r.r(t),r.d(t,{AbiCoder:()=>re,ConstructorFragment:()=>S,ErrorFragment:()=>C,EventFragment:()=>v,FormatTypes:()=>f,Fragment:()=>y,FunctionFragment:()=>_,Indexed:()=>ue,Interface:()=>fe,LogDescription:()=>ae,ParamType:()=>g,TransactionDescription:()=>le,checkResultErrors:()=>N,defaultAbiCoder:()=>ne});var n=r(4471),i=r(7943),o=r(1227);const s="abi/5.7.0",a=new o.Logger(s),l={};let c={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function h(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(c[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}const f=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class g{constructor(e,t){e!==l&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(p);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:g.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=f.sighash),f[e]||a.throwArgumentError("invalid format type","format",e),e===f.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"===typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==f.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===f.full?", ":",")+")"):t+=this.type,e!==f.sighash&&(!0===this.indexed&&(t+=" indexed"),e===f.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"===typeof e?g.fromString(e,t):g.fromObject(e)}static fromObject(e){return g.isParamType(e)?e:new g(l,{name:e.name||null,type:k(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(g.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){a.throwArgumentError("unexpected character at position ".concat(t),"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let a=0;a<e.length;a++){let r=e[a];switch(r){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(a),s.state.allowType=!1,s.type=k(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(a),s.indexed=!0,s.name=""),h(s.type,s.name)&&(s.name=""),s.type=k(s.type);let e=s;s=s.parent,s||n(a),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(a),s.indexed=!0,s.name=""),h(s.type,s.name)&&(s.name=""),s.type=k(s.type);let o=i(s.parent);s.parent.components.push(o),delete s.parent,s=o;break;case" ":s.state.allowType&&""!==s.type&&(s.type=k(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(a),s.indexed&&n(a),s.indexed=!0,s.name=""):h(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(a),s.type+=r,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(a),s.type+=r,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=r,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=r,delete s.state.allowArray):s.state.readArray?s.type+=r:n(a)}}return s.parent&&a.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===s.name?(t||n(r.leng
//# sourceMappingURL=main.5e2e7b27.js.map