@pancakeswap/sdk 2.3.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.esm.js CHANGED
@@ -10,9 +10,8 @@ import { keccak256, pack } from '@ethersproject/solidity';
10
10
  import { Contract } from '@ethersproject/contracts';
11
11
  import { getNetwork } from '@ethersproject/networks';
12
12
  import { getDefaultProvider } from '@ethersproject/providers';
13
- import IPancakePair from '@pancakeswap-libs/pancake-swap-core/build/IPancakePair.json';
14
13
 
15
- var _SOLIDITY_TYPE_MAXIMA;
14
+ var _FACTORY_ADDRESS_MAP, _INIT_CODE_HASH_MAP, _SOLIDITY_TYPE_MAXIMA;
16
15
  var ChainId;
17
16
 
18
17
  (function (ChainId) {
@@ -36,7 +35,9 @@ var Rounding;
36
35
  })(Rounding || (Rounding = {}));
37
36
 
38
37
  var FACTORY_ADDRESS = '0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73';
38
+ var FACTORY_ADDRESS_MAP = (_FACTORY_ADDRESS_MAP = {}, _FACTORY_ADDRESS_MAP[ChainId.MAINNET] = FACTORY_ADDRESS, _FACTORY_ADDRESS_MAP[ChainId.TESTNET] = '0x6725f303b657a9451d8ba641348b6761a6cc7a17', _FACTORY_ADDRESS_MAP);
39
39
  var INIT_CODE_HASH = '0x00fb7f630766e6a796048ea87d01acd3068e8ff67d078148a3fa3f4a84f69bd5';
40
+ var INIT_CODE_HASH_MAP = (_INIT_CODE_HASH_MAP = {}, _INIT_CODE_HASH_MAP[ChainId.MAINNET] = INIT_CODE_HASH, _INIT_CODE_HASH_MAP[ChainId.TESTNET] = '0xd0d4c4cd0848c93cb4fd1f498d7013ee6bfb25783ea21593d5834f5d250ece66', _INIT_CODE_HASH_MAP);
40
41
  var MINIMUM_LIQUIDITY = /*#__PURE__*/JSBI.BigInt(1000); // exports for internal consumption
41
42
 
42
43
  var ZERO = /*#__PURE__*/JSBI.BigInt(0);
@@ -289,7 +290,7 @@ function validateAndParseAddress(address) {
289
290
  }
290
291
  }
291
292
  function parseBigintIsh(bigintIsh) {
292
- return bigintIsh instanceof JSBI ? bigintIsh : typeof bigintIsh === 'bigint' ? JSBI.BigInt(bigintIsh.toString()) : JSBI.BigInt(bigintIsh);
293
+ return bigintIsh instanceof JSBI ? bigintIsh : JSBI.BigInt(bigintIsh);
293
294
  } // mock the on-chain sqrt function
294
295
 
