require=functiont(e,n,r){functioni(a,u){if(!n[a]){if(!e[a]){varf="function"==typeofrequire&&require;if(!u&&f)returnf(a,!0);if(o)returno(a,!0);vars=newError("Cannot find module '"+a+"'");throws.code="MODULE_NOT_FOUND",s}varc=n[a]={exports:{}};e[a][0].call(c.exports,function(t){varn=e[a][1][t];returni(n?n:t)},c,c.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){varn=t("./web3");BigNumber.config({ROUNDING_MODE:BigNumber.ROUND_DOWN});varr=32,i=function(t,e){for(varn=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);returnn?r-1:-1},o=function(t,e){returni(t,function(t){returnt.name===e})},a=function(t,e,n){returnnewArray(e-t.length+1).join(n?n:"0")+t},u=function(t){returnfunction(e){return0===e.indexOf(t)}},f=function(t){returnfunction(e){returnt===e}},s=function(t){return"[]"===t.slice(-2)},c=function(t){vare=2*r;returntinstanceofBigNumber||"number"==typeoft?("number"==typeoft&&(t=newBigNumber(t)),t=t.round(),t.lessThan(0)&&(t=newBigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(t).plus(1)),t=t.toString(16)):t=0===t.indexOf("0x")?t.substr(2):"string"==typeoft?c(newBigNumber(t)):(+t).toString(16),a(t,e)},l=function(t){returnn.fromAscii(t,r).substr(2)},h=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},p=function(t){returnc(newBigNumber(t).times(newBigNumber(2).pow(128)))},d=function(t,e){returns(t)||u("string")(t)?c(e.length):""},g=function(){return[{type:u("uint"),format:c},{type:u("int"),format:c},{type:u("hash"),format:c},{type:u("string"),format:l},{type:u("real"),format:p},{type:u("ureal"),format:p},{type:f("address"),format:c},{type:f("bool"),format:h}]},m=g(),v=function(t,e,n){varr="",i=o(t,e);if(-1!==i){vara=t[i];returna.inputs.forEach(function(t,e){r+=d(t.type,n[e])}),a.inputs.forEach(function(t,e){for(vari=!1,o=0;o<m.length&&!i;o++)i=m[o].type(a.inputs[e].type,n[e]);i||console.error("input parser does not support type: "+a.inputs[e].type);varu=m[o-1].format,f="";f=s(a.inputs[e].type)?n[e].reduce(function(t,e){returnt+u(e)},""):u(n[e]),r+=f}),r}},b=function(t){return"1"===newBigNumber(t.substr(0,1),16).toString(2).substr(0,1)},y=function(t){returnb(t)?newBigNumber(t,16).minus(newBigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):newBigNumber(t,16)},_=function(t){returnnewBigNumber(t,16)},w=function(t){returny(t).dividedBy(newBigNumber(2).pow(128))},N=function(t){return_(t).dividedBy(newBigNumber(2).pow(128))},x=function(t){return"0x"+t},B=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},S=function(t){returnn.toAscii(t)},A=function(t){return"0x"+t.slice(t.length-40,t.length)},O=function(t){returns(t)||u("string")(t)?2*r:0},P=function(){return[{type:u("uint"),format:_},{type:u("int"),format:y},{type:u("hash"),format:x},{type:u("string"),format:S},{type:u("real"),format:w},{type:u("ureal"),format:N},{type:f("address"),format:A},{type:f("bool"),format:B}]},k=P(),E=function(t,e,n){vari=o(t,e);if(-1!==i){n=n.slice(2);vara=[],f=t[i],c=2*r,l=f.outputs.reduce(function(t,e){returnt+O(e.type)},0),h=n.slice(0,l);returnn=n.slice(l),f.outputs.forEach(function(t,e){for(varr=!1,i=0;i<k.length&&!r;i++)r=k[i].type(f.outputs[e].type);r||console.error("output parser does not support type: "+f.outputs[e].type);varo=k[i-1].format;if(s(f.outputs[e].type)){varl=_(h.slice(0,c));h=h.slice(c);for(varp=[],d=0;l>d;d++)p.push(o(n.slice(0,c))),n=n.slice(c);a.push(p)}elseu("string")(f.outputs[e].type)?(h=h.slice(c),a.push(o(n.slice(0,c))),n=n.slice(c)):(a.push(o(n.slice(0,c))),n=n.slice(c))}),a}},F=function(t){vare=t.indexOf("(");return-1!==e?t.substr(0,e):t},D=function(t){vare=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},I=function(t){vare={};returnt.forEach(function(n){varr=F(n.name),i=D(n.name),o=function(){vare=Array.prototype.slice.call(arguments);returnv(t,n.name,e)};void0===e[r]&&(e[r]=o),e[r][i]=o}),e},M=fu