From dea52e649994bfad648662ed0fdb3adb8ce972f7 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Fri, 5 Jan 2024 09:41:13 +0100 Subject: [PATCH 1/2] v12.3.19: upgrade web3-payments to fix solana nonce issue --- package.evm.json | 4 ++-- package.json | 4 ++-- package.solana.json | 4 ++-- yarn.lock | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.evm.json b/package.evm.json index 61b03cf5..1239c913 100644 --- a/package.evm.json +++ b/package.evm.json @@ -1,7 +1,7 @@ { "name": "@depay/widgets-evm", "moduleName": "DePayWidgets", - "version": "12.3.18", + "version": "12.3.19", "description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.", "main": "./dist/umd/index.js", "module": "./dist/esm/index.js", @@ -33,7 +33,7 @@ "@depay/web3-blockchains": "^9.2.9", "@depay/web3-client-evm": "^10.18.4", "@depay/web3-exchanges-evm": "^13.7.0", - "@depay/web3-payments-evm": "^13.6.9", + "@depay/web3-payments-evm": "^13.6.10", "@depay/web3-tokens-evm": "^10.3.0", "@depay/web3-wallets-evm": "^16.3.6", "@tanstack/react-virtual": "^3.0.0-beta.54", diff --git a/package.json b/package.json index 8ab8397b..dba98489 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@depay/widgets", "moduleName": "DePayWidgets", - "version": "12.3.18", + "version": "12.3.19", "description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.", "main": "./dist/umd/index.js", "module": "./dist/esm/index.js", @@ -47,7 +47,7 @@ "@depay/web3-blockchains": "^9.2.9", "@depay/web3-client": "^10.18.4", "@depay/web3-exchanges": "^13.7.0", - "@depay/web3-payments": "^13.6.9", + "@depay/web3-payments": "^13.6.10", "@depay/web3-tokens": "^10.3.0", "@depay/web3-wallets": "^16.3.6", "@tanstack/react-virtual": "^3.0.0-beta.54", diff --git a/package.solana.json b/package.solana.json index e7d9beba..a7acba07 100644 --- a/package.solana.json +++ b/package.solana.json @@ -1,7 +1,7 @@ { "name": "@depay/widgets-solana", "moduleName": "DePayWidgets", - "version": "12.3.18", + "version": "12.3.19", "description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.", "main": "./dist/umd/index.js", "module": "./dist/esm/index.js", @@ -34,7 +34,7 @@ "@depay/web3-blockchains": "^9.2.9", "@depay/web3-client-solana": "^10.18.4", "@depay/web3-exchanges-solana": "^13.7.0", - "@depay/web3-payments-solana": "^13.6.9", + "@depay/web3-payments-solana": "^13.6.10", "@depay/web3-tokens-solana": "^10.3.0", "@depay/web3-wallets-solana": "^16.3.6", "@tanstack/react-virtual": "^3.0.0-beta.54", diff --git a/yarn.lock b/yarn.lock index bf533e46..c790cf2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1330,10 +1330,10 @@ "@depay/web3-blockchains" "^9.1.4" ethers "^5.7.1" -"@depay/web3-payments@^13.6.9": - version "13.6.9" - resolved "https://registry.yarnpkg.com/@depay/web3-payments/-/web3-payments-13.6.9.tgz#8ee0782c08f13b7dedce531067aec4397eb12592" - integrity sha512-+jkDuesxW2TQ2KpfKUsjAF9HTgGro3O3hkf48AU+is5ryfdkVhEp3EdeR+2VTpxNCk+QGI5zN23NvcDqF4AiVA== +"@depay/web3-payments@^13.6.10": + version "13.6.10" + resolved "https://registry.yarnpkg.com/@depay/web3-payments/-/web3-payments-13.6.10.tgz#8b8474495162651980072886023b1821ff45a938" + integrity sha512-fXqpxUb3Jxf/yjIqXkxxHSwBF2+sm/g8FNgbdxdDG3KMSaF4wtJXn88fHtkjnYmA1u9UfuLXlPgo/7DkvZwStQ== "@depay/web3-tokens@^10.3.0": version "10.3.0" From ebca67283f9a1125fa3f208b324c2ee4006002f5 Mon Sep 17 00:00:00 2001 From: Sebastian Pape <0xneo11@gmail.com> Date: Fri, 5 Jan 2024 09:42:06 +0100 Subject: [PATCH 2/2] build --- dist/esm/index.bundle.js | 20 ++++++++++---------- dist/esm/index.solana.js.map | 2 +- dist/umd/index.bundle.js | 20 ++++++++++---------- dist/umd/index.solana.js.map | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dist/esm/index.bundle.js b/dist/esm/index.bundle.js index f3e1d449..dc8a6632 100644 --- a/dist/esm/index.bundle.js +++ b/dist/esm/index.bundle.js @@ -106,7 +106,7 @@ $p((function(e,t){}));var nk=$p((function(e){e.exports=tk})),rk=nk.createContext * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence - */function iL(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;tn)throw Error(Hk+e)}function aL(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Zk(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(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)&&(e[i+1]/o/100|0)==Zk(10,t-2)-1||(s==o/2||0==s)&&0==(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(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)&&(e[i+1]/o/1e3|0)==Zk(10,t-3)-1,a}function sL(e,t,n){for(var r,i,o=[0],a=0,s=e.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()}rL.absoluteValue=rL.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),cL(e)},rL.ceil=function(){return cL(new this.constructor(this),this.e+1,2)},rL.clampedTo=rL.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Hk+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},rL.comparedTo=rL.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,c=e.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!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;ts[t]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},rL.cosine=rL.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/TL(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=NL(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,IL(r,n)),r.precision=e,r.rounding=t,cL(2==Rk||3==Rk?n.neg():n,e,t,!0)):new r(1):new r(NaN)},rL.cubeRoot=rL.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(Vk=!1,(o=l.s*Zk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=iL(l.d),(o=((e=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Zk(n,1/3),e=qk((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=l.s),a=(e=d.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=uL(c.plus(l).times(s),c.plus(u),a+2,1),iL(s.d).slice(0,a)===(n=iL(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))||(cL(r,e+1,1),t=!r.times(r).times(r).eq(l));break}if(!i&&(cL(s,e+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Vk=!0,cL(r,e,d.rounding,t)},rL.decimalPlaces=rL.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-qk(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},rL.dividedBy=rL.div=function(e){return uL(this,new this.constructor(e))},rL.dividedToIntegerBy=rL.divToInt=function(e){var t=this.constructor;return cL(uL(this,new t(e),0,1,1),t.precision,t.rounding)},rL.equals=rL.eq=function(e){return 0===this.cmp(e)},rL.floor=function(){return cL(new this.constructor(this),this.e+1,3)},rL.greaterThan=rL.gt=function(e){return this.cmp(e)>0},rL.greaterThanOrEqualTo=rL.gte=function(e){var t=this.cmp(e);return 1==t||0===t},rL.hyperbolicCosine=rL.cosh=function(){var e,t,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?t=(1/TL(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=NL(a,1,o.times(t),new a(1),!0);for(var u,c=e,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return cL(o,a.precision=n,a.rounding=r,!0)},rL.hyperbolicSine=rL.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=NL(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=NL(o,2,i=i.times(1/TL(5,e)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=t,o.rounding=n,cL(i,t,n,!0)},rL.hyperbolicTangent=rL.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,uL(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},rL.inverseCosine=rL.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?pL(n,i,o):new n(0):new n(NaN):t.isZero()?pL(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=pL(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},rL.inverseHyperbolicCosine=rL.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Vk=!1,n=n.times(n).minus(1).sqrt().plus(n),Vk=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},rL.inverseHyperbolicSine=rL.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Vk=!1,n=n.times(n).plus(1).sqrt().plus(n),Vk=!0,r.precision=e,r.rounding=t,n.ln())},rL.inverseHyperbolicTangent=rL.atanh=function(){var e,t,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):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?cL(new o(i),e,t,!0):(o.precision=n=r-i.e,i=uL(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},rL.inverseSine=rL.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=pL(o,n+4,r).times(.5)).s=i.s,e):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)))},rL.inverseTangent=rL.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,l=c.constructor,d=l.precision,h=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&d+4<=nL)return(a=pL(l,d+4,h).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=nL)return(a=pL(l,d+4,h).times(.5)).s=c.s,a}for(l.precision=s=d+10,l.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Vk=!1,t=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==e;)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[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},rL.isNaN=function(){return!this.s},rL.isNegative=rL.isNeg=function(){return this.s<0},rL.isPositive=rL.isPos=function(){return this.s>0},rL.isZero=function(){return!!this.d&&0===this.d[0]},rL.lessThan=rL.lt=function(e){return this.cmp(e)<0},rL.lessThanOrEqualTo=rL.lte=function(e){return this.cmp(e)<1},rL.logarithm=rL.log=function(e){var t,n,r,i,o,a,s,u,c=this,l=c.constructor,d=l.precision,h=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.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(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Vk=!1,a=wL(c,s=d+5),r=t?hL(l,s+10):wL(e,s),aL((u=uL(a,r,s,1)).d,i=d,h))do{if(a=wL(c,s+=10),r=t?hL(l,s+10):wL(e,s),u=uL(a,r,s,1),!o){+iL(u.d).slice(i+1,i+15)+1==1e14&&(u=cL(u,d+1,0));break}}while(aL(u.d,i+=10,h));return Vk=!0,cL(u,d,h)},rL.minus=rL.sub=function(e){var t,n,r,i,o,a,s,u,c,l,d,h,p=this,f=p.constructor;if(e=new f(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new f(e.d||p.s!==e.s?p:NaN):e=new f(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,h=e.d,s=f.precision,u=f.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!c[0])return new f(3===u?-0:0);e=new f(p)}return Vk?cL(e,s,u):e}if(n=qk(e.e/7),l=qk(p.e/7),c=c.slice(),o=l-n){for((d=o<0)?(t=c,o=-o,a=h.length):(t=h,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=c.length)<(a=h.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=h.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),t=0;i;)t=(c[--i]=c[i]+l[i]+t)/eL|0,c[i]%=eL;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=dL(c,r),Vk?cL(e,s,u):e},rL.precision=rL.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Hk+e);return n.d?(t=fL(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},rL.round=function(){var e=this,t=e.constructor;return cL(new t(e),e.e+1,t.rounding)},rL.sine=rL.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:NL(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/TL(5,n)),t=NL(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,IL(r,n)),r.precision=e,r.rounding=t,cL(Rk>2?n.neg():n,e,t,!0)):new r(NaN)},rL.squareRoot=rL.sqrt=function(){var e,t,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(Vk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=iL(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=qk((u+1)/2)-(u<0||u%2),r=new l(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(uL(a,o,n+2,1)).times(.5),iL(o.d).slice(0,n)===(t=iL(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(cL(r,u+1,1),e=!r.times(r).eq(a));break}if(!i&&(cL(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Vk=!0,cL(r,u,l.rounding,e)},rL.tangent=rL.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=uL(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,cL(2==Rk||4==Rk?n.neg():n,e,t,!0)):new r(NaN)},rL.times=rL.mul=function(e){var t,n,r,i,o,a,s,u,c,l=this,d=l.constructor,h=l.d,p=(e=new d(e)).d;if(e.s*=l.s,!(h&&h[0]&&p&&p[0]))return new d(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:h&&p?0*e.s:e.s/0);for(n=qk(l.e/7)+qk(e.e/7),(u=h.length)<(c=p.length)&&(o=h,h=p,p=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%eL|0,t=s/eL|0;o[i]=(o[i]+t)%eL|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=dL(o,n),Vk?cL(e,d.precision,d.rounding):e},rL.toBinary=function(e,t){return kL(this,2,e,t)},rL.toDecimalPlaces=rL.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(oL(e,0,1e9),void 0===t?t=r.rounding:oL(t,0,8),cL(n,e+n.e+1,t))},rL.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=lL(r,!0):(oL(e,0,1e9),void 0===t?t=i.rounding:oL(t,0,8),n=lL(r=cL(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},rL.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=lL(i):(oL(e,0,1e9),void 0===t?t=o.rounding:oL(t,0,8),n=lL(r=cL(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},rL.toFraction=function(e){var t,n,r,i,o,a,s,u,c,l,d,h,p=this,f=p.d,y=p.constructor;if(!f)return new y(p);if(c=n=new y(1),r=u=new y(0),a=(o=(t=new y(r)).e=fL(f)-p.e-1)%7,t.d[0]=Zk(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new y(e)).isInt()||s.lt(c))throw Error(Hk+s);e=s.gt(t)?o>0?t:c:s}for(Vk=!1,s=new y(iL(f)),l=y.precision,y.precision=o=7*f.length*2;d=uL(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=c,c=u.plus(d.times(i)),u=i,i=t,t=s.minus(d.times(i)),s=i;return i=uL(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=p.s,h=uL(c,r,o,1).minus(p).abs().cmp(uL(u,n,o,1).minus(p).abs())<1?[c,r]:[u,n],y.precision=l,Vk=!0,h},rL.toHexadecimal=rL.toHex=function(e,t){return kL(this,16,e,t)},rL.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:oL(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Vk=!1,n=uL(n,e,0,t,1).times(e),Vk=!0,cL(n)):(e.s=n.s,n=e),n},rL.toNumber=function(){return+this},rL.toOctal=function(e,t){return kL(this,8,e,t)},rL.toPower=rL.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(Zk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return cL(s,r,o);if((t=qk(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=mL(u,s,n,r),e.s<0?new u(1).div(i):cL(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t0?a/0:0):(Vk=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=bL(e.times(wL(s,r+n)),r)).d&&aL((i=cL(i,r+5,1)).d,r,o)&&(t=r+10,+iL((i=cL(bL(e.times(wL(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=cL(i,r+1,0))),i.s=a,Vk=!0,u.rounding=o,cL(i,r,o))},rL.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=lL(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(oL(e,1,1e9),void 0===t?t=i.rounding:oL(t,0,8),n=lL(r=cL(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},rL.toSignificantDigits=rL.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(oL(e,1,1e9),void 0===t?t=n.rounding:oL(t,0,8)),cL(new n(this),e,t)},rL.toString=function(){var e=this,t=e.constructor,n=lL(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},rL.truncated=rL.trunc=function(){return cL(new this.constructor(this),this.e+1,1)},rL.valueOf=rL.toJSON=function(){var e=this,t=e.constructor,n=lL(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var uL=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,a,s,u){var c,l,d,h,p,f,y,m,g,v,b,w,M,A,E,N,T,I,k,L,x=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new x(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(p=1,l=r.e-i.e):(u=eL,p=7,l=qk(r.e/p)-qk(i.e/p)),k=C.length,T=j.length,v=(g=new x(S)).d=[],d=0;C[d]==(j[d]||0);d++);if(C[d]>(j[d]||0)&&l--,null==o?(A=o=x.precision,a=x.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),f=!0;else{if(A=A/p+2|0,d=0,1==k){for(h=0,C=C[0],A++;(d1&&(C=e(C,h,u),j=e(j,h,u),k=C.length,T=j.length),N=k,w=(b=j.slice(0,k)).length;w=u/2&&++I;do{h=0,(c=t(C,b,k,w))<0?(M=b[0],k!=w&&(M=M*u+(b[1]||0)),(h=M/I|0)>1?(h>=u&&(h=u-1),1==(c=t(y=e(C,h,u),b,m=y.length,w=b.length))&&(h--,n(y,k=10;h/=10)d++;g.e=d+l*p-1,cL(g,s?o+g.e+1:o,a,f)}return g}}();function cL(e,t,n,r){var i,o,a,s,u,c,l,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(l=d[h=0])/Zk(10,i-a-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=d.length)){if(!r)break e;for(;s++<=h;)d.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=d[h],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Zk(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(a<0?l:l%Zk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Zk(10,i-a):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=Zk(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=Zk(10,7-o),d[h]=a>0?(l/Zk(10,i-a)%Zk(10,a)|0)*s:0),c)for(;;){if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,d[0]==eL&&(d[0]=1));break}if(d[h]+=s,d[h]!=eL)break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return Vk&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+yL(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+yL(-i-1)+o,n&&(r=n-a)>0&&(o+=yL(r))):i>=a?(o+=yL(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+yL(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=yL(r))),o}function dL(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function hL(e,t,n){if(t>tL)throw Vk=!0,n&&(e.precision=n),Error("[DecimalError] Precision limit exceeded");return cL(new e(Qk),t,1,!0)}function pL(e,t,n){if(t>nL)throw Error("[DecimalError] Precision limit exceeded");return cL(new e(Yk),t,n,!0)}function fL(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function yL(e){for(var t="";e--;)t+="0";return t}function mL(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(Vk=!1;;){if(n%2&&LL((o=o.times(t)).d,a)&&(i=!0),0===(n=qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}LL((t=t.times(t)).d,a)}return Vk=!0,o}function gL(e){return 1&e.d[e.d.length-1]}function vL(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Vk=!1,u=f):u=t,s=new h(.03125);e.e>-2;)e=e.times(s),d+=5;for(u+=r=Math.log(Zk(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=u;;){if(o=cL(o.times(e),u,1),n=n.times(++l),iL((s=a.plus(uL(o,n,u,1))).d).slice(0,u)===iL(a.d).slice(0,u)){for(i=d;i--;)a=cL(a.times(a),u,1);if(null!=t)return h.precision=f,a;if(!(c<3&&aL(a.d,u-r,p,c)))return cL(a,h.precision=f,p,Vk=!0);h.precision=u+=10,n=o=s=new h(1),l=0,c++}a=s}}function wL(e,t){var n,r,i,o,a,s,u,c,l,d,h,p=1,f=e,y=f.d,m=f.constructor,g=m.rounding,v=m.precision;if(f.s<0||!y||!y[0]||!f.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=f.s?NaN:y?0:f);if(null==t?(Vk=!1,l=v):l=t,m.precision=l+=10,r=(n=iL(y)).charAt(0),!(Math.abs(o=f.e)<15e14))return c=hL(m,l+2,v).times(o+""),f=wL(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==t?cL(f,v,g,Vk=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=iL((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new m("0."+n),o++):f=new m(r+"."+n.slice(1)),d=f,u=a=f=uL(f.minus(1),f.plus(1),l,1),h=cL(f.times(f),l,1),i=3;;){if(a=cL(a.times(h),l,1),iL((c=u.plus(uL(a,new m(i),l,1))).d).slice(0,l)===iL(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(hL(m,l+2,v).times(o+""))),u=uL(u,new m(p),l,1),null!=t)return m.precision=v,u;if(!aL(u.d,l-10,g,s))return cL(u,m.precision=v,g,Vk=!0);m.precision=l+=10,c=a=f=uL(d.minus(1),d.plus(1),l,1),h=cL(f.times(f),l,1),i=s=1}u=c,i+=2}}function ML(e){return String(e.s*e.s/0)}function AL(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),$k.test(t))return AL(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xk.test(t))n=16,t=t.toLowerCase();else if(Jk.test(t))n=2;else{if(!Kk.test(t))throw Error(Hk+t);n=8}for((o=t.search(/p/i))>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=mL(r,new r(n),o,2*o)),o=l=(c=sL(t,n,eL)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=dL(c,l),e.d=c,Vk=!1,a&&(e=uL(e,i,4*s)),u&&(e=e.times(Math.abs(u)<54?Zk(2,u):yx.pow(2,u))),Vk=!0,e)}function NL(e,t,n,r,i){var o,a,s,u,c=e.precision,l=Math.ceil(c/7);for(Vk=!1,u=n.times(n),s=new e(r);;){if(a=uL(s.times(u),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=uL(a.times(u),new e(t++*t++),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 Vk=!0,a.d.length=l+1,a}function TL(e,t){for(var n=e;--t;)n*=e;return n}function IL(e,t){var n,r=t.s<0,i=pL(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Rk=r?4:1,t;if((n=t.divToInt(i)).isZero())Rk=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return Rk=gL(n)?r?2:3:r?4:1,t;Rk=gL(n)?r?1:4:r?3:2}return t.minus(i).abs()}function kL(e,t,n,r){var i,o,a,s,u,c,l,d,h,p=e.constructor,f=void 0!==n;if(f?(oL(n,1,1e9),void 0===r?r=p.rounding:oL(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(l=lL(e)).indexOf("."))>=0&&(l=l.replace(".",""),(h=new p(1)).e=l.length-a,h.d=sL(lL(h),10,i),h.e=h.d.length),o=u=(d=sL(l,10,i)).length;0==d[--u];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=uL(e,h,n,r,0,i)).d,o=e.e,c=Pk),a=d[n],s=i/2,c=c||void 0!==d[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,c)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(u=d.length;!d[u-1];--u);for(a=0,l="";a1)if(16==t||8==t){for(a=16==t?4:3,--u;u%a;u++)l+="0";for(u=(d=sL(l,i,t)).length;!d[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else ot)return e.length=t,!0}function xL(e){return new this(e).abs()}function SL(e){return new this(e).acos()}function jL(e){return new this(e).acosh()}function CL(e,t){return new this(e).plus(t)}function DL(e){return new this(e).asin()}function OL(e){return new this(e).asinh()}function zL(e){return new this(e).atan()}function _L(e){return new this(e).atanh()}function PL(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?pL(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=pL(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(uL(e,t,o,1)),t=pL(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(uL(e,t,o,1)):(n=pL(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function RL(e){return new this(e).cbrt()}function BL(e){return cL(e=new this(e),e.e+1,2)}function UL(e,t,n){return new this(e).clamp(t,n)}function WL(e){if(!e||"object"!=typeof e)throw Error("[DecimalError] Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Uk,0,"toExpPos",0,Uk,"maxE",0,Uk,"minE",-Uk,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2]))throw Error(Hk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Fk[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Hk+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 QL(e){return new this(e).cos()}function YL(e){return new this(e).cosh()}function FL(e,t){return new this(e).div(t)}function VL(e){return new this(e).exp()}function HL(e){return cL(e=new this(e),e.e+1,3)}function GL(){var e,t,n=new this(0);for(Vk=!1,e=0;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,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 ox(e){return cL(e=new this(e),e.e+1,this.rounding)}function ax(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function sx(e){return new this(e).sin()}function ux(e){return new this(e).sinh()}function cx(e){return new this(e).sqrt()}function lx(e,t){return new this(e).sub(t)}function dx(){var e=0,t=arguments,n=new this(t[e]);for(Vk=!1;n.s&&++eo.maxE?(i.e=NaN,i.d=null):e.e=10;n/=10)t++;return void(Vk?t>o.maxE?(i.e=NaN,i.d=null):tn.call(t,...e))),t=void 0)}return n}Qk=new yx(Qk),Yk=new yx(Yk);class gx{constructor({blockchain:e,tokenIn:t,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:d,approvalRequired:h,getApproval:p,getPrep:f,getTransaction:y}){this.blockchain=e,this.tokenIn=t,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=mx([s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountOutMin=mx([l,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountOut=mx([c,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountInMax=mx([u,"optionalAccess",e=>e.toString,"call",e=>e()]),this.exchange=d,this.getPrep=f,this.getTransaction=y}}let vx=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];vx.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],vx.solana=["solana"];const bx=async({exchange:e,blockchain:t,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!vx.evm.includes(e.blockchain||t))return a;const s=await UE({blockchain:e.blockchain||t,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 e.getAmounts({exchange:e,blockchain:t,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let d;if(l[0].gt(l[1])&&l[1].gt(l[2])){const e=l[0].sub(l[1]),t=l[1].sub(l[2]),n=e.add(t).div(2);if(d=l[0].add(n),d.gt(a))return d}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const e=l[0].sub(l[1]).abs(),t=l[1].sub(l[2]).abs();let n,r;if(n=e.lt(t)?e:t,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],d=r.add(n),d.gt(a))return d}return a},wx=async({exchange:e,blockchain:t,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:d,amountOutInput:h,amountInMaxInput:p,amountOutMinInput:f})=>{if(f||h){if(vx.evm.includes(e.blockchain||t))s=u=await bx({exchange:e,blockchain:t,pools:n,exchangePath:r,amountIn:s,amountOut:f||c});else if(vx.solana.includes(e.blockchain||t)){let t=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=bx({exchange:e,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((e=>t.push(e))),o}}))),t.push(i[i.length-1]),s=u=(i=t)[0]}}else if((p||d)&&vx.solana.includes(e.blockchain||t)){let t=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:e,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((e=>(t.unshift(e),e))),n}}))),t.push(i[0]),c=l=(i=t.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},Mx=e=>e.match("0x")?dm(e):e;let Ax=async({amount:e,blockchain:t,address:n})=>await xk.BigNumber({amount:e,blockchain:t,address:n}),Ex=async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await Ax({amount:o,blockchain:e,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await Ax({amount:s,blockchain:e,address:r})),i&&"number"==typeof i&&(u.amountIn=await Ax({amount:i,blockchain:e,address:n})),a&&"number"==typeof a&&(u.amountInMax=await Ax({amount:a,blockchain:e,address:n})),u};class Nx{constructor(...e){Object.assign(this,...e)}async route({blockchain:e,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return t===n?Promise.resolve():(void 0===e&&(this.scope?e=this.scope:1===this.blockchains.length&&(e=this.blockchains[0])),(({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===e&&null!=t.blockchains&&t.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:e,exchange:this,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:d,slippage:h})=>{if(n=Mx(n),r=Mx(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 p=>{let{path:f,exchangePath:y,pools:m}=await u({blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===f||0==f.length)return p();let g,[v,b,w,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:t,blockchain:e,path:f,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(e){return p()}if([i,a,o,s].every((e=>null==e)))return p();if(h||t.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await wx({exchange:t,blockchain:e,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:b,amountInMaxInput:w,amountOutMinInput:M}))}catch(e){return p()}const A=await new xk({blockchain:e,address:n}).decimals(),E=await new xk({blockchain:e,address:r}).decimals();p(new gx({blockchain:e,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:E,path:f,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:t,getPrep:async({account:o})=>await l({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await d({exchange:t,blockchain:e,pools:m,path:f,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:b,amountInMaxInput:w,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await Ex({blockchain:e,exchange:this,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:e,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function Tx(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const Ix=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},kx=({reserves:e,min:t,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?e[0].gte(pE(t.toString(),o)):i.toLowerCase()==n.toLowerCase()&&e[1].gte(pE(t.toString(),o)),Lx=async({blockchain:e,exchange:t,path:n})=>{const r=Ix({blockchain:e,exchange:t,path:n});if(!r||1===r.length)return!1;try{let i=await UE({blockchain:e,address:t[e].factory.address,method:"getPair",api:t[e].factory.api,cache:36e5,params:Ix({blockchain:e,exchange:t,path:n})});if(!i||i==Jp[e].zero)return!1;let[o,a,s]=await Promise.all([UE({blockchain:e,address:i,method:"getReserves",api:t[e].pair.api,cache:36e5}),UE({blockchain:e,address:i,method:"token0",api:t[e].pair.api,cache:36e5}),UE({blockchain:e,address:i,method:"token1",api:t[e].pair.api,cache:36e5})]);if(r.includes(Jp[e].wrapped.address))return kx({min:1,token:Jp[e].wrapped.address,decimals:Jp[e].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((t=>Jp[e].stables.usd.includes(t)))){let t=n.find((t=>Jp[e].stables.usd.includes(t))),r=new xk({blockchain:e,address:t}),i=await r.decimals();return kx({min:1e3,token:t,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(e){return console.log("e",e),!1}};let xx=({blockchain:e,exchange:t,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{UE({blockchain:e,address:t[e].router.address,method:"getAmountsOut",api:t[e].router.api,params:{amountIn:r,path:Ix({blockchain:e,exchange:t,path:n})}}).then((e=>{i(e[e.length-1])})).catch((()=>i()))})),Sx=({blockchain:e,exchange:t,path:n,amountOut:r,block:i})=>new Promise((o=>{UE({blockchain:e,address:t[e].router.address,method:"getAmountsIn",api:t[e].router.api,params:{amountOut:r,path:Ix({blockchain:e,exchange:t,path:n})},block:i}).then((e=>o(e[0]))).catch((()=>o()))}));var jx={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await Lx({blockchain:e,exchange:t,path:[n,r]}))i=[n,r];else if(n!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[n,Jp[e].wrapped.address]})&&r!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[r,Jp[e].wrapped.address]}))i=[n,Jp[e].wrapped.address,r];else if(!Jp[e].stables.usd.includes(n)&&(await Promise.all(Jp[e].stables.usd.map((r=>Lx({blockchain:e,exchange:t,path:[n,r]}))))).filter(Boolean).length&&r!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[Jp[e].wrapped.address,r]})){let o=(await Promise.all(Jp[e].stables.usd.map((async r=>await Lx({blockchain:e,exchange:t,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Jp[e].wrapped.address,r]}else if(n!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[n,Jp[e].wrapped.address]})&&!Jp[e].stables.usd.includes(r)&&(await Promise.all(Jp[e].stables.usd.map((n=>Lx({blockchain:e,exchange:t,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Jp[e].stables.usd.map((async n=>await Lx({blockchain:e,exchange:t,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Jp[e].wrapped.address,o,r]}return Tx([i,"optionalAccess",e=>e.length])&&i[0]==Jp[e].currency.address?i.splice(1,0,Jp[e].wrapped.address):Tx([i,"optionalAccess",e=>e.length])&&i[i.length-1]==Jp[e].currency.address&&i.splice(i.length-1,0,Jp[e].wrapped.address),{path:i,exchangePath:Ix({blockchain:e,exchange:t,path:i})}},pathExists:Lx,getAmounts:async({blockchain:e,exchange:t,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await Sx({blockchain:e,exchange:t,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 xx({blockchain:e,exchange:t,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 Sx({blockchain:e,exchange:t,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 xx({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;const o=await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].router.address]});if(o.gte(r))return;return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].router.address,r.sub(o)]}}},getTransaction:({exchange:e,blockchain:t,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:d})=>{let h={blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api};return n[0]===Jp[t].currency.address?s||l?(h.method="swapExactETHForTokens",h.value=r.toString(),h.params={amountOutMin:a.toString()}):(u||c)&&(h.method="swapETHForExactTokens",h.value=i.toString(),h.params={amountOut:o.toString()}):n[n.length-1]===Jp[t].currency.address?s||l?(h.method="swapExactTokensForETH",h.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(h.method="swapTokensForExactETH",h.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(h.method="swapExactTokensForTokens",h.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(h.method="swapTokensForExactTokens",h.params={amountInMax:i.toString(),amountOut:o.toString()}),h.params=Object.assign({},h.params,{path:Ix({blockchain:t,exchange:e,path:n}),to:d,deadline:Math.round(Date.now()/1e3)+86400}),h},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 Cx={name:"honeyswap",label:"Honeyswap",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABQCAYAAADBTPF9AAAACXBIWXMAAAsTAAALEwEAmpwYAAALmklEQVR4nO2de3BU1R3HP7+7eQALAcSNyq4ELDpUS0HJdrRm0aE6oPWJWqtQxUdn1KpcdQy04nssslQbdKxa7cC0iq22+BhsUQcfbBzQAL4V7VQM7OK4i4oJBJLs3l//uEHDkvfevbsb85nJHzn33PP73fu99+x5/M65Mt08jXwlVpuYCTwCjAS+BD5FeRXhaX+Vb51Tdja/khhZUsQpCGcBE4HRQCmwoqWFS8ZN8zU7ZctpJF8FjEbixSLyBnB0B4ebgZeAuzIRMhqJe0XkKuBKYFwn2c7xV/lW9NVGtjFy7UBniKKA1cnhUuA0oDYaSdyxLbLd09vyo5HEFBGJAGE6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+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:jx.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:jx.FACTORY},pair:{api:jx.PAIR}}};var Dx=e=>new Nx(Object.assign(Cx,{scope:e,findPath:e=>jx.findPath({...e,exchange:Cx}),pathExists:e=>jx.pathExists({...e,exchange:Cx}),getAmounts:e=>jx.getAmounts({...e,exchange:Cx}),getPrep:e=>jx.getPrep({...e,exchange:Cx}),getTransaction:e=>jx.getTransaction({...e,exchange:Cx})}));const Ox="79226673515401279992447579055",zx=e=>-e;class _x{static priceToSqrtPriceX64(e,t,n){return r=e.mul(yx.pow(10,n-t)).sqrt(),new up(r.mul(yx.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(e,t,n){return(r=e,new yx(r.toString()).mul(yx.pow(2,-64))).pow(2).mul(yx.pow(10,t-n));var r}static tickIndexToSqrtPriceX64(e){return new up(e>0?function(e){let t;t=new up(0!=(1&e)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&e)&&(t=Px(t.mul(new up("79236085330515764027303304731")),96,256));0!=(4&e)&&(t=Px(t.mul(new up("79244008939048815603706035061")),96,256));0!=(8&e)&&(t=Px(t.mul(new up("79259858533276714757314932305")),96,256));0!=(16&e)&&(t=Px(t.mul(new up("79291567232598584799939703904")),96,256));0!=(32&e)&&(t=Px(t.mul(new up("79355022692464371645785046466")),96,256));0!=(64&e)&&(t=Px(t.mul(new up("79482085999252804386437311141")),96,256));0!=(128&e)&&(t=Px(t.mul(new up("79736823300114093921829183326")),96,256));0!=(256&e)&&(t=Px(t.mul(new up("80248749790819932309965073892")),96,256));0!=(512&e)&&(t=Px(t.mul(new up("81282483887344747381513967011")),96,256));0!=(1024&e)&&(t=Px(t.mul(new up("83390072131320151908154831281")),96,256));0!=(2048&e)&&(t=Px(t.mul(new up("87770609709833776024991924138")),96,256));0!=(4096&e)&&(t=Px(t.mul(new up("97234110755111693312479820773")),96,256));0!=(8192&e)&&(t=Px(t.mul(new up("119332217159966728226237229890")),96,256));0!=(16384&e)&&(t=Px(t.mul(new up("179736315981702064433883588727")),96,256));0!=(32768&e)&&(t=Px(t.mul(new up("407748233172238350107850275304")),96,256));0!=(65536&e)&&(t=Px(t.mul(new up("2098478828474011932436660412517")),96,256));0!=(131072&e)&&(t=Px(t.mul(new up("55581415166113811149459800483533")),96,256));0!=(262144&e)&&(t=Px(t.mul(new up("38992368544603139932233054999993551")),96,256));return Px(t,32,256)}(e):function(e){let t,n=Math.abs(e);t=new up(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(t=Px(t.mul(new up("18444899583751176498")),64,256));0!=(4&n)&&(t=Px(t.mul(new up("18443055278223354162")),64,256));0!=(8&n)&&(t=Px(t.mul(new up("18439367220385604838")),64,256));0!=(16&n)&&(t=Px(t.mul(new up("18431993317065449817")),64,256));0!=(32&n)&&(t=Px(t.mul(new up("18417254355718160513")),64,256));0!=(64&n)&&(t=Px(t.mul(new up("18387811781193591352")),64,256));0!=(128&n)&&(t=Px(t.mul(new up("18329067761203520168")),64,256));0!=(256&n)&&(t=Px(t.mul(new up("18212142134806087854")),64,256));0!=(512&n)&&(t=Px(t.mul(new up("17980523815641551639")),64,256));0!=(1024&n)&&(t=Px(t.mul(new up("17526086738831147013")),64,256));0!=(2048&n)&&(t=Px(t.mul(new up("16651378430235024244")),64,256));0!=(4096&n)&&(t=Px(t.mul(new up("15030750278693429944")),64,256));0!=(8192&n)&&(t=Px(t.mul(new up("12247334978882834399")),64,256));0!=(16384&n)&&(t=Px(t.mul(new up("8131365268884726200")),64,256));0!=(32768&n)&&(t=Px(t.mul(new up("3584323654723342297")),64,256));0!=(65536&n)&&(t=Px(t.mul(new up("696457651847595233")),64,256));0!=(131072&n)&&(t=Px(t.mul(new up("26294789957452057")),64,256));0!=(262144&n)&&(t=Px(t.mul(new up("37481735321082")),64,256));return t}(e))}static sqrtPriceX64ToTickIndex(e){if(e.gt(new up(Ox))||e.lt(new up("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const t=e.bitLength()-1,n=function(e,t,n){let r=e.toTwos(n).shln(t);return r.imaskn(n+1),r.fromTwos(n)}(new up(t-64),32,128);let r=new up("8000000000000000","hex"),i=0,o=new up(0),a=t>=64?e.shrn(t-63):e.shln(63-t);for(;r.gt(new up(0))&&i<14;){a=a.mul(a);let e=a.shrn(127);a=a.shrn(63+e.toNumber()),o=o.add(r.mul(e)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new up("59543866431248")),c=Px(u.sub(new up("184467440737095516")),64,128).toNumber(),l=Px(u.add(new up("15793534762490258745")),64,128).toNumber();if(c==l)return c;return _x.tickIndexToSqrtPriceX64(l).lte(e)?l:c}static tickIndexToPrice(e,t,n){return _x.sqrtPriceX64ToPrice(_x.tickIndexToSqrtPriceX64(e),t,n)}static priceToTickIndex(e,t,n){return _x.sqrtPriceX64ToTickIndex(_x.priceToSqrtPriceX64(e,t,n))}static priceToInitializableTickIndex(e,t,n,r){return((e,t)=>e-e%t)(_x.priceToTickIndex(e,t,n),r)}static invertPrice(e,t,n){const r=_x.priceToTickIndex(e,t,n),i=zx(r);return _x.tickIndexToPrice(i,n,t)}static invertSqrtPriceX64(e){const t=_x.sqrtPriceX64ToTickIndex(e),n=zx(t);return _x.tickIndexToSqrtPriceX64(n)}}function Px(e,t,n){let r=e.toTwos(n).shrn(t);return r.imaskn(n-t+1),r.fromTwos(n-t)}const Rx=new up(1e4),Bx=new up(1e6),Ux=new up(0),Wx=new up(1),Qx=new up(2),Yx=Qx.pow(new up(64)).sub(Wx);class Fx extends up{toBuffer(){const e=super.toArray().reverse(),t=buffer.Buffer.from(e);if(8===t.length)return t;assert__default.default(t.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return t.copy(n),n}static fromBuffer(e){return assert__default.default(8===e.length,`Invalid buffer length: ${e.length}`),new Fx([...e].reverse().map((e=>`00${e.toString(16)}`.slice(-2))).join(""),16)}}class Vx{static mul(e,t,n){const r=e.mul(t);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(e,t,n,r){return this.mulDivRoundUpIf(e,t,n,!1,r)}static mulDivRoundUp(e,t,n,r){return this.mulDivRoundUpIf(e,t,n,!0,r)}static mulDivRoundUpIf(e,t,n,r,i){if(n.eq(Ux))throw new Error("mulDiv denominator is zero");const o=this.mul(e,t,i),a=o.div(n);return r&&o.mod(n).gt(Ux)?a.add(Wx):a}static checked_mul_shift_right(e,t,n){return this.checked_mul_shift_right_round_up_if(e,t,!1,n)}static checked_mul_shift_right_round_up_if(e,t,n,r){if(e.eq(Ux)||t.eq(Ux))return Ux;const i=this.mul(e,t,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new up(2).pow(new up(64)));const a=n&&o.and(Yx).gt(Ux);if(a&&o.eq(Yx))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(Wx):o}static isOverLimit(e,t){const n=Qx.pow(new up(t)).sub(Wx);return e.gt(n)}static divRoundUp(e,t){return this.divRoundUpIf(e,t,!0)}static divRoundUpIf(e,t,n){if(t.eq(Ux))throw new Error("divRoundUpIf - divide by zero");let r=e.div(t);return n&&e.mod(t).gt(Ux)?r.add(Wx):r}}const Hx=(e,t,n)=>{const r=_x.tickIndexToSqrtPriceX64(e);return{nextTickPrice:r,nextSqrtPriceLimit:n?up.max(t,r):up.min(t,r)}},Gx=(e,t)=>e.gt(t)?[t,e]:[e,t],qx=(e,t,n,r)=>{let[i,o]=Gx(e,t),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),d=r&&!l.eq(Ux)?c.add(Wx):c;if(d.gt(Yx))throw new Error("Results larger than U64");return d},Zx=(e,t,n,r)=>{let[i,o]=Gx(e,t),a=o.sub(i);return Vx.checked_mul_shift_right_round_up_if(n,a,r,128)},Jx=(e,t,n,r,i)=>r===i?((e,t,n,r)=>{if(n.eq(Ux))return e;let i=Vx.mul(e,n,256),o=Vx.mul(t,e,256).shln(64);if(Vx.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=t.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=Vx.divRoundUp(o,s);if(u.lt(new up("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new up(Ox)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(e,t,n,r):((e,t,n,r)=>{let i=n.shln(64),o=Vx.divRoundUpIf(i,t,!r);return r?e.add(o):e.sub(o)})(e,t,n,r),Xx=(e,t,n,r,i)=>i===r?qx(e,t,n,r):Zx(e,t,n,r),Kx=(e,t,n,r,i,o,a)=>{let s=Xx(r,i,n,o,a),u=e;if(o){u=Vx.mulDiv(e,Bx.sub(new up(t)),Bx,128)}let c=u.gte(s)?i:Jx(r,n,u,o,a),l=c.eq(i),d=((e,t,n,r,i)=>i===r?Zx(e,t,n,!r):qx(e,t,n,!r))(r,c,n,o,a);l||(s=Xx(r,c,n,o,a));let h,p=o?s:d,f=o?d:s;if(!o&&f.gt(e)&&(f=e),o&&!l)h=e.sub(p);else{const e=new up(t);h=Vx.mulDivRoundUp(p,e,Bx.sub(e),128)}return{amountIn:p,amountOut:f,nextPrice:c,feeAmount:h}},$x=(e,t,n)=>n?t.sub(e):t.add(e),eS=(e,t,n,r,i)=>{let o=r,a=i,s=e;if(t>0){let e=((e,t)=>e.mul(new Fx(t).div(Rx)))(s,t);s=s.sub(e),o=o.add(r)}if(n.gt(Ux)){const e=s.shln(64).div(n);a=a.add(e)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},tS=vp([yp("mint"),yp("vault"),yp("authority"),bp("emissionsPerSecondX64"),bp("growthGlobalX64")]),nS=vp([Ap("anchorDiscriminator"),yp("whirlpoolsConfig"),rp(Ep(),1,"whirlpoolBump"),wp("tickSpacing"),rp(Ep(),2,"tickSpacingSeed"),wp("feeRate"),wp("protocolFeeRate"),bp("liquidity"),bp("sqrtPrice"),hp("tickCurrentIndex"),Ap("protocolFeeOwedA"),Ap("protocolFeeOwedB"),yp("tokenMintA"),yp("tokenVaultA"),bp("feeGrowthGlobalA"),yp("tokenMintB"),yp("tokenVaultB"),bp("feeGrowthGlobalB"),Ap("rewardLastUpdatedTimestamp"),rp(tS,3,"rewardInfos")]),rS=vp([lp("initialized"),dp("liquidityNet"),bp("liquidityGross"),bp("feeGrowthOutsideA"),bp("feeGrowthOutsideB"),rp(bp(),3,"reward_growths_outside")]),iS=vp([Ap("anchorDiscriminator"),hp("startTickIndex"),rp(rS,88,"ticks"),yp("whirlpool")]),oS=(e,t,n)=>{const r=(Math.floor(e/t/88)+n)*t*88,i=88*t;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},aS=async({pool:e,freshWhirlpoolData:t,aToB:n})=>{const r=await(async({aToB:e,pool:t,tickSpacing:n,tickCurrentIndex:r})=>{const i=e?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=oS(r+i,n,o)}catch(e){return a}const u=(await iu.findProgramAddress([sp.from("tick_array"),new iu(t.toString()).toBuffer(),sp.from(s.toString())],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=e?o-1:o+1}return a})({aToB:n,pool:e,tickSpacing:t.tickSpacing,tickCurrentIndex:t.tickCurrentIndex});return await Promise.all(r.map((async(e,t)=>{let n;try{n=await UE({blockchain:"solana",address:e.toString(),api:iS,cache:10})}catch(e){}return{address:e,data:n}})))};class sS{static fromTickIndex(e,t){const n=Math.floor(Math.floor(e/t)/88);let r=Math.floor(e%(88*t)/t);return r<0&&(r=88+r),new sS(n,r,t)}constructor(e,t,n){if(t>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(t<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=e,this.offsetIndex=t,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return sS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return sS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class uS{constructor(e,t,n){if(!e[0]||!e[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const t of e){if(!t||!t.data)break;this.sequence.push({address:t.address,data:t.data})}this.tickArrays=e,this.tickSpacing=t,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=sS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(e){const t=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,e+t)}getNumOfTouchedArrays(){return this.touchedArrays.filter((e=>!!e)).length}getTouchedArrays(e){let t=this.touchedArrays.reduce(((e,t,n)=>(t&&e.push(this.sequence[n].address),e)),[]);if(0===t.length)return[];const n=e-t.length;return n>0&&(t=t.concat(Array(n).fill(t[t.length-1]))),t}getTick(e){const t=sS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(t,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(t.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,e))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[t.offsetIndex]}findNextInitializedTickIndex(e){const t=this.aToB?e:e+this.tickSpacing;let n=sS.fromTickIndex(t,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 e=this.getTick(n.toTickIndex());if(e.initialized)return{nextIndex:n.toTickIndex(),nextTickData:e};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(e,t){return t?this.startArrayIndex-e:e-this.startArrayIndex}isArrayIndexInBounds(e,t){const n=this.getLocalArrayIndex(e.arrayIndex,t),r=this.sequence.length;return n>=0&&n=e&&t{try{const n=await UE({blockchain:"solana",address:e.pubkey.toString(),api:nS,cache:10}),s=n.tokenMintA.toString()===t,u=await aS({pool:e.pubkey,freshWhirlpoolData:n,aToB:s}),c=new uS(u,n.tickSpacing,s),l=new up(s?"4295048016":Ox),d=!(!r&&!i);return{price:(({tokenAmount:e,aToB:t,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=e,s=Ux,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,d=Ux;const h=n.feeRate,p=n.protocolFeeRate;let f=new Fx(0),y=t?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(Ux)&&!i.eq(u);){let{nextIndex:e}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=Hx(e,i,t);const g=Kx(a,h,c,u,m,o,t);d=d.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:b}=eS(g.feeAmount,p,c,f,y);if(f=v,y=b,g.nextPrice.eq(n)){const n=r.getTick(e);n.initialized&&(c=$x(n.liquidityNet,c,t)),l=t?e-1:e}else l=_x.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new up((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:d}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(e){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let lS=async(e,t)=>await UE("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:nS.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:e}},{memcmp:{offset:181,bytes:t}}]},api:nS,cache:86400,cacheKey:["whirlpool",e.toString(),t.toString()].join("-")}),dS=async({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await lS(e,t);return 0===a.length&&(a=await lS(t,e)),a=a.filter((e=>e.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await cS({account:a,tokenIn:e,tokenOut:t,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(e){return[]}},hS=async({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await dS({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(e=>e.reduce(((e,t)=>Zf.from(t.price).gt(Zf.from(e.price))?t:e)))(a):(e=>e.reduce(((e,t)=>Zf.from(t.price).lt(Zf.from(e.price))?t:e)))(a),s};function pS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const fS=Jp.solana;let yS=({path:e})=>{if(!e)return;let t=e.map(((t,n)=>t===fS.currency.address&&e[n+1]!=fS.wrapped.address&&e[n-1]!=fS.wrapped.address?fS.wrapped.address:t));return t[0]==fS.currency.address&&t[1]==fS.wrapped.address?t.splice(0,1):t[t.length-1]==fS.currency.address&&t[t.length-2]==fS.wrapped.address&&t.splice(t.length-1,1),t},mS=async({path:e,amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=e.length&&(e=yS({path:e}),(await dS({tokenIn:e[0],tokenOut:e[1],amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),gS=async({path:e,amountIn:t,amountInMax:n})=>{let r=[Zf.from(t||n)];if(r.push(Zf.from((await hS({tokenIn:e[0],tokenOut:e[1],amountIn:t,amountInMax:n})).price)),3===e.length&&r.push(Zf.from((await hS({tokenIn:e[1],tokenOut:e[2],amountIn:t?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==e.length)return r},vS=async({path:e,amountOut:t,amountOutMin:n})=>{e=e.slice().reverse();let r=[Zf.from(t||n)];if(r.push(Zf.from((await hS({tokenIn:e[1],tokenOut:e[0],amountOut:t,amountOutMin:n})).price)),3===e.length&&r.push(Zf.from((await hS({tokenIn:e[2],tokenOut:e[1],amountOut:t?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==e.length)return r.slice().reverse()};const bS=Jp.solana,wS=new up("14449647541112719096"),MS=new up("16635068063392030915"),AS=async({instructions:e,owner:t,token:n,account:r})=>{let i;try{i=!!await UE({blockchain:"solana",address:r.toString()})}catch(e){}i||e.push(await xk.solana.createAssociatedTokenAccountInstruction({token:n,owner:t,payer:t}))},ES=async({account:e,poolOne:t,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:d,tokenVaultTwoB:h})=>{let p=!1;const f=n.map(((e,t)=>!1!==p?n[p]:e.data?e:(p=t-1,n[t-1])));let y=!1;const m=u.map(((e,t)=>!1!==y?u[y]:e.data?e:(y=t-1,u[t-1])));return[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new iu(e),isWritable:!1,isSigner:!0},{pubkey:new iu(t.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(d.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(h.toString()),isWritable:!0,isSigner:!1},{pubkey:f[0].address,isWritable:!0,isSigner:!1},{pubkey:f[1].address,isWritable:!0,isSigner:!1},{pubkey:f[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 iu.findProgramAddress([sp.from("oracle"),new iu(t.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await iu.findProgramAddress([sp.from("oracle"),new iu(s.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},NS=({amount:e,otherAmountThreshold:t,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]),u=sp.alloc(s.span),s.encode({anchorDiscriminator:MS,amount:new up(e.toString()),otherAmountThreshold:new up(t.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},TS=async({account:e,pool:t,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((e,t)=>!1!==s?a[s]:e.data?e:(s=t-1,a[t-1])));return[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new iu(e),isWritable:!1,isSigner:!0},{pubkey:new iu(t.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(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 iu.findProgramAddress([sp.from("oracle"),new iu(t.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},IS=({amount:e,otherAmountThreshold:t,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]),a=sp.alloc(o.span),o.encode({anchorDiscriminator:wS,amount:new up(e.toString()),otherAmountThreshold:new up(t.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var kS={findPath:async({tokenIn:e,tokenOut:t,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([e,t].includes(fS.currency.address)&&[e,t].includes(fS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await mS({path:[e,t],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[e,t]:e!=fS.wrapped.address&&e!=fS.currency.address&&await mS({path:[e,fS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&t!=fS.wrapped.address&&t!=fS.currency.address&&await mS({path:[t,fS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[e,fS.wrapped.address,t]:!fS.stables.usd.includes(e)&&(s=(await Promise.all(fS.stables.usd.map((async t=>await mS({path:[e,t],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?t:void 0)))).filter(Boolean))&&!fS.stables.usd.includes(t)&&(u=(await Promise.all(fS.stables.usd.map((async e=>await mS({path:[t,e],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?e:void 0)))).filter(Boolean))&&(c=s.filter((e=>u.includes(e)))[0])&&(a=[e,c,t]),pS([a,"optionalAccess",e=>e.length])&&a[0]==fS.currency.address?a.splice(1,0,fS.wrapped.address):pS([a,"optionalAccess",e=>e.length])&&a[a.length-1]==fS.currency.address&&a.splice(a.length-1,0,fS.wrapped.address),{path:a,exchangePath:yS({path:a})}},pathExists:mS,getAmounts:async({path:e,tokenIn:t,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(e=yS({path:e}),r){if(s=await vS({path:e,amountOut:r,tokenIn:t,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 gS({path:e,amountIn:i,tokenIn:t,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 vS({path:e,amountOutMin:a,tokenIn:t,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 gS({path:e,amountInMax:o,tokenIn:t,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:e,amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let d={blockchain:"solana"},h=[];const p=yS({path:e});if(p.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const f=p[0],y=3==p.length?p[1]:void 0,m=p[p.length-1];let g;2==p.length?g=[await hS({tokenIn:f,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await hS({tokenIn:f,tokenOut:y,amountIn:a||u})],g.push(await hS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await hS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await hS({tokenIn:f,tokenOut:y,amountOut:g[0].price})));let v,b=e[0]===bS.currency.address&&p[0]===bS.wrapped.address,w=e[e.length-1]===bS.currency.address&&p[p.length-1]===bS.wrapped.address;const M=await DE("solana");if(b||w){const e=await M.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span),n=ed.generate();v=n.publicKey.toString();const r=b?new up(t.toString()).add(new up(e)):new up(e);let i=Ju.createAccount({fromPubkey:new iu(l),newAccountPubkey:new iu(v),programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],h.push(i),h.push(xk.solana.initializeAccountInstruction({account:v,token:bS.wrapped.address,owner:l}))}if(1===g.length){let e=!(!a&&!c),o=e?t:r,s=e?i:n,u=new iu(b?v:await xk.solana.findProgramAddress({owner:l,token:f})),d=new iu(w?v:await xk.solana.findProgramAddress({owner:l,token:m}));w||await AS({instructions:h,owner:l,token:m,account:d}),h.push(new Nu({programId:new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await TS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:d,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?d:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:IS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:e,aToB:g[0].aToB})}))}else if(2===g.length){let e=!(!a&&!c),o=e?t:r,s=e?i:n,u=new iu(b?v:await xk.solana.findProgramAddress({owner:l,token:f})),d=p[1],y=new iu(await xk.solana.findProgramAddress({owner:l,token:d}));await AS({instructions:h,owner:l,token:d,account:y});let M=new iu(w?v:await xk.solana.findProgramAddress({owner:l,token:m}));w||await AS({instructions:h,owner:l,token:m,account:M}),h.push(new Nu({programId:new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await ES({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:NS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:e,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(b||w)&&h.push(xk.solana.closeAccountInstruction({account:v,owner:l})),d.instructions=h,d},WHIRLPOOL_LAYOUT:nS};const LS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImthdG1hbl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjRkZEMTVDIiBkPSJNNDg4LjQsMjIyLjljMCwxMDMuOC04NC4xLDE4Ny45LTE4Ny45LDE4Ny45Yy0xMDMuOCwwLTE4Ny45LTg0LjEtMTg3LjktMTg3LjlDMTEyLjYsMTE5LjEsMTk2LjcsMzU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sMjI0LjcsMjIzLDIyNCwyMjQuMnoiLz4KPHBhdGggZD0iTTE1MC40LDI2MC4xYzE4LjcsMi40LDI5LjgtMTMuOCw0NC44LTEuNmMxOS45LDM3LjgsMTcuNiwzNi4yLDE3LjYsMzYuMmMtMzQuNCwxNC40LTU3LjktMjEtNjQuMy0zMi4xCglDMTQ3LjgsMjYxLjMsMTQ5LDI1OS45LDE1MC40LDI2MC4xeiIvPgo8cGF0aCBkPSJNMzA2LjksMjM2YzAsMCwxOC43LDE5LjEsOC45LDIyLjFjLTEyLjItNy41LTM0LTEuNy00NC43LDEuOWMtMi42LDAuOS01LjItMS40LTQuMy00LjFjMy42LTEwLDEyLjYtMjguNiwyOS45LTMxCglDMzA2LjksMjIyLjQsMzA2LjksMjM2LDMwNi45LDIzNnoiLz4KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTMxOC4zLDE0Mi41Yy0yLjEtMy02LjQtMTEsNi44LTExYzEzLjIsMCwzMy4zLDE0LjksMzcuNCwyMC40Yy0xLjMsMy40LTkuOCw0LjEtMTQsMy44Yy00LjItMC4zLTExLjUtMS0xNy0zLjgKCUMzMjYsMTQ5LjIsMzIwLjUsMTQ1LjUsMzE4LjMsMTQyLjV6Ii8+Cjwvc3ZnPgo=",protocol:"orca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:kS.WHIRLPOOL_LAYOUT}}};var xS=e=>new Nx(Object.assign(LS,{scope:e,findPath:e=>kS.findPath({...e,exchange:LS}),pathExists:e=>kS.pathExists({...e,exchange:LS}),getAmounts:e=>kS.getAmounts({...e,exchange:LS}),getPrep:e=>{},getTransaction:e=>kS.getTransaction({...e,exchange:LS})}));const SS={name:"pancakeswap",label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmU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ODEgMTI3LjYxNCA1NS4wOTgxIDExNy44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["bsc"],bsc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:jx.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:jx.FACTORY},pair:{api:jx.PAIR}}};var jS=e=>new Nx(Object.assign(SS,{scope:e,findPath:e=>jx.findPath({...e,exchange:SS}),pathExists:e=>jx.pathExists({...e,exchange:SS}),getAmounts:e=>jx.getAmounts({...e,exchange:SS}),getPrep:e=>jx.getPrep({...e,exchange:SS}),getTransaction:e=>jx.getTransaction({...e,exchange:SS})}));function CS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const DS=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},OS=async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=DS({blockchain:e,exchange:t,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(t.fees.map((r=>UE({blockchain:Jp[e].name,address:t[e].factory.address,method:"getPool",api:t[e].factory.api,cache:3600,params:[n[0],n[1],r]}).then((t=>({blockchain:e,address:t,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((t=>t.address!=Jp[e].zero)),o=(await Promise.all(o.map((async e=>{try{let n;return n=r?await(async({exchange:e,pool:t,inputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactInput",params:{path:cE(["address","uint24","address"],[t.path[0],t.fee,t.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:t,pool:e,inputAmount:r}):await(async({exchange:e,pool:t,outputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactOutput",params:{path:cE(["address","uint24","address"],[t.path[1],t.fee,t.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:t,pool:e,outputAmount:i}),{...e,amountIn:r||n,amountOut:i||n}}catch(e){}})))).filter(Boolean),r?o.sort(((e,t)=>t.amountOut.gt(e.amountOut)?1:-1))[0]:o.sort(((e,t)=>t.amountIn.lt(e.amountIn)?1:-1))[0]}catch(e){return}};let zS=({blockchain:e,exchange:t,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,_S=async({blockchain:e,exchange:t,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=cE(["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=cE(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await UE({block:o,blockchain:e,address:t[e].quoter.address,api:t[e].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var PS={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await OS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[e].wrapped.address||r==Jp[e].wrapped.address||(c=[],o||s?(c.push(await OS({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await OS({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await OS({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await OS({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Jp[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await OS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await OS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await OS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await OS({exchange:t,blockchain:e,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 CS([u,"optionalAccess",e=>e.length])&&u[0]==Jp[e].currency.address?u.splice(1,0,Jp[e].wrapped.address):CS([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[e].currency.address&&u.splice(u.length-1,0,Jp[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:DS({blockchain:e,exchange:t,path:u})}},pathExists:async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await OS({blockchain:e,exchange:t,path:n,amountIn:r||o,amountOut:i||a})}catch(e){return!1}},getAmounts:async({blockchain:e,exchange:t,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:e,exchange:t,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 zS({blockchain:e,exchange:t,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:e,exchange:t,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 zS({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Jp[t].currency.address)return;let a;a=o===Jp[t].currency.address?e[t].smartRouter.address:e[t].router.address;if((await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[a,Jp[t].maxInt]}}}},getTransaction:async({blockchain:e,exchange:t,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:d,account:h,inputTokenPushed:p})=>{const f={blockchain:e,from:h},y=Math.floor(Date.now()/1e3)+21600,m=DS({blockchain:e,exchange:t,path:r});if(r[r.length-1]===Jp[e].currency.address){f.to=t[e].smartRouter.address,f.api=t[e].smartRouter.api,f.method="multicall";const r=new Bg(t[e].smartRouter.api);if(f.params={data:[]},2===m.length)u||d?f.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:t[e].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}])):(c||l)&&f.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:t[e].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}]));else{const h=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||d?f.params.data.push(r.encodeFunctionData("exactInput",[{path:h,recipient:t[e].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&f.params.data.push(r.encodeFunctionData("exactOutput",[{path:h,recipient:t[e].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}f.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),h]))}else if(f.to=t[e].router.address,f.api=t[e].router.api,r[0]===Jp[e].currency.address&&(f.value=(i||o).toString()),2===m.length)u||d?(f.method="exactInputSingle",f.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:h,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}}):(c||l)&&(f.method="exactOutputSingle",f.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:h,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}});else{const e=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||d?(f.method="exactInput",f.params={params:{path:e,recipient:h,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(f.method="exactOutput",f.params={params:{path:e,recipient:h,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return f},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 RS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJN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gNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:PS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:PS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:PS.FACTORY},pair:{api:PS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:PS.QUOTER}}};var BS=e=>new Nx(Object.assign(RS,{scope:e,findPath:e=>PS.findPath({...e,exchange:RS}),pathExists:e=>PS.pathExists({...e,exchange:RS}),getAmounts:e=>PS.getAmounts({...e,exchange:RS}),getPrep:e=>PS.getPrep({...e,exchange:RS}),getTransaction:e=>PS.getTransaction({...e,exchange:RS})}));const US={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSI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csMjA5LjI3LDAsMCwxLTM2LjA1LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:jx.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:jx.FACTORY},pair:{api:jx.PAIR}}};var WS=e=>new Nx(Object.assign(US,{scope:e,findPath:e=>jx.findPath({...e,exchange:US}),pathExists:e=>jx.pathExists({...e,exchange:US}),getAmounts:e=>jx.getAmounts({...e,exchange:US}),getPrep:e=>jx.getPrep({...e,exchange:US}),getTransaction:e=>jx.getTransaction({...e,exchange:US})}));const QS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiMxMjExMjIiIGQ9Ik0zNC4yLDMyMGMwLDE1OC41LDEyOC41LDI4Ni4zLDI4Ni4zLDI4Ni4zYzE1OC41LDAsMjg2LjMtMTI4LjUsMjg2LjMtMjg2LjNjMC0xNTguNS0xMjguNS0yODYuMy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jUtNy4yLDIzLjUtNy4yCgkJUzEyNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:jx.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:jx.FACTORY},pair:{api:jx.PAIR}}};var YS=e=>new Nx(Object.assign(QS,{scope:e,findPath:e=>jx.findPath({...e,exchange:QS}),pathExists:e=>jx.pathExists({...e,exchange:QS}),getAmounts:e=>jx.getAmounts({...e,exchange:QS}),getPrep:e=>jx.getPrep({...e,exchange:QS}),getTransaction:e=>jx.getTransaction({...e,exchange:QS})}));function FS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const VS=({blockchain:e,path:t})=>{if(!t)return;let n=t.map(((n,r)=>n===Jp[e].currency.address&&t[r+1]!=Jp[e].wrapped.address&&t[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:n));return n[0]==Jp[e].currency.address&&n[1]==Jp[e].wrapped.address?n.splice(0,1):n[n.length-1]==Jp[e].currency.address&&n[n.length-2]==Jp[e].wrapped.address&&n.splice(n.length-1,1),n},HS=async({exchange:e,blockchain:t,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=VS({blockchain:t,path:n}),a=r?await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountIn",api:e[t].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountOut",api:e[t].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((e=>"0"===e.toString())))return a};let GS=async({exchange:e,blockchain:t,path:n,pools:r,amountIn:i})=>{let o=await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountIn",api:e[t].quoter.api,cache:5,params:{route:VS({blockchain:t,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},qS=async({exchange:e,blockchain:t,path:n,pools:r,amountOut:i,block:o})=>{let a=await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountOut",api:e[t].quoter.api,cache:5,block:o,params:{route:VS({blockchain:t,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var ZS={findPath:async({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[t].currency.address)&&[n,r].includes(Jp[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await HS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[t].wrapped.address||r==Jp[t].wrapped.address||(c=[],o||s?(c.push(await HS({exchange:e,blockchain:t,path:[Jp[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await HS({exchange:e,blockchain:t,path:[n,Jp[t].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await HS({exchange:e,blockchain:t,path:[n,Jp[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await HS({exchange:e,blockchain:t,path:[Jp[t].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Jp[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await HS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await HS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await HS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await HS({exchange:e,blockchain:t,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 FS([u,"optionalAccess",e=>e.length])&&u[0]==Jp[t].currency.address?u.splice(1,0,Jp[t].wrapped.address):FS([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[t].currency.address&&u.splice(u.length-1,0,Jp[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:VS({blockchain:t,path:u})}},pathExists:async({exchange:e,blockchain:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await HS({exchange:e,blockchain:t,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:e,blockchain:t,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:e,blockchain:t,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 GS({exchange:e,blockchain:t,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:e,blockchain:t,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 GS({exchange:e,blockchain:t,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:e,blockchain:t,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:d,account:h})=>{const p={blockchain:t,from:h,to:e[t].router.address,api:e[t].router.api},f=Math.round(Date.now()/1e3)+86400,y=[n.map((e=>e.binSteps[0])),n.map((e=>e.versions[0])),VS({blockchain:t,path:r})];return r[0]===Jp[t].currency.address?l?(p.method="swapNATIVEForExactTokens",p.params={amountOut:a,path:y,to:h,deadline:f},p.value=o):(p.method="swapExactNATIVEForTokens",p.params={amountOutMin:s||a,path:y,to:h,deadline:f},p.value=i):r[r.length-1]===Jp[t].currency.address?l?(p.method="swapTokensForExactNATIVE",p.params={amountNATIVEOut:a,amountInMax:o,path:y,to:h,deadline:f}):(p.method="swapExactTokensForNATIVE",p.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:h,deadline:f}):l?(p.method="swapTokensForExactTokens",p.params={amountOut:a,amountInMax:o,path:y,to:h,deadline:f}):(p.method="swapExactTokensForTokens",p.params={amountIn:i,amountOutMin:s||a,path:y,to:h,deadline:f}),p},getPrep:async({exchange:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;const o=await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].router.address]});if(o.gte(r))return;return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].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 JS={name:"trader_joe_v2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UMDk6MTk6MDgrMDA6MDAtipFqAAAAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:ZS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:ZS.FACTORY},pair:{api:ZS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:ZS.QUOTER}}};var XS=e=>new Nx(Object.assign(JS,{scope:e,findPath:e=>ZS.findPath({...e,exchange:JS}),pathExists:e=>ZS.pathExists({...e,exchange:JS}),getAmounts:e=>ZS.getAmounts({...e,exchange:JS}),getPrep:e=>ZS.getPrep({...e,exchange:JS}),getTransaction:e=>ZS.getTransaction({...e,exchange:JS})}));const KS={name:"uniswap_v2",label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4LjQ2NUwzMTcuNzAxIDE2Ny4yNzdDMzQ4LjgyOCAxNjIuMjc1IDM4MC40OTMgMTY2LjI1IDQwNi45NzggMTc4LjQ4NUM0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MTIuODU0QzEyNy4xNjIgNDE1Ljg0OSAxMzIuNTc2IDQxNC4yMDIgMTM1LjQxMiA0MDkuMThaIiBmaWxsPSIjRkYwMDdBIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjQ4LjU1MiAyNjIuMjQ0QzI0MS44NjIgMjY0LjI5OSAyMzUuMzU4IDI3MS4zOSAyMzMuMzQ0IDI3OC44MjZDMjMyLjExNiAyODMuMzYyIDIzMi44MTMgMjkxLjMxOSAyMzQuNjUzIDI5My43NzZDMjM3LjYyNSAyOTcuNzQ1IDI0MC40OTkgMjk4Ljc5MSAyNDguMjgyIDI5OC43MzZDMjYzLjUxOCAyOTguNjMgMjc2Ljc2NCAyOTIuMDk1IDI3OC4zMDQgMjgzLjkyNUMyNzkuNTY3IDI3Ny4yMjkgMjczLjc0OSAyNjcuOTQ4IDI2NS43MzYgMjYzLjg3NEMyNjEuNjAxIDI2MS43NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["ethereum"],ethereum:{router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:jx.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:jx.FACTORY},pair:{api:jx.PAIR}}};var $S=e=>new Nx(Object.assign(KS,{scope:e,findPath:e=>jx.findPath({...e,exchange:KS}),pathExists:e=>jx.pathExists({...e,exchange:KS}),getAmounts:e=>jx.getAmounts({...e,exchange:KS}),getPrep:e=>jx.getPrep({...e,exchange:KS}),getTransaction:e=>jx.getTransaction({...e,exchange:KS})}));function ej(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const tj="0x0000000000000000000000000000000000000001",nj="0x0000000000000000000000000000000000000002",rj=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},ij=async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=rj({blockchain:e,exchange:t,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(t.fees.map((r=>UE({blockchain:Jp[e].name,address:t[e].factory.address,method:"getPool",api:t[e].factory.api,cache:3600,params:[n[0],n[1],r]}).then((t=>({blockchain:e,address:t,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((t=>t.address!=Jp[e].zero)),o=(await Promise.all(o.map((async e=>{try{let n;return n=r?await(async({exchange:e,pool:t,inputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactInput",params:{path:cE(["address","uint24","address"],[t.path[0],t.fee,t.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:t,pool:e,inputAmount:r}):await(async({exchange:e,pool:t,outputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactOutput",params:{path:cE(["address","uint24","address"],[t.path[1],t.fee,t.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:t,pool:e,outputAmount:i}),{...e,amountIn:r||n,amountOut:i||n}}catch(e){}})))).filter(Boolean),r?o.sort(((e,t)=>t.amountOut.gt(e.amountOut)?1:-1))[0]:o.sort(((e,t)=>t.amountIn.lt(e.amountIn)?1:-1))[0]}catch(e){return}};let oj=({blockchain:e,exchange:t,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,aj=async({blockchain:e,exchange:t,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=cE(["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=cE(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await UE({block:o,blockchain:e,address:t[e].quoter.address,api:t[e].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var sj={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await ij({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[e].wrapped.address||r==Jp[e].wrapped.address||(c=[],o||s?(c.push(await ij({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await ij({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await ij({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await ij({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Jp[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await ij({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await ij({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await ij({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await ij({exchange:t,blockchain:e,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 ej([u,"optionalAccess",e=>e.length])&&u[0]==Jp[e].currency.address?u.splice(1,0,Jp[e].wrapped.address):ej([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[e].currency.address&&u.splice(u.length-1,0,Jp[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:rj({blockchain:e,exchange:t,path:u})}},pathExists:async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await ij({blockchain:e,exchange:t,path:n,amountIn:r||o,amountOut:i||a})}catch(e){return!1}},getAmounts:async({blockchain:e,exchange:t,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await aj({blockchain:e,exchange:t,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 oj({blockchain:e,exchange:t,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 aj({blockchain:e,exchange:t,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 oj({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;if((await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].permit.address]})).lt(r)){return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].permit.address,Jp[t].maxInt]}}}{const o=await UE({blockchain:t,address:e[t].permit.address,method:"allowance",api:e[t].permit.api,params:[i,n,e[t].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(p){const e=Df(p.signature).length;let t;65!==e&&64!==e||(t=function(e){return Rf(Of([(e=Ff(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}(Ff(p.signature))),m.push("0a"),g.push(Qm.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[p,t]))}r[0]===Jp[e].currency.address&&(m.push("0b"),g.push(Qm.encode(["address","uint256"],[nj,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=cE(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),d||u?(m.push("00"),g.push(Qm.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Jp[e].currency.address?nj:tj,(i||o).toString(),(a||s).toString(),y,r[0]!==Jp[e].currency.address&&!f]))):(m.push("01"),g.push(Qm.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Jp[e].currency.address?nj:tj,(a||s).toString(),(i||o).toString(),y,r[0]!==Jp[e].currency.address&&!f]))),r[r.length-1]===Jp[e].currency.address&&(m.push("0c"),g.push(Qm.encode(["address","uint256"],[tj,(a||s).toString()])));return{blockchain:e,from:h,to:t[e].router.address,api:t[e].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 uj={name:"uniswap_v3",label:"Uniswap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGRhdGEtdGVzdGlkPSJ1bmlzd2FwLWxvZ28iIGNsYXNzPSJyZ3c2ZXo0NHAgcmd3NmV6NGVqIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuMzUyNiAxOS45MjQyQzIwLjI5MjggMjAuMTU0OSAyMC4xODg1IDIwLjM3MTUgMjAuMDQ1NSAyMC41NjE4QzE5Ljc3OTMgMjAuOTA4OCAxOS40MjcgMjEuMTc5NCAxOS4wMjM5IDIxLjM0NjZDMTguNjYxNCAyMS41MDM1IDE4LjI3NzQgMjEuNjA1IDE3Ljg4NDkgMjEuNjQ3NUMxNy44MDQyIDIxLjY1NzggMTcuNzIwNiAyMS42NjQxIDE3LjYzOTUgMjEuNjcwM0wxNy42MjYzIDIxLjY3MTNDMTcuMzc3NyAyMS42ODA4IDE3LjEzODcgMjEuNzcgMTYuOTQ0MiAyMS45MjU4QzE2Ljc0OTcgMjIuMDgxNyAxNi42MSAyMi4yOTYgMTYuNTQ1NSAyMi41MzczQzE2LjUxNiAyMi42NTc0IDE2LjQ5NCAyMi43NzkyIDE2LjQ3OTggMjIuOTAyMUMxNi40NTcyIDIzLjA4NzQgMTYuNDQ1NiAyMy4yNzcxIDE2LjQzMyAyMy40ODIzQzE2LjQyNCAyMy42Mjk1IDE2LjQxNDQgMjMuNzg0OCAxNi40IDIzLjk1MjFDMTYuMzE1NiAyNC42MzM3IDE2LjExOTMgMjUuMjk2NSAxNS44MTkyIDI1LjkxMzZ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D48L3N2Zz4K",protocol:"uniswap_v3",slippage:!0,fees:[100,500,3e3,1e4],blockchains:["ethereum","bsc","polygon","optimism","arbitrum"],ethereum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:sj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}}};var cj=e=>new Nx(Object.assign(uj,{scope:e,findPath:e=>sj.findPath({...e,exchange:uj}),pathExists:e=>sj.pathExists({...e,exchange:uj}),getAmounts:e=>sj.getAmounts({...e,exchange:uj}),getPrep:e=>sj.getPrep({...e,exchange:uj}),getTransaction:e=>sj.getTransaction({...e,exchange:uj})}));var lj={findPath:async({blockchain:e,tokenIn:t,tokenOut:n})=>{if(![t,n].includes(Jp[e].currency.address)||![t,n].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[t,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:e,path:t})=>!(!t||2!==t.length)&&(t.includes(Jp[e].currency.address)&&t.includes(Jp[e].wrapped.address)),getAmounts:async({path:e,block:t,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:e,blockchain:t,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:d})=>{let h={blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api};return n[0]===Jp[t].currency.address&&n[1]===Jp[t].wrapped.address?(h.method="deposit",h.value=r.toString(),h):n[0]===Jp[t].wrapped.address&&n[1]===Jp[t].currency.address?(h.method="withdraw",h.value=0,h.params={wad:r},h):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 dj={name:"wavax",label:"Wrapped Avax",logo:Jp.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Jp.avalanche.wrapped.address,api:lj.WETH}}};var hj=e=>new Nx(Object.assign(dj,{scope:e,findPath:e=>lj.findPath({...e,exchange:dj}),pathExists:e=>lj.pathExists({...e,exchange:dj}),getAmounts:e=>lj.getAmounts({...e,exchange:dj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:dj})}));const pj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0YwQjkwQjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NCw0MS4xbDQyLTI0LjJsNDIsMjQuMmwtMTUuNCw4LjlMOTYsMzQuOUw2OS40LDUwTDU0LDQxLjF6IE0xMzgsNzEuN2wtMTUuNC04LjlMOTYsNzhMNjkuNCw2Mi43bC0xNS40LDl2MTgKCUw4MC42LDEwNXYzMC41bDE1LjQsOWwxNS40LTlWMTA1TDEzOCw4OS43VjcxLjd6IE0xMzgsMTIwLjN2LTE4bC0xNS40LDguOXYxOEMxMjIuNiwxMjkuMSwxMzgsMTIwLjMsMTM4LDEyMC4zeiBNMTQ4LjksMTI2LjQKCWwtMjYuNiwxNS4zdjE4bDQyLTI0LjJWODdsLTE1LjQsOUMxNDguOSw5NiwxNDguOSwxMjYuNCwxNDguOSwxMjYuNHogTTEzMy41LDU2LjRsMTUuNCw5djE4bDE1LjQtOXYtMThsLTE1LjQtOUwxMzMuNSw1Ni40CglMMTMzLjUsNTYuNHogTTgwLjYsMTQ4LjN2MThsMTUuNCw5bDE1LjQtOXYtMThMOTYsMTU3LjFMODAuNiwxNDguM3ogTTU0LDEyMC4zbDE1LjQsOXYtMTguMUw1NCwxMDIuM0w1NCwxMjAuM0w1NCwxMjAuM3oKCSBNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",slippage:!1,blockchains:["bsc"],bsc:{router:{address:Jp.bsc.wrapped.address,api:lj.WETH}}};var fj=e=>new Nx(Object.assign(pj,{scope:e,findPath:e=>lj.findPath({...e,exchange:pj}),pathExists:e=>lj.pathExists({...e,exchange:pj}),getAmounts:e=>lj.getAmounts({...e,exchange:pj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:pj})}));const yj={name:"weth",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Jp.ethereum.wrapped.address,api:lj.WETH}}};var mj=e=>new Nx(Object.assign(yj,{scope:e,findPath:e=>lj.findPath({...e,exchange:yj}),pathExists:e=>lj.pathExists({...e,exchange:yj}),getAmounts:e=>lj.getAmounts({...e,exchange:yj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:yj})}));const gj={name:"weth_arbitrum",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmlu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z0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Jp.arbitrum.wrapped.address,api:lj.WETH}}};var vj=e=>new Nx(Object.assign(gj,{scope:e,findPath:e=>lj.findPath({...e,exchange:gj}),pathExists:e=>lj.pathExists({...e,exchange:gj}),getAmounts:e=>lj.getAmounts({...e,exchange:gj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:gj})}));const bj={name:"weth_optimism",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Jp.optimism.wrapped.address,api:lj.WETH}}};var wj=e=>new Nx(Object.assign(bj,{scope:e,findPath:e=>lj.findPath({...e,exchange:bj}),pathExists:e=>lj.pathExists({...e,exchange:bj}),getAmounts:e=>lj.getAmounts({...e,exchange:bj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:bj})}));const Mj={name:"weth_base",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbm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LjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Jp.base.wrapped.address,api:lj.WETH}}};var Aj=e=>new Nx(Object.assign(Mj,{scope:e,findPath:e=>lj.findPath({...e,exchange:Mj}),pathExists:e=>lj.pathExists({...e,exchange:Mj}),getAmounts:e=>lj.getAmounts({...e,exchange:Mj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Mj})}));const Ej={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY2lyY2xlIj4KCTxnIGlkPSJGYW50b20tY2lyY2xlIj4KCQk8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsUnVsZT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0LjYKCQkJYzAuMiwwLjEsMC40LDAuMiwwLjYsMC4yVjgwLjV6IE05OC4yLDgwLjV2MjkuOGMwLjItMC4xLDAuNC0wLjEsMC42LTAuMmwyNy42LTE0LjZjMCwwLDAuMSwwLDAuMSwwbDAsMGwwLDBsLTAuMSwwTDk4LjgsODAuNwoJCQlDOTguNiw4MC42LDk4LjQsODAuNSw5OC4yLDgwLjV6IE0xMjYuNiw2NC40bC0yNC44LDEzbDI0LjgsMTNWNjQuNHogTTY1LjIsNjQuNHYyNi4xbDI0LjgtMTNMNjUuMiw2NC40eiBNOTguNyw0NS4xCgkJCWMtMS40LTAuOC00LTAuOC01LjUsMEw2NS42LDU5LjdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Jp.fantom.wrapped.address,api:lj.WETH}}};var Nj=e=>new Nx(Object.assign(Ej,{scope:e,findPath:e=>lj.findPath({...e,exchange:Ej}),pathExists:e=>lj.pathExists({...e,exchange:Ej}),getAmounts:e=>lj.getAmounts({...e,exchange:Ej}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Ej})}));const Tj={name:"wmatic",label:"Wrap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1LjEtMi45bDMuNS0yLjFsNS4xLTIuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Jp.polygon.wrapped.address,api:lj.WETH}}};var Ij=e=>new Nx(Object.assign(Tj,{scope:e,findPath:e=>lj.findPath({...e,exchange:Tj}),pathExists:e=>lj.pathExists({...e,exchange:Tj}),getAmounts:e=>lj.getAmounts({...e,exchange:Tj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Tj})}));const kj={name:"wxdai",label:"Wrapped XDAI",logo:Jp.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Jp.gnosis.wrapped.address,api:lj.WETH}}};var Lj=e=>new Nx(Object.assign(kj,{scope:e,findPath:e=>lj.findPath({...e,exchange:kj}),pathExists:e=>lj.pathExists({...e,exchange:kj}),getAmounts:e=>lj.getAmounts({...e,exchange:kj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:kj})}));const xj=[xS(),cj(),BS(),$S(),jS(),XS(),WS(),YS(),Dx(),mj(),wj(),Aj(),vj(),fj(),Ij(),Nj(),hj(),Lj()];xj.forEach((e=>{xj[e.name]=e})),xj.ethereum=[cj("ethereum"),$S("ethereum"),mj("ethereum")],xj.ethereum.forEach((e=>{xj.ethereum[e.name]=e})),xj.bsc=[BS("bsc"),cj("bsc"),jS("bsc"),fj("bsc")],xj.bsc.forEach((e=>{xj.bsc[e.name]=e})),xj.polygon=[cj("polygon"),WS("polygon"),Ij("polygon")],xj.polygon.forEach((e=>{xj.polygon[e.name]=e})),xj.solana=[xS("solana")],xj.solana.forEach((e=>{xj.solana[e.name]=e})),xj.optimism=[cj("optimism"),wj("optimism")],xj.optimism.forEach((e=>{xj.optimism[e.name]=e})),xj.base=[cj("base"),Aj("base")],xj.base.forEach((e=>{xj.base[e.name]=e})),xj.arbitrum=[cj("arbitrum"),vj("arbitrum")],xj.arbitrum.forEach((e=>{xj.arbitrum[e.name]=e})),xj.fantom=[YS("fantom"),Nj("fantom")],xj.fantom.forEach((e=>{xj.fantom[e.name]=e})),xj.avalanche=[XS("avalanche"),hj("avalanche")],xj.avalanche.forEach((e=>{xj.avalanche[e.name]=e})),xj.gnosis=[Dx("gnosis"),Lj("gnosis")],xj.gnosis.forEach((e=>{xj.gnosis[e.name]=e}));xj.route=({blockchain:e,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(xj[e].map((e=>e.route({tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((e=>e.filter(Boolean).sort(((e,t)=>(r||o?BigInt(e.amountOut)BigInt(t.amountIn))?1:(r||o?BigInt(e.amountOut)>BigInt(t.amountOut):BigInt(e.amountIn)jj||(jj="object"==typeof r?r:window,jj);const Dj=()=>(void 0===Cj()._Web3ClientConfiguration&&(Cj()._Web3ClientConfiguration={}),Cj()._Web3ClientConfiguration);class Oj extends $A{constructor(e,t,n,r){super(e),this._network=t,this._endpoint=e,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Jp.findByName(this._network).id)}requestChunk(e,t){const n=e.map((e=>e.request));return rA(t,JSON.stringify(n)).then((t=>{e.forEach(((e,n)=>{const r=t[n];if(r.error){const t=new Error(r.error.message);t.code=r.error.code,t.data=r.error.data,e.reject(t)}else e.resolve(r.result)}))})).catch((t=>{if(t&&"SERVER_ERROR"==t.code){const t=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=t>=this._endpoints.length?this._endpoints[0]:this._endpoints[t],this.requestChunk(e,this._endpoint)}else e.forEach((e=>{e.reject(t)}))}))}send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((e,t)=>{r.resolve=e,r.reject=t}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const t=[];for(let n=0;n(e.map((e=>e.request)),this.requestChunk(e,this._endpoint))))}),Dj().batchInterval||10)),i}}const zj=()=>(null==Cj()._Web3ClientProviders&&(Cj()._Web3ClientProviders={}),Cj()._Web3ClientProviders),_j=(e,t)=>{void 0===zj()[e]&&(zj()[e]=[]);const n=zj()[e].indexOf(t);n>-1&&zj()[e].splice(n,1),zj()[e].unshift(t)},Pj=async(e,t,n=!0)=>{let r;zj()[e]=t.map(((r,i)=>new Oj(r,e,t,(()=>{1===zj()[e].length?Pj(e,t,n):zj()[e].splice(i,1)}))));let i=Cj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=zj()[e][0];else{let n=await Promise.all(t.map((e=>new Promise((async t=>{let n=(new Date).getTime();setTimeout((()=>t(900)),900);if(!(await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return t(999);let r=(new Date).getTime();t(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=zj()[e][o]}_j(e,r)};var Rj=async e=>{let t=zj();if(t&&t[e])return t[e][0];let n=Cj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[e]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[e]=new Promise((async t=>{await Pj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e][0])}))),await n._Web3ClientGetProviderPromise[e]},Bj=async e=>{let t=zj();if(t&&t[e])return t[e];let n=Cj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[e]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[e]=new Promise((async t=>{await Pj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e])}))),await n._Web3ClientGetProvidersPromise[e]};class Uj extends $l{constructor(e,t,n,r){super(e),this._provider=new $l(e),this._network=t,this._endpoint=e,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}requestChunk(e){const t=e.map((e=>e.request)),n=t=>{if(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 $l(this._endpoint),this.requestChunk(e)}else e.forEach((e=>{e.reject(t)}))};try{return this._provider._rpcBatchRequest(t).then((t=>{e.forEach(((e,n)=>{const r=t[n];if(r.error){const t=new Error(r.error.message);t.code=r.error.code,t.data=r.error.data,e.reject(t)}else e.resolve(r)}))})).catch(n)}catch(e){return n(e)}}_rpcRequestReplacement(e,t){const n={methodName:e,args:t};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((e,t)=>{r.resolve=e,r.reject=t}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const t=[];for(let n=0;n(e.map((e=>e.request)),this.requestChunk(e))))}),Dj().batchInterval||10)),i}}const Wj=()=>(null==Cj()._Web3ClientProviders&&(Cj()._Web3ClientProviders={}),Cj()._Web3ClientProviders),Qj=(e,t)=>{void 0===Wj()[e]&&(Wj()[e]=[]);const n=Wj()[e].indexOf(t);n>-1&&Wj()[e].splice(n,1),Wj()[e].unshift(t)},Yj=async(e,t,n=!0)=>{let r;Wj()[e]=t.map(((r,i)=>new Uj(r,e,t,(()=>{1===Wj()[e].length?Yj(e,t,n):Wj()[e].splice(i,1)}))));let i=Cj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=Wj()[e][0];else{let n=await Promise.all(t.map((e=>new Promise((async t=>{let n=(new Date).getTime();setTimeout((()=>t(900)),900);if(!(await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return t(999);let r=(new Date).getTime();t(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=Wj()[e][o]}Qj(e,r)};var Fj=async e=>{let t=Wj();if(t&&t[e])return t[e][0];let n=Cj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[e]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[e]=new Promise((async t=>{await Yj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e][0])}))),await n._Web3ClientGetProviderPromise[e]},Vj=async e=>{let t=Wj();if(t&&t[e])return t[e];let n=Cj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[e]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[e]=new Promise((async t=>{await Yj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e])}))),await n._Web3ClientGetProvidersPromise[e]};let Hj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Hj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Hj.solana=["solana"];let Gj=()=>(null==Cj()._Web3ClientCacheStore&&(Cj()._Web3ClientCacheStore={}),Cj()._Web3ClientCacheStore),qj=()=>(null==Cj()._Web3ClientPromiseStore&&(Cj()._Web3ClientPromiseStore={}),Cj()._Web3ClientPromiseStore),Zj=function({key:e}){qj()[e]=void 0},Jj=function({call:e,key:t,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:e}){return qj()[e]}({key:t=JSON.stringify(t)});if(a)return a.then(r).catch(i);(function({key:e,promise:t}){return qj()[e]=t,t})({key:t,promise:new Promise(((a,s)=>0===n?e().then((e=>{r(e),a(e)})).catch((e=>{i(e),s(e)})):(o=function({key:e,expires:t}){let n=Gj()[e];if(function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([n,"optionalAccess",e=>e.expiresAt])>Date.now())return n.value}({key:t,expires:n}),o?(r(o),a(o),o):void e().then((e=>{e&&function({key:e,value:t,expires:n}){Gj()[e]={expiresAt:Date.now()+n,value:t}}({key:t,value:e,expires:n}),r(e),a(e)})).catch((e=>{i(e),s(e)})))))}).then((()=>{Zj({key:t})})).catch((()=>{Zj({key:t})}))}))};const Xj=async e=>{if(Hj.evm.includes(e))return await Rj(e);if(Hj.solana.includes(e))return await Fj(e);throw"Unknown blockchain: "+e};const Kj=({address:e,api:t,method:n,params:r,provider:i,block:o})=>{const a=new UM(e,t,i),s=(({contract:e,method:t,params:n})=>e.interface.fragments.find((e=>e.name==t)).inputs.map(((e,t)=>Array.isArray(n)?n[t]:n[e.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((e=>e.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((e=>e.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},$j=({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a})=>n?Kj({address:t,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:e,provider:t})=>t.getBalance(e))({address:t,provider:a}):"transactionCount"===r?(({address:e,provider:t})=>t.getTransactionCount(e))({address:t,provider:a}):void 0;const eC=async({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=cp),await(async({address:e,api:t,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new iu(e));if(a&&a.data)return t.decode(a.data)})({address:t,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new iu(t),i).then((e=>n?e.map((e=>(e.data=n.decode(e.account.data),e))):e));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new iu(t));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:e,provider:t})=>t.getBalance(new iu(e)))({address:t,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((e=>u.toString().match(e)))){let u=s[s.indexOf(a)+1]||s[0];return eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const tC=async function(e,t){const{blockchain:n,address:r,method:i}=(e=>{if("object"==typeof e)return e;let t=e.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==t.groups.part2?t.groups.part1.match(/\d/)?{blockchain:t.groups.blockchain,address:t.groups.part1}:{blockchain:t.groups.blockchain,method:t.groups.part1}:{blockchain:t.groups.blockchain,address:t.groups.part1,method:t.groups.part2}})(e),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:d}=("object"==typeof e?e:t)||{};return await Jj({expires:s||0,key:d||[n,r,i,a,u],call:async()=>{if(Hj.evm.includes(n))return await(async({blockchain:e,address:t,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||Dj().strategy||"failover",a=a||Dj().timeout||void 0,"fastest"===s){const s=await Bj(e);let u=[];const c=s.map((a=>new Promise((s=>{u.push($j({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((e,t)=>setTimeout((()=>{t(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((e=>new Promise((t=>{e.catch(t)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Rj(e),u=$j({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((e,t)=>setTimeout((()=>{t(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(Hj.solana.includes(n))return await(async({blockchain:e,address:t,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||Dj().strategy||"failover",a=a||Dj().timeout||void 0;const u=await Vj(e);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((e,t)=>setTimeout((()=>{t(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((e=>new Promise((t=>{e.catch(t)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Fj(e),c=eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((e,t)=>setTimeout((()=>{t(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}})};let nC,rC;const iC=async({wSolSenderAccountKeypair:e,paymentRoute:t})=>{if(!e)return;const n=t.fromToken.address===Jp.solana.currency.address?new up(t.fromAmount):new up("0"),r=await Xj("solana"),i=new up(await r.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span)),o=t.fromAddress,a=n.add(i);return[Ju.createAccount({fromPubkey:new iu(o),newAccountPubkey:e.publicKey,programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:a}),xk.solana.initializeAccountInstruction({account:e.publicKey.toString(),token:Jp.solana.wrapped.address,owner:o})]},oC=async({wSolEscrowAccountKeypair:e,paymentRoute:t})=>{if(!e)return;const n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span)),i=await vC();return[Ju.createAccount({fromPubkey:new iu(t.fromAddress),newAccountPubkey:e.publicKey,programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:r}),xk.solana.initializeAccountInstruction({account:e.publicKey.toString(),token:Jp.solana.wrapped.address,owner:i.toString()})]},aC=({paymentRoute:e})=>{let t=[...e.exchangeRoutes[0].path];return t.indexOf(Jp.solana.currency.address)>-1&&t.splice(t.indexOf(Jp.solana.currency.address),1),t.indexOf(e.fromToken.address)>-1&&t.splice(t.indexOf(e.fromToken.address),1),t.indexOf(e.toToken.address)>-1&&t.splice(t.indexOf(e.toToken.address),1),2===t.length&&t[0]===Jp.solana.wrapped.address?t[1]:t[0]},sC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:aC({paymentRoute:e}),owner:e.fromAddress}),uC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||AC(e.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:await sC({paymentRoute:e}),api:xk.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:e})?void 0:xk.solana.createAssociatedTokenAccountInstruction({token:aC({paymentRoute:e}),owner:e.fromAddress,payer:e.fromAddress})},cC=async({wSolSenderAccountKeypair:e,paymentRoute:t})=>{if(e)return xk.solana.closeAccountInstruction({account:e.publicKey.toString(),owner:t.fromAddress})},lC=async({from:e})=>{let t=[sp.from("payments"),new iu(e).toBuffer()],[n]=await iu.findProgramAddress(t,new iu(Sj.solana.address));return n},dC=async({from:e})=>{let t=(await lC({from:e})).toString();return await tC({blockchain:"solana",address:t,api:vp([Ap("anchorDiscriminator"),Ap("nonce")]),cache:1e3})},hC=async({from:e})=>{if(await dC({from:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e}),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createPaymentsAccount.layout.span);return Sj.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createPaymentsAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},pC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.fromToken.address,owner:e.fromAddress}),fC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.toToken.address,owner:e.toAddress}),yC=async({paymentRoute:e})=>{if(e.toToken.address===Jp.solana.currency.address){const t=await tC({blockchain:"solana",method:"balance",address:e.toAddress}),n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(0)),i=new up(e.toAmount);if(new up(t).add(i).gt(r))return;return Ju.transfer({fromPubkey:new iu(e.fromAddress),toPubkey:new iu(e.toAddress),lamports:r.sub(i)})}{const t=e.toToken.address;if(await(async({paymentRoute:e})=>await xk.solana.findAccount({token:e.toToken.address,owner:e.toAddress}))({paymentRoute:e}))return;return xk.solana.createAssociatedTokenAccountInstruction({token:t,owner:e.toAddress,payer:e.fromAddress})}},mC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.toToken.address,owner:e.fee.receiver}),gC=async({paymentRoute:e})=>{if(e.fee){if(e.toToken.address===Jp.solana.currency.address){const t=await tC({blockchain:"solana",method:"balance",address:e.fee.receiver}),n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(0)),i=new up(e.feeAmount);if(new up(t).add(i).gt(r))return;return Ju.transfer({fromPubkey:new iu(e.fromAddress),toPubkey:new iu(e.fee.receiver),lamports:r.sub(i)})}{const t=e.toToken.address;if(await(async({paymentRoute:e})=>await xk.solana.findAccount({token:e.toToken.address,owner:e.fee.receiver}))({paymentRoute:e}))return;return xk.solana.createAssociatedTokenAccountInstruction({token:t,owner:e.fee.receiver,payer:e.fromAddress})}}},vC=async()=>{let e=[sp.from("escrow_sol")],[t,n]=await iu.findProgramAddress(e,new iu(Sj.solana.address));return t},bC=async({paymentRoute:e})=>{let t=[sp.from("escrow"),new iu(e.toToken.address===Jp.solana.currency.address?Jp.solana.wrapped.address:e.toToken.address).toBuffer()],[n,r]=await iu.findProgramAddress(t,new iu(Sj.solana.address));return n},wC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||e.toToken.address===Jp.solana.currency.address)return;if(await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:(await bC({paymentRoute:e})).toString(),api:xk.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new iu(e.toToken.address===Jp.solana.currency.address?Jp.solana.wrapped.address:e.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await bC({paymentRoute:e}),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createEscrowTokenAccount.layout.span);return Sj.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},MC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||e.toToken.address!=Jp.solana.currency.address)return;if(await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:(await vC()).toString(),api:vp([Ap("amount"),yp("owner")]),cache:1e3}))({paymentRoute:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await vC(),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createEscrowSolAccount.layout.span);return Sj.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},AC=e=>e.filter((e=>e!==Jp.solana.currency.address)),EC=()=>nC||(nC=Math.ceil((new Date).getTime()/1e3)+1800,nC),NC=e=>rC||(rC=e?e.nonce:new up("0"),rC),TC=async({paymentRoute:e,wSolSenderAccountKeypair:t,wSolEscrowAccountKeypair:n})=>{const r=await dC({from:e.fromAddress});switch((({paymentRoute:e})=>{if(e.fromToken.address===Jp.solana.currency.address&&e.toToken.address===Jp.solana.currency.address)return"routeSol";if(e.fromToken.address!==Jp.solana.currency.address&&e.toToken.address!==Jp.solana.currency.address&&0===e.exchangeRoutes.length)return"routeToken";if(e.exchangeRoutes.length>0&&2===AC(e.exchangeRoutes[0].path).length)return e.toToken.address===Jp.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(e.exchangeRoutes.length>0&&AC(e.exchangeRoutes[0].path).length>2)return e.toToken.address===Jp.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:e})){case"routeSol":return await(async({paymentRoute:e,paymentsAccountData:t})=>{const n=new iu(e.toAddress),r=e.fee?new iu(e.fee.receiver):n,i=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0}],o=sp.alloc(Sj.solana.api.routeSol.layout.span);return Sj.solana.api.routeSol.layout.encode({anchorDiscriminator:Sj.solana.api.routeSol.anchorDiscriminator,nonce:NC(t),paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},o),new Nu({keys:i,programId:new iu(Sj.solana.address),data:o})})({paymentRoute:e,paymentsAccountData:r});case"routeToken":return await(async({paymentRoute:e,paymentsAccountData:t})=>{const n=await pC({paymentRoute:e}),r=await fC({paymentRoute:e}),i=e.fee?await mC({paymentRoute:e}):r,o=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(n),isSigner:!1,isWritable:!0},{pubkey:new iu(r),isSigner:!1,isWritable:!0},{pubkey:new iu(i),isSigner:!1,isWritable:!0}],a=sp.alloc(Sj.solana.api.routeToken.layout.span);return Sj.solana.api.routeToken.layout.encode({anchorDiscriminator:Sj.solana.api.routeToken.anchorDiscriminator,nonce:NC(t),paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},a),new Nu({keys:o,programId:new iu(Sj.solana.address),data:a})})({paymentRoute:e,paymentsAccountData:r});case"routeOrcaSwap":return await(async({paymentRoute:e,paymentsAccountData:t,wSolSenderAccountKeypair:n})=>{const r=n?n.publicKey:await pC({paymentRoute:e}),i=await fC({paymentRoute:e}),o=e.fee?await mC({paymentRoute:e}):i,a=await bC({paymentRoute:e}),s=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),u=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]).decode(s.data),c=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(r),isSigner:!1,isWritable:!0},s.keys[2],s.keys[4],s.keys[6],s.keys[7],s.keys[8],s.keys[9],s.keys[10],{pubkey:a,isSigner:!1,isWritable:!0},{pubkey:new iu(i),isSigner:!1,isWritable:!0},{pubkey:new iu(o),isSigner:!1,isWritable:!0}],l=sp.alloc(Sj.solana.api.routeOrcaSwap.layout.span);return Sj.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:NC(t),amountIn:u.amount,sqrtPriceLimit:u.sqrtPriceLimit,amountSpecifiedIsInput:u.amountSpecifiedIsInput,aToB:u.aToB,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},l),new Nu({keys:c,programId:new iu(Sj.solana.address),data:l})})({paymentRoute:e,paymentsAccountData:r,wSolSenderAccountKeypair:t});case"routeOrcaSwapSolOut":return await(async({paymentRoute:e,paymentsAccountData:t,wSolEscrowAccountKeypair:n})=>{const r=await pC({paymentRoute:e}),i=n.publicKey,o=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),a=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]).decode(o.data),s=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(r),isSigner:!1,isWritable:!0},o.keys[2],o.keys[4],o.keys[6],o.keys[7],o.keys[8],o.keys[9],o.keys[10],{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:await vC(),isSigner:!1,isWritable:!0},{pubkey:new iu(e.toAddress),isSigner:!1,isWritable:!0},{pubkey:new iu(e.fee?e.fee.receiver:e.toAddress),isSigner:!1,isWritable:!0}],u=sp.alloc(Sj.solana.api.routeOrcaSwapSolOut.layout.span);return Sj.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:NC(t),amountIn:a.amount,sqrtPriceLimit:a.sqrtPriceLimit,amountSpecifiedIsInput:a.amountSpecifiedIsInput,aToB:a.aToB,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},u),new Nu({keys:s,programId:new iu(Sj.solana.address),data:u})})({paymentRoute:e,paymentsAccountData:r,wSolEscrowAccountKeypair:n});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:e,paymentsAccountData:t,wSolSenderAccountKeypair:n})=>{const r=new iu(await fC({paymentRoute:e})),i=e.fee?new iu(await mC({paymentRoute:e})):r,o=await bC({paymentRoute:e}),a=new iu(await sC({paymentRoute:e})),s=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),u=n?n.publicKey:new iu(await pC({paymentRoute:e})),c=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]).decode(s.data),l=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},s.keys[2],s.keys[3],{pubkey:u,isSigner:!1,isWritable:!0},s.keys[5],s.keys[7],{pubkey:a,isSigner:!1,isWritable:!0},s.keys[9],s.keys[11],s.keys[12],s.keys[13],s.keys[14],s.keys[15],s.keys[16],s.keys[17],s.keys[18],s.keys[19],{pubkey:o,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],d=sp.alloc(Sj.solana.api.routeOrcaTwoHopSwap.layout.span);return Sj.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:NC(t),amountIn:c.amount,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToBOne:c.aToBOne,aToBTwo:c.aToBTwo,sqrtPriceLimitOne:c.sqrtPriceLimitOne,sqrtPriceLimitTwo:c.sqrtPriceLimitTwo,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},d),new Nu({keys:l,programId:new iu(Sj.solana.address),data:d})})({paymentRoute:e,paymentsAccountData:r,wSolSenderAccountKeypair:t});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:e,paymentsAccountData:t,wSolEscrowAccountKeypair:n})=>{const r=new iu(await sC({paymentRoute:e})),i=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),o=new iu(await pC({paymentRoute:e})),a=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]).decode(i.data),s=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await lC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:o,isSigner:!1,isWritable:!0},i.keys[2],i.keys[3],i.keys[5],i.keys[7],{pubkey:r,isSigner:!1,isWritable:!0},i.keys[9],i.keys[11],i.keys[12],i.keys[13],i.keys[14],i.keys[15],i.keys[16],i.keys[17],i.keys[18],i.keys[19],{pubkey:n.publicKey,isSigner:!1,isWritable:!0},{pubkey:await vC(),isSigner:!1,isWritable:!0},{pubkey:new iu(e.toAddress),isSigner:!1,isWritable:!0},{pubkey:new iu(e.fee?e.fee.receiver:e.toAddress),isSigner:!1,isWritable:!0}],u=sp.alloc(Sj.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Sj.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:NC(t),amountIn:a.amount,amountSpecifiedIsInput:a.amountSpecifiedIsInput,aToBOne:a.aToBOne,aToBTwo:a.aToBTwo,sqrtPriceLimitOne:a.sqrtPriceLimitOne,sqrtPriceLimitTwo:a.sqrtPriceLimitTwo,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(EC())},u),new Nu({keys:s,programId:new iu(Sj.solana.address),data:u})})({paymentRoute:e,paymentsAccountData:r,wSolEscrowAccountKeypair:n})}},IC=async({paymentRoute:e})=>{const t=await(async({paymentRoute:e})=>{if(e.fromToken.address===Jp.solana.currency.address&&e.toToken.address!==Jp.solana.currency.address)return ed.generate()})({paymentRoute:e}),n=await(async({paymentRoute:e})=>{if(e.fromToken.address!==Jp.solana.currency.address&&e.toToken.address===Jp.solana.currency.address)return ed.generate()})({paymentRoute:e});let r=(await Promise.all([hC({from:e.fromAddress}),iC({paymentRoute:e,wSolSenderAccountKeypair:t}),uC({paymentRoute:e}),yC({paymentRoute:e}),gC({paymentRoute:e}),MC({paymentRoute:e}),oC({paymentRoute:e,wSolEscrowAccountKeypair:n}),wC({paymentRoute:e}),TC({paymentRoute:e,wSolSenderAccountKeypair:t,wSolEscrowAccountKeypair:n}),cC({paymentRoute:e,wSolSenderAccountKeypair:t})])).filter(Boolean).flat();const i={blockchain:e.blockchain,instructions:r,signers:[t,n].filter(Boolean),alts:[Sj.solana.alt]};return i.deadline=nC,i.nonce=rC.toString(),i},kC=[{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 LC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:kC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:kC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:kC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:kC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:kC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:kC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:kC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:kC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:kC}},xC={...LC,...Sj},SC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},jC="object"==typeof SC&&SC&&SC.Object===Object&&SC,CC="object"==typeof self&&self&&self.Object===Object&&self,DC=(jC||CC||Function("return this")()).Symbol;DC&&DC.toStringTag,DC&&DC.toStringTag;const OC=e=>{switch(e){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}},zC={arbitrum:{[Jp.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Jp.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Jp.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Jp.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Jp.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Jp.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Jp.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Jp.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Jp.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},_C=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?e.toAddress:e.toToken.address:LC[e.blockchain].address,PC=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?void 0:xk[e.blockchain].DEFAULT:LC[e.blockchain].api,RC=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?void 0:"transfer":"pay",BC=async({paymentRoute:e})=>{if(e.directTransfer&&!e.fee)return e.toToken.address==Jp[e.blockchain].currency.address?void 0:[e.toAddress,e.toAmount];{const t=Math.ceil(new Date/1e3)+86400,n=e.exchangeRoutes[0],r=(({exchangeRoute:e,blockchain:t})=>void 0===e?0:"uniswap_v3"===e.exchange.name||e.exchange[t].router.address===Jp[t].wrapped.address?2:1)({exchangeRoute:n,blockchain:e.blockchain}),i=n?await n.getTransaction({account:LC[e.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:e})=>{const t=new UM(e.to,e.api),n=e.method,r=e.params;let i,o,a;return o=t.interface.fragments.find((e=>!(e.name!=n||e.inputs&&r&&"object"==typeof r&&e.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((e=>e.type)).join(",")})`,a=o.inputs.map((e=>{if("tuple"===e.type){let t={};return e.components.forEach(((n,i)=>{t[n.name]=r[e.name][i]})),i=n,t}return r[e.name]}))),t.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Jp[e.blockchain].zero;let a=Jp[e.blockchain].zero;return n&&(a="bsc"===e.blockchain&&"pancakeswap_v3"===n.exchange.name&&e.toToken.address===Jp[e.blockchain].currency.address?n.exchange[e.blockchain].smartRouter.address:zC[i.blockchain][n.exchange[e.blockchain].router.address]||n.exchange[e.blockchain].router.address),{payment:{amountIn:e.fromAmount,paymentAmount:e.toAmount,feeAmount:e.feeAmount||0,tokenInAddress:e.fromToken.address,exchangeAddress:a,tokenOutAddress:e.toToken.address,paymentReceiverAddress:e.toAddress,feeReceiverAddress:e.fee?e.fee.receiver:Jp[e.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Jp[e.blockchain].zero,deadline:t}}}},UC=({paymentRoute:e})=>e.fromToken.address==Jp[e.blockchain].currency.address?e.directTransfer?e.toAmount.toString():e.fromAmount.toString():Zf.from("0").toString();let WC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];WC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],WC.solana=["solana"];const QC=({paymentRoute:e,fee:t})=>{if(WC.evm.includes(e.blockchain))return(async({paymentRoute:e})=>({blockchain:e.blockchain,to:_C({paymentRoute:e}),api:PC({paymentRoute:e}),method:RC({paymentRoute:e}),params:await BC({paymentRoute:e}),value:UC({paymentRoute:e})}))({paymentRoute:e,fee:t});if(WC.solana.includes(e.blockchain))return IC({paymentRoute:e,fee:t});throw"Blockchain not supported!"};function YC(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class FC{constructor({blockchain:e,fromAddress:t,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:d,exchangeRoutes:h,approvalRequired:p,approvalTransaction:f,directTransfer:y}){this.blockchain=e,this.fromAddress=t,this.fromToken=n,this.fromAmount=YC([r||s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=YC([s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=d,this.exchangeRoutes=h||[],this.approvalRequired=p,this.approvalTransaction=f,this.directTransfer=y,this.getTransaction=async()=>await QC({paymentRoute:this})}}function VC({assets:e,blacklist:t,accept:n,from:r}){return Promise.resolve(GC({assets:e,blacklist:t})).then((e=>function({assets:e,accept:t,from:n}){return Promise.all(e.map((async e=>{let r=t.filter((t=>t.blockchain==e.blockchain)),i=new xk(e);return Promise.all(r.map((async t=>{if(t.token&&t.amount){let r=t.blockchain,o=e.decimals,a=new xk({blockchain:r,address:t.token}),s=await a.decimals(),u=(await a.BigNumber(t.amount)).toString();return new FC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:e.balance,fromAddress:n[t.blockchain],toAddress:t.toAddress,fee:t.fee})}if(t.fromToken&&t.fromAmount&&i.address.toLowerCase()==t.fromToken.toLowerCase()){let r=t.blockchain,o=(await i.BigNumber(t.fromAmount)).toString(),a=e.decimals,s=new xk({blockchain:r,address:t.toToken}),u=await s.decimals();return new FC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:e.balance,fromAddress:n[t.blockchain],toAddress:t.toAddress,fee:t.fee})}})))}))).then((e=>e.flat().filter((e=>e))))}({assets:e,accept:n,from:r}))).then((e=>KC({routes:e}))).then(qC).then(ZC).then(JC).then((e=>nD({routes:e}))).then(XC).then(iD).then(rD).then((e=>e.map((e=>new FC(e)))))}function HC({accept:e,from:t,whitelist:n,blacklist:r,drip:i}){if(e.some((e=>e&&e.fee&&"string"==typeof e.fee.amount&&e.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 e in n)(n[e]||[]).forEach((t=>{u.push(e),s.push({blockchain:e,address:t})}));else e.forEach((e=>{u.push(e.blockchain),s.push({blockchain:e.blockchain,address:e.token||e.toToken})}));[...new Set(u)].forEach((e=>{s.find((t=>t.blockchain===e&&t.address===Jp[e].currency.address))||s.push({blockchain:e,address:Jp[e].currency.address})})),s.sort(((e,t)=>OC(e.blockchain)[e.blockchain,e.address.toLowerCase()].join(""))),p=()=>Math.ceil(new Date),f=p();setTimeout((()=>{l.forEach((e=>y(HC,!1)))}),3e3);const y=(e,t=!0)=>{try{const n={blockchain:e.blockchain,address:e.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=p()-f>3e3;if(d.indexOf(r)>-1)return;if(h.indexOf(r)===c){if(d.push(r),i(e),c+=1,!t)return;l.forEach((t=>y(e,!1)))}else c>=h.length||o?(-1===h.indexOf(r)||c>=h.length||o)&&(d.push(r),i(e)):l.find((e=>e.blockchain===n.blockchain&&e.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((e,t)=>((e,t,n)=>{if(!e||0===e.length)return 0;let r=e.indexOf([t.blockchain,t.address.toLowerCase()].join("")),i=e.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{VC({assets:[n],blacklist:r,accept:e,from:t}).then((e=>{YC([e,"optionalAccess",e=>e.length])&&y(e[0])}))}:void 0});let g=await VC({assets:m,blacklist:r,accept:e,from:t})||[];g.assets=m,o(g)}))}let GC=({assets:e,blacklist:t})=>null==t?e:e.filter((e=>null==t[e.blockchain]||!t[e.blockchain].find((t=>t.toLowerCase()==e.address.toLowerCase())))),qC=async e=>await Promise.all(e.map((e=>e.directTransfer?[]:e.toToken&&e.toAmount?xj.route({blockchain:e.blockchain,tokenIn:e.fromToken.address,tokenOut:e.toToken.address,amountOutMin:e.toAmount,fromAddress:e.fromAddress,toAddress:e.toAddress}):e.fromToken&&e.fromAmount?xj.route({blockchain:e.blockchain,tokenIn:e.fromToken.address,tokenOut:e.toToken.address,amountIn:e.fromAmount,fromAddress:e.fromAddress,toAddress:e.toAddress}):void 0))).then((t=>e.map(((e,n)=>(e.exchangeRoutes=t[n],e))))),ZC=e=>e.filter((e=>0!=e.exchangeRoutes.length||e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase())),JC=async e=>e.filter((e=>e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()?Zf.from(e.fromBalance).gte(Zf.from(e.toAmount)):e.fromAmount&&e.toAmount?Zf.from(e.fromBalance).gte(Zf.from(e.exchangeRoutes[0].amountInMax)):e.exchangeRoutes[0]&&e.exchangeRoutes[0].amountIn?Zf.from(e.fromBalance).gte(Zf.from(e.exchangeRoutes[0].amountIn)):void 0)),XC=e=>Promise.all(e.map((e=>"solana"===e.blockchain?Promise.resolve(Jp.solana.maxInt):e.fromToken.allowance(e.fromAddress,xC[e.blockchain].address).catch((()=>{}))))).then((t=>(e.map(((n,r)=>{void 0===t[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Jp[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?e[r].approvalRequired=!1:(e[r].approvalRequired=Zf.from(n.fromAmount).gte(Zf.from(t[r])),e[r].approvalRequired&&(e[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:xk[n.blockchain].DEFAULT,method:"approve",params:[xC[n.blockchain].address,Jp[n.blockchain].maxInt]}))})),e))),KC=({routes:e})=>e.map((e=>(WC.evm.includes(e.blockchain)?e.directTransfer=e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()&&null==e.fee:"solana"===e.blockchain&&(e.directTransfer=e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()),e))),$C=({paymentRoute:e,exchangeRoute:t})=>{let n,r,i;return t?(t&&t.exchange.wrapper,n=t.amountIn.toString(),r=eD({amount:t.amountOutMin.toString(),paymentRoute:e})):(n=e.fromAmount,r=eD({amount:e.fromAmount,paymentRoute:e})),e.fee&&(i=tD({paymentRoute:e})),{fromAmount:n,toAmount:r,feeAmount:i}},eD=({amount:e,paymentRoute:t})=>{if(t.fee){let n=tD({paymentRoute:t});return Zf.from(e).sub(n).toString()}return e},tD=({paymentRoute:e})=>{if("string"==typeof e.fee.amount&&e.fee.amount.match("%"))return Zf.from(e.toAmount).mul(10*parseFloat(e.fee.amount)).div(1e3).toString();if("string"==typeof e.fee.amount)return e.fee.amount;if("number"==typeof e.fee.amount)return pE(e.fee.amount.toString(),e.toDecimals).toString();throw"Unknown fee amount type!"},nD=({routes:e})=>e.map((e=>{if(WC.evm.includes(e.blockchain))if(e.directTransfer&&!e.fee)e.fromAmount=e.toAmount;else{let{fromAmount:t,toAmount:n,feeAmount:r}=$C({paymentRoute:e,exchangeRoute:e.exchangeRoutes[0]});e.fromAmount=t,e.toAmount=n,e.fee&&(e.feeAmount=r)}else if(WC.solana.includes(e.blockchain)){let{fromAmount:t,toAmount:n,feeAmount:r}=$C({paymentRoute:e,exchangeRoute:e.exchangeRoutes[0]});e.fromAmount=t,e.toAmount=n,e.fee&&(e.feeAmount=r)}return e})),rD=e=>e.filter(((t,n)=>null==e.find(((e,r)=>t.fromToken.address==e.fromToken.address&&(t.fromToken.blockchain==e.fromToken.blockchain&&(!(!e.directTransfer||t.directTransfer)||(!(!Zf.from(e.fromAmount).lt(Zf.from(t.fromAmount))||t.directTransfer)||(e.fromAmount==t.fromAmount&&r{let t=-1;return e.sort(((e,n)=>OC(e.fromToken.blockchain)0){for(o+=a,t=1;tn)throw Error(Hk+e)}function aL(e,t,n,r){var i,o,a,s;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),o=Zk(10,7-t),s=e[i]%o|0,null==r?t<3?(0==t?s=s/100|0:1==t&&(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)&&(e[i+1]/o/100|0)==Zk(10,t-2)-1||(s==o/2||0==s)&&0==(e[i+1]/o/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(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)&&(e[i+1]/o/1e3|0)==Zk(10,t-3)-1,a}function sL(e,t,n){for(var r,i,o=[0],a=0,s=e.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()}rL.absoluteValue=rL.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),cL(e)},rL.ceil=function(){return cL(new this.constructor(this),this.e+1,2)},rL.clampedTo=rL.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(Hk+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},rL.comparedTo=rL.cmp=function(e){var t,n,r,i,o=this,a=o.d,s=(e=new o.constructor(e)).d,u=o.s,c=e.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!==e.e)return o.e>e.e^u<0?1:-1;for(t=0,n=(r=a.length)<(i=s.length)?r:i;ts[t]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},rL.cosine=rL.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r,i;if(t.isZero())return t;(r=t.d.length)<32?i=(1/TL(4,n=Math.ceil(r/3))).toString():(n=16,i="2.3283064365386962890625e-10");e.precision+=n,t=NL(e,1,t.times(i),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}(r,IL(r,n)),r.precision=e,r.rounding=t,cL(2==Rk||3==Rk?n.neg():n,e,t,!0)):new r(1):new r(NaN)},rL.cubeRoot=rL.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,l=this,d=l.constructor;if(!l.isFinite()||l.isZero())return new d(l);for(Vk=!1,(o=l.s*Zk(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new d(o.toString()):(n=iL(l.d),(o=((e=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=Zk(n,1/3),e=qk((e+1)/3)-(e%3==(e<0?-1:2)),(r=new d(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=l.s),a=(e=d.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=uL(c.plus(l).times(s),c.plus(u),a+2,1),iL(s.d).slice(0,a)===(n=iL(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))||(cL(r,e+1,1),t=!r.times(r).times(r).eq(l));break}if(!i&&(cL(s,e+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return Vk=!0,cL(r,e,d.rounding,t)},rL.decimalPlaces=rL.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-qk(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},rL.dividedBy=rL.div=function(e){return uL(this,new this.constructor(e))},rL.dividedToIntegerBy=rL.divToInt=function(e){var t=this.constructor;return cL(uL(this,new t(e),0,1,1),t.precision,t.rounding)},rL.equals=rL.eq=function(e){return 0===this.cmp(e)},rL.floor=function(){return cL(new this.constructor(this),this.e+1,3)},rL.greaterThan=rL.gt=function(e){return this.cmp(e)>0},rL.greaterThanOrEqualTo=rL.gte=function(e){var t=this.cmp(e);return 1==t||0===t},rL.hyperbolicCosine=rL.cosh=function(){var e,t,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?t=(1/TL(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),o=NL(a,1,o.times(t),new a(1),!0);for(var u,c=e,l=new a(8);c--;)u=o.times(o),o=s.minus(u.times(l.minus(u.times(l))));return cL(o,a.precision=n,a.rounding=r,!0)},rL.hyperbolicSine=rL.sinh=function(){var e,t,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=NL(o,2,i,i,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,i=NL(o,2,i=i.times(1/TL(5,e)),i,!0);for(var a,s=new o(5),u=new o(16),c=new o(20);e--;)a=i.times(i),i=i.times(s.plus(a.times(u.times(a).plus(c))))}return o.precision=t,o.rounding=n,cL(i,t,n,!0)},rL.hyperbolicTangent=rL.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,uL(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},rL.inverseCosine=rL.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?t.isNeg()?pL(n,i,o):new n(0):new n(NaN):t.isZero()?pL(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,t=t.asin(),e=pL(n,i+4,o).times(.5),n.precision=i,n.rounding=o,e.minus(t))},rL.inverseHyperbolicCosine=rL.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,Vk=!1,n=n.times(n).minus(1).sqrt().plus(n),Vk=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},rL.inverseHyperbolicSine=rL.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,Vk=!1,n=n.times(n).plus(1).sqrt().plus(n),Vk=!0,r.precision=e,r.rounding=t,n.ln())},rL.inverseHyperbolicTangent=rL.atanh=function(){var e,t,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):(e=o.precision,t=o.rounding,r=i.sd(),Math.max(r,e)<2*-i.e-1?cL(new o(i),e,t,!0):(o.precision=n=r-i.e,i=uL(i.plus(1),new o(1).minus(i),n+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)},rL.inverseSine=rL.asin=function(){var e,t,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==t?0===t?((e=pL(o,n+4,r).times(.5)).s=i.s,e):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)))},rL.inverseTangent=rL.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,l=c.constructor,d=l.precision,h=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&d+4<=nL)return(a=pL(l,d+4,h).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(d+4<=nL)return(a=pL(l,d+4,h).times(.5)).s=c.s,a}for(l.precision=s=d+10,l.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(Vk=!1,t=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==e;)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[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<this.d.length-2},rL.isNaN=function(){return!this.s},rL.isNegative=rL.isNeg=function(){return this.s<0},rL.isPositive=rL.isPos=function(){return this.s>0},rL.isZero=function(){return!!this.d&&0===this.d[0]},rL.lessThan=rL.lt=function(e){return this.cmp(e)<0},rL.lessThanOrEqualTo=rL.lte=function(e){return this.cmp(e)<1},rL.logarithm=rL.log=function(e){var t,n,r,i,o,a,s,u,c=this,l=c.constructor,d=l.precision,h=l.rounding;if(null==e)e=new l(10),t=!0;else{if(n=(e=new l(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.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(t)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(Vk=!1,a=wL(c,s=d+5),r=t?hL(l,s+10):wL(e,s),aL((u=uL(a,r,s,1)).d,i=d,h))do{if(a=wL(c,s+=10),r=t?hL(l,s+10):wL(e,s),u=uL(a,r,s,1),!o){+iL(u.d).slice(i+1,i+15)+1==1e14&&(u=cL(u,d+1,0));break}}while(aL(u.d,i+=10,h));return Vk=!0,cL(u,d,h)},rL.minus=rL.sub=function(e){var t,n,r,i,o,a,s,u,c,l,d,h,p=this,f=p.constructor;if(e=new f(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new f(e.d||p.s!==e.s?p:NaN):e=new f(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,h=e.d,s=f.precision,u=f.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!c[0])return new f(3===u?-0:0);e=new f(p)}return Vk?cL(e,s,u):e}if(n=qk(e.e/7),l=qk(p.e/7),c=c.slice(),o=l-n){for((d=o<0)?(t=c,o=-o,a=h.length):(t=h,n=l,a=c.length),o>(r=Math.max(Math.ceil(s/7),a)+2)&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((d=(r=c.length)<(a=h.length))&&(a=r),r=0;r0;--r)c[a++]=0;for(r=h.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),t=0;i;)t=(c[--i]=c[i]+l[i]+t)/eL|0,c[i]%=eL;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();return e.d=c,e.e=dL(c,r),Vk?cL(e,s,u):e},rL.precision=rL.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(Hk+e);return n.d?(t=fL(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},rL.round=function(){var e=this,t=e.constructor;return cL(new t(e),e.e+1,t.rounding)},rL.sine=rL.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:NL(e,2,t,t);n=(n=1.4*Math.sqrt(r))>16?16:0|n,t=t.times(1/TL(5,n)),t=NL(e,2,t,t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,IL(r,n)),r.precision=e,r.rounding=t,cL(Rk>2?n.neg():n,e,t,!0)):new r(NaN)},rL.squareRoot=rL.sqrt=function(){var e,t,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(Vk=!1,0==(c=Math.sqrt(+a))||c==1/0?(((t=iL(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=qk((u+1)/2)-(u<0||u%2),r=new l(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new l(c.toString()),n=(u=l.precision)+3;;)if(r=(o=r).plus(uL(a,o,n+2,1)).times(.5),iL(o.d).slice(0,n)===(t=iL(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(cL(r,u+1,1),e=!r.times(r).eq(a));break}if(!i&&(cL(o,u+1,0),o.times(o).eq(a))){r=o;break}n+=4,i=1}return Vk=!0,cL(r,u,l.rounding,e)},rL.tangent=rL.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=uL(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,cL(2==Rk||4==Rk?n.neg():n,e,t,!0)):new r(NaN)},rL.times=rL.mul=function(e){var t,n,r,i,o,a,s,u,c,l=this,d=l.constructor,h=l.d,p=(e=new d(e)).d;if(e.s*=l.s,!(h&&h[0]&&p&&p[0]))return new d(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:h&&p?0*e.s:e.s/0);for(n=qk(l.e/7)+qk(e.e/7),(u=h.length)<(c=p.length)&&(o=h,h=p,p=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%eL|0,t=s/eL|0;o[i]=(o[i]+t)%eL|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=dL(o,n),Vk?cL(e,d.precision,d.rounding):e},rL.toBinary=function(e,t){return kL(this,2,e,t)},rL.toDecimalPlaces=rL.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(oL(e,0,1e9),void 0===t?t=r.rounding:oL(t,0,8),cL(n,e+n.e+1,t))},rL.toExponential=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=lL(r,!0):(oL(e,0,1e9),void 0===t?t=i.rounding:oL(t,0,8),n=lL(r=cL(new i(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},rL.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return void 0===e?n=lL(i):(oL(e,0,1e9),void 0===t?t=o.rounding:oL(t,0,8),n=lL(r=cL(new o(i),e+i.e+1,t),!1,e+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},rL.toFraction=function(e){var t,n,r,i,o,a,s,u,c,l,d,h,p=this,f=p.d,y=p.constructor;if(!f)return new y(p);if(c=n=new y(1),r=u=new y(0),a=(o=(t=new y(r)).e=fL(f)-p.e-1)%7,t.d[0]=Zk(10,a<0?7+a:a),null==e)e=o>0?t:c;else{if(!(s=new y(e)).isInt()||s.lt(c))throw Error(Hk+s);e=s.gt(t)?o>0?t:c:s}for(Vk=!1,s=new y(iL(f)),l=y.precision,y.precision=o=7*f.length*2;d=uL(s,t,0,1,1),1!=(i=n.plus(d.times(r))).cmp(e);)n=r,r=i,i=c,c=u.plus(d.times(i)),u=i,i=t,t=s.minus(d.times(i)),s=i;return i=uL(e.minus(n),r,0,1,1),u=u.plus(i.times(c)),n=n.plus(i.times(r)),u.s=c.s=p.s,h=uL(c,r,o,1).minus(p).abs().cmp(uL(u,n,o,1).minus(p).abs())<1?[c,r]:[u,n],y.precision=l,Vk=!0,h},rL.toHexadecimal=rL.toHex=function(e,t){return kL(this,16,e,t)},rL.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:oL(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(Vk=!1,n=uL(n,e,0,t,1).times(e),Vk=!0,cL(n)):(e.s=n.s,n=e),n},rL.toNumber=function(){return+this},rL.toOctal=function(e,t){return kL(this,8,e,t)},rL.toPower=rL.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(Zk(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return cL(s,r,o);if((t=qk(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=mL(u,s,n,r),e.s<0?new u(1).div(i):cL(i,r,o);if((a=s.s)<0){if(tu.maxE+1||t0?a/0:0):(Vk=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=bL(e.times(wL(s,r+n)),r)).d&&aL((i=cL(i,r+5,1)).d,r,o)&&(t=r+10,+iL((i=cL(bL(e.times(wL(s,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=cL(i,r+1,0))),i.s=a,Vk=!0,u.rounding=o,cL(i,r,o))},rL.toPrecision=function(e,t){var n,r=this,i=r.constructor;return void 0===e?n=lL(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(oL(e,1,1e9),void 0===t?t=i.rounding:oL(t,0,8),n=lL(r=cL(new i(r),e,t),e<=r.e||r.e<=i.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},rL.toSignificantDigits=rL.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(oL(e,1,1e9),void 0===t?t=n.rounding:oL(t,0,8)),cL(new n(this),e,t)},rL.toString=function(){var e=this,t=e.constructor,n=lL(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},rL.truncated=rL.trunc=function(){return cL(new this.constructor(this),this.e+1,1)},rL.valueOf=rL.toJSON=function(){var e=this,t=e.constructor,n=lL(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var uL=function(){function e(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function t(e,t,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;)e.shift()}return function(r,i,o,a,s,u){var c,l,d,h,p,f,y,m,g,v,b,w,M,A,E,N,T,I,k,L,x=r.constructor,S=r.s==i.s?1:-1,j=r.d,C=i.d;if(!(j&&j[0]&&C&&C[0]))return new x(r.s&&i.s&&(j?!C||j[0]!=C[0]:C)?j&&0==j[0]||!C?0*S:S/0:NaN);for(u?(p=1,l=r.e-i.e):(u=eL,p=7,l=qk(r.e/p)-qk(i.e/p)),k=C.length,T=j.length,v=(g=new x(S)).d=[],d=0;C[d]==(j[d]||0);d++);if(C[d]>(j[d]||0)&&l--,null==o?(A=o=x.precision,a=x.rounding):A=s?o+(r.e-i.e)+1:o,A<0)v.push(1),f=!0;else{if(A=A/p+2|0,d=0,1==k){for(h=0,C=C[0],A++;(d1&&(C=e(C,h,u),j=e(j,h,u),k=C.length,T=j.length),N=k,w=(b=j.slice(0,k)).length;w=u/2&&++I;do{h=0,(c=t(C,b,k,w))<0?(M=b[0],k!=w&&(M=M*u+(b[1]||0)),(h=M/I|0)>1?(h>=u&&(h=u-1),1==(c=t(y=e(C,h,u),b,m=y.length,w=b.length))&&(h--,n(y,k=10;h/=10)d++;g.e=d+l*p-1,cL(g,s?o+g.e+1:o,a,f)}return g}}();function cL(e,t,n,r){var i,o,a,s,u,c,l,d,h,p=e.constructor;e:if(null!=t){if(!(d=e.d))return e;for(i=1,s=d[0];s>=10;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(l=d[h=0])/Zk(10,i-a-1)%10|0;else if((h=Math.ceil((o+1)/7))>=(s=d.length)){if(!r)break e;for(;s++<=h;)d.push(0);l=u=0,i=1,a=(o%=7)-7+1}else{for(l=s=d[h],i=1;s>=10;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:l/Zk(10,i-a-1)%10|0}if(r=r||t<0||void 0!==d[h+1]||(a<0?l:l%Zk(10,i-a-1)),c=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?a>0?l/Zk(10,i-a):0:d[h-1])%10&1||n==(e.s<0?8:7)),t<1||!d[0])return d.length=0,c?(t-=e.e+1,d[0]=Zk(10,(7-t%7)%7),e.e=-t||0):d[0]=e.e=0,e;if(0==o?(d.length=h,s=1,h--):(d.length=h+1,s=Zk(10,7-o),d[h]=a>0?(l/Zk(10,i-a)%Zk(10,a)|0)*s:0),c)for(;;){if(0==h){for(o=1,a=d[0];a>=10;a/=10)o++;for(a=d[0]+=s,s=1;a>=10;a/=10)s++;o!=s&&(e.e++,d[0]==eL&&(d[0]=1));break}if(d[h]+=s,d[h]!=eL)break;d[h--]=0,s=1}for(o=d.length;0===d[--o];)d.pop()}return Vk&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+yL(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+yL(-i-1)+o,n&&(r=n-a)>0&&(o+=yL(r))):i>=a?(o+=yL(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+yL(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=yL(r))),o}function dL(e,t){var n=e[0];for(t*=7;n>=10;n/=10)t++;return t}function hL(e,t,n){if(t>tL)throw Vk=!0,n&&(e.precision=n),Error("[DecimalError] Precision limit exceeded");return cL(new e(Qk),t,1,!0)}function pL(e,t,n){if(t>nL)throw Error("[DecimalError] Precision limit exceeded");return cL(new e(Yk),t,n,!0)}function fL(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function yL(e){for(var t="";e--;)t+="0";return t}function mL(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(Vk=!1;;){if(n%2&&LL((o=o.times(t)).d,a)&&(i=!0),0===(n=qk(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}LL((t=t.times(t)).d,a)}return Vk=!0,o}function gL(e){return 1&e.d[e.d.length-1]}function vL(e,t,n){for(var r,i=new e(t[0]),o=0;++o17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(Vk=!1,u=f):u=t,s=new h(.03125);e.e>-2;)e=e.times(s),d+=5;for(u+=r=Math.log(Zk(2,d))/Math.LN10*2+5|0,n=o=a=new h(1),h.precision=u;;){if(o=cL(o.times(e),u,1),n=n.times(++l),iL((s=a.plus(uL(o,n,u,1))).d).slice(0,u)===iL(a.d).slice(0,u)){for(i=d;i--;)a=cL(a.times(a),u,1);if(null!=t)return h.precision=f,a;if(!(c<3&&aL(a.d,u-r,p,c)))return cL(a,h.precision=f,p,Vk=!0);h.precision=u+=10,n=o=s=new h(1),l=0,c++}a=s}}function wL(e,t){var n,r,i,o,a,s,u,c,l,d,h,p=1,f=e,y=f.d,m=f.constructor,g=m.rounding,v=m.precision;if(f.s<0||!y||!y[0]||!f.e&&1==y[0]&&1==y.length)return new m(y&&!y[0]?-1/0:1!=f.s?NaN:y?0:f);if(null==t?(Vk=!1,l=v):l=t,m.precision=l+=10,r=(n=iL(y)).charAt(0),!(Math.abs(o=f.e)<15e14))return c=hL(m,l+2,v).times(o+""),f=wL(new m(r+"."+n.slice(1)),l-10).plus(c),m.precision=v,null==t?cL(f,v,g,Vk=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=iL((f=f.times(e)).d)).charAt(0),p++;for(o=f.e,r>1?(f=new m("0."+n),o++):f=new m(r+"."+n.slice(1)),d=f,u=a=f=uL(f.minus(1),f.plus(1),l,1),h=cL(f.times(f),l,1),i=3;;){if(a=cL(a.times(h),l,1),iL((c=u.plus(uL(a,new m(i),l,1))).d).slice(0,l)===iL(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(hL(m,l+2,v).times(o+""))),u=uL(u,new m(p),l,1),null!=t)return m.precision=v,u;if(!aL(u.d,l-10,g,s))return cL(u,m.precision=v,g,Vk=!0);m.precision=l+=10,c=a=f=uL(d.minus(1),d.plus(1),l,1),h=cL(f.times(f),l,1),i=s=1}u=c,i+=2}}function ML(e){return String(e.s*e.s/0)}function AL(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),re.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),$k.test(t))return AL(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Xk.test(t))n=16,t=t.toLowerCase();else if(Jk.test(t))n=2;else{if(!Kk.test(t))throw Error(Hk+t);n=8}for((o=t.search(/p/i))>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),a=(o=t.indexOf("."))>=0,r=e.constructor,a&&(o=(s=(t=t.replace(".","")).length)-o,i=mL(r,new r(n),o,2*o)),o=l=(c=sL(t,n,eL)).length-1;0===c[o];--o)c.pop();return o<0?new r(0*e.s):(e.e=dL(c,l),e.d=c,Vk=!1,a&&(e=uL(e,i,4*s)),u&&(e=e.times(Math.abs(u)<54?Zk(2,u):yx.pow(2,u))),Vk=!0,e)}function NL(e,t,n,r,i){var o,a,s,u,c=e.precision,l=Math.ceil(c/7);for(Vk=!1,u=n.times(n),s=new e(r);;){if(a=uL(s.times(u),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=uL(a.times(u),new e(t++*t++),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 Vk=!0,a.d.length=l+1,a}function TL(e,t){for(var n=e;--t;)n*=e;return n}function IL(e,t){var n,r=t.s<0,i=pL(e,e.precision,1),o=i.times(.5);if((t=t.abs()).lte(o))return Rk=r?4:1,t;if((n=t.divToInt(i)).isZero())Rk=r?3:2;else{if((t=t.minus(n.times(i))).lte(o))return Rk=gL(n)?r?2:3:r?4:1,t;Rk=gL(n)?r?1:4:r?3:2}return t.minus(i).abs()}function kL(e,t,n,r){var i,o,a,s,u,c,l,d,h,p=e.constructor,f=void 0!==n;if(f?(oL(n,1,1e9),void 0===r?r=p.rounding:oL(r,0,8)):(n=p.precision,r=p.rounding),e.isFinite()){for(f?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,(a=(l=lL(e)).indexOf("."))>=0&&(l=l.replace(".",""),(h=new p(1)).e=l.length-a,h.d=sL(lL(h),10,i),h.e=h.d.length),o=u=(d=sL(l,10,i)).length;0==d[--u];)d.pop();if(d[0]){if(a<0?o--:((e=new p(e)).d=d,e.e=o,d=(e=uL(e,h,n,r,0,i)).d,o=e.e,c=Pk),a=d[n],s=i/2,c=c||void 0!==d[n+1],c=r<4?(void 0!==a||c)&&(0===r||r===(e.s<0?3:2)):a>s||a===s&&(4===r||c||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,c)for(;++d[--n]>i-1;)d[n]=0,n||(++o,d.unshift(1));for(u=d.length;!d[u-1];--u);for(a=0,l="";a1)if(16==t||8==t){for(a=16==t?4:3,--u;u%a;u++)l+="0";for(u=(d=sL(l,i,t)).length;!d[u-1];--u);for(a=1,l="1.";au)for(o-=u;o--;)l+="0";else ot)return e.length=t,!0}function xL(e){return new this(e).abs()}function SL(e){return new this(e).acos()}function jL(e){return new this(e).acosh()}function CL(e,t){return new this(e).plus(t)}function DL(e){return new this(e).asin()}function OL(e){return new this(e).asinh()}function zL(e){return new this(e).atan()}function _L(e){return new this(e).atanh()}function PL(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?pL(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=pL(this,o,1).times(.5)).s=e.s:t.s<0?(this.precision=o,this.rounding=1,n=this.atan(uL(e,t,o,1)),t=pL(this,o,1),this.precision=r,this.rounding=i,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(uL(e,t,o,1)):(n=pL(this,o,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function RL(e){return new this(e).cbrt()}function BL(e){return cL(e=new this(e),e.e+1,2)}function UL(e,t,n){return new this(e).clamp(t,n)}function WL(e){if(!e||"object"!=typeof e)throw Error("[DecimalError] Object expected");var t,n,r,i=!0===e.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-Uk,0,"toExpPos",0,Uk,"maxE",0,Uk,"minE",-Uk,0,"modulo",0,9];for(t=0;t=o[t+1]&&r<=o[t+2]))throw Error(Hk+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=Fk[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(Hk+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 QL(e){return new this(e).cos()}function YL(e){return new this(e).cosh()}function FL(e,t){return new this(e).div(t)}function VL(e){return new this(e).exp()}function HL(e){return cL(e=new this(e),e.e+1,3)}function GL(){var e,t,n=new this(0);for(Vk=!1,e=0;e=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(t=crypto.randomBytes(r*=4);o=214e7?crypto.randomBytes(4).copy(t,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 ox(e){return cL(e=new this(e),e.e+1,this.rounding)}function ax(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function sx(e){return new this(e).sin()}function ux(e){return new this(e).sinh()}function cx(e){return new this(e).sqrt()}function lx(e,t){return new this(e).sub(t)}function dx(){var e=0,t=arguments,n=new this(t[e]);for(Vk=!1;n.s&&++eo.maxE?(i.e=NaN,i.d=null):e.e=10;n/=10)t++;return void(Vk?t>o.maxE?(i.e=NaN,i.d=null):tn.call(t,...e))),t=void 0)}return n}Qk=new yx(Qk),Yk=new yx(Yk);class gx{constructor({blockchain:e,tokenIn:t,decimalsIn:n,tokenOut:r,decimalsOut:i,path:o,pools:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,exchange:d,approvalRequired:h,getApproval:p,getPrep:f,getTransaction:y}){this.blockchain=e,this.tokenIn=t,this.decimalsIn=n,this.tokenOut=r,this.decimalsOut=i,this.path=o,this.pools=a,this.amountIn=mx([s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountOutMin=mx([l,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountOut=mx([c,"optionalAccess",e=>e.toString,"call",e=>e()]),this.amountInMax=mx([u,"optionalAccess",e=>e.toString,"call",e=>e()]),this.exchange=d,this.getPrep=f,this.getTransaction=y}}let vx=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];vx.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],vx.solana=["solana"];const bx=async({exchange:e,blockchain:t,pools:n,exchangePath:r,amountIn:i,amountOut:o})=>{let a=i.add(i.mul(100*parseFloat("0.5")).div(1e4));if(!vx.evm.includes(e.blockchain||t))return a;const s=await UE({blockchain:e.blockchain||t,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 e.getAmounts({exchange:e,blockchain:t,path:r,pools:n,amountOut:o,block:i});return a})));if(!l[0]||!l[1]||!l[2])return a;let d;if(l[0].gt(l[1])&&l[1].gt(l[2])){const e=l[0].sub(l[1]),t=l[1].sub(l[2]),n=e.add(t).div(2);if(d=l[0].add(n),d.gt(a))return d}else if(!l[0].eq(l[1])&&!l[1].eq(l[2])){const e=l[0].sub(l[1]).abs(),t=l[1].sub(l[2]).abs();let n,r;if(n=e.lt(t)?e:t,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],d=r.add(n),d.gt(a))return d}return a},wx=async({exchange:e,blockchain:t,pools:n,exchangePath:r,amounts:i,tokenIn:o,tokenOut:a,amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amountInInput:d,amountOutInput:h,amountInMaxInput:p,amountOutMinInput:f})=>{if(f||h){if(vx.evm.includes(e.blockchain||t))s=u=await bx({exchange:e,blockchain:t,pools:n,exchangePath:r,amountIn:s,amountOut:f||c});else if(vx.solana.includes(e.blockchain||t)){let t=[];await Promise.all(r.map(((o,a)=>{if(0!=a){let o=bx({exchange:e,pools:n,exchangePath:[r[a-1],r[a]],amountIn:i[a-1],amountOut:i[a]});return o.then((e=>t.push(e))),o}}))),t.push(i[i.length-1]),s=u=(i=t)[0]}}else if((p||d)&&vx.solana.includes(e.blockchain||t)){let t=[];await Promise.all(r.map(((n,o)=>{if(0!==o&&on.sub(n.mul(100*parseFloat("0.5")).div(1e4)))({exchange:e,exchangePath:[r[o-1],r[o]],amountIn:i[o-1],amountOut:i[o]});return n.then((e=>(t.unshift(e),e))),n}}))),t.push(i[0]),c=l=(i=t.slice().reverse())[i.length-1]}return{amountIn:s,amountInMax:u,amountOut:c,amountOutMin:l,amounts:i}},Mx=e=>e.match("0x")?dm(e):e;let Ax=async({amount:e,blockchain:t,address:n})=>await xk.BigNumber({amount:e,blockchain:t,address:n}),Ex=async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{let u={exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s};return o&&"number"==typeof o&&(u.amountOut=await Ax({amount:o,blockchain:e,address:r})),s&&"number"==typeof s&&(u.amountOutMin=await Ax({amount:s,blockchain:e,address:r})),i&&"number"==typeof i&&(u.amountIn=await Ax({amount:i,blockchain:e,address:n})),a&&"number"==typeof a&&(u.amountInMax=await Ax({amount:a,blockchain:e,address:n})),u};class Nx{constructor(...e){Object.assign(this,...e)}async route({blockchain:e,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}){return t===n?Promise.resolve():(void 0===e&&(this.scope?e=this.scope:1===this.blockchains.length&&(e=this.blockchains[0])),(({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if(void 0===e&&null!=t.blockchains&&t.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:e,exchange:this,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),await(({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s,findPath:u,getAmounts:c,getPrep:l,getTransaction:d,slippage:h})=>{if(n=Mx(n),r=Mx(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 p=>{let{path:f,exchangePath:y,pools:m}=await u({blockchain:e,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s});if(void 0===f||0==f.length)return p();let g,[v,b,w,M]=[i,o,a,s];try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await c({exchange:t,blockchain:e,path:f,pools:m,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s}))}catch(e){return p()}if([i,a,o,s].every((e=>null==e)))return p();if(h||t.slippage)try{({amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g}=await wx({exchange:t,blockchain:e,pools:m,exchangePath:y,amounts:g,tokenIn:n,tokenOut:r,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amountInInput:v,amountOutInput:b,amountInMaxInput:w,amountOutMinInput:M}))}catch(e){return p()}const A=await new xk({blockchain:e,address:n}).decimals(),E=await new xk({blockchain:e,address:r}).decimals();p(new gx({blockchain:e,tokenIn:n,decimalsIn:A,tokenOut:r,decimalsOut:E,path:f,pools:m,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,exchange:t,getPrep:async({account:o})=>await l({exchange:t,blockchain:e,tokenIn:n,tokenOut:r,amountIn:i||a,account:o}),getTransaction:async({account:n,permit2:r,inputTokenPushed:u})=>await d({exchange:t,blockchain:e,pools:m,path:f,amountIn:i,amountInMax:a,amountOut:o,amountOutMin:s,amounts:g,amountInInput:v,amountOutInput:b,amountInMaxInput:w,amountOutMinInput:M,account:n,permit2:r,inputTokenPushed:u})}))}))})({...await Ex({blockchain:e,exchange:this,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a}),blockchain:e,findPath:this.findPath,getAmounts:this.getAmounts,getPrep:this.getPrep,getTransaction:this.getTransaction,slippage:this.slippage}))}}function Tx(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const Ix=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},kx=({reserves:e,min:t,token:n,token0:r,token1:i,decimals:o})=>r.toLowerCase()==n.toLowerCase()?e[0].gte(pE(t.toString(),o)):i.toLowerCase()==n.toLowerCase()&&e[1].gte(pE(t.toString(),o)),Lx=async({blockchain:e,exchange:t,path:n})=>{const r=Ix({blockchain:e,exchange:t,path:n});if(!r||1===r.length)return!1;try{let i=await UE({blockchain:e,address:t[e].factory.address,method:"getPair",api:t[e].factory.api,cache:36e5,params:Ix({blockchain:e,exchange:t,path:n})});if(!i||i==Jp[e].zero)return!1;let[o,a,s]=await Promise.all([UE({blockchain:e,address:i,method:"getReserves",api:t[e].pair.api,cache:36e5}),UE({blockchain:e,address:i,method:"token0",api:t[e].pair.api,cache:36e5}),UE({blockchain:e,address:i,method:"token1",api:t[e].pair.api,cache:36e5})]);if(r.includes(Jp[e].wrapped.address))return kx({min:1,token:Jp[e].wrapped.address,decimals:Jp[e].currency.decimals,reserves:o,token0:a,token1:s});if(n.find((t=>Jp[e].stables.usd.includes(t)))){let t=n.find((t=>Jp[e].stables.usd.includes(t))),r=new xk({blockchain:e,address:t}),i=await r.decimals();return kx({min:1e3,token:t,decimals:i,reserves:o,token0:a,token1:s})}return!0}catch(e){return console.log("e",e),!1}};let xx=({blockchain:e,exchange:t,path:n,amountIn:r,tokenIn:i,tokenOut:o})=>new Promise((i=>{UE({blockchain:e,address:t[e].router.address,method:"getAmountsOut",api:t[e].router.api,params:{amountIn:r,path:Ix({blockchain:e,exchange:t,path:n})}}).then((e=>{i(e[e.length-1])})).catch((()=>i()))})),Sx=({blockchain:e,exchange:t,path:n,amountOut:r,block:i})=>new Promise((o=>{UE({blockchain:e,address:t[e].router.address,method:"getAmountsIn",api:t[e].router.api,params:{amountOut:r,path:Ix({blockchain:e,exchange:t,path:n})},block:i}).then((e=>o(e[0]))).catch((()=>o()))}));var jx={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let i;if(await Lx({blockchain:e,exchange:t,path:[n,r]}))i=[n,r];else if(n!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[n,Jp[e].wrapped.address]})&&r!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[r,Jp[e].wrapped.address]}))i=[n,Jp[e].wrapped.address,r];else if(!Jp[e].stables.usd.includes(n)&&(await Promise.all(Jp[e].stables.usd.map((r=>Lx({blockchain:e,exchange:t,path:[n,r]}))))).filter(Boolean).length&&r!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[Jp[e].wrapped.address,r]})){let o=(await Promise.all(Jp[e].stables.usd.map((async r=>await Lx({blockchain:e,exchange:t,path:[n,r]})?r:void 0)))).find(Boolean);i=[n,o,Jp[e].wrapped.address,r]}else if(n!=Jp[e].wrapped.address&&await Lx({blockchain:e,exchange:t,path:[n,Jp[e].wrapped.address]})&&!Jp[e].stables.usd.includes(r)&&(await Promise.all(Jp[e].stables.usd.map((n=>Lx({blockchain:e,exchange:t,path:[n,r]}))))).filter(Boolean).length){let o=(await Promise.all(Jp[e].stables.usd.map((async n=>await Lx({blockchain:e,exchange:t,path:[n,r]})?n:void 0)))).find(Boolean);i=[n,Jp[e].wrapped.address,o,r]}return Tx([i,"optionalAccess",e=>e.length])&&i[0]==Jp[e].currency.address?i.splice(1,0,Jp[e].wrapped.address):Tx([i,"optionalAccess",e=>e.length])&&i[i.length-1]==Jp[e].currency.address&&i.splice(i.length-1,0,Jp[e].wrapped.address),{path:i,exchangePath:Ix({blockchain:e,exchange:t,path:i})}},pathExists:Lx,getAmounts:async({blockchain:e,exchange:t,path:n,block:r,tokenIn:i,tokenOut:o,amountOut:a,amountIn:s,amountInMax:u,amountOutMin:c})=>{if(a){if(null==(s=await Sx({blockchain:e,exchange:t,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 xx({blockchain:e,exchange:t,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 Sx({blockchain:e,exchange:t,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 xx({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;const o=await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].router.address]});if(o.gte(r))return;return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].router.address,r.sub(o)]}}},getTransaction:({exchange:e,blockchain:t,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:d})=>{let h={blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api};return n[0]===Jp[t].currency.address?s||l?(h.method="swapExactETHForTokens",h.value=r.toString(),h.params={amountOutMin:a.toString()}):(u||c)&&(h.method="swapETHForExactTokens",h.value=i.toString(),h.params={amountOut:o.toString()}):n[n.length-1]===Jp[t].currency.address?s||l?(h.method="swapExactTokensForETH",h.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(h.method="swapTokensForExactETH",h.params={amountInMax:i.toString(),amountOut:o.toString()}):s||l?(h.method="swapExactTokensForTokens",h.params={amountIn:r.toString(),amountOutMin:a.toString()}):(u||c)&&(h.method="swapTokensForExactTokens",h.params={amountInMax:i.toString(),amountOut:o.toString()}),h.params=Object.assign({},h.params,{path:Ix({blockchain:t,exchange:e,path:n}),to:d,deadline:Math.round(Date.now()/1e3)+86400}),h},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 Cx={name:"honeyswap",label:"Honeyswap",logo:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHAAAABQCAYAAADBTPF9AAAACXBIWXMAAAsTAAALEwEAmpwYAAALmklEQVR4nO2de3BU1R3HP7+7eQALAcSNyq4ELDpUS0HJdrRm0aE6oPWJWqtQxUdn1KpcdQy04nssslQbdKxa7cC0iq22+BhsUQcfbBzQAL4V7VQM7OK4i4oJBJLs3l//uEHDkvfevbsb85nJHzn33PP73fu99+x5/M65Mt08jXwlVpuYCTwCjAS+BD5FeRXhaX+Vb51Tdja/khhZUsQpCGcBE4HRQCmwoqWFS8ZN8zU7ZctpJF8FjEbixSLyBnB0B4ebgZeAuzIRMhqJe0XkKuBKYFwn2c7xV/lW9NVGtjFy7UBniKKA1cnhUuA0oDYaSdyxLbLd09vyo5HEFBGJAGE6Fw+0Ux/ygrwV0D+1PKmqc4F1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WR5RVeC3vod4NDfW7louIB5hM9pdnr1RldiDkW1ZW4d2ZZVsZk0+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:jx.ROUTER},factory:{address:"0xA818b4F111Ccac7AA31D0BCc0806d64F2E0737D7",api:jx.FACTORY},pair:{api:jx.PAIR}}};var Dx=e=>new Nx(Object.assign(Cx,{scope:e,findPath:e=>jx.findPath({...e,exchange:Cx}),pathExists:e=>jx.pathExists({...e,exchange:Cx}),getAmounts:e=>jx.getAmounts({...e,exchange:Cx}),getPrep:e=>jx.getPrep({...e,exchange:Cx}),getTransaction:e=>jx.getTransaction({...e,exchange:Cx})}));const Ox="79226673515401279992447579055",zx=e=>-e;class _x{static priceToSqrtPriceX64(e,t,n){return r=e.mul(yx.pow(10,n-t)).sqrt(),new up(r.mul(yx.pow(2,64)).floor().toFixed());var r}static sqrtPriceX64ToPrice(e,t,n){return(r=e,new yx(r.toString()).mul(yx.pow(2,-64))).pow(2).mul(yx.pow(10,t-n));var r}static tickIndexToSqrtPriceX64(e){return new up(e>0?function(e){let t;t=new up(0!=(1&e)?"79232123823359799118286999567":"79228162514264337593543950336");0!=(2&e)&&(t=Px(t.mul(new up("79236085330515764027303304731")),96,256));0!=(4&e)&&(t=Px(t.mul(new up("79244008939048815603706035061")),96,256));0!=(8&e)&&(t=Px(t.mul(new up("79259858533276714757314932305")),96,256));0!=(16&e)&&(t=Px(t.mul(new up("79291567232598584799939703904")),96,256));0!=(32&e)&&(t=Px(t.mul(new up("79355022692464371645785046466")),96,256));0!=(64&e)&&(t=Px(t.mul(new up("79482085999252804386437311141")),96,256));0!=(128&e)&&(t=Px(t.mul(new up("79736823300114093921829183326")),96,256));0!=(256&e)&&(t=Px(t.mul(new up("80248749790819932309965073892")),96,256));0!=(512&e)&&(t=Px(t.mul(new up("81282483887344747381513967011")),96,256));0!=(1024&e)&&(t=Px(t.mul(new up("83390072131320151908154831281")),96,256));0!=(2048&e)&&(t=Px(t.mul(new up("87770609709833776024991924138")),96,256));0!=(4096&e)&&(t=Px(t.mul(new up("97234110755111693312479820773")),96,256));0!=(8192&e)&&(t=Px(t.mul(new up("119332217159966728226237229890")),96,256));0!=(16384&e)&&(t=Px(t.mul(new up("179736315981702064433883588727")),96,256));0!=(32768&e)&&(t=Px(t.mul(new up("407748233172238350107850275304")),96,256));0!=(65536&e)&&(t=Px(t.mul(new up("2098478828474011932436660412517")),96,256));0!=(131072&e)&&(t=Px(t.mul(new up("55581415166113811149459800483533")),96,256));0!=(262144&e)&&(t=Px(t.mul(new up("38992368544603139932233054999993551")),96,256));return Px(t,32,256)}(e):function(e){let t,n=Math.abs(e);t=new up(0!=(1&n)?"18445821805675392311":"18446744073709551616");0!=(2&n)&&(t=Px(t.mul(new up("18444899583751176498")),64,256));0!=(4&n)&&(t=Px(t.mul(new up("18443055278223354162")),64,256));0!=(8&n)&&(t=Px(t.mul(new up("18439367220385604838")),64,256));0!=(16&n)&&(t=Px(t.mul(new up("18431993317065449817")),64,256));0!=(32&n)&&(t=Px(t.mul(new up("18417254355718160513")),64,256));0!=(64&n)&&(t=Px(t.mul(new up("18387811781193591352")),64,256));0!=(128&n)&&(t=Px(t.mul(new up("18329067761203520168")),64,256));0!=(256&n)&&(t=Px(t.mul(new up("18212142134806087854")),64,256));0!=(512&n)&&(t=Px(t.mul(new up("17980523815641551639")),64,256));0!=(1024&n)&&(t=Px(t.mul(new up("17526086738831147013")),64,256));0!=(2048&n)&&(t=Px(t.mul(new up("16651378430235024244")),64,256));0!=(4096&n)&&(t=Px(t.mul(new up("15030750278693429944")),64,256));0!=(8192&n)&&(t=Px(t.mul(new up("12247334978882834399")),64,256));0!=(16384&n)&&(t=Px(t.mul(new up("8131365268884726200")),64,256));0!=(32768&n)&&(t=Px(t.mul(new up("3584323654723342297")),64,256));0!=(65536&n)&&(t=Px(t.mul(new up("696457651847595233")),64,256));0!=(131072&n)&&(t=Px(t.mul(new up("26294789957452057")),64,256));0!=(262144&n)&&(t=Px(t.mul(new up("37481735321082")),64,256));return t}(e))}static sqrtPriceX64ToTickIndex(e){if(e.gt(new up(Ox))||e.lt(new up("4295048016")))throw new Error("Provided sqrtPrice is not within the supported sqrtPrice range.");const t=e.bitLength()-1,n=function(e,t,n){let r=e.toTwos(n).shln(t);return r.imaskn(n+1),r.fromTwos(n)}(new up(t-64),32,128);let r=new up("8000000000000000","hex"),i=0,o=new up(0),a=t>=64?e.shrn(t-63):e.shln(63-t);for(;r.gt(new up(0))&&i<14;){a=a.mul(a);let e=a.shrn(127);a=a.shrn(63+e.toNumber()),o=o.add(r.mul(e)),r=r.shrn(1),i+=1}const s=o.shrn(32),u=n.add(s).mul(new up("59543866431248")),c=Px(u.sub(new up("184467440737095516")),64,128).toNumber(),l=Px(u.add(new up("15793534762490258745")),64,128).toNumber();if(c==l)return c;return _x.tickIndexToSqrtPriceX64(l).lte(e)?l:c}static tickIndexToPrice(e,t,n){return _x.sqrtPriceX64ToPrice(_x.tickIndexToSqrtPriceX64(e),t,n)}static priceToTickIndex(e,t,n){return _x.sqrtPriceX64ToTickIndex(_x.priceToSqrtPriceX64(e,t,n))}static priceToInitializableTickIndex(e,t,n,r){return((e,t)=>e-e%t)(_x.priceToTickIndex(e,t,n),r)}static invertPrice(e,t,n){const r=_x.priceToTickIndex(e,t,n),i=zx(r);return _x.tickIndexToPrice(i,n,t)}static invertSqrtPriceX64(e){const t=_x.sqrtPriceX64ToTickIndex(e),n=zx(t);return _x.tickIndexToSqrtPriceX64(n)}}function Px(e,t,n){let r=e.toTwos(n).shrn(t);return r.imaskn(n-t+1),r.fromTwos(n-t)}const Rx=new up(1e4),Bx=new up(1e6),Ux=new up(0),Wx=new up(1),Qx=new up(2),Yx=Qx.pow(new up(64)).sub(Wx);class Fx extends up{toBuffer(){const e=super.toArray().reverse(),t=buffer.Buffer.from(e);if(8===t.length)return t;assert__default.default(t.length<8,"u64 too large");const n=buffer.Buffer.alloc(8);return t.copy(n),n}static fromBuffer(e){return assert__default.default(8===e.length,`Invalid buffer length: ${e.length}`),new Fx([...e].reverse().map((e=>`00${e.toString(16)}`.slice(-2))).join(""),16)}}class Vx{static mul(e,t,n){const r=e.mul(t);if(this.isOverLimit(r,n))throw new Error(`Mul result higher than u${n}`);return r}static mulDiv(e,t,n,r){return this.mulDivRoundUpIf(e,t,n,!1,r)}static mulDivRoundUp(e,t,n,r){return this.mulDivRoundUpIf(e,t,n,!0,r)}static mulDivRoundUpIf(e,t,n,r,i){if(n.eq(Ux))throw new Error("mulDiv denominator is zero");const o=this.mul(e,t,i),a=o.div(n);return r&&o.mod(n).gt(Ux)?a.add(Wx):a}static checked_mul_shift_right(e,t,n){return this.checked_mul_shift_right_round_up_if(e,t,!1,n)}static checked_mul_shift_right_round_up_if(e,t,n,r){if(e.eq(Ux)||t.eq(Ux))return Ux;const i=this.mul(e,t,r);if(this.isOverLimit(i,r))throw new Error(`MulShiftRight overflowed u${r}.`);const o=i.div(new up(2).pow(new up(64)));const a=n&&o.and(Yx).gt(Ux);if(a&&o.eq(Yx))throw new Error(`MulShiftRight overflowed u${r}.`);return a?o.add(Wx):o}static isOverLimit(e,t){const n=Qx.pow(new up(t)).sub(Wx);return e.gt(n)}static divRoundUp(e,t){return this.divRoundUpIf(e,t,!0)}static divRoundUpIf(e,t,n){if(t.eq(Ux))throw new Error("divRoundUpIf - divide by zero");let r=e.div(t);return n&&e.mod(t).gt(Ux)?r.add(Wx):r}}const Hx=(e,t,n)=>{const r=_x.tickIndexToSqrtPriceX64(e);return{nextTickPrice:r,nextSqrtPriceLimit:n?up.max(t,r):up.min(t,r)}},Gx=(e,t)=>e.gt(t)?[t,e]:[e,t],qx=(e,t,n,r)=>{let[i,o]=Gx(e,t),a=o.sub(i),s=n.mul(a).shln(64),u=i.mul(o),c=s.div(u),l=s.mod(u),d=r&&!l.eq(Ux)?c.add(Wx):c;if(d.gt(Yx))throw new Error("Results larger than U64");return d},Zx=(e,t,n,r)=>{let[i,o]=Gx(e,t),a=o.sub(i);return Vx.checked_mul_shift_right_round_up_if(n,a,r,128)},Jx=(e,t,n,r,i)=>r===i?((e,t,n,r)=>{if(n.eq(Ux))return e;let i=Vx.mul(e,n,256),o=Vx.mul(t,e,256).shln(64);if(Vx.isOverLimit(o,256))throw new Error("getNextSqrtPriceFromARoundUp - numerator overflow u256");let a=t.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=Vx.divRoundUp(o,s);if(u.lt(new up("4295048016")))throw new Error("getNextSqrtPriceFromARoundUp - price less than min sqrt price");if(u.gt(new up(Ox)))throw new Error("getNextSqrtPriceFromARoundUp - price less than max sqrt price");return u})(e,t,n,r):((e,t,n,r)=>{let i=n.shln(64),o=Vx.divRoundUpIf(i,t,!r);return r?e.add(o):e.sub(o)})(e,t,n,r),Xx=(e,t,n,r,i)=>i===r?qx(e,t,n,r):Zx(e,t,n,r),Kx=(e,t,n,r,i,o,a)=>{let s=Xx(r,i,n,o,a),u=e;if(o){u=Vx.mulDiv(e,Bx.sub(new up(t)),Bx,128)}let c=u.gte(s)?i:Jx(r,n,u,o,a),l=c.eq(i),d=((e,t,n,r,i)=>i===r?Zx(e,t,n,!r):qx(e,t,n,!r))(r,c,n,o,a);l||(s=Xx(r,c,n,o,a));let h,p=o?s:d,f=o?d:s;if(!o&&f.gt(e)&&(f=e),o&&!l)h=e.sub(p);else{const e=new up(t);h=Vx.mulDivRoundUp(p,e,Bx.sub(e),128)}return{amountIn:p,amountOut:f,nextPrice:c,feeAmount:h}},$x=(e,t,n)=>n?t.sub(e):t.add(e),eS=(e,t,n,r,i)=>{let o=r,a=i,s=e;if(t>0){let e=((e,t)=>e.mul(new Fx(t).div(Rx)))(s,t);s=s.sub(e),o=o.add(r)}if(n.gt(Ux)){const e=s.shln(64).div(n);a=a.add(e)}return{nextProtocolFee:o,nextFeeGrowthGlobalInput:a}},tS=vp([yp("mint"),yp("vault"),yp("authority"),bp("emissionsPerSecondX64"),bp("growthGlobalX64")]),nS=vp([Ap("anchorDiscriminator"),yp("whirlpoolsConfig"),rp(Ep(),1,"whirlpoolBump"),wp("tickSpacing"),rp(Ep(),2,"tickSpacingSeed"),wp("feeRate"),wp("protocolFeeRate"),bp("liquidity"),bp("sqrtPrice"),hp("tickCurrentIndex"),Ap("protocolFeeOwedA"),Ap("protocolFeeOwedB"),yp("tokenMintA"),yp("tokenVaultA"),bp("feeGrowthGlobalA"),yp("tokenMintB"),yp("tokenVaultB"),bp("feeGrowthGlobalB"),Ap("rewardLastUpdatedTimestamp"),rp(tS,3,"rewardInfos")]),rS=vp([lp("initialized"),dp("liquidityNet"),bp("liquidityGross"),bp("feeGrowthOutsideA"),bp("feeGrowthOutsideB"),rp(bp(),3,"reward_growths_outside")]),iS=vp([Ap("anchorDiscriminator"),hp("startTickIndex"),rp(rS,88,"ticks"),yp("whirlpool")]),oS=(e,t,n)=>{const r=(Math.floor(e/t/88)+n)*t*88,i=88*t;if(r<-443636-(-443636%i+i))throw`startTickIndex is too small - - ${r}`;if(r>443636)throw`startTickIndex is too large - ${r}`;return r},aS=async({pool:e,freshWhirlpoolData:t,aToB:n})=>{const r=await(async({aToB:e,pool:t,tickSpacing:n,tickCurrentIndex:r})=>{const i=e?0:n;let o=0,a=[];for(let s=0;s<3;s++){let s;try{s=oS(r+i,n,o)}catch(e){return a}const u=(await iu.findProgramAddress([sp.from("tick_array"),new iu(t.toString()).toBuffer(),sp.from(s.toString())],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0];a.push(u),o=e?o-1:o+1}return a})({aToB:n,pool:e,tickSpacing:t.tickSpacing,tickCurrentIndex:t.tickCurrentIndex});return await Promise.all(r.map((async(e,t)=>{let n;try{n=await UE({blockchain:"solana",address:e.toString(),api:iS,cache:10})}catch(e){}return{address:e,data:n}})))};class sS{static fromTickIndex(e,t){const n=Math.floor(Math.floor(e/t)/88);let r=Math.floor(e%(88*t)/t);return r<0&&(r=88+r),new sS(n,r,t)}constructor(e,t,n){if(t>=88)throw new Error("Invalid offsetIndex - value has to be smaller than TICK_ARRAY_SIZE");if(t<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=e,this.offsetIndex=t,this.tickSpacing=n}toTickIndex(){return 88*this.arrayIndex*this.tickSpacing+this.offsetIndex*this.tickSpacing}toNextInitializableTickIndex(){return sS.fromTickIndex(this.toTickIndex()+this.tickSpacing,this.tickSpacing)}toPrevInitializableTickIndex(){return sS.fromTickIndex(this.toTickIndex()-this.tickSpacing,this.tickSpacing)}}class uS{constructor(e,t,n){if(!e[0]||!e[0].data)throw new Error("TickArray index 0 must be initialized");this.sequence=[];for(const t of e){if(!t||!t.data)break;this.sequence.push({address:t.address,data:t.data})}this.tickArrays=e,this.tickSpacing=t,this.aToB=n,this.touchedArrays=[...Array(this.sequence.length).fill(!1)],this.startArrayIndex=sS.fromTickIndex(this.sequence[0].data.startTickIndex,this.tickSpacing).arrayIndex}isValidTickArray0(e){const t=this.aToB?0:this.tickSpacing,n=this.sequence[0].data;return this.checkIfIndexIsInTickArrayRange(n.startTickIndex,e+t)}getNumOfTouchedArrays(){return this.touchedArrays.filter((e=>!!e)).length}getTouchedArrays(e){let t=this.touchedArrays.reduce(((e,t,n)=>(t&&e.push(this.sequence[n].address),e)),[]);if(0===t.length)return[];const n=e-t.length;return n>0&&(t=t.concat(Array(n).fill(t[t.length-1]))),t}getTick(e){const t=sS.fromTickIndex(e,this.tickSpacing);if(!this.isArrayIndexInBounds(t,this.aToB))throw new Error("Provided tick index is out of bounds for this sequence.");const n=this.getLocalArrayIndex(t.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,e))throw new Error(`TickArray at index ${n} is unexpected for this sequence.`);return r.ticks[t.offsetIndex]}findNextInitializedTickIndex(e){const t=this.aToB?e:e+this.tickSpacing;let n=sS.fromTickIndex(t,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 e=this.getTick(n.toTickIndex());if(e.initialized)return{nextIndex:n.toTickIndex(),nextTickData:e};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(e,t){return t?this.startArrayIndex-e:e-this.startArrayIndex}isArrayIndexInBounds(e,t){const n=this.getLocalArrayIndex(e.arrayIndex,t),r=this.sequence.length;return n>=0&&n=e&&t{try{const n=await UE({blockchain:"solana",address:e.pubkey.toString(),api:nS,cache:10}),s=n.tokenMintA.toString()===t,u=await aS({pool:e.pubkey,freshWhirlpoolData:n,aToB:s}),c=new uS(u,n.tickSpacing,s),l=new up(s?"4295048016":Ox),d=!(!r&&!i);return{price:(({tokenAmount:e,aToB:t,freshWhirlpoolData:n,tickSequence:r,sqrtPriceLimit:i,amountSpecifiedIsInput:o})=>{let a=e,s=Ux,u=n.sqrtPrice,c=n.liquidity,l=n.tickCurrentIndex,d=Ux;const h=n.feeRate,p=n.protocolFeeRate;let f=new Fx(0),y=t?n.feeGrowthGlobalA:n.feeGrowthGlobalB;for(;a.gt(Ux)&&!i.eq(u);){let{nextIndex:e}=r.findNextInitializedTickIndex(l),{nextTickPrice:n,nextSqrtPriceLimit:m}=Hx(e,i,t);const g=Kx(a,h,c,u,m,o,t);d=d.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:b}=eS(g.feeAmount,p,c,f,y);if(f=v,y=b,g.nextPrice.eq(n)){const n=r.getTick(e);n.initialized&&(c=$x(n.liquidityNet,c,t)),l=t?e-1:e}else l=_x.sqrtPriceX64ToTickIndex(g.nextPrice);u=g.nextPrice}return s})({tokenAmount:new up((r||i||o||a).toString()),aToB:s,freshWhirlpoolData:n,tickSequence:c,sqrtPriceLimit:l,amountSpecifiedIsInput:d}).toString(),tickArrays:u,aToB:s,sqrtPriceLimit:l}}catch(e){return{price:void 0,tickArrays:void 0,aToB:void 0,sqrtPriceLimit:void 0}}};let lS=async(e,t)=>await UE("solana://whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc/getProgramAccounts",{params:{filters:[{dataSize:nS.span},{memcmp:{offset:8,bytes:"2LecshUwdy9xi7meFgHtFJQNSKk4KdTrcpvaB56dP2NQ"}},{memcmp:{offset:101,bytes:e}},{memcmp:{offset:181,bytes:t}}]},api:nS,cache:86400,cacheKey:["whirlpool",e.toString(),t.toString()].join("-")}),dS=async({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{try{let a=await lS(e,t);return 0===a.length&&(a=await lS(t,e)),a=a.filter((e=>e.data.liquidity.gt(1))),a=(await Promise.all(a.map((async a=>{const{price:s,tickArrays:u,sqrtPriceLimit:c,aToB:l}=await cS({account:a,tokenIn:e,tokenOut:t,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(e){return[]}},hS=async({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o})=>{const a=await dS({tokenIn:e,tokenOut:t,amountIn:n,amountInMax:r,amountOut:i,amountOutMin:o});if(!a||0===a.length)return;let s;return s=n||r?(e=>e.reduce(((e,t)=>Zf.from(t.price).gt(Zf.from(e.price))?t:e)))(a):(e=>e.reduce(((e,t)=>Zf.from(t.price).lt(Zf.from(e.price))?t:e)))(a),s};function pS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const fS=Jp.solana;let yS=({path:e})=>{if(!e)return;let t=e.map(((t,n)=>t===fS.currency.address&&e[n+1]!=fS.wrapped.address&&e[n-1]!=fS.wrapped.address?fS.wrapped.address:t));return t[0]==fS.currency.address&&t[1]==fS.wrapped.address?t.splice(0,1):t[t.length-1]==fS.currency.address&&t[t.length-2]==fS.wrapped.address&&t.splice(t.length-1,1),t},mS=async({path:e,amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i})=>1!=e.length&&(e=yS({path:e}),(await dS({tokenIn:e[0],tokenOut:e[1],amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i})).length>0),gS=async({path:e,amountIn:t,amountInMax:n})=>{let r=[Zf.from(t||n)];if(r.push(Zf.from((await hS({tokenIn:e[0],tokenOut:e[1],amountIn:t,amountInMax:n})).price)),3===e.length&&r.push(Zf.from((await hS({tokenIn:e[1],tokenOut:e[2],amountIn:t?r[1]:void 0,amountInMax:n?r[1]:void 0})).price)),r.length==e.length)return r},vS=async({path:e,amountOut:t,amountOutMin:n})=>{e=e.slice().reverse();let r=[Zf.from(t||n)];if(r.push(Zf.from((await hS({tokenIn:e[1],tokenOut:e[0],amountOut:t,amountOutMin:n})).price)),3===e.length&&r.push(Zf.from((await hS({tokenIn:e[2],tokenOut:e[1],amountOut:t?r[1]:void 0,amountOutMin:n?r[1]:void 0})).price)),r.length==e.length)return r.slice().reverse()};const bS=Jp.solana,wS=new up("14449647541112719096"),MS=new up("16635068063392030915"),AS=async({instructions:e,owner:t,token:n,account:r})=>{let i;try{i=!!await UE({blockchain:"solana",address:r.toString()})}catch(e){}i||e.push(await xk.solana.createAssociatedTokenAccountInstruction({token:n,owner:t,payer:t}))},ES=async({account:e,poolOne:t,tickArraysOne:n,tokenAccountOneA:r,tokenVaultOneA:i,tokenAccountOneB:o,tokenVaultOneB:a,poolTwo:s,tickArraysTwo:u,tokenAccountTwoA:c,tokenVaultTwoA:l,tokenAccountTwoB:d,tokenVaultTwoB:h})=>{let p=!1;const f=n.map(((e,t)=>!1!==p?n[p]:e.data?e:(p=t-1,n[t-1])));let y=!1;const m=u.map(((e,t)=>!1!==y?u[y]:e.data?e:(y=t-1,u[t-1])));return[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new iu(e),isWritable:!1,isSigner:!0},{pubkey:new iu(t.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(s.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(o.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(a.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(c.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(l.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(d.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(h.toString()),isWritable:!0,isSigner:!1},{pubkey:f[0].address,isWritable:!0,isSigner:!1},{pubkey:f[1].address,isWritable:!0,isSigner:!1},{pubkey:f[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 iu.findProgramAddress([sp.from("oracle"),new iu(t.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1},{pubkey:(await iu.findProgramAddress([sp.from("oracle"),new iu(s.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},NS=({amount:e,otherAmountThreshold:t,amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a})=>{let s,u;return s=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]),u=sp.alloc(s.span),s.encode({anchorDiscriminator:MS,amount:new up(e.toString()),otherAmountThreshold:new up(t.toString()),amountSpecifiedIsInput:n,aToBOne:r,aToBTwo:i,sqrtPriceLimitOne:o,sqrtPriceLimitTwo:a},u),u},TS=async({account:e,pool:t,tokenAccountA:n,tokenVaultA:r,tokenAccountB:i,tokenVaultB:o,tickArrays:a})=>{let s=!1;const u=a.map(((e,t)=>!1!==s?a[s]:e.data?e:(s=t-1,a[t-1])));return[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isWritable:!1,isSigner:!1},{pubkey:new iu(e),isWritable:!1,isSigner:!0},{pubkey:new iu(t.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(n.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(r.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(i.toString()),isWritable:!0,isSigner:!1},{pubkey:new iu(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 iu.findProgramAddress([sp.from("oracle"),new iu(t.toString()).toBuffer()],new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc")))[0],isWritable:!1,isSigner:!1}]},IS=({amount:e,otherAmountThreshold:t,sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i})=>{let o,a;return o=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]),a=sp.alloc(o.span),o.encode({anchorDiscriminator:wS,amount:new up(e.toString()),otherAmountThreshold:new up(t.toString()),sqrtPriceLimit:n,amountSpecifiedIsInput:r,aToB:i},a),a};var kS={findPath:async({tokenIn:e,tokenOut:t,amountIn:n,amountOut:r,amountInMax:i,amountOutMin:o})=>{if([e,t].includes(fS.currency.address)&&[e,t].includes(fS.wrapped.address))return{path:void 0,exchangePath:void 0};let a,s,u,c;return await mS({path:[e,t],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?a=[e,t]:e!=fS.wrapped.address&&e!=fS.currency.address&&await mS({path:[e,fS.wrapped.address],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})&&t!=fS.wrapped.address&&t!=fS.currency.address&&await mS({path:[t,fS.wrapped.address],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?a=[e,fS.wrapped.address,t]:!fS.stables.usd.includes(e)&&(s=(await Promise.all(fS.stables.usd.map((async t=>await mS({path:[e,t],amountIn:n,amountInMax:i,amountOut:r,amountOutMin:o})?t:void 0)))).filter(Boolean))&&!fS.stables.usd.includes(t)&&(u=(await Promise.all(fS.stables.usd.map((async e=>await mS({path:[t,e],amountIn:r||o,amountInMax:r||o,amountOut:n||i,amountOutMin:n||i})?e:void 0)))).filter(Boolean))&&(c=s.filter((e=>u.includes(e)))[0])&&(a=[e,c,t]),pS([a,"optionalAccess",e=>e.length])&&a[0]==fS.currency.address?a.splice(1,0,fS.wrapped.address):pS([a,"optionalAccess",e=>e.length])&&a[a.length-1]==fS.currency.address&&a.splice(a.length-1,0,fS.wrapped.address),{path:a,exchangePath:yS({path:a})}},pathExists:mS,getAmounts:async({path:e,tokenIn:t,tokenOut:n,amountOut:r,amountIn:i,amountInMax:o,amountOutMin:a})=>{let s;if(e=yS({path:e}),r){if(s=await vS({path:e,amountOut:r,tokenIn:t,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 gS({path:e,amountIn:i,tokenIn:t,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 vS({path:e,amountOutMin:a,tokenIn:t,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 gS({path:e,amountInMax:o,tokenIn:t,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:e,amountIn:t,amountInMax:n,amountOut:r,amountOutMin:i,amounts:o,amountInInput:a,amountOutInput:s,amountInMaxInput:u,amountOutMinInput:c,account:l})=>{let d={blockchain:"solana"},h=[];const p=yS({path:e});if(p.length>3)throw"Orca can only handle fixed paths with a max length of 3 (2 pools)!";const f=p[0],y=3==p.length?p[1]:void 0,m=p[p.length-1];let g;2==p.length?g=[await hS({tokenIn:f,tokenOut:m,amountIn:a||u,amountOut:s||c})]:a||u?(g=[await hS({tokenIn:f,tokenOut:y,amountIn:a||u})],g.push(await hS({tokenIn:y,tokenOut:m,amountIn:g[0].price}))):(g=[await hS({tokenIn:y,tokenOut:m,amountOut:s||c})],g.unshift(await hS({tokenIn:f,tokenOut:y,amountOut:g[0].price})));let v,b=e[0]===bS.currency.address&&p[0]===bS.wrapped.address,w=e[e.length-1]===bS.currency.address&&p[p.length-1]===bS.wrapped.address;const M=await DE("solana");if(b||w){const e=await M.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span),n=ed.generate();v=n.publicKey.toString();const r=b?new up(t.toString()).add(new up(e)):new up(e);let i=Ju.createAccount({fromPubkey:new iu(l),newAccountPubkey:new iu(v),programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:r});i.signers=[n],h.push(i),h.push(xk.solana.initializeAccountInstruction({account:v,token:bS.wrapped.address,owner:l}))}if(1===g.length){let e=!(!a&&!c),o=e?t:r,s=e?i:n,u=new iu(b?v:await xk.solana.findProgramAddress({owner:l,token:f})),d=new iu(w?v:await xk.solana.findProgramAddress({owner:l,token:m}));w||await AS({instructions:h,owner:l,token:m,account:d}),h.push(new Nu({programId:new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await TS({account:l,pool:g[0].pubkey,tokenAccountA:g[0].aToB?u:d,tokenVaultA:g[0].data.tokenVaultA,tokenAccountB:g[0].aToB?d:u,tokenVaultB:g[0].data.tokenVaultB,tickArrays:g[0].tickArrays}),data:IS({amount:o,otherAmountThreshold:s,sqrtPriceLimit:g[0].sqrtPriceLimit,amountSpecifiedIsInput:e,aToB:g[0].aToB})}))}else if(2===g.length){let e=!(!a&&!c),o=e?t:r,s=e?i:n,u=new iu(b?v:await xk.solana.findProgramAddress({owner:l,token:f})),d=p[1],y=new iu(await xk.solana.findProgramAddress({owner:l,token:d}));await AS({instructions:h,owner:l,token:d,account:y});let M=new iu(w?v:await xk.solana.findProgramAddress({owner:l,token:m}));w||await AS({instructions:h,owner:l,token:m,account:M}),h.push(new Nu({programId:new iu("whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc"),keys:await ES({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:NS({amount:o,otherAmountThreshold:s,amountSpecifiedIsInput:e,aToBOne:g[0].aToB,aToBTwo:g[1].aToB,sqrtPriceLimitOne:g[0].sqrtPriceLimit,sqrtPriceLimitTwo:g[1].sqrtPriceLimit})}))}return(b||w)&&h.push(xk.solana.closeAccountInstruction({account:v,owner:l})),d.instructions=h,d},WHIRLPOOL_LAYOUT:nS};const LS={name:"orca",label:"Orca",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI3LjIuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9ImthdG1hbl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjAwIDQ1MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjAwIDQ1MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjRkZEMTVDIiBkPSJNNDg4LjQsMjIyLjljMCwxMDMuOC04NC4xLDE4Ny45LTE4Ny45LDE4Ny45Yy0xMDMuOCwwLTE4Ny45LTg0LjEtMTg3LjktMTg3LjlDMTEyLjYsMTE5LjEsMTk2LjcsMzUsMzAwLjUsMzUKCUM0MDQuMiwzN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noiLz4KPHBhdGggZD0iTTE1MC40LDI2MC4xYzE4LjcsMi40LDI5LjgtMTMuOCw0NC44LTEuNmMxOS45LDM3LjgsMTcuNiwzNi4yLDE3LjYsMzYuMmMtMzQuNCwxNC40LTU3LjktMjEtNjQuMy0zMi4xCglDMTQ3LjgsMjYxLjMsMTQ5LDI1OS45LDE1MC40LDI2MC4xeiIvPgo8cGF0aCBkPSJNMzA2LjksMjM2YzAsMCwxOC43LDE5LjEsOC45LDIyLjFjLTEyLjItNy41LTM0LTEuNy00NC43LDEuOWMtMi42LDAuOS01LjItMS40LTQuMy00LjFjMy42LTEwLDEyLjYtMjguNiwyOS45LTMxCglDMzA2LjksMjIyLjQsMzA2LjksMjM2LDMwNi45LDIzNnoiLz4KPHBhdGggZmlsbD0iI0ZGRkZGRiIgZD0iTTMxOC4zLDE0Mi41Yy0yLjEtMy02LjQtMTEsNi44LTExYzEzLjIsMCwzMy4zLDE0LjksMzcuNCwyMC40Yy0xLjMsMy40LTkuOCw0LjEtMTQsMy44Yy00LjItMC4zLTExLjUtMS0xNy0zLjgKCUMzMjYsMTQ5LjIsMzIwLjUsMTQ1LjUsMzE4LjMsMTQyLjV6Ii8+Cjwvc3ZnPgo=",protocol:"orca",slippage:!0,blockchains:["solana"],solana:{router:{address:"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc",api:kS.WHIRLPOOL_LAYOUT}}};var xS=e=>new Nx(Object.assign(LS,{scope:e,findPath:e=>kS.findPath({...e,exchange:LS}),pathExists:e=>kS.pathExists({...e,exchange:LS}),getAmounts:e=>kS.getAmounts({...e,exchange:LS}),getPrep:e=>{},getTransaction:e=>kS.getTransaction({...e,exchange:LS})}));const SS={name:"pancakeswap",label:"PancakeSwap",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3Ln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Ny44OTZDNTUuMDk4MSAxMDguMTc4IDU5LjY5MDcgMTAzLjExNyA2NS4zNTU4IDEwMy4xMTdDNzEuMDIxIDEwMy4xMTcgNzUuNjEzNSAxMDguMTc4IDc1LjYxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["bsc"],bsc:{router:{address:"0x10ED43C718714eb63d5aA57B78B54704E256024E",api:jx.ROUTER},factory:{address:"0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73",api:jx.FACTORY},pair:{api:jx.PAIR}}};var jS=e=>new Nx(Object.assign(SS,{scope:e,findPath:e=>jx.findPath({...e,exchange:SS}),pathExists:e=>jx.pathExists({...e,exchange:SS}),getAmounts:e=>jx.getAmounts({...e,exchange:SS}),getPrep:e=>jx.getPrep({...e,exchange:SS}),getTransaction:e=>jx.getTransaction({...e,exchange:SS})}));function CS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const DS=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},OS=async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=DS({blockchain:e,exchange:t,path:n})).length>2)throw"PancakeSwap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(t.fees.map((r=>UE({blockchain:Jp[e].name,address:t[e].factory.address,method:"getPool",api:t[e].factory.api,cache:3600,params:[n[0],n[1],r]}).then((t=>({blockchain:e,address:t,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((t=>t.address!=Jp[e].zero)),o=(await Promise.all(o.map((async e=>{try{let n;return n=r?await(async({exchange:e,pool:t,inputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactInput",params:{path:cE(["address","uint24","address"],[t.path[0],t.fee,t.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:t,pool:e,inputAmount:r}):await(async({exchange:e,pool:t,outputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactOutput",params:{path:cE(["address","uint24","address"],[t.path[1],t.fee,t.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:t,pool:e,outputAmount:i}),{...e,amountIn:r||n,amountOut:i||n}}catch(e){}})))).filter(Boolean),r?o.sort(((e,t)=>t.amountOut.gt(e.amountOut)?1:-1))[0]:o.sort(((e,t)=>t.amountIn.lt(e.amountIn)?1:-1))[0]}catch(e){return}};let zS=({blockchain:e,exchange:t,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,_S=async({blockchain:e,exchange:t,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=cE(["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=cE(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await UE({block:o,blockchain:e,address:t[e].quoter.address,api:t[e].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var PS={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await OS({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[e].wrapped.address||r==Jp[e].wrapped.address||(c=[],o||s?(c.push(await OS({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await OS({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await OS({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await OS({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Jp[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await OS({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await OS({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await OS({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await OS({exchange:t,blockchain:e,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 CS([u,"optionalAccess",e=>e.length])&&u[0]==Jp[e].currency.address?u.splice(1,0,Jp[e].wrapped.address):CS([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[e].currency.address&&u.splice(u.length-1,0,Jp[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:DS({blockchain:e,exchange:t,path:u})}},pathExists:async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await OS({blockchain:e,exchange:t,path:n,amountIn:r||o,amountOut:i||a})}catch(e){return!1}},getAmounts:async({blockchain:e,exchange:t,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:e,exchange:t,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 zS({blockchain:e,exchange:t,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:e,exchange:t,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 zS({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i,tokenOut:o})=>{if(n===Jp[t].currency.address)return;let a;a=o===Jp[t].currency.address?e[t].smartRouter.address:e[t].router.address;if((await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,a]})).lt(r)){return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[a,Jp[t].maxInt]}}}},getTransaction:async({blockchain:e,exchange:t,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:d,account:h,inputTokenPushed:p})=>{const f={blockchain:e,from:h},y=Math.floor(Date.now()/1e3)+21600,m=DS({blockchain:e,exchange:t,path:r});if(r[r.length-1]===Jp[e].currency.address){f.to=t[e].smartRouter.address,f.api=t[e].smartRouter.api,f.method="multicall";const r=new Bg(t[e].smartRouter.api);if(f.params={data:[]},2===m.length)u||d?f.params.data.push(r.encodeFunctionData("exactInputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:t[e].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}])):(c||l)&&f.params.data.push(r.encodeFunctionData("exactOutputSingle",[{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:t[e].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}]));else{const h=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||d?f.params.data.push(r.encodeFunctionData("exactInput",[{path:h,recipient:t[e].smartRouter.address,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}])):(c||l)&&f.params.data.push(r.encodeFunctionData("exactOutput",[{path:h,recipient:t[e].smartRouter.address,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}]))}f.params.data.push(r.encodeFunctionData("unwrapWETH9",[(s||a).toString(),h]))}else if(f.to=t[e].router.address,f.api=t[e].router.api,r[0]===Jp[e].currency.address&&(f.value=(i||o).toString()),2===m.length)u||d?(f.method="exactInputSingle",f.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:h,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}}):(c||l)&&(f.method="exactOutputSingle",f.params={params:{tokenIn:m[0],tokenOut:m[1],fee:n[0].fee,recipient:h,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString(),sqrtPriceLimitX96:Jp[e].zero}});else{const e=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]]);u||d?(f.method="exactInput",f.params={params:{path:e,recipient:h,deadline:y,amountIn:(o||i).toString(),amountOutMinimum:(s||a).toString()}}):(c||l)&&(f.method="exactOutput",f.params={params:{path:e,recipient:h,deadline:y,amountInMaximum:(o||i).toString(),amountOut:(s||a).toString()}})}return f},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 RS={name:"pancakeswap_v3",label:"PancakeSwap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTk4IiBoZWlnaHQ9IjE5OSIgdmlld0JveD0iMCAwIDE5OCAxOTkiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTguNTUyIDE5OC42MDdDNjkuMDYx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YxMzUgMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPHBhdGggZD0iTTE0Mi4yODggMTE3Ljg5NkMxNDIuMjg4IDEyNy42MTQgMTM3LjY5NiAxMzIuNjc1IDEzMi4wMzEgMTMyLjY3NUMxMjYuMzY1IDEzMi42NzUgMTIxLjc3MyAxMjcuNjE0IDEyMS43NzMgMTE3Ljg5NkMxMjEuNzczIDEwOC4xNzggMTI2LjM2NSAxMDMuMTE3IDEzMi4wMzEgMTAzLjExN0MxMzcuNjk2IDEwMy4xMTcgMTQyLjI4OCAxMDguMTc4IDE0Mi4yODggMTE3Ljg5NloiIGZpbGw9IiM2MzMwMDEiLz4KPC9zdmc+Cg==",protocol:"pancakeswap_v3",slippage:!0,fees:[100,500,2500,1e4],blockchains:["bsc"],bsc:{router:{address:"0x1b81D678ffb9C0263b24A97847620C99d213eB14",api:PS.ROUTER},smartRouter:{address:"0x13f4EA83D0bd40E75C8222255bc855a974568Dd4",api:PS.SMART_ROUTER},factory:{address:"0x0BFbCF9fa4f9C56B0F40a671Ad40E0805A091865",api:PS.FACTORY},pair:{api:PS.POOL},quoter:{address:"0xB048Bbc1Ee6b733FFfCFb9e9CeF7375518e25997",api:PS.QUOTER}}};var BS=e=>new Nx(Object.assign(RS,{scope:e,findPath:e=>PS.findPath({...e,exchange:RS}),pathExists:e=>PS.pathExists({...e,exchange:RS}),getAmounts:e=>PS.getAmounts({...e,exchange:RS}),getPrep:e=>PS.getPrep({...e,exchange:RS}),getTransaction:e=>PS.getTransaction({...e,exchange:RS})}));const US={name:"quickswap",label:"QuickSwap",logo:"data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNzAyLjQ1IDcwMi40NyI+P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LDUuMmMtNS44NS4zMy0xMS43MS44My0xNy41Mi40Ni00LjUxLS4yOS05LjE0LDAtMTMuNTYtMS4zNyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTIzLjc4IC0yMy43NykiIGZpbGw9IiMwZTFmNjYiLz48L2c+PC9zdmc+",protocol:"uniswap_v2",slippage:!0,blockchains:["polygon"],polygon:{router:{address:"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff",api:jx.ROUTER},factory:{address:"0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32",api:jx.FACTORY},pair:{api:jx.PAIR}}};var WS=e=>new Nx(Object.assign(US,{scope:e,findPath:e=>jx.findPath({...e,exchange:US}),pathExists:e=>jx.pathExists({...e,exchange:US}),getAmounts:e=>jx.getAmounts({...e,exchange:US}),getPrep:e=>jx.getPrep({...e,exchange:US}),getTransaction:e=>jx.getTransaction({...e,exchange:US})}));const QS={name:"spookyswap",label:"SpookySwap",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgNjQxIDY0MCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNjQxIDY0MDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8Zz4KCTxwYXRoIGZpbGw9IiMxMjExMjIiIGQ9Ik0zNC4yLDMyMGMwLDE1OC41LDEyOC41LDI4Ni4zLDI4Ni4zLDI4Ni4zYzE1OC41LDAsMjg2LjMtMTI4LjUsMjg2LjMtMjg2LjNjMC0xNTguNS0xMjguNS0yODYuMy0yODYuMy0yODYuMwoJCUMxNjIuNyw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yNi44LDEzMi44LDEzMy4zLDEzMS41TDEzMy4zLDEzMS41eiIvPgo8L2c+Cjwvc3ZnPgo=",protocol:"uniswap_v2",slippage:!0,blockchains:["fantom"],fantom:{router:{address:"0xF491e7B69E4244ad4002BC14e878a34207E38c29",api:jx.ROUTER},factory:{address:"0x152eE697f2E276fA89E96742e9bB9aB1F2E61bE3",api:jx.FACTORY},pair:{api:jx.PAIR}}};var YS=e=>new Nx(Object.assign(QS,{scope:e,findPath:e=>jx.findPath({...e,exchange:QS}),pathExists:e=>jx.pathExists({...e,exchange:QS}),getAmounts:e=>jx.getAmounts({...e,exchange:QS}),getPrep:e=>jx.getPrep({...e,exchange:QS}),getTransaction:e=>jx.getTransaction({...e,exchange:QS})}));function FS(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const VS=({blockchain:e,path:t})=>{if(!t)return;let n=t.map(((n,r)=>n===Jp[e].currency.address&&t[r+1]!=Jp[e].wrapped.address&&t[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:n));return n[0]==Jp[e].currency.address&&n[1]==Jp[e].wrapped.address?n.splice(0,1):n[n.length-1]==Jp[e].currency.address&&n[n.length-2]==Jp[e].wrapped.address&&n.splice(n.length-1,1),n},HS=async({exchange:e,blockchain:t,path:n,amountIn:r,amountOut:i,block:o})=>{let a;if(n=VS({blockchain:t,path:n}),a=r?await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountIn",api:e[t].quoter.api,cache:5,block:o,params:{route:n,amountIn:r}}).catch((()=>{})):await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountOut",api:e[t].quoter.api,cache:5,block:o,params:{route:n,amountOut:i}}).catch((()=>{})),a&&!a.virtualAmountsWithoutSlippage.some((e=>"0"===e.toString())))return a};let GS=async({exchange:e,blockchain:t,path:n,pools:r,amountIn:i})=>{let o=await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountIn",api:e[t].quoter.api,cache:5,params:{route:VS({blockchain:t,path:n}),amountIn:i}}).catch((()=>{}));if(o)return o.virtualAmountsWithoutSlippage[o.virtualAmountsWithoutSlippage.length-1]},qS=async({exchange:e,blockchain:t,path:n,pools:r,amountOut:i,block:o})=>{let a=await UE({blockchain:Jp[t].name,address:e[t].quoter.address,method:"findBestPathFromAmountOut",api:e[t].quoter.api,cache:5,block:o,params:{route:VS({blockchain:t,path:n}),amountOut:i}}).catch((()=>{}));if(a)return a.virtualAmountsWithoutSlippage[0]};var ZS={findPath:async({exchange:e,blockchain:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[t].currency.address)&&[n,r].includes(Jp[t].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await HS({exchange:e,blockchain:t,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[t].wrapped.address||r==Jp[t].wrapped.address||(c=[],o||s?(c.push(await HS({exchange:e,blockchain:t,path:[Jp[t].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await HS({exchange:e,blockchain:t,path:[n,Jp[t].wrapped.address],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await HS({exchange:e,blockchain:t,path:[n,Jp[t].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await HS({exchange:e,blockchain:t,path:[Jp[t].wrapped.address,r],amountIn:c[0].virtualAmountsWithoutSlippage[1]}))),2===c.filter(Boolean).length&&(u=[n,Jp[t].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[t].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await HS({exchange:e,blockchain:t,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await HS({exchange:e,blockchain:t,path:[n,u],amountOut:c[0].virtualAmountsWithoutSlippage[0]}))):(c.push(await HS({exchange:e,blockchain:t,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await HS({exchange:e,blockchain:t,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 FS([u,"optionalAccess",e=>e.length])&&u[0]==Jp[t].currency.address?u.splice(1,0,Jp[t].wrapped.address):FS([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[t].currency.address&&u.splice(u.length-1,0,Jp[t].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:VS({blockchain:t,path:u})}},pathExists:async({exchange:e,blockchain:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>!!await HS({exchange:e,blockchain:t,path:n,amountIn:r||o,amountOut:i||a}),getAmounts:async({exchange:e,blockchain:t,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:e,blockchain:t,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 GS({exchange:e,blockchain:t,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:e,blockchain:t,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 GS({exchange:e,blockchain:t,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:e,blockchain:t,pools:n,path:r,amountIn:i,amountInMax:o,amountOut:a,amountOutMin:s,amountInInput:u,amountOutInput:c,amountInMaxInput:l,amountOutMinInput:d,account:h})=>{const p={blockchain:t,from:h,to:e[t].router.address,api:e[t].router.api},f=Math.round(Date.now()/1e3)+86400,y=[n.map((e=>e.binSteps[0])),n.map((e=>e.versions[0])),VS({blockchain:t,path:r})];return r[0]===Jp[t].currency.address?l?(p.method="swapNATIVEForExactTokens",p.params={amountOut:a,path:y,to:h,deadline:f},p.value=o):(p.method="swapExactNATIVEForTokens",p.params={amountOutMin:s||a,path:y,to:h,deadline:f},p.value=i):r[r.length-1]===Jp[t].currency.address?l?(p.method="swapTokensForExactNATIVE",p.params={amountNATIVEOut:a,amountInMax:o,path:y,to:h,deadline:f}):(p.method="swapExactTokensForNATIVE",p.params={amountIn:i,amountOutMinNATIVE:s||a,path:y,to:h,deadline:f}):l?(p.method="swapTokensForExactTokens",p.params={amountOut:a,amountInMax:o,path:y,to:h,deadline:f}):(p.method="swapExactTokensForTokens",p.params={amountIn:i,amountOutMin:s||a,path:y,to:h,deadline:f}),p},getPrep:async({exchange:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;const o=await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].router.address]});if(o.gte(r))return;return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].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 JS={name:"trader_joe_v2_1",label:"Trader Joe v2.1",logo:"data:image/png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AAHnRFWHRpY2M6Y29weXJpZ2h0AEdvb2dsZSBJbmMuIDIwMTasCzM4AAAAFHRFWHRpY2M6ZGVzY3JpcHRpb24Ac1JHQrqQcwcAAAAASUVORK5CYII=",protocol:"trader_joe_v2_1",slippage:!0,blockchains:["avalanche"],avalanche:{router:{address:"0xb4315e873dBcf96Ffd0acd8EA43f689D8c20fB30",api:ZS.ROUTER},factory:{address:"0x8e42f2F4101563bF679975178e880FD87d3eFd4e",api:ZS.FACTORY},pair:{api:ZS.PAIR},quoter:{address:"0x64b57F4249aA99a812212cee7DAEFEDC40B203cD",api:ZS.QUOTER}}};var XS=e=>new Nx(Object.assign(JS,{scope:e,findPath:e=>ZS.findPath({...e,exchange:JS}),pathExists:e=>ZS.pathExists({...e,exchange:JS}),getAmounts:e=>ZS.getAmounts({...e,exchange:JS}),getPrep:e=>ZS.getPrep({...e,exchange:JS}),getTransaction:e=>ZS.getTransaction({...e,exchange:JS})}));const KS={name:"uniswap_v2",label:"Uniswap v2",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQxIiBoZWlnaHQ9IjY0MCIgdmlld0JveD0iMCAwIDY0MSA2NDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0yMjQuNTM0IDEyMy4yMjZDMjE4LjY5MiAxMjIuMzIgMjE4LjQ0NSAxMjIuMjEzIDIyMS4xOTUgMTIxLjc5MUMyMjYuNDY0IDEyMC45OCAyMzguOTA1IDEyMi4wODUgMjQ3LjQ3OSAxMjQuMTIzQzI2Ny40OTQgMTI4Ljg4MSAyODUuNzA3IDE0MS4wNjkgMzA1LjE0OCAxNjIuNzE0TDMxMC4zMTMgMTY4LjQ2NUwzMTcuNzAxIDE2Ny4yNzdDMzQ4LjgyOCAxNjIuMjc1IDM4MC40OTMgMTY2LjI1IDQwNi45NzggMTc4LjQ4NUM0MTQuMjY0IDE4MS44NTEgNDI1Lj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g0OSAxMzIuNTc2IDQxNC4yMDIgMTM1LjQxMiA0MDkuMThaIiBmaWxsPSIjRkYwMDdBIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjQ4LjU1MiAyNjIuMjQ0QzI0MS44NjIgMjY0LjI5OSAyMzUuMzU4IDI3MS4zOSAyMzMuMzQ0IDI3OC44MjZDMjMyLjExNiAyODMuMzYyIDIzMi44MTMgMjkxLjMxOSAyMzQuNjUzIDI5My43NzZDMjM3LjYyNSAyOTcuNzQ1IDI0MC40OTkgMjk4Ljc5MSAyNDguMjgyIDI5OC43MzZDMjYzLjUxOCAyOTguNjMgMjc2Ljc2NCAyOTIuMDk1IDI3OC4zMDQgMjgzLjkyNUMyNzkuNTY3IDI3Ny4yMjkgMjczLjc0OSAyNjcuOTQ4IDI2NS43MzYgMjYzLjg3NEMyNjEuNjAxIDI2MS43NzIgMjUyLjgwNyAyNjAuOTM4IDI0OC41NTIgMjYyLjI0NFpNMjY2LjM2NCAyNzYuMTcyQzI2OC43MTQgMjcyLjgzNCAyNjcuNjg2IDI2OS4yMjUgMjYzLjY5IDI2Ni43ODVDMjU2LjA4IDI2Mi4xMzggMjQ0LjU3MSAyNjUuOTgzIDI0NC41NzEgMjczLjE3M0MyNDQuNTcxIDI3Ni43NTIgMjUwLjU3MiAyODAuNjU2IDI1Ni4wNzQgMjgwLjY1NkMyNTkuNzM1IDI4MC42NTYgMjY0Ljc0NiAyNzguNDczIDI2Ni4zNjQgMjc2LjE3MloiIGZpbGw9IiNGRjAwN0EiLz4KPC9zdmc+Cg==",protocol:"uniswap_v2",slippage:!0,blockchains:["ethereum"],ethereum:{router:{address:"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D",api:jx.ROUTER},factory:{address:"0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f",api:jx.FACTORY},pair:{api:jx.PAIR}}};var $S=e=>new Nx(Object.assign(KS,{scope:e,findPath:e=>jx.findPath({...e,exchange:KS}),pathExists:e=>jx.pathExists({...e,exchange:KS}),getAmounts:e=>jx.getAmounts({...e,exchange:KS}),getPrep:e=>jx.getPrep({...e,exchange:KS}),getTransaction:e=>jx.getTransaction({...e,exchange:KS})}));function ej(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const tj="0x0000000000000000000000000000000000000001",nj="0x0000000000000000000000000000000000000002",rj=({blockchain:e,exchange:t,path:n})=>{if(!n)return;let r=n.map(((t,r)=>t===Jp[e].currency.address&&n[r+1]!=Jp[e].wrapped.address&&n[r-1]!=Jp[e].wrapped.address?Jp[e].wrapped.address:t));return r[0]==Jp[e].currency.address&&r[1]==Jp[e].wrapped.address?r.splice(0,1):r[r.length-1]==Jp[e].currency.address&&r[r.length-2]==Jp[e].wrapped.address&&r.splice(r.length-1,1),r},ij=async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,block:o})=>{if((n=rj({blockchain:e,exchange:t,path:n})).length>2)throw"Uniswap V3 can only check paths for up to 2 tokens!";try{let o=(await Promise.all(t.fees.map((r=>UE({blockchain:Jp[e].name,address:t[e].factory.address,method:"getPool",api:t[e].factory.api,cache:3600,params:[n[0],n[1],r]}).then((t=>({blockchain:e,address:t,path:n,fee:r,token0:[...n].sort()[0],token1:[...n].sort()[1]}))).catch((()=>{})))))).filter(Boolean);return o=o.filter((t=>t.address!=Jp[e].zero)),o=(await Promise.all(o.map((async e=>{try{let n;return n=r?await(async({exchange:e,pool:t,inputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactInput",params:{path:cE(["address","uint24","address"],[t.path[0],t.fee,t.path[1]]),amountIn:n},cache:5})).amountOut)({exchange:t,pool:e,inputAmount:r}):await(async({exchange:e,pool:t,outputAmount:n})=>(await UE({blockchain:t.blockchain,address:e[t.blockchain].quoter.address,api:e[t.blockchain].quoter.api,method:"quoteExactOutput",params:{path:cE(["address","uint24","address"],[t.path[1],t.fee,t.path[0]]),amountOut:n},cache:5})).amountIn)({exchange:t,pool:e,outputAmount:i}),{...e,amountIn:r||n,amountOut:i||n}}catch(e){}})))).filter(Boolean),r?o.sort(((e,t)=>t.amountOut.gt(e.amountOut)?1:-1))[0]:o.sort(((e,t)=>t.amountIn.lt(e.amountIn)?1:-1))[0]}catch(e){return}};let oj=({blockchain:e,exchange:t,path:n,pools:r,amountIn:i})=>r[r.length-1].amountOut,aj=async({blockchain:e,exchange:t,path:n,pools:r,amountOut:i,block:o})=>{if(void 0===o)return r[0].amountIn;{let n;2==r.length?n=cE(["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=cE(["address","uint24","address"],[r[0].path[1],r[0].fee,r[0].path[0]]));return(await UE({block:o,blockchain:e,address:t[e].quoter.address,api:t[e].quoter.api,method:"quoteExactOutput",params:{path:n,amountOut:i}})).amountIn}};var sj={findPath:async({blockchain:e,exchange:t,tokenIn:n,tokenOut:r,amountIn:i,amountOut:o,amountInMax:a,amountOutMin:s})=>{if([n,r].includes(Jp[e].currency.address)&&[n,r].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let u,c=[];if(c=[await ij({exchange:t,blockchain:e,path:[n,r],amountIn:i||a,amountOut:o||s})],c.filter(Boolean).length&&(u=[n,r]),u||n==Jp[e].wrapped.address||r==Jp[e].wrapped.address||(c=[],o||s?(c.push(await ij({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await ij({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountOut:c[0].amountIn}))):(c.push(await ij({exchange:t,blockchain:e,path:[n,Jp[e].wrapped.address],amountIn:i||a})),c.filter(Boolean).length&&c.push(await ij({exchange:t,blockchain:e,path:[Jp[e].wrapped.address,r],amountIn:c[0].amountOut}))),2===c.filter(Boolean).length&&(u=[n,Jp[e].wrapped.address,r])),!u){c=[];let l=(await Promise.all(Jp[e].stables.usd.map((async u=>{let c=[];if(o||s?(c.push(await ij({exchange:t,blockchain:e,path:[u,r],amountOut:o||s})),c.filter(Boolean).length&&c.unshift(await ij({exchange:t,blockchain:e,path:[n,u],amountOut:c[0].amountIn}))):(c.push(await ij({exchange:t,blockchain:e,path:[n,u],amountIn:i||a})),c.filter(Boolean).length&&c.push(await ij({exchange:t,blockchain:e,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 ej([u,"optionalAccess",e=>e.length])&&u[0]==Jp[e].currency.address?u.splice(1,0,Jp[e].wrapped.address):ej([u,"optionalAccess",e=>e.length])&&u[u.length-1]==Jp[e].currency.address&&u.splice(u.length-1,0,Jp[e].wrapped.address),u||(c=[]),{path:u,pools:c,exchangePath:rj({blockchain:e,exchange:t,path:u})}},pathExists:async({blockchain:e,exchange:t,path:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>{try{return!!await ij({blockchain:e,exchange:t,path:n,amountIn:r||o,amountOut:i||a})}catch(e){return!1}},getAmounts:async({blockchain:e,exchange:t,path:n,pools:r,block:i,tokenIn:o,tokenOut:a,amountOut:s,amountIn:u,amountInMax:c,amountOutMin:l})=>{if(s){if(null==(u=await aj({blockchain:e,exchange:t,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 oj({blockchain:e,exchange:t,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 aj({blockchain:e,exchange:t,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 oj({blockchain:e,exchange:t,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:e,blockchain:t,tokenIn:n,amountIn:r,account:i})=>{if(n===Jp[t].currency.address)return;if((await UE({blockchain:t,address:n,method:"allowance",api:xk[t][20],params:[i,e[t].permit.address]})).lt(r)){return{transaction:{blockchain:t,from:i,to:n,api:xk[t][20],method:"approve",params:[e[t].permit.address,Jp[t].maxInt]}}}{const o=await UE({blockchain:t,address:e[t].permit.address,method:"allowance",api:e[t].permit.api,params:[i,n,e[t].router.address]});if(o.amount.lt(r)||o.expiration-1800{let y,m=[],g=[],v="0";if(p){const e=Df(p.signature).length;let t;65!==e&&64!==e||(t=function(e){return Rf(Of([(e=Ff(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}(Ff(p.signature))),m.push("0a"),g.push(Qm.encode(["((address token,uint160 amount,uint48 expiration,uint48 nonce) details,address spender,uint256 sigDeadline)","bytes"],[p,t]))}r[0]===Jp[e].currency.address&&(m.push("0b"),g.push(Qm.encode(["address","uint256"],[nj,(i||o).toString()])),v=(i||o).toString()),1===n.length?y=cE(["address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1]]):2===n.length&&(y=cE(["address","uint24","address","uint24","address"],[n[0].path[0],n[0].fee,n[0].path[1],n[1].fee,n[1].path[1]])),d||u?(m.push("00"),g.push(Qm.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Jp[e].currency.address?nj:tj,(i||o).toString(),(a||s).toString(),y,r[0]!==Jp[e].currency.address&&!f]))):(m.push("01"),g.push(Qm.encode(["address","uint256","uint256","bytes","bool"],[r[r.length-1]===Jp[e].currency.address?nj:tj,(a||s).toString(),(i||o).toString(),y,r[0]!==Jp[e].currency.address&&!f]))),r[r.length-1]===Jp[e].currency.address&&(m.push("0c"),g.push(Qm.encode(["address","uint256"],[tj,(a||s).toString()])));return{blockchain:e,from:h,to:t[e].router.address,api:t[e].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 uj={name:"uniswap_v3",label:"Uniswap v3",logo:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGRhdGEtdGVzdGlkPSJ1bmlzd2FwLWxvZ28iIGNsYXNzPSJyZ3c2ZXo0NHAgcmd3NmV6NGVqIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAuMzUyNiAxOS45MjQyQzIwLjI5MjggMjAuMTU0OSAyMC4xODg1IDIwLjM3MTUgMjAuMDQ1NSAyMC41NjE4QzE5Ljc3OTMgMjAuOTA4OCAxOS40MjcgMjEuMTc5NCAxOS4wMjM5IDIxLjM0NjZDMTguNjYxNCAyMS41MDM1IDE4LjI3NzQgMjEuNjA1IDE3Ljg4NDkgMjEuNjQ3NUMxNy44MDQyIDIxLjY1NzggMTcuNzIwNiAyMS42NjQxIDE3LjYzOTUgMjEuNjcwM0wxNy42MjYzIDIxLjY3MTNDMTcuMzc3NyAyMS42ODA4IDE3LjEzODcgMjEuNzcgMTYuOTQ0MiAyMS45MjU4QzE2Ljc0OTcgMjIuMDgxNyAxNi42MSAyMi4yOTYgMTYuNTQ1NSAyMi41MzczQzE2LjUxNiAyMi42NTc0IDE2LjQ5NCAyMi43NzkyIDE2LjQ3OTggMjIuOTAyMUMxNi40NTcyIDIzLjA4NzQgMTYuNDQ1NiAyMy4yNzcxIDE2LjQzMyAyMy40ODIzQzE2LjQyNCAyMy42Mjk1IDE2LjQxNDQgMjMuNzg0OCAxNi40IDIzLjk1MjFDMTYuMzE1NiAyNC42MzM3IDE2LjExOTMgMjUuMjk2NSAxNS44MTkyIDI1LjkxMzZDMTUuNzU3OSAyNi4wNDMzIDE1L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ippage:!0,fees:[100,500,3e3,1e4],blockchains:["ethereum","bsc","polygon","optimism","arbitrum"],ethereum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},bsc:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x78D78E420Da98ad378D7799bE8f4AF69033EB077",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},polygon:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},optimism:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},arbitrum:{router:{address:"0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",api:sj.ROUTER},factory:{address:"0x1F98431c8aD98523631AE4a59f267346ea31F984",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x61fFE014bA17989E743c5F6cB21bF9697530B21e",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}},base:{router:{address:"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC",api:sj.ROUTER},factory:{address:"0x33128a8fC17869897dcE68Ed026d694621f6FDfD",api:sj.FACTORY},pool:{api:sj.POOL},quoter:{address:"0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",api:sj.QUOTER},permit:{address:"0x000000000022d473030f116ddee9f6b43ac78ba3",api:sj.PERMIT2}}};var cj=e=>new Nx(Object.assign(uj,{scope:e,findPath:e=>sj.findPath({...e,exchange:uj}),pathExists:e=>sj.pathExists({...e,exchange:uj}),getAmounts:e=>sj.getAmounts({...e,exchange:uj}),getPrep:e=>sj.getPrep({...e,exchange:uj}),getTransaction:e=>sj.getTransaction({...e,exchange:uj})}));var lj={findPath:async({blockchain:e,tokenIn:t,tokenOut:n})=>{if(![t,n].includes(Jp[e].currency.address)||![t,n].includes(Jp[e].wrapped.address))return{path:void 0,exchangePath:void 0};let r=[t,n];return{path:r,exchangePath:r}},pathExists:async({blockchain:e,path:t})=>!(!t||2!==t.length)&&(t.includes(Jp[e].currency.address)&&t.includes(Jp[e].wrapped.address)),getAmounts:async({path:e,block:t,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:e,blockchain:t,path:n,amountIn:r,amountInMax:i,amountOut:o,amountOutMin:a,amountInInput:s,amountOutInput:u,amountInMaxInput:c,amountOutMinInput:l,account:d})=>{let h={blockchain:t,from:d,to:e[t].router.address,api:e[t].router.api};return n[0]===Jp[t].currency.address&&n[1]===Jp[t].wrapped.address?(h.method="deposit",h.value=r.toString(),h):n[0]===Jp[t].wrapped.address&&n[1]===Jp[t].currency.address?(h.method="withdraw",h.value=0,h.params={wad:r},h):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 dj={name:"wavax",label:"Wrapped Avax",logo:Jp.avalanche.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["avalanche"],avalanche:{router:{address:Jp.avalanche.wrapped.address,api:lj.WETH}}};var hj=e=>new Nx(Object.assign(dj,{scope:e,findPath:e=>lj.findPath({...e,exchange:dj}),pathExists:e=>lj.pathExists({...e,exchange:dj}),getAmounts:e=>lj.getAmounts({...e,exchange:dj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:dj})}));const pj={name:"wbnb",label:"Wrapped BNB",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAxOTIgMTkyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAxOTIgMTkyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0YwQjkwQjt9Cjwvc3R5bGU+CjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik01NCw0MS4xbDQyLTI0LjJsNDIsMjQuMmwtMTUuNCw4LjlMOTYsMzQuOUw2OS40LDUwTDU0LDQxLjF6IE0xMzgsNzEuN2wtMTUuNC04LjlMOTYsNzhMNjkuNCw2Mi43bC0xNS40LDl2MTgKCUw4MC42LDEwNXYzMC41bDE1LjQsOWwxNS40LTlWMTA1TDEzOCw4OS43VjcxLjd6IE0xMzgsMTIwLjN2LTE4bC0xNS40LDguOXYxOEMxMjIuNiwxMjkuMSwxMzgsMTIwLjMsMTM4LDEyMC4zeiBNMTQ4LjksMTI2LjQKCWwtMjYuNiwxNS4zdjE4bDQyLTI0LjJWODdsLTE1LjQsOUMxNDguOSw5NiwxNDguOSwxMjYuNCwxNDguOSwxMjYuNHogTTEzMy41LDU2LjRsMTUuNCw5djE4bDE1LjQtOXYtMThsLTE1LjQtOUwxMzMuNSw1Ni40CglMMTMzLjUsNTYuNHogTTgwLjYsMTQ4LjN2MThsMTUuNCw5bDE1LjQtOXYtMThMOTYsMTU3LjFMODAuNiwxNDguM3ogTTU0LDEyMC4zbDE1LjQsOXYtMTguMUw1NCwxMDIuM0w1NCwxMjAuM0w1NCwxMjAuM3oKCSBNODAuNiw1Ni40bDE1LjQsOWwxNS40LTlMOTYsNDcuNUM5Niw0Ny40LDgwLjYsNTYuNCw4MC42LDU2LjRMODAuNiw1Ni40eiBNNDMuMSw2NS40bDE1LjQtOWwtMTUuNC05bC0xNS40LDl2MThsMTUuNCw5TDQzLjEsNjUuNAoJTDQzLjEsNjUuNHogTTQzLjEsOTUuOUwyNy43LDg3djQ4LjVsNDIsMjQuMnYtMThsLTI2LjYtMTUuM1Y5NS45TDQzLjEsOTUuOXoiLz4KPC9zdmc+Cg==",slippage:!1,blockchains:["bsc"],bsc:{router:{address:Jp.bsc.wrapped.address,api:lj.WETH}}};var fj=e=>new Nx(Object.assign(pj,{scope:e,findPath:e=>lj.findPath({...e,exchange:pj}),pathExists:e=>lj.pathExists({...e,exchange:pj}),getAmounts:e=>lj.getAmounts({...e,exchange:pj}),getPrep:e=>{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yNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["ethereum"],ethereum:{router:{address:Jp.ethereum.wrapped.address,api:lj.WETH}}};var mj=e=>new Nx(Object.assign(yj,{scope:e,findPath:e=>lj.findPath({...e,exchange:yj}),pathExists:e=>lj.pathExists({...e,exchange:yj}),getAmounts:e=>lj.getAmounts({...e,exchange:yj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:yj})}));const gj={name:"weth_arbitrum",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW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MuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["arbitrum"],arbitrum:{router:{address:Jp.arbitrum.wrapped.address,api:lj.WETH}}};var vj=e=>new Nx(Object.assign(gj,{scope:e,findPath:e=>lj.findPath({...e,exchange:gj}),pathExists:e=>lj.pathExists({...e,exchange:gj}),getAmounts:e=>lj.getAmounts({...e,exchange:gj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:gj})}));const bj={name:"weth_optimism",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjAuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIKCSBpZD0iTGF5ZXJfMSIgaW1hZ2UtcmVuZGVyaW5nPSJvcHRpbWl6ZVF1YWxpdHkiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIiB0ZXh0LXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIgoJIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjgzLjUgMjgzLjUiCgkgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjgzLjUgMjgzLjU7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHN0eWxlIHR5cGU9InRleHQvY3NzIj4KCS5zdDB7ZmlsbDojMzQzNDM0O30KCS5zdDF7ZmlsbDojOEM4QzhDO30KCS5zdDJ7ZmlsbDojM0MzQzNCO30KCS5zdDN7ZmlsbDojMTQxNDE0O30KCS5zdDR7ZmlsbDojMzkzOTM5O30KPC9zdHlsZT4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTQxLjcsMjUuOWwtMS41LDUuMnYxNTMuM2wxLjUsMS41bDcxLjItNDIuMUwxNDEuNywyNS45eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNS45TDcwLjYsMTQzLjhsNzEuMSw0Mi4xdi03NC40VjI1Ljl6Ii8+CgkJPHBhdGggY2xhc3M9InN0MiIgZD0iTTE0MS43LDE5OS40bC0wLjgsMS4xdjU0LjZsMC44LDIuNWw3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["optimism"],optimism:{router:{address:Jp.optimism.wrapped.address,api:lj.WETH}}};var wj=e=>new Nx(Object.assign(bj,{scope:e,findPath:e=>lj.findPath({...e,exchange:bj}),pathExists:e=>lj.pathExists({...e,exchange:bj}),getAmounts:e=>lj.getAmounts({...e,exchange:bj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:bj})}));const Mj={name:"weth_base",label:"Wrapped Ethereum",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLS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3MS4yLTEwMC4zTDE0MS43LDE5OS40eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDEiIGQ9Ik0xNDEuNywyNTcuNnYtNTguMmwtNzEuMS00Mi4xTDE0MS43LDI1Ny42eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDMiIGQ9Ik0xNDEuNywxODUuOWw3MS4yLTQyLjFsLTcxLjItMzIuM1YxODUuOXoiLz4KCQk8cGF0aCBjbGFzcz0ic3Q0IiBkPSJNNzAuNiwxNDMuOGw3MS4xLDQyLjF2LTc0LjRMNzAuNiwxNDMuOHoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["base"],base:{router:{address:Jp.base.wrapped.address,api:lj.WETH}}};var Aj=e=>new Nx(Object.assign(Mj,{scope:e,findPath:e=>lj.findPath({...e,exchange:Mj}),pathExists:e=>lj.pathExists({...e,exchange:Mj}),getAmounts:e=>lj.getAmounts({...e,exchange:Mj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Mj})}));const Ej={name:"wftm",label:"Wrapped Fantom",logo:"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMTkyIDE5MiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMTkyIDE5MjsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iY2lyY2xlIj4KCTxnIGlkPSJGYW50b20tY2lyY2xlIj4KCQk8Y2lyY2xlIGlkPSJPdmFsIiBmaWxsUnVsZT0iZXZlbm9kZCIgY2xpcFJ1bGU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AuMiwwLjYsMC4yVjgwLjV6IE05OC4yLDgwLjV2MjkuOGMwLjItMC4xLDAuNC0wLjEsMC42LTAuMmwyNy42LTE0LjZjMCwwLDAuMSwwLDAuMSwwbDAsMGwwLDBsLTAuMSwwTDk4LjgsODAuNwoJCQlDOTguNiw4MC42LDk4LjQsODAuNSw5OC4yLDgwLjV6IE0xMjYuNiw2NC40bC0yNC44LDEzbDI0LjgsMTNWNjQuNHogTTY1LjIsNjQuNHYyNi4xbDI0LjgtMTNMNjUuMiw2NC40eiBNOTguNyw0NS4xCgkJCWMtMS40LTAuOC00LTAuOC01LjUsMEw2NS42LDU5LjdjMCwwLTAuMSwwLTAuMSwwbDAsMGwwLDBsMC4xLDBsMjcuNiwxNC42YzEuNCwwLjgsNCwwLjgsNS41LDBsMjcuNi0xNC42YzAsMCwwLjEsMCwwLjEsMGwwLDBsMCwwCgkJCWwtMC4xLDBMOTguNyw0NS4xeiBNMTMwLjcsNDYuNWwxLjcsMS4xbDAuMywwLjJjMC41LDAuMywwLjksMC42LDEuMywwLjhjNC4yLDIuOCw1LjcsNS45LDUuNywxMi4zbDAsMC4yaC00LjNjMC0yLjgtMC4zLTQuNy0xLTYKCQkJYy0wLjUtMS4xLTEuMy0xLjktMi44LTIuOWwtMC4xLTAuMWMtMC4zLTAuMi0wLjctMC40LTEuMS0wLjdsLTAuNS0wLjNsLTEuNi0wLjlMMTMwLjcsNDYuNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K",protocol:"weth",slippage:!1,blockchains:["fantom"],fantom:{router:{address:Jp.fantom.wrapped.address,api:lj.WETH}}};var Nj=e=>new Nx(Object.assign(Ej,{scope:e,findPath:e=>lj.findPath({...e,exchange:Ej}),pathExists:e=>lj.pathExists({...e,exchange:Ej}),getAmounts:e=>lj.getAmounts({...e,exchange:Ej}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Ej})}));const Tj={name:"wmatic",label:"Wrapped MATIC",logo:"data:image/svg+xml;base64,PD94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IuOWMwLjctMC40LDEuNi0wLjQsMi4yLDBsNCwyLjNjMC43LDAuNCwxLjEsMS4xLDEuMSwydjQuNmMwLDAuOS0wLjQsMS42LTEuMSwyCglsLTMuOSwyLjNjLTAuNywwLjQtMS41LDAuNC0yLjIsMGwtNC0yLjNjLTAuNy0wLjQtMS4xLTEuMS0xLjEtMnYtMi45TDIxLDI4Ljd2My4xYzAsMC45LDAuNCwxLjYsMS4xLDJsNy41LDQuNAoJYzAuNywwLjQsMS41LDAuNCwyLjIsMGw3LjUtNC40YzAuNy0wLjQsMS4xLTEuMSwxLjEtMlYyM2MwLTAuOS0wLjQtMS42LTEuMS0yQzM5LjIsMjEsMzEuOSwxNi42LDMxLjksMTYuNnoiLz4KPC9zdmc+Cg==",protocol:"weth",slippage:!1,blockchains:["polygon"],polygon:{router:{address:Jp.polygon.wrapped.address,api:lj.WETH}}};var Ij=e=>new Nx(Object.assign(Tj,{scope:e,findPath:e=>lj.findPath({...e,exchange:Tj}),pathExists:e=>lj.pathExists({...e,exchange:Tj}),getAmounts:e=>lj.getAmounts({...e,exchange:Tj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:Tj})}));const kj={name:"wxdai",label:"Wrapped XDAI",logo:Jp.gnosis.wrapped.logo,protocol:"weth",slippage:!1,blockchains:["gnosis"],gnosis:{router:{address:Jp.gnosis.wrapped.address,api:lj.WETH}}};var Lj=e=>new Nx(Object.assign(kj,{scope:e,findPath:e=>lj.findPath({...e,exchange:kj}),pathExists:e=>lj.pathExists({...e,exchange:kj}),getAmounts:e=>lj.getAmounts({...e,exchange:kj}),getPrep:e=>{},getTransaction:e=>lj.getTransaction({...e,exchange:kj})}));const xj=[xS(),cj(),BS(),$S(),jS(),XS(),WS(),YS(),Dx(),mj(),wj(),Aj(),vj(),fj(),Ij(),Nj(),hj(),Lj()];xj.forEach((e=>{xj[e.name]=e})),xj.ethereum=[cj("ethereum"),$S("ethereum"),mj("ethereum")],xj.ethereum.forEach((e=>{xj.ethereum[e.name]=e})),xj.bsc=[BS("bsc"),cj("bsc"),jS("bsc"),fj("bsc")],xj.bsc.forEach((e=>{xj.bsc[e.name]=e})),xj.polygon=[cj("polygon"),WS("polygon"),Ij("polygon")],xj.polygon.forEach((e=>{xj.polygon[e.name]=e})),xj.solana=[xS("solana")],xj.solana.forEach((e=>{xj.solana[e.name]=e})),xj.optimism=[cj("optimism"),wj("optimism")],xj.optimism.forEach((e=>{xj.optimism[e.name]=e})),xj.base=[cj("base"),Aj("base")],xj.base.forEach((e=>{xj.base[e.name]=e})),xj.arbitrum=[cj("arbitrum"),vj("arbitrum")],xj.arbitrum.forEach((e=>{xj.arbitrum[e.name]=e})),xj.fantom=[YS("fantom"),Nj("fantom")],xj.fantom.forEach((e=>{xj.fantom[e.name]=e})),xj.avalanche=[XS("avalanche"),hj("avalanche")],xj.avalanche.forEach((e=>{xj.avalanche[e.name]=e})),xj.gnosis=[Dx("gnosis"),Lj("gnosis")],xj.gnosis.forEach((e=>{xj.gnosis[e.name]=e}));xj.route=({blockchain:e,tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})=>Promise.all(xj[e].map((e=>e.route({tokenIn:t,tokenOut:n,amountIn:r,amountOut:i,amountInMax:o,amountOutMin:a})))).then((e=>e.filter(Boolean).sort(((e,t)=>(r||o?BigInt(e.amountOut)BigInt(t.amountIn))?1:(r||o?BigInt(e.amountOut)>BigInt(t.amountOut):BigInt(e.amountIn)jj||(jj="object"==typeof r?r:window,jj);const Dj=()=>(void 0===Cj()._Web3ClientConfiguration&&(Cj()._Web3ClientConfiguration={}),Cj()._Web3ClientConfiguration);class Oj extends $A{constructor(e,t,n,r){super(e),this._network=t,this._endpoint=e,this._endpoints=n,this._failover=r,this._pendingBatch=[]}detectNetwork(){return Promise.resolve(Jp.findByName(this._network).id)}requestChunk(e,t){const n=e.map((e=>e.request));return rA(t,JSON.stringify(n)).then((t=>{e.forEach(((e,n)=>{const r=t[n];if(r.error){const t=new Error(r.error.message);t.code=r.error.code,t.data=r.error.data,e.reject(t)}else e.resolve(r.result)}))})).catch((t=>{if(t&&"SERVER_ERROR"==t.code){const t=this._endpoints.indexOf(this._endpoint)+1;this._failover(),this._endpoint=t>=this._endpoints.length?this._endpoints[0]:this._endpoints[t],this.requestChunk(e,this._endpoint)}else e.forEach((e=>{e.reject(t)}))}))}send(e,t){const n={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((e,t)=>{r.resolve=e,r.reject=t}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const t=[];for(let n=0;n(e.map((e=>e.request)),this.requestChunk(e,this._endpoint))))}),Dj().batchInterval||10)),i}}const zj=()=>(null==Cj()._Web3ClientProviders&&(Cj()._Web3ClientProviders={}),Cj()._Web3ClientProviders),_j=(e,t)=>{void 0===zj()[e]&&(zj()[e]=[]);const n=zj()[e].indexOf(t);n>-1&&zj()[e].splice(n,1),zj()[e].unshift(t)},Pj=async(e,t,n=!0)=>{let r;zj()[e]=t.map(((r,i)=>new Oj(r,e,t,(()=>{1===zj()[e].length?Pj(e,t,n):zj()[e].splice(i,1)}))));let i=Cj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=zj()[e][0];else{let n=await Promise.all(t.map((e=>new Promise((async t=>{let n=(new Date).getTime();setTimeout((()=>t(900)),900);if(!(await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"net_version",id:1,jsonrpc:"2.0"})})).ok)return t(999);let r=(new Date).getTime();t(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=zj()[e][o]}_j(e,r)};var Rj=async e=>{let t=zj();if(t&&t[e])return t[e][0];let n=Cj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[e]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[e]=new Promise((async t=>{await Pj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e][0])}))),await n._Web3ClientGetProviderPromise[e]},Bj=async e=>{let t=zj();if(t&&t[e])return t[e];let n=Cj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[e]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[e]=new Promise((async t=>{await Pj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e])}))),await n._Web3ClientGetProvidersPromise[e]};class Uj extends $l{constructor(e,t,n,r){super(e),this._provider=new $l(e),this._network=t,this._endpoint=e,this._endpoints=n,this._failover=r,this._pendingBatch=[],this._rpcRequest=this._rpcRequestReplacement.bind(this)}requestChunk(e){const t=e.map((e=>e.request)),n=t=>{if(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 $l(this._endpoint),this.requestChunk(e)}else e.forEach((e=>{e.reject(t)}))};try{return this._provider._rpcBatchRequest(t).then((t=>{e.forEach(((e,n)=>{const r=t[n];if(r.error){const t=new Error(r.error.message);t.code=r.error.code,t.data=r.error.data,e.reject(t)}else e.resolve(r)}))})).catch(n)}catch(e){return n(e)}}_rpcRequestReplacement(e,t){const n={methodName:e,args:t};null==this._pendingBatch&&(this._pendingBatch=[]);const r={request:n,resolve:null,reject:null},i=new Promise(((e,t)=>{r.resolve=e,r.reject=t}));return this._pendingBatch.push(r),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=[],this._pendingBatchAggregator=null;const t=[];for(let n=0;n(e.map((e=>e.request)),this.requestChunk(e))))}),Dj().batchInterval||10)),i}}const Wj=()=>(null==Cj()._Web3ClientProviders&&(Cj()._Web3ClientProviders={}),Cj()._Web3ClientProviders),Qj=(e,t)=>{void 0===Wj()[e]&&(Wj()[e]=[]);const n=Wj()[e].indexOf(t);n>-1&&Wj()[e].splice(n,1),Wj()[e].unshift(t)},Yj=async(e,t,n=!0)=>{let r;Wj()[e]=t.map(((r,i)=>new Uj(r,e,t,(()=>{1===Wj()[e].length?Yj(e,t,n):Wj()[e].splice(i,1)}))));let i=Cj();if(null==i.fetch||void 0!==k&&k.env&&"test"==k.env.NODE_ENV||void 0!==i.cy||!1===n)r=Wj()[e][0];else{let n=await Promise.all(t.map((e=>new Promise((async t=>{let n=(new Date).getTime();setTimeout((()=>t(900)),900);if(!(await fetch(e,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({method:"getIdentity",id:1,jsonrpc:"2.0"})})).ok)return t(999);let r=(new Date).getTime();t(r-n)})))));const i=Math.min(...n),o=n.indexOf(i);r=Wj()[e][o]}Qj(e,r)};var Fj=async e=>{let t=Wj();if(t&&t[e])return t[e][0];let n=Cj();return n._Web3ClientGetProviderPromise&&n._Web3ClientGetProviderPromise[e]||(n._Web3ClientGetProviderPromise||(n._Web3ClientGetProviderPromise={}),n._Web3ClientGetProviderPromise[e]=new Promise((async t=>{await Yj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e][0])}))),await n._Web3ClientGetProviderPromise[e]},Vj=async e=>{let t=Wj();if(t&&t[e])return t[e];let n=Cj();return n._Web3ClientGetProvidersPromise&&n._Web3ClientGetProvidersPromise[e]||(n._Web3ClientGetProvidersPromise||(n._Web3ClientGetProvidersPromise={}),n._Web3ClientGetProvidersPromise[e]=new Promise((async t=>{await Yj(e,Jp[e].endpoints),t(Cj()._Web3ClientProviders[e])}))),await n._Web3ClientGetProvidersPromise[e]};let Hj=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];Hj.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],Hj.solana=["solana"];let Gj=()=>(null==Cj()._Web3ClientCacheStore&&(Cj()._Web3ClientCacheStore={}),Cj()._Web3ClientCacheStore),qj=()=>(null==Cj()._Web3ClientPromiseStore&&(Cj()._Web3ClientPromiseStore={}),Cj()._Web3ClientPromiseStore),Zj=function({key:e}){qj()[e]=void 0},Jj=function({call:e,key:t,expires:n=0}){return new Promise(((r,i)=>{let o,a=function({key:e}){return qj()[e]}({key:t=JSON.stringify(t)});if(a)return a.then(r).catch(i);(function({key:e,promise:t}){return qj()[e]=t,t})({key:t,promise:new Promise(((a,s)=>0===n?e().then((e=>{r(e),a(e)})).catch((e=>{i(e),s(e)})):(o=function({key:e,expires:t}){let n=Gj()[e];if(function(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}([n,"optionalAccess",e=>e.expiresAt])>Date.now())return n.value}({key:t,expires:n}),o?(r(o),a(o),o):void e().then((e=>{e&&function({key:e,value:t,expires:n}){Gj()[e]={expiresAt:Date.now()+n,value:t}}({key:t,value:e,expires:n}),r(e),a(e)})).catch((e=>{i(e),s(e)})))))}).then((()=>{Zj({key:t})})).catch((()=>{Zj({key:t})}))}))};const Xj=async e=>{if(Hj.evm.includes(e))return await Rj(e);if(Hj.solana.includes(e))return await Fj(e);throw"Unknown blockchain: "+e};const Kj=({address:e,api:t,method:n,params:r,provider:i,block:o})=>{const a=new UM(e,t,i),s=(({contract:e,method:t,params:n})=>e.interface.fragments.find((e=>e.name==t)).inputs.map(((e,t)=>Array.isArray(n)?n[t]:n[e.name])))({contract:a,method:n,params:r}),u=a.interface.fragments.find((e=>e.name===n));return void 0===a[n]&&(n=`${n}(${u.inputs.map((e=>e.type)).join(",")})`),u&&"nonpayable"===u.stateMutability?a.callStatic[n](...s,{blockTag:o}):a[n](...s,{blockTag:o})},$j=({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a})=>n?Kj({address:t,api:n,method:r,params:i,provider:a,block:o}):"latestBlockNumber"===r?a.getBlockNumber():"balance"===r?(({address:e,provider:t})=>t.getBalance(e))({address:t,provider:a}):"transactionCount"===r?(({address:e,provider:t})=>t.getTransactionCount(e))({address:t,provider:a}):void 0;const eC=async({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a,providers:s})=>{try{if(null==r||"getAccountInfo"===r)return null==n&&(n=cp),await(async({address:e,api:t,method:n,params:r,provider:i,block:o})=>{const a=await i.getAccountInfo(new iu(e));if(a&&a.data)return t.decode(a.data)})({address:t,api:n,method:r,params:i,provider:a,block:o});if("getProgramAccounts"===r)return await a.getProgramAccounts(new iu(t),i).then((e=>n?e.map((e=>(e.data=n.decode(e.account.data),e))):e));if("getTokenAccountBalance"===r)return await a.getTokenAccountBalance(new iu(t));if("latestBlockNumber"===r)return await a.getSlot(i||void 0);if("balance"===r)return await(({address:e,provider:t})=>t.getBalance(new iu(e)))({address:t,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((e=>u.toString().match(e)))){let u=s[s.indexOf(a)+1]||s[0];return eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:u,providers:s})}throw u}};const tC=async function(e,t){const{blockchain:n,address:r,method:i}=(e=>{if("object"==typeof e)return e;let t=e.match(/(?\w+):\/\/(?[\w\d]+)(\/(?[\w\d]+)*)?/);return null==t.groups.part2?t.groups.part1.match(/\d/)?{blockchain:t.groups.blockchain,address:t.groups.part1}:{blockchain:t.groups.blockchain,method:t.groups.part1}:{blockchain:t.groups.blockchain,address:t.groups.part1,method:t.groups.part2}})(e),{api:o,params:a,cache:s,block:u,timeout:c,strategy:l,cacheKey:d}=("object"==typeof e?e:t)||{};return await Jj({expires:s||0,key:d||[n,r,i,a,u],call:async()=>{if(Hj.evm.includes(n))return await(async({blockchain:e,address:t,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{if(s=s||Dj().strategy||"failover",a=a||Dj().timeout||void 0,"fastest"===s){const s=await Bj(e);let u=[];const c=s.map((a=>new Promise((s=>{u.push($j({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a}).then(s))})))),l=new Promise(((e,t)=>setTimeout((()=>{t(new Error("Web3ClientTimeout"))}),a||1e4)));return u=Promise.all(u.map((e=>new Promise((t=>{e.catch(t)}))))).then((()=>{})),Promise.race([...c,l,u])}{const s=await Rj(e),u=$j({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:s});return a?(a=new Promise(((e,t)=>setTimeout((()=>{t(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(Hj.solana.includes(n))return await(async({blockchain:e,address:t,api:n,method:r,params:i,block:o,timeout:a,strategy:s})=>{s=s||Dj().strategy||"failover",a=a||Dj().timeout||void 0;const u=await Vj(e);if("fastest"===s){let s=[];const c=u.map((a=>new Promise((u=>{s.push(eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:a}).then(u))})))),l=new Promise(((e,t)=>setTimeout((()=>{t(new Error("Web3ClientTimeout"))}),a||1e4)));return s=Promise.all(s.map((e=>new Promise((t=>{e.catch(t)}))))).then((()=>{})),Promise.race([...c,l,s])}{const s=await Fj(e),c=eC({blockchain:e,address:t,api:n,method:r,params:i,block:o,provider:s,providers:u});return a?(a=new Promise(((e,t)=>setTimeout((()=>{t(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}})},nC=async({wSolSenderAccountKeypair:e,paymentRoute:t})=>{if(!e)return;const n=t.fromToken.address===Jp.solana.currency.address?new up(t.fromAmount):new up("0"),r=await Xj("solana"),i=new up(await r.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span)),o=t.fromAddress,a=n.add(i);return[Ju.createAccount({fromPubkey:new iu(o),newAccountPubkey:e.publicKey,programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:a}),xk.solana.initializeAccountInstruction({account:e.publicKey.toString(),token:Jp.solana.wrapped.address,owner:o})]},rC=async({wSolEscrowAccountKeypair:e,paymentRoute:t})=>{if(!e)return;const n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(xk.solana.TOKEN_LAYOUT.span)),i=await mC();return[Ju.createAccount({fromPubkey:new iu(t.fromAddress),newAccountPubkey:e.publicKey,programId:new iu(xk.solana.TOKEN_PROGRAM),space:xk.solana.TOKEN_LAYOUT.span,lamports:r}),xk.solana.initializeAccountInstruction({account:e.publicKey.toString(),token:Jp.solana.wrapped.address,owner:i.toString()})]},iC=({paymentRoute:e})=>{let t=[...e.exchangeRoutes[0].path];return t.indexOf(Jp.solana.currency.address)>-1&&t.splice(t.indexOf(Jp.solana.currency.address),1),t.indexOf(e.fromToken.address)>-1&&t.splice(t.indexOf(e.fromToken.address),1),t.indexOf(e.toToken.address)>-1&&t.splice(t.indexOf(e.toToken.address),1),2===t.length&&t[0]===Jp.solana.wrapped.address?t[1]:t[0]},oC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:iC({paymentRoute:e}),owner:e.fromAddress}),aC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||wC(e.exchangeRoutes[0].path).length<=2)return;return await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:await oC({paymentRoute:e}),api:xk.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:e})?void 0:xk.solana.createAssociatedTokenAccountInstruction({token:iC({paymentRoute:e}),owner:e.fromAddress,payer:e.fromAddress})},sC=async({wSolSenderAccountKeypair:e,paymentRoute:t})=>{if(e)return xk.solana.closeAccountInstruction({account:e.publicKey.toString(),owner:t.fromAddress})},uC=async({from:e})=>{let t=[sp.from("payments"),new iu(e).toBuffer()],[n]=await iu.findProgramAddress(t,new iu(Sj.solana.address));return n},cC=async({from:e})=>{let t=(await uC({from:e})).toString();return await tC({blockchain:"solana",address:t,api:vp([Ap("anchorDiscriminator"),Ap("nonce")]),cache:1e3})},lC=async({from:e})=>{if(await cC({from:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e}),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createPaymentsAccount.layout.span);return Sj.solana.api.createPaymentsAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createPaymentsAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},dC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.fromToken.address,owner:e.fromAddress}),hC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.toToken.address,owner:e.toAddress}),pC=async({paymentRoute:e})=>{if(e.toToken.address===Jp.solana.currency.address){const t=await tC({blockchain:"solana",method:"balance",address:e.toAddress}),n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(0)),i=new up(e.toAmount);if(new up(t).add(i).gt(r))return;return Ju.transfer({fromPubkey:new iu(e.fromAddress),toPubkey:new iu(e.toAddress),lamports:r.sub(i)})}{const t=e.toToken.address;if(await(async({paymentRoute:e})=>await xk.solana.findAccount({token:e.toToken.address,owner:e.toAddress}))({paymentRoute:e}))return;return xk.solana.createAssociatedTokenAccountInstruction({token:t,owner:e.toAddress,payer:e.fromAddress})}},fC=async({paymentRoute:e})=>await xk.solana.findProgramAddress({token:e.toToken.address,owner:e.fee.receiver}),yC=async({paymentRoute:e})=>{if(e.fee){if(e.toToken.address===Jp.solana.currency.address){const t=await tC({blockchain:"solana",method:"balance",address:e.fee.receiver}),n=await Xj("solana"),r=new up(await n.getMinimumBalanceForRentExemption(0)),i=new up(e.feeAmount);if(new up(t).add(i).gt(r))return;return Ju.transfer({fromPubkey:new iu(e.fromAddress),toPubkey:new iu(e.fee.receiver),lamports:r.sub(i)})}{const t=e.toToken.address;if(await(async({paymentRoute:e})=>await xk.solana.findAccount({token:e.toToken.address,owner:e.fee.receiver}))({paymentRoute:e}))return;return xk.solana.createAssociatedTokenAccountInstruction({token:t,owner:e.fee.receiver,payer:e.fromAddress})}}},mC=async()=>{let e=[sp.from("escrow_sol")],[t,n]=await iu.findProgramAddress(e,new iu(Sj.solana.address));return t},gC=async({paymentRoute:e})=>{let t=[sp.from("escrow"),new iu(e.toToken.address===Jp.solana.currency.address?Jp.solana.wrapped.address:e.toToken.address).toBuffer()],[n,r]=await iu.findProgramAddress(t,new iu(Sj.solana.address));return n},vC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||e.toToken.address===Jp.solana.currency.address)return;if(await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:(await gC({paymentRoute:e})).toString(),api:xk.solana.TOKEN_LAYOUT,cache:1e3}))({paymentRoute:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:new iu(e.toToken.address===Jp.solana.currency.address?Jp.solana.wrapped.address:e.toToken.address),isSigner:!1,isWritable:!0},{pubkey:await gC({paymentRoute:e}),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createEscrowTokenAccount.layout.span);return Sj.solana.api.createEscrowTokenAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createEscrowTokenAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},bC=async({paymentRoute:e})=>{if(0===e.exchangeRoutes.length||e.toToken.address!=Jp.solana.currency.address)return;if(await(async({paymentRoute:e})=>await tC({blockchain:"solana",address:(await mC()).toString(),api:vp([Ap("amount"),yp("owner")]),cache:1e3}))({paymentRoute:e}))return;const t=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await mC(),isSigner:!1,isWritable:!0}],n=sp.alloc(Sj.solana.api.createEscrowSolAccount.layout.span);return Sj.solana.api.createEscrowSolAccount.layout.encode({anchorDiscriminator:Sj.solana.api.createEscrowSolAccount.anchorDiscriminator},n),new Nu({keys:t,programId:new iu(Sj.solana.address),data:n})},wC=e=>e.filter((e=>e!==Jp.solana.currency.address)),MC=async({paymentRoute:e,wSolSenderAccountKeypair:t,wSolEscrowAccountKeypair:n,nonce:r,deadline:i})=>{switch((({paymentRoute:e})=>{if(e.fromToken.address===Jp.solana.currency.address&&e.toToken.address===Jp.solana.currency.address)return"routeSol";if(e.fromToken.address!==Jp.solana.currency.address&&e.toToken.address!==Jp.solana.currency.address&&0===e.exchangeRoutes.length)return"routeToken";if(e.exchangeRoutes.length>0&&2===wC(e.exchangeRoutes[0].path).length)return e.toToken.address===Jp.solana.currency.address?"routeOrcaSwapSolOut":"routeOrcaSwap";if(e.exchangeRoutes.length>0&&wC(e.exchangeRoutes[0].path).length>2)return e.toToken.address===Jp.solana.currency.address?"routeOrcaTwoHopSwapSolOut":"routeOrcaTwoHopSwap";throw"Payment method does not exist!"})({paymentRoute:e})){case"routeSol":return await(async({paymentRoute:e,nonce:t,deadline:n})=>{const r=new iu(e.toAddress),i=e.fee?new iu(e.fee.receiver):r,o=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0}],a=sp.alloc(Sj.solana.api.routeSol.layout.span);return Sj.solana.api.routeSol.layout.encode({anchorDiscriminator:Sj.solana.api.routeSol.anchorDiscriminator,nonce:t,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(n)},a),new Nu({keys:o,programId:new iu(Sj.solana.address),data:a})})({paymentRoute:e,nonce:r,deadline:i});case"routeToken":return await(async({paymentRoute:e,nonce:t,deadline:n})=>{const r=await dC({paymentRoute:e}),i=await hC({paymentRoute:e}),o=e.fee?await fC({paymentRoute:e}):i,a=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(r),isSigner:!1,isWritable:!0},{pubkey:new iu(i),isSigner:!1,isWritable:!0},{pubkey:new iu(o),isSigner:!1,isWritable:!0}],s=sp.alloc(Sj.solana.api.routeToken.layout.span);return Sj.solana.api.routeToken.layout.encode({anchorDiscriminator:Sj.solana.api.routeToken.anchorDiscriminator,nonce:t,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(n)},s),new Nu({keys:a,programId:new iu(Sj.solana.address),data:s})})({paymentRoute:e,nonce:r,deadline:i});case"routeOrcaSwap":return await(async({paymentRoute:e,nonce:t,wSolSenderAccountKeypair:n,deadline:r})=>{const i=n?n.publicKey:await dC({paymentRoute:e}),o=await hC({paymentRoute:e}),a=e.fee?await fC({paymentRoute:e}):o,s=await gC({paymentRoute:e}),u=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),c=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]).decode(u.data),l=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(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 iu(o),isSigner:!1,isWritable:!0},{pubkey:new iu(a),isSigner:!1,isWritable:!0}],d=sp.alloc(Sj.solana.api.routeOrcaSwap.layout.span);return Sj.solana.api.routeOrcaSwap.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaSwap.anchorDiscriminator,nonce:t,amountIn:c.amount,sqrtPriceLimit:c.sqrtPriceLimit,amountSpecifiedIsInput:c.amountSpecifiedIsInput,aToB:c.aToB,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(r)},d),new Nu({keys:l,programId:new iu(Sj.solana.address),data:d})})({paymentRoute:e,nonce:r,wSolSenderAccountKeypair:t,deadline:i});case"routeOrcaSwapSolOut":return await(async({paymentRoute:e,nonce:t,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=await dC({paymentRoute:e}),o=n.publicKey,a=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),s=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),bp("sqrtPriceLimit"),lp("amountSpecifiedIsInput"),lp("aToB")]).decode(a.data),u=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.fromAddress}),isSigner:!1,isWritable:!0},{pubkey:new iu(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 mC(),isSigner:!1,isWritable:!0},{pubkey:new iu(e.toAddress),isSigner:!1,isWritable:!0},{pubkey:new iu(e.fee?e.fee.receiver:e.toAddress),isSigner:!1,isWritable:!0}],c=sp.alloc(Sj.solana.api.routeOrcaSwapSolOut.layout.span);return Sj.solana.api.routeOrcaSwapSolOut.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaSwapSolOut.anchorDiscriminator,nonce:t,amountIn:s.amount,sqrtPriceLimit:s.sqrtPriceLimit,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToB:s.aToB,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(r)},c),new Nu({keys:u,programId:new iu(Sj.solana.address),data:c})})({paymentRoute:e,nonce:r,wSolEscrowAccountKeypair:n,deadline:i});case"routeOrcaTwoHopSwap":return await(async({paymentRoute:e,nonce:t,wSolSenderAccountKeypair:n,deadline:r})=>{const i=new iu(await hC({paymentRoute:e})),o=e.fee?new iu(await fC({paymentRoute:e})):i,a=await gC({paymentRoute:e}),s=new iu(await oC({paymentRoute:e})),u=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),c=n?n.publicKey:new iu(await dC({paymentRoute:e})),l=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]).decode(u.data),d=[{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.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}],h=sp.alloc(Sj.solana.api.routeOrcaTwoHopSwap.layout.span);return Sj.solana.api.routeOrcaTwoHopSwap.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaTwoHopSwap.anchorDiscriminator,nonce:t,amountIn:l.amount,amountSpecifiedIsInput:l.amountSpecifiedIsInput,aToBOne:l.aToBOne,aToBTwo:l.aToBTwo,sqrtPriceLimitOne:l.sqrtPriceLimitOne,sqrtPriceLimitTwo:l.sqrtPriceLimitTwo,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(r)},h),new Nu({keys:d,programId:new iu(Sj.solana.address),data:h})})({paymentRoute:e,nonce:r,wSolSenderAccountKeypair:t,deadline:i});case"routeOrcaTwoHopSwapSolOut":return await(async({paymentRoute:e,nonce:t,wSolEscrowAccountKeypair:n,deadline:r})=>{const i=new iu(await oC({paymentRoute:e})),o=(await e.exchangeRoutes[0].getTransaction({account:e.fromAddress})).instructions.find((e=>e.programId.toString()===Sj.solana.ammProgram)),a=new iu(await dC({paymentRoute:e})),s=vp([Ap("anchorDiscriminator"),Ap("amount"),Ap("otherAmountThreshold"),lp("amountSpecifiedIsInput"),lp("aToBOne"),lp("aToBTwo"),bp("sqrtPriceLimitOne"),bp("sqrtPriceLimitTwo")]).decode(o.data),u=[{pubkey:Ju.programId,isSigner:!1,isWritable:!1},{pubkey:new iu(xk.solana.TOKEN_PROGRAM),isSigner:!1,isWritable:!1},{pubkey:new iu(Sj.solana.ammProgram),isSigner:!1,isWritable:!1},{pubkey:new iu(e.fromAddress),isSigner:!0,isWritable:!0},{pubkey:await uC({from:e.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 mC(),isSigner:!1,isWritable:!0},{pubkey:new iu(e.toAddress),isSigner:!1,isWritable:!0},{pubkey:new iu(e.fee?e.fee.receiver:e.toAddress),isSigner:!1,isWritable:!0}],c=sp.alloc(Sj.solana.api.routeOrcaTwoHopSwapSolOut.layout.span);return Sj.solana.api.routeOrcaTwoHopSwapSolOut.layout.encode({anchorDiscriminator:Sj.solana.api.routeOrcaTwoHopSwapSolOut.anchorDiscriminator,nonce:t,amountIn:s.amount,amountSpecifiedIsInput:s.amountSpecifiedIsInput,aToBOne:s.aToBOne,aToBTwo:s.aToBTwo,sqrtPriceLimitOne:s.sqrtPriceLimitOne,sqrtPriceLimitTwo:s.sqrtPriceLimitTwo,paymentAmount:new up(e.toAmount.toString()),feeAmount:new up((e.feeAmount||"0").toString()),deadline:new up(r)},c),new Nu({keys:u,programId:new iu(Sj.solana.address),data:c})})({paymentRoute:e,nonce:r,wSolEscrowAccountKeypair:n,deadline:i})}},AC=async({paymentRoute:e})=>{const t=await cC({from:e.fromAddress}),n=Math.ceil((new Date).getTime()/1e3)+1800,r=(e=>e?e.nonce:new up("0"))(t),i=await(async({paymentRoute:e})=>{if(e.fromToken.address===Jp.solana.currency.address&&e.toToken.address!==Jp.solana.currency.address)return ed.generate()})({paymentRoute:e}),o=await(async({paymentRoute:e})=>{if(e.fromToken.address!==Jp.solana.currency.address&&e.toToken.address===Jp.solana.currency.address)return ed.generate()})({paymentRoute:e});let a=(await Promise.all([lC({from:e.fromAddress}),nC({paymentRoute:e,wSolSenderAccountKeypair:i}),aC({paymentRoute:e}),pC({paymentRoute:e}),yC({paymentRoute:e}),bC({paymentRoute:e}),rC({paymentRoute:e,wSolEscrowAccountKeypair:o}),vC({paymentRoute:e}),MC({paymentRoute:e,wSolSenderAccountKeypair:i,wSolEscrowAccountKeypair:o,nonce:r,deadline:n}),sC({paymentRoute:e,wSolSenderAccountKeypair:i})])).filter(Boolean).flat();const s={blockchain:e.blockchain,instructions:a,signers:[i,o].filter(Boolean),alts:[Sj.solana.alt]};return s.deadline=n,s.nonce=r.toString(),s},EC=[{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 NC={ethereum:{address:"0x6466F27B169C908Ba8174d80aEfa7173CbC3D0c7",api:EC},bsc:{address:"0x7ea09401db4692a8AEF4111b75bD32AE758f552A",api:EC},polygon:{address:"0x50CFAB577623B1359602E11514a9482B061A941e",api:EC},fantom:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:EC},avalanche:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:EC},gnosis:{address:"0xFee05C41195985909DDfc9127Db1f94559c46db3",api:EC},arbitrum:{address:"0xA1cfbeeF344A52e18f748fd6a126f9426A40fbc7",api:EC},optimism:{address:"0x8698E529E9867eEbcC68b4792daC627cd8870736",api:EC},base:{address:"0x8B127D169D232D5F3ebE1C3D06CE343FD7C1AA11",api:EC}},TC={...NC,...Sj},IC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{},kC="object"==typeof IC&&IC&&IC.Object===Object&&IC,LC="object"==typeof self&&self&&self.Object===Object&&self,xC=(kC||LC||Function("return this")()).Symbol;xC&&xC.toStringTag,xC&&xC.toStringTag;const SC=e=>{switch(e){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}},jC={arbitrum:{[Jp.arbitrum.wrapped.address]:"0x7E655088214d0657251A51aDccE9109CFd23B5B5"},avalanche:{[Jp.avalanche.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},base:{[Jp.base.wrapped.address]:"0xD1711710843B125a6a01FfDF9b95fDc3064BeF7A"},bsc:{[Jp.bsc.wrapped.address]:"0xeEb80d14abfB058AA78DE38813fe705c3e3b243E"},ethereum:{[Jp.ethereum.wrapped.address]:"0x298f4980525594b3b982779cf74ba76819708D43"},fantom:{[Jp.fantom.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},gnosis:{[Jp.gnosis.wrapped.address]:"0x2d0a6275eaDa0d03226919ce6D93661E589B2d59"},optimism:{[Jp.optimism.wrapped.address]:"0x69594057e2C0224deb1180c7a5Df9ec9d5B611B5"},polygon:{[Jp.polygon.wrapped.address]:"0xaE59C9d3E055BdFAa583E169aA5Ebe395689476a"},solana:{}},CC=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?e.toAddress:e.toToken.address:NC[e.blockchain].address,DC=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?void 0:xk[e.blockchain].DEFAULT:NC[e.blockchain].api,OC=({paymentRoute:e})=>e.directTransfer&&!e.fee?e.toToken.address==Jp[e.blockchain].currency.address?void 0:"transfer":"pay",zC=async({paymentRoute:e})=>{if(e.directTransfer&&!e.fee)return e.toToken.address==Jp[e.blockchain].currency.address?void 0:[e.toAddress,e.toAmount];{const t=Math.ceil(new Date/1e3)+86400,n=e.exchangeRoutes[0],r=(({exchangeRoute:e,blockchain:t})=>void 0===e?0:"uniswap_v3"===e.exchange.name||e.exchange[t].router.address===Jp[t].wrapped.address?2:1)({exchangeRoute:n,blockchain:e.blockchain}),i=n?await n.getTransaction({account:NC[e.blockchain].address,inputTokenPushed:2===r}):void 0,o=i?(({exchangeTransaction:e})=>{const t=new UM(e.to,e.api),n=e.method,r=e.params;let i,o,a;return o=t.interface.fragments.find((e=>!(e.name!=n||e.inputs&&r&&"object"==typeof r&&e.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((e=>e.type)).join(",")})`,a=o.inputs.map((e=>{if("tuple"===e.type){let t={};return e.components.forEach(((n,i)=>{t[n.name]=r[e.name][i]})),i=n,t}return r[e.name]}))),t.interface.encodeFunctionData(i,a)})({exchangeTransaction:i}):Jp[e.blockchain].zero;let a=Jp[e.blockchain].zero;return n&&(a="bsc"===e.blockchain&&"pancakeswap_v3"===n.exchange.name&&e.toToken.address===Jp[e.blockchain].currency.address?n.exchange[e.blockchain].smartRouter.address:jC[i.blockchain][n.exchange[e.blockchain].router.address]||n.exchange[e.blockchain].router.address),{payment:{amountIn:e.fromAmount,paymentAmount:e.toAmount,feeAmount:e.feeAmount||0,tokenInAddress:e.fromToken.address,exchangeAddress:a,tokenOutAddress:e.toToken.address,paymentReceiverAddress:e.toAddress,feeReceiverAddress:e.fee?e.fee.receiver:Jp[e.blockchain].zero,exchangeType:r,receiverType:0,exchangeCallData:o,receiverCallData:Jp[e.blockchain].zero,deadline:t}}}},_C=({paymentRoute:e})=>e.fromToken.address==Jp[e.blockchain].currency.address?e.directTransfer?e.toAmount.toString():e.fromAmount.toString():Zf.from("0").toString();let PC=["ethereum","bsc","polygon","solana","fantom","arbitrum","avalanche","gnosis","optimism","base"];PC.evm=["ethereum","bsc","polygon","fantom","arbitrum","avalanche","gnosis","optimism","base"],PC.solana=["solana"];const RC=({paymentRoute:e,fee:t})=>{if(PC.evm.includes(e.blockchain))return(async({paymentRoute:e})=>({blockchain:e.blockchain,to:CC({paymentRoute:e}),api:DC({paymentRoute:e}),method:OC({paymentRoute:e}),params:await zC({paymentRoute:e}),value:_C({paymentRoute:e})}))({paymentRoute:e,fee:t});if(PC.solana.includes(e.blockchain))return AC({paymentRoute:e,fee:t});throw"Blockchain not supported!"};function BC(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class UC{constructor({blockchain:e,fromAddress:t,fromToken:n,fromAmount:r,fromDecimals:i,fromBalance:o,toToken:a,toAmount:s,toDecimals:u,toAddress:c,fee:l,feeAmount:d,exchangeRoutes:h,approvalRequired:p,approvalTransaction:f,directTransfer:y}){this.blockchain=e,this.fromAddress=t,this.fromToken=n,this.fromAmount=BC([r||s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.fromDecimals=i,this.fromBalance=o,this.toToken=a,this.toAmount=BC([s,"optionalAccess",e=>e.toString,"call",e=>e()]),this.toDecimals=u,this.toAddress=c,this.fee=l,this.feeAmount=d,this.exchangeRoutes=h||[],this.approvalRequired=p,this.approvalTransaction=f,this.directTransfer=y,this.getTransaction=async()=>await RC({paymentRoute:this})}}function WC({assets:e,blacklist:t,accept:n,from:r}){return Promise.resolve(YC({assets:e,blacklist:t})).then((e=>function({assets:e,accept:t,from:n}){return Promise.all(e.map((async e=>{let r=t.filter((t=>t.blockchain==e.blockchain)),i=new xk(e);return Promise.all(r.map((async t=>{if(t.token&&t.amount){let r=t.blockchain,o=e.decimals,a=new xk({blockchain:r,address:t.token}),s=await a.decimals(),u=(await a.BigNumber(t.amount)).toString();return new UC({blockchain:r,fromToken:i,fromDecimals:o,toToken:a,toAmount:u,toDecimals:s,fromBalance:e.balance,fromAddress:n[t.blockchain],toAddress:t.toAddress,fee:t.fee})}if(t.fromToken&&t.fromAmount&&i.address.toLowerCase()==t.fromToken.toLowerCase()){let r=t.blockchain,o=(await i.BigNumber(t.fromAmount)).toString(),a=e.decimals,s=new xk({blockchain:r,address:t.toToken}),u=await s.decimals();return new UC({blockchain:r,fromToken:i,fromDecimals:a,fromAmount:o,toToken:s,toDecimals:u,fromBalance:e.balance,fromAddress:n[t.blockchain],toAddress:t.toAddress,fee:t.fee})}})))}))).then((e=>e.flat().filter((e=>e))))}({assets:e,accept:n,from:r}))).then((e=>qC({routes:e}))).then(FC).then(VC).then(HC).then((e=>KC({routes:e}))).then(GC).then(eD).then($C).then((e=>e.map((e=>new UC(e)))))}function QC({accept:e,from:t,whitelist:n,blacklist:r,drip:i}){if(e.some((e=>e&&e.fee&&"string"==typeof e.fee.amount&&e.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 e in n)(n[e]||[]).forEach((t=>{u.push(e),s.push({blockchain:e,address:t})}));else e.forEach((e=>{u.push(e.blockchain),s.push({blockchain:e.blockchain,address:e.token||e.toToken})}));[...new Set(u)].forEach((e=>{s.find((t=>t.blockchain===e&&t.address===Jp[e].currency.address))||s.push({blockchain:e,address:Jp[e].currency.address})})),s.sort(((e,t)=>SC(e.blockchain)[e.blockchain,e.address.toLowerCase()].join(""))),p=()=>Math.ceil(new Date),f=p();setTimeout((()=>{l.forEach((e=>y(QC,!1)))}),3e3);const y=(e,t=!0)=>{try{const n={blockchain:e.blockchain,address:e.fromToken.address},r=[n.blockchain,n.address.toLowerCase()].join(""),o=p()-f>3e3;if(d.indexOf(r)>-1)return;if(h.indexOf(r)===c){if(d.push(r),i(e),c+=1,!t)return;l.forEach((t=>y(e,!1)))}else c>=h.length||o?(-1===h.indexOf(r)||c>=h.length||o)&&(d.push(r),i(e)):l.find((e=>e.blockchain===n.blockchain&&e.address.toLowerCase()===n.address.toLowerCase()))||(l.push(n),l.sort(((e,t)=>((e,t,n)=>{if(!e||0===e.length)return 0;let r=e.indexOf([t.blockchain,t.address.toLowerCase()].join("")),i=e.indexOf([n.blockchain,n.address.toLowerCase()].join(""));return-1!==r&&-1===i?-1:-1!==i&&-1===r?1:r{WC({assets:[n],blacklist:r,accept:e,from:t}).then((e=>{BC([e,"optionalAccess",e=>e.length])&&y(e[0])}))}:void 0});let g=await WC({assets:m,blacklist:r,accept:e,from:t})||[];g.assets=m,o(g)}))}let YC=({assets:e,blacklist:t})=>null==t?e:e.filter((e=>null==t[e.blockchain]||!t[e.blockchain].find((t=>t.toLowerCase()==e.address.toLowerCase())))),FC=async e=>await Promise.all(e.map((e=>e.directTransfer?[]:e.toToken&&e.toAmount?xj.route({blockchain:e.blockchain,tokenIn:e.fromToken.address,tokenOut:e.toToken.address,amountOutMin:e.toAmount,fromAddress:e.fromAddress,toAddress:e.toAddress}):e.fromToken&&e.fromAmount?xj.route({blockchain:e.blockchain,tokenIn:e.fromToken.address,tokenOut:e.toToken.address,amountIn:e.fromAmount,fromAddress:e.fromAddress,toAddress:e.toAddress}):void 0))).then((t=>e.map(((e,n)=>(e.exchangeRoutes=t[n],e))))),VC=e=>e.filter((e=>0!=e.exchangeRoutes.length||e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase())),HC=async e=>e.filter((e=>e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()?Zf.from(e.fromBalance).gte(Zf.from(e.toAmount)):e.fromAmount&&e.toAmount?Zf.from(e.fromBalance).gte(Zf.from(e.exchangeRoutes[0].amountInMax)):e.exchangeRoutes[0]&&e.exchangeRoutes[0].amountIn?Zf.from(e.fromBalance).gte(Zf.from(e.exchangeRoutes[0].amountIn)):void 0)),GC=e=>Promise.all(e.map((e=>"solana"===e.blockchain?Promise.resolve(Jp.solana.maxInt):e.fromToken.allowance(e.fromAddress,TC[e.blockchain].address).catch((()=>{}))))).then((t=>(e.map(((n,r)=>{void 0===t[r]||n.directTransfer||n.fromToken.address.toLowerCase()==Jp[n.blockchain].currency.address.toLowerCase()||"solana"===n.blockchain?e[r].approvalRequired=!1:(e[r].approvalRequired=Zf.from(n.fromAmount).gte(Zf.from(t[r])),e[r].approvalRequired&&(e[r].approvalTransaction={blockchain:n.blockchain,to:n.fromToken.address,api:xk[n.blockchain].DEFAULT,method:"approve",params:[TC[n.blockchain].address,Jp[n.blockchain].maxInt]}))})),e))),qC=({routes:e})=>e.map((e=>(PC.evm.includes(e.blockchain)?e.directTransfer=e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()&&null==e.fee:"solana"===e.blockchain&&(e.directTransfer=e.fromToken.address.toLowerCase()==e.toToken.address.toLowerCase()),e))),ZC=({paymentRoute:e,exchangeRoute:t})=>{let n,r,i;return t?(t&&t.exchange.wrapper,n=t.amountIn.toString(),r=JC({amount:t.amountOutMin.toString(),paymentRoute:e})):(n=e.fromAmount,r=JC({amount:e.fromAmount,paymentRoute:e})),e.fee&&(i=XC({paymentRoute:e})),{fromAmount:n,toAmount:r,feeAmount:i}},JC=({amount:e,paymentRoute:t})=>{if(t.fee){let n=XC({paymentRoute:t});return Zf.from(e).sub(n).toString()}return e},XC=({paymentRoute:e})=>{if("string"==typeof e.fee.amount&&e.fee.amount.match("%"))return Zf.from(e.toAmount).mul(10*parseFloat(e.fee.amount)).div(1e3).toString();if("string"==typeof e.fee.amount)return e.fee.amount;if("number"==typeof e.fee.amount)return pE(e.fee.amount.toString(),e.toDecimals).toString();throw"Unknown fee amount type!"},KC=({routes:e})=>e.map((e=>{if(PC.evm.includes(e.blockchain))if(e.directTransfer&&!e.fee)e.fromAmount=e.toAmount;else{let{fromAmount:t,toAmount:n,feeAmount:r}=ZC({paymentRoute:e,exchangeRoute:e.exchangeRoutes[0]});e.fromAmount=t,e.toAmount=n,e.fee&&(e.feeAmount=r)}else if(PC.solana.includes(e.blockchain)){let{fromAmount:t,toAmount:n,feeAmount:r}=ZC({paymentRoute:e,exchangeRoute:e.exchangeRoutes[0]});e.fromAmount=t,e.toAmount=n,e.fee&&(e.feeAmount=r)}return e})),$C=e=>e.filter(((t,n)=>null==e.find(((e,r)=>t.fromToken.address==e.fromToken.address&&(t.fromToken.blockchain==e.fromToken.blockchain&&(!(!e.directTransfer||t.directTransfer)||(!(!Zf.from(e.fromAmount).lt(Zf.from(t.fromAmount))||t.directTransfer)||(e.fromAmount==t.fromAmount&&r{let t=-1;return e.sort(((e,n)=>SC(e.fromToken.blockchain)>>1,i=e[r];if(!(0>>1;ro(u,n))co(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[s]=n,r=s);else{if(!(co(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],l=[],d=1,h=null,p=3,f=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function M(e){if(m=!1,w(e),!y)if(null!==r(c))y=!0,D(A);else{var t=r(l);null!==t&&O(M,t.startTime-e)}}function A(e,n){y=!1,m&&(m=!1,v(I),I=-1),f=!0;var o=p;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!x());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var u=!0;else{var d=r(l);null!==d&&O(M,d.startTime-n),u=!1}return u}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,N=!1,T=null,I=-1,k=5,L=-1;function x(){return!(t.unstable_now()-Le||125a?(e.sortIndex=o,n(l,e),null===r(c)&&e===r(l)&&(m?(v(I),I=-1):m=!0,O(M,o-a))):(e.sortIndex=s,n(c,e),y||f||(y=!0,D(A))),e},t.unstable_shouldYield=x,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}})); + */var nD=function(e){return nk.createElement("svg",{className:["ChevronLeft","Icon",e.className].filter(Boolean).join(" "),xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16"},nk.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"}))},rD=function(){return nk.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"},nk.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),nk.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))},iD=$p((function(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(u,n))co(l,u)?(e[r]=l,e[c]=n,r=c):(e[r]=u,e[s]=n,r=s);else{if(!(co(l,n)))break e;e[r]=l,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var c=[],l=[],d=1,h=null,p=3,f=!1,y=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(l);null!==t;){if(null===t.callback)i(l);else{if(!(t.startTime<=e))break;i(l),t.sortIndex=t.expirationTime,n(c,t)}t=r(l)}}function M(e){if(m=!1,w(e),!y)if(null!==r(c))y=!0,D(A);else{var t=r(l);null!==t&&O(M,t.startTime-e)}}function A(e,n){y=!1,m&&(m=!1,v(I),I=-1),f=!0;var o=p;try{for(w(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!x());){var a=h.callback;if("function"==typeof a){h.callback=null,p=h.priorityLevel;var s=a(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),w(n)}else i(c);h=r(c)}if(null!==h)var u=!0;else{var d=r(l);null!==d&&O(M,d.startTime-n),u=!1}return u}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,N=!1,T=null,I=-1,k=5,L=-1;function x(){return!(t.unstable_now()-Le||125a?(e.sortIndex=o,n(l,e),null===r(c)&&e===r(l)&&(m?(v(I),I=-1):m=!0,O(M,o-a))):(e.sortIndex=s,n(c,e),y||f||(y=!0,D(A))),e},t.unstable_shouldYield=x,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}})); /** * @license React * scheduler.development.js @@ -127,7 +127,7 @@ $p((function(e,t){}));var nk=$p((function(e){e.exports=tk})),rk=nk.createContext * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -$p((function(e,t){}));var cD=$p((function(e){e.exports=uD})); +$p((function(e,t){}));var oD=$p((function(e){e.exports=iD})); /** * @license React * react-dom.production.min.js @@ -136,7 +136,7 @@ $p((function(e,t){}));var cD=$p((function(e){e.exports=uD})); * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function lD(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n