Contract 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xf41c5c87f925b7e59a952e05fc8610d7b99ba9cdb7d2243538e4062944e31bd871958862021-05-06 21:12:5038 secs ago0xda3fcfa177ab4ea03f775bf54fa5503b07123b0b IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.3224645 BNB0.0005797
0x863eb28d164ca5c90e8bd59e71ecc9bb467f8e4a41d2e3c5b1a5e3dd4039d34e71958812021-05-06 21:12:3553 secs ago0xa51f2eae709523b2ff565eb842c0cab0d3905acc IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916435
0x8850649ca37e5a12feca11c561c90f492e6c03c3bd0bdda58e0794af5e57892d71958732021-05-06 21:12:111 min ago0x1efe7c3d02e6ad32d37eb3616323ce8b40f56126 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916435
0xe8f23fd92b649e8ec56ae1a28d3c973d199fd5478fd86ff9d2cbcf947e9f0fb271958622021-05-06 21:11:381 min ago0xdde9cb462f31a6a7d46f7fde756abac6acc311c6 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000569875
0xfe66e84b3ab4ce51eb23d5177a07b2dfdadc878d9c89a7f055726a34fe817a7271958472021-05-06 21:10:532 mins ago0xa51f2eae709523b2ff565eb842c0cab0d3905acc IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916435
0xfa2912d1069475d7d7dcd4f01211b5df5ddbdf4f4c7b19825bfb3e71fde95aba71957992021-05-06 21:08:294 mins ago0xbf7284c6357fd214d1014a40664957baa1ca9589 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00087336
0x51820c00edc0a57626257019beb8bc77ae87774c562b2ec67e443b3795ab7c0a71957842021-05-06 21:07:445 mins ago0xbf7284c6357fd214d1014a40664957baa1ca9589 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000644755
0xd29c51595b3a48388734357c3cf409e57e433c073ed14cc7932ba6bafef00d6c71957742021-05-06 21:07:146 mins ago0x4db24e856f34485bd5ae33e3885cd2e78f6ad252 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.040364885801566 BNB0.00088005
0x0b945d9c0fa66a07696a6323044ee935154114844dd1e53fb248a8193e16377d71957662021-05-06 21:06:506 mins ago0x4db24e856f34485bd5ae33e3885cd2e78f6ad252 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000671225
0x3debe5d38263debe844ccca01ebe38e03d167fd26ba46fc2ab5e82186f18ef6871957562021-05-06 21:06:207 mins ago0xbc99876d0498520766eb3c9a4092c0698db57e5d IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000893575
0x94b006af3a6fd646c1f153a8a101e9fe02da385f9ec1ee9b5e4c237dc2c99c8671957452021-05-06 21:05:477 mins ago0x25e1ef243b0326f28c724d2860738df3e8d59088 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00094844
0xd4ab12c0af4b98f24fe4dee6ac26081cff754da46e4da50552f228fa12a805ee71957392021-05-06 21:05:297 mins ago0xbb40f9f578380730d996d9a024d320e7986bd91e IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.079549964109424 BNB0.00087131
0xbb16efcf0bf554d5ae32cd08755c0f938439e43bb2f262406e14d32a065ef35971957342021-05-06 21:05:148 mins ago0x117095f19bac0fb794b358faab5c3762d234a189 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916495
0x9d297b5b5b587c01315e4b53b3d1de6a73bc40335d034b8584a90ae72b8a060971957312021-05-06 21:05:058 mins ago0x586018f7c7edc626c0bdeae1a36fc04f38ee01ca IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000535785
0x8efc7ede0f57a18d271c6c203598acf83a740db287b100c6544ea99ee60ec94871957282021-05-06 21:04:568 mins ago0x25e1ef243b0326f28c724d2860738df3e8d59088 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000569315
0xdb5a118bb7be2c1f68b491d5cb384be21e4914ef139c3ecd2877b637a27b60f371957222021-05-06 21:04:388 mins ago0x2a0d4889b627a421c91a4c1222710d1cdac239fb IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916435
0x7aad461f27f1254035904580937249869117808f8c570cfce7bc1f4ae93b121471957212021-05-06 21:04:358 mins ago0x117095f19bac0fb794b358faab5c3762d234a189 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00087505
0x9bd8c3f66c428e62a36477a0ada1b6785005080c0d5e60f3dcb32a08fb955c5a71957202021-05-06 21:04:328 mins ago0xbb40f9f578380730d996d9a024d320e7986bd91e IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.0797 BNB0.00065464
0x560a37e2308a983bd3310d41b60cf2b7fb3eb615a32d3398d5db55c46c36f0b071957192021-05-06 21:04:298 mins ago0xe782c00e7a1501094d8941d133e7263a00bbd196 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00087487
0xc69def18e43cadebb050d8971e25a664a66e4d1f71a753030210828da7dfb22171956882021-05-06 21:02:5610 mins ago0x78387c6ac0b035d8031bffa98b66aa1629e47649 IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00094838
0x5ac88da6fe0f4e3fdfea5f0dd4a1e862afa8dc9fc98c7d4447e61f31500a3e9d71956792021-05-06 21:02:2910 mins ago0xbb40f9f578380730d996d9a024d320e7986bd91e IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.079548712356986 BNB0.00087349
0x2d292f5ef0ff041664217b9128b0e2306210a3ca034ef91f17ebacec0cf2078271956762021-05-06 21:02:2011 mins ago0x98773a84d0c1add3e9fd0d5bc8bd4144011b22ce IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.001137905
0x51c3d7e70d2cdaa2eaf90d86b7e22bb1521fde623d07c54bdb79ebaa9e0ec3fd71956612021-05-06 21:01:3511 mins ago0xbb40f9f578380730d996d9a024d320e7986bd91e IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.0797 BNB0.00065464
0x11f3c1311571bef9a88ebb0fd9e192da3f4d64dff1bd41feb46d1f46684f860971956592021-05-06 21:01:2911 mins ago0x92c96538380f6dd0224841fa77f1d765b4e2399b IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.000916495
0x902cafadf75c94cde755754cf62ef6e58e5d275132c1bd57f134783b2499749f71956502021-05-06 21:01:0212 mins ago0x052e0b2615dc9ca10ac3644a796bbe5cb8b78d1a IN  0x34dbe8e5faefabf5018c16822e4d86f02d57ec270 BNB0.00087503
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xf41c5c87f925b7e59a952e05fc8610d7b99ba9cdb7d2243538e4062944e31bd871958862021-05-06 21:12:5038 secs ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.3224645 BNB
0x863eb28d164ca5c90e8bd59e71ecc9bb467f8e4a41d2e3c5b1a5e3dd4039d34e71958812021-05-06 21:12:3553 secs ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270xa51f2eae709523b2ff565eb842c0cab0d3905acc0.031991056348392774 BNB
0x863eb28d164ca5c90e8bd59e71ecc9bb467f8e4a41d2e3c5b1a5e3dd4039d34e71958812021-05-06 21:12:3553 secs ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.031991056348392774 BNB
0x8850649ca37e5a12feca11c561c90f492e6c03c3bd0bdda58e0794af5e57892d71958732021-05-06 21:12:111 min ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x1efe7c3d02e6ad32d37eb3616323ce8b40f561260.02611776151034213 BNB
0x8850649ca37e5a12feca11c561c90f492e6c03c3bd0bdda58e0794af5e57892d71958732021-05-06 21:12:111 min ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.02611776151034213 BNB
0xfe66e84b3ab4ce51eb23d5177a07b2dfdadc878d9c89a7f055726a34fe817a7271958472021-05-06 21:10:532 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270xa51f2eae709523b2ff565eb842c0cab0d3905acc0.00627400037045659 BNB
0xfe66e84b3ab4ce51eb23d5177a07b2dfdadc878d9c89a7f055726a34fe817a7271958472021-05-06 21:10:532 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.00627400037045659 BNB
0xd29c51595b3a48388734357c3cf409e57e433c073ed14cc7932ba6bafef00d6c71957742021-05-06 21:07:146 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.04036488580156651 BNB
0x0b945d9c0fa66a07696a6323044ee935154114844dd1e53fb248a8193e16377d71957662021-05-06 21:06:506 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x4db24e856f34485bd5ae33e3885cd2e78f6ad2520.069099074153268778 BNB
0x0b945d9c0fa66a07696a6323044ee935154114844dd1e53fb248a8193e16377d71957662021-05-06 21:06:506 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.069099074153268778 BNB
0xd4ab12c0af4b98f24fe4dee6ac26081cff754da46e4da50552f228fa12a805ee71957392021-05-06 21:05:297 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.079549964109424925 BNB
0xbb16efcf0bf554d5ae32cd08755c0f938439e43bb2f262406e14d32a065ef35971957342021-05-06 21:05:148 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x117095f19bac0fb794b358faab5c3762d234a1890.232985593675457062 BNB
0xbb16efcf0bf554d5ae32cd08755c0f938439e43bb2f262406e14d32a065ef35971957342021-05-06 21:05:148 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.232985593675457062 BNB
0xdb5a118bb7be2c1f68b491d5cb384be21e4914ef139c3ecd2877b637a27b60f371957222021-05-06 21:04:388 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x2a0d4889b627a421c91a4c1222710d1cdac239fb0.018795594373764683 BNB
0xdb5a118bb7be2c1f68b491d5cb384be21e4914ef139c3ecd2877b637a27b60f371957222021-05-06 21:04:388 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.018795594373764683 BNB
0x7aad461f27f1254035904580937249869117808f8c570cfce7bc1f4ae93b121471957212021-05-06 21:04:358 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x117095f19bac0fb794b358faab5c3762d234a1890.093960110663988306 BNB
0x7aad461f27f1254035904580937249869117808f8c570cfce7bc1f4ae93b121471957212021-05-06 21:04:358 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.093960110663988306 BNB
0x9bd8c3f66c428e62a36477a0ada1b6785005080c0d5e60f3dcb32a08fb955c5a71957202021-05-06 21:04:328 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.0797 BNB
0x560a37e2308a983bd3310d41b60cf2b7fb3eb615a32d3398d5db55c46c36f0b071957192021-05-06 21:04:298 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270xe782c00e7a1501094d8941d133e7263a00bbd1960.188669227619511747 BNB
0x560a37e2308a983bd3310d41b60cf2b7fb3eb615a32d3398d5db55c46c36f0b071957192021-05-06 21:04:298 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.188669227619511747 BNB
0x5ac88da6fe0f4e3fdfea5f0dd4a1e862afa8dc9fc98c7d4447e61f31500a3e9d71956792021-05-06 21:02:2910 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.079548712356986987 BNB
0x51c3d7e70d2cdaa2eaf90d86b7e22bb1521fde623d07c54bdb79ebaa9e0ec3fd71956612021-05-06 21:01:3511 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec27 Binance: WBNB Token0.0797 BNB
0x11f3c1311571bef9a88ebb0fd9e192da3f4d64dff1bd41feb46d1f46684f860971956592021-05-06 21:01:2911 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270x92c96538380f6dd0224841fa77f1d765b4e2399b0.703189727716685794 BNB
0x11f3c1311571bef9a88ebb0fd9e192da3f4d64dff1bd41feb46d1f46684f860971956592021-05-06 21:01:2911 mins ago Binance: WBNB Token 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270.703189727716685794 BNB
0x1e55df3629500eca28fde9c587a289c2c9cd61c28022ef1081ddaf99ef36310d71956442021-05-06 21:00:4412 mins ago 0x34dbe8e5faefabf5018c16822e4d86f02d57ec270xec7fef730a81a8ef29c2f9797f1e96edcced01ae0.195328487469487295 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CoinSwapRouter

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : CoinSwapRouter.sol
pragma solidity =0.6.6;

