Contract 0x733A9D1585f2d14c77b49d39BC7d7dd14CdA4aa5 1

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xcaa15d127395886c8ff431f67b907a0e22a906487a48414b461d0cc538a42a090x6080604069529402021-05-19 17:54:26364 days 21 hrs agoPaintSwap Finance: Deployer IN  Contract Creation0 FTM0.236184682
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xbe35ab573fc8d0040358f13da5f022adb34bfe02d6075d470ccf34e3cd86ade3379151002022-05-09 14:26:3810 days 39 mins ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x62d387454397823030942e738905903b11b734c5cee9c4274e9bb1dc6e328bb0378578882022-05-08 20:06:5410 days 18 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x6e7c5dd86814eeca0cf943dc954b08ce6e5f65e191dfe56a7de77049dd4e54c7376009092022-05-05 9:42:4714 days 5 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x124610048910b68faecfff90cf5de27b25e5cb55644601aeb861880657890f74371621672022-04-28 19:03:1820 days 20 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x6bf0872e3a4f71feee94da3e44741cf900bb656a29f9b657526621c2807a70fe356067472022-04-09 5:48:3440 days 9 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xea7929991a5256738babdf795c2cc93445362bc99f5bf79490bddbfd16b16d5f352289882022-04-04 17:31:5044 days 21 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x4dbcc5c6de66177e90725d13e84104177ae24d23b9f3d61428f326bd1941f309349379822022-04-01 5:55:4148 days 9 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x37eed12136097fc145c0a345afe6c905d32a31c90101eb044b61a0458a4891b3339938532022-03-21 6:03:0959 days 9 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x4b54121aae539ab63ff86b92cb1d68cb260d1c8e108f6bbfaed786e35621efda337172652022-03-18 3:17:5362 days 11 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xcde1cb877d6047237020ba11c7f81e5500152e26e8601ef256103b96534b0932337163782022-03-18 3:04:1162 days 12 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xc32ee938d007138b39b7a2b981141481d791141050b96cf9b27c3a82fdb03f08329712862022-03-09 15:00:2971 days 5 mins ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xbb4bd22d72f005db4fe1d7b15a29a0e099a6eb5e19dc7f2872a353c5c9e9fe4f314047382022-02-19 8:13:1689 days 6 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xa1d39d607932af7d111e28948e069ecc30376273a67ab3113095c5c36bd1d8bd313537892022-02-18 19:41:0289 days 19 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x581bc59689c00b0ac9e6227103a0baa2e828683c84762177726afc915c614f39312827402022-02-18 1:32:3690 days 13 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xa71987e4239286c2686bd3ba6fb73461faba6a7f744308f6bd7d61429c912d8a306031162022-02-11 2:16:1097 days 12 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x48741158ebb83fa4074f2f67d548d3bbabbcbab9324e1759ad953494905e99f2303598862022-02-08 12:52:25100 days 2 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xa27b3e36dc363dc27b2c110374dac68e7f19e6492c39e9b448c873cc78160bb0303006842022-02-07 20:49:15100 days 18 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xcfc3980b1e836733063c6fe0eec3b0b3bc8309a8bd46455465891d3c8a57baa9302906802022-02-07 18:12:22100 days 20 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x3d5b49b324dc32cb4c3a5b8d6643d7b514b002761939b12b78fd7935851b7ce3301802362022-02-06 14:49:08102 days 17 mins ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x8e8c394c1afd72b0e7e17ccdebd8256716d35161824865adfc8cfdc7847df8ee290902472022-01-26 10:02:51113 days 5 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xce88b347f7df6723416e2497c92831b696d69cea85e46aa56f8be381ae4b3c7d288113742022-01-23 10:38:01116 days 4 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xd5022f3423f6325b13b69354b79d963e11d425015284af37950c562ffec67a93287621702022-01-22 22:13:39116 days 16 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x6d78de8fde173cbc0fd7088b418b5dead960638c95b69e718d24b57265570426287621172022-01-22 22:12:55116 days 16 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0x7e8a850830ffb57b4249d8e8ae28783ee635b03d600be67330d5cd9ce148259d280300752022-01-15 11:13:50124 days 3 hrs ago PaintSwap: Paint Factory  Contract Creation0 FTM
0xb5638f434c02d4f4237a6a13bb633a5a857f5d745efa47f285adf98ea65a4d33256190212021-12-21 14:59:37149 days 6 mins ago PaintSwap: Paint Factory  Contract Creation0 FTM
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xca372e4c5fe66126e3f17c414a521346a7aabe12

Contract Name:
PaintFactory

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at FtmScan.com on 2021-05-17
*/

