From cfa85c43c153be57b9d01ce2931241bc92dddfa4 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Sat, 6 Jul 2024 15:14:41 +0200 Subject: [PATCH] upgrade dependencies --- dist/esm/index.bundle.js | 20 ++++++++++---------- dist/esm/index.solana.js | 26 +++++++++++++++++++------- dist/esm/index.solana.js.map | 2 +- dist/umd/index.bundle.js | 20 ++++++++++---------- dist/umd/index.solana.js | 26 +++++++++++++++++++------- dist/umd/index.solana.js.map | 2 +- package.evm.json | 6 +++--- package.json | 6 +++--- package.solana.json | 6 +++--- yarn.lock | 16 ++++++++-------- 10 files changed, 77 insertions(+), 53 deletions(-) diff --git a/dist/esm/index.bundle.js b/dist/esm/index.bundle.js index dec8b4bc..0892a7f8 100644 --- a/dist/esm/index.bundle.js +++ b/dist/esm/index.bundle.js @@ -84,7 +84,7 @@ Zf((function(t,e){}));var Zx=Zf((function(t){t.exports=qx})),Jx=Zx.createContext * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence - */function Xk(t){var e,n,r,i=t.length-1,o="",a=t[0];if(i>0){for(o+=a,e=1;en)throw Error(Rk+t)}function $k(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=Yk(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==Yk(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==Yk(10,e-3)-1,a}function tT(t,e,n){for(var r,i,o=[0],a=0,s=t.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Jk.absoluteValue=Jk.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),nT(t)},Jk.ceil=function(){return nT(new this.constructor(this),this.e+1,2)},Jk.clampedTo=Jk.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Rk+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},Jk.comparedTo=Jk.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;es[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},Jk.cosine=Jk.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;(r=e.d.length)<32?i=(1/vT(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=gT(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(2==jk||3==jk?n.neg():n,t,e,!0)):new r(1):new r(NaN)},Jk.cubeRoot=Jk.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(Bk=!1,(o=l.s*Yk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Xk(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Yk(n,1/3),t=Qk((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=eT(c.plus(l).times(s),c.plus(u),a+2,1),Xk(s.d).slice(0,a)===(n=Xk(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(nT(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(nT(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Bk=!0,nT(r,t,h.rounding,e)},Jk.decimalPlaces=Jk.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Qk(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},Jk.dividedBy=Jk.div=function(t){return eT(this,new this.constructor(t))},Jk.dividedToIntegerBy=Jk.divToInt=function(t){var e=this.constructor;return nT(eT(this,new e(t),0,1,1),e.precision,e.rounding)},Jk.equals=Jk.eq=function(t){return 0===this.cmp(t)},Jk.floor=function(){return nT(new this.constructor(this),this.e+1,3)},Jk.greaterThan=Jk.gt=function(t){return this.cmp(t)>0},Jk.greaterThanOrEqualTo=Jk.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Jk.hyperbolicCosine=Jk.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/vT(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=gT(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return nT(o,a.precision=n,a.rounding=r,!0)},Jk.hyperbolicSine=Jk.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=gT(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=gT(o,2,i=i.times(1/vT(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,nT(i,e,n,!0)},Jk.hyperbolicTangent=Jk.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,eT(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},Jk.inverseCosine=Jk.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?aT(n,i,o):new n(0):new n(NaN):e.isZero()?aT(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=aT(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},Jk.inverseHyperbolicCosine=Jk.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Bk=!1,n=n.times(n).minus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},Jk.inverseHyperbolicSine=Jk.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Bk=!1,n=n.times(n).plus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln())},Jk.inverseHyperbolicTangent=Jk.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?nT(new o(i),t,e,!0):(o.precision=n=r-i.e,i=eT(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},Jk.inverseSine=Jk.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=aT(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Jk.inverseTangent=Jk.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Zk)return(a=aT(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Zk)return(a=aT(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Bk=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2},Jk.isNaN=function(){return!this.s},Jk.isNegative=Jk.isNeg=function(){return this.s<0},Jk.isPositive=Jk.isPos=function(){return this.s>0},Jk.isZero=function(){return!!this.d&&0===this.d[0]},Jk.lessThan=Jk.lt=function(t){return this.cmp(t)<0},Jk.lessThanOrEqualTo=Jk.lte=function(t){return this.cmp(t)<1},Jk.logarithm=Jk.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Bk=!1,a=fT(c,s=h+5),r=e?oT(l,s+10):fT(t,s),$k((u=eT(a,r,s,1)).d,i=h,d))do{if(a=fT(c,s+=10),r=e?oT(l,s+10):fT(t,s),u=eT(a,r,s,1),!o){+Xk(u.d).slice(i+1,i+15)+1==1e14&&(u=nT(u,h+1,0));break}}while($k(u.d,i+=10,d));return Bk=!0,nT(u,h,d)},Jk.minus=Jk.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return Bk?nT(t,s,u):t}if(n=Qk(t.e/7),l=Qk(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Gk|0,c[i]%=Gk;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=iT(c,r),Bk?nT(t,s,u):t},Jk.precision=Jk.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Rk+t);return n.d?(e=sT(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},Jk.round=function(){var t=this,e=t.constructor;return nT(new e(t),t.e+1,e.rounding)},Jk.sine=Jk.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:gT(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/vT(5,n)),e=gT(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(jk>2?n.neg():n,t,e,!0)):new r(NaN)},Jk.squareRoot=Jk.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Bk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Xk(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Qk((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(eT(a,o,n+2,1)).times(.5),Xk(o.d).slice(0,n)===(e=Xk(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(nT(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(nT(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Bk=!0,nT(r,u,l.rounding,t)},Jk.tangent=Jk.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=eT(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,nT(2==jk||4==jk?n.neg():n,t,e,!0)):new r(NaN)},Jk.times=Jk.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Qk(l.e/7)+Qk(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Gk|0,e=s/Gk|0;o[i]=(o[i]+e)%Gk|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=iT(o,n),Bk?nT(t,h.precision,h.rounding):t},Jk.toBinary=function(t,e){return bT(this,2,t,e)},Jk.toDecimalPlaces=Jk.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Kk(t,0,1e9),void 0===e?e=r.rounding:Kk(e,0,8),nT(n,t+n.e+1,e))},Jk.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,!0):(Kk(t,0,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=rT(i):(Kk(t,0,1e9),void 0===e?e=o.rounding:Kk(e,0,8),n=rT(r=nT(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Jk.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,y=f.constructor;if(!p)return new y(f);if(c=n=new y(1),r=u=new y(0),a=(o=(e=new y(r)).e=sT(p)-f.e-1)%7,e.d[0]=Yk(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new y(t)).isInt()||s.lt(c))throw Error(Rk+s);t=s.gt(e)?o>0?e:c:s}for(Bk=!1,s=new y(Xk(p)),l=y.precision,y.precision=o=7*p.length*2;h=eT(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=eT(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=eT(c,r,o,1).minus(f).abs().cmp(eT(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],y.precision=l,Bk=!0,d},Jk.toHexadecimal=Jk.toHex=function(t,e){return bT(this,16,t,e)},Jk.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Kk(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(Bk=!1,n=eT(n,t,0,e,1).times(t),Bk=!0,nT(n)):(t.s=n.s,n=t),n},Jk.toNumber=function(){return+this},Jk.toOctal=function(t,e){return bT(this,8,t,e)},Jk.toPower=Jk.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(Yk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return nT(s,r,o);if((e=Qk(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=cT(u,s,n,r),t.s<0?new u(1).div(i):nT(i,r,o);if((a=s.s)<0){if(eu.maxE+1||e0?a/0:0):(Bk=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=dT(t.times(fT(s,r+n)),r)).d&&$k((i=nT(i,r+5,1)).d,r,o)&&(e=r+10,+Xk((i=nT(dT(t.times(fT(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=nT(i,r+1,0))),i.s=a,Bk=!0,u.rounding=o,nT(i,r,o))},Jk.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Kk(t,1,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toSignificantDigits=Jk.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Kk(t,1,1e9),void 0===e?e=n.rounding:Kk(e,0,8)),nT(new n(this),t,e)},Jk.toString=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},Jk.truncated=Jk.trunc=function(){return nT(new this.constructor(this),this.e+1,1)},Jk.valueOf=Jk.toJSON=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var eT=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,y,m,g,v,w,b,M,A,N,I,E,x,k,T,L=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new L(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Gk,f=7,l=Qk(r.e/f)-Qk(i.e/f)),k=C.length,E=j.length,v=(g=new L(S)).d=[],h=0;C[h]==(j[h]||0);h++);if(C[h]>(j[h]||0)&&l--,null==o?(A=o=L.precision,a=L.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),p=!0;else{if(A=A/f+2|0,h=0,1==k){for(d=0,C=C[0],A++;(h1&&(C=t(C,d,u),j=t(j,d,u),k=C.length,E=j.length),I=k,b=(w=j.slice(0,k)).length;b=u/2&&++x;do{d=0,(c=e(C,w,k,b))<0?(M=w[0],k!=b&&(M=M*u+(w[1]||0)),(d=M/x|0)>1?(d>=u&&(d=u-1),1==(c=e(y=t(C,d,u),w,m=y.length,b=w.length))&&(d--,n(y,k=10;d/=10)h++;g.e=h+l*f-1,nT(g,s?o+g.e+1:o,a,p)}return g}}();function nT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/Yk(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Yk(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%Yk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Yk(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=Yk(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=Yk(10,7-o),h[d]=a>0?(l/Yk(10,i-a)%Yk(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Gk&&(h[0]=1));break}if(h[d]+=s,h[d]!=Gk)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return Bk&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+uT(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+uT(-i-1)+o,n&&(r=n-a)>0&&(o+=uT(r))):i>=a?(o+=uT(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+uT(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=uT(r))),o}function iT(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function oT(t,e,n){if(e>qk)throw Bk=!0,n&&(t.precision=n),Error("[DecimalError] Precision limit exceeded");return nT(new t(zk),e,1,!0)}function aT(t,e,n){if(e>Zk)throw Error("[DecimalError] Precision limit exceeded");return nT(new t(Pk),e,n,!0)}function sT(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function uT(t){for(var e="";t--;)e+="0";return e}function cT(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(Bk=!1;;){if(n%2&&MT((o=o.times(e)).d,a)&&(i=!0),0===(n=Qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}MT((e=e.times(e)).d,a)}return Bk=!0,o}function lT(t){return 1&t.d[t.d.length-1]}function hT(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Bk=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(Yk(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=nT(o.times(t),u,1),n=n.times(++l),Xk((s=a.plus(eT(o,n,u,1))).d).slice(0,u)===Xk(a.d).slice(0,u)){for(i=h;i--;)a=nT(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&$k(a.d,u-r,f,c)))return nT(a,d.precision=p,f,Bk=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function fT(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,y=p.d,m=p.constructor,g=m.rounding,v=m.precision;if(p.s<0||!y||!y[0]||!p.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=p.s?NaN:y?0:p);if(null==e?(Bk=!1,l=v):l=e,m.precision=l+=10,r=(n=Xk(y)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=oT(m,l+2,v).times(o+""),p=fT(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==e?nT(p,v,g,Bk=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Xk((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),h=p,u=a=p=eT(p.minus(1),p.plus(1),l,1),d=nT(p.times(p),l,1),i=3;;){if(a=nT(a.times(d),l,1),Xk((c=u.plus(eT(a,new m(i),l,1))).d).slice(0,l)===Xk(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(oT(m,l+2,v).times(o+""))),u=eT(u,new m(f),l,1),null!=e)return m.precision=v,u;if(!$k(u.d,l-10,g,s))return nT(u,m.precision=v,g,Bk=!0);m.precision=l+=10,c=a=p=eT(h.minus(1),h.plus(1),l,1),d=nT(p.times(p),l,1),i=s=1}u=c,i+=2}}function pT(t){return String(t.s*t.s/0)}function yT(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Hk.test(e))return yT(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Fk.test(e))n=16,e=e.toLowerCase();else if(Wk.test(e))n=2;else{if(!Vk.test(e))throw Error(Rk+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=cT(r,new r(n),o,2*o)),o=l=(c=tT(e,n,Gk)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=iT(c,l),t.d=c,Bk=!1,a&&(t=eT(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?Yk(2,u):uL.pow(2,u))),Bk=!0,t)}function gT(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(Bk=!1,u=n.times(n),s=new t(r);;){if(a=eT(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=eT(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Bk=!0,a.d.length=l+1,a}function vT(t,e){for(var n=t;--e;)n*=t;return n}function wT(t,e){var n,r=e.s<0,i=aT(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return jk=r?4:1,e;if((n=e.divToInt(i)).isZero())jk=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return jk=lT(n)?r?2:3:r?4:1,e;jk=lT(n)?r?1:4:r?3:2}return e.minus(i).abs()}function bT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Kk(n,1,1e9),void 0===r?r=f.rounding:Kk(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=rT(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=tT(rT(d),10,i),d.e=d.d.length),o=u=(h=tT(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=eT(t,d,n,r,0,i)).d,o=t.e,c=Sk),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=tT(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else oe)return t.length=e,!0}function AT(t){return new this(t).abs()}function NT(t){return new this(t).acos()}function IT(t){return new this(t).acosh()}function ET(t,e){return new this(t).plus(e)}function xT(t){return new this(t).asin()}function kT(t){return new this(t).asinh()}function TT(t){return new this(t).atan()}function LT(t){return new this(t).atanh()}function ST(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?aT(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=aT(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(eT(t,e,o,1)),e=aT(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(eT(t,e,o,1)):(n=aT(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function jT(t){return new this(t).cbrt()}function CT(t){return nT(t=new this(t),t.e+1,2)}function DT(t,e,n){return new this(t).clamp(e,n)}function OT(t){if(!t||"object"!=typeof t)throw Error("[DecimalError] Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Dk,0,"toExpPos",0,Dk,"maxE",0,Dk,"minE",-Dk,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2]))throw Error(Rk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=_k[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Rk+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[n]=!0}else this[n]=!1}return this}function zT(t){return new this(t).cos()}function PT(t){return new this(t).cosh()}function _T(t,e){return new this(t).div(e)}function BT(t){return new this(t).exp()}function RT(t){return nT(t=new this(t),t.e+1,3)}function UT(){var t,e,n=new this(0);for(Bk=!1,t=0;t=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function KT(t){return nT(t=new this(t),t.e+1,this.rounding)}function $T(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function tL(t){return new this(t).sin()}function eL(t){return new this(t).sinh()}function nL(t){return new this(t).sqrt()}function rL(t,e){return new this(t).sub(e)}function iL(){var t=0,e=arguments,n=new this(e[t]);for(Bk=!1;n.s&&++to.maxE?(i.e=NaN,i.d=null):t.e=10;n/=10)e++;return void(Bk?e>o.maxE?(i.e=NaN,i.d=null):en.call(e,...t))),e=void 0)}return n}zk=new uL(zk),Pk=new uL(Pk);class lL{constructor({blockchain:t,tokenIn:e,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:h,approvalRequired:d,getApproval:f,getPrep:p,getTransaction:y}){this.blockchain=t,this.tokenIn=e,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=cL([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=cL([l,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=cL([c,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=cL([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=h,this.getPrep=p,this.getTransaction=y}}let hL=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];hL.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],hL.solana=["solana"];const dL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!hL.evm.includes(t.blockchain||e))return a;const s=await PN({blockchain:t.blockchain||e,method:"latestBlockNumber"});let u=[];for(var c=0;c<=2;c++)u.push(s-c);const l=await Promise.all(u.map((async i=>{let{amountIn:a}=await t.getAmounts({exchange:t,blockchain:e,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let h;if(l[0].gt(l[1])&&l[1].gt(l[2])){const t=l[0].sub(l[1]),e=l[1].sub(l[2]),n=t.add(e).div(2);if(h=l[0].add(n),h.gt(a))return h}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const t=l[0].sub(l[1]).abs(),e=l[1].sub(l[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=l[0].gt(l[1])&&l[0].gt(l[2])?l[0]:l[1].gt(l[2])&&l[1].gt(l[0])?l[1]:l[2],h=r.add(n),h.gt(a))return h}return a},fL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:h,amountOutInput:d,amountInMaxInput:f,amountOutMinInput:p})=>{if(p||d){if(hL.evm.includes(t.blockchain||e))s=u=await dL({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:s,amountOut:p||c});else if(hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=dL({exchange:t,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((t=>e.push(t))),o}}))),e.push(i[i.length-1]),s=u=(i=e)[0]}}else if((f||h)&&hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((t=>(e.unshift(t),t))),n}}))),e.push(i[0]),c=l=(i=e.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},pL=t=>t.match("0x")?am(t):t;let yL=async({amount:t,blockchain:e,address:n})=>await Ak.BigNumber({amount:t,blockchain:e,address:n}),mL=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await yL({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await yL({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await yL({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await yL({amount:a,blockchain:t,address:n})),u};class gL{constructor(...t){Object.assign(this,...t)}async route({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return e===n?Promise.resolve():(void 0===t&&(this.scope?t=this.scope:1===this.blockchains.length&&(t=this.blockchains[0])),(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===t&&null!=e.blockchains&&e.blockchains.length>1)throw"You need to provide a blockchain when calling route on an exchange that supports multiple blockchains!";if(void 0!==o&&void 0!==i)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==a&&void 0!==s)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==i&&void 0!==a)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==o&&void 0!==s)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:h,slippage:d})=>{if(n=pL(n),r=pL(r),[i,o,a,s].filter(Boolean).length>1)throw"You can only pass one: amountIn, amountOut, amountInMax or amountOutMin";if([i,o,a,s].filter(Boolean).length<1)throw"You need to pass exactly one: amountIn, amountOut, amountInMax or amountOutMin";return new Promise((async f=>{let{path:p,exchangePath:y,pools:m}=await u({blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===p||0==p.length)return f();let g,[v,w,b,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:e,blockchain:t,path:p,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(t){return f()}if([i,a,o,s].every((t=>null==t)))return f();if(d||e.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await fL({exchange:e,blockchain:t,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M}))}catch(t){return f()}const A=await new Ak({blockchain:t,address:n}).decimals(),N=await new Ak({blockchain:t,address:r}).decimals();f(new lL({blockchain:t,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:N,path:p,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:e,getPrep:async({account:o})=>await l({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await h({exchange:e,blockchain:t,pools:m,path:p,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await mL({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:t,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function vL(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const wL=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},bL=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(cN(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(cN(e.toString(),o)),ML=async({blockchain:t,exchange:e,path:n})=>{const r=wL({blockchain:t,exchange:e,path:n});if(!r||1===r.length)return!1;try{let i=await PN({blockchain:t,address:e[t].factory.address,method:"getPair",api:e[t].factory.api,cache:36e5,params:wL({blockchain:t,exchange:e,path:n})});if(!i||i==Hf[t].zero)return!1;let[o,a,s]=await Promise.all([PN({blockchain:t,address:i,method:"getReserves",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token0",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token1",api:e[t].pair.api,cache:36e5})]);if(r.includes(Hf[t].wrapped.address))return bL({min:1,token:Hf[t].wrapped.address,decimals:Hf[t].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((e=>Hf[t].stables.usd.includes(e)))){let e=n.find((e=>Hf[t].stables.usd.includes(e))),r=new Ak({blockchain:t,address:e}),i=await r.decimals();return bL({min:1e3,token:e,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(t){return console.log("e",t),!1}};let AL=({blockchain:t,exchange:e,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsOut",api:e[t].router.api,params:{amountIn:r,path:wL({blockchain:t,exchange:e,path:n})}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),NL=({blockchain:t,exchange:e,path:n,amountOut:r,block:i})=>new Promise((o=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsIn",api:e[t].router.api,params:{amountOut:r,path:wL({blockchain:t,exchange:e,path:n})},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var IL={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await ML({blockchain:t,exchange:e,path:[n,r]}))i=[n,r];else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[r,Hf[t].wrapped.address]}))i=[n,Hf[t].wrapped.address,r];else if(!Hf[t].stables.usd.includes(n)&&(await Promise.all(Hf[t].stables.usd.map((r=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[Hf[t].wrapped.address,r]})){let o=(await Promise.all(Hf[t].stables.usd.map((async r=>await ML({blockchain:t,exchange:e,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Hf[t].wrapped.address,r]}else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&!Hf[t].stables.usd.includes(r)&&(await Promise.all(Hf[t].stables.usd.map((n=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Hf[t].stables.usd.map((async n=>await ML({blockchain:t,exchange:e,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Hf[t].wrapped.address,o,r]}return vL([i,"optionalAccess",t=>t.length])&&i[0]==Hf[t].currency.address?i.splice(1,0,Hf[t].wrapped.address):vL([i,"optionalAccess",t=>t.length])&&i[i.length-1]==Hf[t].currency.address&&i.splice(i.length-1,0,Hf[t].wrapped.address),{path:i,exchangePath:wL({blockchain:t,exchange:e,path:i})}},pathExists:ML,getAmounts:async({blockchain:t,exchange:e,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===Hf[e].currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:wL({blockchain:e,exchange:t,path:n}),to:h,deadline:Math.round(Date.now()/1e3)+86400}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const EL={name:"honeyswap",label:"Honeyswap",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABQCAYAAADBTPF9AAAACXBIWXMAAAsTAAALEwEAmpwYAAALmklEQVR4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2jk4FKn0F1AErFV25vmbeZ2BvG1lcxHXA9ZZK+scZ8wJDdIVlccuYE3wfwLeBXDOw79NPcLbm+gR4DniirqZ6Y2eZerTJQdAMT8BewHgCMAnwY38dpbux251AHPvDG28Da4ANXQW7RiPxw0XkduCCbh1zjzdVtcuNYtvEnIx9n4LY3yksx46B6Y699+l9YG3KKI0Y1p631tfMa+ruxF7vUtEWhVaO/bT5gAOBYdgD40lgN/Zbth1IKLqtJ46kE43ETxKRO4Fje3uug2xTZSHow73dqrktKn009j06GBgFDOK7xa2NwJcpozTusZq/6Ot9yusPf8TWxIuKi7m0NSU3AZ1+mTML7AEeVtVFgVD55y7a7TV5s9VWR5RVeC3vod4NDfW7louIB5hM9pdnr1RldiDkW1ZW4d2ZZVsZk0+Tcp0SCJXH/VW+G1Q5Fng2S2beB87xV/lOD4R8b3WbO08oCAH3Egj53vVX+c5SOBPoNE6kl2wH5qnqsf4q3wqHynSNghJwL4Eq33Nq6XHADbT77FwvSQF/UdUp/ipfuFC/Yp3Xv4FdUVbhTZaN8a795rOmJ4DBIkym5zFFr6rqRYFQ+QNlFd7MI6xySEG+ge05dKovFgj5rgKmAi92k30Tyiy1dFogVN6nUPZ8Iy/2C3UCf5VvHTA9VpuYCVyEPdCQwn4rU8ALqvpIIFS+I3deOs//AZb84smmUsyHAAAAAElFTkSuQmCC",protocol:"uniswap_v2",slippage:!0,blockchains:["gnosis"],gnosis:{router:{address:"0x1C232F01118CB8B424793ae03F870aa7D0ac7f77",api:IL.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:IL.FACTORY},pair:{api:IL.PAIR}}};var xL=t=>new gL(Object.assign(EL,{scope:t,findPath:t=>IL.findPath({...t,exchange:EL}),pathExists:t=>IL.pathExists({...t,exchange:EL}),getAmounts:t=>IL.getAmounts({...t,exchange:EL}),getPrep:t=>IL.getPrep({...t,exchange:EL}),getTransaction:t=>IL.getTransaction({...t,exchange:EL})}));const kL="79226673515401279992447579055",TL=t=>-t;class LL{static priceToSqrtPriceX64(t,e,n){return r=t.mul(uL.pow(10,n-e)).sqrt(),new rf(r.mul(uL.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(t,e,n){return(r=t,new uL(r.toString()).mul(uL.pow(2,-64))).pow(2).mul(uL.pow(10,e-n));var r}static tickIndexToSqrtPriceX64(t){return new rf(t>0?function(t){let e;e=new rf(0!=(1&t)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&t)&&(e=SL(e.mul(new rf("79236085330515764027303304731")),96,256));0!=(4&t)&&(e=SL(e.mul(new rf("79244008939048815603706035061")),96,256));0!=(8&t)&&(e=SL(e.mul(new rf("79259858533276714757314932305")),96,256));0!=(16&t)&&(e=SL(e.mul(new rf("79291567232598584799939703904")),96,256));0!=(32&t)&&(e=SL(e.mul(new rf("79355022692464371645785046466")),96,256));0!=(64&t)&&(e=SL(e.mul(new rf("79482085999252804386437311141")),96,256));0!=(128&t)&&(e=SL(e.mul(new rf("79736823300114093921829183326")),96,256));0!=(256&t)&&(e=SL(e.mul(new rf("80248749790819932309965073892")),96,256));0!=(512&t)&&(e=SL(e.mul(new rf("81282483887344747381513967011")),96,256));0!=(1024&t)&&(e=SL(e.mul(new rf("83390072131320151908154831281")),96,256));0!=(2048&t)&&(e=SL(e.mul(new rf("87770609709833776024991924138")),96,256));0!=(4096&t)&&(e=SL(e.mul(new rf("97234110755111693312479820773")),96,256));0!=(8192&t)&&(e=SL(e.mul(new rf("119332217159966728226237229890")),96,256));0!=(16384&t)&&(e=SL(e.mul(new rf("179736315981702064433883588727")),96,256));0!=(32768&t)&&(e=SL(e.mul(new rf("407748233172238350107850275304")),96,256));0!=(65536&t)&&(e=SL(e.mul(new rf("2098478828474011932436660412517")),96,256));0!=(131072&t)&&(e=SL(e.mul(new rf("55581415166113811149459800483533")),96,256));0!=(262144&t)&&(e=SL(e.mul(new rf("38992368544603139932233054999993551")),96,256));return SL(e,32,256)}(t):function(t){let e,n=Math.abs(t);e=new rf(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(e=SL(e.mul(new rf("18444899583751176498")),64,256));0!=(4&n)&&(e=SL(e.mul(new rf("18443055278223354162")),64,256));0!=(8&n)&&(e=SL(e.mul(new rf("18439367220385604838")),64,256));0!=(16&n)&&(e=SL(e.mul(new rf("18431993317065449817")),64,256));0!=(32&n)&&(e=SL(e.mul(new rf("18417254355718160513")),64,256));0!=(64&n)&&(e=SL(e.mul(new rf("18387811781193591352")),64,256));0!=(128&n)&&(e=SL(e.mul(new rf("18329067761203520168")),64,256));0!=(256&n)&&(e=SL(e.mul(new rf("18212142134806087854")),64,256));0!=(512&n)&&(e=SL(e.mul(new rf("17980523815641551639")),64,256));0!=(1024&n)&&(e=SL(e.mul(new rf("17526086738831147013")),64,256));0!=(2048&n)&&(e=SL(e.mul(new rf("16651378430235024244")),64,256));0!=(4096&n)&&(e=SL(e.mul(new rf("15030750278693429944")),64,256));0!=(8192&n)&&(e=SL(e.mul(new rf("12247334978882834399")),64,256));0!=(16384&n)&&(e=SL(e.mul(new rf("8131365268884726200")),64,256));0!=(32768&n)&&(e=SL(e.mul(new rf("3584323654723342297")),64,256));0!=(65536&n)&&(e=SL(e.mul(new rf("696457651847595233")),64,256));0!=(131072&n)&&(e=SL(e.mul(new rf("26294789957452057")),64,256));0!=(262144&n)&&(e=SL(e.mul(new rf("37481735321082")),64,256));return e}(t))}static sqrtPriceX64ToTickIndex(t){if(t.gt(new rf(kL))||t.lt(new rf("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const e=t.bitLength()-1,n=function(t,e,n){let r=t.toTwos(n).shln(e);return r.imaskn(n+1),r.fromTwos(n)}(new rf(e-64),32,128);let r=new rf("8000000000000000","hex"),i=0,o=new rf(0),a=e>=64?t.shrn(e-63):t.shln(63-e);for(;r.gt(new rf(0))&&i<14;){a=a.mul(a);let t=a.shrn(127);a=a.shrn(63+t.toNumber()),o=o.add(r.mul(t)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new rf("59543866431248")),c=SL(u.sub(new rf("184467440737095516")),64,128).toNumber(),l=SL(u.add(new rf("15793534762490258745")),64,128).toNumber();if(c==l)return c;return LL.tickIndexToSqrtPriceX64(l).lte(t)?l:c}static tickIndexToPrice(t,e,n){return LL.sqrtPriceX64ToPrice(LL.tickIndexToSqrtPriceX64(t),e,n)}static priceToTickIndex(t,e,n){return LL.sqrtPriceX64ToTickIndex(LL.priceToSqrtPriceX64(t,e,n))}static priceToInitializableTickIndex(t,e,n,r){return((t,e)=>t-t%e)(LL.priceToTickIndex(t,e,n),r)}static invertPrice(t,e,n){const r=LL.priceToTickIndex(t,e,n),i=TL(r);return LL.tickIndexToPrice(i,n,e)}static invertSqrtPriceX64(t){const e=LL.sqrtPriceX64ToTickIndex(t),n=TL(e);return LL.tickIndexToSqrtPriceX64(n)}}function SL(t,e,n){let r=t.toTwos(n).shrn(e);return r.imaskn(n-e+1),r.fromTwos(n-e)}const jL=new rf(1e4),CL=new rf(1e6),DL=new rf(0),OL=new rf(1),zL=new rf(2),PL=zL.pow(new rf(64)).sub(OL);class _L extends rf{toBuffer(){const t=super.toArray().reverse(),e=buffer.Buffer.from(t);if(8===e.length)return e;assert__default.default(e.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){return assert__default.default(8===t.length,`Invalid buffer length: ${t.length}`),new _L([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(""),16)}}class BL{static mul(t,e,n){const r=t.mul(e);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!1,r)}static mulDivRoundUp(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!0,r)}static mulDivRoundUpIf(t,e,n,r,i){if(n.eq(DL))throw new Error("mulDiv denominator is zero");const o=this.mul(t,e,i),a=o.div(n);return r&&o.mod(n).gt(DL)?a.add(OL):a}static checked_mul_shift_right(t,e,n){return this.checked_mul_shift_right_round_up_if(t,e,!1,n)}static checked_mul_shift_right_round_up_if(t,e,n,r){if(t.eq(DL)||e.eq(DL))return DL;const i=this.mul(t,e,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new rf(2).pow(new rf(64)));const a=n&&o.and(PL).gt(DL);if(a&&o.eq(PL))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(OL):o}static isOverLimit(t,e){const n=zL.pow(new rf(e)).sub(OL);return t.gt(n)}static divRoundUp(t,e){return this.divRoundUpIf(t,e,!0)}static divRoundUpIf(t,e,n){if(e.eq(DL))throw new Error("divRoundUpIf - divide by zero");let r=t.div(e);return n&&t.mod(e).gt(DL)?r.add(OL):r}}const RL=(t,e,n)=>{const r=LL.tickIndexToSqrtPriceX64(t);return{nextTickPrice:r,nextSqrtPriceLimit:n?rf.max(e,r):rf.min(e,r)}},UL=(t,e)=>t.gt(e)?[e,t]:[t,e],QL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),h=r&&!l.eq(DL)?c.add(OL):c;if(h.gt(PL))throw new Error("Results larger than U64");return h},YL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i);return BL.checked_mul_shift_right_round_up_if(n,a,r,128)},WL=(t,e,n,r,i)=>r===i?((t,e,n,r)=>{if(n.eq(DL))return t;let i=BL.mul(t,n,256),o=BL.mul(e,t,256).shln(64);if(BL.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=e.shln(64);if(!r&&a.lte(i))throw new Error("getNextSqrtPriceFromARoundUp - Unable to divide currLiquidityX64 by product");let s=r?a.add(i):a.sub(i),u=BL.divRoundUp(o,s);if(u.lt(new rf("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new rf(kL)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(t,e,n,r):((t,e,n,r)=>{let i=n.shln(64),o=BL.divRoundUpIf(i,e,!r);return r?t.add(o):t.sub(o)})(t,e,n,r),FL=(t,e,n,r,i)=>i===r?QL(t,e,n,r):YL(t,e,n,r),VL=(t,e,n,r,i,o,a)=>{let s=FL(r,i,n,o,a),u=t;if(o){u=BL.mulDiv(t,CL.sub(new rf(e)),CL,128)}let c=u.gte(s)?i:WL(r,n,u,o,a),l=c.eq(i),h=((t,e,n,r,i)=>i===r?YL(t,e,n,!r):QL(t,e,n,!r))(r,c,n,o,a);l||(s=FL(r,c,n,o,a));let d,f=o?s:h,p=o?h:s;if(!o&&p.gt(t)&&(p=t),o&&!l)d=t.sub(f);else{const t=new rf(e);d=BL.mulDivRoundUp(f,t,CL.sub(t),128)}return{amountIn:f,amountOut:p,nextPrice:c,feeAmount:d}},HL=(t,e,n)=>n?e.sub(t):e.add(t),GL=(t,e,n,r,i)=>{let o=r,a=i,s=t;if(e>0){let t=((t,e)=>t.mul(new _L(e).div(jL)))(s,e);s=s.sub(t),o=o.add(r)}if(n.gt(DL)){const t=s.shln(64).div(n);a=a.add(t)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},qL=pf([hf("mint"),hf("vault"),hf("authority"),yf("emissionsPerSecondX64"),yf("growthGlobalX64")]),ZL=pf([vf("anchorDiscriminator"),hf("whirlpoolsConfig"),Kd(wf(),1,"whirlpoolBump"),mf("tickSpacing"),Kd(wf(),2,"tickSpacingSeed"),mf("feeRate"),mf("protocolFeeRate"),yf("liquidity"),yf("sqrtPrice"),uf("tickCurrentIndex"),vf("protocolFeeOwedA"),vf("protocolFeeOwedB"),hf("tokenMintA"),hf("tokenVaultA"),yf("feeGrowthGlobalA"),hf("tokenMintB"),hf("tokenVaultB"),yf("feeGrowthGlobalB"),vf("rewardLastUpdatedTimestamp"),Kd(qL,3,"rewardInfos")]),JL=pf([af("initialized"),sf("liquidityNet"),yf("liquidityGross"),yf("feeGrowthOutsideA"),yf("feeGrowthOutsideB"),Kd(yf(),3,"reward_growths_outside")]),XL=pf([vf("anchorDiscriminator"),uf("startTickIndex"),Kd(JL,88,"ticks"),hf("whirlpool")]),KL=(t,e,n)=>{const r=(Math.floor(t/e/88)+n)*e*88,i=88*e;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},$L=async({pool:t,freshWhirlpoolData:e,aToB:n})=>{const r=await(async({aToB:t,pool:e,tickSpacing:n,tickCurrentIndex:r})=>{const i=t?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=KL(r+i,n,o)}catch(t){return a}const u=(await Xs.findProgramAddress([nf.from("tick_array"),new Xs(e.toString()).toBuffer(),nf.from(s.toString())],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=t?o-1:o+1}return a})({aToB:n,pool:t,tickSpacing:e.tickSpacing,tickCurrentIndex:e.tickCurrentIndex});return await Promise.all(r.map((async(t,e)=>{let n;try{n=await PN({blockchain:"solana",address:t.toString(),api:XL,cache:10})}catch(t){}return{address:t,data:n}})))};class tS{static fromTickIndex(t,e){const n=Math.floor(Math.floor(t/e)/88);let r=Math.floor(t%(88*e)/e);return r<0&&(r=88+r),new tS(n,r,e)}constructor(t,e,n){if(e>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(e<0)throw new Error("Invalid offsetIndex - value is smaller than 0");if(n<0)throw new Error("Invalid tickSpacing - value is less than 0");this.arrayIndex=t,this.offsetIndex=e,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class eS{constructor(t,e,n){if(!t[0]||!t[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const e of t){if(!e||!e.data)break;this.sequence.push({address:e.address,data:e.data})}this.tickArrays=t,this.tickSpacing=e,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=tS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(t){const e=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,t+e)}getNumOfTouchedArrays(){return this.touchedArrays.filter((t=>!!t)).length}getTouchedArrays(t){let e=this.touchedArrays.reduce(((t,e,n)=>(e&&t.push(this.sequence[n].address),t)),[]);if(0===e.length)return[];const n=t-e.length;return n>0&&(e=e.concat(Array(n).fill(e[e.length-1]))),e}getTick(t){const e=tS.fromTickIndex(t,this.tickSpacing);if(!this.isArrayIndexInBounds(e,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(e.arrayIndex,this.aToB),r=this.sequence[n].data;if(this.touchedArrays[n]=!0,!r)throw new Error(`TickArray at index ${n} is not initialized.`);if(!this.checkIfIndexIsInTickArrayRange(r.startTickIndex,t))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[e.offsetIndex]}findNextInitializedTickIndex(t){const e=this.aToB?t:t+this.tickSpacing;let n=tS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(n,this.aToB))throw new Error(`Swap input value traversed too many arrays. Out of bounds at attempt to traverse tick index - ${n.toTickIndex()}.`);for(;this.isArrayIndexInBounds(n,this.aToB);){const t=this.getTick(n.toTickIndex());if(t.initialized)return{nextIndex:n.toTickIndex(),nextTickData:t};n=this.aToB?n.toPrevInitializableTickIndex():n.toNextInitializableTickIndex()}return{nextIndex:Math.max(Math.min(this.aToB?n.toTickIndex()+this.tickSpacing:n.toTickIndex()-1,443636),-443636),nextTickData:null}}getLocalArrayIndex(t,e){return e?this.startArrayIndex-t:t-this.startArrayIndex}isArrayIndexInBounds(t,e){const n=this.getLocalArrayIndex(t.arrayIndex,e),r=this.sequence.length;return n>=0&&n=t&&e{try{const n=await PN({blockchain:"solana",address:t.pubkey.toString(),api:ZL,cache:10}),s=n.tokenMintA.toString()===e,u=await $L({pool:t.pubkey,freshWhirlpoolData:n,aToB:s}),c=new eS(u,n.tickSpacing,s),l=new rf(s?"4295048016":kL),h=!(!r&&!i);return{price:(({tokenAmount:t,aToB:e,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=t,s=DL,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,h=DL;const d=n.feeRate,f=n.protocolFeeRate;let p=new _L(0),y=e?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(DL)&&!i.eq(u);){let{nextIndex:t}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=RL(t,i,e);const g=VL(a,d,c,u,m,o,e);h=h.add(g.feeAmount),o?(a=a.sub(g.amountIn),a=a.sub(g.feeAmount),s=s.add(g.amountOut)):(a=a.sub(g.amountOut),s=s.add(g.amountIn),s=s.add(g.feeAmount));let{nextProtocolFee:v,nextFeeGrowthGlobalInput:w}=GL(g.feeAmount,f,c,p,y);if(p=v,y=w,g.nextPrice.eq(n)){const n=r.getTick(t);n.initialized&&(c=HL(n.liquidityNet,c,e)),l=e?t-1:t}else l=LL.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new rf((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:h}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(t){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let rS=async(t,e)=>await PN("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:ZL.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:t}},{memcmp:{offset:181,bytes:e}}]},api:ZL,cache:86400,cacheKey:["whirlpool",t.toString(),e.toString()].join("-")}),iS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await rS(t,e);return 0===a.length&&(a=await rS(e,t)),a=a.filter((t=>t.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await nS({account:a,tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});return void 0!==s&&{pubkey:a.pubkey,price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l,data:{tokenVaultA:a.data.tokenVaultA,tokenVaultB:a.data.tokenVaultB}}})))).filter(Boolean),a}catch(t){return[]}},oS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await iS({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(t=>t.reduce(((t,e)=>Fp.from(e.price).gt(Fp.from(t.price))?e:t)))(a):(t=>t.reduce(((t,e)=>Fp.from(e.price).lt(Fp.from(t.price))?e:t)))(a),s};function aS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const sS=Hf.solana;let uS=({path:t})=>{if(!t)return;let e=t.map(((e,n)=>e===sS.currency.address&&t[n+1]!=sS.wrapped.address&&t[n-1]!=sS.wrapped.address?sS.wrapped.address:e));return e[0]==sS.currency.address&&e[1]==sS.wrapped.address?e.splice(0,1):e[e.length-1]==sS.currency.address&&e[e.length-2]==sS.wrapped.address&&e.splice(e.length-1,1),e},cS=async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=t.length&&(t=uS({path:t}),(await iS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),lS=async({path:t,amountIn:e,amountInMax:n})=>{let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[2],amountIn:e?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==t.length)return r},hS=async({path:t,amountOut:e,amountOutMin:n})=>{t=t.slice().reverse();let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[0],amountOut:e,amountOutMin:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[2],tokenOut:t[1],amountOut:e?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==t.length)return r.slice().reverse()};const dS=Hf.solana,fS=new rf("14449647541112719096"),pS=new rf("16635068063392030915"),yS=async({instructions:t,owner:e,token:n,account:r})=>{let i;try{i=!!await PN({blockchain:"solana",address:r.toString()})}catch(t){}i||t.push(await Ak.solana.createAssociatedTokenAccountInstruction({token:n,owner:e,payer:e}))},mS=async({account:t,poolOne:e,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:h,tokenVaultTwoB:d})=>{let f=!1;const p=n.map(((t,e)=>!1!==f?n[f]:t.data?t:(f=e-1,n[e-1])));let y=!1;const m=u.map(((t,e)=>!1!==y?u[y]:t.data?t:(y=e-1,u[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(h.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(d.toString()),isWritable:!0,isSigner:!1},{pubkey:p[0].address,isWritable:!0,isSigner:!1},{pubkey:p[1].address,isWritable:!0,isSigner:!1},{pubkey:p[2].address,isWritable:!0,isSigner:!1},{pubkey:m[0].address,isWritable:!0,isSigner:!1},{pubkey:m[1].address,isWritable:!0,isSigner:!1},{pubkey:m[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(s.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},gS=({amount:t,otherAmountThreshold:e,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]),u=nf.alloc(s.span),s.encode({anchorDiscriminator:pS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},vS=async({account:t,pool:e,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((t,e)=>!1!==s?a[s]:t.data?t:(s=e-1,a[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:u[0].address,isWritable:!0,isSigner:!1},{pubkey:u[1].address,isWritable:!0,isSigner:!1},{pubkey:u[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},wS=({amount:t,otherAmountThreshold:e,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]),a=nf.alloc(o.span),o.encode({anchorDiscriminator:fS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var bS={findPath:async({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([t,e].includes(sS.currency.address)&&[t,e].includes(sS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[t,e]:t!=sS.wrapped.address&&t!=sS.currency.address&&await cS({path:[t,sS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&e!=sS.wrapped.address&&e!=sS.currency.address&&await cS({path:[e,sS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[t,sS.wrapped.address,e]:!sS.stables.usd.includes(t)&&(s=(await Promise.all(sS.stables.usd.map((async e=>await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?e:void 0)))).filter(Boolean))&&!sS.stables.usd.includes(e)&&(u=(await Promise.all(sS.stables.usd.map((async t=>await cS({path:[e,t],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?t:void 0)))).filter(Boolean))&&(c=s.filter((t=>u.includes(t)))[0])&&(a=[t,c,e]),aS([a,"optionalAccess",t=>t.length])&&a[0]==sS.currency.address?a.splice(1,0,sS.wrapped.address):aS([a,"optionalAccess",t=>t.length])&&a[a.length-1]==sS.currency.address&&a.splice(a.length-1,0,sS.wrapped.address),{path:a,exchangePath:uS({path:a})}},pathExists:cS,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uS({path:t}),r){if(s=await hS({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await lS({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await hS({path:t,amountOutMin:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await lS({path:t,amountInMax:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let h={blockchain:"solana"},d=[];const f=uS({path:t});if(f.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const p=f[0],y=3==f.length?f[1]:void 0,m=f[f.length-1];let g;2==f.length?g=[await oS({tokenIn:p,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await oS({tokenIn:p,tokenOut:y,amountIn:a||u})],g.push(await oS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await oS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await oS({tokenIn:p,tokenOut:y,amountOut:g[0].price})));let v,w=t[0]===dS.currency.address&&f[0]===dS.wrapped.address,b=t[t.length-1]===dS.currency.address&&f[f.length-1]===dS.wrapped.address;const M=await LN("solana");if(w||b){const t=await M.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span),n=Zl.generate();v=n.publicKey.toString();const r=w?new rf(e.toString()).add(new rf(t)):new rf(t);let i=Wu.createAccount({fromPubkey:new Xs(l),newAccountPubkey:new Xs(v),programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],d.push(i),d.push(Ak.solana.initializeAccountInstruction({account:v,token:dS.wrapped.address,owner:l}))}if(1===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:h}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await vS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:h,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?h:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:wS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:t,aToB:g[0].aToB})}))}else if(2===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=f[1],y=new Xs(await Ak.solana.findProgramAddress({owner:l,token:h}));await yS({instructions:d,owner:l,token:h,account:y});let M=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:M}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await mS({account:l,poolOne:g[0].pubkey,tickArraysOne:g[0].tickArrays,tokenAccountOneA:g[0].aToB?u:y,tokenVaultOneA:g[0].data.tokenVaultA,tokenAccountOneB:g[0].aToB?y:u,tokenVaultOneB:g[0].data.tokenVaultB,poolTwo:g[1].pubkey,tickArraysTwo:g[1].tickArrays,tokenAccountTwoA:g[1].aToB?y:M,tokenVaultTwoA:g[1].data.tokenVaultA,tokenAccountTwoB:g[1].aToB?M:y,tokenVaultTwoB:g[1].data.tokenVaultB}),data:gS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:t,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(w||b)&&d.push(Ak.solana.closeAccountInstruction({account:v,owner:l})),h.instructions=d,h},WHIRLPOOL_LAYOUT:ZL};const MS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImthdG1hbl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvM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ca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:bS.WHIRLPOOL_LAYOUT}}};var AS=t=>new gL(Object.assign(MS,{scope:t,findPath:t=>bS.findPath({...t,exchange:MS}),pathExists:t=>bS.pathExists({...t,exchange:MS}),getAmounts:t=>bS.getAmounts({...t,exchange:MS}),getPrep:t=>{},getTransaction:t=>bS.getTransaction({...t,exchange:MS})}));const NS={name:"pancakeswap",label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yMzg1QzI5LjgzNTkgNzYuNzEzMiAzOC41MzYzIDcxLjg5MzYgNDQuNTk0NSA2OS4xMjEzQzQzLjIyNDUgNjQuOTU5NCA0MS41MTUzIDU5LjUxMDggMzkuOTg2MSA1My44ODMyQzM3LjkzOTkgNDYuMzUyNyAzNS45MzI1IDM3LjUxNzQgMzUuOTMyNSAzMS4wNDI5QzM1LjkzMjUgMjMuMzc5NSAzNy42MjA0IDE1LjY4MzMgNDIuMTcxNCA5LjcwMzA2QzQ2Ljk3OTcgMy4zODQ3NiA1NC4yMTgyIDAgNjIuOTI2NCAwQzY5LjczMjIgMCA3NS41MTAzIDIuNDk5MDMgODAuMDMzOSA2LjgxMDExQzg0LjM1NzkgMTAuOT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MzYyIDk4LjY5MzEgMTg5LjM2MkMxNTUuMzEzIDE4OS4zNjIgMTg2LjAxOCAxNjIuNTAzIDE4Ni4wMTggMTI2Ljg3MUMxODYuMDE4IDEyNi44MjYgMTg2LjAxOCAxMjYuNzgxIDE4Ni4wMTggMTI2LjczN0MxODUuOTQ2IDE1NS41MiAxNDAuMjMxIDE3Ny43NTUgOTguNjkzMSAxNzcuNzU1WiIgZmlsbD0iI0ZFREM5MCIvPgo8cGF0aCBkPSJNNzUuNjEzNSAxMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["bsc"],bsc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:IL.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:IL.FACTORY},pair:{api:IL.PAIR}}};var IS=t=>new gL(Object.assign(NS,{scope:t,findPath:t=>IL.findPath({...t,exchange:NS}),pathExists:t=>IL.pathExists({...t,exchange:NS}),getAmounts:t=>IL.getAmounts({...t,exchange:NS}),getPrep:t=>IL.getPrep({...t,exchange:NS}),getTransaction:t=>IL.getTransaction({...t,exchange:NS})}));function ES(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const xS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},kS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=xS({blockchain:t,exchange:e,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let TS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,LS=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var SS={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await kS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return ES([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):ES([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:xS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await kS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Hf[e].currency.address)return;let a;a=o===Hf[e].currency.address?t[e].smartRouter.address:t[e].router.address;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[a,Hf[e].maxInt]}}}},getTransaction:async({blockchain:t,exchange:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d,inputTokenPushed:f})=>{const p={blockchain:t,from:d},y=Math.floor(Date.now()/1e3)+21600,m=xS({blockchain:t,exchange:e,path:r});if(r[r.length-1]===Hf[t].currency.address){p.to=e[t].smartRouter.address,p.api=e[t].smartRouter.api,p.method="multicall";const r=new Og(e[t].smartRouter.api);if(p.params={data:[]},2===m.length)u||h?p.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}]));else{const d=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?p.params.data.push(r.encodeFunctionData("exactInput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}p.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),d]))}else if(p.to=e[t].router.address,p.api=e[t].router.api,r[0]===Hf[t].currency.address&&(p.value=(i||o).toString()),2===m.length)u||h?(p.method="exactInputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}}):(c||l)&&(p.method="exactOutputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}});else{const t=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?(p.method="exactInput",p.params={params:{path:t,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(p.method="exactOutput",p.params={params:{path:t,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return p},ROUTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct ISwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct ISwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],SMART_ROUTER:[{inputs:[{internalType:"address",name:"_factoryV2",type:"address"},{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factoryV3",type:"address"},{internalType:"address",name:"_positionManager",type:"address"},{internalType:"address",name:"_stableFactory",type:"address"},{internalType:"address",name:"_stableInfo",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"factory",type:"address"},{indexed:!0,internalType:"address",name:"info",type:"address"}],name:"SetStableSwap",type:"event"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"}],name:"callPositionManager",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"paths",type:"bytes[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactInputStableSwap",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactOutputStableSwap",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factoryV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"getApprovalType",outputs:[{internalType:"enum IApproveAndCall.ApprovalType",name:"",type:"uint8"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"}],internalType:"struct IApproveAndCall.IncreaseLiquidityParams",name:"params",type:"tuple"}],name:"increaseLiquidity",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],internalType:"struct IApproveAndCall.MintParams",name:"params",type:"tuple"}],name:"mint",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"previousBlockhash",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"positionManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"pull",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_info",type:"address"}],name:"setStableSwap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stableSwapFactory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"stableSwapInfo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"wrapETH",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_poolDeployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"bool",name:"whitelistRequested",type:"bool"},{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"FeeAmountExtraInfoUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"lmPoolDeployer",type:"address"}],name:"SetLmPoolDeployer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"verified",type:"bool"}],name:"WhiteListAdded",type:"event"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacingExtraInfo",outputs:[{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPoolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"poolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],name:"setFeeAmountExtraInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPoolDeployer",type:"address"}],name:"setLmPoolDeployer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"verified",type:"bool"}],name:"setWhiteListAddress",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint32",name:"feeProtocol0Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol0New",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1New",type:"uint32"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"addr",type:"address"}],name:"SetLmPoolEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken1",type:"uint128"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPool",outputs:[{internalType:"contract IPancakeV3LmPool",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint32",name:"feeProtocol",type:"uint32"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]};const jS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yMzg1QzI5LjgzNTkgNzYuNzEzMiAzOC41MzYzIDcxLjg5MzYgNDQuNTk0NSA2OS4xMjEzQzQzLjIyNDUgNjQuOTU5NCA0MS41MTUzIDU5LjUxMDggMzkuOTg2MSA1My44ODMyQzM3LjkzOTkgNDYuMzUyNyAzNS45MzI1IDM3LjUxNzQgMzUuOTMyNSAzMS4wNDI5QzM1LjkzMjUgMjMuMzc5NSAzNy42MjA0IDE1LjY4MzMgNDIuMTcxNCA5LjcwMzA2QzQ2Ljk3OTcgMy4zODQ3NiA1NC4yMTgyIDAgNjIuOTI2NCAwQzY5LjczMjIgMCA3NS41MTAzIDIuNDk5MDMgODAuMDMzOSA2LjgxMDExQzg0LjM1NzkgMTAuOTMwOSA4Ny4yMzU3IDE2LjQwMzQgODkuMjIyNyAyMi4xMDgyQzkyLjcxNDMgMzIuMTMyNSA5NC4wNzM4IDQ0LjcyNjQgOTQuNDU1MSA1Ny4yOTQ1S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2LjAxOCAxMjYuNzgxIDE4Ni4wMTggMTI2LjczN0MxODUuOTQ2IDE1NS41MiAxNDAuMjMxIDE3Ny43NTUgOTguNjkzMSAxNzcuNzU1WiIgZmlsbD0iI0ZFREM5MCIvPgo8cGF0aCBkPSJNNzUuNjEzNSAxMTcuODk2Qzc1LjYxMzUgMTI3LjYxNCA3MS4wMjEgMTMyLjY3NSA2NS4zNTU4IDEzMi42NzVDNTkuNjkwNyAxMzIuNjc1IDU1LjA5ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:SS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:SS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:SS.FACTORY},pair:{api:SS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:SS.QUOTER}}};var CS=t=>new gL(Object.assign(jS,{scope:t,findPath:t=>SS.findPath({...t,exchange:jS}),pathExists:t=>SS.pathExists({...t,exchange:jS}),getAmounts:t=>SS.getAmounts({...t,exchange:jS}),getPrep:t=>SS.getPrep({...t,exchange:jS}),getTransaction:t=>SS.getTransaction({...t,exchange:jS})}));const DS={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD0iNzUwIiBoZWlnaHQ9Ijc1MCIgZmlsbD0ibm9uZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj48cGF0aCBkPSJNMzU0Ljc0LDI0LjM3YTM1MS4yNywzNTEuMjcsMCwwLDEsMzYzLjc0LDI3NywzNTQsMzU0LDAsMCwxLDEuMjMsMTQxLjI2QTM1MS43NiwzNTEuNzYsMCwwLDEsNTEwLjEyLDY5OS4zYy03My43NywzMS0xNTguMjUsMzUuMzUtMjM0LjkxLDEyLjU0QTM1MiwzNTIsMCwwLDEsNDYuNTEsNDk5LjU2Yy0yOC03My40NS0zMC4xNi0xNTYuMzgtNi4yNC0yMzEuMjVBMzUwLjg4LDM1MC44OCwwLDAsMSwzNTQuNzQsMjQuMzciIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTE1OC44MSwzNDkuNThjMS4zOSw2LjQxLD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MS4zMS0uODgtMjItMy45NS0zMi42NC4zNC0yLjYxLDIuNzItMy44LDQuMTEtNS42Myw1LjM4LTcuMDcsOS4zNS0xNC42OSwxMS0yMy40NmEyNy40MywyNy40MywwLDAsMSwxLjIxLTMuNDMsMTExLDExMSwwLDAsMSw4LDIxLjE2YzIuNjMsMTAuMzEsNC4xMSwyMC44LDMuMzMsMzEuNGExMjMuMzEsMTIzLjMxLDAsMCwxLTE2LjA2LDUyLjMyYy05LjE2LDE2LjE1LTIxLDMwLTM0LjYsNDIuMzdhMTk5Ljg5LDE5OS44OSwwLDAsMS0zOS4zNywyNy41NCwyMTkuNSwyMTkuNSwwLDAsMS01NC4yNiwyMC43MSwyMDkuMjcsMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:IL.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:IL.FACTORY},pair:{api:IL.PAIR}}};var OS=t=>new gL(Object.assign(DS,{scope:t,findPath:t=>IL.findPath({...t,exchange:DS}),pathExists:t=>IL.pathExists({...t,exchange:DS}),getAmounts:t=>IL.getAmounts({...t,exchange:DS}),getPrep:t=>IL.getPrep({...t,exchange:DS}),getTransaction:t=>IL.getTransaction({...t,exchange:DS})}));const zS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmc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MS4zQzQ5MC43LDI2Ny4yLDQ4Ny41LDI2MS4zLDQ4My41LDI1Ni4xTDQ4My41LDI1Ni4xeiIvPgoJPHBhdGggZmlsbD0iI0ZGRTYwMCIgZD0iTTEzMy4zLDEzMS41YzYuNS0wLjcsMTUuNywxOS42LDE1LjcsMTkuNnMyMC45LTUuOSwyNC44LDBjMy4zLDUuOS0xNSwxOS42LTE1LDE5LjZzMTEuMSwxOS42LDcuMiwyMy41CgkJYy0zLjMsMy45LTIyLjgtOC41LTIyLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:IL.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:IL.FACTORY},pair:{api:IL.PAIR}}};var PS=t=>new gL(Object.assign(zS,{scope:t,findPath:t=>IL.findPath({...t,exchange:zS}),pathExists:t=>IL.pathExists({...t,exchange:zS}),getAmounts:t=>IL.getAmounts({...t,exchange:zS}),getPrep:t=>IL.getPrep({...t,exchange:zS}),getTransaction:t=>IL.getTransaction({...t,exchange:zS})}));function _S(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const BS=({blockchain:t,path:e})=>{if(!e)return;let n=e.map(((n,r)=>n===Hf[t].currency.address&&e[r+1]!=Hf[t].wrapped.address&&e[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:n));return n[0]==Hf[t].currency.address&&n[1]==Hf[t].wrapped.address?n.splice(0,1):n[n.length-1]==Hf[t].currency.address&&n[n.length-2]==Hf[t].wrapped.address&&n.splice(n.length-1,1),n},RS=async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=BS({blockchain:e,path:n}),a=r?await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((t=>"0"===t.toString())))return a};let US=async({exchange:t,blockchain:e,path:n,pools:r,amountIn:i})=>{let o=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,params:{route:BS({blockchain:e,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},QS=async({exchange:t,blockchain:e,path:n,pools:r,amountOut:i,block:o})=>{let a=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:BS({blockchain:e,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var YS={findPath:async({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[e].currency.address)&&[n,r].includes(Hf[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await RS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[e].wrapped.address||r==Hf[e].wrapped.address||(c=[],o||s?(c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Hf[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return _S([u,"optionalAccess",t=>t.length])&&u[0]==Hf[e].currency.address?u.splice(1,0,Hf[e].wrapped.address):_S([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[e].currency.address&&u.splice(u.length-1,0,Hf[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:BS({blockchain:e,path:u})}},pathExists:async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await RS({exchange:t,blockchain:e,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:t,blockchain:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getTransaction:async({exchange:t,blockchain:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d})=>{const f={blockchain:e,from:d,to:t[e].router.address,api:t[e].router.api},p=Math.round(Date.now()/1e3)+86400,y=[n.map((t=>t.binSteps[0])),n.map((t=>t.versions[0])),BS({blockchain:e,path:r})];return r[0]===Hf[e].currency.address?l?(f.method="swapNATIVEForExactTokens",f.params={amountOut:a,path:y,to:d,deadline:p},f.value=o):(f.method="swapExactNATIVEForTokens",f.params={amountOutMin:s||a,path:y,to:d,deadline:p},f.value=i):r[r.length-1]===Hf[e].currency.address?l?(f.method="swapTokensForExactNATIVE",f.params={amountNATIVEOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForNATIVE",f.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:d,deadline:p}):l?(f.method="swapTokensForExactTokens",f.params={amountOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForTokens",f.params={amountIn:i,amountOutMin:s||a,path:y,to:d,deadline:p}),f},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},ROUTER:[{inputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"},{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"},{internalType:"contract ILBLegacyFactory",name:"legacyFactory",type:"address"},{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"},{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[{internalType:"uint256",name:"amountSlippage",type:"uint256"}],name:"LBRouter__AmountSlippageBPTooBig",type:"error"},{inputs:[{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],name:"LBRouter__AmountSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__BinReserveOverflows",type:"error"},{inputs:[],name:"LBRouter__BrokenSwapSafetyCheck",type:"error"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"currentTimestamp",type:"uint256"}],name:"LBRouter__DeadlineExceeded",type:"error"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBRouter__FailedToSendNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"idDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"}],name:"LBRouter__IdDesiredOverflows",type:"error"},{inputs:[{internalType:"int256",name:"id",type:"int256"}],name:"LBRouter__IdOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"uint256",name:"activeId",type:"uint256"}],name:"LBRouter__IdSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"LBRouter__InsufficientAmountOut",type:"error"},{inputs:[{internalType:"address",name:"wrongToken",type:"address"}],name:"LBRouter__InvalidTokenPath",type:"error"},{inputs:[{internalType:"uint256",name:"version",type:"uint256"}],name:"LBRouter__InvalidVersion",type:"error"},{inputs:[],name:"LBRouter__LengthsMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"LBRouter__MaxAmountInExceeded",type:"error"},{inputs:[],name:"LBRouter__NotFactoryOwner",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBRouter__PairNotCreated",type:"error"},{inputs:[],name:"LBRouter__SenderIsNotWNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__SwapOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"excess",type:"uint256"}],name:"LBRouter__TooMuchTokensIn",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"reserve",type:"uint256"}],name:"LBRouter__WrongAmounts",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"LBRouter__WrongNativeLiquidityParameters",type:"error"},{inputs:[],name:"LBRouter__WrongTokenOrder",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"lbFactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactory",outputs:[{internalType:"contract ILBLegacyFactory",name:"legacyLBfactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouter",outputs:[{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getV1Factory",outputs:[{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWNATIVE",outputs:[{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountNATIVEMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountNATIVE",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVE",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVESupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNATIVEForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountNATIVEOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactNATIVE",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"sweep",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBToken",name:"lbToken",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"sweepLBToken",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"feeRecipient",type:"address"},{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"LBFactory__AddressZero",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepHasNoPreset",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepTooLow",type:"error"},{inputs:[{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"uint256",name:"maxFees",type:"uint256"}],name:"LBFactory__FlashLoanFeeAboveMax",type:"error"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"LBFactory__IdenticalAddresses",type:"error"},{inputs:[],name:"LBFactory__ImplementationNotSet",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"_binStep",type:"uint256"}],name:"LBFactory__LBPairAlreadyExists",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairDoesNotExist",type:"error"},{inputs:[],name:"LBFactory__LBPairIgnoredIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairNotCreated",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__LBPairSafetyCheckFailed",type:"error"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__PresetIsLockedForUsers",type:"error"},{inputs:[],name:"LBFactory__PresetOpenStateIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetAlreadyWhitelisted",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetNotWhitelisted",type:"error"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"LBFactory__SameFeeRecipient",type:"error"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"LBFactory__SameFlashLoanFee",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__SameImplementation",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"PendingOwnable__AddressZero",type:"error"},{inputs:[],name:"PendingOwnable__NoPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__PendingOwnerAlreadySet",type:"error"},{inputs:[],name:"SafeCast__Exceeds16Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldRecipient",type:"address"},{indexed:!1,internalType:"address",name:"newRecipient",type:"address"}],name:"FeeRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldFlashLoanFee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newFlashLoanFee",type:"uint256"}],name:"FlashLoanFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"tokenX",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenY",type:"address"},{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"uint256",name:"pid",type:"uint256"}],name:"LBPairCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"bool",name:"ignored",type:"bool"}],name:"LBPairIgnoredStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldLBPairImplementation",type:"address"},{indexed:!1,internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBPairImplementationSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"PendingOwnerSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!0,internalType:"bool",name:"isOpen",type:"bool"}],name:"PresetOpenStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"}],name:"PresetRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"filterPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"decayPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"reductionFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"variableFeeControl",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolShare",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"}],name:"PresetSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetRemoved",type:"event"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"addQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"becomeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllBinSteps",outputs:[{internalType:"uint256[]",name:"binStepWithPreset",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"}],name:"getAllLBPairs",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation[]",name:"lbPairsAvailable",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeRecipient",outputs:[{internalType:"address",name:"feeRecipient",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFlashLoanFee",outputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getLBPairAtIndex",outputs:[{internalType:"contract ILBPair",name:"lbPair",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLBPairImplementation",outputs:[{internalType:"address",name:"lbPairImplementation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenA",type:"address"},{internalType:"contract IERC20",name:"tokenB",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getLBPairInformation",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation",name:"lbPairInformation",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxFlashLoanFee",outputs:[{internalType:"uint256",name:"maxFee",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMinBinStep",outputs:[{internalType:"uint256",name:"minBinStep",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNumberOfLBPairs",outputs:[{internalType:"uint256",name:"lbPairNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfQuoteAssets",outputs:[{internalType:"uint256",name:"numberOfQuoteAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOpenBinSteps",outputs:[{internalType:"uint256[]",name:"openBinStep",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getPreset",outputs:[{internalType:"uint256",name:"baseFactor",type:"uint256"},{internalType:"uint256",name:"filterPeriod",type:"uint256"},{internalType:"uint256",name:"decayPeriod",type:"uint256"},{internalType:"uint256",name:"reductionFactor",type:"uint256"},{internalType:"uint256",name:"variableFeeControl",type:"uint256"},{internalType:"uint256",name:"protocolShare",type:"uint256"},{internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"},{internalType:"bool",name:"isOpen",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getQuoteAssetAtIndex",outputs:[{internalType:"contract IERC20",name:"asset",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isQuoteAsset",outputs:[{internalType:"bool",name:"isQuote",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"}],name:"removePreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"removeQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revokePendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"setFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setFeesParametersOnPair",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"setFlashLoanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"ignored",type:"bool"}],name:"setLBPairIgnored",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newLBPairImplementation",type:"address"}],name:"setLBPairImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner_",type:"address"}],name:"setPendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPresetOpenState",outputs:[],stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[{internalType:"contract ILBFactory",name:"factory_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"BinHelper__CompositionFactorFlawed",type:"error"},{inputs:[],name:"BinHelper__LiquidityOverflow",type:"error"},{inputs:[],name:"FeeHelper__FeeTooLarge",type:"error"},{inputs:[],name:"LBPair__AddressZero",type:"error"},{inputs:[],name:"LBPair__AlreadyInitialized",type:"error"},{inputs:[],name:"LBPair__EmptyMarketConfigs",type:"error"},{inputs:[],name:"LBPair__FlashLoanCallbackFailed",type:"error"},{inputs:[],name:"LBPair__FlashLoanInsufficientAmount",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountIn",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountOut",type:"error"},{inputs:[],name:"LBPair__InvalidInput",type:"error"},{inputs:[],name:"LBPair__InvalidStaticFeeParameters",type:"error"},{inputs:[],name:"LBPair__MaxTotalFeeExceeded",type:"error"},{inputs:[],name:"LBPair__OnlyFactory",type:"error"},{inputs:[],name:"LBPair__OnlyProtocolFeeRecipient",type:"error"},{inputs:[],name:"LBPair__OutOfLiquidity",type:"error"},{inputs:[],name:"LBPair__TokenNotSupported",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmountsOut",type:"error"},{inputs:[],name:"LBPair__ZeroBorrowAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroShares",type:"error"},{inputs:[],name:"LBToken__AddressThisOrZero",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__BurnExceedsBalance",type:"error"},{inputs:[],name:"LBToken__InvalidLength",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"LBToken__SelfApproval",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"LBToken__SpenderNotApproved",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__TransferExceedsBalance",type:"error"},{inputs:[],name:"LiquidityConfigurations__InvalidConfig",type:"error"},{inputs:[],name:"OracleHelper__InvalidOracleId",type:"error"},{inputs:[],name:"OracleHelper__LookUpTimestampTooOld",type:"error"},{inputs:[],name:"OracleHelper__NewLengthTooSmall",type:"error"},{inputs:[],name:"PackedUint128Math__AddOverflow",type:"error"},{inputs:[],name:"PackedUint128Math__MultiplierTooLarge",type:"error"},{inputs:[],name:"PackedUint128Math__SubUnderflow",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"ReentrancyGuard__ReentrantCall",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds40Bits",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[],name:"Uint128x128Math__LogUnderflow",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"feeRecipient",type:"address"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CollectedProtocolFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CompositionFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"DepositedToBins",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{indexed:!1,internalType:"uint24",name:"activeId",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amounts",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"idReference",type:"uint24"},{indexed:!1,internalType:"uint24",name:"volatilityReference",type:"uint24"}],name:"ForcedDecay",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"oracleLength",type:"uint16"}],name:"OracleLengthIncreased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"baseFactor",type:"uint16"},{indexed:!1,internalType:"uint16",name:"filterPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"decayPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"reductionFactor",type:"uint16"},{indexed:!1,internalType:"uint24",name:"variableFeeControl",type:"uint24"},{indexed:!1,internalType:"uint16",name:"protocolShare",type:"uint16"},{indexed:!1,internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"StaticFeeParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amountsIn",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"amountsOut",type:"bytes32"},{indexed:!1,internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"WithdrawnFromBins",type:"event"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"approveForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"batchBalances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"batchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amountsToBurn",type:"uint256[]"}],name:"burn",outputs:[{internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectProtocolFees",outputs:[{internalType:"bytes32",name:"collectedProtocolFees",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{internalType:"bytes32",name:"amounts",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getActiveId",outputs:[{internalType:"uint24",name:"activeId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getBin",outputs:[{internalType:"uint128",name:"binReserveX",type:"uint128"},{internalType:"uint128",name:"binReserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBinStep",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"id",type:"uint24"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getNextNonEmptyBin",outputs:[{internalType:"uint24",name:"nextId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleParameters",outputs:[{internalType:"uint8",name:"sampleLifetime",type:"uint8"},{internalType:"uint16",name:"size",type:"uint16"},{internalType:"uint16",name:"activeSize",type:"uint16"},{internalType:"uint40",name:"lastUpdated",type:"uint40"},{internalType:"uint40",name:"firstTimestamp",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint40",name:"lookupTimestamp",type:"uint40"}],name:"getOracleSampleAt",outputs:[{internalType:"uint64",name:"cumulativeId",type:"uint64"},{internalType:"uint64",name:"cumulativeVolatility",type:"uint64"},{internalType:"uint64",name:"cumulativeBinCrossed",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getProtocolFees",outputs:[{internalType:"uint128",name:"protocolFeeX",type:"uint128"},{internalType:"uint128",name:"protocolFeeY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReserves",outputs:[{internalType:"uint128",name:"reserveX",type:"uint128"},{internalType:"uint128",name:"reserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStaticFeeParameters",outputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenX",outputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getTokenY",outputs:[{internalType:"contract IERC20",name:"tokenY",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVariableFeeParameters",outputs:[{internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"volatilityReference",type:"uint24"},{internalType:"uint24",name:"idReference",type:"uint24"},{internalType:"uint40",name:"timeOfLastUpdate",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"newLength",type:"uint16"}],name:"increaseOracleLength",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"activeId",type:"uint24"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes32[]",name:"liquidityConfigs",type:"bytes32[]"},{internalType:"address",name:"refundTo",type:"address"}],name:"mint",outputs:[{internalType:"bytes32",name:"amountsReceived",type:"bytes32"},{internalType:"bytes32",name:"amountsLeft",type:"bytes32"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setStaticFeeParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"address",name:"to",type:"address"}],name:"swap",outputs:[{internalType:"bytes32",name:"amountsOut",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"factoryV1",type:"address"},{internalType:"address",name:"legacyFactoryV2",type:"address"},{internalType:"address",name:"factoryV2",type:"address"},{internalType:"address",name:"legacyRouterV2",type:"address"},{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"JoeLibrary__AddressZero",type:"error"},{inputs:[],name:"JoeLibrary__IdenticalAddresses",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[],name:"LBQuoter_InvalidLength",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountIn",type:"uint128"}],name:"findBestPathFromAmountIn",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountOut",type:"uint128"}],name:"findBestPathFromAmountOut",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV1",outputs:[{internalType:"address",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV2",outputs:[{internalType:"address",name:"factoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactoryV2",outputs:[{internalType:"address",name:"legacyFactoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouterV2",outputs:[{internalType:"address",name:"legacyRouterV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRouterV2",outputs:[{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"view",type:"function"}]};const WS={name:"trader_joe_v2_1",label:"Trader Joe v2.1",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABvCAYAAAA0YEQFAAABAGlDQ1BpY2MAABiVY2BgPMEABCwGDAy5eSVFQe5OChGRUQrsDxgYgRAMEpOLCxhwA6Cqb9cgai/r4lGHC3CmpBYnA+kPQKxSBLQcaKQIkC2SDmFrgNhJELYNiF1eUlACZAeA2EUhQc5AdgqQrZGOxE5CYicXFIHU9wDZNrk5pckIdzPwpOaFBgNpDiCWYShmCGJwZ3AC+R+iJH8RA4PFVwYG5gkIsaSZDAzbWxkYJG4hxFQWMDDwtzAwbDuPEEOESUFiUSJYiAWImdLSGBg+LWdg4I1kYBC+wMDAFQ0LCBxuUwC7zZ0hHwjTGXIYUoEingx5DMkMekCWEYMBgyGDGQCm1j8/yRb+6wAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAABPXpUWHRSYXcgcHJvZmlsZSB0eXBlIGljYwAAKJGdU9mtxCAM/KeKLcH4JOUkJEiv/waeuaJslP3YHYkgOWbGHkz4yzm8Klg0QEXMCSaY2qa7HsaGgmyMCJJkkRUB7GgnxjoRNCoZGfyIRlZcNVyZd8L9V8bwZf6irGK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6kB2voBydUo6rteOSk/LIy+bgpqIHcVE71v1nDz/88AfvvYKdR1fSXgPwKlpUCBDuULGYb6bTA47COiu8iR21WbFew1qvIKX7tdY5N51yUpksa9edViZ8pzcwcEW10C7XXgNwaVvkldq/X50ENHp6Us1qNQMgT46TMlapdCbtmGZ1dOOuXWeW5ILX+o5/TFprnBMfLC2RP/T/B96QkmdPWpSQAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA3LTA3VDA5OjE5OjA4KzAwOjAwC8IICQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNy0wN1QwOToxOTowOCswMDowMHqfsLUAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjMtMDctMDdUMDk6MTk6MDgrMDA6MDAtipFqAAAAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:YS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:YS.FACTORY},pair:{api:YS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:YS.QUOTER}}};var FS=t=>new gL(Object.assign(WS,{scope:t,findPath:t=>YS.findPath({...t,exchange:WS}),pathExists:t=>YS.pathExists({...t,exchange:WS}),getAmounts:t=>YS.getAmounts({...t,exchange:WS}),getPrep:t=>YS.getPrep({...t,exchange:WS}),getTransaction:t=>YS.getTransaction({...t,exchange:WS})}));const VS={name:"uniswap_v2",label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3Lncz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U3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["ethereum"],ethereum:{router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:IL.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:IL.FACTORY},pair:{api:IL.PAIR}}};var HS=t=>new gL(Object.assign(VS,{scope:t,findPath:t=>IL.findPath({...t,exchange:VS}),pathExists:t=>IL.pathExists({...t,exchange:VS}),getAmounts:t=>IL.getAmounts({...t,exchange:VS}),getPrep:t=>IL.getPrep({...t,exchange:VS}),getTransaction:t=>IL.getTransaction({...t,exchange:VS})}));function GS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const qS="0x0000000000000000000000000000000000000001",ZS="0x0000000000000000000000000000000000000002",JS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},XS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=JS({blockchain:t,exchange:e,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let KS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,$S=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var tj={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await XS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await XS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await XS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await XS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await XS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await XS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await XS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await XS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await XS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return GS([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):GS([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:JS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await XS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await $S({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await KS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await $S({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await KS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].permit.address]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].permit.address,Hf[e].maxInt]}}}{const o=await PN({blockchain:e,address:t[e].permit.address,method:"allowance",api:t[e].permit.api,params:[i,n,t[e].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(f){const t=Tp(f.signature).length;let e;65!==t&&64!==t||(e=function(t){return Dp(Lp([(t=Rp(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}(Rp(f.signature))),m.push("0a"),g.push(_m.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[f,e]))}r[0]===Hf[t].currency.address&&(m.push("0b"),g.push(_m.encode(["address","uint256"],[ZS,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=oN(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),h||u?(m.push("00"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(i||o).toString(),(a||s).toString(),y,r[0]!==Hf[t].currency.address&&!p]))):(m.push("01"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(a||s).toString(),(i||o).toString(),y,r[0]!==Hf[t].currency.address&&!p]))),r[r.length-1]===Hf[t].currency.address&&(m.push("0c"),g.push(_m.encode(["address","uint256"],[qS,(a||s).toString()])));return{blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api,method:"execute",params:{commands:`0x${m.join("")}`,inputs:g},value:v}},ROUTER:[{inputs:[{components:[{internalType:"address",name:"permit2",type:"address"},{internalType:"address",name:"weth9",type:"address"},{internalType:"address",name:"seaportV1_5",type:"address"},{internalType:"address",name:"seaportV1_4",type:"address"},{internalType:"address",name:"openseaConduit",type:"address"},{internalType:"address",name:"nftxZap",type:"address"},{internalType:"address",name:"x2y2",type:"address"},{internalType:"address",name:"foundation",type:"address"},{internalType:"address",name:"sudoswap",type:"address"},{internalType:"address",name:"elementMarket",type:"address"},{internalType:"address",name:"nft20Zap",type:"address"},{internalType:"address",name:"cryptopunks",type:"address"},{internalType:"address",name:"looksRareV2",type:"address"},{internalType:"address",name:"routerRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareToken",type:"address"},{internalType:"address",name:"v2Factory",type:"address"},{internalType:"address",name:"v3Factory",type:"address"},{internalType:"bytes32",name:"pairInitCodeHash",type:"bytes32"},{internalType:"bytes32",name:"poolInitCodeHash",type:"bytes32"}],internalType:"struct RouterParameters",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BalanceTooLow",type:"error"},{inputs:[],name:"BuyPunkFailed",type:"error"},{inputs:[],name:"ContractLocked",type:"error"},{inputs:[],name:"ETHNotAccepted",type:"error"},{inputs:[{internalType:"uint256",name:"commandIndex",type:"uint256"},{internalType:"bytes",name:"message",type:"bytes"}],name:"ExecutionFailed",type:"error"},{inputs:[],name:"FromAddressIsNotOwner",type:"error"},{inputs:[],name:"InsufficientETH",type:"error"},{inputs:[],name:"InsufficientToken",type:"error"},{inputs:[],name:"InvalidBips",type:"error"},{inputs:[{internalType:"uint256",name:"commandType",type:"uint256"}],name:"InvalidCommandType",type:"error"},{inputs:[],name:"InvalidOwnerERC1155",type:"error"},{inputs:[],name:"InvalidOwnerERC721",type:"error"},{inputs:[],name:"InvalidPath",type:"error"},{inputs:[],name:"InvalidReserves",type:"error"},{inputs:[],name:"InvalidSpender",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[],name:"SliceOutOfBounds",type:"error"},{inputs:[],name:"TransactionDeadlinePassed",type:"error"},{inputs:[],name:"UnableToClaim",type:"error"},{inputs:[],name:"UnsafeCast",type:"error"},{inputs:[],name:"V2InvalidPath",type:"error"},{inputs:[],name:"V2TooLittleReceived",type:"error"},{inputs:[],name:"V2TooMuchRequested",type:"error"},{inputs:[],name:"V3InvalidAmountOut",type:"error"},{inputs:[],name:"V3InvalidCaller",type:"error"},{inputs:[],name:"V3InvalidSwap",type:"error"},{inputs:[],name:"V3TooLittleReceived",type:"error"},{inputs:[],name:"V3TooMuchRequested",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardsSent",type:"event"},{inputs:[{internalType:"bytes",name:"looksRareClaim",type:"bytes"}],name:"collectRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"parameters",outputs:[{internalType:"address",name:"factory",type:"address"},{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"view",type:"function"}],PERMIT2:[{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"}],name:"AllowanceExpired",type:"error"},{inputs:[],name:"ExcessiveInvalidation",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InsufficientAllowance",type:"error"},{inputs:[{internalType:"uint256",name:"maxAmount",type:"uint256"}],name:"InvalidAmount",type:"error"},{inputs:[],name:"InvalidContractSignature",type:"error"},{inputs:[],name:"InvalidNonce",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSignatureLength",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"signatureDeadline",type:"uint256"}],name:"SignatureExpired",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"spender",type:"address"}],name:"Lockdown",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint48",name:"newNonce",type:"uint48"},{indexed:!1,internalType:"uint48",name:"oldNonce",type:"uint48"}],name:"NonceInvalidation",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"},{indexed:!1,internalType:"uint48",name:"nonce",type:"uint48"}],name:"Permit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"word",type:"uint256"},{indexed:!1,internalType:"uint256",name:"mask",type:"uint256"}],name:"UnorderedNonceInvalidation",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint48",name:"newNonce",type:"uint48"}],name:"invalidateNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wordPos",type:"uint256"},{internalType:"uint256",name:"mask",type:"uint256"}],name:"invalidateUnorderedNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],internalType:"struct IAllowanceTransfer.TokenSpenderPair[]",name:"approvals",type:"tuple[]"}],name:"lockdown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"nonceBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails[]",name:"details",type:"tuple[]"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitBatch",name:"permitBatch",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],internalType:"struct IAllowanceTransfer.AllowanceTransferDetails[]",name:"transferDetails",type:"tuple[]"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"}]};const ej={name:"uniswap_v3",label:"Uniswap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGRhdGEtdGVzdGlkPSJ1bmlzd2FwLWxvZ28iIGNsYXNzPSJyZ3c2ZXo0NHAgcmd3NmV6NGVqIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuMzUyNiAxOS45MjQyQzIwLjI5MjggMjAuMTU0OSAyMC4xODg1IDIwLjM3MTUgMjAuMDQ1NSAyMC41NjE4QzE5Ljc3OTMgMjAuOTA4OCAxOS40MjcgMjEuMTc5NCAxOS4wMjM5IDIxLjM0NjZDMTguNjYxNCAyMS41MDM1IDE4LjI3NzQgMjEuNjA1IDE3Ljg4NDkgMjEuNjQ3NUMxNy44MDQyIDIxLjY1NzggMTcuNzIwNiAyMS42NjQxIDE3LjYzOTUgMjEuNjcwM0wxNy42MjYzIDIxLjY3MTND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DEgMzEuMzY5MSAzOS4wNjQyTDMxLjMxODcgMzkuMTA0NlpNMjEuMDgwMSAzNi45NjE5QzIxLjExMjMgMzYuOTk4OSAyMS4xNDQ5IDM3LjAzNTUgMjEuMTc3OSAzNy4wNzE4QzIxLjE2NDQgMzcuMDU2NyAyMS4xNTEgMzcuMDQxNSAyMS4xMzc1IDM3LjAyNjRMMjEuMTM3NSAzNy4wMjY0TDIxLjEzNzUgMzcuMDI2NEwyMS4xMzc1IDM3LjAyNjRDMjEuMTE4NCAzNy4wMDQ5IDIxLjA5OTMgMzYuOTgzNCAyMS4wODAxIDM2Ljk2MTlaIiBmaWxsPSJjdXJyZW50Q29sb3IiPjwvcGF0aD48L3N2Zz4K",protocol:"uniswap_v3",slippage:!0,fees:[100,500,3e3,1e4],blockchains:["ethereum","bsc","polygon","optimism","arbitrum"],ethereum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:tj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:tj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:tj.FACTORY},pool:{api:tj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:tj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:tj.PERMIT2}}};var nj=t=>new gL(Object.assign(ej,{scope:t,findPath:t=>tj.findPath({...t,exchange:ej}),pathExists:t=>tj.pathExists({...t,exchange:ej}),getAmounts:t=>tj.getAmounts({...t,exchange:ej}),getPrep:t=>tj.getPrep({...t,exchange:ej}),getTransaction:t=>tj.getTransaction({...t,exchange:ej})}));var rj={findPath:async({blockchain:t,tokenIn:e,tokenOut:n})=>{if(![e,n].includes(Hf[t].currency.address)||![e,n].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[e,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:t,path:e})=>!(!e||2!==e.length)&&(e.includes(Hf[t].currency.address)&&e.includes(Hf[t].wrapped.address)),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address&&n[1]===Hf[e].wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===Hf[e].wrapped.address&&n[1]===Hf[e].currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const ij={name:"wavax",label:"Wrapped Avax",logo:Hf.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Hf.avalanche.wrapped.address,api:rj.WETH}}};var oj=t=>new gL(Object.assign(ij,{scope:t,findPath:t=>rj.findPath({...t,exchange:ij}),pathExists:t=>rj.pathExists({...t,exchange:ij}),getAmounts:t=>rj.getAmounts({...t,exchange:ij}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:ij})}));const aj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheW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Cw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",slippage:!1,blockchains:["bsc"],bsc:{router:{address:Hf.bsc.wrapped.address,api:rj.WETH}}};var sj=t=>new gL(Object.assign(aj,{scope:t,findPath:t=>rj.findPath({...t,exchange:aj}),pathExists:t=>rj.pathExists({...t,exchange:aj}),getAmounts:t=>rj.getAmounts({...t,exchange:aj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:aj})}));const uj={name:"weth",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Hf.ethereum.wrapped.address,api:rj.WETH}}};var cj=t=>new gL(Object.assign(uj,{scope:t,findPath:t=>rj.findPath({...t,exchange:uj}),pathExists:t=>rj.pathExists({...t,exchange:uj}),getAmounts:t=>rj.getAmounts({...t,exchange:uj}),getPrep:t=>{},getTransaction:t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S45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Hf.arbitrum.wrapped.address,api:rj.WETH}}};var hj=t=>new gL(Object.assign(lj,{scope:t,findPath:t=>rj.findPath({...t,exchange:lj}),pathExists:t=>rj.pathExists({...t,exchange:lj}),getAmounts:t=>rj.getAmounts({...t,exchange:lj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:lj})}));const dj={name:"weth_optimism",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9u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OGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Hf.optimism.wrapped.address,api:rj.WETH}}};var fj=t=>new gL(Object.assign(dj,{scope:t,findPath:t=>rj.findPath({...t,exchange:dj}),pathExists:t=>rj.pathExists({...t,exchange:dj}),getAmounts:t=>rj.getAmounts({...t,exchange:dj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:dj})}));const pj={name:"weth_base",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Hf.base.wrapped.address,api:rj.WETH}}};var yj=t=>new gL(Object.assign(pj,{scope:t,findPath:t=>rj.findPath({...t,exchange:pj}),pathExists:t=>rj.pathExists({...t,exchange:pj}),getAmounts:t=>rj.getAmounts({...t,exchange:pj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:pj})}));const mj={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiI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TAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Hf.fantom.wrapped.address,api:rj.WETH}}};var gj=t=>new gL(Object.assign(mj,{scope:t,findPath:t=>rj.findPath({...t,exchange:mj}),pathExists:t=>rj.pathExists({...t,exchange:mj}),getAmounts:t=>rj.getAmounts({...t,exchange:mj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:mj})}));const vj={name:"wmatic",label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA0NS40IDQ1LjQiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ1LjQgNDUuNDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM4MjQ3RTU7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMzEuOSwxNi42Yy0wLjctMC40LTEuNi0wLjQtMi4yLDBsLTUuMywzLjFsLTMuNSwybC01LjEsMy4xYy0wLjcsMC40LTEuNiwwLjQtMi4yLDBsLTQtMi40CgljLTAuNi0wLjQtMS4xLTEuMS0xLjEtMnYtNC42YzAtMC45LDAuNS0xLjYsMS4xLTJsNC0yLjNjMC43LTAuNCwxLjUtMC40LDIuMiwwbDQsMi40YzAuNywwLjQsMS4xLDEuMSwxLjEsMnYzLjFsMy41LTIuMXYtMy4yCgljMC0wLjktMC40LTEuNi0xLjEtMmwtNy41LTQuNGMtMC43LTAuNC0xLjUtMC40LTIuMiwwTDYsMTEuN2MtMC43LDAuNC0xLjEsMS4xLTEuMSwxLjh2OC43YzAsMC45LDAuNCwxLjYsMS4xLDJsNy42LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Hf.polygon.wrapped.address,api:rj.WETH}}};var wj=t=>new gL(Object.assign(vj,{scope:t,findPath:t=>rj.findPath({...t,exchange:vj}),pathExists:t=>rj.pathExists({...t,exchange:vj}),getAmounts:t=>rj.getAmounts({...t,exchange:vj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:vj})}));const bj={name:"wxdai",label:"Wrapped XDAI",logo:Hf.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Hf.gnosis.wrapped.address,api:rj.WETH}}};var Mj=t=>new gL(Object.assign(bj,{scope:t,findPath:t=>rj.findPath({...t,exchange:bj}),pathExists:t=>rj.pathExists({...t,exchange:bj}),getAmounts:t=>rj.getAmounts({...t,exchange:bj}),getPrep:t=>{},getTransaction:t=>rj.getTransaction({...t,exchange:bj})}));const Aj=[AS(),nj(),CS(),HS(),IS(),FS(),OS(),PS(),xL(),cj(),fj(),yj(),hj(),sj(),wj(),gj(),oj(),Mj()];Aj.forEach((t=>{Aj[t.name]=t})),Aj.ethereum=[nj("ethereum"),HS("ethereum"),cj("ethereum")],Aj.ethereum.forEach((t=>{Aj.ethereum[t.name]=t})),Aj.bsc=[CS("bsc"),nj("bsc"),IS("bsc"),sj("bsc")],Aj.bsc.forEach((t=>{Aj.bsc[t.name]=t})),Aj.polygon=[nj("polygon"),OS("polygon"),wj("polygon")],Aj.polygon.forEach((t=>{Aj.polygon[t.name]=t})),Aj.solana=[AS("solana")],Aj.solana.forEach((t=>{Aj.solana[t.name]=t})),Aj.optimism=[nj("optimism"),fj("optimism")],Aj.optimism.forEach((t=>{Aj.optimism[t.name]=t})),Aj.base=[nj("base"),yj("base")],Aj.base.forEach((t=>{Aj.base[t.name]=t})),Aj.arbitrum=[nj("arbitrum"),hj("arbitrum")],Aj.arbitrum.forEach((t=>{Aj.arbitrum[t.name]=t})),Aj.fantom=[PS("fantom"),gj("fantom")],Aj.fantom.forEach((t=>{Aj.fantom[t.name]=t})),Aj.avalanche=[FS("avalanche"),oj("avalanche")],Aj.avalanche.forEach((t=>{Aj.avalanche[t.name]=t})),Aj.gnosis=[xL("gnosis"),Mj("gnosis")],Aj.gnosis.forEach((t=>{Aj.gnosis[t.name]=t}));Aj.route=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(Aj[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((t=>t.filter(Boolean).sort(((t,e)=>(r||o?BigInt(t.amountOut)BigInt(e.amountIn))?1:(r||o?BigInt(t.amountOut)>BigInt(e.amountOut):BigInt(t.amountIn)Ij||(Ij="object"==typeof r?r:window,Ij);const xj=()=>(void 0===Ej()._Web3ClientConfiguration&&(Ej()._Web3ClientConfiguration={}),Ej()._Web3ClientConfiguration);function kj(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class Tj extends ZA{constructor(t,e,n,r){super(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Hf.findByName(this._network).id)}requestChunk(t,e){try{const n=t.map((t=>t.request));return $M(e,JSON.stringify(n)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(kj([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else kj([r,"optionalAccess",t=>t.result])?t.resolve(r.result):t.reject()}))})).catch((e=>{if(e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint)}else t.forEach((t=>{t.reject(e)}))}))}catch(e){t.forEach((t=>{t.reject()}))}}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,this._endpoint))))}),xj().batchInterval||10)),i}}const Lj=()=>(null==Ej()._Web3ClientProviders&&(Ej()._Web3ClientProviders={}),Ej()._Web3ClientProviders),Sj=(t,e)=>{void 0===Lj()[t]&&(Lj()[t]=[]);const n=Lj()[t].indexOf(e);n>-1&&Lj()[t].splice(n,1),Lj()[t].unshift(e)},jj=async(t,e,n=!0)=>{let r;Lj()[t]=e.map(((r,i)=>new Tj(r,t,e,(()=>{1===Lj()[t].length?jj(t,e,n):Lj()[t].splice(i,1)}))));let i=Ej();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=Lj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=Lj()[t][o]}Sj(t,r)};var Cj=async t=>{let e=Lj();if(e&&e[t])return e[t][0];let n=Ej();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await jj(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Dj=async t=>{let e=Lj();if(e&&e[t])return e[t];let n=Ej();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await jj(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};class Oj extends ql{constructor(t,e,n,r){super(t),this._provider=new ql(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}requestChunk(t){const e=t.map((t=>t.request)),n=e=>{if(e&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>e.toString().match(t)))){const e=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this._provider=new ql(this._endpoint),this.requestChunk(t)}else t.forEach((t=>{t.reject(e)}))};try{return this._provider._rpcBatchRequest(e).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else r?t.resolve(r):t.reject()}))})).catch(n)}catch(t){return n(t)}}_rpcRequestReplacement(t,e){const n={methodName:t,args:e};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t))))}),xj().batchInterval||10)),i}}const zj=()=>(null==Ej()._Web3ClientProviders&&(Ej()._Web3ClientProviders={}),Ej()._Web3ClientProviders),Pj=(t,e)=>{void 0===zj()[t]&&(zj()[t]=[]);const n=zj()[t].indexOf(e);n>-1&&zj()[t].splice(n,1),zj()[t].unshift(e)},_j=async(t,e,n=!0)=>{let r;zj()[t]=e.map(((r,i)=>new Oj(r,t,e,(()=>{1===zj()[t].length?_j(t,e,n):zj()[t].splice(i,1)}))));let i=Ej();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=zj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=zj()[t][o]}Pj(t,r)};var Bj=async t=>{let e=zj();if(e&&e[t])return e[t][0];let n=Ej();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await _j(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Rj=async t=>{let e=zj();if(e&&e[t])return e[t];let n=Ej();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await _j(t,Hf[t].endpoints),e(Ej()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};let Uj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Uj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Uj.solana=["solana"];let Qj=()=>(null==Ej()._Web3ClientCacheStore&&(Ej()._Web3ClientCacheStore={}),Ej()._Web3ClientCacheStore),Yj=()=>(null==Ej()._Web3ClientPromiseStore&&(Ej()._Web3ClientPromiseStore={}),Ej()._Web3ClientPromiseStore),Wj=function({key:t}){Yj()[t]=void 0},Fj=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return Yj()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return Yj()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=Qj()[t];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){Qj()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{Wj({key:e})})).catch((()=>{Wj({key:e})}))}))};const Vj=async t=>{if(Uj.evm.includes(t))return await Cj(t);if(Uj.solana.includes(t))return await Bj(t);throw"Unknown blockchain: "+t};const Hj=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=new PM(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((t=>t.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((t=>t.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},Gj=({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a})=>n?Hj({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0;const qj=async({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=of),await(async({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new Xs(t));if(a&&a.data)return e.decode(a.data)})({address:e,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new Xs(e),i).then((t=>n?t.map((t=>(t.data=n.decode(t.account.data),t))):t));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new Xs(e));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:t,provider:e})=>e.getBalance(new Xs(t)))({address:e,provider:a})}catch(u){if(s&&u&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>u.toString().match(t)))){let u=s[s.indexOf(a)+1]||s[0];return qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const Zj=async function(t,e){const{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:h}=("object"==typeof t?t:e)||{};return await Fj({expires:s||0,key:h||[n,r,i,a,u],call:async()=>{if(Uj.evm.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||xj().strategy||"failover",a=a||xj().timeout||void 0,"fastest"===s){const s=await Dj(t);let u=[];const c=s.map((a=>new Promise((s=>{u.push(Gj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Cj(t),u=Gj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([u,a])):u}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});if(Uj.solana.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||xj().strategy||"failover",a=a||xj().timeout||void 0;const u=await Rj(t);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Bj(t),c=qj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([c,a])):c}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});throw"Unknown blockchain: "+n}})},Jj=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=e.fromToken.address===Hf.solana.currency.address?new rf(e.fromAmount):new rf("0"),r=await Vj("solana"),i=new rf(await r.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),o=e.fromAddress,a=n.add(i);return[Wu.createAccount({fromPubkey:new Xs(o),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:a}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:o})]},Xj=async({wSolEscrowAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),i=await lC();return[Wu.createAccount({fromPubkey:new Xs(e.fromAddress),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:i.toString()})]},Kj=({paymentRoute:t})=>{let e=[...t.exchangeRoutes[0].path];return e.indexOf(Hf.solana.currency.address)>-1&&e.splice(e.indexOf(Hf.solana.currency.address),1),e.indexOf(t.fromToken.address)>-1&&e.splice(e.indexOf(t.fromToken.address),1),e.indexOf(t.toToken.address)>-1&&e.splice(e.indexOf(t.toToken.address),1),2===e.length&&e[0]===Hf.solana.wrapped.address?e[1]:e[0]},$j=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:Kj({paymentRoute:t}),owner:t.fromAddress}),tC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||pC(t.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:await $j({paymentRoute:t}),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t})?void 0:Ak.solana.createAssociatedTokenAccountInstruction({token:Kj({paymentRoute:t}),owner:t.fromAddress,payer:t.fromAddress})},eC=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(t)return Ak.solana.closeAccountInstruction({account:t.publicKey.toString(),owner:e.fromAddress})},nC=async({from:t})=>{let e=[nf.from("payments"),new Xs(t).toBuffer()],[n]=await Xs.findProgramAddress(e,new Xs(Nj.solana.address));return n},rC=async({from:t})=>{let e=(await nC({from:t})).toString();return await Zj({blockchain:"solana",address:e,api:pf([vf("anchorDiscriminator"),vf("nonce")]),cache:1e3})},iC=async({from:t})=>{if(await rC({from:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createPaymentsAccount.layout.span);return Nj.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createPaymentsAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},oC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.fromToken.address,owner:t.fromAddress}),aC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.toAddress}),sC=async({paymentRoute:t})=>{if(t.toToken.address===Hf.solana.currency.address){const e=await Zj({blockchain:"solana",method:"balance",address:t.toAddress}),n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.toAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.toAddress),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.toAddress}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.toAddress,payer:t.fromAddress})}},uC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.fee.receiver}),cC=async({paymentRoute:t})=>{if(t.fee){if(t.toToken.address===Hf.solana.currency.address){const e=await Zj({blockchain:"solana",method:"balance",address:t.fee.receiver}),n=await Vj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.feeAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.fee.receiver),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.fee.receiver}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.fee.receiver,payer:t.fromAddress})}}},lC=async()=>{let t=[nf.from("escrow_sol")],[e,n]=await Xs.findProgramAddress(t,new Xs(Nj.solana.address));return e},hC=async({paymentRoute:t})=>{let e=[nf.from("escrow"),new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address).toBuffer()],[n,r]=await Xs.findProgramAddress(e,new Xs(Nj.solana.address));return n},dC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address===Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:(await hC({paymentRoute:t})).toString(),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await hC({paymentRoute:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createEscrowTokenAccount.layout.span);return Nj.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},fC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address!=Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Zj({blockchain:"solana",address:(await lC()).toString(),api:pf([vf("amount"),hf("owner")]),cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0}],n=nf.alloc(Nj.solana.api.createEscrowSolAccount.layout.span);return Nj.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Nj.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Nj.solana.address),data:n})},pC=t=>t.filter((t=>t!==Hf.solana.currency.address)),yC=async({paymentRoute:t,wSolSenderAccountKeypair:e,wSolEscrowAccountKeypair:n,nonce:r,deadline:i})=>{switch((({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return"routeSol";if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address&&0===t.exchangeRoutes.length)return"routeToken";if(t.exchangeRoutes.length>0&&2===pC(t.exchangeRoutes[0].path).length)return t.toToken.address===Hf.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(t.exchangeRoutes.length>0&&pC(t.exchangeRoutes[0].path).length>2)return t.toToken.address===Hf.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:t})){case"routeSol":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=new Xs(t.toAddress),i=t.fee?new Xs(t.fee.receiver):r,o=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],a=nf.alloc(Nj.solana.api.routeSol.layout.span);return Nj.solana.api.routeSol.layout.encode({anchorDiscriminator:Nj.solana.api.routeSol.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},a),new gu({keys:o,programId:new Xs(Nj.solana.address),data:a})})({paymentRoute:t,nonce:r,deadline:i});case"routeToken":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=await oC({paymentRoute:t}),i=await aC({paymentRoute:t}),o=t.fee?await uC({paymentRoute:t}):i,a=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(r),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0}],s=nf.alloc(Nj.solana.api.routeToken.layout.span);return Nj.solana.api.routeToken.layout.encode({anchorDiscriminator:Nj.solana.api.routeToken.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},s),new gu({keys:a,programId:new Xs(Nj.solana.address),data:s})})({paymentRoute:t,nonce:r,deadline:i});case"routeOrcaSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=n?n.publicKey:await oC({paymentRoute:t}),o=await aC({paymentRoute:t}),a=t.fee?await uC({paymentRoute:t}):o,s=await hC({paymentRoute:t}),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),c=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(u.data),l=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},u.keys[2],u.keys[4],u.keys[6],u.keys[7],u.keys[8],u.keys[9],u.keys[10],{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0},{pubkey:new Xs(a),isSigner:!1,isWritable:!0}],h=nf.alloc(Nj.solana.api.routeOrcaSwap.layout.span);return Nj.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:e,amountIn:c.amount,sqrtPriceLimit:c.sqrtPriceLimit,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToB:c.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},h),new gu({keys:l,programId:new Xs(Nj.solana.address),data:h})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=await oC({paymentRoute:t}),o=n.publicKey,a=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(a.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},a.keys[2],a.keys[4],a.keys[6],a.keys[7],a.keys[8],a.keys[9],a.keys[10],{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Nj.solana.api.routeOrcaSwapSolOut.layout.span);return Nj.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,sqrtPriceLimit:s.sqrtPriceLimit,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToB:s.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Nj.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=new Xs(await aC({paymentRoute:t})),o=t.fee?new Xs(await uC({paymentRoute:t})):i,a=await hC({paymentRoute:t}),s=new Xs(await $j({paymentRoute:t})),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),c=n?n.publicKey:new Xs(await oC({paymentRoute:t})),l=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(u.data),h=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},u.keys[2],u.keys[3],{pubkey:c,isSigner:!1,isWritable:!0},u.keys[5],u.keys[7],{pubkey:s,isSigner:!1,isWritable:!0},u.keys[9],u.keys[11],u.keys[12],u.keys[13],u.keys[14],u.keys[15],u.keys[16],u.keys[17],u.keys[18],u.keys[19],{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0}],d=nf.alloc(Nj.solana.api.routeOrcaTwoHopSwap.layout.span);return Nj.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:e,amountIn:l.amount,amountSpecifiedIsInput:l.amountSpecifiedIsInput,aToBOne:l.aToBOne,aToBTwo:l.aToBTwo,sqrtPriceLimitOne:l.sqrtPriceLimitOne,sqrtPriceLimitTwo:l.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},d),new gu({keys:h,programId:new Xs(Nj.solana.address),data:d})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=new Xs(await $j({paymentRoute:t})),o=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Nj.solana.ammProgram)),a=new Xs(await oC({paymentRoute:t})),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(o.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Nj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await nC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},o.keys[2],o.keys[3],o.keys[5],o.keys[7],{pubkey:i,isSigner:!1,isWritable:!0},o.keys[9],o.keys[11],o.keys[12],o.keys[13],o.keys[14],o.keys[15],o.keys[16],o.keys[17],o.keys[18],o.keys[19],{pubkey:n.publicKey,isSigner:!1,isWritable:!0},{pubkey:await lC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Nj.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Nj.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Nj.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToBOne:s.aToBOne,aToBTwo:s.aToBTwo,sqrtPriceLimitOne:s.sqrtPriceLimitOne,sqrtPriceLimitTwo:s.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Nj.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i})}},mC=async({paymentRoute:t})=>{const e=await rC({from:t.fromAddress}),n=Math.ceil((new Date).getTime()/1e3)+1800,r=(t=>t?t.nonce:new rf("0"))(e),i=await(async({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t}),o=await(async({paymentRoute:t})=>{if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t});let a=(await Promise.all([iC({from:t.fromAddress}),Jj({paymentRoute:t,wSolSenderAccountKeypair:i}),tC({paymentRoute:t}),sC({paymentRoute:t}),cC({paymentRoute:t}),fC({paymentRoute:t}),Xj({paymentRoute:t,wSolEscrowAccountKeypair:o}),dC({paymentRoute:t}),yC({paymentRoute:t,wSolSenderAccountKeypair:i,wSolEscrowAccountKeypair:o,nonce:r,deadline:n}),eC({paymentRoute:t,wSolSenderAccountKeypair:i})])).filter(Boolean).flat();const s={blockchain:t.blockchain,instructions:a,signers:[i,o].filter(Boolean),alts:[Nj.solana.alt]};return s.deadline=n,s.nonce=r.toString(),s},gC=[{inputs:[{internalType:"address",name:"_PERMIT2",type:"address"},{internalType:"address",name:"_FORWARDER",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ExchangeCallFailed",type:"error"},{inputs:[],name:"ExchangeCallMissing",type:"error"},{inputs:[],name:"ExchangeNotApproved",type:"error"},{inputs:[],name:"ForwardingPaymentFailed",type:"error"},{inputs:[],name:"InsufficientBalanceInAfterPayment",type:"error"},{inputs:[],name:"InsufficientBalanceOutAfterPayment",type:"error"},{inputs:[],name:"NativeFeePaymentFailed",type:"error"},{inputs:[],name:"NativePaymentFailed",type:"error"},{inputs:[],name:"PaymentDeadlineReached",type:"error"},{inputs:[],name:"PaymentToZeroAddressNotAllowed",type:"error"},{inputs:[],name:"WrongAmountPaidIn",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Disabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Enabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"InternalTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"FORWARDER",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"exchange",type:"address"},{internalType:"bool",name:"enabled",type:"bool"}],name:"enable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"exchanges",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IPermit2.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IPermit2.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var vC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:gC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:gC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:gC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:gC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:gC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:gC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:gC}},wC={...vC,...Nj},bC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},MC="object"==typeof bC&&bC&&bC.Object===Object&&bC,AC="object"==typeof self&&self&&self.Object===Object&&self,NC=(MC||AC||Function("return this")()).Symbol;NC&&NC.toStringTag,NC&&NC.toStringTag;const IC=t=>{switch(t){case"solana":return 125e-6;case"gnosis":return.009;case"polygon":return.01;case"fantom":return.05;case"avalanche":return.1;case"bsc":return.2;case"base":return.25;case"arbitrum":return.3;case"optimism":return.4;case"ethereum":return 10;default:return 100}},EC={arbitrum:{[Hf.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Hf.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Hf.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Hf.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Hf.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Hf.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Hf.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Hf.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Hf.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},xC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?t.toAddress:t.toToken.address:vC[t.blockchain].address,kC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:Ak[t.blockchain].DEFAULT:vC[t.blockchain].api,TC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:"transfer":"pay",LC=async({paymentRoute:t})=>{if(t.directTransfer&&!t.fee)return t.toToken.address==Hf[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount];{const e=Math.ceil(new Date/1e3)+3600,n=t.exchangeRoutes[0],r=(({exchangeRoute:t,blockchain:e})=>void 0===t?0:"uniswap_v3"===t.exchange.name||t.exchange[e].router.address===Hf[e].wrapped.address?2:1)({exchangeRoute:n,blockchain:t.blockchain}),i=n?await n.getTransaction({account:vC[t.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:t})=>{const e=new PM(t.to,t.api),n=t.method,r=t.params;let i,o,a;return o=e.interface.fragments.find((t=>!(t.name!=n||t.inputs&&r&&"object"==typeof r&&t.inputs.length!=Object.keys(r).length))),1===o.inputs.length&&"tuple"===o.inputs[0].type?(i=n,a=[r[o.inputs[0].name]]):(i=`${n}(${o.inputs.map((t=>t.type)).join(",")})`,a=o.inputs.map((t=>{if("tuple"===t.type){let e={};return t.components.forEach(((n,i)=>{e[n.name]=r[t.name][i]})),i=n,e}return r[t.name]}))),e.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Hf[t.blockchain].zero;let a=Hf[t.blockchain].zero;return n&&(a="bsc"===t.blockchain&&"pancakeswap_v3"===n.exchange.name&&t.toToken.address===Hf[t.blockchain].currency.address?n.exchange[t.blockchain].smartRouter.address:EC[i.blockchain][n.exchange[t.blockchain].router.address]||n.exchange[t.blockchain].router.address),{payment:{amountIn:t.fromAmount,paymentAmount:t.toAmount,feeAmount:t.feeAmount||0,tokenInAddress:t.fromToken.address,exchangeAddress:a,tokenOutAddress:t.toToken.address,paymentReceiverAddress:t.toAddress,feeReceiverAddress:t.fee?t.fee.receiver:Hf[t.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Hf[t.blockchain].zero,deadline:e}}}},SC=({paymentRoute:t})=>t.fromToken.address==Hf[t.blockchain].currency.address?t.directTransfer?t.toAmount.toString():t.fromAmount.toString():Fp.from("0").toString();let jC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];jC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],jC.solana=["solana"];const CC=({paymentRoute:t,fee:e})=>{if(jC.evm.includes(t.blockchain))return(async({paymentRoute:t})=>({blockchain:t.blockchain,to:xC({paymentRoute:t}),api:kC({paymentRoute:t}),method:TC({paymentRoute:t}),params:await LC({paymentRoute:t}),value:SC({paymentRoute:t})}))({paymentRoute:t,fee:e});if(jC.solana.includes(t.blockchain))return mC({paymentRoute:t,fee:e});throw"Blockchain not supported!"};function DC(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class OC{constructor({blockchain:t,fromAddress:e,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:h,exchangeRoutes:d,approvalRequired:f,approvalTransaction:p,directTransfer:y}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=DC([r||s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=DC([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=h,this.exchangeRoutes=d||[],this.approvalRequired=f,this.approvalTransaction=p,this.directTransfer=y,this.getTransaction=async()=>await CC({paymentRoute:this})}}function zC({assets:t,blacklist:e,accept:n,from:r}){return Promise.resolve(_C({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new Ak(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new Ak({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new OC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new Ak({blockchain:r,address:e.toToken}),u=await s.decimals();return new OC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>YC({routes:t}))).then(BC).then(RC).then(UC).then((t=>HC({routes:t}))).then(QC).then(qC).then(GC).then((t=>t.map((t=>new OC(t)))))}function PC({accept:t,from:e,whitelist:n,blacklist:r,drip:i}){if(t.some((t=>t&&t.fee&&"string"==typeof t.fee.amount&&t.fee.amount.match(/\.\d\d+\%/))))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(o,a)=>{let s=[],u=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{u.push(t),s.push({blockchain:t,address:e})}));else t.forEach((t=>{u.push(t.blockchain),s.push({blockchain:t.blockchain,address:t.token||t.toToken})}));[...new Set(u)].forEach((t=>{s.find((e=>e.blockchain===t&&e.address===Hf[t].currency.address))||s.push({blockchain:t,address:Hf[t].currency.address})})),s.sort(((t,e)=>IC(t.blockchain)[t.blockchain,t.address.toLowerCase()].join(""))),f=()=>Math.ceil(new Date),p=f();setTimeout((()=>{l.forEach((t=>y(PC,!1)))}),3e3);const y=(t,e=!0)=>{try{const n={blockchain:t.blockchain,address:t.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=f()-p>3e3;if(h.indexOf(r)>-1)return;if(d.indexOf(r)===c){if(h.push(r),i(t),c+=1,!e)return;l.forEach((e=>y(t,!1)))}else c>=d.length||o?(-1===d.indexOf(r)||c>=d.length||o)&&(h.push(r),i(t)):l.find((t=>t.blockchain===n.blockchain&&t.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((t,e)=>((t,e,n)=>{if(!t||0===t.length)return 0;let r=t.indexOf([e.blockchain,e.address.toLowerCase()].join("")),i=t.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{zC({assets:[n],blacklist:r,accept:t,from:e}).then((t=>{DC([t,"optionalAccess",t=>t.length])&&y(t[0])}))}:void 0});let g=await zC({assets:m,blacklist:r,accept:t,from:e})||[];g.assets=m,o(g)}))}let _C=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),BC=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?Aj.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?Aj.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),RC=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),UC=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Fp.from(t.fromBalance).gte(Fp.from(t.toAmount)):t.fromAmount&&t.toAmount?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountIn)):void 0)),QC=t=>Promise.all(t.map((t=>"solana"===t.blockchain?Promise.resolve(Hf.solana.maxInt):t.fromToken.allowance(t.fromAddress,wC[t.blockchain].address).catch((()=>{}))))).then((e=>(t.map(((n,r)=>{void 0===e[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Hf[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?t[r].approvalRequired=!1:(t[r].approvalRequired=Fp.from(n.fromAmount).gte(Fp.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:Ak[n.blockchain].DEFAULT,method:"approve",params:[wC[n.blockchain].address,Hf[n.blockchain].maxInt]}))})),t))),YC=({routes:t})=>t.map((t=>(jC.evm.includes(t.blockchain)?t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==t.fee:"solana"===t.blockchain&&(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()),t))),WC=({paymentRoute:t,exchangeRoute:e})=>{let n,r,i;return e?(e&&e.exchange.wrapper,n=e.amountIn.toString(),r=FC({amount:e.amountOutMin.toString(),paymentRoute:t})):(n=t.fromAmount,r=FC({amount:t.fromAmount,paymentRoute:t})),t.fee&&(i=VC({paymentRoute:t})),{fromAmount:n,toAmount:r,feeAmount:i}},FC=({amount:t,paymentRoute:e})=>{if(e.fee){let n=VC({paymentRoute:e});return Fp.from(t).sub(n).toString()}return t},VC=({paymentRoute:t})=>{if("string"==typeof t.fee.amount&&t.fee.amount.match("%"))return Fp.from(t.toAmount).mul(10*parseFloat(t.fee.amount)).div(1e3).toString();if("string"==typeof t.fee.amount)return t.fee.amount;if("number"==typeof t.fee.amount)return cN(t.fee.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},HC=({routes:t})=>t.map((t=>{if(jC.evm.includes(t.blockchain))if(t.directTransfer&&!t.fee)t.fromAmount=t.toAmount;else{let{fromAmount:e,toAmount:n,feeAmount:r}=WC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}else if(jC.solana.includes(t.blockchain)){let{fromAmount:e,toAmount:n,feeAmount:r}=WC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}return t})),GC=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Fp.from(t.fromAmount).lt(Fp.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r{let e=-1;return t.sort(((t,n)=>IC(t.fromToken.blockchain)0){for(o+=a,e=1;en)throw Error(Rk+t)}function $k(t,e,n,r){var i,o,a,s;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=Yk(10,7-e),s=t[i]%o|0,null==r?e<3?(0==e?s=s/100|0:1==e&&(s=s/10|0),a=n<4&&99999==s||n>3&&49999==s||5e4==s||0==s):a=(n<4&&s+1==o||n>3&&s+1==o/2)&&(t[i+1]/o/100|0)==Yk(10,e-2)-1||(s==o/2||0==s)&&0==(t[i+1]/o/100|0):e<4?(0==e?s=s/1e3|0:1==e?s=s/100|0:2==e&&(s=s/10|0),a=(r||n<4)&&9999==s||!r&&n>3&&4999==s):a=((r||n<4)&&s+1==o||!r&&n>3&&s+1==o/2)&&(t[i+1]/o/1e3|0)==Yk(10,e-3)-1,a}function tT(t,e,n){for(var r,i,o=[0],a=0,s=t.length;an-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}Jk.absoluteValue=Jk.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),nT(t)},Jk.ceil=function(){return nT(new this.constructor(this),this.e+1,2)},Jk.clampedTo=Jk.clamp=function(t,e){var n=this,r=n.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Rk+e);return n.cmp(t)<0?t:n.cmp(e)>0?e:new r(n)},Jk.comparedTo=Jk.cmp=function(t){var e,n,r,i,o=this,a=o.d,s=(t=new o.constructor(t)).d,u=o.s,c=t.s;if(!a||!s)return u&&c?u!==c?u:a===s?0:!a^u<0?1:-1:NaN;if(!a[0]||!s[0])return a[0]?u:s[0]?-c:0;if(u!==c)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=a.length)<(i=s.length)?r:i;es[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},Jk.cosine=Jk.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i;if(e.isZero())return e;(r=e.d.length)<32?i=(1/vT(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");t.precision+=n,e=gT(t,1,e.times(i),new t(1));for(var o=n;o--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=n,e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(2==jk||3==jk?n.neg():n,t,e,!0)):new r(1):new r(NaN)},Jk.cubeRoot=Jk.cbrt=function(){var t,e,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(Bk=!1,(o=l.s*Yk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=Xk(l.d),(o=((t=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Yk(n,1/3),t=Qk((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=l.s),a=(t=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=eT(c.plus(l).times(s),c.plus(u),a+2,1),Xk(s.d).slice(0,a)===(n=Xk(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(nT(r,t+1,1),e=!r.times(r).times(r).eq(l));break}if(!i&&(nT(s,t+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Bk=!0,nT(r,t,h.rounding,e)},Jk.decimalPlaces=Jk.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-Qk(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},Jk.dividedBy=Jk.div=function(t){return eT(this,new this.constructor(t))},Jk.dividedToIntegerBy=Jk.divToInt=function(t){var e=this.constructor;return nT(eT(this,new e(t),0,1,1),e.precision,e.rounding)},Jk.equals=Jk.eq=function(t){return 0===this.cmp(t)},Jk.floor=function(){return nT(new this.constructor(this),this.e+1,3)},Jk.greaterThan=Jk.gt=function(t){return this.cmp(t)>0},Jk.greaterThanOrEqualTo=Jk.gte=function(t){var e=this.cmp(t);return 1==e||0===e},Jk.hyperbolicCosine=Jk.cosh=function(){var t,e,n,r,i,o=this,a=o.constructor,s=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,(i=o.d.length)<32?e=(1/vT(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=gT(a,1,o.times(e),new a(1),!0);for(var u,c=t,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return nT(o,a.precision=n,a.rounding=r,!0)},Jk.hyperbolicSine=Jk.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=gT(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=gT(o,2,i=i.times(1/vT(5,t)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);t--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=e,o.rounding=n,nT(i,e,n,!0)},Jk.hyperbolicTangent=Jk.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,eT(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},Jk.inverseCosine=Jk.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?aT(n,i,o):new n(0):new n(NaN):e.isZero()?aT(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=aT(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},Jk.inverseHyperbolicCosine=Jk.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Bk=!1,n=n.times(n).minus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},Jk.inverseHyperbolicSine=Jk.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Bk=!1,n=n.times(n).plus(1).sqrt().plus(n),Bk=!0,r.precision=t,r.rounding=e,n.ln())},Jk.inverseHyperbolicTangent=Jk.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?nT(new o(i),t,e,!0):(o.precision=n=r-i.e,i=eT(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},Jk.inverseSine=Jk.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=aT(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},Jk.inverseTangent=Jk.atan=function(){var t,e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=Zk)return(a=aT(l,h+4,d).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=Zk)return(a=aT(l,h+4,d).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,t=n=Math.min(28,s/7+2|0);t;--t)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Bk=!1,e=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==t;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[e])for(t=e;a.d[t]===o.d[t]&&t--;);return n&&(a=a.times(2<this.d.length-2},Jk.isNaN=function(){return!this.s},Jk.isNegative=Jk.isNeg=function(){return this.s<0},Jk.isPositive=Jk.isPos=function(){return this.s>0},Jk.isZero=function(){return!!this.d&&0===this.d[0]},Jk.lessThan=Jk.lt=function(t){return this.cmp(t)<0},Jk.lessThanOrEqualTo=Jk.lte=function(t){return this.cmp(t)<1},Jk.logarithm=Jk.log=function(t){var e,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,d=l.rounding;if(null==t)t=new l(10),e=!0;else{if(n=(t=new l(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new l(NaN);e=t.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:1!=c.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Bk=!1,a=fT(c,s=h+5),r=e?oT(l,s+10):fT(t,s),$k((u=eT(a,r,s,1)).d,i=h,d))do{if(a=fT(c,s+=10),r=e?oT(l,s+10):fT(t,s),u=eT(a,r,s,1),!o){+Xk(u.d).slice(i+1,i+15)+1==1e14&&(u=nT(u,h+1,0));break}}while($k(u.d,i+=10,d));return Bk=!0,nT(u,h,d)},Jk.minus=Jk.sub=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.constructor;if(t=new p(t),!f.d||!t.d)return f.s&&t.s?f.d?t.s=-t.s:t=new p(t.d||f.s!==t.s?f:NaN):t=new p(NaN),t;if(f.s!=t.s)return t.s=-t.s,f.plus(t);if(c=f.d,d=t.d,s=p.precision,u=p.rounding,!c[0]||!d[0]){if(d[0])t.s=-t.s;else{if(!c[0])return new p(3===u?-0:0);t=new p(f)}return Bk?nT(t,s,u):t}if(n=Qk(t.e/7),l=Qk(f.e/7),c=c.slice(),o=l-n){for((h=o<0)?(e=c,o=-o,a=d.length):(e=d,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=c.length)<(a=d.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=d.length;r>o;){if(c[--r](a=(o=Math.ceil(s/7))>a?o+1:a+1)&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),e=0;i;)e=(c[--i]=c[i]+l[i]+e)/Gk|0,c[i]%=Gk;for(e&&(c.unshift(e),++r),a=c.length;0==c[--a];)c.pop();return t.d=c,t.e=iT(c,r),Bk?nT(t,s,u):t},Jk.precision=Jk.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(Rk+t);return n.d?(e=sT(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},Jk.round=function(){var t=this,e=t.constructor;return nT(new e(t),t.e+1,e.rounding)},Jk.sine=Jk.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return e.isZero()?e:gT(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/vT(5,n)),e=gT(t,2,e,e);for(var i,o=new t(5),a=new t(16),s=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(a.times(i).minus(s))));return e}(r,wT(r,n)),r.precision=t,r.rounding=e,nT(jk>2?n.neg():n,t,e,!0)):new r(NaN)},Jk.squareRoot=Jk.sqrt=function(){var t,e,n,r,i,o,a=this,s=a.d,u=a.e,c=a.s,l=a.constructor;if(1!==c||!s||!s[0])return new l(!c||c<0&&(!s||s[0])?NaN:s?a:1/0);for(Bk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((e=Xk(s)).length+u)%2==0&&(e+="0"),c=Math.sqrt(e),u=Qk((u+1)/2)-(u<0||u%2),r=new l(e=c==1/0?"5e"+u:(e=c.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(eT(a,o,n+2,1)).times(.5),Xk(o.d).slice(0,n)===(e=Xk(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(nT(r,u+1,1),t=!r.times(r).eq(a));break}if(!i&&(nT(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Bk=!0,nT(r,u,l.rounding,t)},Jk.tangent=Jk.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=eT(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,nT(2==jk||4==jk?n.neg():n,t,e,!0)):new r(NaN)},Jk.times=Jk.mul=function(t){var e,n,r,i,o,a,s,u,c,l=this,h=l.constructor,d=l.d,f=(t=new h(t)).d;if(t.s*=l.s,!(d&&d[0]&&f&&f[0]))return new h(!t.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:d&&f?0*t.s:t.s/0);for(n=Qk(l.e/7)+Qk(t.e/7),(u=d.length)<(c=f.length)&&(o=d,d=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(e=0,i=u+r;i>r;)s=o[i]+f[r]*d[i-r-1]+e,o[i--]=s%Gk|0,e=s/Gk|0;o[i]=(o[i]+e)%Gk|0}for(;!o[--a];)o.pop();return e?++n:o.shift(),t.d=o,t.e=iT(o,n),Bk?nT(t,h.precision,h.rounding):t},Jk.toBinary=function(t,e){return bT(this,2,t,e)},Jk.toDecimalPlaces=Jk.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(Kk(t,0,1e9),void 0===e?e=r.rounding:Kk(e,0,8),nT(n,t+n.e+1,e))},Jk.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,!0):(Kk(t,0,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=rT(i):(Kk(t,0,1e9),void 0===e?e=o.rounding:Kk(e,0,8),n=rT(r=nT(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},Jk.toFraction=function(t){var e,n,r,i,o,a,s,u,c,l,h,d,f=this,p=f.d,y=f.constructor;if(!p)return new y(f);if(c=n=new y(1),r=u=new y(0),a=(o=(e=new y(r)).e=sT(p)-f.e-1)%7,e.d[0]=Yk(10,a<0?7+a:a),null==t)t=o>0?e:c;else{if(!(s=new y(t)).isInt()||s.lt(c))throw Error(Rk+s);t=s.gt(e)?o>0?e:c:s}for(Bk=!1,s=new y(Xk(p)),l=y.precision,y.precision=o=7*p.length*2;h=eT(s,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=c,c=u.plus(h.times(i)),u=i,i=e,e=s.minus(h.times(i)),s=i;return i=eT(t.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=f.s,d=eT(c,r,o,1).minus(f).abs().cmp(eT(u,n,o,1).minus(f).abs())<1?[c,r]:[u,n],y.precision=l,Bk=!0,d},Jk.toHexadecimal=Jk.toHex=function(t,e){return bT(this,16,t,e)},Jk.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:Kk(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(Bk=!1,n=eT(n,t,0,e,1).times(t),Bk=!0,nT(n)):(t.s=n.s,n=t),n},Jk.toNumber=function(){return+this},Jk.toOctal=function(t,e){return bT(this,8,t,e)},Jk.toPower=Jk.pow=function(t){var e,n,r,i,o,a,s=this,u=s.constructor,c=+(t=new u(t));if(!(s.d&&t.d&&s.d[0]&&t.d[0]))return new u(Yk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,t.eq(1))return nT(s,r,o);if((e=Qk(t.e/7))>=t.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=cT(u,s,n,r),t.s<0?new u(1).div(i):nT(i,r,o);if((a=s.s)<0){if(eu.maxE+1||e0?a/0:0):(Bk=!1,u.rounding=s.s=1,n=Math.min(12,(e+"").length),(i=dT(t.times(fT(s,r+n)),r)).d&&$k((i=nT(i,r+5,1)).d,r,o)&&(e=r+10,+Xk((i=nT(dT(t.times(fT(s,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=nT(i,r+1,0))),i.s=a,Bk=!0,u.rounding=o,nT(i,r,o))},Jk.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=rT(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(Kk(t,1,1e9),void 0===e?e=i.rounding:Kk(e,0,8),n=rT(r=nT(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},Jk.toSignificantDigits=Jk.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(Kk(t,1,1e9),void 0===e?e=n.rounding:Kk(e,0,8)),nT(new n(this),t,e)},Jk.toString=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},Jk.truncated=Jk.trunc=function(){return nT(new this.constructor(this),this.e+1,1)},Jk.valueOf=Jk.toJSON=function(){var t=this,e=t.constructor,n=rT(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var eT=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;)t.shift()}return function(r,i,o,a,s,u){var c,l,h,d,f,p,y,m,g,v,w,b,M,A,N,I,E,x,k,T,L=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new L(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(f=1,l=r.e-i.e):(u=Gk,f=7,l=Qk(r.e/f)-Qk(i.e/f)),k=C.length,E=j.length,v=(g=new L(S)).d=[],h=0;C[h]==(j[h]||0);h++);if(C[h]>(j[h]||0)&&l--,null==o?(A=o=L.precision,a=L.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),p=!0;else{if(A=A/f+2|0,h=0,1==k){for(d=0,C=C[0],A++;(h1&&(C=t(C,d,u),j=t(j,d,u),k=C.length,E=j.length),I=k,b=(w=j.slice(0,k)).length;b=u/2&&++x;do{d=0,(c=e(C,w,k,b))<0?(M=w[0],k!=b&&(M=M*u+(w[1]||0)),(d=M/x|0)>1?(d>=u&&(d=u-1),1==(c=e(y=t(C,d,u),w,m=y.length,b=w.length))&&(d--,n(y,k=10;d/=10)h++;g.e=h+l*f-1,nT(g,s?o+g.e+1:o,a,p)}return g}}();function nT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,s=h[0];s>=10;s/=10)i++;if((o=e-i)<0)o+=7,a=e,u=(l=h[d=0])/Yk(10,i-a-1)%10|0;else if((d=Math.ceil((o+1)/7))>=(s=h.length)){if(!r)break t;for(;s++<=d;)h.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=h[d],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Yk(10,i-a-1)%10|0}if(r=r||e<0||void 0!==h[d+1]||(a<0?l:l%Yk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Yk(10,i-a):0:h[d-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,c?(e-=t.e+1,h[0]=Yk(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=d,s=1,d--):(h.length=d+1,s=Yk(10,7-o),h[d]=a>0?(l/Yk(10,i-a)%Yk(10,a)|0)*s:0),c)for(;;){if(0==d){for(o=1,a=h[0];a>=10;a/=10)o++;for(a=h[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(t.e++,h[0]==Gk&&(h[0]=1));break}if(h[d]+=s,h[d]!=Gk)break;h[d--]=0,s=1}for(o=h.length;0===h[--o];)h.pop()}return Bk&&(t.e>f.maxE?(t.d=null,t.e=NaN):t.e0?o=o.charAt(0)+"."+o.slice(1)+uT(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+uT(-i-1)+o,n&&(r=n-a)>0&&(o+=uT(r))):i>=a?(o+=uT(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+uT(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=uT(r))),o}function iT(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function oT(t,e,n){if(e>qk)throw Bk=!0,n&&(t.precision=n),Error("[DecimalError] Precision limit exceeded");return nT(new t(zk),e,1,!0)}function aT(t,e,n){if(e>Zk)throw Error("[DecimalError] Precision limit exceeded");return nT(new t(Pk),e,n,!0)}function sT(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function uT(t){for(var e="";t--;)e+="0";return e}function cT(t,e,n,r){var i,o=new t(1),a=Math.ceil(r/7+4);for(Bk=!1;;){if(n%2&&MT((o=o.times(e)).d,a)&&(i=!0),0===(n=Qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}MT((e=e.times(e)).d,a)}return Bk=!0,o}function lT(t){return 1&t.d[t.d.length-1]}function hT(t,e,n){for(var r,i=new t(e[0]),o=0;++o17)return new d(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(Bk=!1,u=p):u=e,s=new d(.03125);t.e>-2;)t=t.times(s),h+=5;for(u+=r=Math.log(Yk(2,h))/Math.LN10*2+5|0,n=o=a=new d(1),d.precision=u;;){if(o=nT(o.times(t),u,1),n=n.times(++l),Xk((s=a.plus(eT(o,n,u,1))).d).slice(0,u)===Xk(a.d).slice(0,u)){for(i=h;i--;)a=nT(a.times(a),u,1);if(null!=e)return d.precision=p,a;if(!(c<3&&$k(a.d,u-r,f,c)))return nT(a,d.precision=p,f,Bk=!0);d.precision=u+=10,n=o=s=new d(1),l=0,c++}a=s}}function fT(t,e){var n,r,i,o,a,s,u,c,l,h,d,f=1,p=t,y=p.d,m=p.constructor,g=m.rounding,v=m.precision;if(p.s<0||!y||!y[0]||!p.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=p.s?NaN:y?0:p);if(null==e?(Bk=!1,l=v):l=e,m.precision=l+=10,r=(n=Xk(y)).charAt(0),!(Math.abs(o=p.e)<15e14))return c=oT(m,l+2,v).times(o+""),p=fT(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==e?nT(p,v,g,Bk=!0):p;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=Xk((p=p.times(t)).d)).charAt(0),f++;for(o=p.e,r>1?(p=new m("0."+n),o++):p=new m(r+"."+n.slice(1)),h=p,u=a=p=eT(p.minus(1),p.plus(1),l,1),d=nT(p.times(p),l,1),i=3;;){if(a=nT(a.times(d),l,1),Xk((c=u.plus(eT(a,new m(i),l,1))).d).slice(0,l)===Xk(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(oT(m,l+2,v).times(o+""))),u=eT(u,new m(f),l,1),null!=e)return m.precision=v,u;if(!$k(u.d,l-10,g,s))return nT(u,m.precision=v,g,Bk=!0);m.precision=l+=10,c=a=p=eT(h.minus(1),h.plus(1),l,1),d=nT(p.times(p),l,1),i=s=1}u=c,i+=2}}function pT(t){return String(t.s*t.s/0)}function yT(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),rt.constructor.maxE?(t.d=null,t.e=NaN):t.e-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),Hk.test(e))return yT(t,e)}else if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Fk.test(e))n=16,e=e.toLowerCase();else if(Wk.test(e))n=2;else{if(!Vk.test(e))throw Error(Rk+e);n=8}for((o=e.search(/p/i))>0?(u=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),a=(o=e.indexOf("."))>=0,r=t.constructor,a&&(o=(s=(e=e.replace(".","")).length)-o,i=cT(r,new r(n),o,2*o)),o=l=(c=tT(e,n,Gk)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*t.s):(t.e=iT(c,l),t.d=c,Bk=!1,a&&(t=eT(t,i,4*s)),u&&(t=t.times(Math.abs(u)<54?Yk(2,u):uL.pow(2,u))),Bk=!0,t)}function gT(t,e,n,r,i){var o,a,s,u,c=t.precision,l=Math.ceil(c/7);for(Bk=!1,u=n.times(n),s=new t(r);;){if(a=eT(s.times(u),new t(e++*e++),c,1),s=i?r.plus(a):r.minus(a),r=eT(a.times(u),new t(e++*e++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return Bk=!0,a.d.length=l+1,a}function vT(t,e){for(var n=t;--e;)n*=t;return n}function wT(t,e){var n,r=e.s<0,i=aT(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return jk=r?4:1,e;if((n=e.divToInt(i)).isZero())jk=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return jk=lT(n)?r?2:3:r?4:1,e;jk=lT(n)?r?1:4:r?3:2}return e.minus(i).abs()}function bT(t,e,n,r){var i,o,a,s,u,c,l,h,d,f=t.constructor,p=void 0!==n;if(p?(Kk(n,1,1e9),void 0===r?r=f.rounding:Kk(r,0,8)):(n=f.precision,r=f.rounding),t.isFinite()){for(p?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(l=rT(t)).indexOf("."))>=0&&(l=l.replace(".",""),(d=new f(1)).e=l.length-a,d.d=tT(rT(d),10,i),d.e=d.d.length),o=u=(h=tT(l,10,i)).length;0==h[--u];)h.pop();if(h[0]){if(a<0?o--:((t=new f(t)).d=h,t.e=o,h=(t=eT(t,d,n,r,0,i)).d,o=t.e,c=Sk),a=h[n],s=i/2,c=c||void 0!==h[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(t.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&h[n-1]||r===(t.s<0?8:7)),h.length=n,c)for(;++h[--n]>i-1;)h[n]=0,n||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(a=0,l="";a1)if(16==e||8==e){for(a=16==e?4:3,--u;u%a;u++)l+="0";for(u=(h=tT(l,i,e)).length;!h[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else oe)return t.length=e,!0}function AT(t){return new this(t).abs()}function NT(t){return new this(t).acos()}function IT(t){return new this(t).acosh()}function ET(t,e){return new this(t).plus(e)}function xT(t){return new this(t).asin()}function kT(t){return new this(t).asinh()}function TT(t){return new this(t).atan()}function LT(t){return new this(t).atanh()}function ST(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?aT(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=aT(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(eT(t,e,o,1)),e=aT(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(eT(t,e,o,1)):(n=aT(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function jT(t){return new this(t).cbrt()}function CT(t){return nT(t=new this(t),t.e+1,2)}function DT(t,e,n){return new this(t).clamp(e,n)}function OT(t){if(!t||"object"!=typeof t)throw Error("[DecimalError] Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Dk,0,"toExpPos",0,Dk,"maxE",0,Dk,"minE",-Dk,0,"modulo",0,9];for(e=0;e=o[e+1]&&r<=o[e+2]))throw Error(Rk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=_k[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Rk+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[n]=!0}else this[n]=!1}return this}function zT(t){return new this(t).cos()}function PT(t){return new this(t).cosh()}function _T(t,e){return new this(t).div(e)}function BT(t){return new this(t).exp()}function RT(t){return nT(t=new this(t),t.e+1,3)}function UT(){var t,e,n=new this(0);for(Bk=!1,t=0;t=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(e,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o=10;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function KT(t){return nT(t=new this(t),t.e+1,this.rounding)}function $T(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function tL(t){return new this(t).sin()}function eL(t){return new this(t).sinh()}function nL(t){return new this(t).sqrt()}function rL(t,e){return new this(t).sub(e)}function iL(){var t=0,e=arguments,n=new this(e[t]);for(Bk=!1;n.s&&++to.maxE?(i.e=NaN,i.d=null):t.e=10;n/=10)e++;return void(Bk?e>o.maxE?(i.e=NaN,i.d=null):en.call(e,...t))),e=void 0)}return n}zk=new uL(zk),Pk=new uL(Pk);class lL{constructor({blockchain:t,tokenIn:e,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:h,approvalRequired:d,getApproval:f,getPrep:p,getTransaction:y}){this.blockchain=t,this.tokenIn=e,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=cL([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOutMin=cL([l,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountOut=cL([c,"optionalAccess",t=>t.toString,"call",t=>t()]),this.amountInMax=cL([u,"optionalAccess",t=>t.toString,"call",t=>t()]),this.exchange=h,this.getPrep=p,this.getTransaction=y}}let hL=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];hL.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],hL.solana=["solana"];const dL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!hL.evm.includes(t.blockchain||e))return a;const s=await PN({blockchain:t.blockchain||e,method:"latestBlockNumber"});let u=[];for(var c=0;c<=2;c++)u.push(s-c);const l=await Promise.all(u.map((async i=>{let{amountIn:a}=await t.getAmounts({exchange:t,blockchain:e,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let h;if(l[0].gt(l[1])&&l[1].gt(l[2])){const t=l[0].sub(l[1]),e=l[1].sub(l[2]),n=t.add(e).div(2);if(h=l[0].add(n),h.gt(a))return h}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const t=l[0].sub(l[1]).abs(),e=l[1].sub(l[2]).abs();let n,r;if(n=t.lt(e)?t:e,r=l[0].gt(l[1])&&l[0].gt(l[2])?l[0]:l[1].gt(l[2])&&l[1].gt(l[0])?l[1]:l[2],h=r.add(n),h.gt(a))return h}return a},fL=async({exchange:t,blockchain:e,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:h,amountOutInput:d,amountInMaxInput:f,amountOutMinInput:p})=>{if(p||d){if(hL.evm.includes(t.blockchain||e))s=u=await dL({exchange:t,blockchain:e,pools:n,exchangePath:r,amountIn:s,amountOut:p||c});else if(hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=dL({exchange:t,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((t=>e.push(t))),o}}))),e.push(i[i.length-1]),s=u=(i=e)[0]}}else if((f||h)&&hL.solana.includes(t.blockchain||e)){let e=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:t,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((t=>(e.unshift(t),t))),n}}))),e.push(i[0]),c=l=(i=e.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},pL=t=>t.match("0x")?am(t):t;let yL=async({amount:t,blockchain:e,address:n})=>await Ak.BigNumber({amount:t,blockchain:e,address:n}),mL=async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await yL({amount:o,blockchain:t,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await yL({amount:s,blockchain:t,address:r})),i&&"number"==typeof i&&(u.amountIn=await yL({amount:i,blockchain:t,address:n})),a&&"number"==typeof a&&(u.amountInMax=await yL({amount:a,blockchain:t,address:n})),u};class gL{constructor(...t){Object.assign(this,...t)}async route({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return e===n?Promise.resolve():(void 0===t&&(this.scope?t=this.scope:1===this.blockchains.length&&(t=this.blockchains[0])),(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===t&&null!=e.blockchains&&e.blockchains.length>1)throw"You need to provide a blockchain when calling route on an exchange that supports multiple blockchains!";if(void 0!==o&&void 0!==i)throw"You cannot set amountIn and amountOut at the same time, use amountInMax or amountOutMin to describe the non exact part of the swap!";if(void 0!==a&&void 0!==s)throw"You cannot set amountInMax and amountOutMin at the same time, use amountIn or amountOut to describe the part of the swap that needs to be exact!";if(void 0!==i&&void 0!==a)throw"Setting amountIn and amountInMax at the same time makes no sense. Decide if amountIn needs to be exact or not!";if(void 0!==o&&void 0!==s)throw"Setting amountOut and amountOutMin at the same time makes no sense. Decide if amountOut needs to be exact or not!"})({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:h,slippage:d})=>{if(n=pL(n),r=pL(r),[i,o,a,s].filter(Boolean).length>1)throw"You can only pass one: amountIn, amountOut, amountInMax or amountOutMin";if([i,o,a,s].filter(Boolean).length<1)throw"You need to pass exactly one: amountIn, amountOut, amountInMax or amountOutMin";return new Promise((async f=>{let{path:p,exchangePath:y,pools:m}=await u({blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===p||0==p.length)return f();let g,[v,w,b,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:e,blockchain:t,path:p,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(t){return f()}if([i,a,o,s].every((t=>null==t)))return f();if(d||e.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await fL({exchange:e,blockchain:t,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M}))}catch(t){return f()}const A=await new Ak({blockchain:t,address:n}).decimals(),N=await new Ak({blockchain:t,address:r}).decimals();f(new lL({blockchain:t,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:N,path:p,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:e,getPrep:async({account:o})=>await l({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await h({exchange:e,blockchain:t,pools:m,path:p,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:w,amountInMaxInput:b,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await mL({blockchain:t,exchange:this,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:t,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function vL(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const wL=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},bL=({reserves:t,min:e,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?t[0].gte(cN(e.toString(),o)):i.toLowerCase()==n.toLowerCase()&&t[1].gte(cN(e.toString(),o)),ML=async({blockchain:t,exchange:e,path:n})=>{const r=wL({blockchain:t,exchange:e,path:n});if(!r||1===r.length)return!1;try{let i=await PN({blockchain:t,address:e[t].factory.address,method:"getPair",api:e[t].factory.api,cache:36e5,params:wL({blockchain:t,exchange:e,path:n})});if(!i||i==Hf[t].zero)return!1;let[o,a,s]=await Promise.all([PN({blockchain:t,address:i,method:"getReserves",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token0",api:e[t].pair.api,cache:36e5}),PN({blockchain:t,address:i,method:"token1",api:e[t].pair.api,cache:36e5})]);if(r.includes(Hf[t].wrapped.address))return bL({min:1,token:Hf[t].wrapped.address,decimals:Hf[t].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((e=>Hf[t].stables.usd.includes(e)))){let e=n.find((e=>Hf[t].stables.usd.includes(e))),r=new Ak({blockchain:t,address:e}),i=await r.decimals();return bL({min:1e3,token:e,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(t){return console.log("e",t),!1}};let AL=({blockchain:t,exchange:e,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsOut",api:e[t].router.api,params:{amountIn:r,path:wL({blockchain:t,exchange:e,path:n})}}).then((t=>{i(t[t.length-1])})).catch((()=>i()))})),NL=({blockchain:t,exchange:e,path:n,amountOut:r,block:i})=>new Promise((o=>{PN({blockchain:t,address:e[t].router.address,method:"getAmountsIn",api:e[t].router.api,params:{amountOut:r,path:wL({blockchain:t,exchange:e,path:n})},block:i}).then((t=>o(t[0]))).catch((()=>o()))}));var IL={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await ML({blockchain:t,exchange:e,path:[n,r]}))i=[n,r];else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[r,Hf[t].wrapped.address]}))i=[n,Hf[t].wrapped.address,r];else if(!Hf[t].stables.usd.includes(n)&&(await Promise.all(Hf[t].stables.usd.map((r=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length&&r!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[Hf[t].wrapped.address,r]})){let o=(await Promise.all(Hf[t].stables.usd.map((async r=>await ML({blockchain:t,exchange:e,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Hf[t].wrapped.address,r]}else if(n!=Hf[t].wrapped.address&&await ML({blockchain:t,exchange:e,path:[n,Hf[t].wrapped.address]})&&!Hf[t].stables.usd.includes(r)&&(await Promise.all(Hf[t].stables.usd.map((n=>ML({blockchain:t,exchange:e,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Hf[t].stables.usd.map((async n=>await ML({blockchain:t,exchange:e,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Hf[t].wrapped.address,o,r]}return vL([i,"optionalAccess",t=>t.length])&&i[0]==Hf[t].currency.address?i.splice(1,0,Hf[t].wrapped.address):vL([i,"optionalAccess",t=>t.length])&&i[i.length-1]==Hf[t].currency.address&&i.splice(i.length-1,0,Hf[t].wrapped.address),{path:i,exchangePath:wL({blockchain:t,exchange:e,path:i})}},pathExists:ML,getAmounts:async({blockchain:t,exchange:e,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:a,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(s){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:s,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}else if(c){if(null==(s=await NL({blockchain:t,exchange:e,block:r,path:n,amountOut:c,tokenIn:i,tokenOut:o}))||u&&s.gt(u))return{};void 0===u&&(u=s)}else if(u){if(null==(a=await AL({blockchain:t,exchange:e,path:n,amountIn:u,tokenIn:i,tokenOut:o}))||c&&a.lt(c))return{};void 0===c&&(c=a)}return{amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address?s||l?(d.method="swapExactETHForTokens",d.value=r.toString(),d.params={amountOutMin:a.toString()}):(u||c)&&(d.method="swapETHForExactTokens",d.value=i.toString(),d.params={amountOut:o.toString()}):n[n.length-1]===Hf[e].currency.address?s||l?(d.method="swapExactTokensForETH",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactETH",d.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(d.method="swapExactTokensForTokens",d.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(d.method="swapTokensForExactTokens",d.params={amountInMax:i.toString(),amountOut:o.toString()}),d.params=Object.assign({},d.params,{path:wL({blockchain:e,exchange:t,path:n}),to:h,deadline:Math.round(Date.now()/1e3)+86400}),d},ROUTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"amountADesired",type:"uint256"},{internalType:"uint256",name:"amountBDesired",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountTokenDesired",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"addLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"},{internalType:"uint256",name:"liquidity",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountIn",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"reserveIn",type:"uint256"},{internalType:"uint256",name:"reserveOut",type:"uint256"}],name:"getAmountOut",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsIn",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"}],name:"getAmountsOut",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"reserveA",type:"uint256"},{internalType:"uint256",name:"reserveB",type:"uint256"}],name:"quote",outputs:[{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETH",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityETHSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermit",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountETHMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountETH",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint256",name:"liquidity",type:"uint256"},{internalType:"uint256",name:"amountAMin",type:"uint256"},{internalType:"uint256",name:"amountBMin",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bool",name:"approveMax",type:"bool"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"removeLiquidityWithPermit",outputs:[{internalType:"uint256",name:"amountA",type:"uint256"},{internalType:"uint256",name:"amountB",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapETHForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactETHForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForETHSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactETH",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!1,internalType:"address",name:"pair",type:"address"},{indexed:!1,internalType:"uint256",name:"",type:"uint256"}],name:"PairCreated",type:"event"},{constant:!0,inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"allPairs",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"allPairsLength",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"}],name:"createPair",outputs:[{internalType:"address",name:"pair",type:"address"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"feeTo",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"feeToSetter",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"getPair",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeTo",type:"address"}],name:"setFeeTo",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_feeToSetter",type:"address"}],name:"setFeeToSetter",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[],payable:!1,stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1In",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount0Out",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1Out",type:"uint256"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint112",name:"reserve0",type:"uint112"},{indexed:!1,internalType:"uint112",name:"reserve1",type:"uint112"}],name:"Sync",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{constant:!0,inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"MINIMUM_LIQUIDITY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"getReserves",outputs:[{internalType:"uint112",name:"_reserve0",type:"uint112"},{internalType:"uint112",name:"_reserve1",type:"uint112"},{internalType:"uint32",name:"_blockTimestampLast",type:"uint32"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"_token0",type:"address"},{internalType:"address",name:"_token1",type:"address"}],name:"initialize",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"kLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[{internalType:"uint256",name:"liquidity",type:"uint256"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"price0CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"price1CumulativeLast",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"}],name:"skim",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"uint256",name:"amount0Out",type:"uint256"},{internalType:"uint256",name:"amount1Out",type:"uint256"},{internalType:"address",name:"to",type:"address"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[],name:"sync",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}]};const EL={name:"honeyswap",label:"Honeyswap",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABQCAYAAADBTPF9AAAACXBIWXMAAAsTAAALEwEAmpwYAAALmklEQVR4nO2de3BU1R3HP7+7eQALAcSNyq4ELDpUS0HJdrRm0aE6oPWJWqtQxUdn1KpcdQy04nssslQbdKxa7cC0iq22+BhsUQcfbBzQAL4V7VQM7OK4i4oJBJLs3l//uEHDkvfevbsb85nJHzn33PP73fu99+x5/M65Mt08jXwlVpuYCTwCjAS+BD5FeRXhaX+Vb51Tdja/khhZUsQpCGcBE4HRQCmwoqWFS8ZN8zU7ZctpJF8FjEbixSLyBnB0B4ebgZeAuzIRMhqJe0XkKuBKYFwn2c7xV/lW9NVGtjFy7UBniKKA1cnhUuA0oDYaSdyxLbLd09vyo5HEFBGJAGE6Fw+0Ux/ygrwV0D+1PKmqc4F1wGZgRwfZPCLcrKJ/i0bixT0tOxqJnyLCy3T8dqeAL9psLlH0+d577x5FuXagKwKh8teja+I/RRimKsMMQyeB/BL4BfZbuJcLRGQPcGl3ZUYj8eNBngK8aYc2AUtVeQk0CjQFQuW7nLqWbJG3v4FdYVd/PAxMSTv0G3+V70+dnxcfJSJrgcPbJStwm6reUwiCpZO3VWhXBEK+Dao6DViddui2aCQ+prPzROR37CteK8psf5XvjkIUDwpUQIBAqLxBVS8A/tsu2SciV3aUPxaJHwZcnpY83x/yLc+Wj25QsAICBELlCWB+WvL50Ui8bL/MIucC7dNr1dI/Zt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FS+I3deOs//AZb84smmUsyHAAAAAElFTkSuQmCC",protocol:"uniswap_v2",slippage:!0,blockchains:["gnosis"],gnosis:{router:{address:"0x1C232F01118CB8B424793ae03F870aa7D0ac7f77",api:IL.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:IL.FACTORY},pair:{api:IL.PAIR}}};var xL=t=>new gL(Object.assign(EL,{scope:t,findPath:t=>IL.findPath({...t,exchange:EL}),pathExists:t=>IL.pathExists({...t,exchange:EL}),getAmounts:t=>IL.getAmounts({...t,exchange:EL}),getPrep:t=>IL.getPrep({...t,exchange:EL}),getTransaction:t=>IL.getTransaction({...t,exchange:EL})}));const kL="79226673515401279992447579055",TL=t=>-t;class LL{static priceToSqrtPriceX64(t,e,n){return r=t.mul(uL.pow(10,n-e)).sqrt(),new rf(r.mul(uL.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(t,e,n){return(r=t,new uL(r.toString()).mul(uL.pow(2,-64))).pow(2).mul(uL.pow(10,e-n));var r}static tickIndexToSqrtPriceX64(t){return new rf(t>0?function(t){let e;e=new rf(0!=(1&t)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&t)&&(e=SL(e.mul(new rf("79236085330515764027303304731")),96,256));0!=(4&t)&&(e=SL(e.mul(new rf("79244008939048815603706035061")),96,256));0!=(8&t)&&(e=SL(e.mul(new rf("79259858533276714757314932305")),96,256));0!=(16&t)&&(e=SL(e.mul(new rf("79291567232598584799939703904")),96,256));0!=(32&t)&&(e=SL(e.mul(new rf("79355022692464371645785046466")),96,256));0!=(64&t)&&(e=SL(e.mul(new rf("79482085999252804386437311141")),96,256));0!=(128&t)&&(e=SL(e.mul(new rf("79736823300114093921829183326")),96,256));0!=(256&t)&&(e=SL(e.mul(new rf("80248749790819932309965073892")),96,256));0!=(512&t)&&(e=SL(e.mul(new rf("81282483887344747381513967011")),96,256));0!=(1024&t)&&(e=SL(e.mul(new rf("83390072131320151908154831281")),96,256));0!=(2048&t)&&(e=SL(e.mul(new rf("87770609709833776024991924138")),96,256));0!=(4096&t)&&(e=SL(e.mul(new rf("97234110755111693312479820773")),96,256));0!=(8192&t)&&(e=SL(e.mul(new rf("119332217159966728226237229890")),96,256));0!=(16384&t)&&(e=SL(e.mul(new rf("179736315981702064433883588727")),96,256));0!=(32768&t)&&(e=SL(e.mul(new rf("407748233172238350107850275304")),96,256));0!=(65536&t)&&(e=SL(e.mul(new rf("2098478828474011932436660412517")),96,256));0!=(131072&t)&&(e=SL(e.mul(new rf("55581415166113811149459800483533")),96,256));0!=(262144&t)&&(e=SL(e.mul(new rf("38992368544603139932233054999993551")),96,256));return SL(e,32,256)}(t):function(t){let e,n=Math.abs(t);e=new rf(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(e=SL(e.mul(new rf("18444899583751176498")),64,256));0!=(4&n)&&(e=SL(e.mul(new rf("18443055278223354162")),64,256));0!=(8&n)&&(e=SL(e.mul(new rf("18439367220385604838")),64,256));0!=(16&n)&&(e=SL(e.mul(new rf("18431993317065449817")),64,256));0!=(32&n)&&(e=SL(e.mul(new rf("18417254355718160513")),64,256));0!=(64&n)&&(e=SL(e.mul(new rf("18387811781193591352")),64,256));0!=(128&n)&&(e=SL(e.mul(new rf("18329067761203520168")),64,256));0!=(256&n)&&(e=SL(e.mul(new rf("18212142134806087854")),64,256));0!=(512&n)&&(e=SL(e.mul(new rf("17980523815641551639")),64,256));0!=(1024&n)&&(e=SL(e.mul(new rf("17526086738831147013")),64,256));0!=(2048&n)&&(e=SL(e.mul(new rf("16651378430235024244")),64,256));0!=(4096&n)&&(e=SL(e.mul(new rf("15030750278693429944")),64,256));0!=(8192&n)&&(e=SL(e.mul(new rf("12247334978882834399")),64,256));0!=(16384&n)&&(e=SL(e.mul(new rf("8131365268884726200")),64,256));0!=(32768&n)&&(e=SL(e.mul(new rf("3584323654723342297")),64,256));0!=(65536&n)&&(e=SL(e.mul(new rf("696457651847595233")),64,256));0!=(131072&n)&&(e=SL(e.mul(new rf("26294789957452057")),64,256));0!=(262144&n)&&(e=SL(e.mul(new rf("37481735321082")),64,256));return e}(t))}static sqrtPriceX64ToTickIndex(t){if(t.gt(new rf(kL))||t.lt(new rf("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const e=t.bitLength()-1,n=function(t,e,n){let r=t.toTwos(n).shln(e);return r.imaskn(n+1),r.fromTwos(n)}(new rf(e-64),32,128);let r=new rf("8000000000000000","hex"),i=0,o=new rf(0),a=e>=64?t.shrn(e-63):t.shln(63-e);for(;r.gt(new rf(0))&&i<14;){a=a.mul(a);let t=a.shrn(127);a=a.shrn(63+t.toNumber()),o=o.add(r.mul(t)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new rf("59543866431248")),c=SL(u.sub(new rf("184467440737095516")),64,128).toNumber(),l=SL(u.add(new rf("15793534762490258745")),64,128).toNumber();if(c==l)return c;return LL.tickIndexToSqrtPriceX64(l).lte(t)?l:c}static tickIndexToPrice(t,e,n){return LL.sqrtPriceX64ToPrice(LL.tickIndexToSqrtPriceX64(t),e,n)}static priceToTickIndex(t,e,n){return LL.sqrtPriceX64ToTickIndex(LL.priceToSqrtPriceX64(t,e,n))}static priceToInitializableTickIndex(t,e,n,r){return((t,e)=>t-t%e)(LL.priceToTickIndex(t,e,n),r)}static invertPrice(t,e,n){const r=LL.priceToTickIndex(t,e,n),i=TL(r);return LL.tickIndexToPrice(i,n,e)}static invertSqrtPriceX64(t){const e=LL.sqrtPriceX64ToTickIndex(t),n=TL(e);return LL.tickIndexToSqrtPriceX64(n)}}function SL(t,e,n){let r=t.toTwos(n).shrn(e);return r.imaskn(n-e+1),r.fromTwos(n-e)}const jL=new rf(1e4),CL=new rf(1e6),DL=new rf(0),OL=new rf(1),zL=new rf(2),PL=zL.pow(new rf(64)).sub(OL);class _L extends rf{toBuffer(){const t=super.toArray().reverse(),e=buffer.Buffer.from(t);if(8===e.length)return e;assert__default.default(e.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return e.copy(n),n}static fromBuffer(t){return assert__default.default(8===t.length,`Invalid buffer length: ${t.length}`),new _L([...t].reverse().map((t=>`00${t.toString(16)}`.slice(-2))).join(""),16)}}class BL{static mul(t,e,n){const r=t.mul(e);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!1,r)}static mulDivRoundUp(t,e,n,r){return this.mulDivRoundUpIf(t,e,n,!0,r)}static mulDivRoundUpIf(t,e,n,r,i){if(n.eq(DL))throw new Error("mulDiv denominator is zero");const o=this.mul(t,e,i),a=o.div(n);return r&&o.mod(n).gt(DL)?a.add(OL):a}static checked_mul_shift_right(t,e,n){return this.checked_mul_shift_right_round_up_if(t,e,!1,n)}static checked_mul_shift_right_round_up_if(t,e,n,r){if(t.eq(DL)||e.eq(DL))return DL;const i=this.mul(t,e,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new rf(2).pow(new rf(64)));const a=n&&o.and(PL).gt(DL);if(a&&o.eq(PL))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(OL):o}static isOverLimit(t,e){const n=zL.pow(new rf(e)).sub(OL);return t.gt(n)}static divRoundUp(t,e){return this.divRoundUpIf(t,e,!0)}static divRoundUpIf(t,e,n){if(e.eq(DL))throw new Error("divRoundUpIf - divide by zero");let r=t.div(e);return n&&t.mod(e).gt(DL)?r.add(OL):r}}const RL=(t,e,n)=>{const r=LL.tickIndexToSqrtPriceX64(t);return{nextTickPrice:r,nextSqrtPriceLimit:n?rf.max(e,r):rf.min(e,r)}},UL=(t,e)=>t.gt(e)?[e,t]:[t,e],QL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),h=r&&!l.eq(DL)?c.add(OL):c;if(h.gt(PL))throw new Error("Results larger than U64");return h},YL=(t,e,n,r)=>{let[i,o]=UL(t,e),a=o.sub(i);return BL.checked_mul_shift_right_round_up_if(n,a,r,128)},WL=(t,e,n,r,i)=>r===i?((t,e,n,r)=>{if(n.eq(DL))return t;let i=BL.mul(t,n,256),o=BL.mul(e,t,256).shln(64);if(BL.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=e.shln(64);if(!r&&a.lte(i))throw new Error("getNextSqrtPriceFromARoundUp - Unable to divide currLiquidityX64 by product");let s=r?a.add(i):a.sub(i),u=BL.divRoundUp(o,s);if(u.lt(new rf("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new rf(kL)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(t,e,n,r):((t,e,n,r)=>{let i=n.shln(64),o=BL.divRoundUpIf(i,e,!r);return r?t.add(o):t.sub(o)})(t,e,n,r),FL=(t,e,n,r,i)=>i===r?QL(t,e,n,r):YL(t,e,n,r),VL=(t,e,n,r,i,o,a)=>{let s=FL(r,i,n,o,a),u=t;if(o){u=BL.mulDiv(t,CL.sub(new rf(e)),CL,128)}let c=u.gte(s)?i:WL(r,n,u,o,a),l=c.eq(i),h=((t,e,n,r,i)=>i===r?YL(t,e,n,!r):QL(t,e,n,!r))(r,c,n,o,a);l||(s=FL(r,c,n,o,a));let d,f=o?s:h,p=o?h:s;if(!o&&p.gt(t)&&(p=t),o&&!l)d=t.sub(f);else{const t=new rf(e);d=BL.mulDivRoundUp(f,t,CL.sub(t),128)}return{amountIn:f,amountOut:p,nextPrice:c,feeAmount:d}},HL=(t,e,n)=>n?e.sub(t):e.add(t),GL=(t,e,n,r,i)=>{let o=r,a=i,s=t;if(e>0){let t=((t,e)=>t.mul(new _L(e).div(jL)))(s,e);s=s.sub(t),o=o.add(r)}if(n.gt(DL)){const t=s.shln(64).div(n);a=a.add(t)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},qL=pf([hf("mint"),hf("vault"),hf("authority"),yf("emissionsPerSecondX64"),yf("growthGlobalX64")]),ZL=pf([vf("anchorDiscriminator"),hf("whirlpoolsConfig"),Kd(wf(),1,"whirlpoolBump"),mf("tickSpacing"),Kd(wf(),2,"tickSpacingSeed"),mf("feeRate"),mf("protocolFeeRate"),yf("liquidity"),yf("sqrtPrice"),uf("tickCurrentIndex"),vf("protocolFeeOwedA"),vf("protocolFeeOwedB"),hf("tokenMintA"),hf("tokenVaultA"),yf("feeGrowthGlobalA"),hf("tokenMintB"),hf("tokenVaultB"),yf("feeGrowthGlobalB"),vf("rewardLastUpdatedTimestamp"),Kd(qL,3,"rewardInfos")]),JL=pf([af("initialized"),sf("liquidityNet"),yf("liquidityGross"),yf("feeGrowthOutsideA"),yf("feeGrowthOutsideB"),Kd(yf(),3,"reward_growths_outside")]),XL=pf([vf("anchorDiscriminator"),uf("startTickIndex"),Kd(JL,88,"ticks"),hf("whirlpool")]),KL=(t,e,n)=>{const r=(Math.floor(t/e/88)+n)*e*88,i=88*e;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},$L=async({pool:t,freshWhirlpoolData:e,aToB:n})=>{const r=await(async({aToB:t,pool:e,tickSpacing:n,tickCurrentIndex:r})=>{const i=t?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=KL(r+i,n,o)}catch(t){return a}const u=(await Xs.findProgramAddress([nf.from("tick_array"),new Xs(e.toString()).toBuffer(),nf.from(s.toString())],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=t?o-1:o+1}return a})({aToB:n,pool:t,tickSpacing:e.tickSpacing,tickCurrentIndex:e.tickCurrentIndex});return await Promise.all(r.map((async(t,e)=>{let n;try{n=await PN({blockchain:"solana",address:t.toString(),api:XL,cache:10})}catch(t){}return{address:t,data:n}})))};class tS{static fromTickIndex(t,e){const n=Math.floor(Math.floor(t/e)/88);let r=Math.floor(t%(88*e)/e);return r<0&&(r=88+r),new tS(n,r,e)}constructor(t,e,n){if(e>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(e<0)throw new Error("Invalid offsetIndex - value is smaller than 0");if(n<0)throw new Error("Invalid tickSpacing - value is less than 0");this.arrayIndex=t,this.offsetIndex=e,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return tS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class eS{constructor(t,e,n){if(!t[0]||!t[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const e of t){if(!e||!e.data)break;this.sequence.push({address:e.address,data:e.data})}this.tickArrays=t,this.tickSpacing=e,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=tS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(t){const e=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,t+e)}getNumOfTouchedArrays(){return this.touchedArrays.filter((t=>!!t)).length}getTouchedArrays(t){let e=this.touchedArrays.reduce(((t,e,n)=>(e&&t.push(this.sequence[n].address),t)),[]);if(0===e.length)return[];const n=t-e.length;return n>0&&(e=e.concat(Array(n).fill(e[e.length-1]))),e}getTick(t){const e=tS.fromTickIndex(t,this.tickSpacing);if(!this.isArrayIndexInBounds(e,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(e.arrayIndex,this.aToB),r=this.sequence[n].data;if(this.touchedArrays[n]=!0,!r)throw new Error(`TickArray at index ${n} is not initialized.`);if(!this.checkIfIndexIsInTickArrayRange(r.startTickIndex,t))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[e.offsetIndex]}findNextInitializedTickIndex(t){const e=this.aToB?t:t+this.tickSpacing;let n=tS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(n,this.aToB))throw new Error(`Swap input value traversed too many arrays. Out of bounds at attempt to traverse tick index - ${n.toTickIndex()}.`);for(;this.isArrayIndexInBounds(n,this.aToB);){const t=this.getTick(n.toTickIndex());if(t.initialized)return{nextIndex:n.toTickIndex(),nextTickData:t};n=this.aToB?n.toPrevInitializableTickIndex():n.toNextInitializableTickIndex()}return{nextIndex:Math.max(Math.min(this.aToB?n.toTickIndex()+this.tickSpacing:n.toTickIndex()-1,443636),-443636),nextTickData:null}}getLocalArrayIndex(t,e){return e?this.startArrayIndex-t:t-this.startArrayIndex}isArrayIndexInBounds(t,e){const n=this.getLocalArrayIndex(t.arrayIndex,e),r=this.sequence.length;return n>=0&&n=t&&e{try{const n=await PN({blockchain:"solana",address:t.pubkey.toString(),api:ZL,cache:10}),s=n.tokenMintA.toString()===e,u=await $L({pool:t.pubkey,freshWhirlpoolData:n,aToB:s}),c=new eS(u,n.tickSpacing,s),l=new rf(s?"4295048016":kL),h=!(!r&&!i);return{price:(({tokenAmount:t,aToB:e,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=t,s=DL,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,h=DL;const d=n.feeRate,f=n.protocolFeeRate;let p=new _L(0),y=e?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(DL)&&!i.eq(u);){let{nextIndex:t}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=RL(t,i,e);const g=VL(a,d,c,u,m,o,e);h=h.add(g.feeAmount),o?(a=a.sub(g.amountIn),a=a.sub(g.feeAmount),s=s.add(g.amountOut)):(a=a.sub(g.amountOut),s=s.add(g.amountIn),s=s.add(g.feeAmount));let{nextProtocolFee:v,nextFeeGrowthGlobalInput:w}=GL(g.feeAmount,f,c,p,y);if(p=v,y=w,g.nextPrice.eq(n)){const n=r.getTick(t);n.initialized&&(c=HL(n.liquidityNet,c,e)),l=e?t-1:t}else l=LL.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new rf((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:h}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(t){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let rS=async(t,e)=>{if(e===Hf.solana.wrapped.address)return[];return await PN("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:ZL.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:t}},{memcmp:{offset:181,bytes:e}}]},api:ZL,cache:86400,cacheKey:["whirlpool",t.toString(),e.toString()].join("-")})},iS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await rS(t,e);return 0===a.length&&(a=await rS(e,t)),a=a.filter((t=>t.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await nS({account:a,tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});return void 0!==s&&{pubkey:a.pubkey,price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l,data:{tokenVaultA:a.data.tokenVaultA,tokenVaultB:a.data.tokenVaultB}}})))).filter(Boolean),a}catch(t){return[]}},oS=async({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await iS({tokenIn:t,tokenOut:e,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(t=>t.reduce(((t,e)=>Fp.from(e.price).gt(Fp.from(t.price))?e:t)))(a):(t=>t.reduce(((t,e)=>Fp.from(e.price).lt(Fp.from(t.price))?e:t)))(a),s};function aS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const sS=Hf.solana;let uS=({path:t})=>{if(!t)return;let e=t.map(((e,n)=>e===sS.currency.address&&t[n+1]!=sS.wrapped.address&&t[n-1]!=sS.wrapped.address?sS.wrapped.address:e));return e[0]==sS.currency.address&&e[1]==sS.wrapped.address?e.splice(0,1):e[e.length-1]==sS.currency.address&&e[e.length-2]==sS.wrapped.address&&e.splice(e.length-1,1),e},cS=async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=t.length&&(t=uS({path:t}),(await iS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),lS=async({path:t,amountIn:e,amountInMax:n})=>{let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[0],tokenOut:t[1],amountIn:e,amountInMax:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[2],amountIn:e?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==t.length)return r},hS=async({path:t,amountOut:e,amountOutMin:n})=>{t=t.slice().reverse();let r=[Fp.from(e||n)];if(r.push(Fp.from((await oS({tokenIn:t[1],tokenOut:t[0],amountOut:e,amountOutMin:n})).price)),3===t.length&&r.push(Fp.from((await oS({tokenIn:t[2],tokenOut:t[1],amountOut:e?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==t.length)return r.slice().reverse()};const dS=Hf.solana,fS=new rf("14449647541112719096"),pS=new rf("16635068063392030915"),yS=async({instructions:t,owner:e,token:n,account:r})=>{let i;try{i=!!await PN({blockchain:"solana",address:r.toString()})}catch(t){}i||t.push(await Ak.solana.createAssociatedTokenAccountInstruction({token:n,owner:e,payer:e}))},mS=async({account:t,poolOne:e,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:h,tokenVaultTwoB:d})=>{let f=!1;const p=n.map(((t,e)=>!1!==f?n[f]:t.data?t:(f=e-1,n[e-1])));let y=!1;const m=u.map(((t,e)=>!1!==y?u[y]:t.data?t:(y=e-1,u[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(h.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(d.toString()),isWritable:!0,isSigner:!1},{pubkey:p[0].address,isWritable:!0,isSigner:!1},{pubkey:p[1].address,isWritable:!0,isSigner:!1},{pubkey:p[2].address,isWritable:!0,isSigner:!1},{pubkey:m[0].address,isWritable:!0,isSigner:!1},{pubkey:m[1].address,isWritable:!0,isSigner:!1},{pubkey:m[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(s.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},gS=({amount:t,otherAmountThreshold:e,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]),u=nf.alloc(s.span),s.encode({anchorDiscriminator:pS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},vS=async({account:t,pool:e,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((t,e)=>!1!==s?a[s]:t.data?t:(s=e-1,a[e-1])));return[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new Xs(t),isWritable:!1,isSigner:!0},{pubkey:new Xs(e.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new Xs(o.toString()),isWritable:!0,isSigner:!1},{pubkey:u[0].address,isWritable:!0,isSigner:!1},{pubkey:u[1].address,isWritable:!0,isSigner:!1},{pubkey:u[2].address,isWritable:!0,isSigner:!1},{pubkey:(await Xs.findProgramAddress([nf.from("oracle"),new Xs(e.toString()).toBuffer()],new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},wS=({amount:t,otherAmountThreshold:e,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]),a=nf.alloc(o.span),o.encode({anchorDiscriminator:fS,amount:new rf(t.toString()),otherAmountThreshold:new rf(e.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var bS={findPath:async({tokenIn:t,tokenOut:e,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([t,e].includes(sS.currency.address)&&[t,e].includes(sS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[t,e]:t!=sS.wrapped.address&&t!=sS.currency.address&&await cS({path:[t,sS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&e!=sS.wrapped.address&&e!=sS.currency.address&&await cS({path:[e,sS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[t,sS.wrapped.address,e]:!sS.stables.usd.includes(t)&&(s=(await Promise.all(sS.stables.usd.map((async e=>await cS({path:[t,e],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?e:void 0)))).filter(Boolean))&&!sS.stables.usd.includes(e)&&(u=(await Promise.all(sS.stables.usd.map((async t=>await cS({path:[e,t],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?t:void 0)))).filter(Boolean))&&(c=s.filter((t=>u.includes(t)))[0])&&(a=[t,c,e]),aS([a,"optionalAccess",t=>t.length])&&a[0]==sS.currency.address?a.splice(1,0,sS.wrapped.address):aS([a,"optionalAccess",t=>t.length])&&a[a.length-1]==sS.currency.address&&a.splice(a.length-1,0,sS.wrapped.address),{path:a,exchangePath:uS({path:a})}},pathExists:cS,getAmounts:async({path:t,tokenIn:e,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(t=uS({path:t}),r){if(s=await hS({path:t,amountOut:r,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(i){if(s=await lS({path:t,amountIn:i,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}else if(a){if(s=await hS({path:t,amountOutMin:a,tokenIn:e,tokenOut:n}),null==(i=s?s[0]:void 0)||o&&i.gt(o))return{};void 0===o&&(o=i)}else if(o){if(s=await lS({path:t,amountInMax:o,tokenIn:e,tokenOut:n}),null==(r=s?s[s.length-1]:void 0)||a&&r.lt(a))return{};void 0===a&&(a=r)}return{amountOut:r||a,amountIn:i||o,amountInMax:o||i,amountOutMin:a||r,amounts:s}},getTransaction:async({path:t,amountIn:e,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let h={blockchain:"solana"},d=[];const f=uS({path:t});if(f.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const p=f[0],y=3==f.length?f[1]:void 0,m=f[f.length-1];let g;2==f.length?g=[await oS({tokenIn:p,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await oS({tokenIn:p,tokenOut:y,amountIn:a||u})],g.push(await oS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await oS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await oS({tokenIn:p,tokenOut:y,amountOut:g[0].price})));let v,w=t[0]===dS.currency.address&&f[0]===dS.wrapped.address,b=t[t.length-1]===dS.currency.address&&f[f.length-1]===dS.wrapped.address;const M=await LN("solana");if(w||b){const t=await M.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span),n=Zl.generate();v=n.publicKey.toString();const r=w?new rf(e.toString()).add(new rf(t)):new rf(t);let i=Wu.createAccount({fromPubkey:new Xs(l),newAccountPubkey:new Xs(v),programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],d.push(i),d.push(Ak.solana.initializeAccountInstruction({account:v,token:dS.wrapped.address,owner:l}))}if(1===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:h}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await vS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:h,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?h:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:wS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:t,aToB:g[0].aToB})}))}else if(2===g.length){let t=!(!a&&!c),o=t?e:r,s=t?i:n,u=new Xs(w?v:await Ak.solana.findProgramAddress({owner:l,token:p})),h=f[1],y=new Xs(await Ak.solana.findProgramAddress({owner:l,token:h}));await yS({instructions:d,owner:l,token:h,account:y});let M=new Xs(b?v:await Ak.solana.findProgramAddress({owner:l,token:m}));b||await yS({instructions:d,owner:l,token:m,account:M}),d.push(new gu({programId:new Xs("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await mS({account:l,poolOne:g[0].pubkey,tickArraysOne:g[0].tickArrays,tokenAccountOneA:g[0].aToB?u:y,tokenVaultOneA:g[0].data.tokenVaultA,tokenAccountOneB:g[0].aToB?y:u,tokenVaultOneB:g[0].data.tokenVaultB,poolTwo:g[1].pubkey,tickArraysTwo:g[1].tickArrays,tokenAccountTwoA:g[1].aToB?y:M,tokenVaultTwoA:g[1].data.tokenVaultA,tokenAccountTwoB:g[1].aToB?M:y,tokenVaultTwoB:g[1].data.tokenVaultB}),data:gS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:t,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(w||b)&&d.push(Ak.solana.closeAccountInstruction({account:v,owner:l})),h.instructions=d,h},WHIRLPOOL_LAYOUT:ZL};const MS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImthdG1hbl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjRkZEMTVDIiBkPSJNNDg4LjQsMjIyLjljMCwxMDMuOC04NC4xLDE4Ny45LTE4Ny45LDE4Ny45Yy0xMDMuOCwwLTE4Ny45LTg0LjEtMTg3LjktMTg3LjlDMTEyLjYsMTE5LjEsMTk2LjcsMzUsMzAwLjUsMzUKCUM0MDQuMiwzNSw0ODguNCwxMTkuMSw0ODguNCwyMjIuOXoiLz4KPHBhdGggZmlsbD0iI0ZGRkZGRiIgc3Ryb2tlPSIjMDAwMDAwIiBzdHJva2Utd2lkdGg9IjE3LjY3NTUiIGQ9Ik0yMDkuNSwyOTkuOGMxLjYtMS4xLDMuMS0yLjgsMy45LTUuMWMwLjgtMi42LDAuMy00LjksMC02LjJjMCwwLDAtMC4xLDAtMC4xbDAuMy0xLjhjMC45LDAuNSwxLjksM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DIyLjFjLTEyLjItNy41LTM0LTEuNy00NC43LDEuOWMtMi42LDAuOS01LjItMS40LTQuMy00LjFjMy42LTEwLDEyLjYtMjguNiwyOS45LTMxCglDMzA2LjksMjIyLjQsMzA2LjksMjM2LDMwNi45LDIzNnoiLz4KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTMxOC4zLDE0Mi41Yy0yLjEtMy02LjQtMTEsNi44LTExYzEzLjIsMCwzMy4zLDE0LjksMzcuNCwyMC40Yy0xLjMsMy40LTkuOCw0LjEtMTQsMy44Yy00LjItMC4zLTExLjUtMS0xNy0zLjgKCUMzMjYsMTQ5LjIsMzIwLjUsMTQ1LjUsMzE4LjMsMTQyLjV6Ii8+Cjwvc3ZnPgo=",protocol:"orca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:bS.WHIRLPOOL_LAYOUT}}};var AS=t=>new gL(Object.assign(MS,{scope:t,findPath:t=>bS.findPath({...t,exchange:MS}),pathExists:t=>bS.pathExists({...t,exchange:MS}),getAmounts:t=>bS.getAmounts({...t,exchange:MS}),getPrep:t=>{},getTransaction:t=>bS.getTransaction({...t,exchange:MS})}));const NS={name:"pancakeswap",label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgM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LjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["bsc"],bsc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:IL.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:IL.FACTORY},pair:{api:IL.PAIR}}};var IS=t=>new gL(Object.assign(NS,{scope:t,findPath:t=>IL.findPath({...t,exchange:NS}),pathExists:t=>IL.pathExists({...t,exchange:NS}),getAmounts:t=>IL.getAmounts({...t,exchange:NS}),getPrep:t=>IL.getPrep({...t,exchange:NS}),getTransaction:t=>IL.getTransaction({...t,exchange:NS})}));function ES(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const xS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},kS=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=xS({blockchain:t,exchange:e,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;return n=r?await(async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:e,pool:t,inputAmount:r}):await(async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:e,pool:t,outputAmount:i}),{...t,amountIn:r||n,amountOut:i||n}}catch(t){}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let TS=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,LS=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var SS={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await kS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await kS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await kS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await kS({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return ES([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):ES([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:xS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await kS({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await LS({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await TS({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Hf[e].currency.address)return;let a;a=o===Hf[e].currency.address?t[e].smartRouter.address:t[e].router.address;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[a,Hf[e].maxInt]}}}},getTransaction:async({blockchain:t,exchange:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d,inputTokenPushed:f})=>{const p={blockchain:t,from:d},y=Math.floor(Date.now()/1e3)+21600,m=xS({blockchain:t,exchange:e,path:r});if(r[r.length-1]===Hf[t].currency.address){p.to=e[t].smartRouter.address,p.api=e[t].smartRouter.api,p.method="multicall";const r=new Og(e[t].smartRouter.api);if(p.params={data:[]},2===m.length)u||h?p.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}]));else{const d=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?p.params.data.push(r.encodeFunctionData("exactInput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&p.params.data.push(r.encodeFunctionData("exactOutput",[{path:d,recipient:e[t].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}p.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),d]))}else if(p.to=e[t].router.address,p.api=e[t].router.api,r[0]===Hf[t].currency.address&&(p.value=(i||o).toString()),2===m.length)u||h?(p.method="exactInputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}}):(c||l)&&(p.method="exactOutputSingle",p.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Hf[t].zero}});else{const t=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||h?(p.method="exactInput",p.params={params:{path:t,recipient:d,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(p.method="exactOutput",p.params={params:{path:t,recipient:d,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return p},ROUTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct ISwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct ISwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct ISwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],SMART_ROUTER:[{inputs:[{internalType:"address",name:"_factoryV2",type:"address"},{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factoryV3",type:"address"},{internalType:"address",name:"_positionManager",type:"address"},{internalType:"address",name:"_stableFactory",type:"address"},{internalType:"address",name:"_stableInfo",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"factory",type:"address"},{indexed:!0,internalType:"address",name:"info",type:"address"}],name:"SetStableSwap",type:"event"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMax",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"approveZeroThenMaxMinusOne",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"data",type:"bytes"}],name:"callPositionManager",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"paths",type:"bytes[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint24",name:"maximumTickDivergence",type:"uint24"},{internalType:"uint32",name:"secondsAgo",type:"uint32"}],name:"checkOracleSlippage",outputs:[],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactInputParams",name:"params",type:"tuple"}],name:"exactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinimum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactInputSingleParams",name:"params",type:"tuple"}],name:"exactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactInputStableSwap",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"}],internalType:"struct IV3SwapRouter.ExactOutputParams",name:"params",type:"tuple"}],name:"exactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMaximum",type:"uint256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IV3SwapRouter.ExactOutputSingleParams",name:"params",type:"tuple"}],name:"exactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address[]",name:"path",type:"address[]"},{internalType:"uint256[]",name:"flag",type:"uint256[]"},{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address",name:"to",type:"address"}],name:"exactOutputStableSwap",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factoryV2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"getApprovalType",outputs:[{internalType:"enum IApproveAndCall.ApprovalType",name:"",type:"uint8"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"}],internalType:"struct IApproveAndCall.IncreaseLiquidityParams",name:"params",type:"tuple"}],name:"increaseLiquidity",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint256",name:"amount0Min",type:"uint256"},{internalType:"uint256",name:"amount1Min",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],internalType:"struct IApproveAndCall.MintParams",name:"params",type:"tuple"}],name:"mint",outputs:[{internalType:"bytes",name:"result",type:"bytes"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes32",name:"previousBlockhash",type:"bytes32"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes[]",name:"data",type:"bytes[]"}],name:"multicall",outputs:[{internalType:"bytes[]",name:"results",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"positionManager",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"pull",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"refundETH",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermit",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowed",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"expiry",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitAllowedIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"selfPermitIfNecessary",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_info",type:"address"}],name:"setStableSwap",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stableSwapFactory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"stableSwapInfo",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"address[]",name:"path",type:"address[]"},{internalType:"address",name:"to",type:"address"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"}],name:"sweepToken",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"sweepTokenWithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"}],name:"unwrapWETH9",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountMinimum",type:"uint256"},{internalType:"uint256",name:"feeBips",type:"uint256"},{internalType:"address",name:"feeRecipient",type:"address"}],name:"unwrapWETH9WithFee",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"value",type:"uint256"}],name:"wrapETH",outputs:[],stateMutability:"payable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"_poolDeployer",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"bool",name:"whitelistRequested",type:"bool"},{indexed:!1,internalType:"bool",name:"enabled",type:"bool"}],name:"FeeAmountExtraInfoUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"lmPoolDeployer",type:"address"}],name:"SetLmPoolDeployer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!1,internalType:"bool",name:"verified",type:"bool"}],name:"WhiteListAdded",type:"event"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacingExtraInfo",outputs:[{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPoolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"poolDeployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"bool",name:"whitelistRequested",type:"bool"},{internalType:"bool",name:"enabled",type:"bool"}],name:"setFeeAmountExtraInfo",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pool",type:"address"},{internalType:"address",name:"lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPoolDeployer",type:"address"}],name:"setLmPoolDeployer",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"bool",name:"verified",type:"bool"}],name:"setWhiteListAddress",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint32",name:"feeProtocol0Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1Old",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol0New",type:"uint32"},{indexed:!1,internalType:"uint32",name:"feeProtocol1New",type:"uint32"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"addr",type:"address"}],name:"SetLmPoolEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"protocolFeesToken1",type:"uint128"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"lmPool",outputs:[{internalType:"contract IPancakeV3LmPool",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32",name:"feeProtocol0",type:"uint32"},{internalType:"uint32",name:"feeProtocol1",type:"uint32"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_lmPool",type:"address"}],name:"setLmPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint32",name:"feeProtocol",type:"uint32"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_deployer",type:"address"},{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"deployer",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"pancakeV3SwapCallback",outputs:[],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]};const jS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYxMyAxOTguNTg1IDQ1LjMwNiAxOTEuNTggMjguNzA3OSAxNzguOTk4QzExLjkxMDggMTY2LjI2NSAzIDE0OC4xOTUgMyAxMjcuNzQ4QzMgMTA4LjA0NyAxMS44OTEzIDkzLjg0MTEgMjEuOTUxNyA4NC4yMzg1QzI5LjgzNTkgNzYuNzEzMiAzOC41MzYzIDcxLjg5MzYgNDQuNTk0NSA2OS4xMjEzQzQzLjIyNDUgNjQuOTU5NCA0MS41MTUzI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i4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:SS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:SS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:SS.FACTORY},pair:{api:SS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:SS.QUOTER}}};var CS=t=>new gL(Object.assign(jS,{scope:t,findPath:t=>SS.findPath({...t,exchange:jS}),pathExists:t=>SS.pathExists({...t,exchange:jS}),getAmounts:t=>SS.getAmounts({...t,exchange:jS}),getPrep:t=>SS.getPrep({...t,exchange:jS}),getTransaction:t=>SS.getTransaction({...t,exchange:jS})}));const DS={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwLXBhdGgiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMy43OCAtMjMuNzcpIj48cmVjdCB3aWR0aD0iNzUwIiBoZWlnaHQ9Ijc1MCIgZmlsbD0ibm9uZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwLXBhdGgpIj48cGF0aCBkPSJNMzU0Ljc0LDI0LjM3YTM1M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4IC0yMy43NykiIGZpbGw9IiM1NTkxY2QiLz48cGF0aCBkPSJNMzU0LjA1LDExNy4xNGMtLjc5LDEuMDctMiwuNjItMywuNzNoLTEuNTFjMS4zMy0xLjMsMy0uNTIsNC41LS43MiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiM2ODlhZDEiLz48cGF0aCBkPSJNMjgyLjA2LDYzOS4xMmExODIuMywxODIuMywwLDAsMCw3MS44MS0xMS4zMSwyMTQsMjE0LDAsMCwwLDYxLjYxLTM0LjY3YzE4LjA5LTE0LjY4LDMzLjY2LTMxLjUzLDQ0LjA2LTUyLjYxYTEwMS4zNiwxMDEuMzYsMCwwLDAsMTAuMjItMzZjMS0xMS4zMS0uODgtMjItMy45NS0zMi42NC4zNC0yLjYxLDIuNzItMy44LDQuMTEtNS42Myw1LjM4LTcuMDcsOS4zNS0xNC42OSwxMS0yMy40NmEyNy40MywyNy40MywwLDAsMSwxLjIxLTMuNDMsMTExLDExMSwwLDAsMSw4LDIxLjE2YzIuNjMsMTAuMzEsNC4xMSwyMC44LDMuMzMsMzEuNGExMjMuMzEsMTIzLjMxLDAsMCwxLTE2LjA2LDUyLjMyYy05LjE2LDE2LjE1LTIxLDMwLTM0LjYsNDIuMzdhMTk5Ljg5LDE5OS44OSwwLDAsMS0zOS4zNywyNy41NCwyMTkuNSwyMTkuNSwwLDAsMS01NC4yNiwyMC43MSwyMDkuMjcsMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:IL.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:IL.FACTORY},pair:{api:IL.PAIR}}};var OS=t=>new gL(Object.assign(DS,{scope:t,findPath:t=>IL.findPath({...t,exchange:DS}),pathExists:t=>IL.pathExists({...t,exchange:DS}),getAmounts:t=>IL.getAmounts({...t,exchange:DS}),getPrep:t=>IL.getPrep({...t,exchange:DS}),getTransaction:t=>IL.getTransaction({...t,exchange:DS})}));const zS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiMxMjExMjIiIGQ9Ik0zNC4yLDMyMGMwLDE1OC41LDEyOC41LDI4Ni4zLDI4Ni4zLDI4Ni4zYzE1OC41LDAsMjg2LjMtMTI4LjUsMjg2LjMtMjg2LjNjMC0xNTguNS0xMjguNS0yODYuMy0yODYuMy0yODYuMwoJCUMxNjIuNywzMy43LDM0LjIsMTYyLjIsMzQuMiwzMjBMMzQuMiwzMjB6Ii8+Cgk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0YyRjRGOCIgZD0iTTEyMC45LDI0Ny42Yy0zLjMsMjIuMiwwLjcsNDUuNyw0LjYsNjcuOGMyLDMuMyw1LjIsNS45LDkuOCw3LjJjLTkuMSwxOS42LTE0LjM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gkJYy0yNy40LDQuNi0xMjAuNyw3LjItMjEwLDcuOGMtODkuMywwLjctMTkzLjctMi42LTIxNi41LTUuOUM4My4xLDM0OS4zLDU3LjcsMzQyLjgsNjIuMiwzMzUuN0w2Mi4yLDMzNS43eiIvPgoJPHBhdGggZmlsbD0iI0ZGOTlBNSIgZD0iTTQ4My41LDI1Ni4xYzAsMC01OC43LTE1LTE2Mi40LTE1Yy0xMTEuNSwwLTE2NSwxNy0xNjUsMTdzLTYuNSwxMi40LTkuMSwxOC45Yy0yLjYsNy4yLTkuMSwyNS40LTkuMSwyNS40CgkJUzIxOC44LDI4OCwzMjIuNSwyODhjNjIuNiwwLDEyNC42LDUuMiwxODYuNSwxNS43YzAsMC05LjEtMjIuMi0xNS0zMS4zQzQ5MC43LDI2Ny4yLDQ4Ny41LDI2MS4zLDQ4My41LDI1Ni4xTDQ4My41LDI1Ni4xeiIvPgoJPHBhdGggZmlsbD0iI0ZGRTYwMCIgZD0iTTEzMy4zLDEzMS41YzYuNS0wLjcsMTUuNywxOS42LDE1LjcsMTkuNnMyMC45LTUuOSwyNC44LDBjMy4zLDUuOS0xNSwxOS42LTE1LDE5LjZzMTEuMSwxOS42LDcuMiwyMy41CgkJYy0zLjMsMy45LTIyLjgtOC41LTIyLjgtOC41cy0xNSwxNy0xOS42LDE0LjNjLTUuMi0yLjYsMC43LTI0LjgsMC43LTI0LjhzLTIxLjUtOS4xLTE5LjYtMTQuM2MxLjMtNS4yLDIzLjUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:IL.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:IL.FACTORY},pair:{api:IL.PAIR}}};var PS=t=>new gL(Object.assign(zS,{scope:t,findPath:t=>IL.findPath({...t,exchange:zS}),pathExists:t=>IL.pathExists({...t,exchange:zS}),getAmounts:t=>IL.getAmounts({...t,exchange:zS}),getPrep:t=>IL.getPrep({...t,exchange:zS}),getTransaction:t=>IL.getTransaction({...t,exchange:zS})}));function _S(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const BS=({blockchain:t,path:e})=>{if(!e)return;let n=e.map(((n,r)=>n===Hf[t].currency.address&&e[r+1]!=Hf[t].wrapped.address&&e[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:n));return n[0]==Hf[t].currency.address&&n[1]==Hf[t].wrapped.address?n.splice(0,1):n[n.length-1]==Hf[t].currency.address&&n[n.length-2]==Hf[t].wrapped.address&&n.splice(n.length-1,1),n},RS=async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=BS({blockchain:e,path:n}),a=r?await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((t=>"0"===t.toString())))return a};let US=async({exchange:t,blockchain:e,path:n,pools:r,amountIn:i})=>{let o=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountIn",api:t[e].quoter.api,cache:5,params:{route:BS({blockchain:e,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},QS=async({exchange:t,blockchain:e,path:n,pools:r,amountOut:i,block:o})=>{let a=await PN({blockchain:Hf[e].name,address:t[e].quoter.address,method:"findBestPathFromAmountOut",api:t[e].quoter.api,cache:5,block:o,params:{route:BS({blockchain:e,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var YS={findPath:async({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[e].currency.address)&&[n,r].includes(Hf[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await RS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[e].wrapped.address||r==Hf[e].wrapped.address||(c=[],o||s?(c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,Hf[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[Hf[e].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Hf[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await RS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await RS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await RS({exchange:t,blockchain:e,path:[u,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return _S([u,"optionalAccess",t=>t.length])&&u[0]==Hf[e].currency.address?u.splice(1,0,Hf[e].wrapped.address):_S([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[e].currency.address&&u.splice(u.length-1,0,Hf[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:BS({blockchain:e,path:u})}},pathExists:async({exchange:t,blockchain:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await RS({exchange:t,blockchain:e,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:t,blockchain:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await QS({exchange:t,blockchain:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await US({exchange:t,blockchain:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getTransaction:async({exchange:t,blockchain:e,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:h,account:d})=>{const f={blockchain:e,from:d,to:t[e].router.address,api:t[e].router.api},p=Math.round(Date.now()/1e3)+86400,y=[n.map((t=>t.binSteps[0])),n.map((t=>t.versions[0])),BS({blockchain:e,path:r})];return r[0]===Hf[e].currency.address?l?(f.method="swapNATIVEForExactTokens",f.params={amountOut:a,path:y,to:d,deadline:p},f.value=o):(f.method="swapExactNATIVEForTokens",f.params={amountOutMin:s||a,path:y,to:d,deadline:p},f.value=i):r[r.length-1]===Hf[e].currency.address?l?(f.method="swapTokensForExactNATIVE",f.params={amountNATIVEOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForNATIVE",f.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:d,deadline:p}):l?(f.method="swapTokensForExactTokens",f.params={amountOut:a,amountInMax:o,path:y,to:d,deadline:p}):(f.method="swapExactTokensForTokens",f.params={amountIn:i,amountOutMin:s||a,path:y,to:d,deadline:p}),f},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;const o=await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].router.address]});if(o.gte(r))return;return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].router.address,r.sub(o)]}}},ROUTER:[{inputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"},{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"},{internalType:"contract ILBLegacyFactory",name:"legacyFactory",type:"address"},{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"},{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[{internalType:"uint256",name:"amountSlippage",type:"uint256"}],name:"LBRouter__AmountSlippageBPTooBig",type:"error"},{inputs:[{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],name:"LBRouter__AmountSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__BinReserveOverflows",type:"error"},{inputs:[],name:"LBRouter__BrokenSwapSafetyCheck",type:"error"},{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint256",name:"currentTimestamp",type:"uint256"}],name:"LBRouter__DeadlineExceeded",type:"error"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBRouter__FailedToSendNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"idDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"}],name:"LBRouter__IdDesiredOverflows",type:"error"},{inputs:[{internalType:"int256",name:"id",type:"int256"}],name:"LBRouter__IdOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"uint256",name:"activeId",type:"uint256"}],name:"LBRouter__IdSlippageCaught",type:"error"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"LBRouter__InsufficientAmountOut",type:"error"},{inputs:[{internalType:"address",name:"wrongToken",type:"address"}],name:"LBRouter__InvalidTokenPath",type:"error"},{inputs:[{internalType:"uint256",name:"version",type:"uint256"}],name:"LBRouter__InvalidVersion",type:"error"},{inputs:[],name:"LBRouter__LengthsMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"amountInMax",type:"uint256"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"LBRouter__MaxAmountInExceeded",type:"error"},{inputs:[],name:"LBRouter__NotFactoryOwner",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBRouter__PairNotCreated",type:"error"},{inputs:[],name:"LBRouter__SenderIsNotWNATIVE",type:"error"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"LBRouter__SwapOverflows",type:"error"},{inputs:[{internalType:"uint256",name:"excess",type:"uint256"}],name:"LBRouter__TooMuchTokensIn",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint256",name:"reserve",type:"uint256"}],name:"LBRouter__WrongAmounts",type:"error"},{inputs:[{internalType:"address",name:"tokenX",type:"address"},{internalType:"address",name:"tokenY",type:"address"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"msgValue",type:"uint256"}],name:"LBRouter__WrongNativeLiquidityParameters",type:"error"},{inputs:[],name:"LBRouter__WrongTokenOrder",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidity",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"},{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256",name:"activeIdDesired",type:"uint256"},{internalType:"uint256",name:"idSlippage",type:"uint256"},{internalType:"int256[]",name:"deltaIds",type:"int256[]"},{internalType:"uint256[]",name:"distributionX",type:"uint256[]"},{internalType:"uint256[]",name:"distributionY",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"address",name:"refundTo",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ILBRouter.LiquidityParameters",name:"liquidityParameters",type:"tuple"}],name:"addLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountXAdded",type:"uint256"},{internalType:"uint256",name:"amountYAdded",type:"uint256"},{internalType:"uint256",name:"amountXLeft",type:"uint256"},{internalType:"uint256",name:"amountYLeft",type:"uint256"},{internalType:"uint256[]",name:"depositIds",type:"uint256[]"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"lbFactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactory",outputs:[{internalType:"contract ILBLegacyFactory",name:"legacyLBfactory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouter",outputs:[{internalType:"contract ILBLegacyRouter",name:"legacyRouter",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"},{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getV1Factory",outputs:[{internalType:"contract IJoeFactory",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getWNATIVE",outputs:[{internalType:"contract IWNATIVE",name:"wnative",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountXMin",type:"uint256"},{internalType:"uint256",name:"amountYMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidity",outputs:[{internalType:"uint256",name:"amountX",type:"uint256"},{internalType:"uint256",name:"amountY",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint256",name:"amountTokenMin",type:"uint256"},{internalType:"uint256",name:"amountNATIVEMin",type:"uint256"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"removeLiquidityNATIVE",outputs:[{internalType:"uint256",name:"amountToken",type:"uint256"},{internalType:"uint256",name:"amountNATIVE",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactNATIVEForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVE",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMinNATIVE",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForNATIVESupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint256",name:"amountOutMin",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapExactTokensForTokensSupportingFeeOnTransferTokens",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapNATIVEForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"amountNATIVEOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address payable",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactNATIVE",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint256",name:"amountInMax",type:"uint256"},{components:[{internalType:"uint256[]",name:"pairBinSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"contract IERC20[]",name:"tokenPath",type:"address[]"}],internalType:"struct ILBRouter.Path",name:"path",type:"tuple"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"swapTokensForExactTokens",outputs:[{internalType:"uint256[]",name:"amountsIn",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"sweep",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBToken",name:"lbToken",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"sweepLBToken",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[{internalType:"address",name:"feeRecipient",type:"address"},{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"LBFactory__AddressZero",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepHasNoPreset",type:"error"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__BinStepTooLow",type:"error"},{inputs:[{internalType:"uint256",name:"fees",type:"uint256"},{internalType:"uint256",name:"maxFees",type:"uint256"}],name:"LBFactory__FlashLoanFeeAboveMax",type:"error"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"LBFactory__IdenticalAddresses",type:"error"},{inputs:[],name:"LBFactory__ImplementationNotSet",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"_binStep",type:"uint256"}],name:"LBFactory__LBPairAlreadyExists",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairDoesNotExist",type:"error"},{inputs:[],name:"LBFactory__LBPairIgnoredIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__LBPairNotCreated",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__LBPairSafetyCheckFailed",type:"error"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"LBFactory__PresetIsLockedForUsers",type:"error"},{inputs:[],name:"LBFactory__PresetOpenStateIsAlreadyInTheSameState",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetAlreadyWhitelisted",type:"error"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"LBFactory__QuoteAssetNotWhitelisted",type:"error"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"LBFactory__SameFeeRecipient",type:"error"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"LBFactory__SameFlashLoanFee",type:"error"},{inputs:[{internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBFactory__SameImplementation",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"PendingOwnable__AddressZero",type:"error"},{inputs:[],name:"PendingOwnable__NoPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotOwner",type:"error"},{inputs:[],name:"PendingOwnable__NotPendingOwner",type:"error"},{inputs:[],name:"PendingOwnable__PendingOwnerAlreadySet",type:"error"},{inputs:[],name:"SafeCast__Exceeds16Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldRecipient",type:"address"},{indexed:!1,internalType:"address",name:"newRecipient",type:"address"}],name:"FeeRecipientSet",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"oldFlashLoanFee",type:"uint256"},{indexed:!1,internalType:"uint256",name:"newFlashLoanFee",type:"uint256"}],name:"FlashLoanFeeSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"tokenX",type:"address"},{indexed:!0,internalType:"contract IERC20",name:"tokenY",type:"address"},{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"uint256",name:"pid",type:"uint256"}],name:"LBPairCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract ILBPair",name:"LBPair",type:"address"},{indexed:!1,internalType:"bool",name:"ignored",type:"bool"}],name:"LBPairIgnoredStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"oldLBPairImplementation",type:"address"},{indexed:!1,internalType:"address",name:"LBPairImplementation",type:"address"}],name:"LBPairImplementationSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"PendingOwnerSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!0,internalType:"bool",name:"isOpen",type:"bool"}],name:"PresetOpenStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"}],name:"PresetRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"binStep",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"filterPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"decayPeriod",type:"uint256"},{indexed:!1,internalType:"uint256",name:"reductionFactor",type:"uint256"},{indexed:!1,internalType:"uint256",name:"variableFeeControl",type:"uint256"},{indexed:!1,internalType:"uint256",name:"protocolShare",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"}],name:"PresetSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"QuoteAssetRemoved",type:"event"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"addQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"becomeOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint24",name:"activeId",type:"uint24"},{internalType:"uint16",name:"binStep",type:"uint16"}],name:"createLBPair",outputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBPair",name:"pair",type:"address"}],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getAllBinSteps",outputs:[{internalType:"uint256[]",name:"binStepWithPreset",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"}],name:"getAllLBPairs",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation[]",name:"lbPairsAvailable",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFeeRecipient",outputs:[{internalType:"address",name:"feeRecipient",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFlashLoanFee",outputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getLBPairAtIndex",outputs:[{internalType:"contract ILBPair",name:"lbPair",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLBPairImplementation",outputs:[{internalType:"address",name:"lbPairImplementation",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenA",type:"address"},{internalType:"contract IERC20",name:"tokenB",type:"address"},{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getLBPairInformation",outputs:[{components:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"contract ILBPair",name:"LBPair",type:"address"},{internalType:"bool",name:"createdByOwner",type:"bool"},{internalType:"bool",name:"ignoredForRouting",type:"bool"}],internalType:"struct ILBFactory.LBPairInformation",name:"lbPairInformation",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMaxFlashLoanFee",outputs:[{internalType:"uint256",name:"maxFee",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMinBinStep",outputs:[{internalType:"uint256",name:"minBinStep",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getNumberOfLBPairs",outputs:[{internalType:"uint256",name:"lbPairNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfQuoteAssets",outputs:[{internalType:"uint256",name:"numberOfQuoteAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOpenBinSteps",outputs:[{internalType:"uint256[]",name:"openBinStep",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"binStep",type:"uint256"}],name:"getPreset",outputs:[{internalType:"uint256",name:"baseFactor",type:"uint256"},{internalType:"uint256",name:"filterPeriod",type:"uint256"},{internalType:"uint256",name:"decayPeriod",type:"uint256"},{internalType:"uint256",name:"reductionFactor",type:"uint256"},{internalType:"uint256",name:"variableFeeControl",type:"uint256"},{internalType:"uint256",name:"protocolShare",type:"uint256"},{internalType:"uint256",name:"maxVolatilityAccumulator",type:"uint256"},{internalType:"bool",name:"isOpen",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"getQuoteAssetAtIndex",outputs:[{internalType:"contract IERC20",name:"asset",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"contract IERC20",name:"token",type:"address"}],name:"isQuoteAsset",outputs:[{internalType:"bool",name:"isQuote",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"}],name:"removePreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"quoteAsset",type:"address"}],name:"removeQuoteAsset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"revokePendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"feeRecipient",type:"address"}],name:"setFeeRecipient",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setFeesParametersOnPair",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"flashLoanFee",type:"uint256"}],name:"setFlashLoanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"},{internalType:"contract IERC20",name:"tokenY",type:"address"},{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"ignored",type:"bool"}],name:"setLBPairIgnored",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newLBPairImplementation",type:"address"}],name:"setLBPairImplementation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner_",type:"address"}],name:"setPendingOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPreset",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"binStep",type:"uint16"},{internalType:"bool",name:"isOpen",type:"bool"}],name:"setPresetOpenState",outputs:[],stateMutability:"nonpayable",type:"function"}],PAIR:[{inputs:[{internalType:"contract ILBFactory",name:"factory_",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"AddressHelper__CallFailed",type:"error"},{inputs:[],name:"AddressHelper__NonContract",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"BinHelper__CompositionFactorFlawed",type:"error"},{inputs:[],name:"BinHelper__LiquidityOverflow",type:"error"},{inputs:[],name:"FeeHelper__FeeTooLarge",type:"error"},{inputs:[],name:"LBPair__AddressZero",type:"error"},{inputs:[],name:"LBPair__AlreadyInitialized",type:"error"},{inputs:[],name:"LBPair__EmptyMarketConfigs",type:"error"},{inputs:[],name:"LBPair__FlashLoanCallbackFailed",type:"error"},{inputs:[],name:"LBPair__FlashLoanInsufficientAmount",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountIn",type:"error"},{inputs:[],name:"LBPair__InsufficientAmountOut",type:"error"},{inputs:[],name:"LBPair__InvalidInput",type:"error"},{inputs:[],name:"LBPair__InvalidStaticFeeParameters",type:"error"},{inputs:[],name:"LBPair__MaxTotalFeeExceeded",type:"error"},{inputs:[],name:"LBPair__OnlyFactory",type:"error"},{inputs:[],name:"LBPair__OnlyProtocolFeeRecipient",type:"error"},{inputs:[],name:"LBPair__OutOfLiquidity",type:"error"},{inputs:[],name:"LBPair__TokenNotSupported",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroAmountsOut",type:"error"},{inputs:[],name:"LBPair__ZeroBorrowAmount",type:"error"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"LBPair__ZeroShares",type:"error"},{inputs:[],name:"LBToken__AddressThisOrZero",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__BurnExceedsBalance",type:"error"},{inputs:[],name:"LBToken__InvalidLength",type:"error"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"LBToken__SelfApproval",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"LBToken__SpenderNotApproved",type:"error"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"LBToken__TransferExceedsBalance",type:"error"},{inputs:[],name:"LiquidityConfigurations__InvalidConfig",type:"error"},{inputs:[],name:"OracleHelper__InvalidOracleId",type:"error"},{inputs:[],name:"OracleHelper__LookUpTimestampTooOld",type:"error"},{inputs:[],name:"OracleHelper__NewLengthTooSmall",type:"error"},{inputs:[],name:"PackedUint128Math__AddOverflow",type:"error"},{inputs:[],name:"PackedUint128Math__MultiplierTooLarge",type:"error"},{inputs:[],name:"PackedUint128Math__SubUnderflow",type:"error"},{inputs:[],name:"PairParametersHelper__InvalidParameter",type:"error"},{inputs:[],name:"ReentrancyGuard__ReentrantCall",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds40Bits",type:"error"},{inputs:[],name:"TokenHelper__TransferFailed",type:"error"},{inputs:[],name:"Uint128x128Math__LogUnderflow",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"feeRecipient",type:"address"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CollectedProtocolFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"CompositionFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"DepositedToBins",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{indexed:!1,internalType:"uint24",name:"activeId",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amounts",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"FlashLoan",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint24",name:"idReference",type:"uint24"},{indexed:!1,internalType:"uint24",name:"volatilityReference",type:"uint24"}],name:"ForcedDecay",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"oracleLength",type:"uint16"}],name:"OracleLengthIncreased",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!1,internalType:"uint16",name:"baseFactor",type:"uint16"},{indexed:!1,internalType:"uint16",name:"filterPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"decayPeriod",type:"uint16"},{indexed:!1,internalType:"uint16",name:"reductionFactor",type:"uint16"},{indexed:!1,internalType:"uint24",name:"variableFeeControl",type:"uint24"},{indexed:!1,internalType:"uint16",name:"protocolShare",type:"uint16"},{indexed:!1,internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"StaticFeeParametersSet",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint24",name:"id",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"amountsIn",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"amountsOut",type:"bytes32"},{indexed:!1,internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{indexed:!1,internalType:"bytes32",name:"totalFees",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"protocolFees",type:"bytes32"}],name:"Swap",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],name:"WithdrawnFromBins",type:"event"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"approveForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"batchBalances",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amounts",type:"uint256[]"}],name:"batchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"amountsToBurn",type:"uint256[]"}],name:"burn",outputs:[{internalType:"bytes32[]",name:"amounts",type:"bytes32[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectProtocolFees",outputs:[{internalType:"bytes32",name:"collectedProtocolFees",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"contract ILBFlashLoanCallback",name:"receiver",type:"address"},{internalType:"bytes32",name:"amounts",type:"bytes32"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flashLoan",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"forceDecay",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getActiveId",outputs:[{internalType:"uint24",name:"activeId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getBin",outputs:[{internalType:"uint128",name:"binReserveX",type:"uint128"},{internalType:"uint128",name:"binReserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBinStep",outputs:[{internalType:"uint16",name:"",type:"uint16"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getFactory",outputs:[{internalType:"contract ILBFactory",name:"factory",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"price",type:"uint256"}],name:"getIdFromPrice",outputs:[{internalType:"uint24",name:"id",type:"uint24"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"uint24",name:"id",type:"uint24"}],name:"getNextNonEmptyBin",outputs:[{internalType:"uint24",name:"nextId",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOracleParameters",outputs:[{internalType:"uint8",name:"sampleLifetime",type:"uint8"},{internalType:"uint16",name:"size",type:"uint16"},{internalType:"uint16",name:"activeSize",type:"uint16"},{internalType:"uint40",name:"lastUpdated",type:"uint40"},{internalType:"uint40",name:"firstTimestamp",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint40",name:"lookupTimestamp",type:"uint40"}],name:"getOracleSampleAt",outputs:[{internalType:"uint64",name:"cumulativeId",type:"uint64"},{internalType:"uint64",name:"cumulativeVolatility",type:"uint64"},{internalType:"uint64",name:"cumulativeBinCrossed",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint24",name:"id",type:"uint24"}],name:"getPriceFromId",outputs:[{internalType:"uint256",name:"price",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getProtocolFees",outputs:[{internalType:"uint128",name:"protocolFeeX",type:"uint128"},{internalType:"uint128",name:"protocolFeeY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getReserves",outputs:[{internalType:"uint128",name:"reserveX",type:"uint128"},{internalType:"uint128",name:"reserveY",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getStaticFeeParameters",outputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapIn",outputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"uint128",name:"amountOutLeft",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint128",name:"amountIn",type:"uint128"},{internalType:"bool",name:"swapForY",type:"bool"}],name:"getSwapOut",outputs:[{internalType:"uint128",name:"amountInLeft",type:"uint128"},{internalType:"uint128",name:"amountOut",type:"uint128"},{internalType:"uint128",name:"fee",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokenX",outputs:[{internalType:"contract IERC20",name:"tokenX",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getTokenY",outputs:[{internalType:"contract IERC20",name:"tokenY",type:"address"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getVariableFeeParameters",outputs:[{internalType:"uint24",name:"volatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"volatilityReference",type:"uint24"},{internalType:"uint24",name:"idReference",type:"uint24"},{internalType:"uint40",name:"timeOfLastUpdate",type:"uint40"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"newLength",type:"uint16"}],name:"increaseOracleLength",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"},{internalType:"uint24",name:"activeId",type:"uint24"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"bytes32[]",name:"liquidityConfigs",type:"bytes32[]"},{internalType:"address",name:"refundTo",type:"address"}],name:"mint",outputs:[{internalType:"bytes32",name:"amountsReceived",type:"bytes32"},{internalType:"bytes32",name:"amountsLeft",type:"bytes32"},{internalType:"uint256[]",name:"liquidityMinted",type:"uint256[]"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint16",name:"baseFactor",type:"uint16"},{internalType:"uint16",name:"filterPeriod",type:"uint16"},{internalType:"uint16",name:"decayPeriod",type:"uint16"},{internalType:"uint16",name:"reductionFactor",type:"uint16"},{internalType:"uint24",name:"variableFeeControl",type:"uint24"},{internalType:"uint16",name:"protocolShare",type:"uint16"},{internalType:"uint24",name:"maxVolatilityAccumulator",type:"uint24"}],name:"setStaticFeeParameters",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bool",name:"swapForY",type:"bool"},{internalType:"address",name:"to",type:"address"}],name:"swap",outputs:[{internalType:"bytes32",name:"amountsOut",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"id",type:"uint256"}],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"factoryV1",type:"address"},{internalType:"address",name:"legacyFactoryV2",type:"address"},{internalType:"address",name:"factoryV2",type:"address"},{internalType:"address",name:"legacyRouterV2",type:"address"},{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"JoeLibrary__AddressZero",type:"error"},{inputs:[],name:"JoeLibrary__IdenticalAddresses",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientAmount",type:"error"},{inputs:[],name:"JoeLibrary__InsufficientLiquidity",type:"error"},{inputs:[],name:"LBQuoter_InvalidLength",type:"error"},{inputs:[],name:"SafeCast__Exceeds128Bits",type:"error"},{inputs:[],name:"SafeCast__Exceeds24Bits",type:"error"},{inputs:[{internalType:"uint256",name:"x",type:"uint256"},{internalType:"int256",name:"y",type:"int256"}],name:"Uint128x128Math__PowUnderflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulDivOverflow",type:"error"},{inputs:[],name:"Uint256x256Math__MulShiftOverflow",type:"error"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountIn",type:"uint128"}],name:"findBestPathFromAmountIn",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"uint128",name:"amountOut",type:"uint128"}],name:"findBestPathFromAmountOut",outputs:[{components:[{internalType:"address[]",name:"route",type:"address[]"},{internalType:"address[]",name:"pairs",type:"address[]"},{internalType:"uint256[]",name:"binSteps",type:"uint256[]"},{internalType:"enum ILBRouter.Version[]",name:"versions",type:"uint8[]"},{internalType:"uint128[]",name:"amounts",type:"uint128[]"},{internalType:"uint128[]",name:"virtualAmountsWithoutSlippage",type:"uint128[]"},{internalType:"uint128[]",name:"fees",type:"uint128[]"}],internalType:"struct LBQuoter.Quote",name:"quote",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV1",outputs:[{internalType:"address",name:"factoryV1",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFactoryV2",outputs:[{internalType:"address",name:"factoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyFactoryV2",outputs:[{internalType:"address",name:"legacyFactoryV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLegacyRouterV2",outputs:[{internalType:"address",name:"legacyRouterV2",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getRouterV2",outputs:[{internalType:"address",name:"routerV2",type:"address"}],stateMutability:"view",type:"function"}]};const WS={name:"trader_joe_v2_1",label:"Trader Joe v2.1",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABvCAYAAAA0YEQFAAABAGlDQ1BpY2MAABiVY2BgPMEABCwGDAy5eSVFQe5OChGRUQrsDxgYgRAMEpOLCxhwA6Cqb9cgai/r4lGHC3CmpBYnA+kPQKxSBLQcaKQIkC2SDmFrgNhJELYNiF1eUlACZAeA2EUhQc5AdgqQrZGOxE5CYicXFIHU9wDZNrk5pckIdzPwpOaFBgNpDiCWYShmCGJwZ3AC+R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RWFTqTTy+QK8qzU3BAgazUcPHn7+bbfddttLNEIv3n6sAEzavn379Oq+vq2i+YMs+BkAayGWbRiK5bjCAhERxZWGtUImm0UmGz8yXeuXC+YppdTtRHRFafNX0n4sAUzaiAh/+OnvL28a771Q/D4huYVEstZC2WiPC8fZGsSOhoqfNZHNZpDO5uCkvJdKduaNMW/wPO/QUt3DjzWAne3gwYMuyuWNjsN3MPE91srtRDRsjc1StLmOhcCsHSjtRLuKUilkslmkokfwXD7yD4QA3qe1/vpS9fs1ABdpIkIvfPvbfZxKbSPGHZbVbQTZAivLiFBkJo+Vw6QdUo4TPfbA9eClU/AyGSjPjYupX3hqa+0nXdf9D0vV19cAvEyLnRj6kUceSS3TQTFs8hqxwRom3iZMNzLzBlZ6kB2voBydUo6rteOSk/LIy+bgpqIHcVE71v1nDz/88AfvvYKdR1fSXgPwKlpUCBDuULGYb6bTA47COiu8iR21WbFew1qvIKX7tdY5N51yUpksa9edViZ8pzcwcEW10C7XXgNwaVvkldq/X50ENHp6Us1qNQMgT46TMlapdCbtmGZ1dOOuXWeW5ILX+o5/TFprnBMfLC2RP/T/B96QkmdPWpSQAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIzLTA3LTA3VDA5OjE5OjA4KzAwOjAwC8IICQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMy0wNy0wN1QwOToxOTowOCswMDowMHqfsLUAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjMtMDctMDdUMDk6MTk6MDgrMDA6MDAtipFqAAAAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:YS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:YS.FACTORY},pair:{api:YS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:YS.QUOTER}}};var FS=t=>new gL(Object.assign(WS,{scope:t,findPath:t=>YS.findPath({...t,exchange:WS}),pathExists:t=>YS.pathExists({...t,exchange:WS}),getAmounts:t=>YS.getAmounts({...t,exchange:WS}),getPrep:t=>YS.getPrep({...t,exchange:WS}),getTransaction:t=>YS.getTransaction({...t,exchange:WS})}));const VS={name:"uniswap_v2",label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4LjQ2NUwzMTcuNzAxIDE2Ny4yNzdDMzQ4LjgyOCAxNjIuMjc1IDM4MC40OTMgMTY2LjI1IDQwNi45NzggMTc4LjQ4NUM0MTQuMjY0IDE4MS44NTEgNDI1Ljc1MiAxODguNTUyIDQyNy4xODcgMTkwLjI3NEM0MjcuNjQ1IDE5MC44MjIgNDI4LjQ4NSAxOTQuMzU1IDQyOS4wNTMgMTk4LjEyNEM0MzEuMDIgMjExLjE2NCA0MzAuMDM2IDIyMS4xNiA0MjYuMDQ3IDIyOC42MjVDNDIzLjg3NyAyMzIuNjg4IDQyMy43NTYgMjMzLjk3NSA0MjUuMjE1IDIzNy40NTJDNDI2LjM4IDI0MC4yMjcgNDI5LjYyNyAyN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jMxOSAyMzQuNjUzIDI5My43NzZDMjM3LjYyNSAyOTcuNzQ1IDI0MC40OTkgMjk4Ljc5MSAyNDguMjgyIDI5OC43MzZDMjYzLjUxOCAyOTguNjMgMjc2Ljc2NCAyOTIuMDk1IDI3OC4zMDQgMjgzLjkyNUMyNzkuNTY3IDI3Ny4yMjkgMjczLjc0OSAyNjcuOTQ4IDI2NS43MzYgMjYzLjg3NEMyNjEuNjAxIDI2MS43NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["ethereum"],ethereum:{router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:IL.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:IL.FACTORY},pair:{api:IL.PAIR}}};var HS=t=>new gL(Object.assign(VS,{scope:t,findPath:t=>IL.findPath({...t,exchange:VS}),pathExists:t=>IL.pathExists({...t,exchange:VS}),getAmounts:t=>IL.getAmounts({...t,exchange:VS}),getPrep:t=>IL.getPrep({...t,exchange:VS}),getTransaction:t=>IL.getTransaction({...t,exchange:VS})}));function GS(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}const qS="0x0000000000000000000000000000000000000001",ZS="0x0000000000000000000000000000000000000002",JS=({blockchain:t,exchange:e,path:n})=>{if(!n)return;let r=n.map(((e,r)=>e===Hf[t].currency.address&&n[r+1]!=Hf[t].wrapped.address&&n[r-1]!=Hf[t].wrapped.address?Hf[t].wrapped.address:e));return r[0]==Hf[t].currency.address&&r[1]==Hf[t].wrapped.address?r.splice(0,1):r[r.length-1]==Hf[t].currency.address&&r[r.length-2]==Hf[t].wrapped.address&&r.splice(r.length-1,1),r},XS=async({exchange:t,pool:e,outputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactOutput",params:{path:oN(["address","uint24","address"],[e.path[1],e.fee,e.path[0]]),amountOut:n},cache:5})).amountIn,KS=async({exchange:t,pool:e,inputAmount:n})=>(await PN({blockchain:e.blockchain,address:t[e.blockchain].quoter.address,api:t[e.blockchain].quoter.api,method:"quoteExactInput",params:{path:oN(["address","uint24","address"],[e.path[0],e.fee,e.path[1]]),amountIn:n},cache:5})).amountOut,$S=async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=JS({blockchain:t,exchange:e,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(e.fees.map((r=>PN({blockchain:Hf[t].name,address:e[t].factory.address,method:"getPool",api:e[t].factory.api,cache:3600,params:[n[0],n[1],r]}).then((e=>({blockchain:t,address:e,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((e=>e.address!=Hf[t].zero)),o=(await Promise.all(o.map((async t=>{try{let n;if(r){n=await KS({exchange:e,pool:t,inputAmount:r});const i=await KS({exchange:e,pool:t,inputAmount:r.mul(Fp.from(10))}),o=i.div(Fp.from(10)).sub(n).abs();if(!!o.gt(n.div(Fp.from(100))))return}else{n=await XS({exchange:e,pool:t,outputAmount:i});const r=await XS({exchange:e,pool:t,outputAmount:i.mul(Fp.from(10))}),o=r.div(Fp.from(10)).sub(n).abs();if(!!o.gt(n.div(Fp.from(100))))return}return{...t,amountIn:r||n,amountOut:i||n}}catch(t){console.log("!!!",t)}})))).filter(Boolean),r?o.sort(((t,e)=>e.amountOut.gt(t.amountOut)?1:-1))[0]:o.sort(((t,e)=>e.amountIn.lt(t.amountIn)?1:-1))[0]}catch(t){return}};let tj=({blockchain:t,exchange:e,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,ej=async({blockchain:t,exchange:e,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=oN(["address","uint24","address","uint24","address"],[r[1].path[1],r[1].fee,r[0].path[1],r[0].fee,r[0].path[0]]):1==r.length&&(n=oN(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await PN({block:o,blockchain:t,address:e[t].quoter.address,api:e[t].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var nj={findPath:async({blockchain:t,exchange:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Hf[t].currency.address)&&[n,r].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await $S({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Hf[t].wrapped.address||r==Hf[t].wrapped.address||(c=[],o||s?(c.push(await $S({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await $S({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await $S({exchange:e,blockchain:t,path:[n,Hf[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await $S({exchange:e,blockchain:t,path:[Hf[t].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Hf[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Hf[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await $S({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await $S({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await $S({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await $S({exchange:e,blockchain:t,path:[u,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length)return[u,c]})))).filter(Boolean)[0];l&&(u=[n,l[0],r],c=l[1])}return GS([u,"optionalAccess",t=>t.length])&&u[0]==Hf[t].currency.address?u.splice(1,0,Hf[t].wrapped.address):GS([u,"optionalAccess",t=>t.length])&&u[u.length-1]==Hf[t].currency.address&&u.splice(u.length-1,0,Hf[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:JS({blockchain:t,exchange:e,path:u})}},pathExists:async({blockchain:t,exchange:e,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await $S({blockchain:t,exchange:e,path:n,amountIn:r||o,amountOut:i||a})}catch(t){return!1}},getAmounts:async({blockchain:t,exchange:e,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await ej({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:s,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(u){if(null==(s=await tj({blockchain:t,exchange:e,path:n,pools:r,amountIn:u,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}else if(l){if(null==(u=await ej({blockchain:t,exchange:e,block:i,path:n,pools:r,amountOut:l,tokenIn:o,tokenOut:a}))||c&&u.gt(c))return{};void 0===c&&(c=u)}else if(c){if(null==(s=await tj({blockchain:t,exchange:e,path:n,pools:r,amountIn:c,tokenIn:o,tokenOut:a}))||l&&s.lt(l))return{};void 0===l&&(l=s)}return{amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l}},getPrep:async({exchange:t,blockchain:e,tokenIn:n,amountIn:r,account:i})=>{if(n===Hf[e].currency.address)return;if((await PN({blockchain:e,address:n,method:"allowance",api:Ak[e][20],params:[i,t[e].permit.address]})).lt(r)){return{transaction:{blockchain:e,from:i,to:n,api:Ak[e][20],method:"approve",params:[t[e].permit.address,Hf[e].maxInt]}}}{const o=await PN({blockchain:e,address:t[e].permit.address,method:"allowance",api:t[e].permit.api,params:[i,n,t[e].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(f){const t=Tp(f.signature).length;let e;65!==t&&64!==t||(e=function(t){return Dp(Lp([(t=Rp(t)).r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}(Rp(f.signature))),m.push("0a"),g.push(_m.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[f,e]))}r[0]===Hf[t].currency.address&&(m.push("0b"),g.push(_m.encode(["address","uint256"],[ZS,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=oN(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=oN(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),h||u?(m.push("00"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(i||o).toString(),(a||s).toString(),y,r[0]!==Hf[t].currency.address&&!p]))):(m.push("01"),g.push(_m.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Hf[t].currency.address?ZS:qS,(a||s).toString(),(i||o).toString(),y,r[0]!==Hf[t].currency.address&&!p]))),r[r.length-1]===Hf[t].currency.address&&(m.push("0c"),g.push(_m.encode(["address","uint256"],[qS,(a||s).toString()])));return{blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api,method:"execute",params:{commands:`0x${m.join("")}`,inputs:g},value:v}},ROUTER:[{inputs:[{components:[{internalType:"address",name:"permit2",type:"address"},{internalType:"address",name:"weth9",type:"address"},{internalType:"address",name:"seaportV1_5",type:"address"},{internalType:"address",name:"seaportV1_4",type:"address"},{internalType:"address",name:"openseaConduit",type:"address"},{internalType:"address",name:"nftxZap",type:"address"},{internalType:"address",name:"x2y2",type:"address"},{internalType:"address",name:"foundation",type:"address"},{internalType:"address",name:"sudoswap",type:"address"},{internalType:"address",name:"elementMarket",type:"address"},{internalType:"address",name:"nft20Zap",type:"address"},{internalType:"address",name:"cryptopunks",type:"address"},{internalType:"address",name:"looksRareV2",type:"address"},{internalType:"address",name:"routerRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareRewardsDistributor",type:"address"},{internalType:"address",name:"looksRareToken",type:"address"},{internalType:"address",name:"v2Factory",type:"address"},{internalType:"address",name:"v3Factory",type:"address"},{internalType:"bytes32",name:"pairInitCodeHash",type:"bytes32"},{internalType:"bytes32",name:"poolInitCodeHash",type:"bytes32"}],internalType:"struct RouterParameters",name:"params",type:"tuple"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"BalanceTooLow",type:"error"},{inputs:[],name:"BuyPunkFailed",type:"error"},{inputs:[],name:"ContractLocked",type:"error"},{inputs:[],name:"ETHNotAccepted",type:"error"},{inputs:[{internalType:"uint256",name:"commandIndex",type:"uint256"},{internalType:"bytes",name:"message",type:"bytes"}],name:"ExecutionFailed",type:"error"},{inputs:[],name:"FromAddressIsNotOwner",type:"error"},{inputs:[],name:"InsufficientETH",type:"error"},{inputs:[],name:"InsufficientToken",type:"error"},{inputs:[],name:"InvalidBips",type:"error"},{inputs:[{internalType:"uint256",name:"commandType",type:"uint256"}],name:"InvalidCommandType",type:"error"},{inputs:[],name:"InvalidOwnerERC1155",type:"error"},{inputs:[],name:"InvalidOwnerERC721",type:"error"},{inputs:[],name:"InvalidPath",type:"error"},{inputs:[],name:"InvalidReserves",type:"error"},{inputs:[],name:"InvalidSpender",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[],name:"SliceOutOfBounds",type:"error"},{inputs:[],name:"TransactionDeadlinePassed",type:"error"},{inputs:[],name:"UnableToClaim",type:"error"},{inputs:[],name:"UnsafeCast",type:"error"},{inputs:[],name:"V2InvalidPath",type:"error"},{inputs:[],name:"V2TooLittleReceived",type:"error"},{inputs:[],name:"V2TooMuchRequested",type:"error"},{inputs:[],name:"V3InvalidAmountOut",type:"error"},{inputs:[],name:"V3InvalidCaller",type:"error"},{inputs:[],name:"V3InvalidSwap",type:"error"},{inputs:[],name:"V3TooLittleReceived",type:"error"},{inputs:[],name:"V3TooMuchRequested",type:"error"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"RewardsSent",type:"event"},{inputs:[{internalType:"bytes",name:"looksRareClaim",type:"bytes"}],name:"collectRewards",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bytes",name:"commands",type:"bytes"},{internalType:"bytes[]",name:"inputs",type:"bytes[]"},{internalType:"uint256",name:"deadline",type:"uint256"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"uint256[]",name:"",type:"uint256[]"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155BatchReceived",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC1155Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"},{internalType:"bytes",name:"",type:"bytes"}],name:"onERC721Received",outputs:[{internalType:"bytes4",name:"",type:"bytes4"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],FACTORY:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!0,internalType:"int24",name:"tickSpacing",type:"int24"}],name:"FeeAmountEnabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"token0",type:"address"},{indexed:!0,internalType:"address",name:"token1",type:"address"},{indexed:!0,internalType:"uint24",name:"fee",type:"uint24"},{indexed:!1,internalType:"int24",name:"tickSpacing",type:"int24"},{indexed:!1,internalType:"address",name:"pool",type:"address"}],name:"PoolCreated",type:"event"},{inputs:[{internalType:"address",name:"tokenA",type:"address"},{internalType:"address",name:"tokenB",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"}],name:"createPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],name:"enableFeeAmount",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint24",name:"",type:"uint24"}],name:"feeAmountTickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint24",name:"",type:"uint24"}],name:"getPool",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"parameters",outputs:[{internalType:"address",name:"factory",type:"address"},{internalType:"address",name:"token0",type:"address"},{internalType:"address",name:"token1",type:"address"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"int24",name:"tickSpacing",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_owner",type:"address"}],name:"setOwner",outputs:[],stateMutability:"nonpayable",type:"function"}],POOL:[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Burn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"recipient",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"Collect",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint128",name:"amount0",type:"uint128"},{indexed:!1,internalType:"uint128",name:"amount1",type:"uint128"}],name:"CollectProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"paid1",type:"uint256"}],name:"Flash",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint16",name:"observationCardinalityNextOld",type:"uint16"},{indexed:!1,internalType:"uint16",name:"observationCardinalityNextNew",type:"uint16"}],name:"IncreaseObservationCardinalityNext",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Initialize",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"int24",name:"tickLower",type:"int24"},{indexed:!0,internalType:"int24",name:"tickUpper",type:"int24"},{indexed:!1,internalType:"uint128",name:"amount",type:"uint128"},{indexed:!1,internalType:"uint256",name:"amount0",type:"uint256"},{indexed:!1,internalType:"uint256",name:"amount1",type:"uint256"}],name:"Mint",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"feeProtocol0Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1Old",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol0New",type:"uint8"},{indexed:!1,internalType:"uint8",name:"feeProtocol1New",type:"uint8"}],name:"SetFeeProtocol",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"recipient",type:"address"},{indexed:!1,internalType:"int256",name:"amount0",type:"int256"},{indexed:!1,internalType:"int256",name:"amount1",type:"int256"},{indexed:!1,internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{indexed:!1,internalType:"uint128",name:"liquidity",type:"uint128"},{indexed:!1,internalType:"int24",name:"tick",type:"int24"}],name:"Swap",type:"event"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"}],name:"burn",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collect",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint128",name:"amount0Requested",type:"uint128"},{internalType:"uint128",name:"amount1Requested",type:"uint128"}],name:"collectProtocol",outputs:[{internalType:"uint128",name:"amount0",type:"uint128"},{internalType:"uint128",name:"amount1",type:"uint128"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"fee",outputs:[{internalType:"uint24",name:"",type:"uint24"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal0X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"feeGrowthGlobal1X128",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"flash",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"}],name:"increaseObservationCardinalityNext",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"liquidity",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxLiquidityPerTick",outputs:[{internalType:"uint128",name:"",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"},{internalType:"uint128",name:"amount",type:"uint128"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"uint256",name:"amount0",type:"uint256"},{internalType:"uint256",name:"amount1",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"observations",outputs:[{internalType:"uint32",name:"blockTimestamp",type:"uint32"},{internalType:"int56",name:"tickCumulative",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityCumulativeX128",type:"uint160"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint32[]",name:"secondsAgos",type:"uint32[]"}],name:"observe",outputs:[{internalType:"int56[]",name:"tickCumulatives",type:"int56[]"},{internalType:"uint160[]",name:"secondsPerLiquidityCumulativeX128s",type:"uint160[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"",type:"bytes32"}],name:"positions",outputs:[{internalType:"uint128",name:"liquidity",type:"uint128"},{internalType:"uint256",name:"feeGrowthInside0LastX128",type:"uint256"},{internalType:"uint256",name:"feeGrowthInside1LastX128",type:"uint256"},{internalType:"uint128",name:"tokensOwed0",type:"uint128"},{internalType:"uint128",name:"tokensOwed1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[],name:"protocolFees",outputs:[{internalType:"uint128",name:"token0",type:"uint128"},{internalType:"uint128",name:"token1",type:"uint128"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint8",name:"feeProtocol0",type:"uint8"},{internalType:"uint8",name:"feeProtocol1",type:"uint8"}],name:"setFeeProtocol",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"slot0",outputs:[{internalType:"uint160",name:"sqrtPriceX96",type:"uint160"},{internalType:"int24",name:"tick",type:"int24"},{internalType:"uint16",name:"observationIndex",type:"uint16"},{internalType:"uint16",name:"observationCardinality",type:"uint16"},{internalType:"uint16",name:"observationCardinalityNext",type:"uint16"},{internalType:"uint8",name:"feeProtocol",type:"uint8"},{internalType:"bool",name:"unlocked",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"tickLower",type:"int24"},{internalType:"int24",name:"tickUpper",type:"int24"}],name:"snapshotCumulativesInside",outputs:[{internalType:"int56",name:"tickCumulativeInside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityInsideX128",type:"uint160"},{internalType:"uint32",name:"secondsInside",type:"uint32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"bool",name:"zeroForOne",type:"bool"},{internalType:"int256",name:"amountSpecified",type:"int256"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"},{internalType:"bytes",name:"data",type:"bytes"}],name:"swap",outputs:[{internalType:"int256",name:"amount0",type:"int256"},{internalType:"int256",name:"amount1",type:"int256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int16",name:"",type:"int16"}],name:"tickBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"tickSpacing",outputs:[{internalType:"int24",name:"",type:"int24"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"int24",name:"",type:"int24"}],name:"ticks",outputs:[{internalType:"uint128",name:"liquidityGross",type:"uint128"},{internalType:"int128",name:"liquidityNet",type:"int128"},{internalType:"uint256",name:"feeGrowthOutside0X128",type:"uint256"},{internalType:"uint256",name:"feeGrowthOutside1X128",type:"uint256"},{internalType:"int56",name:"tickCumulativeOutside",type:"int56"},{internalType:"uint160",name:"secondsPerLiquidityOutsideX128",type:"uint160"},{internalType:"uint32",name:"secondsOutside",type:"uint32"},{internalType:"bool",name:"initialized",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"token0",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"token1",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"}],QUOTER:[{inputs:[{internalType:"address",name:"_factory",type:"address"},{internalType:"address",name:"_WETH9",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"WETH9",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"factory",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountIn",type:"uint256"}],name:"quoteExactInput",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactInputSingleParams",name:"params",type:"tuple"}],name:"quoteExactInputSingle",outputs:[{internalType:"uint256",name:"amountOut",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes",name:"path",type:"bytes"},{internalType:"uint256",name:"amountOut",type:"uint256"}],name:"quoteExactOutput",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160[]",name:"sqrtPriceX96AfterList",type:"uint160[]"},{internalType:"uint32[]",name:"initializedTicksCrossedList",type:"uint32[]"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"uint24",name:"fee",type:"uint24"},{internalType:"uint160",name:"sqrtPriceLimitX96",type:"uint160"}],internalType:"struct IQuoterV2.QuoteExactOutputSingleParams",name:"params",type:"tuple"}],name:"quoteExactOutputSingle",outputs:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"uint160",name:"sqrtPriceX96After",type:"uint160"},{internalType:"uint32",name:"initializedTicksCrossed",type:"uint32"},{internalType:"uint256",name:"gasEstimate",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"int256",name:"amount0Delta",type:"int256"},{internalType:"int256",name:"amount1Delta",type:"int256"},{internalType:"bytes",name:"path",type:"bytes"}],name:"uniswapV3SwapCallback",outputs:[],stateMutability:"view",type:"function"}],PERMIT2:[{inputs:[{internalType:"uint256",name:"deadline",type:"uint256"}],name:"AllowanceExpired",type:"error"},{inputs:[],name:"ExcessiveInvalidation",type:"error"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"InsufficientAllowance",type:"error"},{inputs:[{internalType:"uint256",name:"maxAmount",type:"uint256"}],name:"InvalidAmount",type:"error"},{inputs:[],name:"InvalidContractSignature",type:"error"},{inputs:[],name:"InvalidNonce",type:"error"},{inputs:[],name:"InvalidSignature",type:"error"},{inputs:[],name:"InvalidSignatureLength",type:"error"},{inputs:[],name:"InvalidSigner",type:"error"},{inputs:[],name:"LengthMismatch",type:"error"},{inputs:[{internalType:"uint256",name:"signatureDeadline",type:"uint256"}],name:"SignatureExpired",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"address",name:"spender",type:"address"}],name:"Lockdown",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint48",name:"newNonce",type:"uint48"},{indexed:!1,internalType:"uint48",name:"oldNonce",type:"uint48"}],name:"NonceInvalidation",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint160",name:"amount",type:"uint160"},{indexed:!1,internalType:"uint48",name:"expiration",type:"uint48"},{indexed:!1,internalType:"uint48",name:"nonce",type:"uint48"}],name:"Permit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"word",type:"uint256"},{indexed:!1,internalType:"uint256",name:"mask",type:"uint256"}],name:"UnorderedNonceInvalidation",type:"event"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"}],name:"allowance",outputs:[{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint48",name:"newNonce",type:"uint48"}],name:"invalidateNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"wordPos",type:"uint256"},{internalType:"uint256",name:"mask",type:"uint256"}],name:"invalidateUnorderedNonces",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"address",name:"spender",type:"address"}],internalType:"struct IAllowanceTransfer.TokenSpenderPair[]",name:"approvals",type:"tuple[]"}],name:"lockdown",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],name:"nonceBitmap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails[]",name:"details",type:"tuple[]"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitBatch",name:"permitBatch",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IAllowanceTransfer.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IAllowanceTransfer.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions",name:"permitted",type:"tuple"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails",name:"transferDetails",type:"tuple"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],internalType:"struct ISignatureTransfer.TokenPermissions[]",name:"permitted",type:"tuple[]"},{internalType:"uint256",name:"nonce",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct ISignatureTransfer.PermitBatchTransferFrom",name:"permit",type:"tuple"},{components:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"requestedAmount",type:"uint256"}],internalType:"struct ISignatureTransfer.SignatureTransferDetails[]",name:"transferDetails",type:"tuple[]"},{internalType:"address",name:"owner",type:"address"},{internalType:"bytes32",name:"witness",type:"bytes32"},{internalType:"string",name:"witnessTypeString",type:"string"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"permitWitnessTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],internalType:"struct IAllowanceTransfer.AllowanceTransferDetails[]",name:"transferDetails",type:"tuple[]"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"address",name:"token",type:"address"}],name:"transferFrom",outputs:[],stateMutability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router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:nj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:nj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:nj.FACTORY},pool:{api:nj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:nj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:nj.PERMIT2}}};var ij=t=>new gL(Object.assign(rj,{scope:t,findPath:t=>nj.findPath({...t,exchange:rj}),pathExists:t=>nj.pathExists({...t,exchange:rj}),getAmounts:t=>nj.getAmounts({...t,exchange:rj}),getPrep:t=>nj.getPrep({...t,exchange:rj}),getTransaction:t=>nj.getTransaction({...t,exchange:rj})}));var oj={findPath:async({blockchain:t,tokenIn:e,tokenOut:n})=>{if(![e,n].includes(Hf[t].currency.address)||![e,n].includes(Hf[t].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[e,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:t,path:e})=>!(!e||2!==e.length)&&(e.includes(Hf[t].currency.address)&&e.includes(Hf[t].wrapped.address)),getAmounts:async({path:t,block:e,tokenIn:n,tokenOut:r,amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s})=>(i?o=a=s=i:o?i=a=s=o:s?o=a=i=s:a&&(i=s=o=a),{amountOut:i,amountIn:o,amountInMax:a,amountOutMin:s}),getTransaction:({exchange:t,blockchain:e,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:h})=>{let d={blockchain:e,from:h,to:t[e].router.address,api:t[e].router.api};return n[0]===Hf[e].currency.address&&n[1]===Hf[e].wrapped.address?(d.method="deposit",d.value=r.toString(),d):n[0]===Hf[e].wrapped.address&&n[1]===Hf[e].currency.address?(d.method="withdraw",d.value=0,d.params={wad:r},d):void 0},WETH:[{constant:!0,inputs:[],name:"name",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"guy",type:"address"},{name:"wad",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"totalSupply",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"src",type:"address"},{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[{name:"wad",type:"uint256"}],name:"withdraw",outputs:[],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!0,inputs:[],name:"decimals",outputs:[{name:"",type:"uint8"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[{name:"",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{constant:!0,inputs:[],name:"symbol",outputs:[{name:"",type:"string"}],payable:!1,stateMutability:"view",type:"function"},{constant:!1,inputs:[{name:"dst",type:"address"},{name:"wad",type:"uint256"}],name:"transfer",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"},{constant:!1,inputs:[],name:"deposit",outputs:[],payable:!0,stateMutability:"payable",type:"function"},{constant:!0,inputs:[{name:"",type:"address"},{name:"",type:"address"}],name:"allowance",outputs:[{name:"",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"},{payable:!0,stateMutability:"payable",type:"fallback"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"guy",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"dst",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"src",type:"address"},{indexed:!1,name:"wad",type:"uint256"}],name:"Withdrawal",type:"event"}]};const aj={name:"wavax",label:"Wrapped Avax",logo:Hf.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Hf.avalanche.wrapped.address,api:oj.WETH}}};var sj=t=>new gL(Object.assign(aj,{scope:t,findPath:t=>oj.findPath({...t,exchange:aj}),pathExists:t=>oj.pathExists({...t,exchange:aj}),getAmounts:t=>oj.getAmounts({...t,exchange:aj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:aj})}));const uj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0YwQjkwQjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NCw0MS4xbDQyLTI0LjJsNDIsMjQuMmwtMTUuNCw4LjlMOTYsMzQuOUw2OS40LDUwTDU0LDQxLjF6IE0xMzgsNzEuN2wtMTUuNC04LjlMOTYsNzhMNjkuNCw2Mi43bC0xNS40LDl2MTgKCUw4MC42LDEwNXYzMC41bDE1LjQsOWwxNS40LTlWMTA1TDEzOCw4OS43VjcxLjd6IE0xMzgsMTIwLjN2LTE4bC0xNS40LDguOXYxOEMxMjIuNiwxMjkuMSwxMzgsMTIwLjMsMTM4LDEyMC4zeiBNMTQ4LjksMTI2LjQKCWwtMjYuNiwxNS4zdjE4bDQyLTI0LjJWODdsLTE1LjQsOUMxNDguOSw5NiwxNDguOSwxMjYuNCwxNDguOSwxMjYuNHogTTEzMy41LDU2LjRsMTUuNCw5djE4bDE1LjQtOXYtMThsLTE1LjQtOUwxMzMuNSw1Ni40CglMMTMzLjUsNTYuNHogTTgwLjYsMTQ4LjN2MThsMTUuNCw5bDE1LjQtOXYtMThMOTYsMTU3LjFMODAuNiwxNDguM3ogTTU0LDEyMC4zbDE1LjQsOXYtMTguMUw1NCwxMDIuM0w1NCwxMjAuM0w1NCwxMjAuM3oKCSBNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",slippage:!1,blockchains:["bsc"],bsc:{router:{address:Hf.bsc.wrapped.address,api:oj.WETH}}};var cj=t=>new gL(Object.assign(uj,{scope:t,findPath:t=>oj.findPath({...t,exchange:uj}),pathExists:t=>oj.pathExists({...t,exchange:uj}),getAmounts:t=>oj.getAmounts({...t,exchange:uj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:uj})}));const lj={name:"weth",label:"Wrapped Ethereum",logo:"data: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dGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Hf.ethereum.wrapped.address,api:oj.WETH}}};var hj=t=>new gL(Object.assign(lj,{scope:t,findPath:t=>oj.findPath({...t,exchange:lj}),pathExists:t=>oj.pathExists({...t,exchange:lj}),getAmounts:t=>oj.getAmounts({...t,exchange:lj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:lj})}));const dj={name:"weth_arbitrum",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5z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L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Hf.arbitrum.wrapped.address,api:oj.WETH}}};var fj=t=>new gL(Object.assign(dj,{scope:t,findPath:t=>oj.findPath({...t,exchange:dj}),pathExists:t=>oj.pathExists({...t,exchange:dj}),getAmounts:t=>oj.getAmounts({...t,exchange:dj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:dj})}));const pj={name:"weth_optimism",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Hf.optimism.wrapped.address,api:oj.WETH}}};var yj=t=>new gL(Object.assign(pj,{scope:t,findPath:t=>oj.findPath({...t,exchange:pj}),pathExists:t=>oj.pathExists({...t,exchange:pj}),getAmounts:t=>oj.getAmounts({...t,exchange:pj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:pj})}));const mj={name:"weth_base",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCB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ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Hf.base.wrapped.address,api:oj.WETH}}};var gj=t=>new gL(Object.assign(mj,{scope:t,findPath:t=>oj.findPath({...t,exchange:mj}),pathExists:t=>oj.pathExists({...t,exchange:mj}),getAmounts:t=>oj.getAmounts({...t,exchange:mj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:mj})}));const vj={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY2lyY2xlIj4KCTxnIGlkPSJGYW50b20tY2lyY2xlIj4KCQk8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsUnVsZT0iZXZlbm9kZCIgY2xpcFJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMxOTY5RkYiIGNsYXNzPSJzdDAiIGN4PSI5NiIgY3k9Ijk2Ii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wyNy42LTE0LjZjMCwwLDAuMSwwLDAuMSwwbDAsMGwwLDBsLTAuMSwwTDk4LjgsODAuNwoJCQlDOTguNiw4MC42LDk4LjQsODAuNSw5OC4yLDgwLjV6IE0xMjYuNiw2NC40bC0yNC44LDEzbDI0LjgsMTNWNjQuNHogTTY1LjIsNjQuNHYyNi4xbDI0LjgtMTNMNjUuMiw2NC40eiBNOTguNyw0NS4xCgkJCWMtMS40LTAuOC00LTAuOC01LjUsMEw2NS42LDU5LjdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Hf.fantom.wrapped.address,api:oj.WETH}}};var wj=t=>new gL(Object.assign(vj,{scope:t,findPath:t=>oj.findPath({...t,exchange:vj}),pathExists:t=>oj.pathExists({...t,exchange:vj}),getAmounts:t=>oj.getAmounts({...t,exchange:vj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:vj})}));const bj={name:"wmatic",label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVz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wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Hf.polygon.wrapped.address,api:oj.WETH}}};var Mj=t=>new gL(Object.assign(bj,{scope:t,findPath:t=>oj.findPath({...t,exchange:bj}),pathExists:t=>oj.pathExists({...t,exchange:bj}),getAmounts:t=>oj.getAmounts({...t,exchange:bj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:bj})}));const Aj={name:"wxdai",label:"Wrapped XDAI",logo:Hf.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Hf.gnosis.wrapped.address,api:oj.WETH}}};var Nj=t=>new gL(Object.assign(Aj,{scope:t,findPath:t=>oj.findPath({...t,exchange:Aj}),pathExists:t=>oj.pathExists({...t,exchange:Aj}),getAmounts:t=>oj.getAmounts({...t,exchange:Aj}),getPrep:t=>{},getTransaction:t=>oj.getTransaction({...t,exchange:Aj})}));const Ij=[AS(),ij(),CS(),HS(),IS(),FS(),OS(),PS(),xL(),hj(),yj(),gj(),fj(),cj(),Mj(),wj(),sj(),Nj()];Ij.forEach((t=>{Ij[t.name]=t})),Ij.ethereum=[ij("ethereum"),HS("ethereum"),hj("ethereum")],Ij.ethereum.forEach((t=>{Ij.ethereum[t.name]=t})),Ij.bsc=[CS("bsc"),ij("bsc"),IS("bsc"),cj("bsc")],Ij.bsc.forEach((t=>{Ij.bsc[t.name]=t})),Ij.polygon=[ij("polygon"),OS("polygon"),Mj("polygon")],Ij.polygon.forEach((t=>{Ij.polygon[t.name]=t})),Ij.solana=[AS("solana")],Ij.solana.forEach((t=>{Ij.solana[t.name]=t})),Ij.optimism=[ij("optimism"),yj("optimism")],Ij.optimism.forEach((t=>{Ij.optimism[t.name]=t})),Ij.base=[ij("base"),gj("base")],Ij.base.forEach((t=>{Ij.base[t.name]=t})),Ij.arbitrum=[ij("arbitrum"),fj("arbitrum")],Ij.arbitrum.forEach((t=>{Ij.arbitrum[t.name]=t})),Ij.fantom=[PS("fantom"),wj("fantom")],Ij.fantom.forEach((t=>{Ij.fantom[t.name]=t})),Ij.avalanche=[FS("avalanche"),sj("avalanche")],Ij.avalanche.forEach((t=>{Ij.avalanche[t.name]=t})),Ij.gnosis=[xL("gnosis"),Nj("gnosis")],Ij.gnosis.forEach((t=>{Ij.gnosis[t.name]=t}));Ij.route=({blockchain:t,tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(Ij[t].map((t=>t.route({tokenIn:e,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((t=>t.filter(Boolean).sort(((t,e)=>(r||o?BigInt(t.amountOut)BigInt(e.amountIn))?1:(r||o?BigInt(t.amountOut)>BigInt(e.amountOut):BigInt(t.amountIn)xj||(xj="object"==typeof r?r:window,xj);const Tj=()=>(void 0===kj()._Web3ClientConfiguration&&(kj()._Web3ClientConfiguration={}),kj()._Web3ClientConfiguration);function Lj(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class Sj extends ZA{constructor(t,e,n,r){super(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Hf.findByName(this._network).id)}requestChunk(t,e,n){try{const r=t.map((t=>t.request));return $M(e,JSON.stringify(r)).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(Lj([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else Lj([r,"optionalAccess",t=>t.result])?t.resolve(r.result):t.reject()}))})).catch((e=>{if(n<3&&e&&"SERVER_ERROR"==e.code){const e=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=e>=this._endpoints.length?this._endpoints[0]:this._endpoints[e],this.requestChunk(t,this._endpoint,n+1)}else t.forEach((t=>{t.reject(e)}))}))}catch(e){t.forEach((t=>{t.reject()}))}}send(t,e){const n={method:t,params:e,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,this._endpoint,1))))}),Tj().batchInterval||10)),i}}const jj=()=>(null==kj()._Web3ClientProviders&&(kj()._Web3ClientProviders={}),kj()._Web3ClientProviders),Cj=(t,e)=>{void 0===jj()[t]&&(jj()[t]=[]);const n=jj()[t].indexOf(e);n>-1&&jj()[t].splice(n,1),jj()[t].unshift(e)},Dj=async(t,e,n=!0)=>{let r;jj()[t]=e.map(((r,i)=>new Sj(r,t,e,(()=>{1===jj()[t].length?Dj(t,e,n):jj()[t].splice(i,1)}))));let i=kj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=jj()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},referrer:"",referrerPolicy:"no-referrer",body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=jj()[t][o]}Cj(t,r)};var Oj=async t=>{let e=jj();if(e&&e[t])return e[t][0];let n=kj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await Dj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},zj=async t=>{let e=jj();if(e&&e[t])return e[t];let n=kj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await Dj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};class Pj extends ql{constructor(t,e,n,r){super(t),this._provider=new ql(t),this._network=e,this._endpoint=t,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}handleError(t,e,n){if(e<3&&t&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((e=>t.toString().match(e)))){const t=this._endpoints.indexOf(this._endpoint)+1;this._endpoint=t>=this._endpoints.length?this._endpoints[0]:this._endpoints[t],this._provider=new ql(this._endpoint),this.requestChunk(n,e+1)}else n.forEach((e=>{e.reject(t)}))}batchRequest(t,e){return new Promise(((e,n)=>{0===t.length&&e([]);const r=t.map((t=>this._rpcClient.request(t.methodName,t.args)));fetch(this._endpoint,{method:"POST",body:JSON.stringify(r),headers:{"Content-Type":"application/json"}}).then((t=>{t.ok?t.json().then((t=>{e(t)})).catch(n):n(`${t.status} ${t.text}`)})).catch(n)}))}requestChunk(t,e){const n=t.map((t=>t.request));try{return this.batchRequest(n,e).then((e=>{t.forEach(((t,n)=>{const r=e[n];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([r,"optionalAccess",t=>t.error])){const e=new Error(r.error.message);e.code=r.error.code,e.data=r.error.data,t.reject(e)}else r?t.resolve(r):t.reject()}))})).catch((n=>this.handleError(n,e,t)))}catch(n){return this.handleError(n,e,t)}}_rpcRequestReplacement(t,e){const n={methodName:t,args:e};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((t,e)=>{r.resolve=t,r.reject=e}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const t=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const e=[];for(let n=0;n(t.map((t=>t.request)),this.requestChunk(t,1))))}),Tj().batchInterval||10)),i}}const _j=()=>(null==kj()._Web3ClientProviders&&(kj()._Web3ClientProviders={}),kj()._Web3ClientProviders),Bj=(t,e)=>{void 0===_j()[t]&&(_j()[t]=[]);const n=_j()[t].indexOf(e);n>-1&&_j()[t].splice(n,1),_j()[t].unshift(e)},Rj=async(t,e,n=!0)=>{let r;_j()[t]=e.map(((r,i)=>new Pj(r,t,e,(()=>{1===_j()[t].length?Rj(t,e,n):_j()[t].splice(i,1)}))));let i=kj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=_j()[t][0];else{let n=await Promise.all(e.map((t=>new Promise((async e=>{let n=(new Date).getTime();setTimeout((()=>e(900)),900);if(!(await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},referrer:"",referrerPolicy:"no-referrer",body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return e(999);let r=(new Date).getTime();e(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=_j()[t][o]}Bj(t,r)};var Uj=async t=>{let e=_j();if(e&&e[t])return e[t][0];let n=kj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[t]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[t]=new Promise((async e=>{await Rj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t][0])}))),await n._Web3ClientGetProviderPromise[t]},Qj=async t=>{let e=_j();if(e&&e[t])return e[t];let n=kj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[t]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[t]=new Promise((async e=>{await Rj(t,Hf[t].endpoints),e(kj()._Web3ClientProviders[t])}))),await n._Web3ClientGetProvidersPromise[t]};let Yj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Yj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Yj.solana=["solana"];let Wj=()=>(null==kj()._Web3ClientCacheStore&&(kj()._Web3ClientCacheStore={}),kj()._Web3ClientCacheStore),Fj=()=>(null==kj()._Web3ClientPromiseStore&&(kj()._Web3ClientPromiseStore={}),kj()._Web3ClientPromiseStore),Vj=function({key:t}){Fj()[t]=void 0},Hj=function({call:t,key:e,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:t}){return Fj()[t]}({key:e=JSON.stringify(e)});if(a)return a.then(r).catch(i);(function({key:t,promise:e}){return Fj()[t]=e,e})({key:e,promise:new Promise(((a,s)=>0===n?t().then((t=>{r(t),a(t)})).catch((t=>{i(t),s(t)})):(o=function({key:t,expires:e}){let n=Wj()[t];if(function(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}([n,"optionalAccess",t=>t.expiresAt])>Date.now())return n.value}({key:e,expires:n}),o?(r(o),a(o),o):void t().then((t=>{t&&function({key:t,value:e,expires:n}){Wj()[t]={expiresAt:Date.now()+n,value:e}}({key:e,value:t,expires:n}),r(t),a(t)})).catch((t=>{i(t),s(t)})))))}).then((()=>{Vj({key:e})})).catch((()=>{Vj({key:e})}))}))};const Gj=async t=>{if(Yj.evm.includes(t))return await Oj(t);if(Yj.solana.includes(t))return await Uj(t);throw"Unknown blockchain: "+t};const qj=({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=new PM(t,e,i),s=(({contract:t,method:e,params:n})=>t.interface.fragments.find((t=>t.name==e)).inputs.map(((t,e)=>Array.isArray(n)?n[e]:n[t.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((t=>t.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((t=>t.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},Zj=({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a})=>n?qj({address:e,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:t,provider:e})=>e.getBalance(t))({address:e,provider:a}):"transactionCount"===r?(({address:t,provider:e})=>e.getTransactionCount(t))({address:e,provider:a}):void 0;const Jj=async({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=of),await(async({address:t,api:e,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new Xs(t));if(a&&a.data)return e.decode(a.data)})({address:e,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new Xs(e),i).then((t=>n?t.map((t=>(t.data=n.decode(t.account.data),t))):t));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new Xs(e));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:t,provider:e})=>e.getBalance(new Xs(t)))({address:e,provider:a})}catch(u){if(s&&u&&["Failed to fetch","limit reached","504","503","502","500","429","426","422","413","409","408","406","405","404","403","402","401","400"].some((t=>u.toString().match(t)))){let u=s[s.indexOf(a)+1]||s[0];return Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const Xj=async function(t,e){const{blockchain:n,address:r,method:i}=(t=>{if("object"==typeof t)return t;let e=t.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==e.groups.part2?e.groups.part1.match(/\d/)?{blockchain:e.groups.blockchain,address:e.groups.part1}:{blockchain:e.groups.blockchain,method:e.groups.part1}:{blockchain:e.groups.blockchain,address:e.groups.part1,method:e.groups.part2}})(t),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:h}=("object"==typeof t?t:e)||{};return await Hj({expires:s||0,key:h||[n,r,i,a,u],call:async()=>{if(Yj.evm.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||Tj().strategy||"failover",a=a||Tj().timeout||void 0,"fastest"===s){const s=await zj(t);let u=[];const c=s.map((a=>new Promise((s=>{u.push(Zj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Oj(t),u=Zj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([u,a])):u}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});if(Yj.solana.includes(n))return await(async({blockchain:t,address:e,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||Tj().strategy||"failover",a=a||Tj().timeout||void 0;const u=await Qj(t);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((t=>new Promise((e=>{t.catch(e)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Uj(t),c=Jj({blockchain:t,address:e,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((t,e)=>setTimeout((()=>{e(new Error("Web3ClientTimeout"))}),a))),Promise.race([c,a])):c}})({blockchain:n,address:r,api:o,method:i,params:a,block:u,strategy:l,timeout:c});throw"Unknown blockchain: "+n}})},Kj=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=e.fromToken.address===Hf.solana.currency.address?new rf(e.fromAmount):new rf("0"),r=await Gj("solana"),i=new rf(await r.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),o=e.fromAddress,a=n.add(i);return[Wu.createAccount({fromPubkey:new Xs(o),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:a}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:o})]},$j=async({wSolEscrowAccountKeypair:t,paymentRoute:e})=>{if(!t)return;const n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(Ak.solana.TOKEN_LAYOUT.span)),i=await dC();return[Wu.createAccount({fromPubkey:new Xs(e.fromAddress),newAccountPubkey:t.publicKey,programId:new Xs(Ak.solana.TOKEN_PROGRAM),space:Ak.solana.TOKEN_LAYOUT.span,lamports:r}),Ak.solana.initializeAccountInstruction({account:t.publicKey.toString(),token:Hf.solana.wrapped.address,owner:i.toString()})]},tC=({paymentRoute:t})=>{let e=[...t.exchangeRoutes[0].path];return e.indexOf(Hf.solana.currency.address)>-1&&e.splice(e.indexOf(Hf.solana.currency.address),1),e.indexOf(t.fromToken.address)>-1&&e.splice(e.indexOf(t.fromToken.address),1),e.indexOf(t.toToken.address)>-1&&e.splice(e.indexOf(t.toToken.address),1),2===e.length&&e[0]===Hf.solana.wrapped.address?e[1]:e[0]},eC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:tC({paymentRoute:t}),owner:t.fromAddress}),nC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||mC(t.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:await eC({paymentRoute:t}),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t})?void 0:Ak.solana.createAssociatedTokenAccountInstruction({token:tC({paymentRoute:t}),owner:t.fromAddress,payer:t.fromAddress})},rC=async({wSolSenderAccountKeypair:t,paymentRoute:e})=>{if(t)return Ak.solana.closeAccountInstruction({account:t.publicKey.toString(),owner:e.fromAddress})},iC=async({from:t})=>{let e=[nf.from("payments"),new Xs(t).toBuffer()],[n]=await Xs.findProgramAddress(e,new Xs(Ej.solana.address));return n},oC=async({from:t})=>{let e=(await iC({from:t})).toString();return await Xj({blockchain:"solana",address:e,api:pf([vf("anchorDiscriminator"),vf("nonce")]),cache:1e3})},aC=async({from:t})=>{if(await oC({from:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createPaymentsAccount.layout.span);return Ej.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createPaymentsAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},sC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.fromToken.address,owner:t.fromAddress}),uC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.toAddress}),cC=async({paymentRoute:t})=>{if(t.toToken.address===Hf.solana.currency.address){const e=await Xj({blockchain:"solana",method:"balance",address:t.toAddress}),n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.toAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.toAddress),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.toAddress}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.toAddress,payer:t.fromAddress})}},lC=async({paymentRoute:t})=>await Ak.solana.findProgramAddress({token:t.toToken.address,owner:t.fee.receiver}),hC=async({paymentRoute:t})=>{if(t.fee){if(t.toToken.address===Hf.solana.currency.address){const e=await Xj({blockchain:"solana",method:"balance",address:t.fee.receiver}),n=await Gj("solana"),r=new rf(await n.getMinimumBalanceForRentExemption(0)),i=new rf(t.feeAmount);if(new rf(e).add(i).gt(r))return;return Wu.transfer({fromPubkey:new Xs(t.fromAddress),toPubkey:new Xs(t.fee.receiver),lamports:r.sub(i)})}{const e=t.toToken.address;if(await(async({paymentRoute:t})=>await Ak.solana.findAccount({token:t.toToken.address,owner:t.fee.receiver}))({paymentRoute:t}))return;return Ak.solana.createAssociatedTokenAccountInstruction({token:e,owner:t.fee.receiver,payer:t.fromAddress})}}},dC=async()=>{let t=[nf.from("escrow_sol")],[e,n]=await Xs.findProgramAddress(t,new Xs(Ej.solana.address));return e},fC=async({paymentRoute:t})=>{let e=[nf.from("escrow"),new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address).toBuffer()],[n,r]=await Xs.findProgramAddress(e,new Xs(Ej.solana.address));return n},pC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address===Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:(await fC({paymentRoute:t})).toString(),api:Ak.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new Xs(t.toToken.address===Hf.solana.currency.address?Hf.solana.wrapped.address:t.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await fC({paymentRoute:t}),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createEscrowTokenAccount.layout.span);return Ej.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},yC=async({paymentRoute:t})=>{if(0===t.exchangeRoutes.length||t.toToken.address!=Hf.solana.currency.address)return;if(await(async({paymentRoute:t})=>await Xj({blockchain:"solana",address:(await dC()).toString(),api:pf([vf("amount"),hf("owner")]),cache:1e3}))({paymentRoute:t}))return;const e=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0}],n=nf.alloc(Ej.solana.api.createEscrowSolAccount.layout.span);return Ej.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Ej.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new gu({keys:e,programId:new Xs(Ej.solana.address),data:n})},mC=t=>t.filter((t=>t!==Hf.solana.currency.address)),gC=async({paymentRoute:t,wSolSenderAccountKeypair:e,wSolEscrowAccountKeypair:n,nonce:r,deadline:i})=>{switch((({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return"routeSol";if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address&&0===t.exchangeRoutes.length)return"routeToken";if(t.exchangeRoutes.length>0&&2===mC(t.exchangeRoutes[0].path).length)return t.toToken.address===Hf.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(t.exchangeRoutes.length>0&&mC(t.exchangeRoutes[0].path).length>2)return t.toToken.address===Hf.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:t})){case"routeSol":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=new Xs(t.toAddress),i=t.fee?new Xs(t.fee.receiver):r,o=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],a=nf.alloc(Ej.solana.api.routeSol.layout.span);return Ej.solana.api.routeSol.layout.encode({anchorDiscriminator:Ej.solana.api.routeSol.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},a),new gu({keys:o,programId:new Xs(Ej.solana.address),data:a})})({paymentRoute:t,nonce:r,deadline:i});case"routeToken":return await(async({paymentRoute:t,nonce:e,deadline:n})=>{const r=await sC({paymentRoute:t}),i=await uC({paymentRoute:t}),o=t.fee?await lC({paymentRoute:t}):i,a=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(r),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0}],s=nf.alloc(Ej.solana.api.routeToken.layout.span);return Ej.solana.api.routeToken.layout.encode({anchorDiscriminator:Ej.solana.api.routeToken.anchorDiscriminator,nonce:e,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(n)},s),new gu({keys:a,programId:new Xs(Ej.solana.address),data:s})})({paymentRoute:t,nonce:r,deadline:i});case"routeOrcaSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=n?n.publicKey:await sC({paymentRoute:t}),o=await uC({paymentRoute:t}),a=t.fee?await lC({paymentRoute:t}):o,s=await fC({paymentRoute:t}),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),c=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(u.data),l=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},u.keys[2],u.keys[4],u.keys[6],u.keys[7],u.keys[8],u.keys[9],u.keys[10],{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:new Xs(o),isSigner:!1,isWritable:!0},{pubkey:new Xs(a),isSigner:!1,isWritable:!0}],h=nf.alloc(Ej.solana.api.routeOrcaSwap.layout.span);return Ej.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:e,amountIn:c.amount,sqrtPriceLimit:c.sqrtPriceLimit,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToB:c.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},h),new gu({keys:l,programId:new Xs(Ej.solana.address),data:h})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=await sC({paymentRoute:t}),o=n.publicKey,a=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),yf("sqrtPriceLimit"),af("amountSpecifiedIsInput"),af("aToB")]).decode(a.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new Xs(i),isSigner:!1,isWritable:!0},a.keys[2],a.keys[4],a.keys[6],a.keys[7],a.keys[8],a.keys[9],a.keys[10],{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Ej.solana.api.routeOrcaSwapSolOut.layout.span);return Ej.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,sqrtPriceLimit:s.sqrtPriceLimit,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToB:s.aToB,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Ej.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:t,nonce:e,wSolSenderAccountKeypair:n,deadline:r})=>{const i=new Xs(await uC({paymentRoute:t})),o=t.fee?new Xs(await lC({paymentRoute:t})):i,a=await fC({paymentRoute:t}),s=new Xs(await eC({paymentRoute:t})),u=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),c=n?n.publicKey:new Xs(await sC({paymentRoute:t})),l=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(u.data),h=[{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},u.keys[2],u.keys[3],{pubkey:c,isSigner:!1,isWritable:!0},u.keys[5],u.keys[7],{pubkey:s,isSigner:!1,isWritable:!0},u.keys[9],u.keys[11],u.keys[12],u.keys[13],u.keys[14],u.keys[15],u.keys[16],u.keys[17],u.keys[18],u.keys[19],{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0}],d=nf.alloc(Ej.solana.api.routeOrcaTwoHopSwap.layout.span);return Ej.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:e,amountIn:l.amount,amountSpecifiedIsInput:l.amountSpecifiedIsInput,aToBOne:l.aToBOne,aToBTwo:l.aToBTwo,sqrtPriceLimitOne:l.sqrtPriceLimitOne,sqrtPriceLimitTwo:l.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},d),new gu({keys:h,programId:new Xs(Ej.solana.address),data:d})})({paymentRoute:t,nonce:r,wSolSenderAccountKeypair:e,deadline:i});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:t,nonce:e,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=new Xs(await eC({paymentRoute:t})),o=(await t.exchangeRoutes[0].getTransaction({account:t.fromAddress})).instructions.find((t=>t.programId.toString()===Ej.solana.ammProgram)),a=new Xs(await sC({paymentRoute:t})),s=pf([vf("anchorDiscriminator"),vf("amount"),vf("otherAmountThreshold"),af("amountSpecifiedIsInput"),af("aToBOne"),af("aToBTwo"),yf("sqrtPriceLimitOne"),yf("sqrtPriceLimitTwo")]).decode(o.data),u=[{pubkey:Wu.programId,isSigner:!1,isWritable:!1},{pubkey:new Xs(Ak.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new Xs(Ej.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new Xs(t.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await iC({from:t.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:a,isSigner:!1,isWritable:!0},o.keys[2],o.keys[3],o.keys[5],o.keys[7],{pubkey:i,isSigner:!1,isWritable:!0},o.keys[9],o.keys[11],o.keys[12],o.keys[13],o.keys[14],o.keys[15],o.keys[16],o.keys[17],o.keys[18],o.keys[19],{pubkey:n.publicKey,isSigner:!1,isWritable:!0},{pubkey:await dC(),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.toAddress),isSigner:!1,isWritable:!0},{pubkey:new Xs(t.fee?t.fee.receiver:t.toAddress),isSigner:!1,isWritable:!0}],c=nf.alloc(Ej.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Ej.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Ej.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:e,amountIn:s.amount,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToBOne:s.aToBOne,aToBTwo:s.aToBTwo,sqrtPriceLimitOne:s.sqrtPriceLimitOne,sqrtPriceLimitTwo:s.sqrtPriceLimitTwo,paymentAmount:new rf(t.toAmount.toString()),feeAmount:new rf((t.feeAmount||"0").toString()),deadline:new rf(r)},c),new gu({keys:u,programId:new Xs(Ej.solana.address),data:c})})({paymentRoute:t,nonce:r,wSolEscrowAccountKeypair:n,deadline:i})}},vC=async({paymentRoute:t})=>{const e=await oC({from:t.fromAddress}),n=Math.ceil((new Date).getTime()/1e3)+1800,r=(t=>t?t.nonce:new rf("0"))(e),i=await(async({paymentRoute:t})=>{if(t.fromToken.address===Hf.solana.currency.address&&t.toToken.address!==Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t}),o=await(async({paymentRoute:t})=>{if(t.fromToken.address!==Hf.solana.currency.address&&t.toToken.address===Hf.solana.currency.address)return Zl.generate()})({paymentRoute:t});let a=(await Promise.all([aC({from:t.fromAddress}),Kj({paymentRoute:t,wSolSenderAccountKeypair:i}),nC({paymentRoute:t}),cC({paymentRoute:t}),hC({paymentRoute:t}),yC({paymentRoute:t}),$j({paymentRoute:t,wSolEscrowAccountKeypair:o}),pC({paymentRoute:t}),gC({paymentRoute:t,wSolSenderAccountKeypair:i,wSolEscrowAccountKeypair:o,nonce:r,deadline:n}),rC({paymentRoute:t,wSolSenderAccountKeypair:i})])).filter(Boolean).flat();const s={blockchain:t.blockchain,instructions:a,signers:[i,o].filter(Boolean),alts:[Ej.solana.alt]};return s.deadline=n,s.nonce=r.toString(),s},wC=[{inputs:[{internalType:"address",name:"_PERMIT2",type:"address"},{internalType:"address",name:"_FORWARDER",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ExchangeCallFailed",type:"error"},{inputs:[],name:"ExchangeCallMissing",type:"error"},{inputs:[],name:"ExchangeNotApproved",type:"error"},{inputs:[],name:"ForwardingPaymentFailed",type:"error"},{inputs:[],name:"InsufficientBalanceInAfterPayment",type:"error"},{inputs:[],name:"InsufficientBalanceOutAfterPayment",type:"error"},{inputs:[],name:"NativeFeePaymentFailed",type:"error"},{inputs:[],name:"NativePaymentFailed",type:"error"},{inputs:[],name:"PaymentDeadlineReached",type:"error"},{inputs:[],name:"PaymentToZeroAddressNotAllowed",type:"error"},{inputs:[],name:"WrongAmountPaidIn",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Disabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"exchange",type:"address"}],name:"Enabled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"InternalTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{inputs:[],name:"FORWARDER",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT2",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"acceptOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"exchange",type:"address"},{internalType:"bool",name:"enabled",type:"bool"}],name:"enable",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"exchanges",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"uint256",name:"amountIn",type:"uint256"},{internalType:"bool",name:"permit2",type:"bool"},{internalType:"uint256",name:"paymentAmount",type:"uint256"},{internalType:"uint256",name:"feeAmount",type:"uint256"},{internalType:"address",name:"tokenInAddress",type:"address"},{internalType:"address",name:"exchangeAddress",type:"address"},{internalType:"address",name:"tokenOutAddress",type:"address"},{internalType:"address",name:"paymentReceiverAddress",type:"address"},{internalType:"address",name:"feeReceiverAddress",type:"address"},{internalType:"uint8",name:"exchangeType",type:"uint8"},{internalType:"uint8",name:"receiverType",type:"uint8"},{internalType:"bytes",name:"exchangeCallData",type:"bytes"},{internalType:"bytes",name:"receiverCallData",type:"bytes"},{internalType:"uint256",name:"deadline",type:"uint256"}],internalType:"struct IDePayRouterV2.Payment",name:"payment",type:"tuple"},{components:[{components:[{internalType:"address",name:"token",type:"address"},{internalType:"uint160",name:"amount",type:"uint160"},{internalType:"uint48",name:"expiration",type:"uint48"},{internalType:"uint48",name:"nonce",type:"uint48"}],internalType:"struct IPermit2.PermitDetails",name:"details",type:"tuple"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"sigDeadline",type:"uint256"}],internalType:"struct IPermit2.PermitSingle",name:"permitSingle",type:"tuple"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"pay",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[],name:"pendingOwner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"withdraw",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var bC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:wC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:wC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:wC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:wC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:wC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:wC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:wC}},MC={...bC,...Ej},AC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},NC="object"==typeof AC&&AC&&AC.Object===Object&&AC,IC="object"==typeof self&&self&&self.Object===Object&&self,EC=(NC||IC||Function("return this")()).Symbol;EC&&EC.toStringTag,EC&&EC.toStringTag;const xC=t=>{switch(t){case"solana":return 125e-6;case"gnosis":return.009;case"base":return.0095;case"optimism":return.0096;case"polygon":return.011;case"fantom":return.05;case"avalanche":return.1;case"arbitrum":return.11;case"bsc":return.2;case"ethereum":return 10;default:return 100}},kC={arbitrum:{[Hf.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Hf.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Hf.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Hf.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Hf.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Hf.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Hf.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Hf.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Hf.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},TC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?t.toAddress:t.toToken.address:bC[t.blockchain].address,LC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:Ak[t.blockchain].DEFAULT:bC[t.blockchain].api,SC=({paymentRoute:t})=>t.directTransfer&&!t.fee?t.toToken.address==Hf[t.blockchain].currency.address?void 0:"transfer":"pay",jC=async({paymentRoute:t})=>{if(t.directTransfer&&!t.fee)return t.toToken.address==Hf[t.blockchain].currency.address?void 0:[t.toAddress,t.toAmount];{const e=Math.ceil(new Date/1e3)+3600,n=t.exchangeRoutes[0],r=(({exchangeRoute:t,blockchain:e})=>void 0===t?0:"uniswap_v3"===t.exchange.name||t.exchange[e].router.address===Hf[e].wrapped.address?2:1)({exchangeRoute:n,blockchain:t.blockchain}),i=n?await n.getTransaction({account:bC[t.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:t})=>{const e=new PM(t.to,t.api),n=t.method,r=t.params;let i,o,a;return o=e.interface.fragments.find((t=>!(t.name!=n||t.inputs&&r&&"object"==typeof r&&t.inputs.length!=Object.keys(r).length))),1===o.inputs.length&&"tuple"===o.inputs[0].type?(i=n,a=[r[o.inputs[0].name]]):(i=`${n}(${o.inputs.map((t=>t.type)).join(",")})`,a=o.inputs.map((t=>{if("tuple"===t.type){let e={};return t.components.forEach(((n,i)=>{e[n.name]=r[t.name][i]})),i=n,e}return r[t.name]}))),e.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Hf[t.blockchain].zero;let a=Hf[t.blockchain].zero;return n&&(a="bsc"===t.blockchain&&"pancakeswap_v3"===n.exchange.name&&t.toToken.address===Hf[t.blockchain].currency.address?n.exchange[t.blockchain].smartRouter.address:kC[i.blockchain][n.exchange[t.blockchain].router.address]||n.exchange[t.blockchain].router.address),{payment:{amountIn:t.fromAmount,paymentAmount:t.toAmount,feeAmount:t.feeAmount||0,tokenInAddress:t.fromToken.address,exchangeAddress:a,tokenOutAddress:t.toToken.address,paymentReceiverAddress:t.toAddress,feeReceiverAddress:t.fee?t.fee.receiver:Hf[t.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Hf[t.blockchain].zero,deadline:e}}}},CC=({paymentRoute:t})=>t.fromToken.address==Hf[t.blockchain].currency.address?t.directTransfer?t.toAmount.toString():t.fromAmount.toString():Fp.from("0").toString();let DC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];DC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],DC.solana=["solana"];const OC=({paymentRoute:t,fee:e})=>{if(DC.evm.includes(t.blockchain))return(async({paymentRoute:t})=>({blockchain:t.blockchain,to:TC({paymentRoute:t}),api:LC({paymentRoute:t}),method:SC({paymentRoute:t}),params:await jC({paymentRoute:t}),value:CC({paymentRoute:t})}))({paymentRoute:t,fee:e});if(DC.solana.includes(t.blockchain))return vC({paymentRoute:t,fee:e});throw"Blockchain not supported!"};function zC(t){let e,n=t[0],r=1;for(;rn.call(e,...t))),e=void 0)}return n}class PC{constructor({blockchain:t,fromAddress:e,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:h,exchangeRoutes:d,approvalRequired:f,approvalTransaction:p,directTransfer:y}){this.blockchain=t,this.fromAddress=e,this.fromToken=n,this.fromAmount=zC([r||s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=zC([s,"optionalAccess",t=>t.toString,"call",t=>t()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=h,this.exchangeRoutes=d||[],this.approvalRequired=f,this.approvalTransaction=p,this.directTransfer=y,this.getTransaction=async()=>await OC({paymentRoute:this})}}function _C({assets:t,blacklist:e,accept:n,from:r}){return Promise.resolve(RC({assets:t,blacklist:e})).then((t=>function({assets:t,accept:e,from:n}){return Promise.all(t.map((async t=>{let r=e.filter((e=>e.blockchain==t.blockchain)),i=new Ak(t);return Promise.all(r.map((async e=>{if(e.token&&e.amount){let r=e.blockchain,o=t.decimals,a=new Ak({blockchain:r,address:e.token}),s=await a.decimals(),u=(await a.BigNumber(e.amount)).toString();return new PC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}if(e.fromToken&&e.fromAmount&&i.address.toLowerCase()==e.fromToken.toLowerCase()){let r=e.blockchain,o=(await i.BigNumber(e.fromAmount)).toString(),a=t.decimals,s=new Ak({blockchain:r,address:e.toToken}),u=await s.decimals();return new PC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:t.balance,fromAddress:n[e.blockchain],toAddress:e.toAddress,fee:e.fee})}})))}))).then((t=>t.flat().filter((t=>t))))}({assets:t,accept:n,from:r}))).then((t=>FC({routes:t}))).then(UC).then(QC).then(YC).then((t=>qC({routes:t}))).then(WC).then(JC).then(ZC).then((t=>t.map((t=>new PC(t)))))}function BC({accept:t,from:e,whitelist:n,blacklist:r,drip:i}){if(t.some((t=>t&&t.fee&&"string"==typeof t.fee.amount&&t.fee.amount.match(/\.\d\d+\%/))))throw"Only up to 1 decimal is supported for fee amounts!";return new Promise((async(o,a)=>{let s=[],u=[];if(n)for(const t in n)(n[t]||[]).forEach((e=>{u.push(t),s.push({blockchain:t,address:e})}));else t.forEach((t=>{u.push(t.blockchain),s.push({blockchain:t.blockchain,address:t.token||t.toToken})}));[...new Set(u)].forEach((t=>{s.find((e=>e.blockchain===t&&e.address===Hf[t].currency.address))||s.push({blockchain:t,address:Hf[t].currency.address})})),s.sort(((t,e)=>xC(t.blockchain)[t.blockchain,t.address.toLowerCase()].join(""))),f=()=>Math.ceil(new Date),p=f();setTimeout((()=>{l.forEach((t=>y(BC,!1)))}),3e3);const y=(t,e=!0)=>{try{const n={blockchain:t.blockchain,address:t.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=f()-p>3e3;if(h.indexOf(r)>-1)return;if(d.indexOf(r)===c){if(h.push(r),i(t),c+=1,!e)return;l.forEach((e=>y(t,!1)))}else c>=d.length||o?(-1===d.indexOf(r)||c>=d.length||o)&&(h.push(r),i(t)):l.find((t=>t.blockchain===n.blockchain&&t.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((t,e)=>((t,e,n)=>{if(!t||0===t.length)return 0;let r=t.indexOf([e.blockchain,e.address.toLowerCase()].join("")),i=t.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{_C({assets:[n],blacklist:r,accept:t,from:e}).then((t=>{zC([t,"optionalAccess",t=>t.length])&&y(t[0])}))}:void 0});let g=await _C({assets:m,blacklist:r,accept:t,from:e})||[];g.assets=m,o(g)}))}let RC=({assets:t,blacklist:e})=>null==e?t:t.filter((t=>null==e[t.blockchain]||!e[t.blockchain].find((e=>e.toLowerCase()==t.address.toLowerCase())))),UC=async t=>await Promise.all(t.map((t=>t.directTransfer?[]:t.toToken&&t.toAmount?Ij.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountOutMin:t.toAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):t.fromToken&&t.fromAmount?Ij.route({blockchain:t.blockchain,tokenIn:t.fromToken.address,tokenOut:t.toToken.address,amountIn:t.fromAmount,fromAddress:t.fromAddress,toAddress:t.toAddress}):void 0))).then((e=>t.map(((t,n)=>(t.exchangeRoutes=e[n],t))))),QC=t=>t.filter((t=>0!=t.exchangeRoutes.length||t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase())),YC=async t=>t.filter((t=>t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()?Fp.from(t.fromBalance).gte(Fp.from(t.toAmount)):t.fromAmount&&t.toAmount?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountInMax)):t.exchangeRoutes[0]&&t.exchangeRoutes[0].amountIn?Fp.from(t.fromBalance).gte(Fp.from(t.exchangeRoutes[0].amountIn)):void 0)),WC=t=>Promise.all(t.map((t=>"solana"===t.blockchain?Promise.resolve(Hf.solana.maxInt):t.fromToken.allowance(t.fromAddress,MC[t.blockchain].address).catch((()=>{}))))).then((e=>(t.map(((n,r)=>{void 0===e[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Hf[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?t[r].approvalRequired=!1:(t[r].approvalRequired=Fp.from(n.fromAmount).gte(Fp.from(e[r])),t[r].approvalRequired&&(t[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:Ak[n.blockchain].DEFAULT,method:"approve",params:[MC[n.blockchain].address,Hf[n.blockchain].maxInt]}))})),t))),FC=({routes:t})=>t.map((t=>(DC.evm.includes(t.blockchain)?t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()&&null==t.fee:"solana"===t.blockchain&&(t.directTransfer=t.fromToken.address.toLowerCase()==t.toToken.address.toLowerCase()),t))),VC=({paymentRoute:t,exchangeRoute:e})=>{let n,r,i;return e?(e&&e.exchange.wrapper,n=e.amountIn.toString(),r=HC({amount:e.amountOutMin.toString(),paymentRoute:t})):(n=t.fromAmount,r=HC({amount:t.fromAmount,paymentRoute:t})),t.fee&&(i=GC({paymentRoute:t})),{fromAmount:n,toAmount:r,feeAmount:i}},HC=({amount:t,paymentRoute:e})=>{if(e.fee){let n=GC({paymentRoute:e});return Fp.from(t).sub(n).toString()}return t},GC=({paymentRoute:t})=>{if("string"==typeof t.fee.amount&&t.fee.amount.match("%"))return Fp.from(t.toAmount).mul(10*parseFloat(t.fee.amount)).div(1e3).toString();if("string"==typeof t.fee.amount)return t.fee.amount;if("number"==typeof t.fee.amount)return cN(t.fee.amount.toString(),t.toDecimals).toString();throw"Unknown fee amount type!"},qC=({routes:t})=>t.map((t=>{if(DC.evm.includes(t.blockchain))if(t.directTransfer&&!t.fee)t.fromAmount=t.toAmount;else{let{fromAmount:e,toAmount:n,feeAmount:r}=VC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}else if(DC.solana.includes(t.blockchain)){let{fromAmount:e,toAmount:n,feeAmount:r}=VC({paymentRoute:t,exchangeRoute:t.exchangeRoutes[0]});t.fromAmount=e,t.toAmount=n,t.fee&&(t.feeAmount=r)}return t})),ZC=t=>t.filter(((e,n)=>null==t.find(((t,r)=>e.fromToken.address==t.fromToken.address&&(e.fromToken.blockchain==t.fromToken.blockchain&&(!(!t.directTransfer||e.directTransfer)||(!(!Fp.from(t.fromAmount).lt(Fp.from(e.fromAmount))||e.directTransfer)||(t.fromAmount==e.fromAmount&&r{let e=-1;return t.sort(((t,n)=>xC(t.fromToken.blockchain)>>1,i=t[r];if(!(0>>1;ro(u,n))co(l,u)?(t[r]=l,t[c]=n,r=c):(t[r]=u,t[s]=n,r=s);else{if(!(co(l,n)))break t;t[r]=l,t[c]=n,r=c}}}return e}function o(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],h=1,d=null,f=3,p=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function b(t){for(var e=r(l);null!==e;){if(null===e.callback)i(l);else{if(!(e.startTime<=t))break;i(l),e.sortIndex=e.expirationTime,n(c,e)}e=r(l)}}function M(t){if(m=!1,b(t),!y)if(null!==r(c))y=!0,D(A);else{var e=r(l);null!==e&&O(M,e.startTime-t)}}function A(t,n){y=!1,m&&(m=!1,v(x),x=-1),p=!0;var o=f;try{for(b(n),d=r(c);null!==d&&(!(d.expirationTime>n)||t&&!L());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),b(n)}else i(c);d=r(c)}if(null!==d)var u=!0;else{var h=r(l);null!==h&&O(M,h.startTime-n),u=!1}return u}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var N,I=!1,E=null,x=-1,k=5,T=-1;function L(){return!(e.unstable_now()-Tt||125a?(t.sortIndex=o,n(l,t),null===r(c)&&t===r(l)&&(m?(v(x),x=-1):m=!0,O(M,o-a))):(t.sortIndex=s,n(c,t),y||p||(y=!0,D(A))),t},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}})); + */var KC=function(t){return Zx.createElement("svg",{className:["ChevronLeft","Icon",t.className].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},Zx.createElement("path",{strokeWidth:"1",fillRule:"evenodd",d:"M10.4,1.6c0.2,0.2,0.2,0.5,0,0.7L4.7,8l5.6,5.6c0.2,0.2,0.2,0.5,0,0.7s-0.5,0.2-0.7,0l-6-6l0,0,c-0.2-0.2-0.2-0.5,0-0.7l6-6l0,0C9.8,1.5,10.2,1.5,10.4,1.6L10.4,1.6z"}))},$C=function(){return Zx.createElement("svg",{className:"CloseIcon Icon",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Zx.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Zx.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))},tD=Zf((function(t,e){function n(t,e){var n=t.length;t.push(e);t:for(;0>>1,i=t[r];if(!(0>>1;ro(u,n))co(l,u)?(t[r]=l,t[c]=n,r=c):(t[r]=u,t[s]=n,r=s);else{if(!(co(l,n)))break t;t[r]=l,t[c]=n,r=c}}}return e}function o(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],l=[],h=1,d=null,f=3,p=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function b(t){for(var e=r(l);null!==e;){if(null===e.callback)i(l);else{if(!(e.startTime<=t))break;i(l),e.sortIndex=e.expirationTime,n(c,e)}e=r(l)}}function M(t){if(m=!1,b(t),!y)if(null!==r(c))y=!0,D(A);else{var e=r(l);null!==e&&O(M,e.startTime-t)}}function A(t,n){y=!1,m&&(m=!1,v(x),x=-1),p=!0;var o=f;try{for(b(n),d=r(c);null!==d&&(!(d.expirationTime>n)||t&&!L());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),b(n)}else i(c);d=r(c)}if(null!==d)var u=!0;else{var h=r(l);null!==h&&O(M,h.startTime-n),u=!1}return u}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var N,I=!1,E=null,x=-1,k=5,T=-1;function L(){return!(e.unstable_now()-Tt||125a?(t.sortIndex=o,n(l,t),null===r(c)&&t===r(l)&&(m?(v(x),x=-1):m=!0,O(M,o-a))):(t.sortIndex=s,n(c,t),y||p||(y=!0,D(A))),t},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}})); /** * @license React * scheduler.development.js @@ -105,7 +105,7 @@ Zf((function(t,e){}));var Zx=Zf((function(t){t.exports=qx})),Jx=Zx.createContext * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -Zf((function(t,e){}));var $C=Zf((function(t){t.exports=KC})); +Zf((function(t,e){}));var eD=Zf((function(t){t.exports=tD})); /** * @license React * react-dom.production.min.js @@ -114,7 +114,7 @@ Zf((function(t,e){}));var $C=Zf((function(t){t.exports=KC})); * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function tD(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n