import './interfaces/ICoinSwapFactory.sol';
import './libraries/TransferHelper.sol';
import './interfaces/ICoinSwapRouter02.sol';
import './libraries/CoinSwapLibrary.sol';
import './libraries/SafeMath.sol';
import './interfaces/IBEP20.sol';
import './interfaces/IWBNB.sol';

contract CoinSwapRouter is ICoinSwapRouter02 {
    using SafeMath for uint;

    address public override factory;
    address public override WBNB;

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, 'CoinSwapRouter: EXPIRED');
        _;
    }

    constructor(address _factory, address _WBNB) public {
        factory = _factory;
        WBNB = _WBNB;
    }

    receive() external payable {
        assert(msg.sender == WBNB); // only accept BNB via fallback from the WBNB contract
    }

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal virtual returns (uint amountA, uint amountB) {
        // create the pair if it doesn't exist yet
        if (ICoinSwapFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            ICoinSwapFactory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = CoinSwapLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = CoinSwapLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'CoinSwapRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = CoinSwapLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'CoinSwapRouter: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = CoinSwapLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = ICoinSwapPair(pair).mint(to);
    }
    function addLiquidityBNB(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountBNB, uint liquidity) {
        (amountToken, amountBNB) = _addLiquidity(
            token,
            WBNB,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountBNBMin
        );
        address pair = CoinSwapLibrary.pairFor(factory, token, WBNB);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWBNB(WBNB).deposit{value: amountBNB}();
        assert(IWBNB(WBNB).transfer(pair, amountBNB));
        liquidity = ICoinSwapPair(pair).mint(to);
        // refund dust BNB, if any
        if (msg.value > amountBNB) TransferHelper.safeTransferBNB(msg.sender, msg.value - amountBNB);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
        address pair = CoinSwapLibrary.pairFor(factory, tokenA, tokenB);
        ICoinSwapPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = ICoinSwapPair(pair).burn(to);
        (address token0,) = CoinSwapLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'CoinSwapRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'CoinSwapRouter: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityBNB(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountBNB) {
        (amountToken, amountBNB) = removeLiquidity(
            token,
            WBNB,
            liquidity,
            amountTokenMin,
            amountBNBMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWBNB(WBNB).withdraw(amountBNB);
        TransferHelper.safeTransferBNB(to, amountBNB);
    }
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountA, uint amountB) {
        address pair = CoinSwapLibrary.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        ICoinSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityBNBWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountBNB) {
        address pair = CoinSwapLibrary.pairFor(factory, token, WBNB);
        uint value = approveMax ? uint(-1) : liquidity;
        ICoinSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountBNB) = removeLiquidityBNB(token, liquidity, amountTokenMin, amountBNBMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityBNBSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountBNB) {
        (, amountBNB) = removeLiquidity(
            token,
            WBNB,
            liquidity,
            amountTokenMin,
            amountBNBMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IBEP20(token).balanceOf(address(this)));
        IWBNB(WBNB).withdraw(amountBNB);
        TransferHelper.safeTransferBNB(to, amountBNB);
    }
    function removeLiquidityBNBWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountBNB) {
        address pair = CoinSwapLibrary.pairFor(factory, token, WBNB);
        uint value = approveMax ? uint(-1) : liquidity;
        ICoinSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountBNB = removeLiquidityBNBSupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountBNBMin, to, deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = CoinSwapLibrary.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? CoinSwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            ICoinSwapPair(CoinSwapLibrary.pairFor(factory, input, output)).swap(
                amount0Out, amount1Out, to, new bytes(0)
            );
        }
    }
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = CoinSwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = CoinSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'CoinSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactBNBForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        amounts = CoinSwapLibrary.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWBNB(WBNB).deposit{value: amounts[0]}();
        assert(IWBNB(WBNB).transfer(CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }
    function swapTokensForExactBNB(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        amounts = CoinSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'CoinSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWBNB(WBNB).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferBNB(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForBNB(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        amounts = CoinSwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWBNB(WBNB).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferBNB(to, amounts[amounts.length - 1]);
    }
    function swapBNBForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        amounts = CoinSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'CoinSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        IWBNB(WBNB).deposit{value: amounts[0]}();
        assert(IWBNB(WBNB).transfer(CoinSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust BNB, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferBNB(msg.sender, msg.value - amounts[0]);
    }

    // **** SWAP (supporting fee-on-transfer tokens) ****
    // requires the initial amount to have already been sent to the first pair
    function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = CoinSwapLibrary.sortTokens(input, output);
            ICoinSwapPair pair = ICoinSwapPair(CoinSwapLibrary.pairFor(factory, input, output));
            uint amountInput;
            uint amountOutput;
            { // scope to avoid stack too deep errors
            (uint reserve0, uint reserve1,) = pair.getReserves();
            (uint reserveInput, uint reserveOutput) = input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
            amountInput = IBEP20(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = CoinSwapLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? CoinSwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IBEP20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IBEP20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactBNBForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        uint amountIn = msg.value;
        IWBNB(WBNB).deposit{value: amountIn}();
        assert(IWBNB(WBNB).transfer(CoinSwapLibrary.pairFor(factory, path[0], path[1]), amountIn));
        uint balanceBefore = IBEP20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IBEP20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForBNBSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == WBNB, 'CoinSwapRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, CoinSwapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IBEP20(WBNB).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'CoinSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWBNB(WBNB).withdraw(amountOut);
        TransferHelper.safeTransferBNB(to, amountOut);
    }

    // **** LIBRARY FUNCTIONS ****
    function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
        return CoinSwapLibrary.quote(amountA, reserveA, reserveB);
    }

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountOut)
    {
        return CoinSwapLibrary.getAmountOut(amountIn, reserveIn, reserveOut);
    }

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountIn)
    {
        return CoinSwapLibrary.getAmountIn(amountOut, reserveIn, reserveOut);
    }

    function getAmountsOut(uint amountIn, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return CoinSwapLibrary.getAmountsOut(factory, amountIn, path);
    }

    function getAmountsIn(uint amountOut, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return CoinSwapLibrary.getAmountsIn(factory, amountOut, path);
    }
}

