Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zircon-sdk

Package Overview
Dependencies
Maintainers
2
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zircon-sdk - npm Package Compare versions

Comparing version 1.0.6-alpha.8 to 1.0.6-alpha.9

1

dist/entities/pylon.d.ts

@@ -13,2 +13,3 @@ import { TokenAmount } from './fractions/tokenAmount';

static getAddress(tokenA: Token, tokenB: Token): string;
static ptCodeHash: (token: Token) => string;
static getLiquidityAddresses(tokenA: Token, tokenB: Token): [string, string];

@@ -15,0 +16,0 @@ constructor(pair: Pair, tokenAmount0: TokenAmount, tokenAmount1: TokenAmount);

2

dist/zircon-sdk.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e,r,n,i,o,a,s,u=t(require("jsbi")),c=t(require("tiny-invariant")),l=(t(require("tiny-warning")),require("@ethersproject/address")),h=t(require("big.js")),d=t(require("toformat")),f=t(require("decimal.js-light")),p=require("@ethersproject/solidity"),v=require("@ethersproject/contracts"),y=require("@ethersproject/networks"),m=require("@ethersproject/providers"),w=t(require("@uniswap/v2-core/build/IUniswapV2Pair.json")),g="0x621A22FeaF7C55CBE4c3317baa19e0387Fe0Ed63",k="0x276F6a823bd3E573230fC2fE18a2760f57d3Ab91",T="0x246b47F77Ba5D9A0e669ec4d33159f1EB39a1055",O="0xD462fF023aE9A40FEa0c9E40DAdbfAc8EFAa075e";(o=exports.ChainId||(exports.ChainId={}))[o.MAINNET=1]="MAINNET",o[o.STANDALONE=1281]="STANDALONE",o[o.MOONROCK=1286]="MOONROCK",o[o.MOONBASE=1287]="MOONBASE",o[o.MOONSHADOW=1288]="MOONSHADOW",(a=exports.TradeType||(exports.TradeType={}))[a.EXACT_INPUT=0]="EXACT_INPUT",a[a.EXACT_OUTPUT=1]="EXACT_OUTPUT",(s=exports.Rounding||(exports.Rounding={}))[s.ROUND_DOWN=0]="ROUND_DOWN",s[s.ROUND_HALF_UP=1]="ROUND_HALF_UP",s[s.ROUND_UP=2]="ROUND_UP";var A,q=((e={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",e[exports.ChainId.MOONROCK]=k,e[exports.ChainId.MOONBASE]=k,e[exports.ChainId.MOONSHADOW]=k,e),x=((r={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",r[exports.ChainId.MOONROCK]=T,r[exports.ChainId.MOONBASE]=T,r[exports.ChainId.MOONSHADOW]=T,r),b=((n={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",n[exports.ChainId.MOONROCK]=O,n[exports.ChainId.MOONBASE]=O,n[exports.ChainId.MOONSHADOW]=O,n),I="0x56dc0fd33f86964624c6b1dc95716cc706e4a7bd715f3f01589b510655b33ae2",P="0x76d70bb4b33576e895f22f07f4493a4ec0beec4051cc56a2586110867e2a6a78",E=u.BigInt(1e3),R=u.BigInt(0),N=u.BigInt(1),L=u.BigInt(2),C=u.BigInt(3),S=u.BigInt(5),U=u.BigInt(10),D=u.exponentiate(U,u.BigInt(18)),_=u.BigInt(100),F=u.BigInt(997),M=u.BigInt(1e3);!function(t){t.uint8="uint8",t.uint256="uint256"}(A||(A={}));var B=((i={})[A.uint8]=u.BigInt("0xff"),i[A.uint256]=u.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),i);function j(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var o=t.apply(e,r);function a(t){j(o,n,i,a,s,"next",t)}function s(t){j(o,n,i,a,s,"throw",t)}a(void 0)}))}}function W(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function X(t,e,r){return e&&W(t.prototype,e),r&&W(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function V(){return(V=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function G(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Y(t,e)}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Y(t,e){return(Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function z(t,e,r){return(z=Z()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&Y(i,r.prototype),i}).apply(null,arguments)}function J(t){var e="function"==typeof Map?new Map:void 0;return(J=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return z(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Y(r,t)})(t)}function Q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function tt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return $(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var et="setPrototypeOf"in Object,rt=function(t){function e(){var r;return(r=t.call(this)||this).isInsufficientReservesError=!0,r.name=r.constructor.name,et&&Object.setPrototypeOf(Q(r),(this instanceof e?this.constructor:void 0).prototype),r}return G(e,t),e}(J(Error)),nt=function(t){function e(){var r;return(r=t.call(this)||this).isInsufficientInputAmountError=!0,r.name=r.constructor.name,et&&Object.setPrototypeOf(Q(r),(this instanceof e?this.constructor:void 0).prototype),r}return G(e,t),e}(J(Error));function it(t,e){u.greaterThanOrEqual(t,R)||c(!1),u.lessThanOrEqual(t,B[e])||c(!1)}function ot(t){try{return l.getAddress(t)}catch(t){c(!1)}}function at(t){return t instanceof u?t:u.BigInt("bigint"==typeof t?t.toString():t)}function st(t){it(t,A.uint256);var e,r=R;if(u.greaterThan(t,C))for(r=t,e=u.add(u.divide(t,L),N);u.lessThan(e,r);)r=e,e=u.divide(u.add(u.divide(t,e),e),L);else u.notEqual(t,R)&&(r=N);return r}function ut(t,e,r,n){if(r>0||c(!1),t.length<=r||c(!1),0===t.length)return t.push(e),null;var i=t.length===r;if(i&&n(t[t.length-1],e)<=0)return e;for(var o=0,a=t.length;o<a;){var s=o+a>>>1;n(t[s],e)<=0?o=s+1:a=s}return t.splice(o,0,e),i?t.pop():null}var ct,lt=function(t,e,r){it(u.BigInt(t),A.uint8),this.decimals=t,this.symbol=e,this.name=r},ht=lt.DEV=new lt(18,"DEV","Dev"),dt=function(t){function e(e,r,n,i,o){var a;return(a=t.call(this,n,i,o)||this).chainId=e,a.address=ot(r),a}G(e,t);var r=e.prototype;return r.equals=function(t){return this===t||this.chainId===t.chainId&&this.address===t.address},r.sortsBefore=function(t){return this.chainId!==t.chainId&&c(!1),this.address===t.address&&c(!1),this.address.toLowerCase()<t.address.toLowerCase()},e}(lt);function ft(t,e){return t instanceof dt&&e instanceof dt?t.equals(e):!(t instanceof dt||e instanceof dt||t!==e)}var pt,vt,yt=((ct={})[exports.ChainId.MAINNET]=new dt(exports.ChainId.MAINNET,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),ct[exports.ChainId.STANDALONE]=new dt(exports.ChainId.STANDALONE,"0xC2Bf5F29a4384b1aB0C063e1c666f02121B6084a",18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONROCK]=new dt(exports.ChainId.MOONROCK,g,18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONBASE]=new dt(exports.ChainId.MOONBASE,g,18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONSHADOW]=new dt(exports.ChainId.MOONSHADOW,g,18,"WDEV","Wrapped Dev"),ct),mt=d(f),wt=d(h),gt=((pt={})[exports.Rounding.ROUND_DOWN]=mt.ROUND_DOWN,pt[exports.Rounding.ROUND_HALF_UP]=mt.ROUND_HALF_UP,pt[exports.Rounding.ROUND_UP]=mt.ROUND_UP,pt),kt=((vt={})[exports.Rounding.ROUND_DOWN]=0,vt[exports.Rounding.ROUND_HALF_UP]=1,vt[exports.Rounding.ROUND_UP]=3,vt),Tt=function(){function t(t,e){void 0===e&&(e=N),this.numerator=at(t),this.denominator=at(e)}var e=t.prototype;return e.invert=function(){return new t(this.denominator,this.numerator)},e.add=function(e){var r=e instanceof t?e:new t(at(e));return u.equal(this.denominator,r.denominator)?new t(u.add(this.numerator,r.numerator),this.denominator):new t(u.add(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator)),u.multiply(this.denominator,r.denominator))},e.subtract=function(e){var r=e instanceof t?e:new t(at(e));return u.equal(this.denominator,r.denominator)?new t(u.subtract(this.numerator,r.numerator),this.denominator):new t(u.subtract(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator)),u.multiply(this.denominator,r.denominator))},e.lessThan=function(e){var r=e instanceof t?e:new t(at(e));return u.lessThan(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.equalTo=function(e){var r=e instanceof t?e:new t(at(e));return u.equal(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.greaterThan=function(e){var r=e instanceof t?e:new t(at(e));return u.greaterThan(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.multiply=function(e){var r=e instanceof t?e:new t(at(e));return new t(u.multiply(this.numerator,r.numerator),u.multiply(this.denominator,r.denominator))},e.divide=function(e){var r=e instanceof t?e:new t(at(e));return new t(u.multiply(this.numerator,r.denominator),u.multiply(this.denominator,r.numerator))},e.toSignificant=function(t,e,r){void 0===e&&(e={groupSeparator:""}),void 0===r&&(r=exports.Rounding.ROUND_HALF_UP),Number.isInteger(t)||c(!1),t>0||c(!1),mt.set({precision:t+1,rounding:gt[r]});var n=new mt(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(t);return n.toFormat(n.decimalPlaces(),e)},e.toFixed=function(t,e,r){return void 0===e&&(e={groupSeparator:""}),void 0===r&&(r=exports.Rounding.ROUND_HALF_UP),Number.isInteger(t)||c(!1),t>=0||c(!1),wt.DP=t,wt.RM=kt[r],new wt(this.numerator.toString()).div(this.denominator.toString()).toFormat(t,e)},X(t,[{key:"quotient",get:function(){return u.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new t(u.remainder(this.numerator,this.denominator),this.denominator)}}]),t}(),Ot=d(h),At=function(t){function e(e,r){var n,i=at(r);return it(i,A.uint256),(n=t.call(this,i,u.exponentiate(U,u.BigInt(e.decimals)))||this).currency=e,n}G(e,t),e.ether=function(t){return new e(ht,t)};var r=e.prototype;return r.add=function(t){return ft(this.currency,t.currency)||c(!1),new e(this.currency,u.add(this.raw,t.raw))},r.subtract=function(t){return ft(this.currency,t.currency)||c(!1),new e(this.currency,u.subtract(this.raw,t.raw))},r.toSignificant=function(e,r,n){return void 0===e&&(e=6),void 0===n&&(n=exports.Rounding.ROUND_DOWN),t.prototype.toSignificant.call(this,e,r,n)},r.toFixed=function(e,r,n){return void 0===e&&(e=this.currency.decimals),void 0===n&&(n=exports.Rounding.ROUND_DOWN),e<=this.currency.decimals||c(!1),t.prototype.toFixed.call(this,e,r,n)},r.toExact=function(t){return void 0===t&&(t={groupSeparator:""}),Ot.DP=this.currency.decimals,new Ot(this.numerator.toString()).div(this.denominator.toString()).toFormat(t)},X(e,[{key:"raw",get:function(){return this.numerator}}]),e}(Tt),qt=function(t){function e(e,r){var n;return(n=t.call(this,e,r)||this).token=e,n}G(e,t);var r=e.prototype;return r.add=function(t){return this.token.equals(t.token)||c(!1),new e(this.token,u.add(this.raw,t.raw))},r.subtract=function(t){return this.token.equals(t.token)||c(!1),new e(this.token,u.subtract(this.raw,t.raw))},e}(At),xt=function(t){function e(e,r,n,i){var o;return(o=t.call(this,i,n)||this).baseCurrency=e,o.quoteCurrency=r,o.scalar=new Tt(u.exponentiate(U,u.BigInt(e.decimals)),u.exponentiate(U,u.BigInt(r.decimals))),o}G(e,t),e.fromRoute=function(t){for(var r,n=[],i=tt(t.pairs.entries());!(r=i()).done;){var o=r.value,a=o[1];n.push(t.path[o[0]].equals(a.token0)?new e(a.reserve0.currency,a.reserve1.currency,a.reserve0.raw,a.reserve1.raw):new e(a.reserve1.currency,a.reserve0.currency,a.reserve1.raw,a.reserve0.raw))}return n.slice(1).reduce((function(t,e){return t.multiply(e)}),n[0])};var r=e.prototype;return r.invert=function(){return new e(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){ft(this.quoteCurrency,r.baseCurrency)||c(!1);var n=t.prototype.multiply.call(this,r);return new e(this.baseCurrency,r.quoteCurrency,n.denominator,n.numerator)},r.quote=function(e){return ft(e.currency,this.baseCurrency)||c(!1),this.quoteCurrency instanceof dt?new qt(this.quoteCurrency,t.prototype.multiply.call(this,e.raw).quotient):At.ether(t.prototype.multiply.call(this,e.raw).quotient)},r.toSignificant=function(t,e,r){return void 0===t&&(t=6),this.adjusted.toSignificant(t,e,r)},r.toFixed=function(t,e,r){return void 0===t&&(t=4),this.adjusted.toFixed(t,e,r)},X(e,[{key:"raw",get:function(){return new Tt(this.numerator,this.denominator)}},{key:"adjusted",get:function(){return t.prototype.multiply.call(this,this.scalar)}}]),e}(Tt),bt={},It=function(){function t(e,r){var n=e.token.sortsBefore(r.token)?[e,r]:[r,e];this.liquidityToken=new dt(n[0].token.chainId,t.getAddress(n[0].token,n[1].token),18,"UNI-V2","Uniswap V2"),this.tokenAmounts=n}t.getAddress=function(t,e){var r,n,i,o,a,s=t.sortsBefore(e)?[t,e]:[e,t];return void 0===(null==(r=bt)||null==(n=r[s[0].address])?void 0:n[s[1].address])&&(bt=V({},bt,((a={})[s[0].address]=V({},null==(i=bt)?void 0:i[s[0].address],((o={})[s[1].address]=l.getCreate2Address(q[s[0].chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[s[0].address,s[1].address])]),I),o)),a))),bt[s[0].address][s[1].address]};var e=t.prototype;return e.involvesToken=function(t){return t.equals(this.token0)||t.equals(this.token1)},e.priceOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.token0Price:this.token1Price},e.reserveOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.reserve0:this.reserve1},e.getOutputAmount=function(e){if(this.involvesToken(e.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R))throw new rt;var r=this.reserveOf(e.token),n=this.reserveOf(e.token.equals(this.token0)?this.token1:this.token0),i=u.multiply(e.raw,F),o=u.multiply(i,n.raw),a=u.add(u.multiply(r.raw,M),i),s=new qt(e.token.equals(this.token0)?this.token1:this.token0,u.divide(o,a));if(u.equal(s.raw,R))throw new nt;return[s,new t(r.add(e),n.subtract(s))]},e.getInputAmount=function(e){if(this.involvesToken(e.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R)||u.greaterThanOrEqual(e.raw,this.reserveOf(e.token).raw))throw new rt;var r=this.reserveOf(e.token),n=this.reserveOf(e.token.equals(this.token0)?this.token1:this.token0),i=u.multiply(u.multiply(n.raw,e.raw),M),o=u.multiply(u.subtract(r.raw,e.raw),F),a=new qt(e.token.equals(this.token0)?this.token1:this.token0,u.add(u.divide(i,o),N));return[a,new t(n.add(a),r.subtract(e))]},e.getLiquidityMinted=function(t,e,r){t.token.equals(this.liquidityToken)||c(!1);var n,i=e.token.sortsBefore(r.token)?[e,r]:[r,e];if(i[0].token.equals(this.token0)&&i[1].token.equals(this.token1)||c(!1),u.equal(t.raw,R))n=u.subtract(st(u.multiply(i[0].raw,i[1].raw)),E);else{var o=u.divide(u.multiply(i[0].raw,t.raw),this.reserve0.raw),a=u.divide(u.multiply(i[1].raw,t.raw),this.reserve1.raw);n=u.lessThanOrEqual(o,a)?o:a}if(!u.greaterThan(n,R))throw new nt;return new qt(this.liquidityToken,n)},e.getLiquidityValue=function(t,e,r,n,i){var o;if(void 0===n&&(n=!1),this.involvesToken(t)||c(!1),e.token.equals(this.liquidityToken)||c(!1),r.token.equals(this.liquidityToken)||c(!1),u.lessThanOrEqual(r.raw,e.raw)||c(!1),n){i||c(!1);var a=at(i);if(u.equal(a,R))o=e;else{var s=st(u.multiply(this.reserve0.raw,this.reserve1.raw)),l=st(a);if(u.greaterThan(s,l)){var h=u.multiply(e.raw,u.subtract(s,l)),d=u.add(u.multiply(s,S),l),f=u.divide(h,d);o=e.add(new qt(this.liquidityToken,f))}else o=e}}else o=e;return new qt(t,u.divide(u.multiply(r.raw,this.reserveOf(t).raw),o.raw))},X(t,[{key:"token0Price",get:function(){return new xt(this.token0,this.token1,this.tokenAmounts[0].raw,this.tokenAmounts[1].raw)}},{key:"token1Price",get:function(){return new xt(this.token1,this.token0,this.tokenAmounts[1].raw,this.tokenAmounts[0].raw)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].token}},{key:"token1",get:function(){return this.tokenAmounts[1].token}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),t}(),Pt=function(){function t(t,e,r){t.length>0||c(!1),t.every((function(e){return e.chainId===t[0].chainId}))||c(!1),e instanceof dt&&t[0].involvesToken(e)||e===ht&&t[0].involvesToken(yt[t[0].chainId])||c(!1),void 0===r||r instanceof dt&&t[t.length-1].involvesToken(r)||r===ht&&t[t.length-1].involvesToken(yt[t[0].chainId])||c(!1);for(var n,i=[e instanceof dt?e:yt[t[0].chainId]],o=tt(t.entries());!(n=o()).done;){var a=n.value,s=a[1],u=i[a[0]];u.equals(s.token0)||u.equals(s.token1)||c(!1);var l=u.equals(s.token0)?s.token1:s.token0;i.push(l)}this.pairs=t,this.path=i,this.midPrice=xt.fromRoute(this),this.input=e,this.output=null!=r?r:i[i.length-1]}return X(t,[{key:"chainId",get:function(){return this.pairs[0].chainId}}]),t}(),Et=new Tt(_),Rt=function(t){function e(){return t.apply(this,arguments)||this}G(e,t);var r=e.prototype;return r.toSignificant=function(t,e,r){return void 0===t&&(t=5),this.multiply(Et).toSignificant(t,e,r)},r.toFixed=function(t,e,r){return void 0===t&&(t=2),this.multiply(Et).toFixed(t,e,r)},e}(Tt);function Nt(t,e){return ft(t.inputAmount.currency,e.inputAmount.currency)||c(!1),ft(t.outputAmount.currency,e.outputAmount.currency)||c(!1),t.outputAmount.equalTo(e.outputAmount)?t.inputAmount.equalTo(e.inputAmount)?0:t.inputAmount.lessThan(e.inputAmount)?-1:1:t.outputAmount.lessThan(e.outputAmount)?1:-1}function Lt(t,e){var r=Nt(t,e);return 0!==r?r:t.priceImpact.lessThan(e.priceImpact)?-1:t.priceImpact.greaterThan(e.priceImpact)?1:t.route.path.length-e.route.path.length}function Ct(t,e){return t instanceof qt?t:t.currency===ht?new qt(yt[e],t.raw):void c(!1)}function St(t,e){return t instanceof dt?t:t===ht?yt[e]:void c(!1)}var Ut=function(){function t(t,e,r){var n,i,o,a=new Array(t.path.length),s=new Array(t.pairs.length);if(r===exports.TradeType.EXACT_INPUT){ft(e.currency,t.input)||c(!1),a[0]=Ct(e,t.chainId);for(var u=0;u<t.path.length-1;u++){var l=t.pairs[u].getOutputAmount(a[u]),h=l[1];a[u+1]=l[0],s[u]=h}}else{ft(e.currency,t.output)||c(!1),a[a.length-1]=Ct(e,t.chainId);for(var d=t.path.length-1;d>0;d--){var f=t.pairs[d-1].getInputAmount(a[d]),p=f[1];a[d-1]=f[0],s[d-1]=p}}this.route=t,this.tradeType=r,this.inputAmount=r===exports.TradeType.EXACT_INPUT?e:t.input===ht?At.ether(a[0].raw):a[0],this.outputAmount=r===exports.TradeType.EXACT_OUTPUT?e:t.output===ht?At.ether(a[a.length-1].raw):a[a.length-1],this.executionPrice=new xt(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.raw,this.outputAmount.raw),this.nextMidPrice=xt.fromRoute(new Pt(s,t.input)),this.priceImpact=(n=this.outputAmount,o=(i=t.midPrice.raw.multiply(this.inputAmount.raw)).subtract(n.raw).divide(i),new Rt(o.numerator,o.denominator))}t.exactIn=function(e,r){return new t(e,r,exports.TradeType.EXACT_INPUT)},t.exactOut=function(e,r){return new t(e,r,exports.TradeType.EXACT_OUTPUT)};var e=t.prototype;return e.minimumAmountOut=function(t){if(t.lessThan(R)&&c(!1),this.tradeType===exports.TradeType.EXACT_OUTPUT)return this.outputAmount;var e=new Tt(N).add(t).invert().multiply(this.outputAmount.raw).quotient;return this.outputAmount instanceof qt?new qt(this.outputAmount.token,e):At.ether(e)},e.maximumAmountIn=function(t){if(t.lessThan(R)&&c(!1),this.tradeType===exports.TradeType.EXACT_INPUT)return this.inputAmount;var e=new Tt(N).add(t).multiply(this.inputAmount.raw).quotient;return this.inputAmount instanceof qt?new qt(this.inputAmount.token,e):At.ether(e)},t.bestTradeExactIn=function(e,r,n,i,o,a,s){var u=void 0===i?{}:i,l=u.maxNumResults,h=void 0===l?3:l,d=u.maxHops,f=void 0===d?3:d;void 0===o&&(o=[]),void 0===a&&(a=r),void 0===s&&(s=[]),e.length>0||c(!1),f>0||c(!1),a===r||o.length>0||c(!1);var p=r instanceof qt?r.token.chainId:n instanceof dt?n.chainId:void 0;void 0===p&&c(!1);for(var v=Ct(r,p),y=St(n,p),m=0;m<e.length;m++){var w=e[m];if((w.token0.equals(v.token)||w.token1.equals(v.token))&&!w.reserve0.equalTo(R)&&!w.reserve1.equalTo(R)){var g=void 0;try{g=w.getOutputAmount(v)[0]}catch(t){if(t.isInsufficientInputAmountError)continue;throw t}if(g.token.equals(y))ut(s,new t(new Pt([].concat(o,[w]),a.currency,n),a,exports.TradeType.EXACT_INPUT),h,Lt);else if(f>1&&e.length>1){var k=e.slice(0,m).concat(e.slice(m+1,e.length));t.bestTradeExactIn(k,g,n,{maxNumResults:h,maxHops:f-1},[].concat(o,[w]),a,s)}}}return s},t.bestTradeExactOut=function(e,r,n,i,o,a,s){var u=void 0===i?{}:i,l=u.maxNumResults,h=void 0===l?3:l,d=u.maxHops,f=void 0===d?3:d;void 0===o&&(o=[]),void 0===a&&(a=n),void 0===s&&(s=[]),e.length>0||c(!1),f>0||c(!1),a===n||o.length>0||c(!1);var p=n instanceof qt?n.token.chainId:r instanceof dt?r.chainId:void 0;void 0===p&&c(!1);for(var v=Ct(n,p),y=St(r,p),m=0;m<e.length;m++){var w=e[m];if((w.token0.equals(v.token)||w.token1.equals(v.token))&&!w.reserve0.equalTo(R)&&!w.reserve1.equalTo(R)){var g=void 0;try{g=w.getInputAmount(v)[0]}catch(t){if(t.isInsufficientReservesError)continue;throw t}if(g.token.equals(y))ut(s,new t(new Pt([w].concat(o),r,a.currency),a,exports.TradeType.EXACT_OUTPUT),h,Lt);else if(f>1&&e.length>1){var k=e.slice(0,m).concat(e.slice(m+1,e.length));t.bestTradeExactOut(k,r,g,{maxNumResults:h,maxHops:f-1},[w].concat(o),a,s)}}}return s},t}(),Dt=function(){function t(e,r,n){var i=[r,n];this.address=t.getAddress(i[0].token,i[1].token),this.pair=e;var o=l.getCreate2Address(x[i[0].token.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[i[0].token.address,this.address])]),P),a=l.getCreate2Address(x[i[1].token.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[i[1].token.address,this.address])]),P);this.floatLiquidityToken=new dt(i[0].token.chainId,o,18,"ZR-FT","Zircon FT"),this.anchorLiquidityToken=new dt(i[0].token.chainId,a,18,"ZR-AT","Zircon AT"),this.tokenAmounts=i}t.getAddress=function(t,e){var r=It.getAddress(t,e);return l.getCreate2Address(x[t.chainId],p.keccak256(["bytes"],[p.pack(["address","address","address"],[t.address,e.address,r])]),"0xe9f29a32ecac75732f474db4cc8a5f7200df9570f98d23ea3e38151c6d21d16c")},t.getLiquidityAddresses=function(e,r){var n=t.getAddress(e,r);return[l.getCreate2Address(b[e.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[e.address,n])]),P),l.getCreate2Address(b[r.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[r.address,n])]),P)]};var e=t.prototype;return e.involvesToken=function(t){return t.equals(this.token0)||t.equals(this.token1)},e.getPairReserves=function(){return this.token0.equals(this.pair.token0)?[this.pair.reserve0,this.pair.reserve1]:[this.pair.reserve1,this.pair.reserve0]},e.sqrt=function(t){return u.greaterThan(t,R)||c(!1),u.lessThanOrEqual(t,L)?t:function t(e,r){var n=u.signedRightShift(u.add(u.divide(e,r),r),N);return u.equal(r,n)||u.equal(r,u.subtract(n,N))?r:t(e,n)}(t,N)},e.translateToPylon=function(t,e,r){return u.divide(u.multiply(t,e.raw),r.raw)},e.updateSync=function(t,e,r,n,i,o,a){var s=this.sqrt(u.multiply(this.getPairReserves()[0].raw,this.getPairReserves()[1].raw)),c=this.translateToPylon(u.multiply(L,this.getPairReserves()[1].raw),i,o),l=this.translateToPylon(u.multiply(L,this.getPairReserves()[0].raw),i,o),h=u.subtract(D,u.divide(u.multiply(D,u.multiply(this.sqrt(t),o.raw)),u.multiply(s,a))),d=u.divide(u.multiply(h,c),D),f=u.divide(u.multiply(h,l),D),p=u.add(e,u.divide(u.multiply(d,n),D)),v=u.add(r,u.divide(u.multiply(f,u.subtract(D,n)),D));return{gamma:u.lessThan(u.subtract(p,this.reserve1.raw),u.divide(c,L))?u.subtract(D,u.divide(u.multiply(D,u.subtract(p,this.reserve1.raw)),c)):u.divide(u.multiply(D,u.subtract(v,this.reserve0.raw)),l),vab:p}},e.calculatePTU=function(t,e,r,n,i,o,a){var s;if(i.token.equals(this.anchorLiquidityToken)||i.token.equals(this.floatLiquidityToken)||c(!1),t)s=u.equal(i.raw,R)?u.subtract(e.raw,E):u.divide(u.multiply(i.raw,e.raw),o);else{var l;if(u.equal(i.raw,R))l=u.multiply(L,a);else{var h=this.translateToPylon(this.pair.reserve0.raw,n,r);l=u.add(u.divide(u.multiply(u.multiply(h,a),L),D),this.reserve0.raw)}s=u.equal(i.raw,R)?u.subtract(u.divide(u.multiply(D,e.raw),l),E):u.divide(u.multiply(i.raw,e.raw),l)}return s},e.getLiquidityFromPoolTokensLiquidity=function(t,e,r,n,i,o,a,s){var c;if(o){var l=u.divide(u.multiply(this.getPairReserves()[1].raw,u.multiply(t.raw,L)),this.getPairReserves()[0].raw),h=u.multiply(e.raw,L);c=new qt(t.token,u.greaterThan(l,h)?h:l)}else{var d=u.divide(u.multiply(this.getPairReserves()[0].raw,u.multiply(e.raw,L)),this.getPairReserves()[1].raw),f=u.multiply(t.raw,L);c=new qt(e.token,u.greaterThan(d,f)?f:d)}return this.calculatePTU(o,c,r,n,i,a,s)},e.reserveOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.reserve0:this.reserve1},e.getOutputAmount=function(t){if(this.involvesToken(t.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R))throw new rt;var e=this.reserveOf(t.token),r=this.reserveOf(t.token.equals(this.token0)?this.token1:this.token0),n=u.multiply(t.raw,F),i=u.multiply(n,r.raw),o=u.add(u.multiply(e.raw,M),n),a=new qt(t.token.equals(this.token0)?this.token1:this.token0,u.divide(i,o));if(u.equal(a.raw,R))throw new nt;return[a,new It(e.add(t),r.subtract(a))]},e.getInputAmount=function(t){if(this.involvesToken(t.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R)||u.greaterThanOrEqual(t.raw,this.reserveOf(t.token).raw))throw new rt;var e=this.reserveOf(t.token),r=this.reserveOf(t.token.equals(this.token0)?this.token1:this.token0),n=u.multiply(u.multiply(r.raw,t.raw),M),i=u.multiply(u.subtract(e.raw,t.raw),F),o=new qt(t.token.equals(this.token0)?this.token1:this.token0,u.add(u.divide(n,i),N));return[o,new It(r.add(o),e.subtract(t))]},e.initializeValues=function(t,e,r){var n,i=r.raw,o=e.raw;n=u.notEqual(this.getPairReserves()[0].raw,R)?u.divide(u.multiply(i,this.getPairReserves()[0].raw),this.getPairReserves()[1].raw):u.divide(u.multiply(i,e.raw),r.raw);var a=u.divide(u.multiply(D,o),u.add(o,n));return[this.calculatePTU(!1,e,t,new qt(e.token,R),new qt(this.floatLiquidityToken,R),i,a),this.calculatePTU(!0,r,t,new qt(e.token,R),new qt(this.anchorLiquidityToken,R),i,a)]},e.getAnchorAsync100LiquidityMinted=function(t,e,r,n,i,o,a,s,l){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token1)||c(!1);var h=new qt(this.token1,u.divide(r.raw,L)),d=this.pair.getOutputAmount(h),f=this.getAnchorAsyncLiquidityMinted(t,e,d[0],h,n,i,o,a,s,l);if(!u.greaterThan(f.raw,R))throw new nt;return new qt(this.anchorLiquidityToken,f.raw)},e.getFloatAsync100LiquidityMinted=function(t,e,r,n,i,o,a,s,l){e.token.equals(this.floatLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token0)||c(!1);var h=new qt(this.token0,u.divide(r.raw,L)),d=this.pair.getOutputAmount(h),f=this.getFloatAsyncLiquidityMinted(t,e,h,d[0],n,i,o,a,s,l);if(!u.greaterThan(f.raw,R))throw new nt;return f},e.getAnchorAsyncLiquidityMinted=function(t,e,r,n,i,o,a,s,l,h){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1);var d=[r,n];d[0].token.equals(this.token0)&&d[1].token.equals(this.token1)||c(!1);var f=this.updateSync(at(s),at(i),at(o),at(a),l,t,at(h)),p=this.getLiquidityFromPoolTokensLiquidity(r,n,t,l,e,!0,f.vab);if(!u.greaterThan(p,R))throw new nt;return new qt(this.anchorLiquidityToken,p)},e.getFloatAsyncLiquidityMinted=function(t,e,r,n,i,o,a,s,l,h){e.token.equals(this.floatLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1);var d=[r,n];d[0].token.equals(this.token0)&&d[1].token.equals(this.token1)||c(!1);var f=this.updateSync(at(s),at(i),at(o),at(a),l,t,at(h)),p=this.getLiquidityFromPoolTokensLiquidity(r,n,t,l,e,!1,f.vab,f.gamma);if(!u.greaterThan(p,R))throw new nt;return new qt(this.anchorLiquidityToken,p)},e.getAnchorSyncLiquidityMinted=function(t,e,r,n,i,o,a,s,l){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token1)||c(!1);var h=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(l)),d=this.calculatePTU(!0,r,t,s,e,h.vab);if(!u.greaterThan(d,R))throw new nt;return new qt(this.anchorLiquidityToken,d)},e.getFloatSyncLiquidityMinted=function(t,e,r,n,i,o,a,s,l){t.token.equals(this.pair.liquidityToken)||c(!1),e.token.equals(this.floatLiquidityToken)||c(!1),r.token.equals(this.token0)||c(!1);var h=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(l)),d=this.calculatePTU(!1,r,t,s,e,h.vab,h.gamma);if(!u.greaterThan(d,R))throw new nt;return new qt(this.floatLiquidityToken,d)},e.calculatePTUToAmount=function(t,e,r,n,i,o,a){return u.divide(u.multiply(a?n:u.add(u.divide(u.multiply(u.multiply(u.divide(u.multiply(this.getPairReserves()[0].raw,i),t.raw),o),L),D),this.reserve0.raw),r.raw),e.raw)},e.getOmegaSlashing=function(t,e,r,n){return u.divide(u.multiply(this.translateToPylon(u.multiply(this.getPairReserves()[1].raw,L),r,n),u.subtract(D,t)),u.subtract(e,this.reserve1.raw))},e.calculateLPTU=function(t,e,r,n,i,o,a){var s;return a?(s=u.divide(u.multiply(o.raw,u.subtract(n,this.reserve1.raw)),u.multiply(L,this.translateToPylon(this.getPairReserves()[1].raw,o,t))),s=u.add(s,u.divide(u.multiply(s,this.reserve1.raw),this.translateToPylon(u.multiply(this.getPairReserves()[1].raw,L),o,t)))):(s=u.divide(u.multiply(i,o.raw),D),s=u.add(s,u.divide(u.multiply(s,this.reserve0.raw),this.translateToPylon(u.multiply(this.getPairReserves()[0].raw,L),o,t)))),u.divide(u.multiply(s,r),e.raw)},e.burnFloat=function(t,e,r,n,i,o,a,s,c){var l=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(c)),h=this.calculatePTU(!1,this.reserve0,t,s,e,l.vab,l.gamma),d=u.greaterThan(h,r.raw)?r.raw:h,f=this.calculatePTUToAmount(t,e,new qt(r.token,d),l.vab,l.gamma,s.raw,!1);if(u.lessThan(h,r.raw)){var p=u.subtract(r.raw,h),v=this.calculateLPTU(t,e,p,l.vab,l.gamma,s,!1),y=u.divide(u.multiply(v,this.getPairReserves()[0].raw),t.raw),m=u.divide(u.multiply(v,this.getPairReserves()[1].raw),t.raw),w=new It(new qt(this.getPairReserves()[0].token,u.subtract(this.getPairReserves()[0].raw,y)),new qt(this.getPairReserves()[1].token,u.subtract(this.getPairReserves()[1].raw,m))).getOutputAmount(new qt(this.token1,m));f=u.add(f,u.add(y,w[0].raw))}return new qt(r.token,f)},e.burnAnchor=function(t,e,r,n,i,o,a,s,c){var l=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(c)),h=this.calculatePTU(!0,this.reserve1,t,s,e,l.vab,l.gamma),d=u.greaterThan(h,r.raw)?r.raw:h,f=this.calculatePTUToAmount(t,e,new qt(r.token,d),l.vab,l.gamma,s.raw,!0);if(u.lessThan(h,r.raw)){var p=this.getOmegaSlashing(l.gamma,l.vab,s,t);console.log("omega",p.toString(10));var v=u.divide(u.multiply(p,u.subtract(r.raw,h)),D),y=this.calculateLPTU(t,e,v,l.vab,l.gamma,s,!0),m=u.divide(u.multiply(y,this.getPairReserves()[0].raw),t.raw),w=u.divide(u.multiply(y,this.getPairReserves()[1].raw),t.raw),g=new It(new qt(this.getPairReserves()[0].token,u.subtract(this.getPairReserves()[0].raw,m)),new qt(this.getPairReserves()[1].token,u.subtract(this.getPairReserves()[1].raw,w))).getOutputAmount(new qt(this.token0,m));f=u.add(f,u.add(w,g[0].raw))}return new qt(r.token,f)},e.burnAsyncAnchor=function(t,e,r,n,i,o,a,s,c){var l=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(c)),h=this.getOmegaSlashing(l.gamma,l.vab,s,t);console.log("omega",h.toString(10));var d=u.divide(u.multiply(h,r.raw),D),f=this.calculateLPTU(t,e,d,l.vab,l.gamma,s,!0),p=u.divide(u.multiply(f,this.getPairReserves()[0].raw),t.raw),v=u.divide(u.multiply(f,this.getPairReserves()[1].raw),t.raw);return[new qt(this.token0,p),new qt(this.token1,v)]},e.burnAsyncFloat=function(t,e,r,n,i,o,a,s,c){var l=this.updateSync(at(a),at(n),at(i),at(o),s,t,at(c)),h=this.calculateLPTU(t,e,r.raw,l.vab,l.gamma,s,!1),d=u.divide(u.multiply(h,this.getPairReserves()[0].raw),t.raw),f=u.divide(u.multiply(h,this.getPairReserves()[1].raw),t.raw);return[new qt(this.token0,d),new qt(this.token1,f)]},e.getLiquidityValue=function(t,e,r,n,i){var o;if(void 0===n&&(n=!1),this.involvesToken(t)||c(!1),e.token.equals(this.anchorLiquidityToken)||e.token.equals(this.floatLiquidityToken)||c(!1),r.token.equals(this.anchorLiquidityToken)||r.token.equals(this.floatLiquidityToken)||c(!1),u.lessThanOrEqual(r.raw,e.raw)||c(!1),n){i||c(!1);var a=at(i);if(u.equal(a,R))o=e;else{var s=st(u.multiply(this.getPairReserves()[0].raw,this.getPairReserves()[1].raw)),l=st(a);if(u.greaterThan(s,l)){var h=u.multiply(e.raw,u.subtract(s,l)),d=u.add(u.multiply(s,S),l),f=u.divide(h,d);o=e.add(new qt(r.token,f))}else o=e}}else o=e;return new qt(t,u.divide(u.multiply(r.raw,this.reserveOf(t).raw),o.raw))},X(t,[{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].token}},{key:"token1",get:function(){return this.tokenAmounts[1].token}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),t}();function _t(t){return"0x"+t.raw.toString(16)}var Ft,Mt,Bt=function(){function t(){}return t.swapCallParameters=function(t,e){var r=t.inputAmount.currency===ht,n=t.outputAmount.currency===ht;r&&n&&c(!1),!("ttl"in e)||e.ttl>0||c(!1);var i,o,a,s=ot(e.recipient),u=_t(t.maximumAmountIn(e.allowedSlippage)),l=_t(t.minimumAmountOut(e.allowedSlippage)),h=t.route.path.map((function(t){return t.address})),d="ttl"in e?"0x"+(Math.floor((new Date).getTime()/1e3)+e.ttl).toString(16):"0x"+e.deadline.toString(16),f=Boolean(e.feeOnTransfer);switch(t.tradeType){case exports.TradeType.EXACT_INPUT:r?(i=f?"swapExactETHForTokensSupportingFeeOnTransferTokens":"swapExactETHForTokens",o=[l,h,s,d],a=u):n?(i=f?"swapExactTokensForETHSupportingFeeOnTransferTokens":"swapExactTokensForETH",o=[u,l,h,s,d],a="0x0"):(i=f?"swapExactTokensForTokensSupportingFeeOnTransferTokens":"swapExactTokensForTokens",o=[u,l,h,s,d],a="0x0");break;case exports.TradeType.EXACT_OUTPUT:f&&c(!1),r?(i="swapETHForExactTokens",o=[l,h,s,d],a=u):n?(i="swapTokensForExactETH",o=[l,u,h,s,d],a="0x0"):(i="swapTokensForExactTokens",o=[l,u,h,s,d],a="0x0")}return{methodName:i,args:o,value:a}},t}(),jt=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof h?e:h).prototype),o=new A(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return{value:void 0,done:!0}}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=k(a,r);if(s){if(s===l)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===l)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,o),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var l={};function h(){}function d(){}function f(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(q([])));y&&y!==e&&r.call(y,i)&&(p=y);var m=f.prototype=h.prototype=Object.create(p);function w(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(i,o){function a(){return new e((function(n,a){!function n(i,o,a,s){var u=c(t[i],t,o);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==typeof h&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}(i,o,n,a)}))}return n=n?n.then(a,a):a()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,l;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function q(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=f,s(m,"constructor",f),s(f,"constructor",d),d.displayName=s(f,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},w(g.prototype),s(g.prototype,o,(function(){return this})),t.AsyncIterator=g,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var a=new g(u(e,r,n,i),o);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(m),s(m,a,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=q,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:q(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(Mt={exports:{}}),Mt.exports),Ht=[{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"}],Wt=((Ft={})[exports.ChainId.MAINNET]={"0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A":9},Ft),Xt=function(){function t(){}return t.fetchTokenData=function(){var t=H(jt.mark((function t(e,r,n,i,o){var a,s;return jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===n&&(n=m.getDefaultProvider(y.getNetwork(e))),"number"!=typeof(null==(a=Wt)||null==(s=a[e])?void 0:s[r])){t.next=5;break}t.t0=Wt[e][r],t.next=8;break;case 5:return t.next=7,new v.Contract(r,Ht,n).decimals().then((function(t){var n,i,o;return Wt=V({},Wt,((o={})[e]=V({},null==(n=Wt)?void 0:n[e],((i={})[r]=t,i)),o)),t}));case 7:t.t0=t.sent;case 8:return t.abrupt("return",new dt(e,r,t.t0,i,o));case 10:case"end":return t.stop()}}),t)})));return function(e,r,n,i,o){return t.apply(this,arguments)}}(),t.fetchPairData=function(){var t=H(jt.mark((function t(e,r,n){var i,o,a,s,u;return jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n=m.getDefaultProvider(y.getNetwork(e.chainId))),e.chainId!==r.chainId&&c(!1),i=It.getAddress(e,r),t.next=5,new v.Contract(i,w.abi,n).getReserves();case 5:return a=(o=t.sent)[0],s=o[1],u=e.sortsBefore(r)?[a,s]:[s,a],t.abrupt("return",new It(new qt(e,u[0]),new qt(r,u[1])));case 10:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),t}();exports.JSBI=u,exports.Currency=lt,exports.CurrencyAmount=At,exports.DEV=ht,exports.FACTORY_ADDRESS=q,exports.Fetcher=Xt,exports.Fraction=Tt,exports.INIT_CODE_HASH=I,exports.InsufficientInputAmountError=nt,exports.InsufficientReservesError=rt,exports.MINIMUM_LIQUIDITY=E,exports.Pair=It,exports.Percent=Rt,exports.Price=xt,exports.Pylon=Dt,exports.Route=Pt,exports.Router=Bt,exports.Token=dt,exports.TokenAmount=qt,exports.Trade=Ut,exports.WDEV=yt,exports.currencyEquals=ft,exports.inputOutputComparator=Nt,exports.tradeComparator=Lt;
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e,r,n,i,a,o,s,u=t(require("jsbi")),c=t(require("tiny-invariant")),d=(t(require("tiny-warning")),require("@ethersproject/address")),f=t(require("big.js")),l=t(require("toformat")),h=t(require("decimal.js-light")),p=require("@ethersproject/solidity"),v=require("@ethersproject/abi"),y=require("@ethersproject/contracts"),m=require("@ethersproject/networks"),b=require("@ethersproject/providers"),w=t(require("@uniswap/v2-core/build/IUniswapV2Pair.json")),g="0x621A22FeaF7C55CBE4c3317baa19e0387Fe0Ed63",k="0x276F6a823bd3E573230fC2fE18a2760f57d3Ab91",T="0x246b47F77Ba5D9A0e669ec4d33159f1EB39a1055",A="0xD462fF023aE9A40FEa0c9E40DAdbfAc8EFAa075e";(a=exports.ChainId||(exports.ChainId={}))[a.MAINNET=1]="MAINNET",a[a.STANDALONE=1281]="STANDALONE",a[a.MOONROCK=1286]="MOONROCK",a[a.MOONBASE=1287]="MOONBASE",a[a.MOONSHADOW=1288]="MOONSHADOW",(o=exports.TradeType||(exports.TradeType={}))[o.EXACT_INPUT=0]="EXACT_INPUT",o[o.EXACT_OUTPUT=1]="EXACT_OUTPUT",(s=exports.Rounding||(exports.Rounding={}))[s.ROUND_DOWN=0]="ROUND_DOWN",s[s.ROUND_HALF_UP=1]="ROUND_HALF_UP",s[s.ROUND_UP=2]="ROUND_UP";var O,q=((e={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",e[exports.ChainId.MOONROCK]=k,e[exports.ChainId.MOONBASE]=k,e[exports.ChainId.MOONSHADOW]=k,e),x=((r={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",r[exports.ChainId.MOONROCK]=T,r[exports.ChainId.MOONBASE]=T,r[exports.ChainId.MOONSHADOW]=T,r),I=((n={})[exports.ChainId.STANDALONE]="0x5c4242beB94dE30b922f57241f1D02f36e906915",n[exports.ChainId.MOONROCK]=A,n[exports.ChainId.MOONBASE]=A,n[exports.ChainId.MOONSHADOW]=A,n),P="0x56dc0fd33f86964624c6b1dc95716cc706e4a7bd715f3f01589b510655b33ae2",E=u.BigInt(1e3),R=u.BigInt(0),N=u.BigInt(1),C=u.BigInt(2),L=u.BigInt(3),S=u.BigInt(5),U=u.BigInt(10),D=u.exponentiate(U,u.BigInt(18)),_=u.BigInt(100),F=u.BigInt(997),M=u.BigInt(1e3);!function(t){t.uint8="uint8",t.uint256="uint256"}(O||(O={}));var B=((i={})[O.uint8]=u.BigInt("0xff"),i[O.uint256]=u.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),i);function j(t,e,r,n,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){j(a,n,i,o,s,"next",t)}function s(t){j(a,n,i,o,s,"throw",t)}o(void 0)}))}}function W(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function X(t,e,r){return e&&W(t.prototype,e),r&&W(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function V(){return(V=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function G(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Y(t,e)}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Y(t,e){return(Y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function z(t,e,r){return(z=Z()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&Y(i,r.prototype),i}).apply(null,arguments)}function J(t){var e="function"==typeof Map?new Map:void 0;return(J=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return z(t,arguments,K(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Y(r,t)})(t)}function Q(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function tt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return $(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var et="setPrototypeOf"in Object,rt=function(t){function e(){var r;return(r=t.call(this)||this).isInsufficientReservesError=!0,r.name=r.constructor.name,et&&Object.setPrototypeOf(Q(r),(this instanceof e?this.constructor:void 0).prototype),r}return G(e,t),e}(J(Error)),nt=function(t){function e(){var r;return(r=t.call(this)||this).isInsufficientInputAmountError=!0,r.name=r.constructor.name,et&&Object.setPrototypeOf(Q(r),(this instanceof e?this.constructor:void 0).prototype),r}return G(e,t),e}(J(Error));function it(t,e){u.greaterThanOrEqual(t,R)||c(!1),u.lessThanOrEqual(t,B[e])||c(!1)}function at(t){try{return d.getAddress(t)}catch(t){c(!1)}}function ot(t){return t instanceof u?t:u.BigInt("bigint"==typeof t?t.toString():t)}function st(t){it(t,O.uint256);var e,r=R;if(u.greaterThan(t,L))for(r=t,e=u.add(u.divide(t,C),N);u.lessThan(e,r);)r=e,e=u.divide(u.add(u.divide(t,e),e),C);else u.notEqual(t,R)&&(r=N);return r}function ut(t,e,r,n){if(r>0||c(!1),t.length<=r||c(!1),0===t.length)return t.push(e),null;var i=t.length===r;if(i&&n(t[t.length-1],e)<=0)return e;for(var a=0,o=t.length;a<o;){var s=a+o>>>1;n(t[s],e)<=0?a=s+1:o=s}return t.splice(a,0,e),i?t.pop():null}var ct,dt=function(t,e,r){it(u.BigInt(t),O.uint8),this.decimals=t,this.symbol=e,this.name=r},ft=dt.DEV=new dt(18,"DEV","Dev"),lt=function(t){function e(e,r,n,i,a){var o;return(o=t.call(this,n,i,a)||this).chainId=e,o.address=at(r),o}G(e,t);var r=e.prototype;return r.equals=function(t){return this===t||this.chainId===t.chainId&&this.address===t.address},r.sortsBefore=function(t){return this.chainId!==t.chainId&&c(!1),this.address===t.address&&c(!1),this.address.toLowerCase()<t.address.toLowerCase()},e}(dt);function ht(t,e){return t instanceof lt&&e instanceof lt?t.equals(e):!(t instanceof lt||e instanceof lt||t!==e)}var pt,vt,yt=((ct={})[exports.ChainId.MAINNET]=new lt(exports.ChainId.MAINNET,"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",18,"WETH","Wrapped Ether"),ct[exports.ChainId.STANDALONE]=new lt(exports.ChainId.STANDALONE,"0xC2Bf5F29a4384b1aB0C063e1c666f02121B6084a",18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONROCK]=new lt(exports.ChainId.MOONROCK,g,18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONBASE]=new lt(exports.ChainId.MOONBASE,g,18,"WDEV","Wrapped Dev"),ct[exports.ChainId.MOONSHADOW]=new lt(exports.ChainId.MOONSHADOW,g,18,"WDEV","Wrapped Dev"),ct),mt=l(h),bt=l(f),wt=((pt={})[exports.Rounding.ROUND_DOWN]=mt.ROUND_DOWN,pt[exports.Rounding.ROUND_HALF_UP]=mt.ROUND_HALF_UP,pt[exports.Rounding.ROUND_UP]=mt.ROUND_UP,pt),gt=((vt={})[exports.Rounding.ROUND_DOWN]=0,vt[exports.Rounding.ROUND_HALF_UP]=1,vt[exports.Rounding.ROUND_UP]=3,vt),kt=function(){function t(t,e){void 0===e&&(e=N),this.numerator=ot(t),this.denominator=ot(e)}var e=t.prototype;return e.invert=function(){return new t(this.denominator,this.numerator)},e.add=function(e){var r=e instanceof t?e:new t(ot(e));return u.equal(this.denominator,r.denominator)?new t(u.add(this.numerator,r.numerator),this.denominator):new t(u.add(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator)),u.multiply(this.denominator,r.denominator))},e.subtract=function(e){var r=e instanceof t?e:new t(ot(e));return u.equal(this.denominator,r.denominator)?new t(u.subtract(this.numerator,r.numerator),this.denominator):new t(u.subtract(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator)),u.multiply(this.denominator,r.denominator))},e.lessThan=function(e){var r=e instanceof t?e:new t(ot(e));return u.lessThan(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.equalTo=function(e){var r=e instanceof t?e:new t(ot(e));return u.equal(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.greaterThan=function(e){var r=e instanceof t?e:new t(ot(e));return u.greaterThan(u.multiply(this.numerator,r.denominator),u.multiply(r.numerator,this.denominator))},e.multiply=function(e){var r=e instanceof t?e:new t(ot(e));return new t(u.multiply(this.numerator,r.numerator),u.multiply(this.denominator,r.denominator))},e.divide=function(e){var r=e instanceof t?e:new t(ot(e));return new t(u.multiply(this.numerator,r.denominator),u.multiply(this.denominator,r.numerator))},e.toSignificant=function(t,e,r){void 0===e&&(e={groupSeparator:""}),void 0===r&&(r=exports.Rounding.ROUND_HALF_UP),Number.isInteger(t)||c(!1),t>0||c(!1),mt.set({precision:t+1,rounding:wt[r]});var n=new mt(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(t);return n.toFormat(n.decimalPlaces(),e)},e.toFixed=function(t,e,r){return void 0===e&&(e={groupSeparator:""}),void 0===r&&(r=exports.Rounding.ROUND_HALF_UP),Number.isInteger(t)||c(!1),t>=0||c(!1),bt.DP=t,bt.RM=gt[r],new bt(this.numerator.toString()).div(this.denominator.toString()).toFormat(t,e)},X(t,[{key:"quotient",get:function(){return u.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new t(u.remainder(this.numerator,this.denominator),this.denominator)}}]),t}(),Tt=l(f),At=function(t){function e(e,r){var n,i=ot(r);return it(i,O.uint256),(n=t.call(this,i,u.exponentiate(U,u.BigInt(e.decimals)))||this).currency=e,n}G(e,t),e.ether=function(t){return new e(ft,t)};var r=e.prototype;return r.add=function(t){return ht(this.currency,t.currency)||c(!1),new e(this.currency,u.add(this.raw,t.raw))},r.subtract=function(t){return ht(this.currency,t.currency)||c(!1),new e(this.currency,u.subtract(this.raw,t.raw))},r.toSignificant=function(e,r,n){return void 0===e&&(e=6),void 0===n&&(n=exports.Rounding.ROUND_DOWN),t.prototype.toSignificant.call(this,e,r,n)},r.toFixed=function(e,r,n){return void 0===e&&(e=this.currency.decimals),void 0===n&&(n=exports.Rounding.ROUND_DOWN),e<=this.currency.decimals||c(!1),t.prototype.toFixed.call(this,e,r,n)},r.toExact=function(t){return void 0===t&&(t={groupSeparator:""}),Tt.DP=this.currency.decimals,new Tt(this.numerator.toString()).div(this.denominator.toString()).toFormat(t)},X(e,[{key:"raw",get:function(){return this.numerator}}]),e}(kt),Ot=function(t){function e(e,r){var n;return(n=t.call(this,e,r)||this).token=e,n}G(e,t);var r=e.prototype;return r.add=function(t){return this.token.equals(t.token)||c(!1),new e(this.token,u.add(this.raw,t.raw))},r.subtract=function(t){return this.token.equals(t.token)||c(!1),new e(this.token,u.subtract(this.raw,t.raw))},e}(At),qt=function(t){function e(e,r,n,i){var a;return(a=t.call(this,i,n)||this).baseCurrency=e,a.quoteCurrency=r,a.scalar=new kt(u.exponentiate(U,u.BigInt(e.decimals)),u.exponentiate(U,u.BigInt(r.decimals))),a}G(e,t),e.fromRoute=function(t){for(var r,n=[],i=tt(t.pairs.entries());!(r=i()).done;){var a=r.value,o=a[1];n.push(t.path[a[0]].equals(o.token0)?new e(o.reserve0.currency,o.reserve1.currency,o.reserve0.raw,o.reserve1.raw):new e(o.reserve1.currency,o.reserve0.currency,o.reserve1.raw,o.reserve0.raw))}return n.slice(1).reduce((function(t,e){return t.multiply(e)}),n[0])};var r=e.prototype;return r.invert=function(){return new e(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},r.multiply=function(r){ht(this.quoteCurrency,r.baseCurrency)||c(!1);var n=t.prototype.multiply.call(this,r);return new e(this.baseCurrency,r.quoteCurrency,n.denominator,n.numerator)},r.quote=function(e){return ht(e.currency,this.baseCurrency)||c(!1),this.quoteCurrency instanceof lt?new Ot(this.quoteCurrency,t.prototype.multiply.call(this,e.raw).quotient):At.ether(t.prototype.multiply.call(this,e.raw).quotient)},r.toSignificant=function(t,e,r){return void 0===t&&(t=6),this.adjusted.toSignificant(t,e,r)},r.toFixed=function(t,e,r){return void 0===t&&(t=4),this.adjusted.toFixed(t,e,r)},X(e,[{key:"raw",get:function(){return new kt(this.numerator,this.denominator)}},{key:"adjusted",get:function(){return t.prototype.multiply.call(this,this.scalar)}}]),e}(kt),xt={},It=function(){function t(e,r){var n=e.token.sortsBefore(r.token)?[e,r]:[r,e];this.liquidityToken=new lt(n[0].token.chainId,t.getAddress(n[0].token,n[1].token),18,"UNI-V2","Uniswap V2"),this.tokenAmounts=n}t.getAddress=function(t,e){var r,n,i,a,o,s=t.sortsBefore(e)?[t,e]:[e,t];return void 0===(null==(r=xt)||null==(n=r[s[0].address])?void 0:n[s[1].address])&&(xt=V({},xt,((o={})[s[0].address]=V({},null==(i=xt)?void 0:i[s[0].address],((a={})[s[1].address]=d.getCreate2Address(q[s[0].chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[s[0].address,s[1].address])]),P),a)),o))),xt[s[0].address][s[1].address]};var e=t.prototype;return e.involvesToken=function(t){return t.equals(this.token0)||t.equals(this.token1)},e.priceOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.token0Price:this.token1Price},e.reserveOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.reserve0:this.reserve1},e.getOutputAmount=function(e){if(this.involvesToken(e.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R))throw new rt;var r=this.reserveOf(e.token),n=this.reserveOf(e.token.equals(this.token0)?this.token1:this.token0),i=u.multiply(e.raw,F),a=u.multiply(i,n.raw),o=u.add(u.multiply(r.raw,M),i),s=new Ot(e.token.equals(this.token0)?this.token1:this.token0,u.divide(a,o));if(u.equal(s.raw,R))throw new nt;return[s,new t(r.add(e),n.subtract(s))]},e.getInputAmount=function(e){if(this.involvesToken(e.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R)||u.greaterThanOrEqual(e.raw,this.reserveOf(e.token).raw))throw new rt;var r=this.reserveOf(e.token),n=this.reserveOf(e.token.equals(this.token0)?this.token1:this.token0),i=u.multiply(u.multiply(n.raw,e.raw),M),a=u.multiply(u.subtract(r.raw,e.raw),F),o=new Ot(e.token.equals(this.token0)?this.token1:this.token0,u.add(u.divide(i,a),N));return[o,new t(n.add(o),r.subtract(e))]},e.getLiquidityMinted=function(t,e,r){t.token.equals(this.liquidityToken)||c(!1);var n,i=e.token.sortsBefore(r.token)?[e,r]:[r,e];if(i[0].token.equals(this.token0)&&i[1].token.equals(this.token1)||c(!1),u.equal(t.raw,R))n=u.subtract(st(u.multiply(i[0].raw,i[1].raw)),E);else{var a=u.divide(u.multiply(i[0].raw,t.raw),this.reserve0.raw),o=u.divide(u.multiply(i[1].raw,t.raw),this.reserve1.raw);n=u.lessThanOrEqual(a,o)?a:o}if(!u.greaterThan(n,R))throw new nt;return new Ot(this.liquidityToken,n)},e.getLiquidityValue=function(t,e,r,n,i){var a;if(void 0===n&&(n=!1),this.involvesToken(t)||c(!1),e.token.equals(this.liquidityToken)||c(!1),r.token.equals(this.liquidityToken)||c(!1),u.lessThanOrEqual(r.raw,e.raw)||c(!1),n){i||c(!1);var o=ot(i);if(u.equal(o,R))a=e;else{var s=st(u.multiply(this.reserve0.raw,this.reserve1.raw)),d=st(o);if(u.greaterThan(s,d)){var f=u.multiply(e.raw,u.subtract(s,d)),l=u.add(u.multiply(s,S),d),h=u.divide(f,l);a=e.add(new Ot(this.liquidityToken,h))}else a=e}}else a=e;return new Ot(t,u.divide(u.multiply(r.raw,this.reserveOf(t).raw),a.raw))},X(t,[{key:"token0Price",get:function(){return new qt(this.token0,this.token1,this.tokenAmounts[0].raw,this.tokenAmounts[1].raw)}},{key:"token1Price",get:function(){return new qt(this.token1,this.token0,this.tokenAmounts[1].raw,this.tokenAmounts[0].raw)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].token}},{key:"token1",get:function(){return this.tokenAmounts[1].token}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),t}(),Pt=function(){function t(t,e,r){t.length>0||c(!1),t.every((function(e){return e.chainId===t[0].chainId}))||c(!1),e instanceof lt&&t[0].involvesToken(e)||e===ft&&t[0].involvesToken(yt[t[0].chainId])||c(!1),void 0===r||r instanceof lt&&t[t.length-1].involvesToken(r)||r===ft&&t[t.length-1].involvesToken(yt[t[0].chainId])||c(!1);for(var n,i=[e instanceof lt?e:yt[t[0].chainId]],a=tt(t.entries());!(n=a()).done;){var o=n.value,s=o[1],u=i[o[0]];u.equals(s.token0)||u.equals(s.token1)||c(!1);var d=u.equals(s.token0)?s.token1:s.token0;i.push(d)}this.pairs=t,this.path=i,this.midPrice=qt.fromRoute(this),this.input=e,this.output=null!=r?r:i[i.length-1]}return X(t,[{key:"chainId",get:function(){return this.pairs[0].chainId}}]),t}(),Et=new kt(_),Rt=function(t){function e(){return t.apply(this,arguments)||this}G(e,t);var r=e.prototype;return r.toSignificant=function(t,e,r){return void 0===t&&(t=5),this.multiply(Et).toSignificant(t,e,r)},r.toFixed=function(t,e,r){return void 0===t&&(t=2),this.multiply(Et).toFixed(t,e,r)},e}(kt);function Nt(t,e){return ht(t.inputAmount.currency,e.inputAmount.currency)||c(!1),ht(t.outputAmount.currency,e.outputAmount.currency)||c(!1),t.outputAmount.equalTo(e.outputAmount)?t.inputAmount.equalTo(e.inputAmount)?0:t.inputAmount.lessThan(e.inputAmount)?-1:1:t.outputAmount.lessThan(e.outputAmount)?1:-1}function Ct(t,e){var r=Nt(t,e);return 0!==r?r:t.priceImpact.lessThan(e.priceImpact)?-1:t.priceImpact.greaterThan(e.priceImpact)?1:t.route.path.length-e.route.path.length}function Lt(t,e){return t instanceof Ot?t:t.currency===ft?new Ot(yt[e],t.raw):void c(!1)}function St(t,e){return t instanceof lt?t:t===ft?yt[e]:void c(!1)}var Ut=function(){function t(t,e,r){var n,i,a,o=new Array(t.path.length),s=new Array(t.pairs.length);if(r===exports.TradeType.EXACT_INPUT){ht(e.currency,t.input)||c(!1),o[0]=Lt(e,t.chainId);for(var u=0;u<t.path.length-1;u++){var d=t.pairs[u].getOutputAmount(o[u]),f=d[1];o[u+1]=d[0],s[u]=f}}else{ht(e.currency,t.output)||c(!1),o[o.length-1]=Lt(e,t.chainId);for(var l=t.path.length-1;l>0;l--){var h=t.pairs[l-1].getInputAmount(o[l]),p=h[1];o[l-1]=h[0],s[l-1]=p}}this.route=t,this.tradeType=r,this.inputAmount=r===exports.TradeType.EXACT_INPUT?e:t.input===ft?At.ether(o[0].raw):o[0],this.outputAmount=r===exports.TradeType.EXACT_OUTPUT?e:t.output===ft?At.ether(o[o.length-1].raw):o[o.length-1],this.executionPrice=new qt(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.raw,this.outputAmount.raw),this.nextMidPrice=qt.fromRoute(new Pt(s,t.input)),this.priceImpact=(n=this.outputAmount,a=(i=t.midPrice.raw.multiply(this.inputAmount.raw)).subtract(n.raw).divide(i),new Rt(a.numerator,a.denominator))}t.exactIn=function(e,r){return new t(e,r,exports.TradeType.EXACT_INPUT)},t.exactOut=function(e,r){return new t(e,r,exports.TradeType.EXACT_OUTPUT)};var e=t.prototype;return e.minimumAmountOut=function(t){if(t.lessThan(R)&&c(!1),this.tradeType===exports.TradeType.EXACT_OUTPUT)return this.outputAmount;var e=new kt(N).add(t).invert().multiply(this.outputAmount.raw).quotient;return this.outputAmount instanceof Ot?new Ot(this.outputAmount.token,e):At.ether(e)},e.maximumAmountIn=function(t){if(t.lessThan(R)&&c(!1),this.tradeType===exports.TradeType.EXACT_INPUT)return this.inputAmount;var e=new kt(N).add(t).multiply(this.inputAmount.raw).quotient;return this.inputAmount instanceof Ot?new Ot(this.inputAmount.token,e):At.ether(e)},t.bestTradeExactIn=function(e,r,n,i,a,o,s){var u=void 0===i?{}:i,d=u.maxNumResults,f=void 0===d?3:d,l=u.maxHops,h=void 0===l?3:l;void 0===a&&(a=[]),void 0===o&&(o=r),void 0===s&&(s=[]),e.length>0||c(!1),h>0||c(!1),o===r||a.length>0||c(!1);var p=r instanceof Ot?r.token.chainId:n instanceof lt?n.chainId:void 0;void 0===p&&c(!1);for(var v=Lt(r,p),y=St(n,p),m=0;m<e.length;m++){var b=e[m];if((b.token0.equals(v.token)||b.token1.equals(v.token))&&!b.reserve0.equalTo(R)&&!b.reserve1.equalTo(R)){var w=void 0;try{w=b.getOutputAmount(v)[0]}catch(t){if(t.isInsufficientInputAmountError)continue;throw t}if(w.token.equals(y))ut(s,new t(new Pt([].concat(a,[b]),o.currency,n),o,exports.TradeType.EXACT_INPUT),f,Ct);else if(h>1&&e.length>1){var g=e.slice(0,m).concat(e.slice(m+1,e.length));t.bestTradeExactIn(g,w,n,{maxNumResults:f,maxHops:h-1},[].concat(a,[b]),o,s)}}}return s},t.bestTradeExactOut=function(e,r,n,i,a,o,s){var u=void 0===i?{}:i,d=u.maxNumResults,f=void 0===d?3:d,l=u.maxHops,h=void 0===l?3:l;void 0===a&&(a=[]),void 0===o&&(o=n),void 0===s&&(s=[]),e.length>0||c(!1),h>0||c(!1),o===n||a.length>0||c(!1);var p=n instanceof Ot?n.token.chainId:r instanceof lt?r.chainId:void 0;void 0===p&&c(!1);for(var v=Lt(n,p),y=St(r,p),m=0;m<e.length;m++){var b=e[m];if((b.token0.equals(v.token)||b.token1.equals(v.token))&&!b.reserve0.equalTo(R)&&!b.reserve1.equalTo(R)){var w=void 0;try{w=b.getInputAmount(v)[0]}catch(t){if(t.isInsufficientReservesError)continue;throw t}if(w.token.equals(y))ut(s,new t(new Pt([b].concat(a),r,o.currency),o,exports.TradeType.EXACT_OUTPUT),f,Ct);else if(h>1&&e.length>1){var g=e.slice(0,m).concat(e.slice(m+1,e.length));t.bestTradeExactOut(g,r,w,{maxNumResults:f,maxHops:h-1},[b].concat(a),o,s)}}}return s},t}(),Dt=function(){function t(e,r,n){var i=[r,n];this.address=t.getAddress(i[0].token,i[1].token),this.pair=e;var a=d.getCreate2Address(I[i[0].token.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[i[0].token.address,this.address])]),t.ptCodeHash(i[0].token)),o=d.getCreate2Address(I[i[1].token.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[i[1].token.address,this.address])]),t.ptCodeHash(i[1].token));this.floatLiquidityToken=new lt(i[0].token.chainId,a,18,"ZR-FT","Zircon FT"),this.anchorLiquidityToken=new lt(i[0].token.chainId,o,18,"ZR-AT","Zircon AT"),this.tokenAmounts=i}t.getAddress=function(t,e){var r=It.getAddress(t,e);return console.log("pair",r),d.getCreate2Address(x[t.chainId],p.keccak256(["bytes"],[p.pack(["address","address","address"],[t.address,e.address,r])]),"0xe9f29a32ecac75732f474db4cc8a5f7200df9570f98d23ea3e38151c6d21d16c")},t.getLiquidityAddresses=function(e,r){var n=t.getAddress(e,r);return[d.getCreate2Address(I[e.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[e.address,n])]),t.ptCodeHash(e)),d.getCreate2Address(I[r.chainId],p.keccak256(["bytes"],[p.pack(["address","address"],[r.address,n])]),t.ptCodeHash(r))]};var e=t.prototype;return e.involvesToken=function(t){return t.equals(this.token0)||t.equals(this.token1)},e.getPairReserves=function(){return this.token0.equals(this.pair.token0)?[this.pair.reserve0,this.pair.reserve1]:[this.pair.reserve1,this.pair.reserve0]},e.sqrt=function(t){return u.greaterThan(t,R)||c(!1),u.lessThanOrEqual(t,C)?t:function t(e,r){var n=u.signedRightShift(u.add(u.divide(e,r),r),N);return u.equal(r,n)||u.equal(r,u.subtract(n,N))?r:t(e,n)}(t,N)},e.translateToPylon=function(t,e,r){return u.divide(u.multiply(t,e.raw),r.raw)},e.updateSync=function(t,e,r,n,i,a,o){var s=this.sqrt(u.multiply(this.getPairReserves()[0].raw,this.getPairReserves()[1].raw)),c=this.translateToPylon(u.multiply(C,this.getPairReserves()[1].raw),i,a),d=this.translateToPylon(u.multiply(C,this.getPairReserves()[0].raw),i,a),f=u.subtract(D,u.divide(u.multiply(D,u.multiply(this.sqrt(t),a.raw)),u.multiply(s,o))),l=u.divide(u.multiply(f,c),D),h=u.divide(u.multiply(f,d),D),p=u.add(e,u.divide(u.multiply(l,n),D)),v=u.add(r,u.divide(u.multiply(h,u.subtract(D,n)),D));return{gamma:u.lessThan(u.subtract(p,this.reserve1.raw),u.divide(c,C))?u.subtract(D,u.divide(u.multiply(D,u.subtract(p,this.reserve1.raw)),c)):u.divide(u.multiply(D,u.subtract(v,this.reserve0.raw)),d),vab:p}},e.calculatePTU=function(t,e,r,n,i,a,o){var s;if(i.token.equals(this.anchorLiquidityToken)||i.token.equals(this.floatLiquidityToken)||c(!1),t)s=u.equal(i.raw,R)?u.subtract(e.raw,E):u.divide(u.multiply(i.raw,e.raw),a);else{var d;if(u.equal(i.raw,R))d=u.multiply(C,o);else{var f=this.translateToPylon(this.pair.reserve0.raw,n,r);d=u.add(u.divide(u.multiply(u.multiply(f,o),C),D),this.reserve0.raw)}s=u.equal(i.raw,R)?u.subtract(u.divide(u.multiply(D,e.raw),d),E):u.divide(u.multiply(i.raw,e.raw),d)}return s},e.getLiquidityFromPoolTokensLiquidity=function(t,e,r,n,i,a,o,s){var c;if(a){var d=u.divide(u.multiply(this.getPairReserves()[1].raw,u.multiply(t.raw,C)),this.getPairReserves()[0].raw),f=u.multiply(e.raw,C);c=new Ot(t.token,u.greaterThan(d,f)?f:d)}else{var l=u.divide(u.multiply(this.getPairReserves()[0].raw,u.multiply(e.raw,C)),this.getPairReserves()[1].raw),h=u.multiply(t.raw,C);c=new Ot(e.token,u.greaterThan(l,h)?h:l)}return this.calculatePTU(a,c,r,n,i,o,s)},e.reserveOf=function(t){return this.involvesToken(t)||c(!1),t.equals(this.token0)?this.reserve0:this.reserve1},e.getOutputAmount=function(t){if(this.involvesToken(t.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R))throw new rt;var e=this.reserveOf(t.token),r=this.reserveOf(t.token.equals(this.token0)?this.token1:this.token0),n=u.multiply(t.raw,F),i=u.multiply(n,r.raw),a=u.add(u.multiply(e.raw,M),n),o=new Ot(t.token.equals(this.token0)?this.token1:this.token0,u.divide(i,a));if(u.equal(o.raw,R))throw new nt;return[o,new It(e.add(t),r.subtract(o))]},e.getInputAmount=function(t){if(this.involvesToken(t.token)||c(!1),u.equal(this.reserve0.raw,R)||u.equal(this.reserve1.raw,R)||u.greaterThanOrEqual(t.raw,this.reserveOf(t.token).raw))throw new rt;var e=this.reserveOf(t.token),r=this.reserveOf(t.token.equals(this.token0)?this.token1:this.token0),n=u.multiply(u.multiply(r.raw,t.raw),M),i=u.multiply(u.subtract(e.raw,t.raw),F),a=new Ot(t.token.equals(this.token0)?this.token1:this.token0,u.add(u.divide(n,i),N));return[a,new It(r.add(a),e.subtract(t))]},e.initializeValues=function(t,e,r){var n,i=r.raw,a=e.raw;n=u.notEqual(this.getPairReserves()[0].raw,R)?u.divide(u.multiply(i,this.getPairReserves()[0].raw),this.getPairReserves()[1].raw):u.divide(u.multiply(i,e.raw),r.raw);var o=u.divide(u.multiply(D,a),u.add(a,n));return[this.calculatePTU(!1,e,t,new Ot(e.token,R),new Ot(this.floatLiquidityToken,R),i,o),this.calculatePTU(!0,r,t,new Ot(e.token,R),new Ot(this.anchorLiquidityToken,R),i,o)]},e.getAnchorAsync100LiquidityMinted=function(t,e,r,n,i,a,o,s,d){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token1)||c(!1);var f=new Ot(this.token1,u.divide(r.raw,C)),l=this.pair.getOutputAmount(f),h=this.getAnchorAsyncLiquidityMinted(t,e,l[0],f,n,i,a,o,s,d);if(!u.greaterThan(h.raw,R))throw new nt;return new Ot(this.anchorLiquidityToken,h.raw)},e.getFloatAsync100LiquidityMinted=function(t,e,r,n,i,a,o,s,d){e.token.equals(this.floatLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token0)||c(!1);var f=new Ot(this.token0,u.divide(r.raw,C)),l=this.pair.getOutputAmount(f),h=this.getFloatAsyncLiquidityMinted(t,e,f,l[0],n,i,a,o,s,d);if(!u.greaterThan(h.raw,R))throw new nt;return h},e.getAnchorAsyncLiquidityMinted=function(t,e,r,n,i,a,o,s,d,f){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1);var l=[r,n];l[0].token.equals(this.token0)&&l[1].token.equals(this.token1)||c(!1);var h=this.updateSync(ot(s),ot(i),ot(a),ot(o),d,t,ot(f)),p=this.getLiquidityFromPoolTokensLiquidity(r,n,t,d,e,!0,h.vab);if(!u.greaterThan(p,R))throw new nt;return new Ot(this.anchorLiquidityToken,p)},e.getFloatAsyncLiquidityMinted=function(t,e,r,n,i,a,o,s,d,f){e.token.equals(this.floatLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1);var l=[r,n];l[0].token.equals(this.token0)&&l[1].token.equals(this.token1)||c(!1);var h=this.updateSync(ot(s),ot(i),ot(a),ot(o),d,t,ot(f)),p=this.getLiquidityFromPoolTokensLiquidity(r,n,t,d,e,!1,h.vab,h.gamma);if(!u.greaterThan(p,R))throw new nt;return new Ot(this.anchorLiquidityToken,p)},e.getAnchorSyncLiquidityMinted=function(t,e,r,n,i,a,o,s,d){e.token.equals(this.anchorLiquidityToken)||c(!1),t.token.equals(this.pair.liquidityToken)||c(!1),r.token.equals(this.token1)||c(!1);var f=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(d)),l=this.calculatePTU(!0,r,t,s,e,f.vab);if(!u.greaterThan(l,R))throw new nt;return new Ot(this.anchorLiquidityToken,l)},e.getFloatSyncLiquidityMinted=function(t,e,r,n,i,a,o,s,d){t.token.equals(this.pair.liquidityToken)||c(!1),e.token.equals(this.floatLiquidityToken)||c(!1),r.token.equals(this.token0)||c(!1);var f=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(d)),l=this.calculatePTU(!1,r,t,s,e,f.vab,f.gamma);if(!u.greaterThan(l,R))throw new nt;return new Ot(this.floatLiquidityToken,l)},e.calculatePTUToAmount=function(t,e,r,n,i,a,o){return u.divide(u.multiply(o?n:u.add(u.divide(u.multiply(u.multiply(u.divide(u.multiply(this.getPairReserves()[0].raw,i),t.raw),a),C),D),this.reserve0.raw),r.raw),e.raw)},e.getOmegaSlashing=function(t,e,r,n){return u.divide(u.multiply(this.translateToPylon(u.multiply(this.getPairReserves()[1].raw,C),r,n),u.subtract(D,t)),u.subtract(e,this.reserve1.raw))},e.calculateLPTU=function(t,e,r,n,i,a,o){var s;return o?(s=u.divide(u.multiply(a.raw,u.subtract(n,this.reserve1.raw)),u.multiply(C,this.translateToPylon(this.getPairReserves()[1].raw,a,t))),s=u.add(s,u.divide(u.multiply(s,this.reserve1.raw),this.translateToPylon(u.multiply(this.getPairReserves()[1].raw,C),a,t)))):(s=u.divide(u.multiply(i,a.raw),D),s=u.add(s,u.divide(u.multiply(s,this.reserve0.raw),this.translateToPylon(u.multiply(this.getPairReserves()[0].raw,C),a,t)))),u.divide(u.multiply(s,r),e.raw)},e.burnFloat=function(t,e,r,n,i,a,o,s,c){var d=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(c)),f=this.calculatePTU(!1,this.reserve0,t,s,e,d.vab,d.gamma),l=u.greaterThan(f,r.raw)?r.raw:f,h=this.calculatePTUToAmount(t,e,new Ot(r.token,l),d.vab,d.gamma,s.raw,!1);if(u.lessThan(f,r.raw)){var p=u.subtract(r.raw,f),v=this.calculateLPTU(t,e,p,d.vab,d.gamma,s,!1),y=u.divide(u.multiply(v,this.getPairReserves()[0].raw),t.raw),m=u.divide(u.multiply(v,this.getPairReserves()[1].raw),t.raw),b=new It(new Ot(this.getPairReserves()[0].token,u.subtract(this.getPairReserves()[0].raw,y)),new Ot(this.getPairReserves()[1].token,u.subtract(this.getPairReserves()[1].raw,m))).getOutputAmount(new Ot(this.token1,m));h=u.add(h,u.add(y,b[0].raw))}return new Ot(r.token,h)},e.burnAnchor=function(t,e,r,n,i,a,o,s,c){var d=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(c)),f=this.calculatePTU(!0,this.reserve1,t,s,e,d.vab,d.gamma),l=u.greaterThan(f,r.raw)?r.raw:f,h=this.calculatePTUToAmount(t,e,new Ot(r.token,l),d.vab,d.gamma,s.raw,!0);if(u.lessThan(f,r.raw)){var p=this.getOmegaSlashing(d.gamma,d.vab,s,t);console.log("omega",p.toString(10));var v=u.divide(u.multiply(p,u.subtract(r.raw,f)),D),y=this.calculateLPTU(t,e,v,d.vab,d.gamma,s,!0),m=u.divide(u.multiply(y,this.getPairReserves()[0].raw),t.raw),b=u.divide(u.multiply(y,this.getPairReserves()[1].raw),t.raw),w=new It(new Ot(this.getPairReserves()[0].token,u.subtract(this.getPairReserves()[0].raw,m)),new Ot(this.getPairReserves()[1].token,u.subtract(this.getPairReserves()[1].raw,b))).getOutputAmount(new Ot(this.token0,m));h=u.add(h,u.add(b,w[0].raw))}return new Ot(r.token,h)},e.burnAsyncAnchor=function(t,e,r,n,i,a,o,s,c){var d=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(c)),f=this.getOmegaSlashing(d.gamma,d.vab,s,t);console.log("omega",f.toString(10));var l=u.divide(u.multiply(f,r.raw),D),h=this.calculateLPTU(t,e,l,d.vab,d.gamma,s,!0),p=u.divide(u.multiply(h,this.getPairReserves()[0].raw),t.raw),v=u.divide(u.multiply(h,this.getPairReserves()[1].raw),t.raw);return[new Ot(this.token0,p),new Ot(this.token1,v)]},e.burnAsyncFloat=function(t,e,r,n,i,a,o,s,c){var d=this.updateSync(ot(o),ot(n),ot(i),ot(a),s,t,ot(c)),f=this.calculateLPTU(t,e,r.raw,d.vab,d.gamma,s,!1),l=u.divide(u.multiply(f,this.getPairReserves()[0].raw),t.raw),h=u.divide(u.multiply(f,this.getPairReserves()[1].raw),t.raw);return[new Ot(this.token0,l),new Ot(this.token1,h)]},e.getLiquidityValue=function(t,e,r,n,i){var a;if(void 0===n&&(n=!1),this.involvesToken(t)||c(!1),e.token.equals(this.anchorLiquidityToken)||e.token.equals(this.floatLiquidityToken)||c(!1),r.token.equals(this.anchorLiquidityToken)||r.token.equals(this.floatLiquidityToken)||c(!1),u.lessThanOrEqual(r.raw,e.raw)||c(!1),n){i||c(!1);var o=ot(i);if(u.equal(o,R))a=e;else{var s=st(u.multiply(this.getPairReserves()[0].raw,this.getPairReserves()[1].raw)),d=st(o);if(u.greaterThan(s,d)){var f=u.multiply(e.raw,u.subtract(s,d)),l=u.add(u.multiply(s,S),d),h=u.divide(f,l);a=e.add(new Ot(r.token,h))}else a=e}}else a=e;return new Ot(t,u.divide(u.multiply(r.raw,this.reserveOf(t).raw),a.raw))},X(t,[{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].token}},{key:"token1",get:function(){return this.tokenAmounts[1].token}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),t}();function _t(t){return"0x"+t.raw.toString(16)}Dt.ptCodeHash=function(t){return p.keccak256(["bytes"],[p.pack(["bytes","bytes"],["0x608060405234801561001057600080fd5b50604051610e9b380380610e9b8339818101604052602081101561003357600080fd5b50516040514690806052610e49823960408051918290036052018220828201825260068352652d34b931b7b760d11b6020938401528151808301835260018152603160f81b908401528151808401919091527f94c6df7cbb14f58e7ac6d9fa315f8346b33ef43dae2423c0e0e94673dd9e65ff818301527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015260808101949094523060a0808601919091528151808603909101815260c09094019052825192019190912060045550600880546001600160a01b03929092166001600160a01b03199283161790556009805490911633179055610d11806101386000396000f3fe608060405234801561001057600080fd5b506004361061011d5760003560e01c806306fdde0314610122578063095ea7b31461019f57806318160ddd146101df57806323b872dd146101f957806330adf81f1461022f578063313ce567146102375780633644e5151461025557806340c10f191461025d578063468477941461028b5780635978fd80146102af57806370a08231146102d55780637ecebe00146102fb57806395d89b41146103215780639dc29fac14610329578063a8aa1b3114610355578063a9059cbb1461035d578063b89f59ea14610389578063c45a015514610391578063d505accf14610399578063dd62ed3e146103ea578063ef8863b414610418578063fc0c546a14610420578063fecf973414610428575b600080fd5b61012a610466565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016457818101518382015260200161014c565b50505050905090810190601f1680156101915780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101cb600480360360408110156101b557600080fd5b506001600160a01b038135169060200135610488565b604080519115158252519081900360200190f35b6101e761049f565b60408051918252519081900360200190f35b6101cb6004803603606081101561020f57600080fd5b506001600160a01b038135811691602081013590911690604001356104a5565b6101e761053f565b61023f610551565b6040805160ff9092168252519081900360200190f35b6101e7610556565b6102896004803603604081101561027357600080fd5b506001600160a01b03813516906020013561055c565b005b6102936105ba565b604080516001600160a01b039092168252519081900360200190f35b610289600480360360208110156102c557600080fd5b50356001600160a01b03166105c9565b6101e7600480360360208110156102eb57600080fd5b50356001600160a01b031661063b565b6101e76004803603602081101561031157600080fd5b50356001600160a01b031661064d565b61012a61065f565b6102896004803603604081101561033f57600080fd5b506001600160a01b03813516906020013561067e565b6102936106d8565b6101cb6004803603604081101561037357600080fd5b506001600160a01b0381351690602001356106e7565b6101cb6106f4565b610293610704565b610289600480360360e08110156103af57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610713565b6101e76004803603604081101561040057600080fd5b506001600160a01b0381358116916020013516610902565b61029361091f565b61029361092e565b6102896004803603608081101561043e57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135151561093d565b604051806040016040528060068152602001652d34b931b7b760d11b81525081565b60006104953384846109e3565b5060015b92915050565b60005481565b6001600160a01b03831660009081526002602090815260408083203384529091528120546000191461052a576001600160a01b0384166000908152600260209081526040808320338452909152902054610505908363ffffffff610a4516565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b610535848484610a95565b5060019392505050565b600080516020610cbd83398151915281565b601281565b60045481565b6007546001600160a01b031633146105ac576040805162461bcd60e51b815260206004820152600e60248201526d2d282a1d102327a92124a22222a760911b604482015290519081900360640190fd5b6105b68282610b3d565b5050565b6007546001600160a01b031681565b6009546001600160a01b03163314610619576040805162461bcd60e51b815260206004820152600e60248201526d2d282a1d102327a92124a22222a760911b604482015290519081900360640190fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b60016020526000908152604090205481565b60036020526000908152604090205481565b6040518060400160405280600381526020016216941560ea1b81525081565b6007546001600160a01b031633146106ce576040805162461bcd60e51b815260206004820152600e60248201526d2d282a1d102327a92124a22222a760911b604482015290519081900360640190fd5b6105b68282610bc1565b6006546001600160a01b031681565b6000610495338484610a95565b600654600160a01b900460ff1681565b6009546001600160a01b031681565b4284101561075d576040805162461bcd60e51b8152602060048201526012602482015271155b9a5cddd85c158c8e881156141254915160721b604482015290519081900360640190fd5b6004546001600160a01b038089166000818152600360209081526040808320805460018082019092558251600080516020610cbd8339815191528186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012061190160f01b6101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e280820193601f1981019281900390910190855afa158015610866573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061089c5750886001600160a01b0316816001600160a01b0316145b6108ec576040805162461bcd60e51b815260206004820152601c60248201527b556e697377617056323a20494e56414c49445f5349474e415455524560201b604482015290519081900360640190fd5b6108f78989896109e3565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b6008546001600160a01b031681565b6005546001600160a01b031681565b6008546001600160a01b0316331461098d576040805162461bcd60e51b815260206004820152600e60248201526d2d282a1d102327a92124a22222a760911b604482015290519081900360640190fd5b600580546001600160a01b039586166001600160a01b03199182161790915560068054921515600160a01b0260ff60a01b1995871693831693909317949094169190911790925560078054919093169116179055565b6001600160a01b03808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610499576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b6001600160a01b038316600090815260016020526040902054610abe908263ffffffff610a4516565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610af3908263ffffffff610c4d16565b6001600160a01b038084166000818152600160209081526040918290209490945580518581529051919392871692600080516020610c9d83398151915292918290030190a3505050565b600054610b50908263ffffffff610c4d16565b60009081556001600160a01b038316815260016020526040902054610b7b908263ffffffff610c4d16565b6001600160a01b0383166000818152600160209081526040808320949094558351858152935192939192600080516020610c9d8339815191529281900390910190a35050565b6001600160a01b038216600090815260016020526040902054610bea908263ffffffff610a4516565b6001600160a01b03831660009081526001602052604081209190915554610c17908263ffffffff610a4516565b60009081556040805183815290516001600160a01b03851691600080516020610c9d833981519152919081900360200190a35050565b80820182811015610499576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9a265627a7a723158202a3baeffdee4b59b71d7b3236c45ec0f76becdfd04f18e69d8e6caae8b137f7464736f6c63430005100032454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c75696e7432353620636861696e49642c6164647265737320766572696679696e67436f6e747261637429",(new v.AbiCoder).encode(["address"],[x[t.chainId]])])])};var Ft,Mt,Bt=function(){function t(){}return t.swapCallParameters=function(t,e){var r=t.inputAmount.currency===ft,n=t.outputAmount.currency===ft;r&&n&&c(!1),!("ttl"in e)||e.ttl>0||c(!1);var i,a,o,s=at(e.recipient),u=_t(t.maximumAmountIn(e.allowedSlippage)),d=_t(t.minimumAmountOut(e.allowedSlippage)),f=t.route.path.map((function(t){return t.address})),l="ttl"in e?"0x"+(Math.floor((new Date).getTime()/1e3)+e.ttl).toString(16):"0x"+e.deadline.toString(16),h=Boolean(e.feeOnTransfer);switch(t.tradeType){case exports.TradeType.EXACT_INPUT:r?(i=h?"swapExactETHForTokensSupportingFeeOnTransferTokens":"swapExactETHForTokens",a=[d,f,s,l],o=u):n?(i=h?"swapExactTokensForETHSupportingFeeOnTransferTokens":"swapExactTokensForETH",a=[u,d,f,s,l],o="0x0"):(i=h?"swapExactTokensForTokensSupportingFeeOnTransferTokens":"swapExactTokensForTokens",a=[u,d,f,s,l],o="0x0");break;case exports.TradeType.EXACT_OUTPUT:h&&c(!1),r?(i="swapETHForExactTokens",a=[d,f,s,l],o=u):n?(i="swapTokensForExactETH",a=[d,u,f,s,l],o="0x0"):(i="swapTokensForExactTokens",a=[d,u,f,s,l],o="0x0")}return{methodName:i,args:a,value:o}},t}(),jt=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i=Object.create((e&&e.prototype instanceof f?e:f).prototype),a=new A(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return{value:void 0,done:!0}}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=g(o,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(t,r,a),i}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var d={};function f(){}function l(){}function h(){}var p={};s(p,i,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(O([])));y&&y!==e&&r.call(y,i)&&(p=y);var m=h.prototype=f.prototype=Object.create(p);function b(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var n;this._invoke=function(i,a){function o(){return new e((function(n,o){!function n(i,a,o,s){var u=c(t[i],t,a);if("throw"!==u.type){var d=u.arg,f=d.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(f).then((function(t){d.value=t,o(d)}),(function(t){return n("throw",t,o,s)}))}s(u.arg)}(i,a,n,o)}))}return n=n?n.then(o,o):o()}}function g(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,g(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:q}}function q(){return{value:void 0,done:!0}}return l.prototype=h,s(m,"constructor",h),s(h,"constructor",l),l.displayName=s(h,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,s(t,o,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},b(w.prototype),s(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new w(u(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},b(m),s(m,o,"Generator"),s(m,i,(function(){return this})),s(m,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=O,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}(Mt={exports:{}}),Mt.exports),Ht=[{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"}],Wt=((Ft={})[exports.ChainId.MAINNET]={"0xE0B7927c4aF23765Cb51314A0E0521A9645F0E2A":9},Ft),Xt=function(){function t(){}return t.fetchTokenData=function(){var t=H(jt.mark((function t(e,r,n,i,a){var o,s;return jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===n&&(n=b.getDefaultProvider(m.getNetwork(e))),"number"!=typeof(null==(o=Wt)||null==(s=o[e])?void 0:s[r])){t.next=5;break}t.t0=Wt[e][r],t.next=8;break;case 5:return t.next=7,new y.Contract(r,Ht,n).decimals().then((function(t){var n,i,a;return Wt=V({},Wt,((a={})[e]=V({},null==(n=Wt)?void 0:n[e],((i={})[r]=t,i)),a)),t}));case 7:t.t0=t.sent;case 8:return t.abrupt("return",new lt(e,r,t.t0,i,a));case 10:case"end":return t.stop()}}),t)})));return function(e,r,n,i,a){return t.apply(this,arguments)}}(),t.fetchPairData=function(){var t=H(jt.mark((function t(e,r,n){var i,a,o,s,u;return jt.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===n&&(n=b.getDefaultProvider(m.getNetwork(e.chainId))),e.chainId!==r.chainId&&c(!1),i=It.getAddress(e,r),t.next=5,new y.Contract(i,w.abi,n).getReserves();case 5:return o=(a=t.sent)[0],s=a[1],u=e.sortsBefore(r)?[o,s]:[s,o],t.abrupt("return",new It(new Ot(e,u[0]),new Ot(r,u[1])));case 10:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}(),t}();exports.JSBI=u,exports.Currency=dt,exports.CurrencyAmount=At,exports.DEV=ft,exports.FACTORY_ADDRESS=q,exports.Fetcher=Xt,exports.Fraction=kt,exports.INIT_CODE_HASH=P,exports.InsufficientInputAmountError=nt,exports.InsufficientReservesError=rt,exports.MINIMUM_LIQUIDITY=E,exports.Pair=It,exports.Percent=Rt,exports.Price=qt,exports.Pylon=Dt,exports.Route=Pt,exports.Router=Bt,exports.Token=lt,exports.TokenAmount=Ot,exports.Trade=Ut,exports.WDEV=yt,exports.currencyEquals=ht,exports.inputOutputComparator=Nt,exports.tradeComparator=Ct;
//# sourceMappingURL=zircon-sdk.cjs.production.min.js.map
{
"name": "zircon-sdk",
"license": "MIT",
"version": "1.0.6-alpha.8",
"version": "1.0.6-alpha.9",
"description": "🛠 An example SDK for building applications on top of Uniswap in Moonbeam.",

@@ -32,4 +32,3 @@ "main": "dist/index.js",

"tiny-warning": "^1.0.3",
"toformat": "^2.0.0",
"zircon-protocol": "1.0.3-alpha.0"
"toformat": "^2.0.0"
},

@@ -36,0 +35,0 @@ "peerDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc