Contract 0x19b85ae92947e0725d5265ffb3389e7e4f191fda

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x45d7d2765ff91fcb4152629cb36e1f5d7ba7a77d0798fb03b332b0f3fbe862bfCreate Pair2784562022-01-26 19:22:54419 days 16 hrs ago0xd72736851e2a4a631cefe62d64a3e8d1939934b3 IN  Solarflare: Flare Factory0 GLMR0.2684618
0x8b647aa30e198997ba7aae34107b900519476745b856996347ffd6d488d87e98Create Pair2310272022-01-20 0:24:00426 days 11 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684618
0x9fee07712ebb27891cfdca46d5160f6e97fe341036c0ee34e3c5f5b3618b4ec8Create Pair2310252022-01-20 0:23:30426 days 11 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684618
0x484a76ecfc4d4bd7813e3ca3d94f319b2718884838da73c6757f80c14e11bbe2Create Pair2222602022-01-18 17:58:06427 days 18 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684628
0x51114b569c880a662872446c6067a270f6f8b57bc266dfddbec70c11e9b52290Create Pair2010172022-01-15 17:00:42430 days 19 hrs ago0x179a64dcbf7ee9f0facd05da96ee0b3ca62bb758 IN  Solarflare: Flare Factory0 GLMR0.2684618
0xed946ae8ddcaa87e88e6a7a0a2eeb6080d2b28f385ab77ec4946e75095a784c6Create Pair2010122022-01-15 16:59:42430 days 19 hrs ago0x179a64dcbf7ee9f0facd05da96ee0b3ca62bb758 IN  Solarflare: Flare Factory0 GLMR0.2684628
0xf6656acc405d5eda43d492e8c809ed84c6223ac9e5798218efa215958cbe1ca1Create Pair1949712022-01-14 20:11:18431 days 16 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684618
0xd704ffda95c7a7fbae7aaa6bb1e782d61f0fdce7b2207d68acf29d3539a68dd6Create Pair1938032022-01-14 16:09:42431 days 20 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684628
0x527f3f5a1af98b9e61eccec1e28b440a4afeed1a73c4b84e362f9a1153f5ce37Set Fee To1870462022-01-13 16:46:12432 days 19 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.004336
0x66a3df800e4ab9d1e4d2fc7a928e46c99de05f9eae1a3e61828e37be2774d269Create Pair1869652022-01-13 16:29:30432 days 19 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684618
0x53d492816772d3bedcedd53f49d69edecf1d2998440086bbd8292deea63c4aa0Create Pair1855352022-01-13 11:29:36433 days 46 mins ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684628
0x9da6621ba0d66a1fca8e127f74eb3243ccff9bfd63c35455e1b14c5e745a15a6Create Pair1830372022-01-13 2:56:12433 days 9 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.2684618
0xcdcdad304e246b031781c5de78251b9796be9d94750a6b57045b2a761bf3a0fcCreate Pair1830312022-01-13 2:55:00433 days 9 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Solarflare: Flare Factory0 GLMR0.0022171
0x79e4253d645e0f990a0da578265c84776889b4c86bb9fce7a88d006747105dd00x608060401806432022-01-12 18:43:36433 days 17 hrs ago0x570826a757ef990c85b8cfc02be1dda410f06862 IN  Create: FlareFactory0 GLMR0.3347486
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xee4577965f5e83ce80dbceb13e8d77977e2cb4eb8f2bf2fbd3598d8036afee8128709012023-02-03 17:21:0046 days 18 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xc404c7828377d0bc6ec9a3a9bdf9e92345027d7daffe36dabb009f8963ef317727840932023-01-22 10:44:3659 days 1 hr ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x9c3a6a2f74f956bce0cca574d85158f36d286a42ea848919c04061cd3c52b1cf27088862023-01-11 20:09:2469 days 16 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xe7829836130dd2180e94e1ece75cdef82b8478d840f093a897574ec4b5edc7bd23673642022-11-24 15:06:24117 days 21 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x322c5012b61aee04231f6e1b1cbff84d4997246e4563471f77586d9eb0b8b3bb21144922022-10-19 18:56:06153 days 17 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x8a7c5abbe2cb6fe503c9ef7a79c21c0241e7b35167834b3bc333390791f9f0e518343502022-09-09 23:18:54193 days 12 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x65dd984b26790a61d5b9f737719f64ec01f588a2200d95621f39f711cc163fc714123382022-07-10 17:49:36254 days 18 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xa0d43711420d5743a91dc1cc2c4ed9ea42f84a3320ef727e6f6344bb776541e614123242022-07-10 17:46:36254 days 18 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xa6cabcc2704c8105e63ecfdf43c78c664889a3c905dbbfe6404b5be04ea3a2aa13774992022-07-05 15:24:36259 days 20 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x4e5610971fd5c8e18f1666c960791606a1fb4440aebbaeece32d1a0c22872d0e11877332022-06-07 8:51:36288 days 3 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x1d3a223bd4622769cf7817cd6c150c42e9931d72576e1b7409f4c65ea4c270ac9375952022-05-01 19:12:06324 days 17 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x0a9544ce03e0ab6660dc93db589be8e5ce1b61fb20698b8df0ddca4ea849c5b78261412022-04-15 17:30:54340 days 18 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x55d432730553dc411528577ccc24c5b913d80ed2d489b73549dae3612d3f417a8261312022-04-15 17:28:54340 days 18 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x034700c8f2edfb8fe898cd952b6637af3919bccdd92105ed7a63274063e273a88119042022-04-13 16:38:18342 days 19 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xe38a1e45a57221185fa4b4b7b7a0e916b91590a88ad4e25d92ca7744fa873f7d7491082022-04-04 16:41:36351 days 19 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x7dbdb65debb7117aba69718d5ba5c5157bd22dc2cb7c15c11412fafcf2cf288a7489752022-04-04 16:14:42351 days 20 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x9e1736421bc07f544ef4773096e60ace6cf43caad68019b64fbbfa09f941e82d7389192022-04-03 5:23:48353 days 6 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x35ecc3071e26002879b43232daee71216c47681dface6bcdb5a0ae51273460146989502022-03-28 11:22:12359 days 54 mins ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x43e5757476b9004809d0f07a118aa9276038d585baf29c2e796304d8aeb696646782732022-03-25 12:10:54362 days 5 mins ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x4e9aa2972800e1cdfb58519cfbd9a55c83c8776cbb2784f4ba831b8550b5a1fc5650152022-03-09 7:27:00378 days 4 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xa1b766670331d668ad271e2e42add4681ecd013c8e83952c915ff3e06dd939cb5216492022-03-03 2:29:00384 days 9 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x74aee214d2fba439621e6c3b84fb984bbb7478d12f8cd16e919c7e54f512dbd45090662022-03-01 7:22:12386 days 4 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x8a676aa57066bb0d734cc92116b086b04643a79190ad67c55b0712cedaaab21b4693602022-02-23 13:43:30391 days 22 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0xa206b8fa5283abd9a9a309a0f9ccb79ae066a4728813eddfa63e223b363fce734683302022-02-23 10:09:12392 days 2 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
0x07fc6c92350e4563a9415124180bd3ff0dc714dd4502af30b9a312705131a0684492892022-02-20 15:55:36394 days 20 hrs ago Solarflare: Flare Factory  Contract Creation0 GLMR
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FlareFactory

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at moonbeam.moonscan.io on 2022-01-20
*/

// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.6.12;

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

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function migrator() external view returns (address);

    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 setFeeToSetter(address) external;

    function setMigrator(address) external;
}


library SafeMathFlare {
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x, "ds-math-add-overflow");
    }

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

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

contract FlareERC20 {
    using SafeMathFlare for uint256;

    string public constant name = "Flare LP Token";
    string public constant symbol = "FLP";
    uint8 public constant decimals = 18;
    uint256 public totalSupply;
    mapping(address => uint256) public balanceOf;
    mapping(address => mapping(address => uint256)) 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 => uint256) public nonces;

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

    constructor() public {
        uint256 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 _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal pure virtual returns (bytes calldata) {
        return msg.data;
    }

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

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

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

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

    function approve(address spender, uint256 value) external returns (bool) {
        _approve(_msgSender(), spender, value);
        return true;
    }

    function transfer(address to, uint256 value) external returns (bool) {
        _transfer(_msgSender(), to, value);
        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 value
    ) external returns (bool) {
        if (allowance[from][_msgSender()] != uint256(-1)) {
            allowance[from][_msgSender()] = allowance[from][_msgSender()].sub(
                value
            );
        }
        _transfer(from, to, value);
        return true;
    }

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        require(deadline >= block.timestamp, "permit: 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,
            "permit: INVALID_SIGNATURE"
        );
        _approve(owner, spender, value);
    }
}



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

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


library UQ112x112 {
    uint224 constant Q112 = 2**112;

    // encode a uint112 as a UQ112x112
    function encode(uint112 y) internal pure returns (uint224 z) {
        z = uint224(y) * Q112; // never overflows
    }

    // divide a UQ112x112 by a uint112, returning a UQ112x112
    function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) {
        z = x / uint224(y);
    }
}

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

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


interface IMigrator {
    // Return the desired amount of liquidity token that the migrator wants.
    function desiredLiquidity() external view returns (uint256);
}

contract FlarePair is FlareERC20 {
    using SafeMathFlare for uint256;
    using UQ112x112 for uint224;

    uint256 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;

    uint112 private reserve0; // uses single storage slot, accessible via getReserves
    uint112 private reserve1; // uses single storage slot, accessible via getReserves
    uint32 private blockTimestampLast; // uses single storage slot, accessible via getReserves

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

    struct SwapVariables {
        uint112 _reserve0;
        uint112 _reserve1;
        uint256 balance0;
        uint256 balance1;
        uint256 amount0In;
        uint256 amount1In;
    }

    uint256 private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, "lock: LOCKED");
        unlocked = 0;
        _;
        unlocked = 1;
    }

    function getReserves()
        public
        view
        returns (
            uint112 _reserve0,
            uint112 _reserve1,
            uint32 _blockTimestampLast
        )
    {
        _reserve0 = reserve0;
        _reserve1 = reserve1;
        _blockTimestampLast = blockTimestampLast;
    }

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

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

    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, "initialize: FORBIDDEN"); // sufficient check
        token0 = _token0;
        token1 = _token1;
    }

    // update reserves and, on the first call per block, price accumulators
    function _update(
        uint256 balance0,
        uint256 balance1,
        uint112 _reserve0,
        uint112 _reserve1
    ) private {
        require(
            balance0 <= uint112(-1) && balance1 <= uint112(-1),
            "_update: OVERFLOW"
        );
        uint32 blockTimestamp = uint32(block.timestamp % 2**32);
        uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
        if (timeElapsed > 0 && _reserve0 != 0 && _reserve1 != 0) {
            // * never overflows, and + overflow is desired
            price0CumulativeLast +=
                uint256(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) *
                timeElapsed;
            price1CumulativeLast +=
                uint256(UQ112x112.encode(_reserve0).uqdiv(_reserve1)) *
                timeElapsed;
        }
        reserve0 = uint112(balance0);
        reserve1 = uint112(balance1);
        blockTimestampLast = blockTimestamp;
        emit Sync(reserve0, reserve1);
    }

    // if fee is on, mint liquidity equivalent to 1/6th of the growth in sqrt(k)
    function _mintFee(uint112 _reserve0, uint112 _reserve1)
        private
        returns (bool feeOn)
    {
        address feeTo = IFlareFactory(factory).feeTo();
        feeOn = feeTo != address(0);
        uint256 _kLast = kLast; // gas savings
        if (feeOn) {
            if (_kLast != 0) {
                uint256 rootK = Math.sqrt(uint256(_reserve0).mul(_reserve1));
                uint256 rootKLast = Math.sqrt(_kLast);
                if (rootK > rootKLast) {
                    uint256 numerator = totalSupply.mul(rootK.sub(rootKLast));
                    uint256 denominator = rootK.mul(5).add(rootKLast);
                    uint256 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 (uint256 liquidity) {
        (uint112 _reserve0, uint112 _reserve1, ) = getReserves(); // gas savings
        uint256 balance0 = IERC20Flare(token0).balanceOf(address(this));
        uint256 balance1 = IERC20Flare(token1).balanceOf(address(this));
        uint256 amount0 = balance0.sub(_reserve0);
        uint256 amount1 = balance1.sub(_reserve1);

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint256 _totalSupply = totalSupply; // gas savings, must be defined here since totalSupply can update in _mintFee
        if (_totalSupply == 0) {
            address migrator = IFlareFactory(factory).migrator();
            if (_msgSender() == migrator) {
                liquidity = IMigrator(migrator).desiredLiquidity();
                require(
                    liquidity > 0 && liquidity != uint256(-1),
                    "mint: Bad desired liquidity"
                );
            } else {
                require(migrator == address(0), "Must not have migrator");
                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, "mint: INSUFFICIENT_LIQUIDITY_MINTED");
        _mint(to, liquidity);

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint256(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Mint(_msgSender(), amount0, amount1);
    }

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

        bool feeOn = _mintFee(_reserve0, _reserve1);
        uint256 _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,
            "burn: INSUFFICIENT_LIQUIDITY_BURNED"
        );
        _burn(address(this), liquidity);
        _safeTransfer(_token0, to, amount0);
        _safeTransfer(_token1, to, amount1);
        balance0 = IERC20Flare(_token0).balanceOf(address(this));
        balance1 = IERC20Flare(_token1).balanceOf(address(this));

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint256(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Burn(_msgSender(), amount0, amount1, to);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external lock {
        require(
            amount0Out > 0 || amount1Out > 0,
            "swap: INSUFFICIENT_OUTPUT_AMOUNT"
        );
        SwapVariables memory vars = SwapVariables(0, 0, 0, 0, 0, 0);
        (vars._reserve0, vars._reserve1, ) = getReserves(); // gas savings
        require(
            amount0Out < vars._reserve0 && amount1Out < vars._reserve1,
            "swap: INSUFFICIENT_LIQUIDITY"
        );

        {
            // scope for _token{0,1}, avoids stack too deep errors
            address _token0 = token0;
            address _token1 = token1;
            require(to != _token0 && to != _token1, "swap: INVALID_TO");
            if (amount0Out > 0) _safeTransfer(_token0, to, amount0Out); // optimistically transfer tokens
            if (amount1Out > 0) _safeTransfer(_token1, to, amount1Out); // optimistically transfer tokens
            if (data.length > 0)
                IFlareCallee(to).uniswapV2Call(
                    _msgSender(),
                    amount0Out,
                    amount1Out,
                    data
                );
            vars.balance0 = IERC20Flare(_token0).balanceOf(address(this));
            vars.balance1 = IERC20Flare(_token1).balanceOf(address(this));
        }
        vars.amount0In = vars.balance0 > vars._reserve0 - amount0Out
            ? vars.balance0 - (vars._reserve0 - amount0Out)
            : 0;
        vars.amount1In = vars.balance1 > vars._reserve1 - amount1Out
            ? vars.balance1 - (vars._reserve1 - amount1Out)
            : 0;
        require(
            vars.amount0In > 0 || vars.amount1In > 0,
            "swap: INSUFFICIENT_INPUT_AMOUNT"
        );
        {
            // scope for reserve{0,1} - Adjusted, avoids stack too deep errors
            uint256 balance0Adjusted = vars.balance0.mul(10000).sub(
                vars.amount0In.mul(25)
            );
            uint256 balance1Adjusted = vars.balance1.mul(10000).sub(
                vars.amount1In.mul(25)
            );
            require(
                balance0Adjusted.mul(balance1Adjusted) >=
                    uint256(vars._reserve0).mul(vars._reserve1).mul(10000**2),
                "swap: K"
            );
        }

        _update(vars.balance0, vars.balance1, vars._reserve0, vars._reserve1);
        emit Swap(
            _msgSender(),
            vars.amount0In,
            vars.amount1In,
            amount0Out,
            amount1Out,
            to
        );
    }

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

    // force reserves to match balances
    function sync() external lock {
        _update(
            IERC20Flare(token0).balanceOf(address(this)),
            IERC20Flare(token1).balanceOf(address(this)),
            reserve0,
            reserve1
        );
    }
}

contract FlareFactory is IFlareFactory {
    bytes32 public constant INIT_CODE_PAIR_HASH =
        keccak256(abi.encodePacked(type(FlarePair).creationCode));

    address public override feeTo;
    address public override feeToSetter;
    address public override migrator;

    mapping(address => mapping(address => address)) public override getPair;
    address[] public override allPairs;

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

    constructor(address _feeToSetter) public {
        feeToSetter = _feeToSetter;
    }

    function allPairsLength() external view override returns (uint256) {
        return allPairs.length;
    }

    function createPair(address tokenA, address tokenB)
        external
        override
        returns (address pair)
    {
        require(tokenA != tokenB, "createPair: IDENTICAL_ADDRESSES");
        (address token0, address token1) = tokenA < tokenB
            ? (tokenA, tokenB)
            : (tokenB, tokenA);
        require(token0 != address(0), "createPair: ZERO_ADDRESS");
        require(
            getPair[token0][token1] == address(0),
            "createPair: PAIR_EXISTS"
        ); // single check is sufficient
        bytes memory bytecode = type(FlarePair).creationCode;
        bytes32 salt = keccak256(abi.encodePacked(token0, token1));
        assembly {
            pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }
        FlarePair(pair).initialize(token0, token1);
        getPair[token0][token1] = pair;
        getPair[token1][token0] = pair; // populate mapping in the reverse direction
        allPairs.push(pair);
        emit PairCreated(token0, token1, pair, allPairs.length);
    }

    function setFeeTo(address _feeTo) external override {
        require(msg.sender == feeToSetter, "setFeeTo: FORBIDDEN");
        feeTo = _feeTo;
    }

    function setMigrator(address _migrator) external override {
        require(msg.sender == feeToSetter, "setMigrator: FORBIDDEN");
        migrator = _migrator;
    }

    function setFeeToSetter(address _feeToSetter) external override {
        require(msg.sender == feeToSetter, "setFeeToSetter: FORBIDDEN");
        feeToSetter = _feeToSetter;
    }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"address","name":"pair","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"PairCreated","type":"event"},{"inputs":[],"name":"INIT_CODE_PAIR_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allPairs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allPairsLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"}],"name":"createPair","outputs":[{"internalType":"address","name":"pair","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeToSetter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"getPair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeToSetter","type":"address"}],"name":"setFeeToSetter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051613bf1380380613bf18339818101604052602081101561003357600080fd5b5051600180546001600160a01b0319166001600160a01b03909216919091179055613b8e806100636000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80635855a25a11610081578063c9c653961161005b578063c9c65396146101b6578063e6a43905146101f1578063f46901ed1461022c576100c9565b80635855a25a146101735780637cd07e471461017b578063a2e74af614610183576100c9565b80631e3dd18b116100b25780631e3dd18b1461010757806323cf311814610124578063574f2ba314610159576100c9565b8063017e7e58146100ce578063094b7415146100ff575b600080fd5b6100d661025f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6100d661027b565b6100d66004803603602081101561011d57600080fd5b5035610297565b6101576004803603602081101561013a57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166102cb565b005b610161610398565b60408051918252519081900360200190f35b61016161039e565b6100d661044f565b6101576004803603602081101561019957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661046b565b6100d6600480360360408110156101cc57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610538565b6100d66004803603604081101561020757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602001351661096c565b6101576004803603602081101561024257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661099f565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b600481815481106102a457fe5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60015473ffffffffffffffffffffffffffffffffffffffff16331461035157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f7365744d69677261746f723a20464f5242494444454e00000000000000000000604482015290519081900360640190fd5b600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60045490565b6040516103ad60208201610a6c565b6020820181038252601f19601f820116604052506040516020018082805190602001908083835b6020831061041157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016103d4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528051906020012081565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104f157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f736574466565546f5365747465723a20464f5242494444454e00000000000000604482015290519081900360640190fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156105d557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f637265617465506169723a204944454e544943414c5f41444452455353455300604482015290519081900360640190fd5b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1610610612578385610615565b84845b909250905073ffffffffffffffffffffffffffffffffffffffff821661069c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f637265617465506169723a205a45524f5f414444524553530000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526003602090815260408083208585168452909152902054161561073d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f637265617465506169723a20504149525f455849535453000000000000000000604482015290519081900360640190fd5b60606040518060200161074f90610a6c565b6020820181038252601f19601f82011660405250905060008383604051602001808373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140192505050604051602081830303815290604052805190602001209050808251602084016000f594508473ffffffffffffffffffffffffffffffffffffffff1663485cc95585856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561085d57600080fd5b505af1158015610871573d6000803e3d6000fd5b5050505073ffffffffffffffffffffffffffffffffffffffff84811660008181526003602081815260408084208987168086529083528185208054978d167fffffffffffffffffffffffff000000000000000000000000000000000000000098891681179091559383528185208686528352818520805488168517905560048054600181018255958190527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b90950180549097168417909655925483519283529082015281517f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9929181900390910190a35050505092915050565b600360209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a2557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f736574466565546f3a20464f5242494444454e00000000000000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6130df80610a7a8339019056fe60806040526001600c5534801561001557600080fd5b50604080518082018252600e81526d233630b932902628102a37b5b2b760911b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f7818410b011e19364f46fc37d130d00300413fdc94f64da78f119382b468d753818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c09091019092528151910120600355600580546001600160a01b03191633179055612fd38061010c6000396000f3fe608060405234801561001057600080fd5b50600436106101b95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a7146105da578063d505accf146105e2578063dd62ed3e14610640578063fff6cae91461067b576101b9565b8063ba9a7a5614610597578063bc25cf771461059f578063c45a0155146105d2576101b9565b80637ecebe00116100d35780637ecebe00146104d757806389afcb441461050a57806395d89b4114610556578063a9059cbb1461055e576101b9565b80636a6278421461046957806370a082311461049c5780637464fc3d146104cf576101b9565b806323b872dd116101665780633644e515116101405780633644e51514610416578063485cc9551461041e5780635909c0d5146104595780635a3d549314610461576101b9565b806323b872dd146103ad57806330adf81f146103f0578063313ce567146103f8576101b9565b8063095ea7b311610197578063095ea7b3146103155780630dfe16811461036257806318160ddd14610393576101b9565b8063022c0d9f146101be57806306fdde03146102595780630902f1ac146102d6575b600080fd5b610257600480360360808110156101d457600080fd5b81359160208101359173ffffffffffffffffffffffffffffffffffffffff604083013516919081019060808101606082013564010000000081111561021857600080fd5b82018360208201111561022a57600080fd5b8035906020019184600183028401116401000000008311171561024c57600080fd5b509092509050610683565b005b610261610e75565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029b578181015183820152602001610283565b50505050905090810190601f1680156102c85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102de610eae565b604080516dffffffffffffffffffffffffffff948516815292909316602083015263ffffffff168183015290519081900360600190f35b61034e6004803603604081101561032b57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610f03565b604080519115158252519081900360200190f35b61036a610f21565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61039b610f3d565b60408051918252519081900360200190f35b61034e600480360360608110156103c357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060400135610f43565b61039b61109f565b6104006110c3565b6040805160ff9092168252519081900360200190f35b61039b6110c8565b6102576004803603604081101561043457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166110ce565b61039b6111a7565b61039b6111ad565b61039b6004803603602081101561047f57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111b3565b61039b600480360360208110156104b257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117d7565b61039b6117e9565b61039b600480360360208110156104ed57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166117ef565b61053d6004803603602081101561052057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611801565b6040805192835260208301919091528051918290030190f35b610261611cab565b61034e6004803603604081101561057457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135611ce4565b61039b611cf8565b610257600480360360208110156105b557600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611cfe565b61036a611eeb565b61036a611f07565b610257600480360360e08110156105f857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611f23565b61039b6004803603604081101561065657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813581169160200135166121ef565b61025761220c565b600c546001146106f457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6c6f636b3a204c4f434b45440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000600c55841515806107075750600084115b61077257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f737761703a20494e53554646494349454e545f4f55545055545f414d4f554e54604482015290519081900360640190fd5b61077a612f01565b6040518060c0016040528060006dffffffffffffffffffffffffffff16815260200160006dffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090506107d7610eae565b506dffffffffffffffffffffffffffff90811660208401521680825286108015610814575080602001516dffffffffffffffffffffffffffff1685105b61087f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f737761703a20494e53554646494349454e545f4c495155494449545900000000604482015290519081900360640190fd5b60065460075473ffffffffffffffffffffffffffffffffffffffff9182169190811690861682148015906108df57508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614155b61094a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f737761703a20494e56414c49445f544f00000000000000000000000000000000604482015290519081900360640190fd5b871561095b5761095b82878a6123f2565b861561096c5761096c8187896123f2565b8315610a3f578573ffffffffffffffffffffffffffffffffffffffff166310d1e85c6109966125ff565b8a8a89896040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b158015610a2657600080fd5b505af1158015610a3a573d6000803e3d6000fd5b505050505b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8416916370a08231916024808301926020929190829003018186803b158015610aab57600080fd5b505afa158015610abf573d6000803e3d6000fd5b505050506040513d6020811015610ad557600080fd5b505160408085019190915280517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8316916370a08231916024808301926020929190829003018186803b158015610b4a57600080fd5b505afa158015610b5e573d6000803e3d6000fd5b505050506040513d6020811015610b7457600080fd5b505160608401525050805160408201516dffffffffffffffffffffffffffff90911687900310610ba5576000610bc3565b8581600001516dffffffffffffffffffffffffffff16038160400151035b8160800181815250508481602001516dffffffffffffffffffffffffffff1603816060015111610bf4576000610c12565b8481602001516dffffffffffffffffffffffffffff16038160600151035b60a08201526080810151151580610c2d575060008160a00151115b610c9857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f737761703a20494e53554646494349454e545f494e5055545f414d4f554e5400604482015290519081900360640190fd5b6000610ccc610cb56019846080015161260390919063ffffffff16565b6040840151610cc690612710612603565b90612689565b90506000610cfc610ceb60198560a0015161260390919063ffffffff16565b6060850151610cc690612710612603565b9050610d476305f5e100610d4185602001516dffffffffffffffffffffffffffff1686600001516dffffffffffffffffffffffffffff1661260390919063ffffffff16565b90612603565b610d518383612603565b1015610dbe57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f737761703a204b00000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b5050610ddc81604001518260600151836000015184602001516126fb565b8373ffffffffffffffffffffffffffffffffffffffff16610dfb6125ff565b73ffffffffffffffffffffffffffffffffffffffff167fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d82283608001518460a001518a8a6040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506001600c5550505050565b6040518060400160405280600e81526020017f466c617265204c5020546f6b656e00000000000000000000000000000000000081525081565b6008546dffffffffffffffffffffffffffff808216926e0100000000000000000000000000008304909116917c0100000000000000000000000000000000000000000000000000000000900463ffffffff1690565b6000610f17610f106125ff565b84846129b1565b5060015b92915050565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60005481565b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9082610f936125ff565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541461108a5773ffffffffffffffffffffffffffffffffffffffff84166000908152600260205260408120611034918491906110076125ff565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205490612689565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600260205260408120906110626125ff565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020555b611095848484612a20565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b601281565b60035481565b60055473ffffffffffffffffffffffffffffffffffffffff16331461115457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e697469616c697a653a20464f5242494444454e0000000000000000000000604482015290519081900360640190fd5b6006805473ffffffffffffffffffffffffffffffffffffffff9384167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915560078054929093169116179055565b60095481565b600a5481565b6000600c5460011461122657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6c6f636b3a204c4f434b45440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611236610eae565b50600654604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905193955091935060009273ffffffffffffffffffffffffffffffffffffffff909116916370a08231916024808301926020929190829003018186803b1580156112b057600080fd5b505afa1580156112c4573d6000803e3d6000fd5b505050506040513d60208110156112da57600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905192935060009273ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b15801561135357600080fd5b505afa158015611367573d6000803e3d6000fd5b505050506040513d602081101561137d57600080fd5b50519050600061139d836dffffffffffffffffffffffffffff8716612689565b905060006113bb836dffffffffffffffffffffffffffff8716612689565b905060006113c98787612af5565b6000549091508061166b57600554604080517f7cd07e47000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691637cd07e47916004808301926020929190829003018186803b15801561143f57600080fd5b505afa158015611453573d6000803e3d6000fd5b505050506040513d602081101561146957600080fd5b5051905073ffffffffffffffffffffffffffffffffffffffff811661148c6125ff565b73ffffffffffffffffffffffffffffffffffffffff1614156115bb578073ffffffffffffffffffffffffffffffffffffffff166340dc0e376040518163ffffffff1660e01b815260040160206040518083038186803b1580156114ee57600080fd5b505afa158015611502573d6000803e3d6000fd5b505050506040513d602081101561151857600080fd5b50519950891580159061154b57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8a14155b6115b657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d696e743a204261642064657369726564206c69717569646974790000000000604482015290519081900360640190fd5b611665565b73ffffffffffffffffffffffffffffffffffffffff81161561163e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d757374206e6f742068617665206d69677261746f7200000000000000000000604482015290519081900360640190fd5b6116566103e8610cc66116518888612603565b612c63565b995061166560006103e8612cb5565b506116bc565b6116b96dffffffffffffffffffffffffffff89166116898684612603565b8161169057fe5b046dffffffffffffffffffffffffffff89166116ac8685612603565b816116b357fe5b04612d59565b98505b60008911611715576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f586023913960400191505060405180910390fd5b61171f8a8a612cb5565b61172b86868a8a6126fb565b811561176757600854611763906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416612603565b600b555b61176f6125ff565b73ffffffffffffffffffffffffffffffffffffffff167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f8585604051808381526020018281526020019250505060405180910390a250506001600c5550949695505050505050565b60016020526000908152604090205481565b600b5481565b60046020526000908152604090205481565b600080600c5460011461187557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6c6f636b3a204c4f434b45440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000600c81905580611885610eae565b50600654600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905194965092945073ffffffffffffffffffffffffffffffffffffffff9182169391169160009184916370a08231916024808301926020929190829003018186803b15801561190757600080fd5b505afa15801561191b573d6000803e3d6000fd5b505050506040513d602081101561193157600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191925060009173ffffffffffffffffffffffffffffffffffffffff8516916370a08231916024808301926020929190829003018186803b1580156119a557600080fd5b505afa1580156119b9573d6000803e3d6000fd5b505050506040513d60208110156119cf57600080fd5b5051306000908152600160205260408120549192506119ee8888612af5565b600054909150806119ff8487612603565b81611a0657fe5b049a5080611a148486612603565b81611a1b57fe5b04995060008b118015611a2e575060008a115b611a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612f7b6023913960400191505060405180910390fd5b611a8d3084612d71565b611a98878d8d6123f2565b611aa3868d8c6123f2565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff8916916370a08231916024808301926020929190829003018186803b158015611b0f57600080fd5b505afa158015611b23573d6000803e3d6000fd5b505050506040513d6020811015611b3957600080fd5b5051604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191965073ffffffffffffffffffffffffffffffffffffffff8816916370a0823191602480820192602092909190829003018186803b158015611bab57600080fd5b505afa158015611bbf573d6000803e3d6000fd5b505050506040513d6020811015611bd557600080fd5b50519350611be585858b8b6126fb565b8115611c2157600854611c1d906dffffffffffffffffffffffffffff808216916e010000000000000000000000000000900416612603565b600b555b8b73ffffffffffffffffffffffffffffffffffffffff16611c406125ff565b73ffffffffffffffffffffffffffffffffffffffff167fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d819364968d8d604051808381526020018281526020019250505060405180910390a35050505050505050506001600c81905550915091565b6040518060400160405280600381526020017f464c50000000000000000000000000000000000000000000000000000000000081525081565b6000610f17611cf16125ff565b8484612a20565b6103e881565b600c54600114611d6f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6c6f636b3a204c4f434b45440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654600754600854604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff9485169490931692611e459285928792611e40926dffffffffffffffffffffffffffff169185916370a0823191602480820192602092909190829003018186803b158015611e0e57600080fd5b505afa158015611e22573d6000803e3d6000fd5b505050506040513d6020811015611e3857600080fd5b505190612689565b6123f2565b611ee18184611e406008600e9054906101000a90046dffffffffffffffffffffffffffff166dffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611e0e57600080fd5b50506001600c5550565b60055473ffffffffffffffffffffffffffffffffffffffff1681565b60075473ffffffffffffffffffffffffffffffffffffffff1681565b42841015611f9257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7065726d69743a20455850495245440000000000000000000000000000000000604482015290519081900360640190fd5b60035473ffffffffffffffffffffffffffffffffffffffff80891660008181526004602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958d166060860152608085018c905260a085019590955260c08085018b90528151808603909101815260e0850182528051908301207f19010000000000000000000000000000000000000000000000000000000000006101008601526101028501969096526101228085019690965280518085039096018652610142840180825286519683019690962095839052610162840180825286905260ff89166101828501526101a284018890526101c28401879052519193926101e2808201937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081019281900390910190855afa1580156120f3573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81161580159061216e57508873ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16145b6121d957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f7065726d69743a20494e56414c49445f5349474e415455524500000000000000604482015290519081900360640190fd5b6121e48989896129b1565b505050505050505050565b600260209081526000928352604080842090915290825290205481565b600c5460011461227d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6c6f636b3a204c4f434b45440000000000000000000000000000000000000000604482015290519081900360640190fd5b6000600c55600654604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516123eb9273ffffffffffffffffffffffffffffffffffffffff16916370a08231916024808301926020929190829003018186803b1580156122f457600080fd5b505afa158015612308573d6000803e3d6000fd5b505050506040513d602081101561231e57600080fd5b5051600754604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff909216916370a0823191602480820192602092909190829003018186803b15801561239157600080fd5b505afa1580156123a5573d6000803e3d6000fd5b505050506040513d60208110156123bb57600080fd5b50516008546dffffffffffffffffffffffffffff808216916e0100000000000000000000000000009004166126fb565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e743235362900000000000000602091820152815173ffffffffffffffffffffffffffffffffffffffff85811660248301526044808301869052845180840390910181526064909201845291810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001781529251815160009460609489169392918291908083835b602083106124f857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016124bb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461255a576040519150601f19603f3d011682016040523d82523d6000602084013e61255f565b606091505b509150915081801561258d57508051158061258d575080806020019051602081101561258a57600080fd5b50515b6125f857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5f736166655472616e736665723a205452414e534645525f4641494c45440000604482015290519081900360640190fd5b5050505050565b3390565b600081158061261e5750508082028282828161261b57fe5b04145b610f1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b80820382811115610f1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b6dffffffffffffffffffffffffffff841180159061272757506dffffffffffffffffffffffffffff8311155b61279257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f5f7570646174653a204f564552464c4f57000000000000000000000000000000604482015290519081900360640190fd5b60085463ffffffff428116917c0100000000000000000000000000000000000000000000000000000000900481168203908116158015906127e257506dffffffffffffffffffffffffffff841615155b80156127fd57506dffffffffffffffffffffffffffff831615155b156128a7578063ffffffff1661283a8561281686612e2a565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690612e4e565b600980547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff929092169290920201905563ffffffff811661287a8461281687612e2a565b600a80547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff92909216929092020190555b600880547fffffffffffffffffffffffffffffffffffff0000000000000000000000000000166dffffffffffffffffffffffffffff888116919091177fffffffff0000000000000000000000000000ffffffffffffffffffffffffffff166e0100000000000000000000000000008883168102919091177bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000063ffffffff871602179283905560408051848416815291909304909116602082015281517f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1929181900390910190a1505050505050565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902054612a509082612689565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054612a8c9082612e8f565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600080600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b158015612b6057600080fd5b505afa158015612b74573d6000803e3d6000fd5b505050506040513d6020811015612b8a57600080fd5b5051600b5473ffffffffffffffffffffffffffffffffffffffff8216158015945091925090612c4f578015612c4a576000612bdb6116516dffffffffffffffffffffffffffff888116908816612603565b90506000612be883612c63565b905080821115612c47576000612c0a612c018484612689565b60005490612603565b90506000612c2383612c1d866005612603565b90612e8f565b90506000818381612c3057fe5b0490508015612c4357612c438782612cb5565b5050505b50505b612c5b565b8015612c5b576000600b555b505092915050565b60006003821115612ca6575080600160028204015b81811015612ca057809150600281828581612c8f57fe5b040181612c9857fe5b049050612c78565b50612cb0565b8115612cb0575060015b919050565b600054612cc29082612e8f565b600090815573ffffffffffffffffffffffffffffffffffffffff8316815260016020526040902054612cf49082612e8f565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000818310612d685781612d6a565b825b9392505050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260016020526040902054612da19082612689565b73ffffffffffffffffffffffffffffffffffffffff831660009081526001602052604081209190915554612dd59082612689565b600090815560408051838152905173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef919081900360200190a35050565b6dffffffffffffffffffffffffffff166e0100000000000000000000000000000290565b60006dffffffffffffffffffffffffffff82167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff841681612e8757fe5b049392505050565b80820182811015610f1b57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b6040518060c0016040528060006dffffffffffffffffffffffffffff16815260200160006dffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152509056fe6d696e743a20494e53554646494349454e545f4c49515549444954595f4d494e5445446275726e3a20494e53554646494349454e545f4c49515549444954595f4255524e4544a2646970667358221220a31f2611160b604f675cd3085a6213d4cb5fc4d53c7b07b175e9279d89bc2ccb64736f6c634300060c0033a2646970667358221220531dc690e1b80363bf624e499a9a08f467d5549ec09e2257bae5d0174ffcbc0f64736f6c634300060c0033000000000000000000000000570826a757ef990c85b8cfc02be1dda410f06862

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

000000000000000000000000570826a757ef990c85b8cfc02be1dda410f06862

-----Decoded View---------------
Arg [0] : _feeToSetter (address): 0x570826a757ef990c85b8cfc02be1dda410f06862

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000570826a757ef990c85b8cfc02be1dda410f06862


Deployed ByteCode Sourcemap

19635:2349:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19802:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;19838:35;;;:::i;19999:34::-;;;;;;;;;;;;;;;;-1:-1:-1;19999:34:0;;:::i;21622:168::-;;;;;;;;;;;;;;;;-1:-1:-1;21622:168:0;;;;:::i;:::-;;20276:108;;;:::i;:::-;;;;;;;;;;;;;;;;19681:112;;;:::i;19880:32::-;;;:::i;21798:183::-;;;;;;;;;;;;;;;;-1:-1:-1;21798:183:0;;;;:::i;20392:1061::-;;;;;;;;;;;;;;;;-1:-1:-1;20392:1061:0;;;;;;;;;;;:::i;19921:71::-;;;;;;;;;;;;;;;;-1:-1:-1;19921:71:0;;;;;;;;;;;:::i;21461:153::-;;;;;;;;;;;;;;;;-1:-1:-1;21461:153:0;;;;:::i;19802:29::-;;;;;;:::o;19838:35::-;;;;;;:::o;19999:34::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;19999:34:0;:::o;21622:168::-;21713:11;;;;21699:10;:25;21691:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21762:8;:20;;;;;;;;;;;;;;;21622:168::o;20276:108::-;20361:8;:15;20276:108;:::o;19681:112::-;19763:28;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;19746:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19736:57;;;;;;19681:112;:::o;19880:32::-;;;;;;:::o;21798:183::-;21895:11;;;;21881:10;:25;21873:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21947:11;:26;;;;;;;;;;;;;;;21798:183::o;20392:1061::-;20498:12;20546:6;20536:16;;:6;:16;;;;20528:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20600:14;20616;20643:6;20634:15;;:6;:15;;;:79;;20698:6;20706;20634:79;;;20666:6;20674;20634:79;20599:114;;-1:-1:-1;20599:114:0;-1:-1:-1;20732:20:0;;;20724:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20814:37;:15;;;20849:1;20814:15;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:37;20792:110;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20943:21;20967:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;20943:52;;21006:12;21048:6;21056;21031:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21021:43;;;;;;21006:58;;21154:4;21143:8;21137:15;21132:2;21122:8;21118:17;21115:1;21107:52;21099:60;;21190:4;21180:26;;;21207:6;21215;21180:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;21233:15:0;;;;;;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:30;;;;;;;;;;;;;;21274:15;;;;;;:23;;;;;;;;:30;;;;;;;;21360:8;:19;;-1:-1:-1;21360:19:0;;;;;;;;;;;;;;;;;;;;;;21429:15;;21395:50;;;;;;;;;;;;;;;;;;;;;;20392:1061;;;;;;;;:::o;19921:71::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;21461:153::-;21546:11;;;;21532:10;:25;21524:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21592:5;:14;;;;;;;;;;;;;;;21461:153::o;-1:-1:-1:-;;;;;;;;:::o

Swarm Source

ipfs://531dc690e1b80363bf624e499a9a08f467d5549ec09e2257bae5d0174ffcbc0f
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.