295
296
  function sqrt(y) {
@@ -380,12 +381,13 @@ var _WETH;
380
381
  var Token = /*#__PURE__*/function (_Currency) {
381
382
  _inheritsLoose(Token, _Currency);
382
383
 
383
- function Token(chainId, address, decimals, symbol, name) {
384
+ function Token(chainId, address, decimals, symbol, name, projectLink) {
384
385
  var _this;
385
386
 
386
387
  _this = _Currency.call(this, decimals, symbol, name) || this;
387
388
  _this.chainId = chainId;
388
389
  _this.address = validateAndParseAddress(address);
390
+ _this.projectLink = projectLink;
389
391
  return _this;
390
392
  }
391
393
  /**
@@ -435,7 +437,7 @@ function currencyEquals(currencyA, currencyB) {
435
437
  return currencyA === currencyB;
436
438
  }
437
439
  }
438
- var WETH = (_WETH = {}, _WETH[ChainId.MAINNET] = /*#__PURE__*/new Token(ChainId.MAINNET, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'), _WETH[ChainId.TESTNET] = /*#__PURE__*/new Token(ChainId.TESTNET, '0xaE8E19eFB41e7b96815649A6a60785e1fbA84C1e', 18, 'WBNB', 'Wrapped BNB'), _WETH);
440
+ var WETH = (_WETH = {}, _WETH[ChainId.MAINNET] = /*#__PURE__*/new Token(ChainId.MAINNET, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB', 'https://www.binance.org'), _WETH[ChainId.TESTNET] = /*#__PURE__*/new Token(ChainId.TESTNET, '0x094616F0BdFB0b526bD735Bf66Eca0Ad254ca81F', 18, 'WBNB', 'Wrapped BNB', 'https://www.binance.org'), _WETH);
439
441
 
440
442
  var _toSignificantRoundin, _toFixedRounding;
441
443
  var Decimal = /*#__PURE__*/toFormat(_Decimal);
@@ -541,7 +543,11 @@ var Fraction = /*#__PURE__*/function () {
541
543
  Big.DP = decimalPlaces;
542
544
  Big.RM = toFixedRounding[rounding];
543
545
  return new Big(this.numerator.toString()).div(this.denominator.toString()).toFormat(decimalPlaces, format);
544
- };
546
+ }
547
+ /**
548
+ * Helper method for converting any super class back to a fraction
549
+ */
550
+ ;
545
551
 
546
552
  _createClass(Fraction, [{
547
553
  key: "quotient",
@@ -554,6 +560,11 @@ var Fraction = /*#__PURE__*/function () {
554
560
  get: function get() {
555
561
  return new Fraction(JSBI.remainder(this.numerator, this.denominator), this.denominator);
556
562
  }
563
+ }, {
564
+ key: "asFraction",
565
+ get: function get() {
566
+ return new Fraction(this.numerator, this.denominator);
567
+ }
557
568
  }]);
558
569
 
559
570
  return Fraction;
@@ -753,7 +764,6 @@ var Price = /*#__PURE__*/function (_Fraction) {
753
764
  return Price;
754
765
  }(Fraction);
755
766
 
756
- var PAIR_ADDRESS_CACHE = {};
757
767
  var Pair = /*#__PURE__*/function () {
758
768
  function Pair(tokenAmountA, tokenAmountB) {
759
769
  var tokenAmounts = tokenAmountA.token.sortsBefore(tokenAmountB.token) // does safety checks
@@ -763,17 +773,12 @@ var Pair = /*#__PURE__*/function () {
763
773
  }
764
774
 
765
775
  Pair.getAddress = function getAddress(tokenA, tokenB) {
766
- var _PAIR_ADDRESS_CACHE, _PAIR_ADDRESS_CACHE$t;
767
-
768
- var tokens = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA]; // does safety checks
776
+ var _ref = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA],
777
+ token0 = _ref[0],
778
+ token1 = _ref[1]; // does safety checks
769
779
 
770
- if (((_PAIR_ADDRESS_CACHE = PAIR_ADDRESS_CACHE) === null || _PAIR_ADDRESS_CACHE === void 0 ? void 0 : (_PAIR_ADDRESS_CACHE$t = _PAIR_ADDRESS_CACHE[tokens[0].address]) === null || _PAIR_ADDRESS_CACHE$t === void 0 ? void 0 : _PAIR_ADDRESS_CACHE$t[tokens[1].address]) === undefined) {
771
- var _PAIR_ADDRESS_CACHE2, _extends2, _extends3;
772
-
773
- PAIR_ADDRESS_CACHE = _extends({}, PAIR_ADDRESS_CACHE, (_extends3 = {}, _extends3[tokens[0].address] = _extends({}, (_PAIR_ADDRESS_CACHE2 = PAIR_ADDRESS_CACHE) === null || _PAIR_ADDRESS_CACHE2 === void 0 ? void 0 : _PAIR_ADDRESS_CACHE2[tokens[0].address], (_extends2 = {}, _extends2[tokens[1].address] = getCreate2Address(FACTORY_ADDRESS, keccak256(['bytes'], [pack(['address', 'address'], [tokens[0].address, tokens[1].address])]), INIT_CODE_HASH), _extends2)), _extends3));
774
- }
775
780
 
776
- return PAIR_ADDRESS_CACHE[tokens[0].address][tokens[1].address];
781
+ return getCreate2Address(FACTORY_ADDRESS_MAP[token0.chainId], keccak256(['bytes'], [pack(['address', 'address'], [token0.address, token1.address])]), INIT_CODE_HASH_MAP[token0.chainId]);
777
782
  }
778
783
  /**
779
784
  * Returns true if the token is either token0 or token1
@@ -1456,6 +1461,734 @@ var Router = /*#__PURE__*/function () {
1456
1461
  return Router;
1457
1462
  }();
1458
1463
 
1464
+ var IPancakePair = [
1465
+ {
1466
+ anonymous: false,
1467
+ inputs: [
1468
+ {
1469
+ indexed: true,
1470
+ internalType: "address",
1471
+ name: "owner",
1472
+ type: "address"
1473
+ },
1474
+ {
1475
+ indexed: true,
1476
+ internalType: "address",
1477
+ name: "spender",
1478
+ type: "address"
1479
+ },
1480
+ {
1481
+ indexed: false,
1482
+ internalType: "uint256",
1483
+ name: "value",
1484
+ type: "uint256"
1485
+ }
1486
+ ],
1487
+ name: "Approval",
1488
+ type: "event"
1489
+ },
1490
+ {
1491
+ anonymous: false,
1492
+ inputs: [
1493
+ {
1494
+ indexed: true,
1495
+ internalType: "address",
1496
+ name: "sender",
1497
+ type: "address"
1498
+ },
1499
+ {
1500
+ indexed: false,
1501
+ internalType: "uint256",
1502
+ name: "amount0",
1503
+ type: "uint256"
1504
+ },
1505
+ {
1506
+ indexed: false,
1507
+ internalType: "uint256",
1508
+ name: "amount1",
1509
+ type: "uint256"
1510
+ },
1511
+ {
1512
+ indexed: true,
1513
+ internalType: "address",
1514
+ name: "to",
1515
+ type: "address"
1516
+ }
1517
+ ],
1518
+ name: "Burn",
1519
+ type: "event"
1520
+ },
1521
+ {
1522
+ anonymous: false,
1523
+ inputs: [
1524
+ {
1525
+ indexed: true,
1526
+ internalType: "address",
1527
+ name: "sender",
1528
+ type: "address"
1529
+ },
1530
+ {
1531
+ indexed: false,
1532
+ internalType: "uint256",
1533
+ name: "amount0",
1534
+ type: "uint256"
1535
+ },
1536
+ {
1537
+ indexed: false,
1538
+ internalType: "uint256",
1539
+ name: "amount1",
1540
+ type: "uint256"
1541
+ }
1542
+ ],
1543
+ name: "Mint",
1544
+ type: "event"
1545
+ },
1546
+ {
1547
+ anonymous: false,
1548
+ inputs: [
1549
+ {
1550
+ indexed: true,
1551
+ internalType: "address",
1552
+ name: "sender",
1553
+ type: "address"
1554
+ },
1555
+ {
1556
+ indexed: false,
1557
+ internalType: "uint256",
1558
+ name: "amount0In",
1559
+ type: "uint256"
1560
+ },
1561
+ {
1562
+ indexed: false,
1563
+ internalType: "uint256",
1564
+ name: "amount1In",
1565
+ type: "uint256"
1566
+ },
1567
+ {
1568
+ indexed: false,
1569
+ internalType: "uint256",
1570
+ name: "amount0Out",
1571
+ type: "uint256"
1572
+ },
1573
+ {
1574
+ indexed: false,
1575
+ internalType: "uint256",
1576
+ name: "amount1Out",
1577
+ type: "uint256"
1578
+ },
1579
+ {
1580
+ indexed: true,
1581
+ internalType: "address",
1582
+ name: "to",
1583
+ type: "address"
1584
+ }
1585
+ ],
1586
+ name: "Swap",
1587
+ type: "event"
1588
+ },
1589
+ {
1590
+ anonymous: false,
1591
+ inputs: [
1592
+ {
1593
+ indexed: false,
1594
+ internalType: "uint112",
1595
+ name: "reserve0",
1596
+ type: "uint112"
1597
+ },
1598
+ {
1599
+ indexed: false,
1600
+ internalType: "uint112",
1601
+ name: "reserve1",
1602
+ type: "uint112"
1603
+ }
1604
+ ],
1605
+ name: "Sync",
1606
+ type: "event"
1607
+ },
1608
+ {
1609
+ anonymous: false,
1610
+ inputs: [
1611
+ {
1612
+ indexed: true,
1613
+ internalType: "address",
1614
+ name: "from",
1615
+ type: "address"
1616
+ },
1617
+ {
1618
+ indexed: true,
1619
+ internalType: "address",
1620
+ name: "to",
1621
+ type: "address"
1622
+ },
1623
+ {
1624
+ indexed: false,
1625
+ internalType: "uint256",
1626
+ name: "value",
1627
+ type: "uint256"
1628
+ }
1629
+ ],
1630
+ name: "Transfer",
1631
+ type: "event"
1632
+ },
1633
+ {
1634
+ constant: true,
1635
+ inputs: [
1636
+ ],
1637
+ name: "DOMAIN_SEPARATOR",
1638
+ outputs: [
1639
+ {
1640
+ internalType: "bytes32",
1641
+ name: "",
1642
+ type: "bytes32"
1643
+ }
1644
+ ],
1645
+ payable: false,
1646
+ stateMutability: "view",
1647
+ type: "function"
1648
+ },
1649
+ {
1650
+ constant: true,
1651
+ inputs: [
1652
+ ],
1653
+ name: "MINIMUM_LIQUIDITY",
1654
+ outputs: [
1655
+ {
1656
+ internalType: "uint256",
1657
+ name: "",
1658
+ type: "uint256"
1659
+ }
1660
+ ],
1661
+ payable: false,
1662
+ stateMutability: "pure",
1663
+ type: "function"
1664
+ },
1665
+ {
1666
+ constant: true,
1667
+ inputs: [
1668
+ ],
1669
+ name: "PERMIT_TYPEHASH",
1670
+ outputs: [
1671
+ {
1672
+ internalType: "bytes32",
1673
+ name: "",
1674
+ type: "bytes32"
1675
+ }
1676
+ ],
1677
+ payable: false,
1678
+ stateMutability: "pure",
1679
+ type: "function"
1680
+ },
1681
+ {
1682
+ constant: true,
1683
+ inputs: [
1684
+ {
1685
+ internalType: "address",
1686
+ name: "owner",
1687
+ type: "address"
1688
+ },
1689
+ {
1690
+ internalType: "address",
1691
+ name: "spender",
1692
+ type: "address"
1693
+ }
1694
+ ],
1695
+ name: "allowance",
1696
+ outputs: [
1697
+ {
1698
+ internalType: "uint256",
1699
+ name: "",
1700
+ type: "uint256"
1701
+ }
1702
+ ],
1703
+ payable: false,
1704
+ stateMutability: "view",
1705
+ type: "function"
1706
+ },
1707
+ {
1708
+ constant: false,
1709
+ inputs: [
1710
+ {
1711
+ internalType: "address",
1712
+ name: "spender",
1713
+ type: "address"
1714
+ },
1715
+ {
1716
+ internalType: "uint256",
1717
+ name: "value",
1718
+ type: "uint256"
1719
+ }
1720
+ ],
1721
+ name: "approve",
1722
+ outputs: [
1723
+ {
1724
+ internalType: "bool",
1725
+ name: "",
1726
+ type: "bool"
1727
+ }
1728
+ ],
1729
+ payable: false,
1730
+ stateMutability: "nonpayable",
1731
+ type: "function"
1732
+ },
1733
+ {
1734
+ constant: true,
1735
+ inputs: [
1736
+ {
1737
+ internalType: "address",
1738
+ name: "owner",
1739
+ type: "address"
1740
+ }
1741
+ ],
1742
+ name: "balanceOf",
1743
+ outputs: [
1744
+ {
1745
+ internalType: "uint256",
1746
+ name: "",
1747
+ type: "uint256"
1748
+ }
1749
+ ],
1750
+ payable: false,
1751
+ stateMutability: "view",
1752
+ type: "function"
1753
+ },
1754
+ {
1755
+ constant: false,
1756
+ inputs: [
1757
+ {
1758
+ internalType: "address",
1759
+ name: "to",
1760
+ type: "address"
1761
+ }
1762
+ ],
1763
+ name: "burn",
1764
+ outputs: [
1765
+ {
1766
+ internalType: "uint256",
1767
+ name: "amount0",
1768
+ type: "uint256"
1769
+ },
1770
+ {
1771
+ internalType: "uint256",
1772
+ name: "amount1",
1773
+ type: "uint256"
1774
+ }
1775
+ ],
1776
+ payable: false,
1777
+ stateMutability: "nonpayable",
1778
+ type: "function"
1779
+ },
1780
+ {
1781
+ constant: true,
1782
+ inputs: [
1783
+ ],
1784
+ name: "decimals",
1785
+ outputs: [
1786
+ {
1787
+ internalType: "uint8",
1788
+ name: "",
1789
+ type: "uint8"
1790
+ }
1791
+ ],
1792
+ payable: false,
1793
+ stateMutability: "pure",
1794
+ type: "function"
1795
+ },
1796
+ {
1797
+ constant: true,
1798
+ inputs: [
1799
+ ],
1800
+ name: "factory",
1801
+ outputs: [
1802
+ {
1803
+ internalType: "address",
1804
+ name: "",
1805
+ type: "address"
1806
+ }
1807
+ ],
1808
+ payable: false,
1809
+ stateMutability: "view",
1810
+ type: "function"
1811
+ },
1812
+ {
1813
+ constant: true,
1814
+ inputs: [
1815
+ ],
1816
+ name: "getReserves",
1817
+ outputs: [
1818
+ {
1819
+ internalType: "uint112",
1820
+ name: "reserve0",
1821
+ type: "uint112"
1822
+ },
1823
+ {
1824
+ internalType: "uint112",
1825
+ name: "reserve1",
1826
+ type: "uint112"
1827
+ },
1828
+ {
1829
+ internalType: "uint32",
1830
+ name: "blockTimestampLast",
1831
+ type: "uint32"
1832
+ }
1833
+ ],
1834
+ payable: false,
1835
+ stateMutability: "view",
1836
+ type: "function"
1837
+ },
1838
+ {
1839
+ constant: false,
1840
+ inputs: [
1841
+ {
1842
+ internalType: "address",
1843
+ name: "",
1844
+ type: "address"
1845
+ },
1846
+ {
1847
+ internalType: "address",
1848
+ name: "",
1849
+ type: "address"
1850
+ }
1851
+ ],
1852
+ name: "initialize",
1853
+ outputs: [
1854
+ ],
1855
+ payable: false,
1856
+ stateMutability: "nonpayable",
1857
+ type: "function"
1858
+ },
1859
+ {
1860
+ constant: true,
1861
+ inputs: [
1862
+ ],
1863
+ name: "kLast",
1864
+ outputs: [
1865
+ {
1866
+ internalType: "uint256",
1867
+ name: "",
1868
+ type: "uint256"
1869
+ }
1870
+ ],
1871
+ payable: false,
1872
+ stateMutability: "view",
1873
+ type: "function"
1874
+ },
1875
+ {
1876
+ constant: false,
1877
+ inputs: [
1878
+ {
1879
+ internalType: "address",
1880
+ name: "to",
1881
+ type: "address"
1882
+ }
1883
+ ],
1884
+ name: "mint",
1885
+ outputs: [
1886
+ {
1887
+ internalType: "uint256",
1888
+ name: "liquidity",
1889
+ type: "uint256"
1890
+ }
1891
+ ],
1892
+ payable: false,
1893
+ stateMutability: "nonpayable",
1894
+ type: "function"
1895
+ },
1896
+ {
1897
+ constant: true,
1898
+ inputs: [
1899
+ ],
1900
+ name: "name",
1901
+ outputs: [
1902
+ {
1903
+ internalType: "string",
1904
+ name: "",
1905
+ type: "string"
1906
+ }
1907
+ ],
1908
+ payable: false,
1909
+ stateMutability: "pure",
1910
+ type: "function"
1911
+ },
1912
+ {
1913
+ constant: true,
1914
+ inputs: [
1915
+ {
1916
+ internalType: "address",
1917
+ name: "owner",
1918
+ type: "address"
1919
+ }
1920
+ ],
1921
+ name: "nonces",
1922
+ outputs: [
1923
+ {
1924
+ internalType: "uint256",
1925
+ name: "",
1926
+ type: "uint256"
1927
+ }
1928
+ ],
1929
+ payable: false,
1930
+ stateMutability: "view",
1931
+ type: "function"
1932
+ },
1933
+ {
1934
+ constant: false,
1935
+ inputs: [
1936
+ {
1937
+ internalType: "address",
1938
+ name: "owner",
1939
+ type: "address"
1940
+ },
1941
+ {
1942
+ internalType: "address",
1943
+ name: "spender",
1944
+ type: "address"
1945
+ },
1946
+ {
1947
+ internalType: "uint256",
1948
+ name: "value",
1949
+ type: "uint256"
1950
+ },
1951
+ {
1952
+ internalType: "uint256",
1953
+ name: "deadline",
1954
+ type: "uint256"
1955
+ },
1956
+ {
1957
+ internalType: "uint8",
1958
+ name: "v",
1959
+ type: "uint8"
1960
+ },
1961
+ {
1962
+ internalType: "bytes32",
1963
+ name: "r",
1964
+ type: "bytes32"
1965
+ },
1966
+ {
1967
+ internalType: "bytes32",
1968
+ name: "s",
1969
+ type: "bytes32"
1970
+ }
1971
+ ],
1972
+ name: "permit",
1973
+ outputs: [
1974
+ ],
1975
+ payable: false,
1976
+ stateMutability: "nonpayable",
1977
+ type: "function"
1978
+ },
1979
+ {
1980
+ constant: true,
1981
+ inputs: [
1982
+ ],
1983
+ name: "price0CumulativeLast",
1984
+ outputs: [
1985
+ {
1986
+ internalType: "uint256",
1987
+ name: "",
1988
+ type: "uint256"
1989
+ }
1990
+ ],
1991
+ payable: false,
1992
+ stateMutability: "view",
1993
+ type: "function"
1994
+ },
1995
+ {
1996
+ constant: true,
1997
+ inputs: [
1998
+ ],
1999
+ name: "price1CumulativeLast",
2000
+ outputs: [
2001
+ {
2002
+ internalType: "uint256",
2003
+ name: "",
2004
+ type: "uint256"
2005
+ }
2006
+ ],
2007
+ payable: false,
2008
+ stateMutability: "view",
2009
+ type: "function"
2010
+ },
2011
+ {
2012
+ constant: false,
2013
+ inputs: [
2014
+ {
2015
+ internalType: "address",
2016
+ name: "to",
2017
+ type: "address"
2018
+ }
2019
+ ],
2020
+ name: "skim",
2021
+ outputs: [
2022
+ ],
2023
+ payable: false,
2024
+ stateMutability: "nonpayable",
2025
+ type: "function"
2026
+ },
2027
+ {
2028
+ constant: false,
2029
+ inputs: [
2030
+ {
2031
+ internalType: "uint256",
2032
+ name: "amount0Out",
2033
+ type: "uint256"
2034
+ },
2035
+ {
2036
+ internalType: "uint256",
2037
+ name: "amount1Out",
2038
+ type: "uint256"
2039
+ },
2040
+ {
2041
+ internalType: "address",
2042
+ name: "to",
2043
+ type: "address"
2044
+ },
2045
+ {
2046
+ internalType: "bytes",
2047
+ name: "data",
2048
+ type: "bytes"
2049
+ }
2050
+ ],
2051
+ name: "swap",
2052
+ outputs: [
2053
+ ],
2054
+ payable: false,
2055
+ stateMutability: "nonpayable",
2056
+ type: "function"
2057
+ },
2058
+ {
2059
+ constant: true,
2060
+ inputs: [
2061
+ ],
2062
+ name: "symbol",
2063
+ outputs: [
2064
+ {
2065
+ internalType: "string",
2066
+ name: "",
2067
+ type: "string"
2068
+ }
2069
+ ],
2070
+ payable: false,
2071
+ stateMutability: "pure",
2072
+ type: "function"
2073
+ },
2074
+ {
2075
+ constant: false,
2076
+ inputs: [
2077
+ ],
2078
+ name: "sync",
2079
+ outputs: [
2080
+ ],
2081
+ payable: false,
2082
+ stateMutability: "nonpayable",
2083
+ type: "function"
2084
+ },
2085
+ {
2086
+ constant: true,
2087
+ inputs: [
2088
+ ],
2089
+ name: "token0",
2090
+ outputs: [
2091
+ {
2092
+ internalType: "address",
2093
+ name: "",
2094
+ type: "address"
2095
+ }
2096
+ ],
2097
+ payable: false,
2098
+ stateMutability: "view",
2099
+ type: "function"
2100
+ },
2101
+ {
2102
+ constant: true,
2103
+ inputs: [
2104
+ ],
2105
+ name: "token1",
2106
+ outputs: [
2107
+ {
2108
+ internalType: "address",
2109
+ name: "",
2110
+ type: "address"
2111
+ }
2112
+ ],
2113
+ payable: false,
2114
+ stateMutability: "view",
2115
+ type: "function"
2116
+ },
2117
+ {
2118
+ constant: true,
2119
+ inputs: [
2120
+ ],
2121
+ name: "totalSupply",
2122
+ outputs: [
2123
+ {
2124
+ internalType: "uint256",
2125
+ name: "",
2126
+ type: "uint256"
2127
+ }
2128
+ ],
2129
+ payable: false,
2130
+ stateMutability: "view",
2131
+ type: "function"
2132
+ },
2133
+ {
2134
+ constant: false,
2135
+ inputs: [
2136
+ {
2137
+ internalType: "address",
2138
+ name: "to",
2139
+ type: "address"
2140
+ },
2141
+ {
2142
+ internalType: "uint256",
2143
+ name: "value",
2144
+ type: "uint256"
2145
+ }
2146
+ ],
2147
+ name: "transfer",
2148
+ outputs: [
2149
+ {
2150
+ internalType: "bool",
2151
+ name: "",
2152
+ type: "bool"
2153
+ }
2154
+ ],
2155
+ payable: false,
2156
+ stateMutability: "nonpayable",
2157
+ type: "function"
2158
+ },
2159
+ {
2160
+ constant: false,
2161
+ inputs: [
2162
+ {
2163
+ internalType: "address",
2164
+ name: "from",
2165
+ type: "address"
2166
+ },
2167
+ {
2168
+ internalType: "address",
2169
+ name: "to",
2170
+ type: "address"
2171
+ },
2172
+ {
2173
+ internalType: "uint256",
2174
+ name: "value",
2175
+ type: "uint256"
2176
+ }
2177
+ ],
2178
+ name: "transferFrom",
2179
+ outputs: [
2180
+ {
2181
+ internalType: "bool",
2182
+ name: "",
2183
+ type: "bool"
2184
+ }
2185
+ ],
2186
+ payable: false,
2187
+ stateMutability: "nonpayable",
2188
+ type: "function"
2189
+ }
2190
+ ];
2191
+
1459
2192
  var ERC20 = [
1460
2193
  {
1461
2194
  constant: true,
@@ -1552,7 +2285,7 @@ var Fetcher = /*#__PURE__*/function () {
1552
2285
  if (provider === undefined) provider = getDefaultProvider(getNetwork(tokenA.chainId));
1553
2286
  !(tokenA.chainId === tokenB.chainId) ? process.env.NODE_ENV !== "production" ? invariant(false, 'CHAIN_ID') : invariant(false) : void 0;
1554
2287
  var address = Pair.getAddress(tokenA, tokenB);
1555
- return Promise.resolve(new Contract(address, IPancakePair.abi, provider).getReserves()).then(function (_ref) {
2288
+ return Promise.resolve(new Contract(address, IPancakePair, provider).getReserves()).then(function (_ref) {
1556
2289
  var reserves0 = _ref[0],
1557
2290
  reserves1 = _ref[1];
1558
2291
  var balances = tokenA.sortsBefore(tokenB) ? [reserves0, reserves1] : [reserves1, reserves0];
@@ -1566,5 +2299,5 @@ var Fetcher = /*#__PURE__*/function () {
1566
2299
  return Fetcher;
1567
2300
  }();
1568
2301
 
1569
- export { ChainId, Currency, CurrencyAmount, ETHER, FACTORY_ADDRESS, Fetcher, Fraction, INIT_CODE_HASH, InsufficientInputAmountError, InsufficientReservesError, MINIMUM_LIQUIDITY, Pair, Percent, Price, Rounding, Route, Router, Token, TokenAmount, Trade, TradeType, WETH, currencyEquals, inputOutputComparator, tradeComparator };
2302
+ export { ChainId, Currency, CurrencyAmount, ETHER, FACTORY_ADDRESS, FACTORY_ADDRESS_MAP, Fetcher, Fraction, INIT_CODE_HASH, INIT_CODE_HASH_MAP, InsufficientInputAmountError, InsufficientReservesError, MINIMUM_LIQUIDITY, Pair, Percent, Price, Rounding, Route, Router, Token, TokenAmount, Trade, TradeType, WETH, currencyEquals, inputOutputComparator, tradeComparator };
1570
2303
  //# sourceMappingURL=sdk.esm.js.map