Contract 0x4f56e643f24250c83923be29348d06f634ace49b 7

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x19160764cdce3bcf54edddfe3accd72d19e9fd8a0472917806050fed8112a435Approve1578497652023-12-07 19:44:48167 days 18 hrs ago0xab94ebe13ae9fe1ddb6bea0e92f6a15184fa89c7 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00010254 0.1
0x8bea993d566be5b802e126aa0fd9d97b48a37785b96ebb33ba4c49569ac34baeApprove1519313182023-11-19 10:05:19186 days 4 hrs ago0x0b8d19b7249904f38fba58dc7bb46d7f849e19b6 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003647 0.1
0x0f4f1a7b68759cc789a298be1c18c9fb1e119308207f79d8e3437abefb707fa9Approve1508744622023-11-16 4:42:32189 days 9 hrs ago0xadc031616771ecb503c65e607c13dde152d459df IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00006027 0.1
0xd039958fe61039f6855c78538c888d171157f4ab85051cba9e2ce8ab90e37d12Approve1478861932023-11-07 2:47:32198 days 11 hrs ago0x29214c0a7bb5e9b471fad6c6913300e71554de65 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.000045080.1
0xab65f8a8ad573f2a6b18a6990de423df86af066a1b742a8e519a0986b98bb73eApprove1466377782023-11-03 7:21:51202 days 7 hrs ago0xadc031616771ecb503c65e607c13dde152d459df IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.000033260.1
0x7a839a9cc8009e5b49aa401034eadb68ad1a68e734285618305211b0e6eb98b7Approve1449148572023-10-28 19:35:53207 days 18 hrs ago0xf210df3aad780deacd07a3e68672b156065ef4c0 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00005006 0.1
0xef6c57bb94eaf21aeeb95ba1da4046b1075e81dea78bf3467ff91ad3b66a20efApprove1449041042023-10-28 18:42:10207 days 19 hrs ago0xf210df3aad780deacd07a3e68672b156065ef4c0 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00004763 0.1
0x24e8ee2fd342d2b2fd162969ecbf638cfb6580bb0e012cbb1690fe8e4105031bApprove1448382492023-10-28 13:41:53208 days 51 mins ago0x6f0d5f18244b9800f9f410f03522071b9a15a2dc IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00004533 0.1
0x1f78bf480059450a810b0c4f4a5e0dd4b8432beb9dcad390860be58be71cfe51Approve1448378182023-10-28 13:40:05208 days 53 mins ago0x6f0d5f18244b9800f9f410f03522071b9a15a2dc IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00004252 0.1
0x9afc5bb817d1fe462370a69af1c13ac20e48d6a10ef03924581c0ce67400ab30Approve1448344452023-10-28 13:25:34208 days 1 hr ago0xf8b8bf1755eaa1cdbda243a11acb48e887cf3ba5 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00004384 0.1
0x65fddb399ad2233d451b3197d8de3c153e8cad494fdc2499e14dcab47040c9bcApprove1448289302023-10-28 13:02:09208 days 1 hr ago0xf8b8bf1755eaa1cdbda243a11acb48e887cf3ba5 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003355 0.1
0xa233f0d4f810dfb0bbe41067c68d893d8c272b49ce08a3856cfc5593e8d88f93Approve1447975832023-10-28 10:49:34208 days 3 hrs ago0xf8b8bf1755eaa1cdbda243a11acb48e887cf3ba5 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.000032 0.1
0x53f2cf5e7f3eb8b3bd6271e2326869bc93a62512546e5ba03230e73217eeaf1eApprove1447969982023-10-28 10:47:07208 days 3 hrs ago0xf8b8bf1755eaa1cdbda243a11acb48e887cf3ba5 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002982 0.1
0x02c9714c7258261ec77175b3f021e0993734ec3c6e8d44c85ff1a571ae2523e3Approve1447968962023-10-28 10:46:41208 days 3 hrs ago0xf8b8bf1755eaa1cdbda243a11acb48e887cf3ba5 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002923 0.1
0xc7ef5f3bf6b7b9ef8a776538b526cecac0d3074a9b20b15654c9ee7813441f8bApprove1447952532023-10-28 10:39:46208 days 3 hrs ago0xc06002ee7c30461dcead2d9717543648d6202cd2 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003034 0.1
0xe7cc5d5bcd4b1d47fd43d2ea4b2eb74f8cdb48b441cc90186dbb4e32e92e3725Approve1447950862023-10-28 10:39:03208 days 3 hrs ago0xc06002ee7c30461dcead2d9717543648d6202cd2 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003034 0.1
0x12dfa64f32cf094ceb4f7adcb5e1091fb8e39af6ed8aab67a2c8ecd1eec7a0bbApprove1447912782023-10-28 10:22:54208 days 4 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003246 0.1
0x864b6219507233c85e283213535ee0746a83b11089baedbde672b1b099f232dfApprove1447909792023-10-28 10:21:41208 days 4 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.0000295 0.1
0x87cd5b79158a4504cec27ad6953f6f6fc432344259355d30f49f890d535f4a77Approve1447788342023-10-28 9:30:16208 days 5 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003161 0.1
0x928ca29cbd6ae8b4b94c0c8aac0199699e82677a71ad6ede8e64243f986e5242Approve1447775582023-10-28 9:24:54208 days 5 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002897 0.1
0xf418f589cb76eb5113c02cd0d1c8bf455fbc5929c3180ebea07b37209c7d2cc5Approve1447772522023-10-28 9:23:36208 days 5 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002897 0.1
0x1fdebab958ae8cb4b929d02bb85e1d0cd9c73835407c233e0ebdb9636f5b40c8Approve1447768792023-10-28 9:22:02208 days 5 hrs ago0x72a4c8de79ed8d28b4b5cfe03ead40ac30f99570 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00003068 0.1
0xfad5e2ab87b4a46cc8d6e10292b6c234c7a285ec02d6d9c5562fb42cd93a8eb6Approve1447732982023-10-28 9:06:57208 days 5 hrs ago0x9a85ebe525f9d1f237142fc40957051c5df36398 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002893 0.1
0x044fd5d1977a69ad7d8f1075cd9dbaab9cf6716054ba4aaf8a5af3f9cc966c58Approve1447727692023-10-28 9:04:45208 days 5 hrs ago0x9a85ebe525f9d1f237142fc40957051c5df36398 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002809 0.1
0x8e7959a4baaf13665787032201d89427d506fccbc04feb478a161b8bd6bb603aApprove1447723852023-10-28 9:03:07208 days 5 hrs ago0x9a85ebe525f9d1f237142fc40957051c5df36398 IN  0x4f56e643f24250c83923be29348d06f634ace49b0 ETH0.00002638 0.1
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x9e1551bdc31cb0ad5f8d2aaf19b0d49827b191381ba8e161ce0138659a7611721437737112023-10-25 6:15:03211 days 8 hrs ago Camelot: Factory  Contract Creation0 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1c31fb3359357f6436565ccb3e982bc6bf4189ae
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
CamelotPair

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 30000 runs

Other Settings:
default evmVersion
File 1 of 9 : CamelotPair.sol
pragma solidity =0.5.16;

import './interfaces/ICamelotPair.sol';
import './UniswapV2ERC20.sol';
import './libraries/Math.sol';
import './interfaces/IERC20.sol';
import './interfaces/ICamelotFactory.sol';
import './interfaces/IUniswapV2Callee.sol';