// SPDX-License-Identifier: GPL-3.0-or-later OR MIT
pragma solidity >=0.8.0 <0.9.0;


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

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

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

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

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

    function locked() external view returns (bool);
    function setLocked(bool) external;
}


interface IPancakePair {

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

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

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

    function initialize(address, address) external;
}

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


/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}


contract PancakeERC20 is IPancakeERC20 {
    using SafeMath for uint;

    string public constant override name = 'Paint LPs';
    string public constant override symbol = 'BRUSH-LP';
    uint8 public constant override decimals = 18;
    uint  public override totalSupply;
    mapping(address => uint) public override balanceOf;
    mapping(address => mapping(address => uint)) public override allowance;

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

    constructor() {
        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'),
                keccak256(bytes(name)),
                keccak256(bytes('1')),
                block.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 override returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

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

    function transferFrom(address from, address to, uint value) external override returns (bool) {
        if (allowance[from][msg.sender] != type(uint).max) {
            allowance[from][msg.sender] = allowance[from][msg.sender].sub(value);
        }
        _transfer(from, to, value);
        return true;
    }

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


// 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;
        }
    }
}


// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))

// range: [0, 2**112 - 1]
// resolution: 1 / 2**112

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 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);
}


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












contract PancakePair is IPancakePair, PancakeERC20 {
    using SafeMath  for uint;
    using UQ112x112 for uint224;

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

    address public override factory;
    address public override token0;
    address public override 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

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

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

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

    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))), 'Brush: TRANSFER_FAILED');
    }

    constructor() {
        factory = msg.sender;
    }

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

    // update reserves and, on the first call per block, price accumulators
    function _update(uint balance0, uint balance1, uint112 _reserve0, uint112 _reserve1) private {
        require(balance0 <= type(uint112).max && balance1 <= type(uint112).max, 'Brush: 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 += uint(UQ112x112.encode(_reserve1).uqdiv(_reserve0)) * timeElapsed;
            price1CumulativeLast += uint(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 = IPancakeFactory(factory).feeTo();
        feeOn = feeTo != address(0);
        uint _kLast = kLast; // gas savings
        if (feeOn) {
            if (_kLast != 0) {
                uint rootK = Math.sqrt(uint(_reserve0).mul(_reserve1));
                uint rootKLast = Math.sqrt(_kLast);
                if (rootK > rootKLast) {
                    uint numerator = totalSupply.mul(rootK.sub(rootKLast));
                    uint denominator = rootK.mul(5).add(rootKLast);
                    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 override 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, 'Brush: INSUFFICIENT_LIQUIDITY_MINTED');
        _mint(to, liquidity);

        _update(balance0, balance1, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(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 override 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, 'Brush: 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, _reserve0, _reserve1);
        if (feeOn) kLast = uint(reserve0).mul(reserve1); // reserve0 and reserve1 are up-to-date
        emit Burn(msg.sender, amount0, amount1, to);
    }

    // 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 override lock {
        require(amount0Out > 0 || amount1Out > 0, 'Brush: INSUFFICIENT_OUTPUT_AMOUNT');
        (uint112 _reserve0, uint112 _reserve1,) = getReserves(); // gas savings
        require(amount0Out < _reserve0 && amount1Out < _reserve1, 'Brush: INSUFFICIENT_LIQUIDITY');

        uint balance0;
        uint balance1;
        { // scope for _token{0,1}, avoids stack too deep errors
        address _token0 = token0;
        address _token1 = token1;
        require(to != _token0 && to != _token1, 'Brush: 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) IPancakeCallee(to).pancakeCall(msg.sender, amount0Out, amount1Out, data);
        balance0 = IERC20(_token0).balanceOf(address(this));
        balance1 = IERC20(_token1).balanceOf(address(this));
        }
        uint amount0In = balance0 > _reserve0 - amount0Out ? balance0 - (_reserve0 - amount0Out) : 0;
        uint amount1In = balance1 > _reserve1 - amount1Out ? balance1 - (_reserve1 - amount1Out) : 0;
        require(amount0In > 0 || amount1In > 0, 'Brush: INSUFFICIENT_INPUT_AMOUNT');
        { // scope for reserve{0,1}Adjusted, avoids stack too deep errors
        uint balance0Adjusted = balance0.mul(1000).sub(amount0In.mul(3));
        uint balance1Adjusted = balance1.mul(1000).sub(amount1In.mul(3));
        require(balance0Adjusted.mul(balance1Adjusted) >= uint(_reserve0).mul(_reserve1).mul(1000**2), 'Brush: K');
        }

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

    // force balances to match reserves
    function skim(address to) external override 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));
    }

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

contract PaintFactory is IPancakeFactory {
    bytes32 public constant INIT_CODE_PAIR_HASH = keccak256(abi.encodePacked(type(PancakePair).creationCode));

    address public override feeTo;
    address public override feeToSetter;
    bool public override locked;

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

    constructor(bool _locked) {
        locked = _locked;
    }

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

    function createPair(address tokenA, address tokenB) external override returns (address pair) {
        require(tokenA != tokenB, 'Brush: IDENTICAL_ADDRESSES');
        (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'Brush: ZERO_ADDRESS');
        require(getPair[token0][token1] == address(0), 'Brush: PAIR_EXISTS'); // single check is sufficient
        bytes memory bytecode = type(PancakePair).creationCode;
        bytes32 salt = keccak256(abi.encodePacked(token0, token1));
        assembly {
            pair := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }
        IPancakePair(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, 'Brush: FORBIDDEN');
        feeTo = _feeTo;
    }

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

    function setLocked(bool _locked) external override {
        require(msg.sender == feeToSetter, 'Brush: FORBIDDEN');
        locked = _locked;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bool","name":"_locked","type":"bool"}],"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":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"bool","name":"_locked","type":"bool"}],"name":"setLocked","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051612be1380380612be183398101604081905261002f91610050565b60018054911515600160a01b0260ff60a01b19909216919091179055610077565b600060208284031215610061578081fd5b81518015158114610070578182fd5b9392505050565b612b5b806100866000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80635855a25a116100715780635855a25a1461012b578063a2e74af614610133578063c9c6539614610146578063cf30901214610159578063e6a439051461017d578063f46901ed146101b157600080fd5b8063017e7e58146100ae578063094b7415146100de5780631e3dd18b146100f1578063211e28b614610104578063574f2ba314610119575b600080fd5b6000546100c1906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6001546100c1906001600160a01b031681565b6100c16100ff3660046106ae565b6101c4565b61011761011236600461068e565b6101ee565b005b6003545b6040519081526020016100d5565b61011d61023f565b61011761014136600461063b565b610289565b6100c161015436600461065c565b6102d5565b60015461016d90600160a01b900460ff1681565b60405190151581526020016100d5565b6100c161018b36600461065c565b60026020908152600092835260408084209091529082529020546001600160a01b031681565b6101176101bf36600461063b565b6105c6565b600381815481106101d457600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b031633146102215760405162461bcd60e51b8152600401610218906106ff565b60405180910390fd5b60018054911515600160a01b0260ff60a01b19909216919091179055565b60405161024e60208201610612565b601f1982820381018352601f90910116604081905261027091906020016106c6565b6040516020818303038152906040528051906020012081565b6001546001600160a01b031633146102b35760405162461bcd60e51b8152600401610218906106ff565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000816001600160a01b0316836001600160a01b031614156103395760405162461bcd60e51b815260206004820152601a60248201527f42727573683a204944454e544943414c5f4144445245535345530000000000006044820152606401610218565b600080836001600160a01b0316856001600160a01b03161061035c57838561035f565b84845b90925090506001600160a01b0382166103b05760405162461bcd60e51b815260206004820152601360248201527242727573683a205a45524f5f4144445245535360681b6044820152606401610218565b6001600160a01b0382811660009081526002602090815260408083208585168452909152902054161561041a5760405162461bcd60e51b815260206004820152601260248201527142727573683a20504149525f45584953545360701b6044820152606401610218565b60006040518060200161042c90610612565b601f1982820381018352601f9091011660408190526bffffffffffffffffffffffff19606086811b8216602084015285901b166034820152909150600090604801604051602081830303815290604052805190602001209050808251602084016000f560405163485cc95560e01b81526001600160a01b03868116600483015285811660248301529196509086169063485cc95590604401600060405180830381600087803b1580156104de57600080fd5b505af11580156104f2573d6000803e3d6000fd5b505050506001600160a01b0384811660008181526002602081815260408084208987168086529083528185208054978d166001600160a01b031998891681179091559383528185208686528352818520805488168517905560038054600181018255958190527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9095018054909716841790965592548351928352908201527f0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9910160405180910390a35050505092915050565b6001546001600160a01b031633146105f05760405162461bcd60e51b8152600401610218906106ff565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6123fc8061072a83390190565b80356001600160a01b038116811461063657600080fd5b919050565b60006020828403121561064c578081fd5b6106558261061f565b9392505050565b6000806040838503121561066e578081fd5b6106778361061f565b91506106856020840161061f565b90509250929050565b60006020828403121561069f578081fd5b81358015158114610655578182fd5b6000602082840312156106bf578081fd5b5035919050565b60008251815b818110156106e657602081860181015185830152016106cc565b818111156106f45782828501525b509190910192915050565b60208082526010908201526f21393ab9b41d102327a92124a22222a760811b60408201526060019056fe60806040526001600c5534801561001557600080fd5b5060408051808201825260098152685061696e74204c507360b81b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f918101919091527fb3b4c75f75300616097a8b7861f5785dae9fff96a574366d405793f9bb815c41918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160408051601f198184030181529190528051602090910120600355600580546001600160a01b031916331790556122ef8061010d6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80636a627842116100f9578063ba9a7a5611610097578063d21220a711610071578063d21220a714610409578063d505accf1461041c578063dd62ed3e1461042f578063fff6cae91461045a57600080fd5b8063ba9a7a56146103da578063bc25cf77146103e3578063c45a0155146103f657600080fd5b80637ecebe00116100d35780637ecebe001461035857806389afcb441461037857806395d89b41146103a0578063a9059cbb146103c757600080fd5b80636a6278421461031c57806370a082311461032f5780637464fc3d1461034f57600080fd5b806323b872dd116101665780633644e515116101405780633644e515146102ee578063485cc955146102f75780635909c0d51461030a5780635a3d54931461031357600080fd5b806323b872dd1461029a57806330adf81f146102ad578063313ce567146102d457600080fd5b8063022c0d9f146101ae57806306fdde03146101c35780630902f1ac14610201578063095ea7b3146102355780630dfe16811461025857806318160ddd14610283575b600080fd5b6101c16101bc366004611fe7565b610462565b005b6101eb604051806040016040528060098152602001685061696e74204c507360b81b81525081565b6040516101f891906120e0565b60405180910390f35b610209610964565b604080516001600160701b03948516815293909216602084015263ffffffff16908201526060016101f8565b610248610243366004611f84565b61098e565b60405190151581526020016101f8565b60065461026b906001600160a01b031681565b6040516001600160a01b0390911681526020016101f8565b61028c60005481565b6040519081526020016101f8565b6102486102a8366004611ecf565b6109a5565b61028c7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6102dc601281565b60405160ff90911681526020016101f8565b61028c60035481565b6101c1610305366004611e97565b610a39565b61028c60095481565b61028c600a5481565b61028c61032a366004611e5f565b610ab4565b61028c61033d366004611e5f565b60016020526000908152604090205481565b61028c600b5481565b61028c610366366004611e5f565b60046020526000908152604090205481565b61038b610386366004611e5f565b610d92565b604080519283526020830191909152016101f8565b6101eb60405180604001604052806008815260200167042525553482d4c560c41b81525081565b6102486103d5366004611f84565b61112f565b61028c6103e881565b6101c16103f1366004611e5f565b61113c565b60055461026b906001600160a01b031681565b60075461026b906001600160a01b031681565b6101c161042a366004611f0f565b61125f565b61028c61043d366004611e97565b600260209081526000928352604080842090915290825290205481565b6101c161146f565b600c5460011461048d5760405162461bcd60e51b815260040161048490612113565b60405180910390fd5b6000600c55841515806104a05750600084115b6104f65760405162461bcd60e51b815260206004820152602160248201527f42727573683a20494e53554646494349454e545f4f55545055545f414d4f554e6044820152601560fa1b6064820152608401610484565b600080610501610964565b5091509150816001600160701b0316871080156105265750806001600160701b031686105b6105725760405162461bcd60e51b815260206004820152601d60248201527f42727573683a20494e53554646494349454e545f4c49515549444954590000006044820152606401610484565b60065460075460009182916001600160a01b039182169190811690891682148015906105b05750806001600160a01b0316896001600160a01b031614155b6105f05760405162461bcd60e51b815260206004820152601160248201527042727573683a20494e56414c49445f544f60781b6044820152606401610484565b8a1561060157610601828a8d6115b1565b891561061257610612818a8c6115b1565b861561067f57604051634240040960e11b81526001600160a01b038a169063848008129061064c9033908f908f908e908e90600401612094565b600060405180830381600087803b15801561066657600080fd5b505af115801561067a573d6000803e3d6000fd5b505050505b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b1580156106be57600080fd5b505afa1580156106d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f69190611fcf565b6040516370a0823160e01b81523060048201529094506001600160a01b038216906370a082319060240160206040518083038186803b15801561073857600080fd5b505afa15801561074c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107709190611fcf565b92505050600089856001600160701b031661078b91906121da565b83116107985760006107b5565b6107ab8a6001600160701b0387166121da565b6107b590846121da565b905060006107cc8a6001600160701b0387166121da565b83116107d95760006107f6565b6107ec8a6001600160701b0387166121da565b6107f690846121da565b905060008211806108075750600081115b6108535760405162461bcd60e51b815260206004820181905260248201527f42727573683a20494e53554646494349454e545f494e5055545f414d4f554e546044820152606401610484565b60006108756108638460036116f5565b61086f876103e86116f5565b9061177b565b905060006108876108638460036116f5565b90506108ac620f42406108a66001600160701b038b8116908b166116f5565b906116f5565b6108b683836116f5565b10156108ef5760405162461bcd60e51b815260206004820152600860248201526742727573683a204b60c01b6044820152606401610484565b50506108fd848488886117bd565b60408051838152602081018390529081018c9052606081018b90526001600160a01b038a169033907fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229060800160405180910390a350506001600c55505050505050505050565b6008546001600160701b0380821692600160701b830490911691600160e01b900463ffffffff1690565b600061099b3384846119a5565b5060015b92915050565b6001600160a01b038316600090815260026020908152604080832033845290915281205460001914610a24576001600160a01b03841660009081526002602090815260408083203384529091529020546109ff908361177b565b6001600160a01b03851660009081526002602090815260408083203384529091529020555b610a2f848484611a07565b5060019392505050565b6005546001600160a01b03163314610a865760405162461bcd60e51b815260206004820152601060248201526f21393ab9b41d102327a92124a22222a760811b6044820152606401610484565b600680546001600160a01b039384166001600160a01b03199182161790915560078054929093169116179055565b6000600c54600114610ad85760405162461bcd60e51b815260040161048490612113565b6000600c81905580610ae8610964565b506006546040516370a0823160e01b81523060048201529294509092506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015610b3557600080fd5b505afa158015610b49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6d9190611fcf565b6007546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a082319060240160206040518083038186803b158015610bb657600080fd5b505afa158015610bca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bee9190611fcf565b90506000610c05836001600160701b03871661177b565b90506000610c1c836001600160701b03871661177b565b90506000610c2a8787611aad565b60005490915080610c6157610c4d6103e861086f610c4887876116f5565b611bf9565b9850610c5c60006103e8611c69565b610ca8565b610ca56001600160701b038916610c7886846116f5565b610c829190612178565b6001600160701b038916610c9686856116f5565b610ca09190612178565b611cf8565b98505b60008911610d045760405162461bcd60e51b8152602060048201526024808201527f42727573683a20494e53554646494349454e545f4c49515549444954595f4d496044820152631395115160e21b6064820152608401610484565b610d0e8a8a611c69565b610d1a86868a8a6117bd565b8115610d4457600854610d40906001600160701b0380821691600160701b9004166116f5565b600b555b604080518581526020810185905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a250506001600c5550949695505050505050565b600080600c54600114610db75760405162461bcd60e51b815260040161048490612113565b6000600c81905580610dc7610964565b506006546007546040516370a0823160e01b81523060048201529395509193506001600160a01b039081169291169060009083906370a082319060240160206040518083038186803b158015610e1c57600080fd5b505afa158015610e30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e549190611fcf565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a082319060240160206040518083038186803b158015610e9957600080fd5b505afa158015610ead573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed19190611fcf565b30600090815260016020526040812054919250610eee8888611aad565b60005490915080610eff84876116f5565b610f099190612178565b9a5080610f1684866116f5565b610f209190612178565b995060008b118015610f32575060008a115b610f8a5760405162461bcd60e51b8152602060048201526024808201527f42727573683a20494e53554646494349454e545f4c49515549444954595f42556044820152631493915160e21b6064820152608401610484565b610f943084611d0e565b610f9f878d8d6115b1565b610faa868d8c6115b1565b6040516370a0823160e01b81523060048201526001600160a01b038816906370a082319060240160206040518083038186803b158015610fe957600080fd5b505afa158015610ffd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110219190611fcf565b6040516370a0823160e01b81523060048201529095506001600160a01b038716906370a082319060240160206040518083038186803b15801561106357600080fd5b505afa158015611077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109b9190611fcf565b93506110a985858b8b6117bd565b81156110d3576008546110cf906001600160701b0380821691600160701b9004166116f5565b600b555b604080518c8152602081018c90526001600160a01b038e169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a35050505050505050506001600c81905550915091565b600061099b338484611a07565b600c5460011461115e5760405162461bcd60e51b815260040161048490612113565b6000600c556006546007546008546040516370a0823160e01b81523060048201526001600160a01b0393841693909216916112089184918691611203916001600160701b039091169084906370a08231906024015b60206040518083038186803b1580156111cb57600080fd5b505afa1580156111df573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086f9190611fcf565b6115b1565b6008546040516370a0823160e01b8152306004820152611255918391869161120391600160701b9091046001600160701b0316906001600160a01b038516906370a08231906024016111b3565b50506001600c5550565b428410156112a05760405162461bcd60e51b815260206004820152600e60248201526d109c9d5cda0e881156141254915160921b6044820152606401610484565b6003546001600160a01b038816600090815260046020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b9190876112f383612246565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e0016040516020818303038152906040528051906020012060405160200161136c92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa1580156113d7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061140d5750886001600160a01b0316816001600160a01b0316145b6114595760405162461bcd60e51b815260206004820152601860248201527f42727573683a20494e56414c49445f5349474e415455524500000000000000006044820152606401610484565b6114648989896119a5565b505050505050505050565b600c546001146114915760405162461bcd60e51b815260040161048490612113565b6000600c556006546040516370a0823160e01b81523060048201526115aa916001600160a01b0316906370a082319060240160206040518083038186803b1580156114db57600080fd5b505afa1580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115139190611fcf565b6007546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561155657600080fd5b505afa15801561156a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158e9190611fcf565b6008546001600160701b0380821691600160701b9004166117bd565b6001600c55565b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1790529151600092839287169161163d9190612078565b6000604051808303816000865af19150503d806000811461167a576040519150601f19603f3d011682016040523d82523d6000602084013e61167f565b606091505b50915091508180156116a95750805115806116a95750808060200190518101906116a99190611faf565b6116ee5760405162461bcd60e51b8152602060048201526016602482015275109c9d5cda0e881514905394d1915497d1905253115160521b6044820152606401610484565b5050505050565b6000826117045750600061099f565b600061171083856121bb565b90508261171d8583612178565b146117745760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610484565b9392505050565b600061177483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d98565b6001600160701b0384118015906117db57506001600160701b038311155b6118195760405162461bcd60e51b815260206004820152600f60248201526e42727573683a204f564552464c4f5760881b6044820152606401610484565b600061182a64010000000042612261565b60085490915060009061184a90600160e01b900463ffffffff16836121f1565b905060008163ffffffff1611801561186a57506001600160701b03841615155b801561187e57506001600160701b03831615155b1561190d578063ffffffff166118a68561189786611dd2565b6001600160e01b031690611deb565b6001600160e01b03166118b991906121bb565b600960008282546118ca919061213a565b909155505063ffffffff81166118e38461189787611dd2565b6001600160e01b03166118f691906121bb565b600a6000828254611907919061213a565b90915550505b6008805463ffffffff8416600160e01b026001600160e01b036001600160701b03898116600160701b9081026001600160e01b03199095168c83161794909417918216831794859055604080519382169282169290921783529290930490911660208201527f1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1910160405180910390a1505050505050565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316600090815260016020526040902054611a2a908261177b565b6001600160a01b038085166000908152600160205260408082209390935590841681522054611a599082611e00565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906119fa9085815260200190565b600080600560009054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b815260040160206040518083038186803b158015611afe57600080fd5b505afa158015611b12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b369190611e7b565b600b546001600160a01b038216158015945091925090611be5578015611be0576000611b71610c486001600160701b038881169088166116f5565b90506000611b7e83611bf9565b905080821115611bdd576000611ba0611b97848461177b565b600054906116f5565b90506000611bb983611bb38660056116f5565b90611e00565b90506000611bc78284612178565b90508015611bd957611bd98782611c69565b5050505b50505b611bf1565b8015611bf1576000600b555b505092915050565b60006003821115611c5a5750806000611c13600283612178565b611c1e90600161213a565b90505b81811015611c5457905080600281611c398186612178565b611c43919061213a565b611c4d9190612178565b9050611c21565b50919050565b8115611c64575060015b919050565b600054611c769082611e00565b60009081556001600160a01b038316815260016020526040902054611c9b9082611e00565b6001600160a01b0383166000818152600160205260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90611cec9085815260200190565b60405180910390a35050565b6000818310611d075781611774565b5090919050565b6001600160a01b038216600090815260016020526040902054611d31908261177b565b6001600160a01b03831660009081526001602052604081209190915554611d58908261177b565b60009081556040518281526001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001611cec565b60008184841115611dbc5760405162461bcd60e51b815260040161048491906120e0565b506000611dc984866121da565b95945050505050565b600061099f600160701b6001600160701b03841661218c565b60006117746001600160701b03831684612152565b600080611e0d838561213a565b9050838110156117745760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610484565b600060208284031215611e70578081fd5b8135611774816122a1565b600060208284031215611e8c578081fd5b8151611774816122a1565b60008060408385031215611ea9578081fd5b8235611eb4816122a1565b91506020830135611ec4816122a1565b809150509250929050565b600080600060608486031215611ee3578081fd5b8335611eee816122a1565b92506020840135611efe816122a1565b929592945050506040919091013590565b600080600080600080600060e0888a031215611f29578283fd5b8735611f34816122a1565b96506020880135611f44816122a1565b95506040880135945060608801359350608088013560ff81168114611f67578384fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215611f96578182fd5b8235611fa1816122a1565b946020939093013593505050565b600060208284031215611fc0578081fd5b81518015158114611774578182fd5b600060208284031215611fe0578081fd5b5051919050565b600080600080600060808688031215611ffe578081fd5b85359450602086013593506040860135612017816122a1565b9250606086013567ffffffffffffffff80821115612033578283fd5b818801915088601f830112612046578283fd5b813581811115612054578384fd5b896020828501011115612065578384fd5b9699959850939650602001949392505050565b6000825161208a818460208701612216565b9190910192915050565b60018060a01b038616815284602082015283604082015260806060820152816080820152818360a0830137600081830160a090810191909152601f909201601f19160101949350505050565b60208152600082518060208401526120ff816040850160208701612216565b601f01601f19169190910160400192915050565b6020808252600d908201526c109c9d5cda0e881313d0d2d151609a1b604082015260600190565b6000821982111561214d5761214d612275565b500190565b60006001600160e01b038381168061216c5761216c61228b565b92169190910492915050565b6000826121875761218761228b565b500490565b60006001600160e01b03828116848216811515828404821116156121b2576121b2612275565b02949350505050565b60008160001904831182151516156121d5576121d5612275565b500290565b6000828210156121ec576121ec612275565b500390565b600063ffffffff8381169083168181101561220e5761220e612275565b039392505050565b60005b83811015612231578181015183820152602001612219565b83811115612240576000848401525b50505050565b600060001982141561225a5761225a612275565b5060010190565b6000826122705761227061228b565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b03811681146122b657600080fd5b5056fea264697066735822122032cd1fd9ab30d67370e9d90abcddde38a728ba46793e81ce69cf7439cf00a98864736f6c63430008040033a2646970667358221220f7a8f38cc640d26f19c2248d0d1099b265c9802a786355f6f4c852828268a5ab64736f6c634300080400330000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode Sourcemap

23421:2037:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23583:29;;;;;-1:-1:-1;;;;;23583:29:0;;;;;;-1:-1:-1;;;;;2098:32:1;;;2080:51;;2068:2;2053:18;23583:29:0;;;;;;;;23619:35;;;;;-1:-1:-1;;;;;23619:35:0;;;23775:34;;;;;;:::i;:::-;;:::i;25304:151::-;;;;;;:::i;:::-;;:::i;:::-;;23887:105;23969:8;:15;23887:105;;;3068:25:1;;;3056:2;3041:18;23887:105:0;3023:76:1;23469:105:0;;;:::i;25122:174::-;;;;;;:::i;:::-;;:::i;24000:956::-;;;;;;:::i;:::-;;:::i;23661:27::-;;;;;-1:-1:-1;;;23661:27:0;;;;;;;;;2895:14:1;;2888:22;2870:41;;2858:2;2843:18;23661:27:0;2825:92:1;23697:71:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23697:71:0;;;24964:150;;;;;;:::i;:::-;;:::i;23775:34::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;23775:34:0;;-1:-1:-1;23775:34:0;:::o;25304:151::-;25388:11;;-1:-1:-1;;;;;25388:11:0;25374:10;:25;25366:54;;;;-1:-1:-1;;;25366:54:0;;;;;;;:::i;:::-;;;;;;;;;25431:6;:16;;;;;-1:-1:-1;;;25431:16:0;-1:-1:-1;;;;25431:16:0;;;;;;;;;25304:151::o;23469:105::-;23542:30;;;;;;;:::i;:::-;-1:-1:-1;;23542:30:0;;;;;;;;;;;;;;;;23525:48;;23542:30;;23525:48;;:::i;:::-;;;;;;;;;;;;;23515:59;;;;;;23469:105;:::o;25122:174::-;25219:11;;-1:-1:-1;;;;;25219:11:0;25205:10;:25;25197:54;;;;-1:-1:-1;;;25197:54:0;;;;;;;:::i;:::-;25262:11;:26;;-1:-1:-1;;;;;;25262:26:0;-1:-1:-1;;;;;25262:26:0;;;;;;;;;;25122:174::o;24000:956::-;24079:12;24122:6;-1:-1:-1;;;;;24112:16:0;:6;-1:-1:-1;;;;;24112:16:0;;;24104:55;;;;-1:-1:-1;;;24104:55:0;;3999:2:1;24104:55:0;;;3981:21:1;4038:2;4018:18;;;4011:30;4077:28;4057:18;;;4050:56;4123:18;;24104:55:0;3971:176:1;24104:55:0;24171:14;24187;24214:6;-1:-1:-1;;;;;24205:15:0;:6;-1:-1:-1;;;;;24205:15:0;;:53;;24243:6;24251;24205:53;;;24224:6;24232;24205:53;24170:88;;-1:-1:-1;24170:88:0;-1:-1:-1;;;;;;24277:20:0;;24269:52;;;;-1:-1:-1;;;24269:52:0;;3651:2:1;24269:52:0;;;3633:21:1;3690:2;3670:18;;;3663:30;-1:-1:-1;;;3709:18:1;;;3702:49;3768:18;;24269:52:0;3623:169:1;24269:52:0;-1:-1:-1;;;;;24340:15:0;;;24375:1;24340:15;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:37;24332:68;;;;-1:-1:-1;;;24332:68:0;;4354:2:1;24332:68:0;;;4336:21:1;4393:2;4373:18;;;4366:30;-1:-1:-1;;;4412:18:1;;;4405:48;4470:18;;24332:68:0;4326:168:1;24332:68:0;24441:21;24465:30;;;;;;;;:::i;:::-;-1:-1:-1;;24465:30:0;;;;;;;;;;;;;;;;-1:-1:-1;;1388:2:1;1384:15;;;1380:24;;24465:30:0;24531:32;;1368:37:1;1439:15;;;1435:24;1421:12;;;1414:46;24465:30:0;;-1:-1:-1;24506:12:0;;1476::1;;24531:32:0;;;;;;;;;;;;24521:43;;;;;;24506:58;;24654:4;24643:8;24637:15;24632:2;24622:8;24618:17;24615:1;24607:52;24680:45;;-1:-1:-1;;;24680:45:0;;-1:-1:-1;;;;;2372:15:1;;;24680:45:0;;;2354:34:1;2424:15;;;2404:18;;;2397:43;24599:60:0;;-1:-1:-1;24680:29:0;;;;;;2289:18:1;;24680:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;24736:15:0;;;;;;;:7;:15;;;;;;;;:23;;;;;;;;;;;;:30;;;;;-1:-1:-1;;;;;;24736:30:0;;;;;;;;24777:15;;;;;;:23;;;;;;;;:30;;;;;;;;24863:8;:19;;-1:-1:-1;24863:19:0;;;;;;;;;;;;;;;;;;;;;;24932:15;;24898:50;;2625:51:1;;;2692:18;;;2685:34;24898:50:0;;2598:18:1;24898:50:0;;;;;;;24000:956;;;;;;;;:::o;24964:150::-;25049:11;;-1:-1:-1;;;;;25049:11:0;25035:10;:25;25027:54;;;;-1:-1:-1;;;25027:54:0;;;;;;;:::i;:::-;25092:5;:14;;-1:-1:-1;;;;;;25092:14:0;-1:-1:-1;;;;;25092:14:0;;;;;;;;;;24964:150::o;-1:-1:-1:-;;;;;;;;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:196::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;325:6;317;310:22;272:2;353:29;372:9;353:29;:::i;:::-;343:39;262:126;-1:-1:-1;;;262:126:1:o;393:270::-;461:6;469;522:2;510:9;501:7;497:23;493:32;490:2;;;543:6;535;528:22;490:2;571:29;590:9;571:29;:::i;:::-;561:39;;619:38;653:2;642:9;638:18;619:38;:::i;:::-;609:48;;480:183;;;;;:::o;668:293::-;724:6;777:2;765:9;756:7;752:23;748:32;745:2;;;798:6;790;783:22;745:2;842:9;829:23;895:5;888:13;881:21;874:5;871:32;861:2;;922:6;914;907:22;966:190;1025:6;1078:2;1066:9;1057:7;1053:23;1049:32;1046:2;;;1099:6;1091;1084:22;1046:2;-1:-1:-1;1127:23:1;;1036:120;-1:-1:-1;1036:120:1:o;1499:430::-;1628:3;1666:6;1660:13;1691:3;1703:129;1717:6;1714:1;1711:13;1703:129;;;1815:4;1799:14;;;1795:25;;1789:32;1776:11;;;1769:53;1732:12;1703:129;;;1850:6;1847:1;1844:13;1841:2;;;1885:3;1876:6;1871:3;1867:16;1860:29;1841:2;-1:-1:-1;1907:16:1;;;;;1636:293;-1:-1:-1;;1636:293:1:o;3104:340::-;3306:2;3288:21;;;3345:2;3325:18;;;3318:30;-1:-1:-1;;;3379:2:1;3364:18;;3357:46;3435:2;3420:18;;3278:166::o

Swarm Source

ipfs://f7a8f38cc640d26f19c2248d0d1099b265c9802a786355f6f4c852828268a5ab
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.