require=functiont(e,n,r){functioni(a,f){if(!n[a]){if(!e[a]){varu="function"==typeofrequire&&require;if(!f&&u)returnu(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=4,o=function(t,e){for(varn=!1,r=0;r<t.length&&!n;r++)n=e(t[r]);returnn?r-1:-1},a=function(t,e){returno(t,function(t){returnt.name===e})},f=function(t,e){varn=a(t,e);return-1===n?voidconsole.error("method "+e+" not found in the abi"):t[n]},u=function(t){returnt.filter(function(t){return"function"===t.type})},s=function(t,e,n){returnnewArray(e-t.length+1).join(n?n:"0")+t},c=function(t){returnfunction(e){return0===e.indexOf(t)}},l=function(t){returnfunction(e){returnt===e}},h=function(t){return"[]"===t.slice(-2)},p=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?p(newBigNumber(t)):(+t).toString(16),s(t,e)},d=function(t){returnn.fromAscii(t,r).substr(2)},m=function(t){return"000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0")},g=function(t){returnp(newBigNumber(t).times(newBigNumber(2).pow(128)))},v=function(t,e){returnh(t)||"string"===t?p(e.length):""},b=function(){return[{type:c("uint"),format:p},{type:c("int"),format:p},{type:c("hash"),format:p},{type:c("string"),format:d},{type:c("real"),format:g},{type:c("ureal"),format:g},{type:l("address"),format:p},{type:l("bool"),format:m}]},y=b(),_=function(t,e,n){varr="",i=f(t,e);returni.inputs.forEach(function(t,e){r+=v(t.type,n[e])}),i.inputs.forEach(function(t,e){for(varo=!1,a=0;a<y.length&&!o;a++)o=y[a].type(i.inputs[e].type,n[e]);o||console.error("input parser does not support type: "+i.inputs[e].type);varf=y[a-1].format,u="";u=h(i.inputs[e].type)?n[e].reduce(function(t,e){returnt+f(e)},""):f(n[e]),r+=u}),r},w=function(t){return"1"===newBigNumber(t.substr(0,1),16).toString(2).substr(0,1)},N=function(t){returnt=t||"0",w(t)?newBigNumber(t,16).minus(newBigNumber("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):newBigNumber(t,16)},x=function(t){returnt=t||"0",newBigNumber(t,16)},B=function(t){returnN(t).dividedBy(newBigNumber(2).pow(128))},A=function(t){returnx(t).dividedBy(newBigNumber(2).pow(128))},S=function(t){return"0x"+t},O=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t?!0:!1},P=function(t){returnn.toAscii(t)},F=function(t){return"0x"+t.slice(t.length-40,t.length)},E=function(t){returnh(t)||"string"===t?2*r:0},k=function(){return[{type:c("uint"),format:x},{type:c("int"),format:N},{type:c("hash"),format:S},{type:c("string"),format:P},{type:c("real"),format:B},{type:c("ureal"),format:A},{type:l("address"),format:F},{type:l("bool"),format:O}]},T=k(),M=function(t,e,n){n=n.slice(2);vari=[],o=f(t,e),a=2*r,u=o.outputs.reduce(function(t,e){returnt+E(e.type)},0),s=n.slice(0,u);returnn=n.slice(u),o.outputs.forEach(function(t,e){for(varr=!1,f=0;f<T.length&&!r;f++)r=T[f].type(o.outputs[e].type);r||console.error("output parser does not support type: "+o.outputs[e].type);varu=T[f-1].format;if(h(o.outputs[e].type)){varl=x(s.slice(0,a));s=s.slice(a);for(varp=[],d=0;l>d;d++)p.push(u(n.slice(0,a))),n=n.slice(a);i.push(p)}elsec("string")(o.outputs[e].type)?(s=s.slice(a),i.push(u(n.slice(0,a))),n=n.slice(a)):(i.push(u(n.slice(0,a))),n=n.slice(a))}),i},D=function(t){vare=t.indexOf("(");return-1!==e?t.substr(0,e):t},C=function(t){vare=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},q=function(t){vare={};returnu(t).forEach(function(n){