contract CamelotPair is ICamelotPair, UniswapV2ERC20 {
  using SafeMath  for uint;

  uint public constant MINIMUM_LIQUIDITY = 10 ** 3;
  bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));

  address public factory;
  address public token0;
  address public token1;

  bool public initialized;

  uint public constant FEE_DENOMINATOR = 100000;
  uint public constant MAX_FEE_PERCENT = 2000; // = 2%

  uint112 private reserve0;           // uses single storage slot, accessible via getReserves
  uint112 private reserve1;           // uses single storage slot, accessible via getReserves
  uint16 public token0FeePercent = 300; // default = 0.3%  // uses single storage slot, accessible via getReserves
  uint16 public token1FeePercent = 300; // default = 0.3%  // uses single storage slot, accessible via getReserves

  uint public precisionMultiplier0;
  uint public precisionMultiplier1;

  uint public kLast; // reserve0 * reserve1, as of immediately after the most recent liquidity event

  bool public stableSwap; // if set to true, defines pair type as stable
  bool public pairTypeImmutable; // if set to true, stableSwap states cannot be updated anymore

  uint private unlocked = 1;
  modifier lock() {
    require(unlocked == 1, 'CamelotPair: LOCKED');
    unlocked = 0;
    _;
    unlocked = 1;
  }

  function getReserves() public view returns (uint112 _reserve0, uint112 _reserve1, uint16 _token0FeePercent, uint16 _token1FeePercent) {
    _reserve0 = reserve0;
    _reserve1 = reserve1;
    _token0FeePercent = token0FeePercent;
    _token1FeePercent = token1FeePercent;
  }

  function _safeTransfer(address token, address to, uint value) private {
    (bool success, bytes memory data) = token.call(abi.encodeWithSelector(SELECTOR, to, value));
    require(success && (data.length == 0 || abi.decode(data, (bool))), 'CamelotPair: TRANSFER_FAILED');
  }

  event DrainWrongToken(address indexed token, address to);
  event FeePercentUpdated(uint16 token0FeePercent, uint16 token1FeePercent);
  event SetStableSwap(bool prevStableSwap, bool stableSwap);
  event SetPairTypeImmutable();
  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);
  event Skim();

  constructor() public {
    factory = msg.sender;
  }

  // called once by the factory at time of deployment
  function initialize(address _token0, address _token1) external {
    require(msg.sender == factory && !initialized, 'CamelotPair: FORBIDDEN');
    // sufficient check
    token0 = _token0;
    token1 = _token1;

    precisionMultiplier0 = 10 ** uint(IERC20(_token0).decimals());
    precisionMultiplier1 = 10 ** uint(IERC20(_token1).decimals());

    initialized = true;
  }

  /**
  * @dev Updates the swap fees percent
  *
  * Can only be called by the factory's feeAmountOwner
  */
  function setFeePercent(uint16 newToken0FeePercent, uint16 newToken1FeePercent) external lock {
    require(msg.sender == ICamelotFactory(factory).feePercentOwner(), "CamelotPair: only factory's feeAmountOwner");
    require(newToken0FeePercent <= MAX_FEE_PERCENT && newToken1FeePercent <= MAX_FEE_PERCENT, "CamelotPair: feePercent mustn't exceed the maximum");
    require(newToken0FeePercent > 0 && newToken1FeePercent > 0, "CamelotPair: feePercent mustn't exceed the minimum");
    token0FeePercent = newToken0FeePercent;
    token1FeePercent = newToken1FeePercent;
    emit FeePercentUpdated(newToken0FeePercent, newToken1FeePercent);
  }

  function setStableSwap(bool stable, uint112 expectedReserve0, uint112 expectedReserve1) external lock {
    require(msg.sender == ICamelotFactory(factory).setStableOwner(), "CamelotPair: only factory's setStableOwner");
    require(!pairTypeImmutable, "CamelotPair: immutable");

    require(stable != stableSwap, "CamelotPair: no update");
    require(expectedReserve0 == reserve0 && expectedReserve1 == reserve1, "CamelotPair: failed");

    bool feeOn = _mintFee(reserve0, reserve1);

    emit SetStableSwap(stableSwap, stable);
    stableSwap = stable;
    kLast = (stable && feeOn) ? _k(uint(reserve0), uint(reserve1)) : 0;
  }

  function setPairTypeImmutable() external lock {
    require(msg.sender == ICamelotFactory(factory).owner(), "CamelotPair: only factory's owner");
    require(!pairTypeImmutable, "CamelotPair: already immutable");

    pairTypeImmutable = true;
    emit SetPairTypeImmutable();
  }

  // update reserves
  function _update(uint balance0, uint balance1) private {
    require(balance0 <= uint112(- 1) && balance1 <= uint112(- 1), 'CamelotPair: OVERFLOW');

    reserve0 = uint112(balance0);
    reserve1 = uint112(balance1);
    emit Sync(uint112(balance0), uint112(balance1));
  }

  // if fee is on, mint liquidity equivalent to "factory.ownerFeeShare()" of the growth in sqrt(k)
  // only for uni configuration
  function _mintFee(uint112 _reserve0, uint112 _reserve1) private returns (bool feeOn) {
    if(stableSwap) return false;

    (uint ownerFeeShare, address feeTo) = ICamelotFactory(factory).feeInfo();
    feeOn = feeTo != address(0);
    uint _kLast = kLast;
    // gas savings
    if (feeOn) {
      if (_kLast != 0) {
        uint rootK = Math.sqrt(_k(uint(_reserve0), uint(_reserve1)));
        uint rootKLast = Math.sqrt(_kLast);
        if (rootK > rootKLast) {
          uint d = (FEE_DENOMINATOR.mul(100) / ownerFeeShare).sub(100);
          uint numerator = totalSupply.mul(rootK.sub(rootKLast)).mul(100);
          uint denominator = rootK.mul(d).add(rootKLast.mul(100));
          uint liquidity = numerator / denominator;
          if (liquidity > 0) _mint(feeTo, liquidity);
        }
      }
    } else if (_kLast != 0) {
      kLast = 0;
    }
  }

  // this low-level function should be called from a contract which performs important safety checks
  function mint(address to) external lock returns (uint liquidity) {
    (uint112 _reserve0, uint112 _reserve1,,) = getReserves();
    // gas savings
    uint balance0 = IERC20(token0).balanceOf(address(this));
    uint balance1 = IERC20(token1).balanceOf(address(this));
    uint amount0 = balance0.sub(_reserve0);
    uint amount1 = balance1.sub(_reserve1);

    bool feeOn = _mintFee(_reserve0, _reserve1);
    uint _totalSupply = totalSupply;
    // gas savings, must be defined here since totalSupply can update in _mintFee
    if (_totalSupply == 0) {
      liquidity = Math.sqrt(amount0.mul(amount1)).sub(MINIMUM_LIQUIDITY);
      _mint(address(0), MINIMUM_LIQUIDITY);
      // permanently lock the first MINIMUM_LIQUIDITY tokens
    } else {
      liquidity = Math.min(amount0.mul(_totalSupply) / _reserve0, amount1.mul(_totalSupply) / _reserve1);
    }
    require(liquidity > 0, 'CamelotPair: INSUFFICIENT_LIQUIDITY_MINTED');
    _mint(to, liquidity);

    _update(balance0, balance1);
    if (feeOn) kLast = _k(uint(reserve0), uint(reserve1));
    // reserve0 and reserve1 are up-to-date
    emit Mint(msg.sender, amount0, amount1);
  }

  // this low-level function should be called from a contract which performs important safety checks
  function burn(address to) external lock returns (uint amount0, uint amount1) {
    (uint112 _reserve0, uint112 _reserve1,,) = getReserves(); // gas savings
    address _token0 = token0; // gas savings
    address _token1 = token1; // gas savings
    uint balance0 = IERC20(_token0).balanceOf(address(this));
    uint balance1 = IERC20(_token1).balanceOf(address(this));
    uint liquidity = balanceOf[address(this)];

    bool feeOn = _mintFee(_reserve0, _reserve1);
    uint _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
    amount0 = liquidity.mul(balance0) / _totalSupply; // using balances ensures pro-rata distribution
    amount1 = liquidity.mul(balance1) / _totalSupply; // using balances ensures pro-rata distribution
    require(amount0 > 0 && amount1 > 0, 'CamelotPair: INSUFFICIENT_LIQUIDITY_BURNED');
    _burn(address(this), liquidity);
    _safeTransfer(_token0, to, amount0);
    _safeTransfer(_token1, to, amount1);
    balance0 = IERC20(_token0).balanceOf(address(this));
    balance1 = IERC20(_token1).balanceOf(address(this));

    _update(balance0, balance1);
    if (feeOn) kLast = _k(uint(reserve0), uint(reserve1)); // reserve0 and reserve1 are up-to-date
    emit Burn(msg.sender, amount0, amount1, to);
  }

  struct TokensData {
    address token0;
    address token1;
    uint amount0Out;
    uint amount1Out;
    uint balance0;
    uint balance1;
    uint remainingFee0;
    uint remainingFee1;
  }

  // this low-level function should be called from a contract which performs important safety checks
  function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external {
    TokensData memory tokensData = TokensData({
      token0: token0,
      token1: token1,
      amount0Out: amount0Out,
      amount1Out: amount1Out,
      balance0: 0,
      balance1: 0,
      remainingFee0: 0,
      remainingFee1: 0
    });
    _swap(tokensData, to, data, address(0));
  }

  // this low-level function should be called from a contract which performs important safety checks
  function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data, address referrer) external {
    TokensData memory tokensData = TokensData({
      token0: token0,
      token1: token1,
      amount0Out: amount0Out,
      amount1Out: amount1Out,
      balance0: 0,
      balance1: 0,
      remainingFee0: 0,
      remainingFee1: 0
    });
    _swap(tokensData, to, data, referrer);
  }


  function _swap(TokensData memory tokensData, address to, bytes memory data, address referrer) internal lock {
    require(tokensData.amount0Out > 0 || tokensData.amount1Out > 0, 'CamelotPair: INSUFFICIENT_OUTPUT_AMOUNT');

    (uint112 _reserve0, uint112 _reserve1, uint16 _token0FeePercent, uint16 _token1FeePercent) = getReserves();
    require(tokensData.amount0Out < _reserve0 && tokensData.amount1Out < _reserve1, 'CamelotPair: INSUFFICIENT_LIQUIDITY');


    {
      require(to != tokensData.token0 && to != tokensData.token1, 'CamelotPair: INVALID_TO');
      // optimistically transfer tokens
      if (tokensData.amount0Out > 0) _safeTransfer(tokensData.token0, to, tokensData.amount0Out);
      // optimistically transfer tokens
      if (tokensData.amount1Out > 0) _safeTransfer(tokensData.token1, to, tokensData.amount1Out);
      if (data.length > 0) IUniswapV2Callee(to).uniswapV2Call(msg.sender, tokensData.amount0Out, tokensData.amount1Out, data);
      tokensData.balance0 = IERC20(tokensData.token0).balanceOf(address(this));
      tokensData.balance1 = IERC20(tokensData.token1).balanceOf(address(this));
    }

    uint amount0In = tokensData.balance0 > _reserve0 - tokensData.amount0Out ? tokensData.balance0 - (_reserve0 - tokensData.amount0Out) : 0;
    uint amount1In = tokensData.balance1 > _reserve1 - tokensData.amount1Out ? tokensData.balance1 - (_reserve1 - tokensData.amount1Out) : 0;
    require(amount0In > 0 || amount1In > 0, 'CamelotPair: INSUFFICIENT_INPUT_AMOUNT');

    tokensData.remainingFee0 = amount0In.mul(_token0FeePercent) / FEE_DENOMINATOR;
    tokensData.remainingFee1 = amount1In.mul(_token1FeePercent) / FEE_DENOMINATOR;

    {// scope for referer/stable fees management
      uint fee = 0;

      uint referrerInputFeeShare = referrer != address(0) ? ICamelotFactory(factory).referrersFeeShare(referrer) : 0;
      if (referrerInputFeeShare > 0) {
        if (amount0In > 0) {
          fee = amount0In.mul(referrerInputFeeShare).mul(_token0FeePercent) / (FEE_DENOMINATOR ** 2);
          tokensData.remainingFee0 = tokensData.remainingFee0.sub(fee);
          _safeTransfer(tokensData.token0, referrer, fee);
        }
        if (amount1In > 0) {
          fee = amount1In.mul(referrerInputFeeShare).mul(_token1FeePercent) / (FEE_DENOMINATOR ** 2);
          tokensData.remainingFee1 = tokensData.remainingFee1.sub(fee);
          _safeTransfer(tokensData.token1, referrer, fee);
        }
      }

      if(stableSwap){
        (uint ownerFeeShare, address feeTo) = ICamelotFactory(factory).feeInfo();
        if(feeTo != address(0)) {
          ownerFeeShare = FEE_DENOMINATOR.sub(referrerInputFeeShare).mul(ownerFeeShare);
          if (amount0In > 0) {
            fee = amount0In.mul(ownerFeeShare).mul(_token0FeePercent) / (FEE_DENOMINATOR ** 3);
            tokensData.remainingFee0 = tokensData.remainingFee0.sub(fee);
            _safeTransfer(tokensData.token0, feeTo, fee);
          }
          if (amount1In > 0) {
            fee = amount1In.mul(ownerFeeShare).mul(_token1FeePercent) / (FEE_DENOMINATOR ** 3);
            tokensData.remainingFee1 = tokensData.remainingFee1.sub(fee);
            _safeTransfer(tokensData.token1, feeTo, fee);
          }
        }
      }
      // readjust tokens balance
      if (amount0In > 0) tokensData.balance0 = IERC20(tokensData.token0).balanceOf(address(this));
      if (amount1In > 0) tokensData.balance1 = IERC20(tokensData.token1).balanceOf(address(this));
    }
    {// scope for reserve{0,1}Adjusted, avoids stack too deep errors
      uint balance0Adjusted = tokensData.balance0.sub(tokensData.remainingFee0);
      uint balance1Adjusted = tokensData.balance1.sub(tokensData.remainingFee1);
      require(_k(balance0Adjusted, balance1Adjusted) >= _k(uint(_reserve0), uint(_reserve1)), 'CamelotPair: K');
    }
    _update(tokensData.balance0, tokensData.balance1);
    emit Swap(msg.sender, amount0In, amount1In, tokensData.amount0Out, tokensData.amount1Out, to);
  }

  function _k(uint balance0, uint balance1) internal view returns (uint) {
    if (stableSwap) {
      uint _x = balance0.mul(1e18) / precisionMultiplier0;
      uint _y = balance1.mul(1e18) / precisionMultiplier1;
      uint _a = (_x.mul(_y)) / 1e18;
      uint _b = (_x.mul(_x) / 1e18).add(_y.mul(_y) / 1e18);
      return  _a.mul(_b) / 1e18; // x3y+y3x >= k
    }
    return balance0.mul(balance1);
  }

  function _get_y(uint x0, uint xy, uint y) internal pure returns (uint) {
    for (uint i = 0; i < 255; i++) {
      uint y_prev = y;
      uint k = _f(x0, y);
      if (k < xy) {
        uint dy = (xy - k) * 1e18 / _d(x0, y);
        y = y + dy;
      } else {
        uint dy = (k - xy) * 1e18 / _d(x0, y);
        y = y - dy;
      }
      if (y > y_prev) {
        if (y - y_prev <= 1) {
          return y;
        }
      } else {
        if (y_prev - y <= 1) {
          return y;
        }
      }
    }
    return y;
  }

  function _f(uint x0, uint y) internal pure returns (uint) {
    return x0 * (y * y / 1e18 * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18) * y / 1e18;
  }

  function _d(uint x0, uint y) internal pure returns (uint) {
    return 3 * x0 * (y * y / 1e18) / 1e18 + (x0 * x0 / 1e18 * x0 / 1e18);
  }

  function getAmountOut(uint amountIn, address tokenIn) external view returns (uint) {
    uint16 feePercent = tokenIn == token0 ? token0FeePercent : token1FeePercent;
    return _getAmountOut(amountIn, tokenIn, uint(reserve0), uint(reserve1), feePercent);
  }

  function _getAmountOut(uint amountIn, address tokenIn, uint _reserve0, uint _reserve1, uint feePercent) internal view returns (uint) {
    if (stableSwap) {
      amountIn = amountIn.sub(amountIn.mul(feePercent) / FEE_DENOMINATOR); // remove fee from amount received
      uint xy = _k(_reserve0, _reserve1);
      _reserve0 = _reserve0 * 1e18 / precisionMultiplier0;
      _reserve1 = _reserve1 * 1e18 / precisionMultiplier1;

      (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0);
      amountIn = tokenIn == token0 ? amountIn * 1e18 / precisionMultiplier0 : amountIn * 1e18 / precisionMultiplier1;
      uint y = reserveB - _get_y(amountIn + reserveA, xy, reserveB);
      return y * (tokenIn == token0 ? precisionMultiplier1 : precisionMultiplier0) / 1e18;

    } else {
      (uint reserveA, uint reserveB) = tokenIn == token0 ? (_reserve0, _reserve1) : (_reserve1, _reserve0);
      amountIn = amountIn.mul(FEE_DENOMINATOR.sub(feePercent));
      return (amountIn.mul(reserveB)) / (reserveA.mul(FEE_DENOMINATOR).add(amountIn));
    }
  }

  // force balances to match reserves
  function skim(address to) external lock {
    address _token0 = token0;
    // gas savings
    address _token1 = token1;
    // gas savings
    _safeTransfer(_token0, to, IERC20(_token0).balanceOf(address(this)).sub(reserve0));
    _safeTransfer(_token1, to, IERC20(_token1).balanceOf(address(this)).sub(reserve1));
    emit Skim();
  }

  // force reserves to match balances
  function sync() external lock {
    uint token0Balance = IERC20(token0).balanceOf(address(this));
    uint token1Balance = IERC20(token1).balanceOf(address(this));
    require(token0Balance != 0 && token1Balance != 0, "CamelotPair: liquidity ratio not initialized");
    _update(token0Balance, token1Balance);
  }

  /**
  * @dev Allow to recover token sent here by mistake
  *
  * Can only be called by factory's owner
  */
  function drainWrongToken(address token, address to) external lock {
    require(msg.sender == ICamelotFactory(factory).owner(), "CamelotPair: only factory's owner");
    require(token != token0 && token != token1, "CamelotPair: invalid token");
    _safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
    emit DrainWrongToken(token, to);
  }
}

File 2 of 9 : SafeMath.sol
pragma solidity =0.5.16;

// 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 3 of 9 : Math.sol
pragma solidity =0.5.16;

// a library for performing various math operations

library Math {
    function min(uint x, uint y) internal pure returns (uint z) {
        z = x < y ? x : y;
    }

    // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method)
    function sqrt(uint y) internal pure returns (uint z) {
        if (y > 3) {
            z = y;
            uint x = y / 2 + 1;
            while (x < z) {
                z = x;
                x = (y / x + x) / 2;
            }
        } else if (y != 0) {
            z = 1;
        }
    }
}

File 4 of 9 : IUniswapV2ERC20.sol
pragma solidity >=0.5.0;

interface IUniswapV2ERC20 {
    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;
}

File 5 of 9 : IUniswapV2Callee.sol
pragma solidity >=0.5.0;

interface IUniswapV2Callee {
    function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external;
}

File 6 of 9 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    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 7 of 9 : ICamelotPair.sol
pragma solidity >=0.5.0;

interface ICamelotPair {
    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, uint16 token0feePercent, uint16 token1FeePercent);
    function getAmountOut(uint amountIn, address tokenIn) external view returns (uint);
    function kLast() external view returns (uint);

    function setFeePercent(uint16 token0FeePercent, uint16 token1FeePercent) external;
    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 swap(uint amount0Out, uint amount1Out, address to, bytes calldata data, address referrer) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 8 of 9 : ICamelotFactory.sol
