require=functiont(e,n,r){functioni(a,u){if(!n[a]){if(!e[a]){vars="function"==typeofrequire&&require;if(!u&&s)returns(a,!0);if(o)returno(a,!0);varc=newError("Cannot find module '"+a+"'");throwc.code="MODULE_NOT_FOUND",c}varl=n[a]={exports:{}};e[a][0].call(l.exports,function(t){varn=e[a][1][t];returni(n?n:t)},l,l.exports,t,e,n,r)}returnn[a].exports}for(varo="function"==typeofrequire&&require,a=0;a<r.length;a++)i(r[a]);returni}({1:[function(t,e,n){varr=t("../utils/utils"),i=t("../utils/config"),o=t("./types"),a=t("./formatters"),u=t("./utils"),s=function(t){thrownewError("parser does not support type: "+t)},c=function(t){return"[]"===t.slice(-2)},l=function(t,e){returnc(t)||"bytes"===t?a.formatInputInt(e.length):""},f=o.inputTypes(),p=function(t,e){varn="",r="",i="";returnt.forEach(function(t,r){n+=l(t.type,e[r])}),t.forEach(function(n,o){for(vara=!1,u=0;u<f.length&&!a;u++)a=f[u].type(t[o].type,e[o]);a||s(t[o].type);varl=f[u-1].format;c(t[o].type)?i+=e[o].reduce(function(t,e){returnt+l(e)},""):"bytes"===t[o].type?i+=l(e[o]):r+=l(e[o])}),n+=r+i},m=function(t){returnc(t)||"bytes"===t?2*i.ETH_PADDING:0},h=o.outputTypes(),d=function(t,e){e=e.slice(2);varn=[],r=2*i.ETH_PADDING,u=t.reduce(function(t,e){returnt+m(e.type)},0),l=e.slice(0,u);returne=e.slice(u),t.forEach(function(i,u){for(varf=!1,p=0;p<h.length&&!f;p++)f=h[p].type(t[u].type);f||s(t[u].type);varm=h[p-1].format;if(c(t[u].type)){vard=a.formatOutputUInt(l.slice(0,r));l=l.slice(r);for(varg=[],v=0;d>v;v++)g.push(m(e.slice(0,r))),e=e.slice(r);n.push(g)}elseo.prefixedType("bytes")(t[u].type)?(l=l.slice(r),n.push(m(e.slice(0,r))),e=e.slice(r)):(n.push(m(e.slice(0,r))),e=e.slice(r))}),n},g=function(t){vare={};returnt.forEach(function(t){varn=r.extractDisplayName(t.name),i=r.extractTypeName(t.name),o=function(){vare=Array.prototype.slice.call(arguments);returnp(t.inputs,e)};void0===e[n]&&(e[n]=o),e[n][i]=o}),e},v=function(t){vare={};returnt.forEach(function(t){varn=r.extractDisplayName(t.name),i=r.extractTypeName(t.name),o=function(e){returnd(t.outputs,e)};void0===e[n]&&(e[n]=o),e[n][i]=o}),e},b=function(t,e){varn=u.getConstructor(t,e.length);returnn?p(n.inputs,e):(e.length>0&&console.warn("didn't found matching constructor, using default one"),"")};e.exports={inputParser:g,outputParser:v,formatInput:p,formatOutput:d,formatConstructorParams:b}},{"../utils/config":6,"../utils/utils":7,"./formatters":2,"./types":3,"./utils":4}],2:[function(t,e,n){varr=t("bignumber.js"),i=t("../utils/utils"),o=t("../utils/config"),a=function(t){vare=2*o.ETH_PADDING;returnr.config(o.ETH_BIGNUMBER_ROUNDING_MODE),i.padLeft(i.toTwosComplement(t).round().toString(16),e)},u=function(t){returni.fromAscii(t,o.ETH_PADDING).substr(2)},s=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},c=function(t){returna(newr(t).times(newr(2).pow(128)))},l=function(t){return"1"===newr(t.substr(0,1),16).toString(2).substr(0,1)},f=function(t){returnt=t||"0",l(t)?newr(t,16).minus(newr("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):newr(t,16)},p=function(t){returnt=t||"0",newr(t,16)},m=function(t){returnf(t).dividedBy(newr(2).pow(128))},h=function(t){returnp(t).dividedBy(newr(2).pow(128))},d=function(t){return"0x"+t},g=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},v=function(t){returni.toAscii(t)},b=function(t){return"0x"+t.slice(t.length-40,t.length)};e.exports={formatInputInt:a,formatInputString:u,formatInputBool:s,formatInputReal:c,formatOutputInt:f,formatOutputUInt:p,formatOutputReal:m,formatOutputUReal:h,formatOutputHash:d,formatOutputBool:g,formatOutputString:v,formatOutputAddress:b}},{"../utils/config":6,"../utils/utils":7,"bignumber.js":"bignumber.js"}],3:[function(t,e,n){varr=t("./formatters"),i=function(t){returnfunction(e){return0===e.indexOf(t)}},o=function(t){returnfunction(e){returnt===e}},a=function(){return[{type:i("uint"),format:r.formatInputInt},{type:i("int"),format:r.formatInputInt},{type:i("bytes"),format
r++);return(n=r+n*F-1)>M?t.c=t.e=null:G>n?t.c=[t.e=0]:(t.e=n,t.c=e),t}functionS(t,e,n){varr=newError(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+n);throwr.name="BigNumber Error",R=0,r}functionk(t,e,n,r){vari,o,a,u,s,c,l,f=t.c,p=_;if(f){t:{for(i=1,u=f[0];u>=10;u/=10,i++);if(o=e-i,0>o)o+=F,a=e,s=f[c=0],l=s/p[i-a-1]%10|0;elseif(c=v((o+1)/F),c>=f.length){if(!r)breakt;for(;f.length<=c;f.push(0));s=l=0,i=1,o%=F,a=o-F+1}else{for(s=u=f[c],i=1;u>=10;u/=10,i++);o%=F,a=o-F+i,l=0>a?0:s/p[i-a-1]%10|0}if(r=r||0>e||null!=f[c+1]||(0>a?s:s%p[i-a-1]),r=4>n?(l||r)&&(0==n||n==(t.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?s/p[i-a]:0:f[c-1])%10&1||n==(t.s<0?8:7)),1>e||!f[0])returnf.length=0,r?(e-=t.e+1,f[0]=p[e%F],t.e=-e||0):f[0]=t.e=0,t;if(0==o?(f.length=c,u=1,c--):(f.length=c+1,u=p[F-o],f[c]=a>0?b(s/p[i-a]%p[a])*u:0),r)for(;;){if(0==c){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=u,u=1;a>=10;a/=10,u++);o!=u&&(t.e++,f[0]==N&&(f[0]=1));break}if(f[c]+=u,f[c]!=N)break;f[c--]=0,u=1}for(o=f.length;0===f[--o];f.pop());}t.e>M?t.c=t.e=null:t.e<G&&(t.c=[t.e=0])}returnt}varP,R=0,C=e.prototype,H=newe(1),U=20,L=4,j=-7,q=21,G=-1e7,M=1e7,J=!0,W=D,V=!1,$=1,z=100,X={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:"",fractionGroupSize:0};returne.another=r,e.ROUND_UP=0,e.ROUND_DOWN=1,e.ROUND_CEIL=2,e.ROUND_FLOOR=3,e.ROUND_HALF_UP=4,e.ROUND_HALF_DOWN=5,e.ROUND_HALF_EVEN=6,e.ROUND_HALF_CEIL=7,e.ROUND_HALF_FLOOR=8,e.EUCLID=9,e.config=function(){vart,e,n=0,r={},i=arguments,o=i[0],a=o&&"object"==typeofo?function(){returno.hasOwnProperty(e)?null!=(t=o[e]):void0}:function(){returni.length>n?null!=(t=i[n++]):void0};returna(e="DECIMAL_PLACES")&&W(t,0,A,2,e)&&(U=0|t),r[e]=U,a(e="ROUNDING_MODE")&&W(t,0,8,2,e)&&(L=0|t),r[e]=L,a(e="EXPONENTIAL_AT")&&(s(t)?W(t[0],-A,0,2,e)&&W(t[1],0,A,2,e)&&(j=0|t[0],q=0|t[1]):W(t,-A,A,2,e)&&(j=-(q=0|(0>t?-t:t)))),r[e]=[j,q],a(e="RANGE")&&(s(t)?W(t[0],-A,-1,2,e)&&W(t[1],1,A,2,e)&&(G=0|t[0],M=0|t[1]):W(t,-A,A,2,e)&&(0|t?G=-(M=0|(0>t?-t:t)):J&&S(2,e+" cannot be zero",t))),r[e]=[G,M],a(e="ERRORS")&&(t===!!t||1===t||0===t?(R=0,W=(J=!!t)?D:u):J&&S(2,e+y,t)),r[e]=J,a(e="CRYPTO")&&(t===!!t||1===t||0===t?(V=!(!t||!h||"object"!=typeofh),t&&!V&&J&&S(2,"crypto unavailable",h)):J&&S(2,e+y,t)),r[e]=V,a(e="MODULO_MODE")&&W(t,0,9,2,e)&&($=0|t),r[e]=$,a(e="POW_PRECISION")&&W(t,0,A,2,e)&&(z=0|t),r[e]=z,a(e="FORMAT")&&("object"==typeoft?X=t:J&&S(2,e+" not an object",t)),r[e]=X,r},e.max=function(){returnB(arguments,C.lt)},e.min=function(){returnB(arguments,C.gt)},e.random=function(){vart=9007199254740992,n=Math.random()*t&2097151?function(){returnb(Math.random()*t)}:function(){return8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};returnfunction(t){varr,i,o,a,u,s=0,c=[],l=newe(H);if(t=null!=t&&W(t,0,A,14)?0|t:U,a=v(t/F),V)if(h&&h.getRandomValues){for(r=h.getRandomValues(newUint32Array(a*=2));a>s;)u=131072*r[s]+(r[s+1]>>>11),u>=9e15?(i=h.getRandomValues(newUint32Array(2)),r[s]=i[0],r[s+1]=i[1]):(c.push(u%1e14),s+=2);s=a/2}elseif(h&&h.randomBytes){for(r=h.randomBytes(a*=7);a>s;)u=281474976710656*(31&r[s])+1099511627776*r[s+1]+4294967296*r[s+2]+16777216*r[s+3]+(r[s+4]<<16)+(r[s+5]<<8)+r[s+6],u>=9e15?h.randomBytes(7).copy(r,s):(c.push(u%1e14),s+=7);s=a/7}elseJ&&S(14,"crypto unavailable",h);if(!s)for(;a>s;)u=n(),9e15>u&&(c[s++]=u%1e14);for(a=c[--s],t%=F,a&&t&&(u=_[F-t],c[s]=b(a/u)*u);0===c[s];c.pop(),s--);if(0>s)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=F);for(s=1,u=c[0];u>=10;u/=10,s++);F>s&&(o-=F-s)}returnl.e=o,l.c=c,l}}(),P=function(){functiont(t,e,n){varr,i,o,a,u=0,s=t.length,c=e%T,l=e/T|0;for(t=t.slice();s--;)o=t[s]%T,a=t[s]/T|0,r=l*o+a*c,i=c*o+r%T*T+u,u=(i/n|0)+(r/T|0)+l*a,t[s]=i%n;returnu&&t.unshift(u),t}functionn(t,e,n,r){vari,o;if(n!=r)o=n>r?1:-1;elsefor(i=o=0;n>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}returno}functionr(t,e,n