File 2 of 10 : ICoinSwapFactory.sol
pragma solidity >=0.5.0;

interface ICoinSwapFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 3 of 10 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

// helper methods for interacting with BEP20 tokens and sending BNB that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferBNB(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferBNB: BNB transfer failed');
    }
}

File 4 of 10 : ICoinSwapRouter02.sol
pragma solidity >=0.6.2;

import './ICoinSwapRouter01.sol';

interface ICoinSwapRouter02 is ICoinSwapRouter01 {
    function removeLiquidityBNBSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external returns (uint amountBNB);
    function removeLiquidityBNBWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountBNB);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactBNBForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForBNBSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

File 5 of 10 : CoinSwapLibrary.sol
pragma solidity >=0.5.0;

import '../interfaces/ICoinSwapPair.sol';
import './SafeMath.sol';

library CoinSwapLibrary {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'CoinSwapLibrary: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'CoinSwapLibrary: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'2e3f108b8526ff1faa4d526bb84210fc5a2bfc5aad2f62207d7964554a5d029d' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        pairFor(factory, tokenA, tokenB);
        (uint reserve0, uint reserve1,) = ICoinSwapPair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'CoinSwapLibrary: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'CoinSwapLibrary: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'CoinSwapLibrary: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'CoinSwapLibrary: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(998);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'CoinSwapLibrary: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'CoinSwapLibrary: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(998);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'CoinSwapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'CoinSwapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 6 of 10 : SafeMath.sol
pragma solidity =0.6.6;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}