pragma solidity >=0.5.0;

interface ICamelotFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint256);

    function owner() external view returns (address);
    function feePercentOwner() external view returns (address);
    function setStableOwner() external view returns (address);
    function feeTo() external view returns (address);

    function ownerFeeShare() external view returns (uint256);
    function referrersFeeShare(address) external view returns (uint256);

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

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

    function setFeeTo(address) external;
    function feeInfo() external view returns (uint _ownerFeeShare, address _feeTo);
}

File 9 of 9 : UniswapV2ERC20.sol
pragma solidity =0.5.16;

import './interfaces/IUniswapV2ERC20.sol';
import './libraries/SafeMath.sol';

contract UniswapV2ERC20 is IUniswapV2ERC20 {
    using SafeMath for uint;

    string public constant name = 'Camelot LP';
    string public constant symbol = 'CMLT-LP';
    uint8 public constant decimals = 18;
    uint  public totalSupply;
    mapping(address => uint) public balanceOf;
    mapping(address => mapping(address => uint)) public allowance;

    bytes32 public DOMAIN_SEPARATOR;
    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;

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

    constructor() public {
        uint chainId;
        assembly {
            chainId := chainid
        }
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                chainId,
                address(this)
            )
        );
    }

    function _mint(address to, uint value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint value) internal {
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _approve(address owner, address spender, uint value) private {
        allowance[owner][spender] = value;
        emit Approval(owner, spender, value);
    }

    function _transfer(address from, address to, uint value) private {
        balanceOf[from] = balanceOf[from].sub(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function approve(address spender, uint value) external returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

    function transfer(address to, uint value) external returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint value) external returns (bool) {
        if (allowance[from][msg.sender] != uint(-1)) {
            uint remaining = allowance[from][msg.sender].sub(value);
            allowance[from][msg.sender] = remaining;
            emit Approval(from, msg.sender, remaining);
        }
        _transfer(from, to, value);
        return true;
    }

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external {
        require(deadline >= block.timestamp, 'UniswapV2: EXPIRED');
        bytes32 digest = keccak256(
            abi.encodePacked(
                '\x19\x01',
                DOMAIN_SEPARATOR,
                keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
            )
        );
        address recoveredAddress = ecrecover(digest, v, r, s);
        require(recoveredAddress != address(0) && recoveredAddress == owner, 'UniswapV2: INVALID_SIGNATURE');
        _approve(owner, spender, value);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 30000
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"DrainWrongToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"token0FeePercent","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"token1FeePercent","type":"uint16"}],"name":"FeePercentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"SetPairTypeImmutable","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"prevStableSwap","type":"bool"},{"indexed":false,"internalType":"bool","name":"stableSwap","type":"bool"}],"name":"SetStableSwap","type":"event"},{"anonymous":false,"inputs":[],"name":"Skim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1In","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount0Out","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1Out","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint112","name":"reserve0","type":"uint112"},{"indexed":false,"internalType":"uint112","name":"reserve1","type":"uint112"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"constant":true,"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"FEE_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MAX_FEE_PERCENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"drainWrongToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getReserves","outputs":[{"internalType":"uint112","name":"_reserve0","type":"uint112"},{"internalType":"uint112","name":"_reserve1","type":"uint112"},{"internalType":"uint16","name":"_token0FeePercent","type":"uint16"},{"internalType":"uint16","name":"_token1FeePercent","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"kLast","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"liquidity","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pairTypeImmutable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"precisionMultiplier0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"precisionMultiplier1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint16","name":"newToken0FeePercent","type":"uint16"},{"internalType":"uint16","name":"newToken1FeePercent","type":"uint16"}],"name":"setFeePercent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"setPairTypeImmutable","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"stable","type":"bool"},{"internalType":"uint112","name":"expectedReserve0","type":"uint112"},{"internalType":"uint112","name":"expectedReserve1","type":"uint112"}],"name":"setStableSwap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"skim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"stableSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount0Out","type":"uint256"},{"internalType":"uint256","name":"amount1Out","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"referrer","type":"address"}],"name":"swap","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"sync","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token0FeePercent","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token1FeePercent","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102c85760003560e01c80636a6278421161017b578063ba9a7a56116100d8578063d73792a91161008c578063f140a35a11610071578063f140a35a146108fc578063f39ac11f14610935578063fff6cae914610970576102c8565b8063d73792a9146108b9578063dd62ed3e146108c1576102c8565b8063c45a0155116100bd578063c45a01551461084b578063d21220a714610853578063d505accf1461085b576102c8565b8063ba9a7a5614610810578063bc25cf7714610818576102c8565b806389afcb441161012f5780639e548b7f116101145780639e548b7f146107c7578063a9059cbb146107cf578063b6200b0714610808576102c8565b806389afcb441461077357806395d89b41146107bf576102c8565b806370a082311161016057806370a08231146107055780637464fc3d146107385780637ecebe0014610740576102c8565b80636a627842146106235780636e1fdd7f14610656576102c8565b80633029e5d4116102295780633ba17077116101dd57806348e5d260116101c257806348e5d260146105ea57806362ecec031461061357806367d817401461061b576102c8565b80633ba17077146105a7578063485cc955146105af576102c8565b8063313ce5671161020e578063313ce567146105795780633644e515146105975780633b9f1dc01461059f576102c8565b80633029e5d41461053457806330adf81f14610571576102c8565b8063158ef93e1161028057806323b872dd1161026557806323b872dd146104ca578063288e5d021461050d5780632fcd169214610515576102c8565b8063158ef93e146104a857806318160ddd146104b0576102c8565b80630902f1ac116102b15780630902f1ac146103e5578063095ea7b31461042a5780630dfe168114610477576102c8565b8063022c0d9f146102cd57806306fdde0314610368575b600080fd5b610366600480360360808110156102e357600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561032757600080fd5b82018360208201111561033957600080fd5b8035906020019184600183028401116401000000008311171561035b57600080fd5b509092509050610978565b005b610370610a26565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103aa578181015183820152602001610392565b50505050905090810190601f1680156103d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103ed610a5f565b604080516dffffffffffffffffffffffffffff958616815293909416602084015261ffff9182168385015216606082015290519081900360800190f35b6104636004803603604081101561044057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610ad8565b604080519115158252519081900360200190f35b61047f610aef565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b610463610b0b565b6104b8610b2c565b60408051918252519081900360200190f35b610463600480360360608110156104e057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610b32565b6104b8610c4e565b61051d610c54565b6040805161ffff9092168252519081900360200190f35b6103666004803603606081101561054a57600080fd5b5080351515906dffffffffffffffffffffffffffff60208201358116916040013516610c80565b6104b861101c565b610581611040565b6040805160ff9092168252519081900360200190f35b6104b8611045565b6104b861104b565b610366611051565b610366600480360360408110156105c557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516611250565b6103666004803603604081101561060057600080fd5b5061ffff81358116916020013516611499565b61051d611768565b6104b8611792565b6104b86004803603602081101561063957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611798565b610366600480360360a081101561066c57600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff60408301351691908101906080810160608201356401000000008111156106b057600080fd5b8201836020820111156106c257600080fd5b803590602001918460018302840111640100000000831117156106e457600080fd5b91935091503573ffffffffffffffffffffffffffffffffffffffff16611b23565b6104b86004803603602081101561071b57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611bd4565b6104b8611be6565b6104b86004803603602081101561075657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611bec565b6107a66004803603602081101561078957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611bfe565b6040805192835260208301919091528051918290030190f35b610370612060565b610463612099565b610463600480360360408110156107e557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356120a2565b6104636120af565b6104b86120bd565b6103666004803603602081101561082e57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166120c3565b61047f6122c8565b61047f6122e4565b610366600480360360e081101561087157600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135612300565b6104b8612598565b6104b8600480360360408110156108d757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661259f565b6104b86004803603604081101561091257600080fd5b508035906020013573ffffffffffffffffffffffffffffffffffffffff166125bc565b6103666004803603604081101561094b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661267f565b610366612966565b610980614494565b50604080516101008101825260065473ffffffffffffffffffffffffffffffffffffffff9081168252600754166020808301919091528183018890526060820187905260006080830181905260a0830181905260c0830181905260e08301528251601f85018290048202810182019093528383529091610a1e9183918791879087908190840183828082843760009201829052509250612b62915050565b505050505050565b6040518060400160405280600a81526020017f43616d656c6f74204c500000000000000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e01000000000000000000000000000083049091169161ffff7c010000000000000000000000000000000000000000000000000000000082048116927e010000000000000000000000000000000000000000000000000000000000009092041690565b6000610ae53384846136cd565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60075474010000000000000000000000000000000000000000900460ff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602090815260408083203384529091528120547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14610c385773ffffffffffffffffffffffffffffffffffffffff84166000908152600260209081526040808320338452909152812054610bca908463ffffffff61373c16565b73ffffffffffffffffffffffffffffffffffffffff8616600081815260026020908152604080832033808552908352928190208590558051858152905194955091937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505b610c43848484613794565b5060015b9392505050565b600a5481565b6008547e01000000000000000000000000000000000000000000000000000000000000900461ffff1681565b600d54600114610cd7576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d55600554604080517ffc39026a000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff9092169163fc39026a91600480820192602092909190829003018186803b158015610d4757600080fd5b505afa158015610d5b573d6000803e3d6000fd5b505050506040513d6020811015610d7157600080fd5b505173ffffffffffffffffffffffffffffffffffffffff163314610dc65760405162461bcd60e51b815260040180806020018281038252602a8152602001806146a5602a913960400191505060405180910390fd5b600c54610100900460ff1615610e23576040805162461bcd60e51b815260206004820152601660248201527f43616d656c6f74506169723a20696d6d757461626c6500000000000000000000604482015290519081900360640190fd5b600c5460ff1615158315151415610e81576040805162461bcd60e51b815260206004820152601660248201527f43616d656c6f74506169723a206e6f2075706461746500000000000000000000604482015290519081900360640190fd5b6008546dffffffffffffffffffffffffffff8381169116148015610ecb57506008546dffffffffffffffffffffffffffff8281166e01000000000000000000000000000090920416145b610f1c576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a206661696c656400000000000000000000000000604482015290519081900360640190fd5b600854600090610f51906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416613875565b600c546040805160ff90921615158252861515602083015280519293507fb6a86710bde53aa7fb1b3856279e2af5b476d53e2dd0902cf17a0911b5a43a8b92918290030190a1600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685158015919091179091558490610fd15750805b610fdc57600061100e565b60085461100e906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416613a6f565b600b5550506001600d555050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60095481565b600d546001146110a8576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d55600554604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691638da5cb5b91600480820192602092909190829003018186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d602081101561114257600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633146111975760405162461bcd60e51b81526004018080602001828103825260218152602001806145e66021913960400191505060405180910390fd5b600c54610100900460ff16156111f4576040805162461bcd60e51b815260206004820152601e60248201527f43616d656c6f74506169723a20616c726561647920696d6d757461626c650000604482015290519081900360640190fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790556040517f09122c41ae733a4d7740324d50e35fbd6ee85be3c1312a45596d8045150ab2f290600090a16001600d55565b60055473ffffffffffffffffffffffffffffffffffffffff1633148015611292575060075474010000000000000000000000000000000000000000900460ff16155b6112e3576040805162461bcd60e51b815260206004820152601660248201527f43616d656c6f74506169723a20464f5242494444454e00000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff8085167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556007805491851691909216179055604080517f313ce567000000000000000000000000000000000000000000000000000000008152905163313ce56791600480820192602092909190829003018186803b15801561138557600080fd5b505afa158015611399573d6000803e3d6000fd5b505050506040513d60208110156113af57600080fd5b505160ff16600a0a600955604080517f313ce567000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff83169163313ce567916004808301926020929190829003018186803b15801561142057600080fd5b505afa158015611434573d6000803e3d6000fd5b505050506040513d602081101561144a57600080fd5b505160ff16600a90810a90555050600780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b600d546001146114f0576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d55600554604080517f4c217715000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691634c21771591600480820192602092909190829003018186803b15801561156057600080fd5b505afa158015611574573d6000803e3d6000fd5b505050506040513d602081101561158a57600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633146115df5760405162461bcd60e51b815260040180806020018281038252602a815260200180614651602a913960400191505060405180910390fd5b6107d08261ffff16111580156115fb57506107d08161ffff1611155b6116365760405162461bcd60e51b815260040180806020018281038252603281526020018061455c6032913960400191505060405180910390fd5b60008261ffff1611801561164e575060008161ffff16115b6116895760405162461bcd60e51b81526004018080602001828103825260328152602001806145b46032913960400191505060405180910390fd5b600880547fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000061ffff858116918202929092177dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167e010000000000000000000000000000000000000000000000000000000000009285169283021790925560408051928352602083019190915280517fa4877b8ecb5a00ba277e4bceeeb187a669e7113649774dfbea05c259ce27f17b9281900390910190a150506001600d55565b6008547c0100000000000000000000000000000000000000000000000000000000900461ffff1681565b6107d081565b6000600d546001146117f1576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d81905580611801610a5f565b5050600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b15801561187c57600080fd5b505afa158015611890573d6000803e3d6000fd5b505050506040513d60208110156118a657600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b15801561191f57600080fd5b505afa158015611933573d6000803e3d6000fd5b505050506040513d602081101561194957600080fd5b50519050600061196f836dffffffffffffffffffffffffffff871663ffffffff61373c16565b90506000611993836dffffffffffffffffffffffffffff871663ffffffff61373c16565b905060006119a18787613875565b600054909150806119ea576119d66103e86119ca6119c5878763ffffffff613b8516565b613bf1565b9063ffffffff61373c16565b98506119e560006103e8613c43565b611a47565b611a446dffffffffffffffffffffffffffff8916611a0e868463ffffffff613b8516565b81611a1557fe5b046dffffffffffffffffffffffffffff8916611a37868563ffffffff613b8516565b81611a3e57fe5b04613cf3565b98505b60008911611a865760405162461bcd60e51b815260040180806020018281038252602a815260200180614506602a913960400191505060405180910390fd5b611a908a8a613c43565b611a9a8686613d09565b8115611ad657600854611ad2906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416613a6f565b600b555b6040805185815260208101859052815133927f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f928290030190a250506001600d5550949695505050505050565b611b2b614494565b50604080516101008101825260065473ffffffffffffffffffffffffffffffffffffffff9081168252600754166020808301919091528183018990526060820188905260006080830181905260a0830181905260c0830181905260e08301528251601f86018290048202810182019093528483529091611bcb91839188918890889081908401838280828437600092019190915250889250612b62915050565b50505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600d54600114611c58576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d81905580611c68610a5f565b5050600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b158015611ceb57600080fd5b505afa158015611cff573d6000803e3d6000fd5b505050506040513d6020811015611d1557600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b158015611d8957600080fd5b505afa158015611d9d573d6000803e3d6000fd5b505050506040513d6020811015611db357600080fd5b505130600090815260016020526040812054919250611dd28888613875565b60005490915080611de9848763ffffffff613b8516565b81611df057fe5b049a5080611e04848663ffffffff613b8516565b81611e0b57fe5b04995060008b118015611e1e575060008a115b611e595760405162461bcd60e51b815260040180806020018281038252602a81526020018061467b602a913960400191505060405180910390fd5b611e633084613e3d565b611e6e878d8d613f02565b611e79868d8c613f02565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b158015611ee557600080fd5b505afa158015611ef9573d6000803e3d6000fd5b505050506040513d6020811015611f0f57600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b158015611f8157600080fd5b505afa158015611f95573d6000803e3d6000fd5b505050506040513d6020811015611fab57600080fd5b50519350611fb98585613d09565b8115611ff557600854611ff1906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416613a6f565b600b555b604080518c8152602081018c9052815173ffffffffffffffffffffffffffffffffffffffff8f169233927fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496929081900390910190a35050505050505050506001600d81905550915091565b6040518060400160405280600781526020017f434d4c542d4c500000000000000000000000000000000000000000000000000081525081565b600c5460ff1681565b6000610ae5338484613794565b600c54610100900460ff1681565b6103e881565b600d5460011461211a576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff94851694909316926121f692859287926121f1926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b1580156121b957600080fd5b505afa1580156121cd573d6000803e3d6000fd5b505050506040513d60208110156121e357600080fd5b50519063ffffffff61373c16565b613f02565b600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161229592849287926121f1926e01000000000000000000000000000090046dffffffffffffffffffffffffffff169173ffffffffffffffffffffffffffffffffffffffff8616916370a0823191602480820192602092909190829003018186803b1580156121b957600080fd5b6040517f21ad22495c9c75cd1c94756f91824e779c0c8a8e168b267c790df464fe056b7990600090a150506001600d5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015612355576040805162461bcd60e51b815260206004820152601260248201527f556e697377617056323a20455850495245440000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156124b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061253157508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b612582576040805162461bcd60e51b815260206004820152601c60248201527f556e697377617056323a20494e56414c49445f5349474e415455524500000000604482015290519081900360640190fd5b61258d8989896136cd565b505050505050505050565b620186a081565b600260209081526000928352604080842090915290825290205481565b600654600090819073ffffffffffffffffffffffffffffffffffffffff848116911614612611576008547e01000000000000000000000000000000000000000000000000000000000000900461ffff16612639565b6008547c0100000000000000000000000000000000000000000000000000000000900461ffff165b60085490915061267790859085906dffffffffffffffffffffffffffff808216916e01000000000000000000000000000090041661ffff86166140f5565b949350505050565b600d546001146126d6576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d55600554604080517f8da5cb5b000000000000000000000000000000000000000000000000000000008152905173ffffffffffffffffffffffffffffffffffffffff90921691638da5cb5b91600480820192602092909190829003018186803b15801561274657600080fd5b505afa15801561275a573d6000803e3d6000fd5b505050506040513d602081101561277057600080fd5b505173ffffffffffffffffffffffffffffffffffffffff1633146127c55760405162461bcd60e51b81526004018080602001828103825260218152602001806145e66021913960400191505060405180910390fd5b60065473ffffffffffffffffffffffffffffffffffffffff83811691161480159061280b575060075473ffffffffffffffffffffffffffffffffffffffff838116911614155b61285c576040805162461bcd60e51b815260206004820152601a60248201527f43616d656c6f74506169723a20696e76616c696420746f6b656e000000000000604482015290519081900360640190fd5b61290f82828473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156128de57600080fd5b505afa1580156128f2573d6000803e3d6000fd5b505050506040513d602081101561290857600080fd5b5051613f02565b6040805173ffffffffffffffffffffffffffffffffffffffff83811682529151918416917f368a9dc863ecb94b5ba32a682e26295b10d9c2666fad7d785ebdf262c3c524139181900360200190a250506001600d55565b600d546001146129bd576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d819055600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612a3557600080fd5b505afa158015612a49573d6000803e3d6000fd5b505050506040513d6020811015612a5f57600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612ad857600080fd5b505afa158015612aec573d6000803e3d6000fd5b505050506040513d6020811015612b0257600080fd5b505190508115801590612b1457508015155b612b4f5760405162461bcd60e51b815260040180806020018281038252602c815260200180614530602c913960400191505060405180910390fd5b612b598282613d09565b50506001600d55565b600d54600114612bb9576040805162461bcd60e51b815260206004820152601360248201527f43616d656c6f74506169723a204c4f434b454400000000000000000000000000604482015290519081900360640190fd5b6000600d556040840151151580612bd4575060008460600151115b612c0f5760405162461bcd60e51b815260040180806020018281038252602781526020018061462a6027913960400191505060405180910390fd5b600080600080612c1d610a5f565b9350935093509350836dffffffffffffffffffffffffffff168860400151108015612c5b5750826dffffffffffffffffffffffffffff168860600151105b612c965760405162461bcd60e51b81526004018080602001828103825260238152602001806146076023913960400191505060405180910390fd5b875173ffffffffffffffffffffffffffffffffffffffff888116911614801590612cf05750876020015173ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614155b612d41576040805162461bcd60e51b815260206004820152601760248201527f43616d656c6f74506169723a20494e56414c49445f544f000000000000000000604482015290519081900360640190fd5b604088015115612d5e57612d5e8860000151888a60400151613f02565b606088015115612d7b57612d7b8860200151888a60600151613f02565b855115612e9c578673ffffffffffffffffffffffffffffffffffffffff166310d1e85c338a604001518b606001518a6040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612e34578181015183820152602001612e1c565b50505050905090810190601f168015612e615780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015612e8357600080fd5b505af1158015612e97573d6000803e3d6000fd5b505050505b8751604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b158015612f0c57600080fd5b505afa158015612f20573d6000803e3d6000fd5b505050506040513d6020811015612f3657600080fd5b50516080890152602088810151604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216926370a0823192602480840193829003018186803b158015612fab57600080fd5b505afa158015612fbf573d6000803e3d6000fd5b505050506040513d6020811015612fd557600080fd5b505160a0890152604088015160808901516000916dffffffffffffffffffffffffffff87160310613007576000613025565b8860400151856dffffffffffffffffffffffffffff16038960800151035b905060008960600151856dffffffffffffffffffffffffffff16038a60a001511161305157600061306f565b8960600151856dffffffffffffffffffffffffffff16038a60a00151035b905060008211806130805750600081115b6130bb5760405162461bcd60e51b815260040180806020018281038252602681526020018061458e6026913960400191505060405180910390fd5b620186a06130d38361ffff871663ffffffff613b8516565b816130da57fe5b0460c08b0152620186a06130f88261ffff861663ffffffff613b8516565b816130ff57fe5b0460e08b015260008073ffffffffffffffffffffffffffffffffffffffff891661312a5760006131ca565b600554604080517f7183d47c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8c8116600483015291519190921691637183d47c916024808301926020929190829003018186803b15801561319d57600080fd5b505afa1580156131b1573d6000803e3d6000fd5b505050506040513d60208110156131c757600080fd5b50515b9050801561328f578315613235576402540be40061320261ffff88166131f6878563ffffffff613b8516565b9063ffffffff613b8516565b8161320957fe5b049150613223828d60c0015161373c90919063ffffffff16565b60c08d01528b51613235908a84613f02565b821561328f576402540be40061325961ffff87166131f6868563ffffffff613b8516565b8161326057fe5b04915061327a828d60e0015161373c90919063ffffffff16565b60e08d015260208c015161328f908a84613f02565b600c5460ff161561342a57600554604080517f995b5aae0000000000000000000000000000000000000000000000000000000081528151600093849373ffffffffffffffffffffffffffffffffffffffff9091169263995b5aae9260048083019392829003018186803b15801561330557600080fd5b505afa158015613319573d6000803e3d6000fd5b505050506040513d604081101561332f57600080fd5b508051602090910151909250905073ffffffffffffffffffffffffffffffffffffffff81161561342757613370826131f6620186a08663ffffffff61373c16565b915085156133cb5766038d7ea4c6800061339861ffff8a166131f6898663ffffffff613b8516565b8161339f57fe5b0493506133b9848f60c0015161373c90919063ffffffff16565b60c08f01528d516133cb908286613f02565b84156134275766038d7ea4c680006133f161ffff89166131f6888663ffffffff613b8516565b816133f857fe5b049350613412848f60e0015161373c90919063ffffffff16565b60e08f015260208e0151613427908286613f02565b50505b83156134d2578b51604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b1580156134a057600080fd5b505afa1580156134b4573d6000803e3d6000fd5b505050506040513d60208110156134ca57600080fd5b505160808d01525b8215613578576020808d0151604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216926370a0823192602480840193829003018186803b15801561354657600080fd5b505afa15801561355a573d6000803e3d6000fd5b505050506040513d602081101561357057600080fd5b505160a08d01525b505060006135978b60c001518c6080015161373c90919063ffffffff16565b905060006135b68c60e001518d60a0015161373c90919063ffffffff16565b90506135e2886dffffffffffffffffffffffffffff16886dffffffffffffffffffffffffffff16613a6f565b6135ec8383613a6f565b101561363f576040805162461bcd60e51b815260206004820152600e60248201527f43616d656c6f74506169723a204b000000000000000000000000000000000000604482015290519081900360640190fd5b50506136538a608001518b60a00151613d09565b6040808b01516060808d01518351868152602081018690528085019390935290820152905173ffffffffffffffffffffffffffffffffffffffff8b169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350506001600d555050505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b80820382811115610ae9576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff83166000908152600160205260409020546137ca908263ffffffff61373c16565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020526040808220939093559084168152205461380c908263ffffffff6142f716565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600c5460009060ff161561388b57506000610ae9565b600554604080517f995b5aae0000000000000000000000000000000000000000000000000000000081528151600093849373ffffffffffffffffffffffffffffffffffffffff9091169263995b5aae9260048083019392829003018186803b1580156138f657600080fd5b505afa15801561390a573d6000803e3d6000fd5b505050506040513d604081101561392057600080fd5b508051602090910151600b5473ffffffffffffffffffffffffffffffffffffffff8216158015965092945090925090613a5a578015613a555760006139886119c5886dffffffffffffffffffffffffffff16886dffffffffffffffffffffffffffff16613a6f565b9050600061399583613bf1565b905080821115613a525760006139ce6064876139ba620186a08363ffffffff613b8516565b816139c157fe5b049063ffffffff61373c16565b905060006139f960646131f66139ea878763ffffffff61373c16565b6000549063ffffffff613b8516565b90506000613a2d613a1185606463ffffffff613b8516565b613a21878663ffffffff613b8516565b9063ffffffff6142f716565b90506000818381613a3a57fe5b0490508015613a4d57613a4d8882613c43565b505050505b50505b613a66565b8015613a66576000600b555b50505092915050565b600c5460009060ff1615613b7557600954600090613a9b85670de0b6b3a764000063ffffffff613b8516565b81613aa257fe5b0490506000600a54613ac5670de0b6b3a764000086613b8590919063ffffffff16565b81613acc57fe5b0490506000670de0b6b3a7640000613aea848463ffffffff613b8516565b81613af157fe5b0490506000613b47670de0b6b3a7640000613b12858063ffffffff613b8516565b81613b1957fe5b04670de0b6b3a7640000613b33878063ffffffff613b8516565b81613b3a57fe5b049063ffffffff6142f716565b9050670de0b6b3a7640000613b62838363ffffffff613b8516565b81613b6957fe5b04945050505050610ae9565b610c47838363ffffffff613b8516565b6000811580613ba057505080820282828281613b9d57fe5b04145b610ae9576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60006003821115613c34575080600160028204015b81811015613c2e57809150600281828581613c1d57fe5b040181613c2657fe5b049050613c06565b50613c3e565b8115613c3e575060015b919050565b600054613c56908263ffffffff6142f716565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054613c8e908263ffffffff6142f716565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310613d025781610c47565b5090919050565b6dffffffffffffffffffffffffffff8211801590613d3557506dffffffffffffffffffffffffffff8111155b613d86576040805162461bcd60e51b815260206004820152601560248201527f43616d656c6f74506169723a204f564552464c4f570000000000000000000000604482015290519081900360640190fd5b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff8481169182177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000009185169182021790925560408051918252602082019290925281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a15050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054613e73908263ffffffff61373c16565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554613ead908263ffffffff61373c16565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b6020831061400857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613fcb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461406a576040519150601f19603f3d011682016040523d82523d6000602084013e61406f565b606091505b509150915081801561409d57508051158061409d575080806020019051602081101561409a57600080fd5b50515b6140ee576040805162461bcd60e51b815260206004820152601c60248201527f43616d656c6f74506169723a205452414e534645525f4641494c454400000000604482015290519081900360640190fd5b5050505050565b600c5460009060ff161561425f57614130620186a061411a888563ffffffff613b8516565b8161412157fe5b8891900463ffffffff61373c16565b9550600061413e8585613a6f565b905060095485670de0b6b3a7640000028161415557fe5b049450600a5484670de0b6b3a7640000028161416d57fe5b6006549190049450600090819073ffffffffffffffffffffffffffffffffffffffff8981169116146141a05785876141a3565b86865b600654919350915073ffffffffffffffffffffffffffffffffffffffff8981169116146141e557600a5489670de0b6b3a764000002816141df57fe5b046141fc565b60095489670de0b6b3a764000002816141fa57fe5b045b9850600061420d838b01858461434f565b6006549083039150670de0b6b3a76400009073ffffffffffffffffffffffffffffffffffffffff8b81169116146142465760095461424a565b600a545b82028161425357fe5b049450505050506142ee565b600654600090819073ffffffffffffffffffffffffffffffffffffffff88811691161461428d578486614290565b85855b90925090506142b86142ab620186a08663ffffffff61373c16565b899063ffffffff613b8516565b97506142d188613a2184620186a063ffffffff613b8516565b6142e1898363ffffffff613b8516565b816142e857fe5b04925050505b95945050505050565b80820182811015610ae9576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b6000805b60ff811015614407578260006143698783614410565b90508581101561439f57600061437f8887614460565b828803670de0b6b3a7640000028161439357fe5b049590950194506143c6565b60006143ab8887614460565b878303670de0b6b3a764000002816143bf57fe5b0490950394505b818511156143e8576001828603116143e357849350505050610c47565b6143fd565b6001858303116143fd57849350505050610c47565b5050600101614353565b50909392505050565b6000670de0b6b3a76400008281858181800204028161442b57fe5b04028161443457fe5b04670de0b6b3a764000080848181800204028161444d57fe5b0485028161445757fe5b04019392505050565b6000670de0b6b3a7640000838181800204028161447957fe5b04670de0b6b3a7640000808480020485600302028161445757fe5b604051806101000160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe43616d656c6f74506169723a20494e53554646494349454e545f4c49515549444954595f4d494e54454443616d656c6f74506169723a206c697175696469747920726174696f206e6f7420696e697469616c697a656443616d656c6f74506169723a2066656550657263656e74206d7573746e27742065786365656420746865206d6178696d756d43616d656c6f74506169723a20494e53554646494349454e545f494e5055545f414d4f554e5443616d656c6f74506169723a2066656550657263656e74206d7573746e27742065786365656420746865206d696e696d756d43616d656c6f74506169723a206f6e6c7920666163746f72792773206f776e657243616d656c6f74506169723a20494e53554646494349454e545f4c495155494449545943616d656c6f74506169723a20494e53554646494349454e545f4f55545055545f414d4f554e5443616d656c6f74506169723a206f6e6c7920666163746f7279277320666565416d6f756e744f776e657243616d656c6f74506169723a20494e53554646494349454e545f4c49515549444954595f4255524e454443616d656c6f74506169723a206f6e6c7920666163746f7279277320736574537461626c654f776e6572a265627a7a72315820d6868f76d541cb84d0c224b1be1388c0971c18c95b39ca8a329adc990b47658364736f6c63430005100032

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