thrownewError("chain33.js: invalid function name format")
}
varprefix=farr[0]
varfuncname=farr[1]
varrunobj={}
varlogs=[]
if(!Array.isArray(loglist)){
thrownewError("chain33.js: loglist must be array")
}
for(vari=0;i<loglist.length;i++){
logs.push(JSON.parse(loglist[i]))
}
if(prefix=="exec"){
runobj=newExec(JSON.parse(context))
}elseif(prefix=="execlocal"){
runobj=newExecLocal(JSON.parse(context),logs)
}elseif(prefix=="query"){
runobj=newQuery(JSON.parse(context))
}else{
thrownewError("chain33.js: invalid function prefix format")
}
vararg=JSON.parse(args)
if(typeofrunobj[funcname]!="function"){
thrownewError("chain33.js: invalid function name not found")
}
returnrunobj[funcname](arg)
}
//Long
!function(t,i){"object"==typeofexports&&"object"==typeofmodule?module.exports=i():"function"==typeofdefine&&define.amd?define([],i):"object"==typeofexports?exports.Long=i():t.Long=i()}("undefined"!=typeofself?self:this,function(){returnfunction(t){functioni(h){if(n[h])returnn[h].exports;vare=n[h]={i:h,l:!1,exports:{}};returnt[h].call(e.exports,e,e.exports,i),e.l=!0,e.exports}varn={};returni.m=t,i.c=n,i.d=function(t,n,h){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:h})},i.n=function(t){varn=t&&t.__esModule?function(){returnt.default}:function(){returnt};returni.d(n,"a",n),n},i.o=function(t,i){returnObject.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i){functionn(t,i,n){this.low=0|t,this.high=0|i,this.unsigned=!!n}functionh(t){return!0===(t&&t.__isLong__)}functione(t,i){varn,h,e;returni?(t>>>=0,(e=0<=t&&t<256)&&(h=l[t])?h:(n=r(t,(0|t)<0?-1:0,!0),e&&(l[t]=n),n)):(t|=0,(e=-128<=t&&t<128)&&(h=f[t])?h:(n=r(t,t<0?-1:0,!1),e&&(f[t]=n),n))}functions(t,i){if(isNaN(t))returni?p:m;if(i){if(t<0)returnp;if(t>=c)returnq}else{if(t<=-w)return_;if(t+1>=w)returnE}returnt<0?s(-t,i).neg():r(t%d|0,t/d|0,i)}functionr(t,i,h){returnnewn(t,i,h)}functiono(t,i,n){if(0===t.length)throwError("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)returnm;if("number"==typeofi?(n=i,i=!1):i=!!i,(n=n||10)<2||36<n)throwRangeError("radix");varh;if((h=t.indexOf("-"))>0)throwError("interior hyphen");if(0===h)returno(t.substring(1),i,n).neg();for(vare=s(a(n,8)),r=m,u=0;u<t.length;u+=8){varg=Math.min(8,t.length-u),f=parseInt(t.substring(u,u+g),n);if(g<8){varl=s(a(n,g));r=r.mul(l).add(s(f))}elser=r.mul(e),r=r.add(s(f))}returnr.unsigned=i,r}functionu(t,i){return"number"==typeoft?s(t,i):"string"==typeoft?o(t,i):r(t.low,t.high,"boolean"==typeofi?i:t.unsigned)}t.exports=n;varg=null;try{g=newWebAssembly.Instance(newWebAssembly.Module(newUint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(t){}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0}),n.isLong=h;varf={},l={};n.fromInt=e,n.fromNumber=s,n.fromBits=r;vara=Math.pow;n.fromString=o,n.fromValue=u;vard=4294967296,c=d*d,w=c/2,v=e(1<<24),m=e(0);n.ZERO=m;varp=e(0,!0);n.UZERO=p;vary=e(1);n.ONE=y;varb=e(1,!0);n.UONE=b;varN=e(-1);n.NEG_ONE=N;varE=r(-1,2147483647,!1);n.MAX_VALUE=E;varq=r(-1,-1,!0);n.MAX_UNSIGNED_VALUE=q;var_=r(0,-2147483648,!1);n.MIN_VALUE=_;varB=n.prototype;B.toInt=function(){returnthis.unsigned?this.low>>>0:this.low},B.toNumber=function(){returnthis.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},B.toString=function(t){if((t=t||10)<2||36<t)throwRangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(_)){vari=s(t),n=this.div(i),h=n.mul(i).sub(this);returnn.toString(t)+h.toInt().toString(t)}return"-"+this.neg().toString(t)}for(vare=s(a(t,6),this.unsigned),r=this,o="";;){varu=r.div(e),g=r.sub(u.mul(e)).toInt()>>>0,f=g.toString(t);if(r=u,r.isZero())returnf+o;for(;f.length<6;)f="0"+f;o=""+f+o}},B.getHighBits=function(){returnthis.high},B.getHighBitsUnsigned=function(){returnthis.high>>>0},B.getLowBits=function(){returnthis.low},B.getLowBitsUnsigned=function(){returnthis.low>>>0},B.getNumBitsAbs=function(){if(this.isNegative())returnthis.eq(_)?64:this.neg().getNumBitsAbs();for(vart=0!=this.high?this.high:this.low,i=31;i>0&&0==(t&1<<i);i--);return0!=this.high?i+33:i+1},B.isZero=function(){return0===this.high&&0===this.low},B.eqz=B.isZero,B.isNegative=function(){return!this.unsigned&&this.high<0},B.isPositive=function(){returnthis.unsigned||this.high>=0},B.isOdd=function(){return1==(1&this.low)},B.isEven=function(){return0==(1&this.low)},B.equals=function(t){returnh(t)||(t=u(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},B.eq=B.equals,B.notEquals=function(t){return!this.eq(t)},B.neq=B.notEquals,B.ne=B.notEquals,B.lessThan=function(t){returnthis.comp(t)<0},B.lt=B.lessThan,B.lessThanOrEqual=function(t){returnthis.comp(t)<=0},B.lte=B.lessThanOrEqual,B.le=B.lessThanOrEqual,B.greaterThan=function(t){returnthis.comp(t)>0},B.gt=B.greaterThan,B.greaterThanOrEqual=function(t){returnthis.comp(t)>=0},B.gte=B.greaterThanOrEqual,B.ge=B.greaterThanOrEqual,B.compare=function(t){if(h(t)||(t=u(t)),this.eq(t))return0;vari=this.isNegative(),n=t.isNegative();returni&&!n?-1:!i&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},B.comp=B.compare,B.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(y)},B.neg=B.negate,B.add=function(t){h(t)||(t=u(t));vari=this.high>>>16,n=65535&this.high,e=this.low>>>16,s=65535&this.low,o=t.high>>>16,g=65535&t.high,f=t.low>>>16,l=65535&t.low,a=0,d=0,c=0,w=0;returnw+=s+l,c+=w>>>16,w&=65535,c+=e+f,d+=c>>>16,c&=65535,d+=n+g,a+=d>>>16,d&=65535,a+=i+o,a&=65535,r(c<<16|w,a<<16|d,this.unsigned)},B.subtract=function(t){returnh(t)||(t=u(t)),this.add(t.neg())},B.sub=B.subtract,B.multiply=function(t){if(this.isZero())returnm;if(h(t)||(t=u(t)),g){returnr(g.mul(this.low,this.high,t.low,t.high),g.get_high(),this.unsigned)}if(t.isZero())returnm;if(this.eq(_))returnt.isOdd()?_:m;if(t.eq(_))returnthis.isOdd()?_:m;if(this.isNegative())returnt.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())returnthis.mul(t.neg()).neg();if(this.lt(v)&&t.lt(v))returns(this.toNumber()*t.toNumber(),this.unsigned);vari=this.high>>>16,n=65535&this.high,e=this.low>>>16,o=65535&this.low,f=t.high>>>16,l=65535&t.high,a=t.low>>>16,d=65535&t.low,c=0,w=0,p=0,y=0;returny+=o*d,p+=y>>>16,y&=65535,p+=e*d,w+=p>>>16,p&=65535,p+=o*a,w+=p>>>16,p&=65535,w+=n*d,c+=w>>>16,w&=65535,w+=e*a,c+=w>>>16,w&=65535,w+=o*l,c+=w>>>16,w&=65535,c+=i*d+n*a+e*l+o*f,c&=65535,r(p<<16|y,c<<16|w,this.unsigned)},B.mul=B.multiply,B.divide=function(t){if(h(t)||(t=u(t)),t.isZero())throwError("division by zero");if(g){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)returnthis;returnr((this.unsigned?g.div_u:g.div_s)(this.low,this.high,t.low,t.high),g.get_high(),this.unsigned)}if(this.isZero())returnthis.unsigned?p:m;vari,n,e;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))returnp;if(t.gt(this.shru(1)))returnb;e=p}else{if(this.eq(_)){if(t.eq(y)||t.eq(N))return_;if(t.eq(_))returny;returni=this.shr(1).div(t).shl(1),i.eq(m)?t.isNegative()?y:N:(n=this.sub(t.mul(i)),e=i.add(n.div(t)))}if(t.eq(_))returnthis.unsigned?p:m;if(this.isNegative())returnt.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())returnthis.div(t.neg()).neg();e=m}for(n=this;n.gte(t);){i=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(varo=Math.ceil(Math.log(i)/Math.LN2),f=o<=48?1:a(2,o-48),l=s(i),d=l.mul(t);d.isNegative()||d.gt(n);)i-=f,l=s(i,this.unsigned),d=l.mul(t);l.isZero()&&(l=y),e=e.add(l),n=n.sub(d)}returne},B.div=B.divide,B.modulo=function(t){if(h(t)||(t=u(t)),g){returnr((this.unsigned?g.rem_u:g.rem_s)(this.low,this.high,t.low,t.high),g.get_high(),this.unsigned)}returnthis.sub(this.div(t).mul(t))},B.mod=B.modulo,B.rem=B.modulo,B.not=function(){returnr(~this.low,~this.high,this.unsigned)},B.and=function(t){returnh(t)||(t=u(t)),r(this.low&t.low,this.high&t.high,this.unsigned)},B.or=function(t){returnh(t)||(t=u(t)),r(this.low|t.low,this.high|t.high,this.unsigned)},B.xor=function(t){returnh(t)||(t=u(t)),r(this.low^t.low,this.high^t.high,this.unsigned)},B.shiftLeft=function(t){returnh(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?r(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):r(0,this.low<<t-32,this.unsigned)},B.shl=B.shiftLeft,B.shiftRight=function(t){returnh(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?r(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):r(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},B.shr=B.shiftRight,B.shiftRightUnsigned=function(t){returnh(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?r(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):32===t?r(this.high,0,this.unsigned):r(this.high>>>t-32,0,this.unsigned)},B.shru=B.shiftRightUnsigned,B.shr_u=B.shiftRightUnsigned,B.rotateLeft=function(t){vari;returnh(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?r(this.high,this.low,this.unsigned):t<32?(i=32-t,r(this.low<<t|this.high>>>i,this.high<<t|this.low>>>i,this.unsigned)):(t-=32,i=32-t,r(this.high<<t|this.low>>>i,this.low<<t|this.high>>>i,this.unsigned))},B.rotl=B.rotateLeft,B.rotateRight=function(t){vari;returnh(t)&&(t=t.toInt()),0==(t&=63)?this:32===t?r(this.high,this.low,this.unsigned):t<32?(i=32-t,r(this.high<<i|this.low>>>t,this.low<<i|this.high>>>t,this.unsigned)):(t-=32,i=32-t,r(this.low<<i|this.high>>>t,this.high<<i|this.low>>>t,this.unsigned))},B.rotr=B.rotateRight,B.toSigned=function(){returnthis.unsigned?r(this.low,this.high,!1):this},B.toUnsigned=function(){returnthis.unsigned?this:r(this.low,this.high,!0)},B.toBytes=function(t){returnt?this.toBytesLE():this.toBytesBE()},B.toBytesLE=function(){vart=this.high,i=this.low;return[255&i,i>>>8&255,i>>>16&255,i>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]},B.toBytesBE=function(){vart=this.high,i=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,i>>>24,i>>>16&255,i>>>8&255,255&i]},n.fromBytes=function(t,i,h){returnh?n.fromBytesLE(t,i):n.fromBytesBE(t,i)},n.fromBytesLE=function(t,i){returnnewn(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,i)},n.fromBytesBE=function(t,i){returnnewn(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],i)}}])});