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

@sushiswap/core-sdk

Package Overview
Dependencies
Maintainers
7
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sushiswap/core-sdk - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

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

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

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n,r,a,i,o,d,s,c,u,C,p,h,x,A,I,E,f,T,D,b,l,N,B,O,m,S,F=e(require("jsbi")),R=e(require("tiny-invariant")),v=require("@ethersproject/address"),y=(e(require("tiny-warning")),e(require("big.js"))),M=e(require("decimal.js-light")),_=e(require("toformat")),g=require("@ethersproject/solidity");(t=exports.ChainId||(exports.ChainId={}))[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t["GÖRLI"]=5]="GÖRLI",t[t.KOVAN=42]="KOVAN",t[t.MATIC=137]="MATIC",t[t.MATIC_TESTNET=80001]="MATIC_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.XDAI=100]="XDAI",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_TESTNET=79377087078960]="ARBITRUM_TESTNET",t[t.MOONBEAM_TESTNET=1287]="MOONBEAM_TESTNET",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.HECO=128]="HECO",t[t.HECO_TESTNET=256]="HECO_TESTNET",t[t.HARMONY=16666e5]="HARMONY",t[t.HARMONY_TESTNET=16667e5]="HARMONY_TESTNET",t[t.OKEX=66]="OKEX",t[t.OKEX_TESTNET=65]="OKEX_TESTNET",t[t.CELO=42220]="CELO",t[t.PALM=11297108109]="PALM",t[t.PALM_TESTNET=11297108099]="PALM_TESTNET",t[t.MOONRIVER=1285]="MOONRIVER",t[t.FUSE=122]="FUSE",(exports.ChainKey||(exports.ChainKey={})).KOVAN="kovan",(n=exports.Rounding||(exports.Rounding={}))[n.ROUND_DOWN=0]="ROUND_DOWN",n[n.ROUND_HALF_UP=1]="ROUND_HALF_UP",n[n.ROUND_UP=2]="ROUND_UP",(r=exports.TradeType||(exports.TradeType={}))[r.EXACT_INPUT=0]="EXACT_INPUT",r[r.EXACT_OUTPUT=1]="EXACT_OUTPUT";var w=((a={})[exports.ChainId.MAINNET]="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",a[exports.ChainId.ROPSTEN]="0x0D9C8723B343A8368BebE0B5E89273fF8D712e3C",a[exports.ChainId.KOVAN]="0xb7a4F3E9097C08dA09517b5aB877F7a917224ede",a[exports.ChainId.MATIC]="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",a[exports.ChainId.FANTOM]="0x04068DA6C83AFCFA0e13ba15A6696662335D5B75",a[exports.ChainId.BSC]="0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",a[exports.ChainId.HARMONY]="0x985458E523dB3d53125813eD68c274899e9DfAb4",a[exports.ChainId.HECO]="0x9362Bbef4B8313A8Aa9f0c9808B80577Aa26B73B",a[exports.ChainId.OKEX]="0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",a[exports.ChainId.XDAI]="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83",a[exports.ChainId.ARBITRUM]="0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",a[exports.ChainId.AVALANCHE]="0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",a),H=((i={})[exports.ChainId.MAINNET]="0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac",i[exports.ChainId.ROPSTEN]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.RINKEBY]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.GÖRLI]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.KOVAN]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FANTOM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FANTOM_TESTNET]="",i[exports.ChainId.MATIC]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.MATIC_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.XDAI]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.BSC]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.BSC_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.ARBITRUM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.ARBITRUM_TESTNET]="",i[exports.ChainId.MOONBEAM_TESTNET]="0x2Ce3F07dD4c62b56a502E223A7cBE38b1d77A1b5",i[exports.ChainId.AVALANCHE]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.AVALANCHE_TESTNET]="0xd00ae08403B9bbb9124bB305C09058E32C39A48c",i[exports.ChainId.HECO]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HECO_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HARMONY]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HARMONY_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.OKEX]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.OKEX_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.CELO]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.PALM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.PALM_TESTNET]="",i[exports.ChainId.MOONRIVER]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FUSE]="0x43eA90e2b786728520e4f930d2A71a477BF2737C",i),q=((o={})[exports.ChainId.MAINNET]="0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",o[exports.ChainId.RINKEBY]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ROPSTEN]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.GÖRLI]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.KOVAN]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FANTOM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FANTOM_TESTNET]="",o[exports.ChainId.MATIC]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.MATIC_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.XDAI]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.BSC]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.BSC_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ARBITRUM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ARBITRUM_TESTNET]="",o[exports.ChainId.MOONBEAM_TESTNET]="0xeB5c2BB5E83B51d83F3534Ae21E84336B8B376ef",o[exports.ChainId.AVALANCHE]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.AVALANCHE_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HECO]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HECO_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HARMONY]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HARMONY_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.OKEX]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.OKEX_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.CELO]="0x1421bDe4B10e8dd459b3BCb598810B1337D56842",o[exports.ChainId.PALM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.PALM_TESTNET]="",o[exports.ChainId.MOONRIVER]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FUSE]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",o),U=((d={})[exports.ChainId.MAINNET]="0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",d[exports.ChainId.ROPSTEN]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.RINKEBY]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.GÖRLI]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.KOVAN]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.FANTOM]="0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC",d[exports.ChainId.MATIC]="0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a",d[exports.ChainId.XDAI]="0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE",d[exports.ChainId.BSC]="0x947950BcC74888a40Ffa2593C5798F11Fc9124C4",d[exports.ChainId.ARBITRUM]="0xd4d42F0b6DEF4CE0383636770eF773390d85c61A",d[exports.ChainId.AVALANCHE]="0x39cf1BD5f15fb22eC3D9Ff86b0727aFc203427cc",d[exports.ChainId.HECO]="0x52E00B2dA5Bd7940fFe26B609A42F957f31118D5",d[exports.ChainId.HARMONY]="0xBEC775Cb42AbFa4288dE81F387a9b1A3c4Bc552A",d[exports.ChainId.OKEX]="0x2218E0D5E0173769F5b4939a3aE423f7e5E4EAB7",d[exports.ChainId.OKEX_TESTNET]="",d[exports.ChainId.CELO]="0xD15EC721C2A896512Ad29C671997DD68f9593226",d[exports.ChainId.PALM]="",d[exports.ChainId.PALM_TESTNET]="",d),P=((s={})[exports.ChainId.MAINNET]="0xc2EdaD668740f1aA35E4D8f227fB8E17dcA888Cd",s[exports.ChainId.ROPSTEN]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.RINKEBY]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.GÖRLI]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.KOVAN]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s),k=((c={})[exports.ChainId.MAINNET]="0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272",c[exports.ChainId.ROPSTEN]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.RINKEBY]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.GÖRLI]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.KOVAN]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c),L=((u={})[exports.ChainId.MAINNET]="0xE11fc0B43ab98Eb91e9836129d1ee7c3Bc95df50",u[exports.ChainId.ROPSTEN]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",u[exports.ChainId.RINKEBY]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",u[exports.ChainId.GÖRLI]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",u[exports.ChainId.KOVAN]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",u),K=((C={})[exports.ChainId.MAINNET]="0x9a8541Ddf3a932a9A922B607e9CF7301f1d47bD1",C),V=((p={})[exports.ChainId.MAINNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.ROPSTEN]="0x6BdD85290001C8Aef74f35A7606065FA15aD5ACF",p[exports.ChainId.RINKEBY]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.GÖRLI]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.KOVAN]="0x9A0D9920D92c178a58D99B455898Df2df22A2eE4",p[exports.ChainId.FANTOM]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.MATIC]="0x0319000133d3AdA02600f0875d2cf03D442C3367",p[exports.ChainId.MATIC_TESTNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.XDAI]="0xE2d7F5dd869Fc7c126D21b13a9080e75a4bDb324",p[exports.ChainId.BSC]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.BSC_TESTNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.ARBITRUM]="0x74c764D41B77DBbb4fe771daB1939B00b146894A",p[exports.ChainId.AVALANCHE]="0x0711B6026068f736bae6B213031fCE978D48E026",p[exports.ChainId.HECO]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p),W=((h={})[exports.ChainId.MAINNET]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.KOVAN]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.MATIC]="0xB527C5295c4Bc348cBb3a2E96B2494fD292075a7",h[exports.ChainId.XDAI]="0x7a6DA9903d0a481F40b8336c1463487BC8C0407e",h[exports.ChainId.BSC]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.ARBITRUM]="0xa010eE0226cd071BeBd8919A1F675cAE1f1f5D3e",h[exports.ChainId.AVALANCHE]="0x513037395FA0C9c35E41f89189ceDfE3bD42fAdb",h[exports.ChainId.AVALANCHE_TESTNET]="",h[exports.ChainId.HECO]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h),X=((x={})[exports.ChainId.MAINNET]="0x1766733112408b95239aD1951925567CB1203084",x[exports.ChainId.MATIC]="0xe9589382130Ded5DF2397E2fD7A3E9b41DD2701D",x[exports.ChainId.XDAI]="0xE02BDb31C353CE95A1D74F81C93eEa70Bf7371B9",x[exports.ChainId.BSC]="0x1766733112408b95239aD1951925567CB1203084",x[exports.ChainId.ARBITRUM]="0x0bFcD5dD76218bF9e3BE8A1055f9e6D27E5745eb",x[exports.ChainId.AVALANCHE]="0x062eee8B38ab5E8ee3bc58CE505939db53E63785",x[exports.ChainId.HECO]="0x1766733112408b95239aD1951925567CB1203084",x),Y=((A={})[exports.ChainId.MAINNET]="0x545820d5Cc05248da112419fEfb18522c63C8e12",A[exports.ChainId.KOVAN]="0xc0c1649b2c67f1a9f5ff1dd618188165e2555bcf",A[exports.ChainId.MATIC]="0x73BE093B84c773fe8eE0f76DDc0829E45c215415",A[exports.ChainId.XDAI]="0x735f0FbEb3b6389986BcaAf073Af07D2F8be2b93",A[exports.ChainId.BSC]="0x86c655cAc122e9A2fd9Ae1f79Df27b30E357968c",A[exports.ChainId.ARBITRUM]="0xbe7D5968296843756109D42946D01195320922EF",A[exports.ChainId.AVALANCHE]="0xB7C8b5BFcd7212f034Be42a2aAb08b8773B76920",A),G=((I={})[exports.ChainId.MAINNET]="0xB527C5295c4Bc348cBb3a2E96B2494fD292075a7",I[exports.ChainId.KOVAN]="0x75AE0Aa596D39b20addC921DeB5EE3c96279dABE",I[exports.ChainId.MATIC]="0xDB6C4EDd9545d3b815dA85E6429B699c418886f9",I[exports.ChainId.XDAI]="0x07b6e34EeCF38B02e83b6B4702699717e298967E",I[exports.ChainId.BSC]="0x1B16149Edaf1EFa6ADE6aEEF33e63C6e08c9bB1B",I[exports.ChainId.ARBITRUM]="0x860D841bfD1cfEf72A14B2b734005799F07dC7ED",I[exports.ChainId.AVALANCHE]="0x2c46217Fae90D302d1Fb5467ADA504bC2A84f448",I),j=((E={})[exports.ChainId.MAINNET]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.MATIC]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.XDAI]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.BSC]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.ARBITRUM]="0xB2B5C26B6868be10fF77e4E233fD231ceB90162a",E[exports.ChainId.AVALANCHE]="0x43198B6fA5d89B88D2E072fA4841724571De5A59",E),Z=((f={})[exports.ChainId.MAINNET]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.KOVAN]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.MATIC]="0xA77a7fD5a16237B85E0FAd02C51f459D18AE93Cd",f[exports.ChainId.XDAI]="0x97e4a0fb71243A83A6FbaEF7Cf73617594e4cF2F",f[exports.ChainId.BSC]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.ARBITRUM]="0x37B3287292De241278fB5FCa514a756E0BE924f8",f[exports.ChainId.AVALANCHE]="0xD18cA07a599bf5eBb9B7327871ad682F0b660748",f[exports.ChainId.HECO]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f),J=((T={})[exports.ChainId.MAINNET]="0x9917C083FF9FbD29Df1367FBF7F2388A9a202431",T),Q=((D={})[exports.ChainId.MATIC]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",D[exports.ChainId.XDAI]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",D[exports.ChainId.HARMONY]="0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287",D[exports.ChainId.ARBITRUM]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",D),$=((b={})[exports.ChainId.MAINNET]="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",b[exports.ChainId.ROPSTEN]="0xc778417E063141139Fce010982780140Aa0cD5Ab",b[exports.ChainId.RINKEBY]="0xc778417E063141139Fce010982780140Aa0cD5Ab",b[exports.ChainId.GÖRLI]="0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",b[exports.ChainId.KOVAN]="0xd0A1E359811322d97991E03f863a0C30C2cF029C",b[exports.ChainId.ARBITRUM]="0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",b[exports.ChainId.ARBITRUM_TESTNET]="0xf8456e5e6A225C2C1D74D8C9a4cB2B1d5dc1153b",b[exports.ChainId.BSC]="0x2170Ed0880ac9A755fd29B2688956BD959F933F8",b[exports.ChainId.FANTOM]="0x74b23882a30290451A17c44f4F05243b6b58C76d",b[exports.ChainId.MATIC]="0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",b[exports.ChainId.OKEX]="0x2170Ed0880ac9A755fd29B2688956BD959F933F8",b[exports.ChainId.HECO]="0x64FF637fB478863B7468bc97D30a5bF3A428a1fD",b[exports.ChainId.HARMONY]="0x6983D1E6DEf3690C4d616b13597A09e6193EA013",b[exports.ChainId.XDAI]="0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",b[exports.ChainId.AVALANCHE]="0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15",b),z=((l={})[exports.ChainId.MAINNET]=$[exports.ChainId.MAINNET],l[exports.ChainId.ROPSTEN]=$[exports.ChainId.ROPSTEN],l[exports.ChainId.RINKEBY]=$[exports.ChainId.RINKEBY],l[exports.ChainId.GÖRLI]=$[exports.ChainId.GÖRLI],l[exports.ChainId.KOVAN]=$[exports.ChainId.KOVAN],l[exports.ChainId.ARBITRUM]=$[exports.ChainId.ARBITRUM],l[exports.ChainId.ARBITRUM_TESTNET]=$[exports.ChainId.ARBITRUM_TESTNET],l[exports.ChainId.FANTOM]="0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",l[exports.ChainId.FANTOM_TESTNET]="0xf1277d1Ed8AD466beddF92ef448A132661956621",l[exports.ChainId.MATIC]="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",l[exports.ChainId.MATIC_TESTNET]="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",l[exports.ChainId.XDAI]="0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",l[exports.ChainId.BSC]="0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",l[exports.ChainId.BSC_TESTNET]="0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",l[exports.ChainId.MOONBEAM_TESTNET]="0xe73763DB808ecCDC0E36bC8E32510ED126910394",l[exports.ChainId.AVALANCHE]="0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",l[exports.ChainId.AVALANCHE_TESTNET]="0xd00ae08403B9bbb9124bB305C09058E32C39A48c",l[exports.ChainId.HECO]="0x5545153CCFcA01fbd7Dd11C0b23ba694D9509A6F",l[exports.ChainId.HECO_TESTNET]="0x5B2DA6F42CA09C77D577a12BeaD0446148830687",l[exports.ChainId.HARMONY]="0xcF664087a5bB0237a0BAd6742852ec6c8d69A27a",l[exports.ChainId.HARMONY_TESTNET]="0x7a2afac38517d512E55C0bCe3b6805c10a04D60F",l[exports.ChainId.OKEX]="0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15",l[exports.ChainId.OKEX_TESTNET]="0x2219845942d28716c0F7C605765fABDcA1a7d9E0",l[exports.ChainId.CELO]="0x471EcE3750Da237f93B8E339c536989b8978a438",l[exports.ChainId.PALM]="0xF98cABF0a963452C5536330408B2590567611a71",l[exports.ChainId.MOONRIVER]="0xf50225a84382c74CbdeA10b0c176f71fc3DE0C4d",l[exports.ChainId.FUSE]="0x0BE9e53fd7EDaC9F859882AfdDa116645287C629",l),ee=((N={})[exports.ChainId.MAINNET]="0xEF0881eC094552b2e128Cf945EF17a6752B4Ec5d",N),te=((B={})[exports.ChainId.MAINNET]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.GÖRLI]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.ROPSTEN]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.RINKEBY]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B),ne=((O={})[exports.ChainId.MAINNET]="0xcff6eF0B9916682B37D80c19cFF8949bc1886bC2",O[exports.ChainId.ROPSTEN]="0xcff6eF0B9916682B37D80c19cFF8949bc1886bC2",O),re=((m={})[exports.ChainId.MAINNET]="0xcBE6B83e77cdc011Cc18F6f0Df8444E5783ed982",m[exports.ChainId.ROPSTEN]="0x84d1f7202e0e7dac211617017ca72a2cb5e2b955",m),ae=((S={})[exports.ChainId.MAINNET]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.ROPSTEN]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.RINKEBY]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.GÖRLI]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.KOVAN]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.ARBITRUM]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",S[exports.ChainId.ARBITRUM_TESTNET]="0xa501c031958F579dB7676fF1CE78AD305794d579",S[exports.ChainId.CELO]="0x9aac9048fC8139667D6a2597B902865bfdc225d3",S[exports.ChainId.FANTOM]="0x22D4cF72C45F8198CfbF4B568dBdB5A85e8DC0B5",S[exports.ChainId.MATIC]="0x02817C1e3543c2d908a590F5dB6bc97f933dB4BD",S[exports.ChainId.XDAI]="0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287",S[exports.ChainId.BSC]="0xa9193376D09C7f31283C54e56D013fCF370Cd9D9",S[exports.ChainId.AVALANCHE]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.HECO]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.HARMONY]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.OKEX]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",S[exports.ChainId.PALM]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",S[exports.ChainId.MOONRIVER]="0x270f2F35bED92B7A59eA5F08F6B3fd34c8D9D9b5",S[exports.ChainId.FUSE]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",S);function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t,n){return t&&ie(e.prototype,t),n&&ie(e,n),e}function de(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ce(e,t)}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ue(){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(e){return!1}}function Ce(e,t,n){return(Ce=ue()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&ce(a,n.prototype),a}).apply(null,arguments)}function pe(e){var t="function"==typeof Map?new Map:void 0;return(pe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return Ce(e,arguments,se(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ce(n,e)})(e)}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ae(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xe(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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 Ie=function(e,t,n,r){Number.isSafeInteger(e)||R(!1),t>=0&&t<255&&Number.isInteger(t)||R(!1),this.chainId=e,this.decimals=t,this.symbol=n,this.name=r},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).isNative=!0,t.isToken=!1,t}return de(t,e),t}(Ie);function fe(e){try{return v.getAddress(e)}catch(e){R(!1)}}var Te,De,be,le=function(e){function t(t,n,r,a,i){var o;return(o=e.call(this,t,r,a,i)||this).isNative=!1,o.isToken=!0,o.chainId=t,o.address=fe(n),o}de(t,e);var n=t.prototype;return n.equals=function(e){return e.isToken&&this.chainId===e.chainId&&this.address===e.address},n.sortsBefore=function(e){return this.chainId!==e.chainId&&R(!1),this.address===e.address&&R(!1),this.address.toLowerCase()<e.address.toLowerCase()},oe(t,[{key:"wrapped",get:function(){return this}}]),t}(Ie),Ne=((Te={})[exports.ChainId.MAINNET]=new le(exports.ChainId.MAINNET,w[exports.ChainId.MAINNET],6,"USDC","USD Coin"),Te[exports.ChainId.ROPSTEN]=new le(exports.ChainId.ROPSTEN,w[exports.ChainId.ROPSTEN],6,"USDC","USD Coin"),Te[exports.ChainId.KOVAN]=new le(exports.ChainId.KOVAN,w[exports.ChainId.KOVAN],6,"USDC","USD Coin"),Te[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,w[exports.ChainId.MATIC],6,"USDC","USD Coin"),Te[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,w[exports.ChainId.FANTOM],6,"USDC","USD Coin"),Te[exports.ChainId.BSC]=new le(exports.ChainId.BSC,w[exports.ChainId.BSC],18,"USDC","USD Coin"),Te[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,w[exports.ChainId.HARMONY],6,"USDC","USD Coin"),Te[exports.ChainId.HECO]=new le(exports.ChainId.HECO,w[exports.ChainId.HECO],6,"USDC","USD Coin"),Te[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,w[exports.ChainId.OKEX],18,"USDC","USD Coin"),Te[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,w[exports.ChainId.XDAI],6,"USDC","USD Coin"),Te[exports.ChainId.ARBITRUM]=new le(exports.ChainId.ARBITRUM,w[exports.ChainId.ARBITRUM],6,"USDC","USD Coin"),Te),Be=((De={})[exports.ChainId.MAINNET]=new le(exports.ChainId.MAINNET,$[exports.ChainId.MAINNET],18,"WETH","Wrapped Ether"),De[exports.ChainId.ROPSTEN]=new le(exports.ChainId.ROPSTEN,$[exports.ChainId.ROPSTEN],18,"WETH","Wrapped Ether"),De[exports.ChainId.RINKEBY]=new le(exports.ChainId.RINKEBY,$[exports.ChainId.RINKEBY],18,"WETH","Wrapped Ether"),De[exports.ChainId.GÖRLI]=new le(exports.ChainId.GÖRLI,$[exports.ChainId.GÖRLI],18,"WETH","Wrapped Ether"),De[exports.ChainId.KOVAN]=new le(exports.ChainId.KOVAN,$[exports.ChainId.KOVAN],18,"WETH","Wrapped Ether"),De[exports.ChainId.ARBITRUM]=new le(exports.ChainId.ARBITRUM,$[exports.ChainId.ARBITRUM],18,"WETH","Wrapped Ether"),De[exports.ChainId.ARBITRUM_TESTNET]=new le(exports.ChainId.ARBITRUM_TESTNET,$[exports.ChainId.ARBITRUM_TESTNET],18,"WETH","Wrapped Ether"),De[exports.ChainId.BSC]=new le(exports.ChainId.BSC,$[exports.ChainId.BSC],18,"WETH","Wrapped Ether"),De[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,$[exports.ChainId.FANTOM],18,"WETH","Wrapped Ether"),De[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,$[exports.ChainId.MATIC],18,"WETH","Wrapped Ether"),De[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,$[exports.ChainId.OKEX],18,"WETH","Wrapped Ether"),De[exports.ChainId.HECO]=new le(exports.ChainId.HECO,$[exports.ChainId.HECO],18,"WETH","Wrapped Ether"),De[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,$[exports.ChainId.HARMONY],18,"WETH","Wrapped Ether"),De[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,$[exports.ChainId.XDAI],18,"WETH","Wrapped Ether"),De[exports.ChainId.AVALANCHE]=new le(exports.ChainId.AVALANCHE,$[exports.ChainId.AVALANCHE],18,"WETH","Wrapped Ether"),De),Oe=((be={})[exports.ChainId.MAINNET]=Be[exports.ChainId.MAINNET],be[exports.ChainId.ROPSTEN]=Be[exports.ChainId.ROPSTEN],be[exports.ChainId.RINKEBY]=Be[exports.ChainId.RINKEBY],be[exports.ChainId.GÖRLI]=Be[exports.ChainId.GÖRLI],be[exports.ChainId.KOVAN]=Be[exports.ChainId.KOVAN],be[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,z[exports.ChainId.FANTOM],18,"WFTM","Wrapped FTM"),be[exports.ChainId.FANTOM_TESTNET]=new le(exports.ChainId.FANTOM_TESTNET,z[exports.ChainId.FANTOM_TESTNET],18,"FTM","Wrapped FTM"),be[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,z[exports.ChainId.MATIC],18,"WMATIC","Wrapped Matic"),be[exports.ChainId.MATIC_TESTNET]=new le(exports.ChainId.MATIC_TESTNET,z[exports.ChainId.MATIC_TESTNET],18,"WMATIC","Wrapped Matic"),be[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,z[exports.ChainId.XDAI],18,"WXDAI","Wrapped xDai"),be[exports.ChainId.BSC]=new le(exports.ChainId.BSC,z[exports.ChainId.BSC],18,"WBNB","Wrapped BNB"),be[exports.ChainId.BSC_TESTNET]=new le(exports.ChainId.BSC_TESTNET,z[exports.ChainId.BSC_TESTNET],18,"WBNB","Wrapped BNB"),be[exports.ChainId.ARBITRUM]=Be[exports.ChainId.ARBITRUM],be[exports.ChainId.ARBITRUM_TESTNET]=Be[exports.ChainId.ARBITRUM_TESTNET],be[exports.ChainId.MOONBEAM_TESTNET]=new le(exports.ChainId.MOONBEAM_TESTNET,z[exports.ChainId.MOONBEAM_TESTNET],18,"WETH","Wrapped Ether"),be[exports.ChainId.AVALANCHE]=new le(exports.ChainId.AVALANCHE,z[exports.ChainId.AVALANCHE],18,"WAVAX","Wrapped AVAX"),be[exports.ChainId.AVALANCHE_TESTNET]=new le(exports.ChainId.AVALANCHE_TESTNET,z[exports.ChainId.AVALANCHE_TESTNET],18,"WAVAX","Wrapped AVAX"),be[exports.ChainId.HECO]=new le(exports.ChainId.HECO,z[exports.ChainId.HECO],18,"WHT","Wrapped HT"),be[exports.ChainId.HECO_TESTNET]=new le(exports.ChainId.HECO_TESTNET,z[exports.ChainId.HECO_TESTNET],18,"WHT","Wrapped HT"),be[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,z[exports.ChainId.HARMONY],18,"WONE","Wrapped ONE"),be[exports.ChainId.HARMONY_TESTNET]=new le(exports.ChainId.HARMONY_TESTNET,z[exports.ChainId.HARMONY_TESTNET],18,"WONE","Wrapped ONE"),be[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,z[exports.ChainId.OKEX],18,"WOKT","Wrapped OKExChain"),be[exports.ChainId.OKEX_TESTNET]=new le(exports.ChainId.OKEX_TESTNET,z[exports.ChainId.OKEX_TESTNET],18,"WOKT","Wrapped OKExChain"),be[exports.ChainId.CELO]=new le(exports.ChainId.CELO,z[exports.ChainId.CELO],18,"CELO","Celo"),be[exports.ChainId.PALM]=new le(exports.ChainId.PALM,z[exports.ChainId.PALM],18,"WPALM","Wrapped Palm"),be[exports.ChainId.MOONRIVER]=new le(exports.ChainId.MOONRIVER,z[exports.ChainId.MOONRIVER],18,"WMOVR","Wrapped Moonriver"),be[exports.ChainId.FUSE]=new le(exports.ChainId.FUSE,z[exports.ChainId.FUSE],18,"WFUSE","Wrapped Fuse"),be),me=function(e){function t(t){return e.call(this,t,18,"AVAX","Avalanche")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);me._cache={};var Se=function(e){function t(t){return e.call(this,t,18,"BNB","Binance Coin")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Se._cache={};var Fe=function(e){function t(t){return e.call(this,t,18,"CELO","Celo")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Fe._cache={};var Re=function(e){function t(t){return e.call(this,t,18,"ETH","Ether")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._etherCache[e])?n:this._etherCache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Be[this.chainId];return e||R(!1),e}}]),t}(Ee);Re._etherCache={};var ve=function(e){function t(t){return e.call(this,t,18,"FTM","Fantom")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ve._cache={};var ye=function(e){function t(t){return e.call(this,t,18,"ONE","Harmony")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ye._cache={};var Me=function(e){function t(t){return e.call(this,t,18,"HT","Huobi Token")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Me._cache={};var _e=function(e){function t(t){return e.call(this,t,18,"MATIC","Matic")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);_e._cache={};var ge=function(e){function t(t){return e.call(this,t,18,"MOVR","Moonriver")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ge._cache={};var we=function(e){function t(t){return e.call(this,t,18,"OKT","OKExChain")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);we._cache={};var He=function(e){function t(t){return e.call(this,t,18,"XDAI","xDai")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);He._cache={};var qe=function(e){function t(t){return e.call(this,t,18,"PALM","Palm")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);qe._cache={};var Ue,Pe=function(e){function t(t){return e.call(this,t,18,"FUSE","Fuse")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Pe._cache={};var ke,Le,Ke,Ve,We=((Ue={})[exports.ChainId.MAINNET]=Re.onChain(exports.ChainId.MAINNET),Ue[exports.ChainId.ROPSTEN]=Re.onChain(exports.ChainId.ROPSTEN),Ue[exports.ChainId.RINKEBY]=Re.onChain(exports.ChainId.RINKEBY),Ue[exports.ChainId.GÖRLI]=Re.onChain(exports.ChainId.GÖRLI),Ue[exports.ChainId.KOVAN]=Re.onChain(exports.ChainId.KOVAN),Ue[exports.ChainId.FANTOM]=ve.onChain(exports.ChainId.FANTOM),Ue[exports.ChainId.FANTOM_TESTNET]=ve.onChain(exports.ChainId.FANTOM_TESTNET),Ue[exports.ChainId.MATIC]=_e.onChain(exports.ChainId.MATIC),Ue[exports.ChainId.MATIC_TESTNET]=_e.onChain(exports.ChainId.MATIC_TESTNET),Ue[exports.ChainId.XDAI]=He.onChain(exports.ChainId.XDAI),Ue[exports.ChainId.BSC]=Se.onChain(exports.ChainId.BSC),Ue[exports.ChainId.BSC_TESTNET]=Se.onChain(exports.ChainId.BSC_TESTNET),Ue[exports.ChainId.ARBITRUM]=Re.onChain(exports.ChainId.ARBITRUM),Ue[exports.ChainId.AVALANCHE]=me.onChain(exports.ChainId.AVALANCHE),Ue[exports.ChainId.AVALANCHE_TESTNET]=me.onChain(exports.ChainId.AVALANCHE_TESTNET),Ue[exports.ChainId.HECO]=Me.onChain(exports.ChainId.HECO),Ue[exports.ChainId.HECO_TESTNET]=Me.onChain(exports.ChainId.HECO_TESTNET),Ue[exports.ChainId.HARMONY]=ye.onChain(exports.ChainId.HARMONY),Ue[exports.ChainId.HARMONY_TESTNET]=ye.onChain(exports.ChainId.HARMONY_TESTNET),Ue[exports.ChainId.OKEX]=we.onChain(exports.ChainId.OKEX),Ue[exports.ChainId.OKEX_TESTNET]=we.onChain(exports.ChainId.OKEX_TESTNET),Ue[exports.ChainId.CELO]=Fe.onChain(exports.ChainId.CELO),Ue[exports.ChainId.PALM]=qe.onChain(exports.ChainId.PALM),Ue[exports.ChainId.MOONRIVER]=ge.onChain(exports.ChainId.MOONRIVER),Ue[exports.ChainId.FUSE]=Pe.onChain(exports.ChainId.FUSE),Ue),Xe=F.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ye=F.BigInt(0),Ge=F.BigInt(1),je=F.BigInt(2),Ze=F.BigInt(3),Je=F.BigInt(5),Qe=F.BigInt(10),$e=F.BigInt(100),ze=F.BigInt(997),et=F.BigInt(1e3),tt=((ke={})[exports.ChainId.KOVAN]=exports.ChainKey.KOVAN,ke),nt=((Le={})[exports.ChainId.MAINNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.ROPSTEN]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.RINKEBY]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.GÖRLI]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.KOVAN]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.FANTOM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MATIC]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MATIC_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.XDAI]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.BSC]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.BSC_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.ARBITRUM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MOONBEAM_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.AVALANCHE]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.AVALANCHE_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HECO]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HECO_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HARMONY]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HARMONY_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.OKEX]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.OKEX_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.CELO]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.PALM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MOONRIVER]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.FUSE]="0x1901958ef8b470f2c0a3875a79ee0bd303866d85102c0f1ea820d317024d50b5",Le),rt=F.BigInt(1e3);(Ve=exports.SolidityType||(exports.SolidityType={})).uint8="uint8",Ve.uint256="uint256";var at,it,ot=((Ke={})[exports.SolidityType.uint8]=F.BigInt("0xff"),Ke[exports.SolidityType.uint256]=F.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ke),dt="setPrototypeOf"in Object,st=function(e){function t(){var n;return(n=e.call(this)||this).isInsufficientReservesError=!0,n.name=n.constructor.name,dt&&Object.setPrototypeOf(he(n),(this instanceof t?this.constructor:void 0).prototype),n}return de(t,e),t}(pe(Error)),ct=function(e){function t(){var n;return(n=e.call(this)||this).isInsufficientInputAmountError=!0,n.name=n.constructor.name,dt&&Object.setPrototypeOf(he(n),(this instanceof t?this.constructor:void 0).prototype),n}return de(t,e),t}(pe(Error)),ut=_(M),Ct=_(y);Ct.strict=!0;var pt=((at={})[exports.Rounding.ROUND_DOWN]=ut.ROUND_DOWN,at[exports.Rounding.ROUND_HALF_UP]=ut.ROUND_HALF_UP,at[exports.Rounding.ROUND_UP]=ut.ROUND_UP,at),ht=((it={})[exports.Rounding.ROUND_DOWN]=0,it[exports.Rounding.ROUND_HALF_UP]=1,it[exports.Rounding.ROUND_UP]=3,it),xt=function(){function e(e,t){void 0===t&&(t=F.BigInt(1)),this.numerator=F.BigInt(e),this.denominator=F.BigInt(t)}e.tryParseFraction=function(t){if(t instanceof F||"number"==typeof t||"string"==typeof t)return new e(t);if("numerator"in t&&"denominator"in t)return t;throw new Error("Could not parse fraction")};var t=e.prototype;return t.invert=function(){return new e(this.denominator,this.numerator)},t.add=function(t){var n=e.tryParseFraction(t);return F.equal(this.denominator,n.denominator)?new e(F.add(this.numerator,n.numerator),this.denominator):new e(F.add(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator)),F.multiply(this.denominator,n.denominator))},t.subtract=function(t){var n=e.tryParseFraction(t);return F.equal(this.denominator,n.denominator)?new e(F.subtract(this.numerator,n.numerator),this.denominator):new e(F.subtract(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator)),F.multiply(this.denominator,n.denominator))},t.lessThan=function(t){var n=e.tryParseFraction(t);return F.lessThan(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.equalTo=function(t){var n=e.tryParseFraction(t);return F.equal(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.greaterThan=function(t){var n=e.tryParseFraction(t);return F.greaterThan(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.multiply=function(t){var n=e.tryParseFraction(t);return new e(F.multiply(this.numerator,n.numerator),F.multiply(this.denominator,n.denominator))},t.divide=function(t){var n=e.tryParseFraction(t);return new e(F.multiply(this.numerator,n.denominator),F.multiply(this.denominator,n.numerator))},t.toSignificant=function(e,t,n){void 0===t&&(t={groupSeparator:""}),void 0===n&&(n=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||R(!1),e>0||R(!1),ut.set({precision:e+1,rounding:pt[n]});var r=new ut(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return r.toFormat(r.decimalPlaces(),t)},t.toFixed=function(e,t,n){return void 0===t&&(t={groupSeparator:""}),void 0===n&&(n=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||R(!1),e>=0||R(!1),Ct.DP=e,Ct.RM=ht[n],new Ct(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,t)},oe(e,[{key:"quotient",get:function(){return F.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new e(F.remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new e(this.numerator,this.denominator)}}]),e}(),At=_(y);At.strict=!0;var It=function(e){function t(t,n,r){var a;return a=e.call(this,n,r)||this,F.lessThanOrEqual(a.quotient,Xe)||R(!1),a.currency=t,a.decimalScale=F.exponentiate(F.BigInt(10),F.BigInt(t.decimals)),a}de(t,e),t.fromRawAmount=function(e,n){return new t(e,n)},t.fromFractionalAmount=function(e,n,r){return new t(e,n,r)};var n=t.prototype;return n.add=function(n){this.currency.equals(n.currency)||R(!1);var r=e.prototype.add.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.subtract=function(n){this.currency.equals(n.currency)||R(!1);var r=e.prototype.subtract.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.multiply=function(n){var r=e.prototype.multiply.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.divide=function(n){var r=e.prototype.divide.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.toSignificant=function(t,n,r){return void 0===t&&(t=6),void 0===r&&(r=exports.Rounding.ROUND_DOWN),e.prototype.divide.call(this,this.decimalScale).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=this.currency.decimals),void 0===r&&(r=exports.Rounding.ROUND_DOWN),t<=this.currency.decimals||R(!1),e.prototype.divide.call(this,this.decimalScale).toFixed(t,n,r)},n.toExact=function(e){return void 0===e&&(e={groupSeparator:""}),At.DP=this.currency.decimals,new At(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(e)},oe(t,[{key:"wrapped",get:function(){return this.currency.isToken?this:t.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),t}(xt),Et=function(e){function t(){for(var t,n,r,a,i,o=arguments.length,d=new Array(o),s=0;s<o;s++)d[s]=arguments[s];if(4===d.length)n=d[0],r=d[1],a=d[2],i=d[3];else{var c=d[0].quoteAmount.divide(d[0].baseAmount),u=[d[0].baseAmount.currency,d[0].quoteAmount.currency,c.denominator,c.numerator];n=u[0],r=u[1],a=u[2],i=u[3]}return(t=e.call(this,i,a)||this).baseCurrency=n,t.quoteCurrency=r,t.scalar=new xt(F.exponentiate(F.BigInt(10),F.BigInt(n.decimals)),F.exponentiate(F.BigInt(10),F.BigInt(r.decimals))),t}de(t,e);var n=t.prototype;return n.invert=function(){return new t(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},n.multiply=function(n){this.quoteCurrency.equals(n.baseCurrency)||R(!1);var r=e.prototype.multiply.call(this,n);return new t(this.baseCurrency,n.quoteCurrency,r.denominator,r.numerator)},n.quote=function(t){t.currency.equals(this.baseCurrency)||R(!1);var n=e.prototype.multiply.call(this,t);return It.fromFractionalAmount(this.quoteCurrency,n.numerator,n.denominator)},n.toSignificant=function(e,t,n){return void 0===e&&(e=6),this.adjustedForDecimals.toSignificant(e,t,n)},n.toFixed=function(e,t,n){return void 0===e&&(e=4),this.adjustedForDecimals.toFixed(e,t,n)},oe(t,[{key:"adjustedForDecimals",get:function(){return e.prototype.multiply.call(this,this.scalar)}}]),t}(xt),ft=function(e){var t=e.factoryAddress,n=e.tokenA,r=e.tokenB,a=n.sortsBefore(r)?[n,r]:[r,n],i=a[0];return v.getCreate2Address(t,g.keccak256(["bytes"],[g.pack(["address","address"],[i.address,a[1].address])]),nt[i.chainId])},Tt=F.BigInt(Number.MAX_SAFE_INTEGER);function Dt(e){if(F.greaterThanOrEqual(e,Ye)||R(!1),F.lessThan(e,Tt))return F.BigInt(Math.floor(Math.sqrt(F.toNumber(e))));var t,n;for(t=e,n=F.add(F.divide(e,je),Ge);F.lessThan(n,t);)t=n,n=F.divide(F.add(F.divide(e,n),n),je);return t}var bt=function(){function e(t,n){var r=t.currency.sortsBefore(n.currency)?[t,n]:[n,t];this.liquidityToken=new le(r[0].currency.chainId,e.getAddress(r[0].currency,r[1].currency),18,"UNI-V2","Uniswap V2"),this.tokenAmounts=r}e.getAddress=function(e,t){return ft({factoryAddress:H[e.chainId],tokenA:e,tokenB:t})};var t=e.prototype;return t.involvesToken=function(e){return e.equals(this.token0)||e.equals(this.token1)},t.priceOf=function(e){return this.involvesToken(e)||R(!1),e.equals(this.token0)?this.token0Price:this.token1Price},t.reserveOf=function(e){return this.involvesToken(e)||R(!1),e.equals(this.token0)?this.reserve0:this.reserve1},t.getOutputAmount=function(t){if(this.involvesToken(t.currency)||R(!1),F.equal(this.reserve0.quotient,Ye)||F.equal(this.reserve1.quotient,Ye))throw new st;var n=this.reserveOf(t.currency),r=this.reserveOf(t.currency.equals(this.token0)?this.token1:this.token0),a=F.multiply(t.quotient,ze),i=F.multiply(a,r.quotient),o=F.add(F.multiply(n.quotient,et),a),d=It.fromRawAmount(t.currency.equals(this.token0)?this.token1:this.token0,F.divide(i,o));if(F.equal(d.quotient,Ye))throw new ct;return[d,new e(n.add(t),r.subtract(d))]},t.getInputAmount=function(t){if(this.involvesToken(t.currency)||R(!1),F.equal(this.reserve0.quotient,Ye)||F.equal(this.reserve1.quotient,Ye)||F.greaterThanOrEqual(t.quotient,this.reserveOf(t.currency).quotient))throw new st;var n=this.reserveOf(t.currency),r=this.reserveOf(t.currency.equals(this.token0)?this.token1:this.token0),a=F.multiply(F.multiply(r.quotient,t.quotient),et),i=F.multiply(F.subtract(n.quotient,t.quotient),ze),o=It.fromRawAmount(t.currency.equals(this.token0)?this.token1:this.token0,F.add(F.divide(a,i),Ge));return[o,new e(r.add(o),n.subtract(t))]},t.getLiquidityMinted=function(e,t,n){e.currency.equals(this.liquidityToken)||R(!1);var r,a=t.currency.sortsBefore(n.currency)?[t,n]:[n,t];if(a[0].currency.equals(this.token0)&&a[1].currency.equals(this.token1)||R(!1),F.equal(e.quotient,Ye))r=F.subtract(Dt(F.multiply(a[0].quotient,a[1].quotient)),rt);else{var i=F.divide(F.multiply(a[0].quotient,e.quotient),this.reserve0.quotient),o=F.divide(F.multiply(a[1].quotient,e.quotient),this.reserve1.quotient);r=F.lessThanOrEqual(i,o)?i:o,console.log({amount0:i.toString(),amount1:o.toString(),liquidity:r.toString(),totalSupply:e.quotient.toString(),kLast:Dt(F.multiply(this.tokenAmounts[0].quotient,this.tokenAmounts[1].quotient))})}if(!F.greaterThan(r,Ye))throw new ct;return It.fromRawAmount(this.liquidityToken,r)},t.getLiquidityValue=function(e,t,n,r,a){var i;if(void 0===r&&(r=!1),this.involvesToken(e)||R(!1),t.currency.equals(this.liquidityToken)||R(!1),n.currency.equals(this.liquidityToken)||R(!1),F.lessThanOrEqual(n.quotient,t.quotient)||R(!1),r){a||R(!1);var o=F.BigInt(a);if(F.equal(o,Ye))i=t;else{var d=Dt(F.multiply(this.reserve0.quotient,this.reserve1.quotient)),s=Dt(o);if(F.greaterThan(d,s)){var c=F.multiply(t.quotient,F.subtract(d,s)),u=F.add(F.multiply(d,Je),s),C=F.divide(c,u);i=t.add(It.fromRawAmount(this.liquidityToken,C))}else i=t}}else i=t;return It.fromRawAmount(e,F.divide(F.multiply(n.quotient,this.reserveOf(e).quotient),i.quotient))},oe(e,[{key:"token0Price",get:function(){var e=this.tokenAmounts[1].divide(this.tokenAmounts[0]);return new Et(this.token0,this.token1,e.denominator,e.numerator)}},{key:"token1Price",get:function(){var e=this.tokenAmounts[0].divide(this.tokenAmounts[1]);return new Et(this.token1,this.token0,e.denominator,e.numerator)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].currency}},{key:"token1",get:function(){return this.tokenAmounts[1].currency}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),e}(),lt=new xt(F.BigInt(100));function Nt(e){return new Bt(e.numerator,e.denominator)}var Bt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).isPercent=!0,t}de(t,e);var n=t.prototype;return n.add=function(t){return Nt(e.prototype.add.call(this,t))},n.subtract=function(t){return Nt(e.prototype.subtract.call(this,t))},n.multiply=function(t){return Nt(e.prototype.multiply.call(this,t))},n.divide=function(t){return Nt(e.prototype.divide.call(this,t))},n.toSignificant=function(t,n,r){return void 0===t&&(t=5),e.prototype.multiply.call(this,lt).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=2),e.prototype.multiply.call(this,lt).toFixed(t,n,r)},t}(xt),Ot=function(){function e(e,t,n){this._midPrice=null,e.length>0||R(!1);var r=e[0].chainId;e.every((function(e){return e.chainId===r}))||R(!1);var a=t.wrapped;e[0].involvesToken(a)||R(!1),void 0===n||e[e.length-1].involvesToken(n.wrapped)||R(!1);for(var i,o=[a],d=Ae(e.entries());!(i=d()).done;){var s=i.value,c=s[1],u=o[s[0]];u.equals(c.token0)||u.equals(c.token1)||R(!1);var C=u.equals(c.token0)?c.token1:c.token0;o.push(C)}this.pairs=e,this.path=o,this.input=t,this.output=n}return oe(e,[{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;for(var e,t=[],n=Ae(this.pairs.entries());!(e=n()).done;){var r=e.value,a=r[1];t.push(this.path[r[0]].equals(a.token0)?new Et(a.reserve0.currency,a.reserve1.currency,a.reserve0.quotient,a.reserve1.quotient):new Et(a.reserve1.currency,a.reserve0.currency,a.reserve1.quotient,a.reserve0.quotient))}var i=t.slice(1).reduce((function(e,t){return e.multiply(t)}),t[0]);return this._midPrice=new Et(this.input,this.output,i.denominator,i.numerator)}},{key:"chainId",get:function(){return this.pairs[0].chainId}}]),e}();function mt(e,t,n){var r=e.quote(t),a=r.subtract(n).divide(r);return new Bt(a.numerator,a.denominator)}function St(e,t,n,r){if(n>0||R(!1),e.length<=n||R(!1),0===e.length)return e.push(t),null;var a=e.length===n;if(a&&r(e[e.length-1],t)<=0)return t;for(var i=0,o=e.length;i<o;){var d=i+o>>>1;r(e[d],t)<=0?i=d+1:o=d}return e.splice(i,0,t),a?e.pop():null}function Ft(e,t){return e.inputAmount.currency.equals(t.inputAmount.currency)||R(!1),e.outputAmount.currency.equals(t.outputAmount.currency)||R(!1),e.outputAmount.equalTo(t.outputAmount)?e.inputAmount.equalTo(t.inputAmount)?0:e.inputAmount.lessThan(t.inputAmount)?-1:1:e.outputAmount.lessThan(t.outputAmount)?1:-1}function Rt(e,t){var n=Ft(e,t);return 0!==n?n:e.priceImpact.lessThan(t.priceImpact)?-1:e.priceImpact.greaterThan(t.priceImpact)?1:e.route.path.length-t.route.path.length}var vt=function(){function e(e,t,n){this.route=e,this.tradeType=n;var r=new Array(e.path.length);if(n===exports.TradeType.EXACT_INPUT){t.currency.equals(e.input)||R(!1),r[0]=t.wrapped;for(var a=0;a<e.path.length-1;a++){var i=e.pairs[a].getOutputAmount(r[a]);r[a+1]=i[0]}this.inputAmount=It.fromFractionalAmount(e.input,t.numerator,t.denominator),this.outputAmount=It.fromFractionalAmount(e.output,r[r.length-1].numerator,r[r.length-1].denominator)}else{t.currency.equals(e.output)||R(!1),r[r.length-1]=t.wrapped;for(var o=e.path.length-1;o>0;o--){var d=e.pairs[o-1].getInputAmount(r[o]);r[o-1]=d[0]}this.inputAmount=It.fromFractionalAmount(e.input,r[0].numerator,r[0].denominator),this.outputAmount=It.fromFractionalAmount(e.output,t.numerator,t.denominator)}this.executionPrice=new Et(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient),this.priceImpact=mt(e.midPrice,this.inputAmount,this.outputAmount)}e.exactIn=function(t,n){return new e(t,n,exports.TradeType.EXACT_INPUT)},e.exactOut=function(t,n){return new e(t,n,exports.TradeType.EXACT_OUTPUT)};var t=e.prototype;return t.minimumAmountOut=function(e){if(e.lessThan(Ye)&&R(!1),this.tradeType===exports.TradeType.EXACT_OUTPUT)return this.outputAmount;var t=new xt(Ge).add(e).invert().multiply(this.outputAmount.quotient).quotient;return It.fromRawAmount(this.outputAmount.currency,t)},t.maximumAmountIn=function(e){if(e.lessThan(Ye)&&R(!1),this.tradeType===exports.TradeType.EXACT_INPUT)return this.inputAmount;var t=new xt(Ge).add(e).multiply(this.inputAmount.quotient).quotient;return It.fromRawAmount(this.inputAmount.currency,t)},e.bestTradeExactIn=function(t,n,r,a,i,o,d){var s=void 0===a?{}:a,c=s.maxNumResults,u=void 0===c?3:c,C=s.maxHops,p=void 0===C?3:C;void 0===i&&(i=[]),void 0===o&&(o=n),void 0===d&&(d=[]),t.length>0||R(!1),p>0||R(!1),n===o||i.length>0||R(!1);for(var h=o.wrapped,x=r.wrapped,A=0;A<t.length;A++){var I=t[A];if((I.token0.equals(h.currency)||I.token1.equals(h.currency))&&!I.reserve0.equalTo(Ye)&&!I.reserve1.equalTo(Ye)){var E=void 0;try{E=I.getOutputAmount(h)[0]}catch(e){if(e.isInsufficientInputAmountError)continue;throw e}if(E.currency.equals(x))St(d,new e(new Ot([].concat(i,[I]),n.currency,r),n,exports.TradeType.EXACT_INPUT),u,Rt);else if(p>1&&t.length>1){var f=t.slice(0,A).concat(t.slice(A+1,t.length));e.bestTradeExactIn(f,n,r,{maxNumResults:u,maxHops:p-1},[].concat(i,[I]),E,d)}}}return d},t.worstExecutionPrice=function(e){return new Et(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(e).quotient,this.minimumAmountOut(e).quotient)},e.bestTradeExactOut=function(t,n,r,a,i,o,d){var s=void 0===a?{}:a,c=s.maxNumResults,u=void 0===c?3:c,C=s.maxHops,p=void 0===C?3:C;void 0===i&&(i=[]),void 0===o&&(o=r),void 0===d&&(d=[]),t.length>0||R(!1),p>0||R(!1),r===o||i.length>0||R(!1);for(var h=o.wrapped,x=n.wrapped,A=0;A<t.length;A++){var I=t[A];if((I.token0.equals(h.currency)||I.token1.equals(h.currency))&&!I.reserve0.equalTo(Ye)&&!I.reserve1.equalTo(Ye)){var E=void 0;try{E=I.getInputAmount(h)[0]}catch(e){if(e.isInsufficientReservesError)continue;throw e}if(E.currency.equals(x))St(d,new e(new Ot([I].concat(i),n,r.currency),r,exports.TradeType.EXACT_OUTPUT),u,Rt);else if(p>1&&t.length>1){var f=t.slice(0,A).concat(t.slice(A+1,t.length));e.bestTradeExactOut(f,n,r,{maxNumResults:u,maxHops:p-1},[I].concat(i),E,d)}}}return d},e}();function yt(e,t){return e.getSigner(t).connectUnchecked()}function Mt(e){return"0x"+e.quotient.toString(16)}var _t=function(){function e(){}return e.swapCallParameters=function(e,t){var n=e.inputAmount.currency.isNative,r=e.outputAmount.currency.isNative;n&&r&&R(!1),!("ttl"in t)||t.ttl>0||R(!1);var a,i,o,d=fe(t.recipient),s=Mt(e.maximumAmountIn(t.allowedSlippage)),c=Mt(e.minimumAmountOut(t.allowedSlippage)),u=e.route.path.map((function(e){return e.address})),C="ttl"in t?"0x"+(Math.floor((new Date).getTime()/1e3)+t.ttl).toString(16):"0x"+t.deadline.toString(16),p=Boolean(t.feeOnTransfer);switch(e.tradeType){case exports.TradeType.EXACT_INPUT:n?(a=p?"swapExactETHForTokensSupportingFeeOnTransferTokens":"swapExactETHForTokens",i=[c,u,d,C],o=s):r?(a=p?"swapExactTokensForETHSupportingFeeOnTransferTokens":"swapExactTokensForETH",i=[s,c,u,d,C],o="0x0"):(a=p?"swapExactTokensForTokensSupportingFeeOnTransferTokens":"swapExactTokensForTokens",i=[s,c,u,d,C],o="0x0");break;case exports.TradeType.EXACT_OUTPUT:p&&R(!1),n?(a="swapETHForExactTokens",i=[c,u,d,C],o=s):r?(a="swapTokensForExactETH",i=[c,s,u,d,C],o="0x0"):(a="swapTokensForExactTokens",i=[c,s,u,d,C],o="0x0")}return{methodName:a,args:i,value:o}},e}();exports.JSBI=F,exports.ARCHER_ROUTER_ADDRESS=J,exports.AbstractCurrency=Ie,exports.Avalanche=me,exports.BAR_ADDRESS=k,exports.BENTOBOX_ADDRESS=V,exports.BORING_HELPER_ADDRESS=Z,exports.Binance=Se,exports.CHAINLINK_ORACLE_ADDRESS=j,exports.CHAIN_KEY=tt,exports.Celo=Fe,exports.CurrencyAmount=It,exports.ENS_REGISTRAR_ADDRESS=te,exports.Ether=Re,exports.FACTORY_ADDRESS=H,exports.FIVE=Je,exports.Fantom=ve,exports.Fraction=xt,exports.Fuse=Pe,exports.Harmony=ye,exports.Heco=Me,exports.INIT_CODE_HASH=nt,exports.InsufficientInputAmountError=ct,exports.InsufficientReservesError=st,exports.KASHI_ADDRESS=W,exports.MAKER_ADDRESS=L,exports.MASTERCHEF_ADDRESS=P,exports.MASTERCHEF_V2_ADDRESS=ee,exports.MAX_SAFE_INTEGER=Tt,exports.MERKLE_DISTRIBUTOR_ADDRESS=re,exports.MINICHEF_ADDRESS=Q,exports.MINIMUM_LIQUIDITY=rt,exports.MULTICALL2_ADDRESS=ae,exports.Matic=_e,exports.MaxUint256=Xe,exports.Movr=ge,exports.NATIVE=We,exports.NativeCurrency=Ee,exports.ONE=Ge,exports.Okex=we,exports.PEGGED_ORACLE_ADDRESS="0x6cbfbB38498Df0E1e7A4506593cDB02db9001564",exports.Pair=bt,exports.Palm=qe,exports.Percent=Bt,exports.Price=Et,exports.ROUTER_ADDRESS=q,exports.Route=Ot,exports.Router=_t,exports.SOLIDITY_TYPE_MAXIMA=ot,exports.SUSHISWAP_MULTISWAPPER_ADDRESS=Y,exports.SUSHISWAP_MULTI_EXACT_SWAPPER_ADDRESS=G,exports.SUSHISWAP_SWAPPER_ADDRESS=X,exports.SUSHISWAP_TWAP_0_ORACLE_ADDRESS="0x66F03B0d30838A3fee971928627ea6F59B236065",exports.SUSHISWAP_TWAP_1_ORACLE_ADDRESS="0x0D51b575591F8f74a2763Ade75D3CDCf6789266f",exports.SUSHI_ADDRESS=U,exports.TEN=Qe,exports.THREE=Ze,exports.TIMELOCK_ADDRESS=K,exports.TWO=je,exports.Token=le,exports.Trade=vt,exports.USDC=Ne,exports.USDC_ADDRESS=w,exports.WETH9=Be,exports.WETH9_ADDRESS=$,exports.WNATIVE=Oe,exports.WNATIVE_ADDRESS=z,exports.ZAPPER_ADDRESS=ne,exports.ZERO=Ye,exports._100=$e,exports._1000=et,exports._997=ze,exports.computePairAddress=ft,exports.computePriceImpact=mt,exports.currencyEquals=function(e,t){return e instanceof le&&t instanceof le?e.equals(t):!(e instanceof le||t instanceof le||e!==t)},exports.difference=function(e,t){return F.greaterThan(e,t)?F.subtract(e,t):F.subtract(t,e)},exports.getProviderOrSigner=function(e,t){return t?yt(e,t):e},exports.getSigner=yt,exports.inputOutputComparator=Ft,exports.maximum=function(){for(var e=arguments.length<=0?void 0:arguments[0],t=1;t<arguments.length;t++){var n=t<0||arguments.length<=t?void 0:arguments[t];F.GT(n,e)&&(e=n)}return e},exports.minimum=function(){for(var e=arguments.length<=0?void 0:arguments[0],t=1;t<arguments.length;t++){var n=t<0||arguments.length<=t?void 0:arguments[t];F.LT(n,e)&&(e=n)}return e},exports.rebase=function(e,t,n){return t?F.divide(F.multiply(e,n),t):Ye},exports.sortedInsert=St,exports.sqrt=Dt,exports.toElastic=function(e,t,n){var r;return F.equal(e.base,Ye)?r=t:(r=F.divide(F.multiply(t,e.elastic),e.base),n&&F.lessThan(F.divide(F.multiply(r,e.base),e.elastic),t)&&(r=F.add(r,Ge))),r},exports.toHex=Mt,exports.tradeComparator=Rt,exports.validateAndParseAddress=fe,exports.validateSolidityTypeInstance=function(e,t){F.greaterThanOrEqual(e,Ye)||R(!1),F.lessThanOrEqual(e,ot[t])||R(!1)},exports.xDai=He;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t,n,r,a,i,o,d,s,c,C,u,p,h,x,A,I,E,f,T,D,b,l,N,B,O,m,S,F=e(require("jsbi")),R=e(require("tiny-invariant")),v=require("@ethersproject/address"),y=(e(require("tiny-warning")),e(require("big.js"))),M=e(require("decimal.js-light")),_=e(require("toformat")),g=require("@ethersproject/solidity");(t=exports.ChainId||(exports.ChainId={}))[t.MAINNET=1]="MAINNET",t[t.ROPSTEN=3]="ROPSTEN",t[t.RINKEBY=4]="RINKEBY",t[t["GÖRLI"]=5]="GÖRLI",t[t.KOVAN=42]="KOVAN",t[t.MATIC=137]="MATIC",t[t.MATIC_TESTNET=80001]="MATIC_TESTNET",t[t.FANTOM=250]="FANTOM",t[t.FANTOM_TESTNET=4002]="FANTOM_TESTNET",t[t.XDAI=100]="XDAI",t[t.BSC=56]="BSC",t[t.BSC_TESTNET=97]="BSC_TESTNET",t[t.ARBITRUM=42161]="ARBITRUM",t[t.ARBITRUM_TESTNET=79377087078960]="ARBITRUM_TESTNET",t[t.MOONBEAM_TESTNET=1287]="MOONBEAM_TESTNET",t[t.AVALANCHE=43114]="AVALANCHE",t[t.AVALANCHE_TESTNET=43113]="AVALANCHE_TESTNET",t[t.HECO=128]="HECO",t[t.HECO_TESTNET=256]="HECO_TESTNET",t[t.HARMONY=16666e5]="HARMONY",t[t.HARMONY_TESTNET=16667e5]="HARMONY_TESTNET",t[t.OKEX=66]="OKEX",t[t.OKEX_TESTNET=65]="OKEX_TESTNET",t[t.CELO=42220]="CELO",t[t.PALM=11297108109]="PALM",t[t.PALM_TESTNET=11297108099]="PALM_TESTNET",t[t.MOONRIVER=1285]="MOONRIVER",t[t.FUSE=122]="FUSE",(exports.ChainKey||(exports.ChainKey={})).KOVAN="kovan",(n=exports.Rounding||(exports.Rounding={}))[n.ROUND_DOWN=0]="ROUND_DOWN",n[n.ROUND_HALF_UP=1]="ROUND_HALF_UP",n[n.ROUND_UP=2]="ROUND_UP",(r=exports.TradeType||(exports.TradeType={}))[r.EXACT_INPUT=0]="EXACT_INPUT",r[r.EXACT_OUTPUT=1]="EXACT_OUTPUT";var w=((a={})[exports.ChainId.MAINNET]="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",a[exports.ChainId.ROPSTEN]="0x0D9C8723B343A8368BebE0B5E89273fF8D712e3C",a[exports.ChainId.KOVAN]="0xb7a4F3E9097C08dA09517b5aB877F7a917224ede",a[exports.ChainId.MATIC]="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",a[exports.ChainId.FANTOM]="0x04068DA6C83AFCFA0e13ba15A6696662335D5B75",a[exports.ChainId.BSC]="0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",a[exports.ChainId.HARMONY]="0x985458E523dB3d53125813eD68c274899e9DfAb4",a[exports.ChainId.HECO]="0x9362Bbef4B8313A8Aa9f0c9808B80577Aa26B73B",a[exports.ChainId.OKEX]="0xc946DAf81b08146B1C7A8Da2A851Ddf2B3EAaf85",a[exports.ChainId.XDAI]="0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83",a[exports.ChainId.ARBITRUM]="0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8",a[exports.ChainId.AVALANCHE]="0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664",a),H=((i={})[exports.ChainId.MAINNET]="0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac",i[exports.ChainId.ROPSTEN]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.RINKEBY]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.GÖRLI]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.KOVAN]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FANTOM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FANTOM_TESTNET]="",i[exports.ChainId.MATIC]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.MATIC_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.XDAI]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.BSC]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.BSC_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.ARBITRUM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.ARBITRUM_TESTNET]="",i[exports.ChainId.MOONBEAM_TESTNET]="0x2Ce3F07dD4c62b56a502E223A7cBE38b1d77A1b5",i[exports.ChainId.AVALANCHE]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.AVALANCHE_TESTNET]="0xd00ae08403B9bbb9124bB305C09058E32C39A48c",i[exports.ChainId.HECO]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HECO_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HARMONY]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.HARMONY_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.OKEX]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.OKEX_TESTNET]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.CELO]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.PALM]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.PALM_TESTNET]="",i[exports.ChainId.MOONRIVER]="0xc35DADB65012eC5796536bD9864eD8773aBc74C4",i[exports.ChainId.FUSE]="0x43eA90e2b786728520e4f930d2A71a477BF2737C",i),q=((o={})[exports.ChainId.MAINNET]="0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F",o[exports.ChainId.RINKEBY]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ROPSTEN]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.GÖRLI]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.KOVAN]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FANTOM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FANTOM_TESTNET]="",o[exports.ChainId.MATIC]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.MATIC_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.XDAI]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.BSC]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.BSC_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ARBITRUM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.ARBITRUM_TESTNET]="",o[exports.ChainId.MOONBEAM_TESTNET]="0xeB5c2BB5E83B51d83F3534Ae21E84336B8B376ef",o[exports.ChainId.AVALANCHE]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.AVALANCHE_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HECO]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HECO_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HARMONY]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.HARMONY_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.OKEX]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.OKEX_TESTNET]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.CELO]="0x1421bDe4B10e8dd459b3BCb598810B1337D56842",o[exports.ChainId.PALM]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.PALM_TESTNET]="",o[exports.ChainId.MOONRIVER]="0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506",o[exports.ChainId.FUSE]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",o),U=((d={})[exports.ChainId.MAINNET]="0x6B3595068778DD592e39A122f4f5a5cF09C90fE2",d[exports.ChainId.ROPSTEN]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.RINKEBY]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.GÖRLI]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.KOVAN]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",d[exports.ChainId.FANTOM]="0xae75A438b2E0cB8Bb01Ec1E1e376De11D44477CC",d[exports.ChainId.MATIC]="0x0b3F868E0BE5597D5DB7fEB59E1CADBb0fdDa50a",d[exports.ChainId.XDAI]="0x2995D1317DcD4f0aB89f4AE60F3f020A4F17C7CE",d[exports.ChainId.BSC]="0x947950BcC74888a40Ffa2593C5798F11Fc9124C4",d[exports.ChainId.ARBITRUM]="0xd4d42F0b6DEF4CE0383636770eF773390d85c61A",d[exports.ChainId.AVALANCHE]="0x39cf1BD5f15fb22eC3D9Ff86b0727aFc203427cc",d[exports.ChainId.HECO]="0x52E00B2dA5Bd7940fFe26B609A42F957f31118D5",d[exports.ChainId.HARMONY]="0xBEC775Cb42AbFa4288dE81F387a9b1A3c4Bc552A",d[exports.ChainId.OKEX]="0x2218E0D5E0173769F5b4939a3aE423f7e5E4EAB7",d[exports.ChainId.OKEX_TESTNET]="",d[exports.ChainId.CELO]="0xD15EC721C2A896512Ad29C671997DD68f9593226",d[exports.ChainId.PALM]="",d[exports.ChainId.PALM_TESTNET]="",d),P=((s={})[exports.ChainId.MAINNET]="0xc2EdaD668740f1aA35E4D8f227fB8E17dcA888Cd",s[exports.ChainId.ROPSTEN]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.RINKEBY]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.GÖRLI]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s[exports.ChainId.KOVAN]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",s),k=((c={})[exports.ChainId.MAINNET]="0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272",c[exports.ChainId.ROPSTEN]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.RINKEBY]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.GÖRLI]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c[exports.ChainId.KOVAN]="0x1be211D8DA40BC0ae8719c6663307Bfc987b1d6c",c),L=((C={})[exports.ChainId.MAINNET]="0xE11fc0B43ab98Eb91e9836129d1ee7c3Bc95df50",C[exports.ChainId.ROPSTEN]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",C[exports.ChainId.RINKEBY]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",C[exports.ChainId.GÖRLI]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",C[exports.ChainId.KOVAN]="0x1b9d177CcdeA3c79B6c8F40761fc8Dc9d0500EAa",C),K=((u={})[exports.ChainId.MAINNET]="0x9a8541Ddf3a932a9A922B607e9CF7301f1d47bD1",u),V=((p={})[exports.ChainId.MAINNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.ROPSTEN]="0x6BdD85290001C8Aef74f35A7606065FA15aD5ACF",p[exports.ChainId.RINKEBY]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.GÖRLI]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.KOVAN]="0xc381a85ed7C7448Da073b7d6C9d4cBf1Cbf576f0",p[exports.ChainId.FANTOM]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.MATIC]="0x0319000133d3AdA02600f0875d2cf03D442C3367",p[exports.ChainId.MATIC_TESTNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.XDAI]="0xE2d7F5dd869Fc7c126D21b13a9080e75a4bDb324",p[exports.ChainId.BSC]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.BSC_TESTNET]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p[exports.ChainId.ARBITRUM]="0x74c764D41B77DBbb4fe771daB1939B00b146894A",p[exports.ChainId.AVALANCHE]="0x0711B6026068f736bae6B213031fCE978D48E026",p[exports.ChainId.HECO]="0xF5BCE5077908a1b7370B9ae04AdC565EBd643966",p),W=((h={})[exports.ChainId.MAINNET]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.KOVAN]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.MATIC]="0xB527C5295c4Bc348cBb3a2E96B2494fD292075a7",h[exports.ChainId.XDAI]="0x7a6DA9903d0a481F40b8336c1463487BC8C0407e",h[exports.ChainId.BSC]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h[exports.ChainId.ARBITRUM]="0xa010eE0226cd071BeBd8919A1F675cAE1f1f5D3e",h[exports.ChainId.AVALANCHE]="0x513037395FA0C9c35E41f89189ceDfE3bD42fAdb",h[exports.ChainId.AVALANCHE_TESTNET]="",h[exports.ChainId.HECO]="0x2cBA6Ab6574646Badc84F0544d05059e57a5dc42",h),X=((x={})[exports.ChainId.MAINNET]="0x1766733112408b95239aD1951925567CB1203084",x[exports.ChainId.MATIC]="0xe9589382130Ded5DF2397E2fD7A3E9b41DD2701D",x[exports.ChainId.XDAI]="0xE02BDb31C353CE95A1D74F81C93eEa70Bf7371B9",x[exports.ChainId.BSC]="0x1766733112408b95239aD1951925567CB1203084",x[exports.ChainId.ARBITRUM]="0x0bFcD5dD76218bF9e3BE8A1055f9e6D27E5745eb",x[exports.ChainId.AVALANCHE]="0x062eee8B38ab5E8ee3bc58CE505939db53E63785",x[exports.ChainId.HECO]="0x1766733112408b95239aD1951925567CB1203084",x),Y=((A={})[exports.ChainId.MAINNET]="0x545820d5Cc05248da112419fEfb18522c63C8e12",A[exports.ChainId.KOVAN]="0xc0c1649b2c67f1a9f5ff1dd618188165e2555bcf",A[exports.ChainId.MATIC]="0x73BE093B84c773fe8eE0f76DDc0829E45c215415",A[exports.ChainId.XDAI]="0x735f0FbEb3b6389986BcaAf073Af07D2F8be2b93",A[exports.ChainId.BSC]="0x86c655cAc122e9A2fd9Ae1f79Df27b30E357968c",A[exports.ChainId.ARBITRUM]="0xbe7D5968296843756109D42946D01195320922EF",A[exports.ChainId.AVALANCHE]="0xB7C8b5BFcd7212f034Be42a2aAb08b8773B76920",A),G=((I={})[exports.ChainId.MAINNET]="0xB527C5295c4Bc348cBb3a2E96B2494fD292075a7",I[exports.ChainId.KOVAN]="0x75AE0Aa596D39b20addC921DeB5EE3c96279dABE",I[exports.ChainId.MATIC]="0xDB6C4EDd9545d3b815dA85E6429B699c418886f9",I[exports.ChainId.XDAI]="0x07b6e34EeCF38B02e83b6B4702699717e298967E",I[exports.ChainId.BSC]="0x1B16149Edaf1EFa6ADE6aEEF33e63C6e08c9bB1B",I[exports.ChainId.ARBITRUM]="0x860D841bfD1cfEf72A14B2b734005799F07dC7ED",I[exports.ChainId.AVALANCHE]="0x2c46217Fae90D302d1Fb5467ADA504bC2A84f448",I),j=((E={})[exports.ChainId.MAINNET]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.MATIC]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.XDAI]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.BSC]="0x00632CFe43d8F9f8E6cD0d39Ffa3D4fa7ec73CFB",E[exports.ChainId.ARBITRUM]="0xB2B5C26B6868be10fF77e4E233fD231ceB90162a",E[exports.ChainId.AVALANCHE]="0x43198B6fA5d89B88D2E072fA4841724571De5A59",E),Z=((f={})[exports.ChainId.MAINNET]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.KOVAN]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.MATIC]="0xA77a7fD5a16237B85E0FAd02C51f459D18AE93Cd",f[exports.ChainId.XDAI]="0x97e4a0fb71243A83A6FbaEF7Cf73617594e4cF2F",f[exports.ChainId.BSC]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f[exports.ChainId.ARBITRUM]="0x37B3287292De241278fB5FCa514a756E0BE924f8",f[exports.ChainId.AVALANCHE]="0xD18cA07a599bf5eBb9B7327871ad682F0b660748",f[exports.ChainId.HECO]="0x11Ca5375AdAfd6205E41131A4409f182677996E6",f),J=((T={})[exports.ChainId.MAINNET]="0x9917C083FF9FbD29Df1367FBF7F2388A9a202431",T),Q=((D={})[exports.ChainId.MATIC]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",D[exports.ChainId.XDAI]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",D[exports.ChainId.HARMONY]="0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287",D[exports.ChainId.ARBITRUM]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",D),$=((b={})[exports.ChainId.MAINNET]="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",b[exports.ChainId.ROPSTEN]="0xc778417E063141139Fce010982780140Aa0cD5Ab",b[exports.ChainId.RINKEBY]="0xc778417E063141139Fce010982780140Aa0cD5Ab",b[exports.ChainId.GÖRLI]="0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",b[exports.ChainId.KOVAN]="0xd0A1E359811322d97991E03f863a0C30C2cF029C",b[exports.ChainId.ARBITRUM]="0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",b[exports.ChainId.ARBITRUM_TESTNET]="0xf8456e5e6A225C2C1D74D8C9a4cB2B1d5dc1153b",b[exports.ChainId.BSC]="0x2170Ed0880ac9A755fd29B2688956BD959F933F8",b[exports.ChainId.FANTOM]="0x74b23882a30290451A17c44f4F05243b6b58C76d",b[exports.ChainId.MATIC]="0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",b[exports.ChainId.OKEX]="0x2170Ed0880ac9A755fd29B2688956BD959F933F8",b[exports.ChainId.HECO]="0x64FF637fB478863B7468bc97D30a5bF3A428a1fD",b[exports.ChainId.HARMONY]="0x6983D1E6DEf3690C4d616b13597A09e6193EA013",b[exports.ChainId.XDAI]="0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1",b[exports.ChainId.AVALANCHE]="0xf20d962a6c8f70c731bd838a3a388D7d48fA6e15",b),z=((l={})[exports.ChainId.MAINNET]=$[exports.ChainId.MAINNET],l[exports.ChainId.ROPSTEN]=$[exports.ChainId.ROPSTEN],l[exports.ChainId.RINKEBY]=$[exports.ChainId.RINKEBY],l[exports.ChainId.GÖRLI]=$[exports.ChainId.GÖRLI],l[exports.ChainId.KOVAN]=$[exports.ChainId.KOVAN],l[exports.ChainId.ARBITRUM]=$[exports.ChainId.ARBITRUM],l[exports.ChainId.ARBITRUM_TESTNET]=$[exports.ChainId.ARBITRUM_TESTNET],l[exports.ChainId.FANTOM]="0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83",l[exports.ChainId.FANTOM_TESTNET]="0xf1277d1Ed8AD466beddF92ef448A132661956621",l[exports.ChainId.MATIC]="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",l[exports.ChainId.MATIC_TESTNET]="0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",l[exports.ChainId.XDAI]="0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d",l[exports.ChainId.BSC]="0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",l[exports.ChainId.BSC_TESTNET]="0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd",l[exports.ChainId.MOONBEAM_TESTNET]="0xe73763DB808ecCDC0E36bC8E32510ED126910394",l[exports.ChainId.AVALANCHE]="0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",l[exports.ChainId.AVALANCHE_TESTNET]="0xd00ae08403B9bbb9124bB305C09058E32C39A48c",l[exports.ChainId.HECO]="0x5545153CCFcA01fbd7Dd11C0b23ba694D9509A6F",l[exports.ChainId.HECO_TESTNET]="0x5B2DA6F42CA09C77D577a12BeaD0446148830687",l[exports.ChainId.HARMONY]="0xcF664087a5bB0237a0BAd6742852ec6c8d69A27a",l[exports.ChainId.HARMONY_TESTNET]="0x7a2afac38517d512E55C0bCe3b6805c10a04D60F",l[exports.ChainId.OKEX]="0x8F8526dbfd6E38E3D8307702cA8469Bae6C56C15",l[exports.ChainId.OKEX_TESTNET]="0x2219845942d28716c0F7C605765fABDcA1a7d9E0",l[exports.ChainId.CELO]="0x471EcE3750Da237f93B8E339c536989b8978a438",l[exports.ChainId.PALM]="0xF98cABF0a963452C5536330408B2590567611a71",l[exports.ChainId.MOONRIVER]="0xf50225a84382c74CbdeA10b0c176f71fc3DE0C4d",l[exports.ChainId.FUSE]="0x0BE9e53fd7EDaC9F859882AfdDa116645287C629",l),ee=((N={})[exports.ChainId.MAINNET]="0xEF0881eC094552b2e128Cf945EF17a6752B4Ec5d",N),te=((B={})[exports.ChainId.MAINNET]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.GÖRLI]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.ROPSTEN]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B[exports.ChainId.RINKEBY]="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",B),ne=((O={})[exports.ChainId.MAINNET]="0xcff6eF0B9916682B37D80c19cFF8949bc1886bC2",O[exports.ChainId.ROPSTEN]="0xcff6eF0B9916682B37D80c19cFF8949bc1886bC2",O),re=((m={})[exports.ChainId.MAINNET]="0xcBE6B83e77cdc011Cc18F6f0Df8444E5783ed982",m[exports.ChainId.ROPSTEN]="0x84d1f7202e0e7dac211617017ca72a2cb5e2b955",m),ae=((S={})[exports.ChainId.MAINNET]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.ROPSTEN]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.RINKEBY]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.GÖRLI]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.KOVAN]="0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",S[exports.ChainId.ARBITRUM]="0x80C7DD17B01855a6D2347444a0FCC36136a314de",S[exports.ChainId.ARBITRUM_TESTNET]="0xa501c031958F579dB7676fF1CE78AD305794d579",S[exports.ChainId.CELO]="0x9aac9048fC8139667D6a2597B902865bfdc225d3",S[exports.ChainId.FANTOM]="0x22D4cF72C45F8198CfbF4B568dBdB5A85e8DC0B5",S[exports.ChainId.MATIC]="0x02817C1e3543c2d908a590F5dB6bc97f933dB4BD",S[exports.ChainId.XDAI]="0x67dA5f2FfaDDfF067AB9d5F025F8810634d84287",S[exports.ChainId.BSC]="0xa9193376D09C7f31283C54e56D013fCF370Cd9D9",S[exports.ChainId.AVALANCHE]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.HECO]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.HARMONY]="0xdDCbf776dF3dE60163066A5ddDF2277cB445E0F3",S[exports.ChainId.OKEX]="0xF4d73326C13a4Fc5FD7A064217e12780e9Bd62c3",S[exports.ChainId.PALM]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",S[exports.ChainId.MOONRIVER]="0x270f2F35bED92B7A59eA5F08F6B3fd34c8D9D9b5",S[exports.ChainId.FUSE]="0x0769fd68dFb93167989C6f7254cd0D766Fb2841F",S);function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oe(e,t,n){return t&&ie(e.prototype,t),n&&ie(e,n),e}function de(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ce(e,t)}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ce(){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(e){return!1}}function ue(e,t,n){return(ue=Ce()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&ce(a,n.prototype),a}).apply(null,arguments)}function pe(e){var t="function"==typeof Map?new Map:void 0;return(pe=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return ue(e,arguments,se(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ce(n,e)})(e)}function he(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ae(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xe(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}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 Ie=function(e,t,n,r){Number.isSafeInteger(e)||R(!1),t>=0&&t<255&&Number.isInteger(t)||R(!1),this.chainId=e,this.decimals=t,this.symbol=n,this.name=r},Ee=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).isNative=!0,t.isToken=!1,t}return de(t,e),t}(Ie);function fe(e){try{return v.getAddress(e)}catch(e){R(!1)}}var Te,De,be,le=function(e){function t(t,n,r,a,i){var o;return(o=e.call(this,t,r,a,i)||this).isNative=!1,o.isToken=!0,o.chainId=t,o.address=fe(n),o}de(t,e);var n=t.prototype;return n.equals=function(e){return e.isToken&&this.chainId===e.chainId&&this.address===e.address},n.sortsBefore=function(e){return this.chainId!==e.chainId&&R(!1),this.address===e.address&&R(!1),this.address.toLowerCase()<e.address.toLowerCase()},oe(t,[{key:"wrapped",get:function(){return this}}]),t}(Ie),Ne=((Te={})[exports.ChainId.MAINNET]=new le(exports.ChainId.MAINNET,w[exports.ChainId.MAINNET],6,"USDC","USD Coin"),Te[exports.ChainId.ROPSTEN]=new le(exports.ChainId.ROPSTEN,w[exports.ChainId.ROPSTEN],6,"USDC","USD Coin"),Te[exports.ChainId.KOVAN]=new le(exports.ChainId.KOVAN,w[exports.ChainId.KOVAN],6,"USDC","USD Coin"),Te[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,w[exports.ChainId.MATIC],6,"USDC","USD Coin"),Te[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,w[exports.ChainId.FANTOM],6,"USDC","USD Coin"),Te[exports.ChainId.BSC]=new le(exports.ChainId.BSC,w[exports.ChainId.BSC],18,"USDC","USD Coin"),Te[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,w[exports.ChainId.HARMONY],6,"USDC","USD Coin"),Te[exports.ChainId.HECO]=new le(exports.ChainId.HECO,w[exports.ChainId.HECO],6,"USDC","USD Coin"),Te[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,w[exports.ChainId.OKEX],18,"USDC","USD Coin"),Te[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,w[exports.ChainId.XDAI],6,"USDC","USD Coin"),Te[exports.ChainId.ARBITRUM]=new le(exports.ChainId.ARBITRUM,w[exports.ChainId.ARBITRUM],6,"USDC","USD Coin"),Te),Be=((De={})[exports.ChainId.MAINNET]=new le(exports.ChainId.MAINNET,$[exports.ChainId.MAINNET],18,"WETH","Wrapped Ether"),De[exports.ChainId.ROPSTEN]=new le(exports.ChainId.ROPSTEN,$[exports.ChainId.ROPSTEN],18,"WETH","Wrapped Ether"),De[exports.ChainId.RINKEBY]=new le(exports.ChainId.RINKEBY,$[exports.ChainId.RINKEBY],18,"WETH","Wrapped Ether"),De[exports.ChainId.GÖRLI]=new le(exports.ChainId.GÖRLI,$[exports.ChainId.GÖRLI],18,"WETH","Wrapped Ether"),De[exports.ChainId.KOVAN]=new le(exports.ChainId.KOVAN,$[exports.ChainId.KOVAN],18,"WETH","Wrapped Ether"),De[exports.ChainId.ARBITRUM]=new le(exports.ChainId.ARBITRUM,$[exports.ChainId.ARBITRUM],18,"WETH","Wrapped Ether"),De[exports.ChainId.ARBITRUM_TESTNET]=new le(exports.ChainId.ARBITRUM_TESTNET,$[exports.ChainId.ARBITRUM_TESTNET],18,"WETH","Wrapped Ether"),De[exports.ChainId.BSC]=new le(exports.ChainId.BSC,$[exports.ChainId.BSC],18,"WETH","Wrapped Ether"),De[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,$[exports.ChainId.FANTOM],18,"WETH","Wrapped Ether"),De[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,$[exports.ChainId.MATIC],18,"WETH","Wrapped Ether"),De[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,$[exports.ChainId.OKEX],18,"WETH","Wrapped Ether"),De[exports.ChainId.HECO]=new le(exports.ChainId.HECO,$[exports.ChainId.HECO],18,"WETH","Wrapped Ether"),De[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,$[exports.ChainId.HARMONY],18,"WETH","Wrapped Ether"),De[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,$[exports.ChainId.XDAI],18,"WETH","Wrapped Ether"),De[exports.ChainId.AVALANCHE]=new le(exports.ChainId.AVALANCHE,$[exports.ChainId.AVALANCHE],18,"WETH","Wrapped Ether"),De),Oe=((be={})[exports.ChainId.MAINNET]=Be[exports.ChainId.MAINNET],be[exports.ChainId.ROPSTEN]=Be[exports.ChainId.ROPSTEN],be[exports.ChainId.RINKEBY]=Be[exports.ChainId.RINKEBY],be[exports.ChainId.GÖRLI]=Be[exports.ChainId.GÖRLI],be[exports.ChainId.KOVAN]=Be[exports.ChainId.KOVAN],be[exports.ChainId.FANTOM]=new le(exports.ChainId.FANTOM,z[exports.ChainId.FANTOM],18,"WFTM","Wrapped FTM"),be[exports.ChainId.FANTOM_TESTNET]=new le(exports.ChainId.FANTOM_TESTNET,z[exports.ChainId.FANTOM_TESTNET],18,"FTM","Wrapped FTM"),be[exports.ChainId.MATIC]=new le(exports.ChainId.MATIC,z[exports.ChainId.MATIC],18,"WMATIC","Wrapped Matic"),be[exports.ChainId.MATIC_TESTNET]=new le(exports.ChainId.MATIC_TESTNET,z[exports.ChainId.MATIC_TESTNET],18,"WMATIC","Wrapped Matic"),be[exports.ChainId.XDAI]=new le(exports.ChainId.XDAI,z[exports.ChainId.XDAI],18,"WXDAI","Wrapped xDai"),be[exports.ChainId.BSC]=new le(exports.ChainId.BSC,z[exports.ChainId.BSC],18,"WBNB","Wrapped BNB"),be[exports.ChainId.BSC_TESTNET]=new le(exports.ChainId.BSC_TESTNET,z[exports.ChainId.BSC_TESTNET],18,"WBNB","Wrapped BNB"),be[exports.ChainId.ARBITRUM]=Be[exports.ChainId.ARBITRUM],be[exports.ChainId.ARBITRUM_TESTNET]=Be[exports.ChainId.ARBITRUM_TESTNET],be[exports.ChainId.MOONBEAM_TESTNET]=new le(exports.ChainId.MOONBEAM_TESTNET,z[exports.ChainId.MOONBEAM_TESTNET],18,"WETH","Wrapped Ether"),be[exports.ChainId.AVALANCHE]=new le(exports.ChainId.AVALANCHE,z[exports.ChainId.AVALANCHE],18,"WAVAX","Wrapped AVAX"),be[exports.ChainId.AVALANCHE_TESTNET]=new le(exports.ChainId.AVALANCHE_TESTNET,z[exports.ChainId.AVALANCHE_TESTNET],18,"WAVAX","Wrapped AVAX"),be[exports.ChainId.HECO]=new le(exports.ChainId.HECO,z[exports.ChainId.HECO],18,"WHT","Wrapped HT"),be[exports.ChainId.HECO_TESTNET]=new le(exports.ChainId.HECO_TESTNET,z[exports.ChainId.HECO_TESTNET],18,"WHT","Wrapped HT"),be[exports.ChainId.HARMONY]=new le(exports.ChainId.HARMONY,z[exports.ChainId.HARMONY],18,"WONE","Wrapped ONE"),be[exports.ChainId.HARMONY_TESTNET]=new le(exports.ChainId.HARMONY_TESTNET,z[exports.ChainId.HARMONY_TESTNET],18,"WONE","Wrapped ONE"),be[exports.ChainId.OKEX]=new le(exports.ChainId.OKEX,z[exports.ChainId.OKEX],18,"WOKT","Wrapped OKExChain"),be[exports.ChainId.OKEX_TESTNET]=new le(exports.ChainId.OKEX_TESTNET,z[exports.ChainId.OKEX_TESTNET],18,"WOKT","Wrapped OKExChain"),be[exports.ChainId.CELO]=new le(exports.ChainId.CELO,z[exports.ChainId.CELO],18,"CELO","Celo"),be[exports.ChainId.PALM]=new le(exports.ChainId.PALM,z[exports.ChainId.PALM],18,"WPALM","Wrapped Palm"),be[exports.ChainId.MOONRIVER]=new le(exports.ChainId.MOONRIVER,z[exports.ChainId.MOONRIVER],18,"WMOVR","Wrapped Moonriver"),be[exports.ChainId.FUSE]=new le(exports.ChainId.FUSE,z[exports.ChainId.FUSE],18,"WFUSE","Wrapped Fuse"),be),me=function(e){function t(t){return e.call(this,t,18,"AVAX","Avalanche")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);me._cache={};var Se=function(e){function t(t){return e.call(this,t,18,"BNB","Binance Coin")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Se._cache={};var Fe=function(e){function t(t){return e.call(this,t,18,"CELO","Celo")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Fe._cache={};var Re=function(e){function t(t){return e.call(this,t,18,"ETH","Ether")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._etherCache[e])?n:this._etherCache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Be[this.chainId];return e||R(!1),e}}]),t}(Ee);Re._etherCache={};var ve=function(e){function t(t){return e.call(this,t,18,"FTM","Fantom")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ve._cache={};var ye=function(e){function t(t){return e.call(this,t,18,"ONE","Harmony")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ye._cache={};var Me=function(e){function t(t){return e.call(this,t,18,"HT","Huobi Token")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Me._cache={};var _e=function(e){function t(t){return e.call(this,t,18,"MATIC","Matic")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);_e._cache={};var ge=function(e){function t(t){return e.call(this,t,18,"MOVR","Moonriver")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);ge._cache={};var we=function(e){function t(t){return e.call(this,t,18,"OKT","OKExChain")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);we._cache={};var He=function(e){function t(t){return e.call(this,t,18,"XDAI","xDai")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);He._cache={};var qe=function(e){function t(t){return e.call(this,t,18,"PALM","Palm")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);qe._cache={};var Ue,Pe=function(e){function t(t){return e.call(this,t,18,"FUSE","Fuse")||this}return de(t,e),t.onChain=function(e){var n;return null!=(n=this._cache[e])?n:this._cache[e]=new t(e)},t.prototype.equals=function(e){return e.isNative&&e.chainId===this.chainId},oe(t,[{key:"wrapped",get:function(){var e=Oe[this.chainId];return e||R(!1),e}}]),t}(Ee);Pe._cache={};var ke,Le,Ke,Ve,We=((Ue={})[exports.ChainId.MAINNET]=Re.onChain(exports.ChainId.MAINNET),Ue[exports.ChainId.ROPSTEN]=Re.onChain(exports.ChainId.ROPSTEN),Ue[exports.ChainId.RINKEBY]=Re.onChain(exports.ChainId.RINKEBY),Ue[exports.ChainId.GÖRLI]=Re.onChain(exports.ChainId.GÖRLI),Ue[exports.ChainId.KOVAN]=Re.onChain(exports.ChainId.KOVAN),Ue[exports.ChainId.FANTOM]=ve.onChain(exports.ChainId.FANTOM),Ue[exports.ChainId.FANTOM_TESTNET]=ve.onChain(exports.ChainId.FANTOM_TESTNET),Ue[exports.ChainId.MATIC]=_e.onChain(exports.ChainId.MATIC),Ue[exports.ChainId.MATIC_TESTNET]=_e.onChain(exports.ChainId.MATIC_TESTNET),Ue[exports.ChainId.XDAI]=He.onChain(exports.ChainId.XDAI),Ue[exports.ChainId.BSC]=Se.onChain(exports.ChainId.BSC),Ue[exports.ChainId.BSC_TESTNET]=Se.onChain(exports.ChainId.BSC_TESTNET),Ue[exports.ChainId.ARBITRUM]=Re.onChain(exports.ChainId.ARBITRUM),Ue[exports.ChainId.AVALANCHE]=me.onChain(exports.ChainId.AVALANCHE),Ue[exports.ChainId.AVALANCHE_TESTNET]=me.onChain(exports.ChainId.AVALANCHE_TESTNET),Ue[exports.ChainId.HECO]=Me.onChain(exports.ChainId.HECO),Ue[exports.ChainId.HECO_TESTNET]=Me.onChain(exports.ChainId.HECO_TESTNET),Ue[exports.ChainId.HARMONY]=ye.onChain(exports.ChainId.HARMONY),Ue[exports.ChainId.HARMONY_TESTNET]=ye.onChain(exports.ChainId.HARMONY_TESTNET),Ue[exports.ChainId.OKEX]=we.onChain(exports.ChainId.OKEX),Ue[exports.ChainId.OKEX_TESTNET]=we.onChain(exports.ChainId.OKEX_TESTNET),Ue[exports.ChainId.CELO]=Fe.onChain(exports.ChainId.CELO),Ue[exports.ChainId.PALM]=qe.onChain(exports.ChainId.PALM),Ue[exports.ChainId.MOONRIVER]=ge.onChain(exports.ChainId.MOONRIVER),Ue[exports.ChainId.FUSE]=Pe.onChain(exports.ChainId.FUSE),Ue),Xe=F.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ye=F.BigInt(0),Ge=F.BigInt(1),je=F.BigInt(2),Ze=F.BigInt(3),Je=F.BigInt(5),Qe=F.BigInt(10),$e=F.BigInt(100),ze=F.BigInt(997),et=F.BigInt(1e3),tt=((ke={})[exports.ChainId.KOVAN]=exports.ChainKey.KOVAN,ke),nt=((Le={})[exports.ChainId.MAINNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.ROPSTEN]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.RINKEBY]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.GÖRLI]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.KOVAN]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.FANTOM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MATIC]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MATIC_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.XDAI]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.BSC]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.BSC_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.ARBITRUM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MOONBEAM_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.AVALANCHE]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.AVALANCHE_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HECO]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HECO_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HARMONY]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.HARMONY_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.OKEX]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.OKEX_TESTNET]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.CELO]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.PALM]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.MOONRIVER]="0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303",Le[exports.ChainId.FUSE]="0x1901958ef8b470f2c0a3875a79ee0bd303866d85102c0f1ea820d317024d50b5",Le),rt=F.BigInt(1e3);(Ve=exports.SolidityType||(exports.SolidityType={})).uint8="uint8",Ve.uint256="uint256";var at,it,ot=((Ke={})[exports.SolidityType.uint8]=F.BigInt("0xff"),Ke[exports.SolidityType.uint256]=F.BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Ke),dt="setPrototypeOf"in Object,st=function(e){function t(){var n;return(n=e.call(this)||this).isInsufficientReservesError=!0,n.name=n.constructor.name,dt&&Object.setPrototypeOf(he(n),(this instanceof t?this.constructor:void 0).prototype),n}return de(t,e),t}(pe(Error)),ct=function(e){function t(){var n;return(n=e.call(this)||this).isInsufficientInputAmountError=!0,n.name=n.constructor.name,dt&&Object.setPrototypeOf(he(n),(this instanceof t?this.constructor:void 0).prototype),n}return de(t,e),t}(pe(Error)),Ct=_(M),ut=_(y);ut.strict=!0;var pt=((at={})[exports.Rounding.ROUND_DOWN]=Ct.ROUND_DOWN,at[exports.Rounding.ROUND_HALF_UP]=Ct.ROUND_HALF_UP,at[exports.Rounding.ROUND_UP]=Ct.ROUND_UP,at),ht=((it={})[exports.Rounding.ROUND_DOWN]=0,it[exports.Rounding.ROUND_HALF_UP]=1,it[exports.Rounding.ROUND_UP]=3,it),xt=function(){function e(e,t){void 0===t&&(t=F.BigInt(1)),this.numerator=F.BigInt(e),this.denominator=F.BigInt(t)}e.tryParseFraction=function(t){if(t instanceof F||"number"==typeof t||"string"==typeof t)return new e(t);if("numerator"in t&&"denominator"in t)return t;throw new Error("Could not parse fraction")};var t=e.prototype;return t.invert=function(){return new e(this.denominator,this.numerator)},t.add=function(t){var n=e.tryParseFraction(t);return F.equal(this.denominator,n.denominator)?new e(F.add(this.numerator,n.numerator),this.denominator):new e(F.add(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator)),F.multiply(this.denominator,n.denominator))},t.subtract=function(t){var n=e.tryParseFraction(t);return F.equal(this.denominator,n.denominator)?new e(F.subtract(this.numerator,n.numerator),this.denominator):new e(F.subtract(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator)),F.multiply(this.denominator,n.denominator))},t.lessThan=function(t){var n=e.tryParseFraction(t);return F.lessThan(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.equalTo=function(t){var n=e.tryParseFraction(t);return F.equal(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.greaterThan=function(t){var n=e.tryParseFraction(t);return F.greaterThan(F.multiply(this.numerator,n.denominator),F.multiply(n.numerator,this.denominator))},t.multiply=function(t){var n=e.tryParseFraction(t);return new e(F.multiply(this.numerator,n.numerator),F.multiply(this.denominator,n.denominator))},t.divide=function(t){var n=e.tryParseFraction(t);return new e(F.multiply(this.numerator,n.denominator),F.multiply(this.denominator,n.numerator))},t.toSignificant=function(e,t,n){void 0===t&&(t={groupSeparator:""}),void 0===n&&(n=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||R(!1),e>0||R(!1),Ct.set({precision:e+1,rounding:pt[n]});var r=new Ct(this.numerator.toString()).div(this.denominator.toString()).toSignificantDigits(e);return r.toFormat(r.decimalPlaces(),t)},t.toFixed=function(e,t,n){return void 0===t&&(t={groupSeparator:""}),void 0===n&&(n=exports.Rounding.ROUND_HALF_UP),Number.isInteger(e)||R(!1),e>=0||R(!1),ut.DP=e,ut.RM=ht[n],new ut(this.numerator.toString()).div(this.denominator.toString()).toFormat(e,t)},oe(e,[{key:"quotient",get:function(){return F.divide(this.numerator,this.denominator)}},{key:"remainder",get:function(){return new e(F.remainder(this.numerator,this.denominator),this.denominator)}},{key:"asFraction",get:function(){return new e(this.numerator,this.denominator)}}]),e}(),At=_(y);At.strict=!0;var It=function(e){function t(t,n,r){var a;return a=e.call(this,n,r)||this,F.lessThanOrEqual(a.quotient,Xe)||R(!1),a.currency=t,a.decimalScale=F.exponentiate(F.BigInt(10),F.BigInt(t.decimals)),a}de(t,e),t.fromRawAmount=function(e,n){return new t(e,n)},t.fromFractionalAmount=function(e,n,r){return new t(e,n,r)};var n=t.prototype;return n.add=function(n){this.currency.equals(n.currency)||R(!1);var r=e.prototype.add.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.subtract=function(n){this.currency.equals(n.currency)||R(!1);var r=e.prototype.subtract.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.multiply=function(n){var r=e.prototype.multiply.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.divide=function(n){var r=e.prototype.divide.call(this,n);return t.fromFractionalAmount(this.currency,r.numerator,r.denominator)},n.toSignificant=function(t,n,r){return void 0===t&&(t=6),void 0===r&&(r=exports.Rounding.ROUND_DOWN),e.prototype.divide.call(this,this.decimalScale).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=this.currency.decimals),void 0===r&&(r=exports.Rounding.ROUND_DOWN),t<=this.currency.decimals||R(!1),e.prototype.divide.call(this,this.decimalScale).toFixed(t,n,r)},n.toExact=function(e){return void 0===e&&(e={groupSeparator:""}),At.DP=this.currency.decimals,new At(this.quotient.toString()).div(this.decimalScale.toString()).toFormat(e)},oe(t,[{key:"wrapped",get:function(){return this.currency.isToken?this:t.fromFractionalAmount(this.currency.wrapped,this.numerator,this.denominator)}}]),t}(xt),Et=function(e){function t(){for(var t,n,r,a,i,o=arguments.length,d=new Array(o),s=0;s<o;s++)d[s]=arguments[s];if(4===d.length)n=d[0],r=d[1],a=d[2],i=d[3];else{var c=d[0].quoteAmount.divide(d[0].baseAmount),C=[d[0].baseAmount.currency,d[0].quoteAmount.currency,c.denominator,c.numerator];n=C[0],r=C[1],a=C[2],i=C[3]}return(t=e.call(this,i,a)||this).baseCurrency=n,t.quoteCurrency=r,t.scalar=new xt(F.exponentiate(F.BigInt(10),F.BigInt(n.decimals)),F.exponentiate(F.BigInt(10),F.BigInt(r.decimals))),t}de(t,e);var n=t.prototype;return n.invert=function(){return new t(this.quoteCurrency,this.baseCurrency,this.numerator,this.denominator)},n.multiply=function(n){this.quoteCurrency.equals(n.baseCurrency)||R(!1);var r=e.prototype.multiply.call(this,n);return new t(this.baseCurrency,n.quoteCurrency,r.denominator,r.numerator)},n.quote=function(t){t.currency.equals(this.baseCurrency)||R(!1);var n=e.prototype.multiply.call(this,t);return It.fromFractionalAmount(this.quoteCurrency,n.numerator,n.denominator)},n.toSignificant=function(e,t,n){return void 0===e&&(e=6),this.adjustedForDecimals.toSignificant(e,t,n)},n.toFixed=function(e,t,n){return void 0===e&&(e=4),this.adjustedForDecimals.toFixed(e,t,n)},oe(t,[{key:"adjustedForDecimals",get:function(){return e.prototype.multiply.call(this,this.scalar)}}]),t}(xt),ft=function(e){var t=e.factoryAddress,n=e.tokenA,r=e.tokenB,a=n.sortsBefore(r)?[n,r]:[r,n],i=a[0];return v.getCreate2Address(t,g.keccak256(["bytes"],[g.pack(["address","address"],[i.address,a[1].address])]),nt[i.chainId])},Tt=F.BigInt(Number.MAX_SAFE_INTEGER);function Dt(e){if(F.greaterThanOrEqual(e,Ye)||R(!1),F.lessThan(e,Tt))return F.BigInt(Math.floor(Math.sqrt(F.toNumber(e))));var t,n;for(t=e,n=F.add(F.divide(e,je),Ge);F.lessThan(n,t);)t=n,n=F.divide(F.add(F.divide(e,n),n),je);return t}var bt=function(){function e(t,n){var r=t.currency.sortsBefore(n.currency)?[t,n]:[n,t];this.liquidityToken=new le(r[0].currency.chainId,e.getAddress(r[0].currency,r[1].currency),18,"UNI-V2","Uniswap V2"),this.tokenAmounts=r}e.getAddress=function(e,t){return ft({factoryAddress:H[e.chainId],tokenA:e,tokenB:t})};var t=e.prototype;return t.involvesToken=function(e){return e.equals(this.token0)||e.equals(this.token1)},t.priceOf=function(e){return this.involvesToken(e)||R(!1),e.equals(this.token0)?this.token0Price:this.token1Price},t.reserveOf=function(e){return this.involvesToken(e)||R(!1),e.equals(this.token0)?this.reserve0:this.reserve1},t.getOutputAmount=function(t){if(this.involvesToken(t.currency)||R(!1),F.equal(this.reserve0.quotient,Ye)||F.equal(this.reserve1.quotient,Ye))throw new st;var n=this.reserveOf(t.currency),r=this.reserveOf(t.currency.equals(this.token0)?this.token1:this.token0),a=F.multiply(t.quotient,ze),i=F.multiply(a,r.quotient),o=F.add(F.multiply(n.quotient,et),a),d=It.fromRawAmount(t.currency.equals(this.token0)?this.token1:this.token0,F.divide(i,o));if(F.equal(d.quotient,Ye))throw new ct;return[d,new e(n.add(t),r.subtract(d))]},t.getInputAmount=function(t){if(this.involvesToken(t.currency)||R(!1),F.equal(this.reserve0.quotient,Ye)||F.equal(this.reserve1.quotient,Ye)||F.greaterThanOrEqual(t.quotient,this.reserveOf(t.currency).quotient))throw new st;var n=this.reserveOf(t.currency),r=this.reserveOf(t.currency.equals(this.token0)?this.token1:this.token0),a=F.multiply(F.multiply(r.quotient,t.quotient),et),i=F.multiply(F.subtract(n.quotient,t.quotient),ze),o=It.fromRawAmount(t.currency.equals(this.token0)?this.token1:this.token0,F.add(F.divide(a,i),Ge));return[o,new e(r.add(o),n.subtract(t))]},t.getLiquidityMinted=function(e,t,n){e.currency.equals(this.liquidityToken)||R(!1);var r,a=t.currency.sortsBefore(n.currency)?[t,n]:[n,t];if(a[0].currency.equals(this.token0)&&a[1].currency.equals(this.token1)||R(!1),F.equal(e.quotient,Ye))r=F.subtract(Dt(F.multiply(a[0].quotient,a[1].quotient)),rt);else{var i=F.divide(F.multiply(a[0].quotient,e.quotient),this.reserve0.quotient),o=F.divide(F.multiply(a[1].quotient,e.quotient),this.reserve1.quotient);r=F.lessThanOrEqual(i,o)?i:o,console.log({amount0:i.toString(),amount1:o.toString(),liquidity:r.toString(),totalSupply:e.quotient.toString(),kLast:Dt(F.multiply(this.tokenAmounts[0].quotient,this.tokenAmounts[1].quotient))})}if(!F.greaterThan(r,Ye))throw new ct;return It.fromRawAmount(this.liquidityToken,r)},t.getLiquidityValue=function(e,t,n,r,a){var i;if(void 0===r&&(r=!1),this.involvesToken(e)||R(!1),t.currency.equals(this.liquidityToken)||R(!1),n.currency.equals(this.liquidityToken)||R(!1),F.lessThanOrEqual(n.quotient,t.quotient)||R(!1),r){a||R(!1);var o=F.BigInt(a);if(F.equal(o,Ye))i=t;else{var d=Dt(F.multiply(this.reserve0.quotient,this.reserve1.quotient)),s=Dt(o);if(F.greaterThan(d,s)){var c=F.multiply(t.quotient,F.subtract(d,s)),C=F.add(F.multiply(d,Je),s),u=F.divide(c,C);i=t.add(It.fromRawAmount(this.liquidityToken,u))}else i=t}}else i=t;return It.fromRawAmount(e,F.divide(F.multiply(n.quotient,this.reserveOf(e).quotient),i.quotient))},oe(e,[{key:"token0Price",get:function(){var e=this.tokenAmounts[1].divide(this.tokenAmounts[0]);return new Et(this.token0,this.token1,e.denominator,e.numerator)}},{key:"token1Price",get:function(){var e=this.tokenAmounts[0].divide(this.tokenAmounts[1]);return new Et(this.token1,this.token0,e.denominator,e.numerator)}},{key:"chainId",get:function(){return this.token0.chainId}},{key:"token0",get:function(){return this.tokenAmounts[0].currency}},{key:"token1",get:function(){return this.tokenAmounts[1].currency}},{key:"reserve0",get:function(){return this.tokenAmounts[0]}},{key:"reserve1",get:function(){return this.tokenAmounts[1]}}]),e}(),lt=new xt(F.BigInt(100));function Nt(e){return new Bt(e.numerator,e.denominator)}var Bt=function(e){function t(){var t;return(t=e.apply(this,arguments)||this).isPercent=!0,t}de(t,e);var n=t.prototype;return n.add=function(t){return Nt(e.prototype.add.call(this,t))},n.subtract=function(t){return Nt(e.prototype.subtract.call(this,t))},n.multiply=function(t){return Nt(e.prototype.multiply.call(this,t))},n.divide=function(t){return Nt(e.prototype.divide.call(this,t))},n.toSignificant=function(t,n,r){return void 0===t&&(t=5),e.prototype.multiply.call(this,lt).toSignificant(t,n,r)},n.toFixed=function(t,n,r){return void 0===t&&(t=2),e.prototype.multiply.call(this,lt).toFixed(t,n,r)},t}(xt),Ot=function(){function e(e,t,n){this._midPrice=null,e.length>0||R(!1);var r=e[0].chainId;e.every((function(e){return e.chainId===r}))||R(!1);var a=t.wrapped;e[0].involvesToken(a)||R(!1),void 0===n||e[e.length-1].involvesToken(n.wrapped)||R(!1);for(var i,o=[a],d=Ae(e.entries());!(i=d()).done;){var s=i.value,c=s[1],C=o[s[0]];C.equals(c.token0)||C.equals(c.token1)||R(!1);var u=C.equals(c.token0)?c.token1:c.token0;o.push(u)}this.pairs=e,this.path=o,this.input=t,this.output=n}return oe(e,[{key:"midPrice",get:function(){if(null!==this._midPrice)return this._midPrice;for(var e,t=[],n=Ae(this.pairs.entries());!(e=n()).done;){var r=e.value,a=r[1];t.push(this.path[r[0]].equals(a.token0)?new Et(a.reserve0.currency,a.reserve1.currency,a.reserve0.quotient,a.reserve1.quotient):new Et(a.reserve1.currency,a.reserve0.currency,a.reserve1.quotient,a.reserve0.quotient))}var i=t.slice(1).reduce((function(e,t){return e.multiply(t)}),t[0]);return this._midPrice=new Et(this.input,this.output,i.denominator,i.numerator)}},{key:"chainId",get:function(){return this.pairs[0].chainId}}]),e}();function mt(e,t,n){var r=e.quote(t),a=r.subtract(n).divide(r);return new Bt(a.numerator,a.denominator)}function St(e,t,n,r){if(n>0||R(!1),e.length<=n||R(!1),0===e.length)return e.push(t),null;var a=e.length===n;if(a&&r(e[e.length-1],t)<=0)return t;for(var i=0,o=e.length;i<o;){var d=i+o>>>1;r(e[d],t)<=0?i=d+1:o=d}return e.splice(i,0,t),a?e.pop():null}function Ft(e,t){return e.inputAmount.currency.equals(t.inputAmount.currency)||R(!1),e.outputAmount.currency.equals(t.outputAmount.currency)||R(!1),e.outputAmount.equalTo(t.outputAmount)?e.inputAmount.equalTo(t.inputAmount)?0:e.inputAmount.lessThan(t.inputAmount)?-1:1:e.outputAmount.lessThan(t.outputAmount)?1:-1}function Rt(e,t){var n=Ft(e,t);return 0!==n?n:e.priceImpact.lessThan(t.priceImpact)?-1:e.priceImpact.greaterThan(t.priceImpact)?1:e.route.path.length-t.route.path.length}var vt=function(){function e(e,t,n){this.route=e,this.tradeType=n;var r=new Array(e.path.length);if(n===exports.TradeType.EXACT_INPUT){t.currency.equals(e.input)||R(!1),r[0]=t.wrapped;for(var a=0;a<e.path.length-1;a++){var i=e.pairs[a].getOutputAmount(r[a]);r[a+1]=i[0]}this.inputAmount=It.fromFractionalAmount(e.input,t.numerator,t.denominator),this.outputAmount=It.fromFractionalAmount(e.output,r[r.length-1].numerator,r[r.length-1].denominator)}else{t.currency.equals(e.output)||R(!1),r[r.length-1]=t.wrapped;for(var o=e.path.length-1;o>0;o--){var d=e.pairs[o-1].getInputAmount(r[o]);r[o-1]=d[0]}this.inputAmount=It.fromFractionalAmount(e.input,r[0].numerator,r[0].denominator),this.outputAmount=It.fromFractionalAmount(e.output,t.numerator,t.denominator)}this.executionPrice=new Et(this.inputAmount.currency,this.outputAmount.currency,this.inputAmount.quotient,this.outputAmount.quotient),this.priceImpact=mt(e.midPrice,this.inputAmount,this.outputAmount)}e.exactIn=function(t,n){return new e(t,n,exports.TradeType.EXACT_INPUT)},e.exactOut=function(t,n){return new e(t,n,exports.TradeType.EXACT_OUTPUT)};var t=e.prototype;return t.minimumAmountOut=function(e){if(e.lessThan(Ye)&&R(!1),this.tradeType===exports.TradeType.EXACT_OUTPUT)return this.outputAmount;var t=new xt(Ge).add(e).invert().multiply(this.outputAmount.quotient).quotient;return It.fromRawAmount(this.outputAmount.currency,t)},t.maximumAmountIn=function(e){if(e.lessThan(Ye)&&R(!1),this.tradeType===exports.TradeType.EXACT_INPUT)return this.inputAmount;var t=new xt(Ge).add(e).multiply(this.inputAmount.quotient).quotient;return It.fromRawAmount(this.inputAmount.currency,t)},e.bestTradeExactIn=function(t,n,r,a,i,o,d){var s=void 0===a?{}:a,c=s.maxNumResults,C=void 0===c?3:c,u=s.maxHops,p=void 0===u?3:u;void 0===i&&(i=[]),void 0===o&&(o=n),void 0===d&&(d=[]),t.length>0||R(!1),p>0||R(!1),n===o||i.length>0||R(!1);for(var h=o.wrapped,x=r.wrapped,A=0;A<t.length;A++){var I=t[A];if((I.token0.equals(h.currency)||I.token1.equals(h.currency))&&!I.reserve0.equalTo(Ye)&&!I.reserve1.equalTo(Ye)){var E=void 0;try{E=I.getOutputAmount(h)[0]}catch(e){if(e.isInsufficientInputAmountError)continue;throw e}if(E.currency.equals(x))St(d,new e(new Ot([].concat(i,[I]),n.currency,r),n,exports.TradeType.EXACT_INPUT),C,Rt);else if(p>1&&t.length>1){var f=t.slice(0,A).concat(t.slice(A+1,t.length));e.bestTradeExactIn(f,n,r,{maxNumResults:C,maxHops:p-1},[].concat(i,[I]),E,d)}}}return d},t.worstExecutionPrice=function(e){return new Et(this.inputAmount.currency,this.outputAmount.currency,this.maximumAmountIn(e).quotient,this.minimumAmountOut(e).quotient)},e.bestTradeExactOut=function(t,n,r,a,i,o,d){var s=void 0===a?{}:a,c=s.maxNumResults,C=void 0===c?3:c,u=s.maxHops,p=void 0===u?3:u;void 0===i&&(i=[]),void 0===o&&(o=r),void 0===d&&(d=[]),t.length>0||R(!1),p>0||R(!1),r===o||i.length>0||R(!1);for(var h=o.wrapped,x=n.wrapped,A=0;A<t.length;A++){var I=t[A];if((I.token0.equals(h.currency)||I.token1.equals(h.currency))&&!I.reserve0.equalTo(Ye)&&!I.reserve1.equalTo(Ye)){var E=void 0;try{E=I.getInputAmount(h)[0]}catch(e){if(e.isInsufficientReservesError)continue;throw e}if(E.currency.equals(x))St(d,new e(new Ot([I].concat(i),n,r.currency),r,exports.TradeType.EXACT_OUTPUT),C,Rt);else if(p>1&&t.length>1){var f=t.slice(0,A).concat(t.slice(A+1,t.length));e.bestTradeExactOut(f,n,r,{maxNumResults:C,maxHops:p-1},[I].concat(i),E,d)}}}return d},e}();function yt(e,t){return e.getSigner(t).connectUnchecked()}function Mt(e){return"0x"+e.quotient.toString(16)}var _t=function(){function e(){}return e.swapCallParameters=function(e,t){var n=e.inputAmount.currency.isNative,r=e.outputAmount.currency.isNative;n&&r&&R(!1),!("ttl"in t)||t.ttl>0||R(!1);var a,i,o,d=fe(t.recipient),s=Mt(e.maximumAmountIn(t.allowedSlippage)),c=Mt(e.minimumAmountOut(t.allowedSlippage)),C=e.route.path.map((function(e){return e.address})),u="ttl"in t?"0x"+(Math.floor((new Date).getTime()/1e3)+t.ttl).toString(16):"0x"+t.deadline.toString(16),p=Boolean(t.feeOnTransfer);switch(e.tradeType){case exports.TradeType.EXACT_INPUT:n?(a=p?"swapExactETHForTokensSupportingFeeOnTransferTokens":"swapExactETHForTokens",i=[c,C,d,u],o=s):r?(a=p?"swapExactTokensForETHSupportingFeeOnTransferTokens":"swapExactTokensForETH",i=[s,c,C,d,u],o="0x0"):(a=p?"swapExactTokensForTokensSupportingFeeOnTransferTokens":"swapExactTokensForTokens",i=[s,c,C,d,u],o="0x0");break;case exports.TradeType.EXACT_OUTPUT:p&&R(!1),n?(a="swapETHForExactTokens",i=[c,C,d,u],o=s):r?(a="swapTokensForExactETH",i=[c,s,C,d,u],o="0x0"):(a="swapTokensForExactTokens",i=[c,s,C,d,u],o="0x0")}return{methodName:a,args:i,value:o}},e}();exports.JSBI=F,exports.ARCHER_ROUTER_ADDRESS=J,exports.AbstractCurrency=Ie,exports.Avalanche=me,exports.BAR_ADDRESS=k,exports.BENTOBOX_ADDRESS=V,exports.BORING_HELPER_ADDRESS=Z,exports.Binance=Se,exports.CHAINLINK_ORACLE_ADDRESS=j,exports.CHAIN_KEY=tt,exports.Celo=Fe,exports.CurrencyAmount=It,exports.ENS_REGISTRAR_ADDRESS=te,exports.Ether=Re,exports.FACTORY_ADDRESS=H,exports.FIVE=Je,exports.Fantom=ve,exports.Fraction=xt,exports.Fuse=Pe,exports.Harmony=ye,exports.Heco=Me,exports.INIT_CODE_HASH=nt,exports.InsufficientInputAmountError=ct,exports.InsufficientReservesError=st,exports.KASHI_ADDRESS=W,exports.MAKER_ADDRESS=L,exports.MASTERCHEF_ADDRESS=P,exports.MASTERCHEF_V2_ADDRESS=ee,exports.MAX_SAFE_INTEGER=Tt,exports.MERKLE_DISTRIBUTOR_ADDRESS=re,exports.MINICHEF_ADDRESS=Q,exports.MINIMUM_LIQUIDITY=rt,exports.MULTICALL2_ADDRESS=ae,exports.Matic=_e,exports.MaxUint256=Xe,exports.Movr=ge,exports.NATIVE=We,exports.NativeCurrency=Ee,exports.ONE=Ge,exports.Okex=we,exports.PEGGED_ORACLE_ADDRESS="0x6cbfbB38498Df0E1e7A4506593cDB02db9001564",exports.Pair=bt,exports.Palm=qe,exports.Percent=Bt,exports.Price=Et,exports.ROUTER_ADDRESS=q,exports.Route=Ot,exports.Router=_t,exports.SOLIDITY_TYPE_MAXIMA=ot,exports.SUSHISWAP_MULTISWAPPER_ADDRESS=Y,exports.SUSHISWAP_MULTI_EXACT_SWAPPER_ADDRESS=G,exports.SUSHISWAP_SWAPPER_ADDRESS=X,exports.SUSHISWAP_TWAP_0_ORACLE_ADDRESS="0x66F03B0d30838A3fee971928627ea6F59B236065",exports.SUSHISWAP_TWAP_1_ORACLE_ADDRESS="0x0D51b575591F8f74a2763Ade75D3CDCf6789266f",exports.SUSHI_ADDRESS=U,exports.TEN=Qe,exports.THREE=Ze,exports.TIMELOCK_ADDRESS=K,exports.TWO=je,exports.Token=le,exports.Trade=vt,exports.USDC=Ne,exports.USDC_ADDRESS=w,exports.WETH9=Be,exports.WETH9_ADDRESS=$,exports.WNATIVE=Oe,exports.WNATIVE_ADDRESS=z,exports.ZAPPER_ADDRESS=ne,exports.ZERO=Ye,exports._100=$e,exports._1000=et,exports._997=ze,exports.computePairAddress=ft,exports.computePriceImpact=mt,exports.currencyEquals=function(e,t){return e instanceof le&&t instanceof le?e.equals(t):!(e instanceof le||t instanceof le||e!==t)},exports.difference=function(e,t){return F.greaterThan(e,t)?F.subtract(e,t):F.subtract(t,e)},exports.getProviderOrSigner=function(e,t){return t?yt(e,t):e},exports.getSigner=yt,exports.inputOutputComparator=Ft,exports.maximum=function(){for(var e=arguments.length<=0?void 0:arguments[0],t=1;t<arguments.length;t++){var n=t<0||arguments.length<=t?void 0:arguments[t];F.GT(n,e)&&(e=n)}return e},exports.minimum=function(){for(var e=arguments.length<=0?void 0:arguments[0],t=1;t<arguments.length;t++){var n=t<0||arguments.length<=t?void 0:arguments[t];F.LT(n,e)&&(e=n)}return e},exports.rebase=function(e,t,n){return t?F.divide(F.multiply(e,n),t):Ye},exports.sortedInsert=St,exports.sqrt=Dt,exports.toElastic=function(e,t,n){var r;return F.equal(e.base,Ye)?r=t:(r=F.divide(F.multiply(t,e.elastic),e.base),n&&F.lessThan(F.divide(F.multiply(r,e.base),e.elastic),t)&&(r=F.add(r,Ge))),r},exports.toHex=Mt,exports.tradeComparator=Rt,exports.validateAndParseAddress=fe,exports.validateSolidityTypeInstance=function(e,t){F.greaterThanOrEqual(e,Ye)||R(!1),F.lessThanOrEqual(e,ot[t])||R(!1)},exports.xDai=He;
//# sourceMappingURL=core-sdk.cjs.production.min.js.map
{
"name": "@sushiswap/core-sdk",
"version": "0.1.1",
"version": "0.1.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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