File 7 of 10 : IBEP20.sol
pragma solidity >=0.5.0;

interface IBEP20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

File 8 of 10 : IWBNB.sol
pragma solidity >=0.5.0;

interface IWBNB {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 9 of 10 : ICoinSwapRouter01.sol
pragma solidity >=0.6.2;

interface ICoinSwapRouter01 {
    function factory() external pure returns (address);
    function WBNB() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityBNB(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountBNB, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityBNB(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountBNB);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityBNBWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountBNBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountBNB);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactBNBForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactBNB(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForBNB(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapBNBForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 10 of 10 : ICoinSwapPair.sol
pragma solidity >=0.5.0;

interface ICoinSwapPair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WBNB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WBNB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountBNBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityBNB","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountBNB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountBNBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityBNB","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountBNB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountBNBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityBNBSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountBNB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountBNBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityBNBWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountBNB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountBNBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityBNBWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountBNB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapBNBForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactBNBForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactBNBForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForBNB","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForBNBSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactBNB","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516141bf3803806141bf8339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b031991821617909155600180549390921692169190911790556141458061007a6000396000f3fe60806040526004361061014f5760003560e01c80638dd95002116100b6578063d06ca61f1161006f578063d06ca61f1461097f578063d46d2f8314610a34578063d67b571e14610aca578063e058848814610b60578063e8e3370014610bb3578063eaaed44214610c335761016a565b80638dd95002146107cf5780639cf6891114610800578063ad615dec14610884578063b7e65949146108ba578063baa2abde1461090d578063c45a01551461096a5761016a565b80635c11d795116101085780635c11d795146104e05780635d616c5b14610576578063685a0a341461060c5780638332a9631461067f57806385f8c259146107035780638803dbee146107395761016a565b8063054d50d41461016f5780631f00ca74146101b75780632195995c146102bc57806334a0772d1461035357806338ed1739146103c657806350e27df31461045c5761016a565b3661016a576001546001600160a01b0316331461016857fe5b005b600080fd5b34801561017b57600080fd5b506101a56004803603606081101561019257600080fd5b5080359060208101359060400135610c79565b60408051918252519081900360200190f35b3480156101c357600080fd5b5061026c600480360360408110156101da57600080fd5b81359190810190604081016020820135600160201b8111156101fb57600080fd5b82018360208201111561020d57600080fd5b803590602001918460208302840111600160201b8311171561022e57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610c8e945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102a8578181015183820152602001610290565b505050509050019250505060405180910390f35b3480156102c857600080fd5b5061033a60048036036101608110156102e057600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff6101008201351690610120810135906101400135610cb1565b6040805192835260208301919091528051918290030190f35b34801561035f57600080fd5b5061033a600480360361014081101561037757600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135610d97565b3480156103d257600080fd5b5061026c600480360360a08110156103e957600080fd5b813591602081013591810190606081016040820135600160201b81111561040f57600080fd5b82018360208201111561042157600080fd5b803590602001918460208302840111600160201b8311171561044257600080fd5b91935091506001600160a01b038135169060200135610e94565b6101686004803603608081101561047257600080fd5b81359190810190604081016020820135600160201b81111561049357600080fd5b8201836020820111156104a557600080fd5b803590602001918460208302840111600160201b831117156104c657600080fd5b91935091506001600160a01b038135169060200135611058565b3480156104ec57600080fd5b50610168600480360360a081101561050357600080fd5b813591602081013591810190606081016040820135600160201b81111561052957600080fd5b82018360208201111561053b57600080fd5b803590602001918460208302840111600160201b8311171561055c57600080fd5b91935091506001600160a01b038135169060200135611414565b34801561058257600080fd5b5061026c600480360360a081101561059957600080fd5b813591602081013591810190606081016040820135600160201b8111156105bf57600080fd5b8201836020820111156105d157600080fd5b803590602001918460208302840111600160201b831117156105f257600080fd5b91935091506001600160a01b038135169060200135611601565b34801561061857600080fd5b506101a5600480360361014081101561063057600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e0820135169061010081013590610120013561184b565b61026c6004803603608081101561069557600080fd5b81359190810190604081016020820135600160201b8111156106b657600080fd5b8201836020820111156106c857600080fd5b803590602001918460208302840111600160201b831117156106e957600080fd5b91935091506001600160a01b03813516906020013561192c565b34801561070f57600080fd5b506101a56004803603606081101561072657600080fd5b5080359060208101359060400135611c36565b34801561074557600080fd5b5061026c600480360360a081101561075c57600080fd5b813591602081013591810190606081016040820135600160201b81111561078257600080fd5b82018360208201111561079457600080fd5b803590602001918460208302840111600160201b831117156107b557600080fd5b91935091506001600160a01b038135169060200135611c43565b3480156107db57600080fd5b506107e4611d28565b604080516001600160a01b039092168252519081900360200190f35b61026c6004803603608081101561081657600080fd5b81359190810190604081016020820135600160201b81111561083757600080fd5b82018360208201111561084957600080fd5b803590602001918460208302840111600160201b8311171561086a57600080fd5b91935091506001600160a01b038135169060200135611d37565b34801561089057600080fd5b506101a5600480360360608110156108a757600080fd5b5080359060208101359060400135611ffe565b3480156108c657600080fd5b506101a5600480360360c08110156108dd57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a0013561200b565b34801561091957600080fd5b5061033a600480360360e081101561093057600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612160565b34801561097657600080fd5b506107e461238f565b34801561098b57600080fd5b5061026c600480360360408110156109a257600080fd5b81359190810190604081016020820135600160201b8111156109c357600080fd5b8201836020820111156109d557600080fd5b803590602001918460208302840111600160201b831117156109f657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061239e945050505050565b348015610a4057600080fd5b50610168600480360360a0811015610a5757600080fd5b813591602081013591810190606081016040820135600160201b811115610a7d57600080fd5b820183602082011115610a8f57600080fd5b803590602001918460208302840111600160201b83111715610ab057600080fd5b91935091506001600160a01b0381351690602001356123b8565b348015610ad657600080fd5b5061026c600480360360a0811015610aed57600080fd5b813591602081013591810190606081016040820135600160201b811115610b1357600080fd5b820183602082011115610b2557600080fd5b803590602001918460208302840111600160201b83111715610b4657600080fd5b91935091506001600160a01b0381351690602001356125e6565b348015610b6c57600080fd5b5061033a600480360360c0811015610b8357600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612740565b348015610bbf57600080fd5b50610c156004803603610100811015610bd757600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e0013561282e565b60408051938452602084019290925282820152519081900360600190f35b610c15600480360360c0811015610c4957600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612957565b6000610c86848484612b86565b949350505050565b600054606090610ca8906001600160a01b03168484612c76565b90505b92915050565b6000805481908190610ccd906001600160a01b03168f8f612dc3565b9050600087610cdc578c610ce0565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015610d5657600080fd5b505af1158015610d6a573d6000803e3d6000fd5b50505050610d7d8f8f8f8f8f8f8f612160565b809450819550505050509b509b9950505050505050505050565b6000806000610dd06000809054906101000a90046001600160a01b03168e600160009054906101000a90046001600160a01b0316612dc3565b9050600087610ddf578c610de3565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015610e5957600080fd5b505af1158015610e6d573d6000803e3d6000fd5b50505050610e7f8e8e8e8e8e8e612740565b909f909e509c50505050505050505050505050565b60608142811015610eda576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6000546040805160208089028281018201909352888252610f24936001600160a01b0316928c92918b918b91829190850190849080828437600092019190915250612e8392505050565b91508682600184510381518110610f3757fe5b60200260200101511015610f7c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061401e602a913960400191505060405180910390fd5b61100e86866000818110610f8c57fe5b905060200201356001600160a01b031633610ff46000809054906101000a90046001600160a01b03168a8a6000818110610fc257fe5b905060200201356001600160a01b03168b8b6001818110610fdf57fe5b905060200201356001600160a01b0316612dc3565b8560008151811061100157fe5b6020026020010151612fba565b61104d82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613117915050565b509695505050505050565b804281101561109c576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b031685856000816110b357fe5b905060200201356001600160a01b03166001600160a01b03161461110c576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b60015460408051630d0e30db60e41b8152905134926001600160a01b03169163d0e30db091849160048082019260009290919082900301818588803b15801561115457600080fd5b505af1158015611168573d6000803e3d6000fd5b5050600154600080546001600160a01b03928316955063a9059cbb94506111b69350909116908a908a908161119957fe5b905060200201356001600160a01b03168a8a6001818110610fdf57fe5b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561120657600080fd5b505af115801561121a573d6000803e3d6000fd5b505050506040513d602081101561123057600080fd5b505161123857fe5b60008686600019810181811061124a57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156112af57600080fd5b505afa1580156112c3573d6000803e3d6000fd5b505050506040513d60208110156112d957600080fd5b5051604080516020898102828101820190935289825292935061131b9290918a918a91829185019084908082843760009201919091525089925061333a915050565b876113cd828989600019810181811061133057fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561139557600080fd5b505afa1580156113a9573d6000803e3d6000fd5b505050506040513d60208110156113bf57600080fd5b50519063ffffffff61362716565b101561140a5760405162461bcd60e51b815260040180806020018281038252602a81526020018061401e602a913960400191505060405180910390fd5b5050505050505050565b8042811015611458576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6114a48585600081811061146857fe5b905060200201356001600160a01b03163361149e6000809054906101000a90046001600160a01b03168989600081811061119957fe5b8a612fba565b6000858560001981018181106114b657fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561151b57600080fd5b505afa15801561152f573d6000803e3d6000fd5b505050506040513d602081101561154557600080fd5b5051604080516020888102828101820190935288825292935061158792909189918991829185019084908082843760009201919091525088925061333a915050565b866113cd828888600019810181811061159c57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561139557600080fd5b60608142811015611647576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b03168686600019810181811061166357fe5b905060200201356001600160a01b03166001600160a01b0316146116bc576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b6000546040805160208089028281018201909352888252611706936001600160a01b0316928c92918b918b91829190850190849080828437600092019190915250612e8392505050565b9150868260018451038151811061171957fe5b6020026020010151101561175e5760405162461bcd60e51b815260040180806020018281038252602a81526020018061401e602a913960400191505060405180910390fd5b61176e86866000818110610f8c57fe5b6117ad82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613117915050565b60015482516001600160a01b0390911690632e1a7d4d90849060001981019081106117d457fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561181257600080fd5b505af1158015611826573d6000803e3d6000fd5b5050505061104d848360018551038151811061183e57fe5b6020026020010151613677565b60008054600154829161186c916001600160a01b03918216918f9116612dc3565b905060008661187b578b61187f565b6000195b6040805163d505accf60e01b815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156118f557600080fd5b505af1158015611909573d6000803e3d6000fd5b5050505061191b8d8d8d8d8d8d61200b565b9d9c50505050505050505050505050565b60608142811015611972576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b0316868660008161198957fe5b905060200201356001600160a01b03166001600160a01b0316146119e2576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b6000546040805160208089028281018201909352888252611a2c936001600160a01b0316928b92918b918b91829190850190849080828437600092019190915250612c7692505050565b91503482600081518110611a3c57fe5b60200260200101511115611a815760405162461bcd60e51b8152600401808060200182810382526026815260200180613f9d6026913960400191505060405180910390fd5b60015482516001600160a01b039091169063d0e30db0908490600090611aa357fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611ad657600080fd5b505af1158015611aea573d6000803e3d6000fd5b5050600154600080546001600160a01b03928316955063a9059cbb9450611b1b9350909116908a908a908161119957fe5b84600081518110611b2857fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611b7f57600080fd5b505af1158015611b93573d6000803e3d6000fd5b505050506040513d6020811015611ba957600080fd5b5051611bb157fe5b611bf082878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613117915050565b81600081518110611bfd57fe5b6020026020010151341115611c2c57611c2c3383600081518110611c1d57fe5b60200260200101513403613677565b5095945050505050565b6000610c8684848461376a565b60608142811015611c89576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6000546040805160208089028281018201909352888252611cd3936001600160a01b0316928c92918b918b91829190850190849080828437600092019190915250612c7692505050565b91508682600081518110611ce357fe5b60200260200101511115610f7c5760405162461bcd60e51b8152600401808060200182810382526026815260200180613f9d6026913960400191505060405180910390fd5b6001546001600160a01b031681565b60608142811015611d7d576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b03168686600081611d9457fe5b905060200201356001600160a01b03166001600160a01b031614611ded576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b6000546040805160208089028281018201909352888252611e37936001600160a01b0316923492918b918b91829190850190849080828437600092019190915250612e8392505050565b91508682600184510381518110611e4a57fe5b60200260200101511015611e8f5760405162461bcd60e51b815260040180806020018281038252602a81526020018061401e602a913960400191505060405180910390fd5b60015482516001600160a01b039091169063d0e30db0908490600090611eb157fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611ee457600080fd5b505af1158015611ef8573d6000803e3d6000fd5b5050600154600080546001600160a01b03928316955063a9059cbb9450611f299350909116908a908a908161119957fe5b84600081518110611f3657fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611f8d57600080fd5b505af1158015611fa1573d6000803e3d6000fd5b505050506040513d6020811015611fb757600080fd5b5051611fbf57fe5b611c2c82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250613117915050565b6000610c8684848461385a565b60008142811015612051576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b60015461206d9089906001600160a01b03168989893089612160565b604080516370a0823160e01b815230600482015290519194506120f192508a9187916001600160a01b038416916370a0823191602480820192602092909190829003018186803b1580156120c057600080fd5b505afa1580156120d4573d6000803e3d6000fd5b505050506040513d60208110156120ea57600080fd5b5051613906565b60015460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561213e57600080fd5b505af1158015612152573d6000803e3d6000fd5b5050505061104d8483613677565b60008082428110156121a7576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b600080546121bf906001600160a01b03168c8c612dc3565b604080516323b872dd60e01b81523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b15801561221a57600080fd5b505af115801561222e573d6000803e3d6000fd5b505050506040513d602081101561224457600080fd5b50506040805163226bf2d160e21b81526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b15801561229157600080fd5b505af11580156122a5573d6000803e3d6000fd5b505050506040513d60408110156122bb57600080fd5b508051602090910151909250905060006122d58e8e613a5a565b509050806001600160a01b03168e6001600160a01b0316146122f85781836122fb565b82825b90975095508a87101561233f5760405162461bcd60e51b8152600401808060200182810382526025815260200180613f586025913960400191505060405180910390fd5b8986101561237e5760405162461bcd60e51b81526004018080602001828103825260258152602001806140486025913960400191505060405180910390fd5b505050505097509795505050505050565b6000546001600160a01b031681565b600054606090610ca8906001600160a01b03168484612e83565b80428110156123fc576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b03168585600019810181811061241857fe5b905060200201356001600160a01b03166001600160a01b031614612471576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b6124818585600081811061146857fe5b6124bf85858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525030925061333a915050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561250a57600080fd5b505afa15801561251e573d6000803e3d6000fd5b505050506040513d602081101561253457600080fd5b50519050868110156125775760405162461bcd60e51b815260040180806020018281038252602a81526020018061401e602a913960400191505060405180910390fd5b60015460408051632e1a7d4d60e01b81526004810184905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b1580156125c457600080fd5b505af11580156125d8573d6000803e3d6000fd5b5050505061140a8482613677565b6060814281101561262c576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546001600160a01b03168686600019810181811061264857fe5b905060200201356001600160a01b03166001600160a01b0316146126a1576040805162461bcd60e51b815260206004820152601c6024820152600080516020613f7d833981519152604482015290519081900360640190fd5b60005460408051602080890282810182019093528882526126eb936001600160a01b0316928c92918b918b91829190850190849080828437600092019190915250612c7692505050565b915086826000815181106126fb57fe5b6020026020010151111561175e5760405162461bcd60e51b8152600401808060200182810382526026815260200180613f9d6026913960400191505060405180910390fd5b6000808242811015612787576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546127a3908a906001600160a01b03168a8a8a308a612160565b90935091506127b3898685613906565b60015460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561280057600080fd5b505af1158015612814573d6000803e3d6000fd5b505050506128228583613677565b50965096945050505050565b60008060008342811015612877576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6128858c8c8c8c8c8c613b38565b60008054929650909450906128a4906001600160a01b03168e8e612dc3565b90506128b28d338388612fba565b6128be8c338387612fba565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b15801561291657600080fd5b505af115801561292a573d6000803e3d6000fd5b505050506040513d602081101561294057600080fd5b5051949d939c50939a509198505050505050505050565b600080600083428110156129a0576040805162461bcd60e51b81526020600482015260176024820152600080516020613f38833981519152604482015290519081900360640190fd5b6001546129bb908b906001600160a01b03168b348c8c613b38565b60008054600154939750919550916129e1916001600160a01b03908116918e9116612dc3565b90506129ef8b338388612fba565b600160009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612a3f57600080fd5b505af1158015612a53573d6000803e3d6000fd5b50506001546040805163a9059cbb60e01b81526001600160a01b038781166004830152602482018b9052915191909216945063a9059cbb9350604480830193506020928290030181600087803b158015612aac57600080fd5b505af1158015612ac0573d6000803e3d6000fd5b505050506040513d6020811015612ad657600080fd5b5051612ade57fe5b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015612b3657600080fd5b505af1158015612b4a573d6000803e3d6000fd5b505050506040513d6020811015612b6057600080fd5b5051925034841015612b7857612b7833853403613677565b505096509650969350505050565b6000808411612bc65760405162461bcd60e51b815260040180806020018281038252602a815260200180613ff4602a913960400191505060405180910390fd5b600083118015612bd65750600082115b612c115760405162461bcd60e51b81526004018080602001828103825260278152602001806140be6027913960400191505060405180910390fd5b6000612c25856103e663ffffffff613d5a16565b90506000612c39828563ffffffff613d5a16565b90506000612c5f83612c53886103e863ffffffff613d5a16565b9063ffffffff613dbd16565b9050808281612c6a57fe5b04979650505050505050565b6060600282511015612ccf576040805162461bcd60e51b815260206004820152601d60248201527f436f696e537761704c6962726172793a20494e56414c49445f50415448000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015612ce757600080fd5b50604051908082528060200260200182016040528015612d11578160200160208202803683370190505b5090508281600183510381518110612d2557fe5b60209081029190910101528151600019015b8015612dbb57600080612d7487866001860381518110612d5357fe5b6020026020010151878681518110612d6757fe5b6020026020010151613e0c565b91509150612d96848481518110612d8757fe5b6020026020010151838361376a565b846001850381518110612da557fe5b6020908102919091010152505060001901612d37565b509392505050565b6000806000612dd28585613a5a565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f2e3f108b8526ff1faa4d526bb84210fc5a2bfc5aad2f62207d7964554a5d029d609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6060600282511015612edc576040805162461bcd60e51b815260206004820152601d60248201527f436f696e537761704c6962726172793a20494e56414c49445f50415448000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015612ef457600080fd5b50604051908082528060200260200182016040528015612f1e578160200160208202803683370190505b5090508281600081518110612f2f57fe5b60200260200101818152505060005b6001835103811015612dbb57600080612f7487868581518110612f5d57fe5b6020026020010151878660010181518110612d6757fe5b91509150612f96848481518110612f8757fe5b60200260200101518383612b86565b848460010181518110612fa557fe5b60209081029190910101525050600101612f3e565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b6020831061303f5780518252601f199092019160209182019101613020565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146130a1576040519150601f19603f3d011682016040523d82523d6000602084013e6130a6565b606091505b50915091508180156130d45750805115806130d457508080602001905160208110156130d157600080fd5b50515b61310f5760405162461bcd60e51b8152600401808060200182810382526031815260200180613fc36031913960400191505060405180910390fd5b505050505050565b60005b60018351038110156133345760008084838151811061313557fe5b602002602001015185846001018151811061314c57fe5b60200260200101519150915060006131648383613a5a565b509050600087856001018151811061317857fe5b60200260200101519050600080836001600160a01b0316866001600160a01b0316146131a6578260006131aa565b6000835b91509150600060028a510388106131c157886131f2565b6000548a516131f2916001600160a01b03169088908d9060028d019081106131e557fe5b6020026020010151612dc3565b60005490915061320c906001600160a01b03168888612dc3565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015613249576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b838110156132ba5781810151838201526020016132a2565b50505050905090810190601f1680156132e75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561330957600080fd5b505af115801561331d573d6000803e3d6000fd5b50506001909901985061311a975050505050505050565b50505050565b60005b60018351038110156136225760008084838151811061335857fe5b602002602001015185846001018151811061336f57fe5b60200260200101519150915060006133878383613a5a565b5060008054919250906133a4906001600160a01b03168585612dc3565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156133e557600080fd5b505afa1580156133f9573d6000803e3d6000fd5b505050506040513d606081101561340f57600080fd5b5080516020909101516001600160701b0391821693501690506000806001600160a01b038a811690891614613445578284613448565b83835b915091506134a6828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561139557600080fd5b95506134b3868383612b86565b945050505050600080856001600160a01b0316886001600160a01b0316146134dd578260006134e1565b6000835b91509150600060028c51038a106134f8578a61351c565b6000548c5161351c916001600160a01b0316908a908f9060028f019081106131e557fe5b604080516000808252602082019283905263022c0d9f60e01b835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b838110156135a657818101518382015260200161358e565b50505050905090810190601f1680156135d35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156135f557600080fd5b505af1158015613609573d6000803e3d6000fd5b50506001909b019a5061333d9950505050505050505050565b505050565b80820382811115610cab576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b602083106136c35780518252601f1990920191602091820191016136a4565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613725576040519150601f19603f3d011682016040523d82523d6000602084013e61372a565b606091505b50509050806136225760405162461bcd60e51b8152600401808060200182810382526034815260200180613f046034913960400191505060405180910390fd5b60008084116137aa5760405162461bcd60e51b815260040180806020018281038252602b8152602001806140e5602b913960400191505060405180910390fd5b6000831180156137ba5750600082115b6137f55760405162461bcd60e51b81526004018080602001828103825260278152602001806140be6027913960400191505060405180910390fd5b60006138196103e861380d868863ffffffff613d5a16565b9063ffffffff613d5a16565b905060006138336103e661380d868963ffffffff61362716565b9050613850600182848161384357fe5b049063ffffffff613dbd16565b9695505050505050565b600080841161389a5760405162461bcd60e51b815260040180806020018281038252602481526020018061406d6024913960400191505060405180910390fd5b6000831180156138aa5750600082115b6138e55760405162461bcd60e51b81526004018080602001828103825260278152602001806140be6027913960400191505060405180910390fd5b826138f6858463ffffffff613d5a16565b816138fd57fe5b04949350505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b602083106139835780518252601f199092019160209182019101613964565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146139e5576040519150601f19603f3d011682016040523d82523d6000602084013e6139ea565b606091505b5091509150818015613a18575080511580613a185750808060200190516020811015613a1557600080fd5b50515b613a535760405162461bcd60e51b815260040180806020018281038252602d815260200180614091602d913960400191505060405180910390fd5b5050505050565b600080826001600160a01b0316846001600160a01b03161415613aae5760405162461bcd60e51b8152600401808060200182810382526024815260200180613ee06024913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610613ace578284613ad1565b83835b90925090506001600160a01b038216613b31576040805162461bcd60e51b815260206004820152601d60248201527f436f696e537761704c6962726172793a205a45524f5f41444452455353000000604482015290519081900360640190fd5b9250929050565b600080546040805163e6a4390560e01b81526001600160a01b038a811660048301528981166024830152915184938493169163e6a43905916044808301926020929190829003018186803b158015613b8f57600080fd5b505afa158015613ba3573d6000803e3d6000fd5b505050506040513d6020811015613bb957600080fd5b50516001600160a01b03161415613c515760008054604080516364e329cb60e11b81526001600160a01b038c811660048301528b811660248301529151919092169263c9c6539692604480820193602093909283900390910190829087803b158015613c2457600080fd5b505af1158015613c38573d6000803e3d6000fd5b505050506040513d6020811015613c4e57600080fd5b50505b600080548190613c6b906001600160a01b03168b8b613e0c565b91509150816000148015613c7d575080155b15613c8d57879350869250613d4d565b6000613c9a89848461385a565b9050878111613ced5785811015613ce25760405162461bcd60e51b81526004018080602001828103825260258152602001806140486025913960400191505060405180910390fd5b889450925082613d4b565b6000613cfa89848661385a565b905089811115613d0657fe5b87811015613d455760405162461bcd60e51b8152600401808060200182810382526025815260200180613f586025913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b6000811580613d7557505080820282828281613d7257fe5b04145b610cab576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b80820182811015610cab576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fd5b6000806000613e1b8585613a5a565b509050613e29868686612dc3565b50600080613e38888888612dc3565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613e7057600080fd5b505afa158015613e84573d6000803e3d6000fd5b505050506040513d6060811015613e9a57600080fd5b5080516020909101516001600160701b0391821693501690506001600160a01b0387811690841614613ecd578082613ed0565b81815b9099909850965050505050505056fe436f696e537761704c6962726172793a204944454e544943414c5f4144445245535345535472616e7366657248656c7065723a3a736166655472616e73666572424e423a20424e42207472616e73666572206661696c6564436f696e53776170526f757465723a2045585049524544000000000000000000436f696e53776170526f757465723a20494e53554646494349454e545f415f414d4f554e54436f696e53776170526f757465723a20494e56414c49445f5041544800000000436f696e53776170526f757465723a204558434553534956455f494e5055545f414d4f554e545472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c6564436f696e537761704c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54436f696e53776170526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e54436f696e53776170526f757465723a20494e53554646494349454e545f425f414d4f554e54436f696e537761704c6962726172793a20494e53554646494349454e545f414d4f554e545472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564436f696e537761704c6962726172793a20494e53554646494349454e545f4c4951554944495459436f696e537761704c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e54a2646970667358221220f2c3459784bdf49fc514cfd7c62cfebabfd335839992f24b65ee9a36607af34964736f6c63430006060033000000000000000000000000c2d8d27f3196d9989abf366230a47384010440c0000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c2d8d27f3196d9989abf366230a47384010440c0000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c2d8d27f3196d9989abf366230a47384010440c0
Arg [1] : 000000000000000000000000bb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.