Contract 0x3b3fdc40582a957206aed119842f2313de9ee21b

 

Contract Overview

Balance:
0 FTM

FTM Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x20b4eabadbba1a3040e2b9fc7a3e06395a3e048a378bf67531bea489b8dbf8c5Convert Multiple451703962022-08-18 13:44:041 min ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.007772105875
0x673362f758bb0a0c0502e89781e941052dea5473f5259540d5bbdebe91579a36Convert Multiple451702622022-08-18 13:41:344 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.00102381227
0xd4b069633593c52b44b88c63fee3c8c4a9868cf413dae3cd709dac5d7e2e5b21Convert Multiple451702612022-08-18 13:41:334 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.003387429319
0x7cf0fdf793d39e347cce09f32af369bb3ed2155365af5b1e8fce2fe36b0d3800Convert Multiple451702532022-08-18 13:41:254 mins ago0x5709aef3bb979242e199ce6ab97bf3fd5f5c4bd4 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.009085223476
0xf777641d17cd65849ff8a12baae8a1e15533043d5a8232489e75caf9c63cd813Convert Multiple451702212022-08-18 13:40:504 mins ago0x0000dac9091785d3cefe62fd02a4e08f1df825a7 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.003283500463
0x582a072dadadbc87060a35d494c52b005b62945979342e2083c7f79651cbc300Convert Multiple451701602022-08-18 13:39:425 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.00346825621
0x0ef4f1a8d56f48adf56df258a1d1eb7e1977a19672c7aee536c7a3b39ec91080Convert Multiple451701322022-08-18 13:39:136 mins ago0x5709aef3bb979242e199ce6ab97bf3fd5f5c4bd4 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.00556140773
0x318b7d36b072944eb08dcee100e4f0e77154dc87be9b603f2b292e3c54aa212eConvert Multiple451701282022-08-18 13:39:096 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.003478067323
0xd38b5bbf0378abd5c8e2a654d207c71df45efdec6f8c3fa14437af1c14e211c8Convert Multiple451700662022-08-18 13:38:027 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.004308579468
0x68db4400318b36939db8209d8d281a97b27466d39c35608f7c39413b5c1e275bConvert Multiple451700512022-08-18 13:37:357 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.0045671508
0x37e218c8c0e9bcd19ddae42ebf0390617082b6dfa51a96c045941adac2aaa545Convert Multiple451700332022-08-18 13:37:138 mins ago0x5709aef3bb979242e199ce6ab97bf3fd5f5c4bd4 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.008511783426
0xbd29c7bd20275852f4ef8394093bc5491eb1a1491b30f0479b9b60be6dfae9a1Convert Multiple451699172022-08-18 13:34:5710 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.004659064
0x36c1473b913082347a951ce776411ba2a72fd3deef3f3b46b723aa5e57d0de49Convert Multiple451699132022-08-18 13:34:5110 mins ago0x5709aef3bb979242e199ce6ab97bf3fd5f5c4bd4 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.005981291087
0x5cfbd558ae1b45a874f0974529eac2e9169b4ce492f12abd508c9c6f9012ef4fConvert Multiple451699052022-08-18 13:34:4310 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.004920375465
0xadd4acd2f447f9320fca9839680df1bda0d67f7dff5bf569b5cbee1030bb7cdcConvert Multiple451698572022-08-18 13:33:3711 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.0051884056
0xed1910dbe2082c2f1f208be568c66b9b3bed60c562c9d692d9f06e4ced6af6f0Convert Multiple451697492022-08-18 13:31:0514 mins ago0x000010868c18754e23dbd5d0860af0cbec86ab4f IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.006255286237
0xe87c26fcb1818ed81a1386091f1726f24ec8e6b576e0e2a381af51d85ae19468Convert Multiple451697462022-08-18 13:31:0214 mins ago0x0000dac9091785d3cefe62fd02a4e08f1df825a7 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.003230734957
0x5d37ff447214b30472f380129cd6fa5d122b7c03690643347d422bcb01455488Convert Multiple451697402022-08-18 13:30:5514 mins ago0x0000dac9091785d3cefe62fd02a4e08f1df825a7 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.00326688707
0x50e4bf27ddaa1b8f5e3222d807b397beb41b9817b8c2e1c7ab1c78a190cc9f61Convert Multiple451697342022-08-18 13:30:4914 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.002461526
0x521ae05238ed78512048658a13af05d4bd076bce076baf9710cfacb93497ef21Convert Multiple451697332022-08-18 13:30:4814 mins ago0x0000dac9091785d3cefe62fd02a4e08f1df825a7 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.003163974001
0xc5a6ca4dc3d4896a34e125d60bed56819f3870032ec3745bc0b565b2ec83cae5Convert Multiple451696932022-08-18 13:29:5415 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.023451391385
0x8a74b0962c5520236a7ecae02e94c21fefa0116cee724d608621a8f9cdc6555bConvert Multiple451696222022-08-18 13:27:5217 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.005234398325
0xa2b34c2fd2ba663ed468f99d92717bdce8c8180a33c117c2ec6670192d349955Convert Multiple451696052022-08-18 13:27:3118 mins ago0x67b3e508d0de379746192d12446e32e65e14f852 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.006030343075
0x6e3bd0de3e168b7a38a50b926dbf1f7df0f9070085fc2ef594eeae4691af1861Convert Multiple451694872022-08-18 13:25:0420 mins ago0x5be5d9b6924fc53769dbaf455bfe7fbea9c9d215 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.002853439459
0xdb6abc9a9cd1599ef4c645991710f42055a653718e5ab8698c9a9e8f80d1f076Convert Multiple451694652022-08-18 13:24:4020 mins ago0x5709aef3bb979242e199ce6ab97bf3fd5f5c4bd4 IN  0x3b3fdc40582a957206aed119842f2313de9ee21b0 FTM0.005217140959
[ Download CSV Export 
Latest 2 internal transactions
Parent Txn Hash Block From To Value
0x211e464fb2644b586bf8af00ef86622148638da1f4a107a0a5305a2d7ecb11d4367917982022-04-23 16:19:48116 days 21 hrs ago 0x3b3fdc40582a957206aed119842f2313de9ee21b  Contract Creation0 FTM
0x211e464fb2644b586bf8af00ef86622148638da1f4a107a0a5305a2d7ecb11d4367917982022-04-23 16:19:48116 days 21 hrs ago 0x4a14507784fecb4bbeadf5e8d34dc5cf5b7f22a7  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BrewBooV3

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : BrewBoo.sol
// SPDX-License-Identifier: MIT

// P1 - P3: OK
pragma solidity 0.8.13;

import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./Swapper.sol";

// BrewBoo is MasterChef's left hand and kinda a wizard. He can brew Boo from pretty much anything!
// This contract handles "serving up" rewards for xBoo holders by trading tokens collected from fees for Boo.
// The caller of convertMultiple, the function responsible for converting fees to BOO earns a 0.1% reward for calling.
contract BrewBooV3 is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    IUniswapV2Factory public immutable factory;
    ISwapper public immutable swapper;

    address public immutable xboo;
    address private immutable boo;
    address private immutable wftm;
    uint public devCut;  // in basis points aka parts per 10,000 so 5000 is 50%, cap of 50%, default is 0
    uint public constant BOUNTY_FEE = 10;
    address public devAddr;
    //uint public slippage = 9;

    // set of addresses that can perform certain functions
    mapping(address => bool) public isAuth;
    address[] public authorized;

    modifier onlyAuth() {
        require(isAuth[_msgSender()], "BrewBoo: FORBIDDEN");
        _;
    }

    // C6: It's not a fool proof solution, but it prevents flash loans, so here it's ok to use tx.origin
    modifier onlyEOA() {
        // Try to make flash-loan exploit harder to do by only allowing externally owned addresses.
        require(msg.sender == tx.origin, "BrewBoo: must use EOA");
        _;
    }

    mapping(address => uint) internal converted;
    mapping(address => bool) public overrode;
    mapping(address => bool) public swapperApproved;

    //token bridges to try in order when swapping, first three are immutably wftm, usdc, dai
    mapping(uint => address) public bridgeRoute;
    uint public bridgeRouteAmount = 3; // "array" size aka next free slot in the mapping
    mapping(address => address) public lastRoute; //tokens last succesful route, will be tried first

    mapping(address => mapping(address => address)) public pairOf;

    event SetDevAddr(address _addr);
    event SetDevCut(uint _amount);
    event LogBridgeSet(address indexed token, address indexed bridge);
    event LogConvert(
        address indexed server,
        address indexed token0,
        uint256 amount0,
        uint256 amountBOO
    );
    event LogToggleOverrode(address _adr);
    event LogSlippageOverrode(address _adr);

    constructor(
        address _factory,
        address _xboo,
        address _boo,
        address _wftm,
        address route1,
        address route2
    ) {
        factory = IUniswapV2Factory(_factory);
        xboo = _xboo;
        boo = _boo;
        wftm = _wftm;
        devAddr = msg.sender;
        isAuth[msg.sender] = true;
        authorized.push(msg.sender);
        bridgeRoute[0] = _wftm;
        bridgeRoute[1] = route1;
        bridgeRoute[2] = route2;
        swapper = new Swapper();
    }

    function setBridgeRoute(uint index, address token) external onlyAuth {
        require(index > 2, "first 3 bridge tokens are immutable");
        require(index <= bridgeRouteAmount, "index too large, use next free slot");

        bridgeRoute[index] = token;
        if(index == bridgeRouteAmount)
            bridgeRouteAmount += 1;
    }

    function setBridgeRouteAmount(uint amount) external onlyAuth {
        require(amount > 2);
        bridgeRouteAmount = amount;
    }

    function isLpToken(address _adr) internal returns (bool) {
        if (overrode[_adr]) return false;
        IUniswapV2Pair pair = IUniswapV2Pair(_adr);
        try pair.token0() returns (address token0) {
            address token1 = pair.token1();
            address realPair = _getPair(token0, token1);
            // check if newly derived pair is the same as the address passed in
            if (_adr != realPair) {
                overrode[_adr] = true;
                emit LogToggleOverrode(_adr);
                return false;
            }
            return true;
        } catch {
            overrode[_adr] = true;
            return false;
        }
    }

    // Begin Owner functions
    function addAuth(address _auth) external onlyOwner {
        isAuth[_auth] = true;
        authorized.push(_auth);
    }

    function revokeAuth(address _auth) external onlyOwner {
        isAuth[_auth] = false;
    }


    function setDevCut(uint _amount) external onlyOwner {
        require(_amount <= 5000, "setDevCut: cut too high");
        devCut = _amount;

        emit SetDevCut(_amount);
    }

    function setDevAddr(address _addr) external {
        require(owner() == _msgSender() || devAddr == _msgSender(), "not allowed");
        require(_addr != address(0), "setDevAddr, address cannot be zero address");
        devAddr = _addr;

        emit SetDevAddr(_addr);
    }
    // End owner functions

    // onlyAuth type functions

    function overrideSlippage(address _token) external onlyAuth {
        swapper.overrideSlippage(_token);
        emit LogSlippageOverrode(_token);
    }

    function setSlippage(uint _amt) external onlyAuth {
        swapper.setSlippage(_amt);
    }

    function setBridge(address token, address bridge) external onlyAuth {
        // Checks
        require(
            token != boo && token != wftm && token != bridge,
            "BrewBoo: Invalid bridge"
        );

        // Effects
        lastRoute[token] = bridge;
        emit LogBridgeSet(token, bridge);
    }

    function convertMultiple(
        address[] calldata token0,
        address[] calldata token1,
        uint[] calldata LPamounts
    ) external onlyEOA() nonReentrant() {
        uint i;
        IUniswapV2Pair pair;
        for (i = 0; i < token0.length;) {
            if (token0[i] == token1[i]) {
                require(!isLpToken(token0[i]), "no LP allowed");
                unchecked {++i;}
                continue;
            }
            require(!isLpToken(token0[i]) && !isLpToken(token1[i]), "no LP allowed");
            pair = IUniswapV2Pair(_getPair(token0[i], token1[i]));
            require(address(pair) != address(0), "BrewBoo: Invalid pair");

            IERC20(address(pair)).safeTransfer(address(pair), LPamounts.length == 0 ? pair.balanceOf(address(this)) : LPamounts[i]);
            pair.burn(address(this));
            unchecked {++i;}
        }

        converted[wftm] = block.number; // wftm is done last
        for (i = 0; i < token0.length;) {
            if(block.number > converted[token0[i]]) {
                _convertStep(token0[i], IERC20(token0[i]).balanceOf(address(this)));
                converted[token0[i]] = block.number;
            }
            if(block.number > converted[token1[i]]) {
                _convertStep(token1[i], IERC20(token1[i]).balanceOf(address(this)));
                converted[token1[i]] = block.number;
            }
            unchecked {++i;}
        }
        // final step is to swap all wFTM to BOO and disperse it
        i = IERC20(wftm).balanceOf(address(this)); //reuse i for amount to save gas
        bool success;
        if (devCut > 0) {
            uint cut = i.mul(devCut).div(10000);
            IERC20(wftm).safeTransfer(devAddr, cut);
            i = i.sub(cut);
        }
        (, success) = _swap(wftm, boo, i);
        if(!success)
            revert("BrewBooV3: swap failure in toBOO");

        //disperse
        uint _amt = IERC20(boo).balanceOf(address(this));
        uint bounty = _amt.mul(BOUNTY_FEE).div(10000);
        i = _amt.sub(bounty); //reuse i for amount to save gas
        IERC20(boo).safeTransfer(xboo, i); // send xboo its share
        IERC20(boo).safeTransfer(_msgSender(), bounty); // send message sender their share of 0.1%
        emit LogConvert(_msgSender(), boo, _amt, i);
    }

    // internal functions

    function _convertStep(
        address token0,
        uint256 amount
    ) internal returns (bool) {
        // Interactions
        if (token0 == wftm || token0 == boo) {
            return true;
        } else {
            address bridge = lastRoute[token0];
            bool success = false;
            if(bridge != address(0))
                (amount, success) = _swap(token0, bridge, amount);

            if(success)
                _convertStep(bridge, amount);
            else for(uint i = 0; i < bridgeRouteAmount;) {
                bridge = bridgeRoute[i];
                if(bridge == address(0)) {
                    unchecked {++i;}
                    continue;
                }
                (amount, success) = _swap(token0, bridge, amount);
                if(!success)
                    if(i == bridgeRouteAmount - 1)
                        revert("BrewBooV3: bridge route failure - all options exhausted");
                    else {
                        unchecked {++i;}
                        continue;
                    }
                lastRoute[token0] = bridge;
                _convertStep(bridge, amount);
                break;
            }
        }
        return true;
    }

    function _swap(
        address fromToken,
        address toToken,
        uint256 amountIn
    ) internal returns (uint256 amountOut, bool success) {
        if(fromToken == toToken)
            return (amountIn, false);

        if(!swapperApproved[fromToken]) {
            IERC20(fromToken).approve(address(swapper), 2**256 - 1);
            swapperApproved[fromToken] = true;
        }

        try swapper.swap(fromToken, IUniswapV2Pair(_getPair(fromToken, toToken)), amountIn) returns (uint amount) {
            return (amount, true);
        } catch {
            return (amountIn, false);
        }
    }

    function _getPair(address tokenA, address tokenB) internal returns (address pair) {
        (tokenA, tokenB) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        pair = pairOf[tokenA][tokenB];
        if(pair == address(0)) {
            pair = factory.getPair(tokenA, tokenB);
            pairOf[tokenA][tokenB] = pair;
        }
    }

    //allows migration of lp tokens balance ONLY to the new(current) brewboo
    function migrate(address[] calldata tokens) external {
        address feToo = factory.feeTo();
        for(uint i = 0; i < tokens.length; ++i)
            IERC20(tokens[i]).transfer(feToo, IERC20(tokens[i]).balanceOf(address(this)));
    }
}

File 2 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // 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 (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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) {
        return a + b;
    }

    /**
     * @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 a - b;
    }

    /**
     * @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) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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 a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 6 of 12 : IUniswapV2Pair.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

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

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

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

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

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

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

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

    function initialize(address, address) external;
}

File 7 of 12 : IUniswapV2Factory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.5.0;

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

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

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

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

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

File 8 of 12 : Swapper.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity 0.8.13;

import '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./interfaces/ISwapper.sol";


contract Swapper is ISwapper, Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;


    uint public slippage = 9;
    mapping(address => bool) public slippageOverrode;


    // onlyAuth type functions

    function overrideSlippage(address _token) external onlyOwner {
        slippageOverrode[_token] = !slippageOverrode[_token];
    }

    function setSlippage(uint _amt) external onlyOwner {
        require(_amt < 20, "slippage setting too high"); // the higher this setting, the lower the slippage tolerance, too high and buybacks would never work
        slippage = _amt;
    }

    function swap(
        address fromToken,
        IUniswapV2Pair pair,
        uint256 amountIn
    ) external returns (uint256 amountOut) {
        require(address(pair) != address(0), "BrewBoo: Cannot convert");

        (uint256 ui1, uint256 ui2, ) = pair.getReserves();
        bool isToken0 = fromToken == pair.token0();
        (ui1, ui2) = isToken0 ? (ui1, ui2) : (ui2, ui1);
        
        IERC20(fromToken).safeTransferFrom(msg.sender, address(pair), amountIn);
        amountIn = IERC20(fromToken).balanceOf(address(pair)).sub(ui1); // calculate amount that was transferred, this accounts for transfer taxes
        require(ui1.div(amountIn) > slippage || slippageOverrode[fromToken], "slippage too high");

        require(amountIn > 0, 'BrewBoo: INSUFFICIENT_INPUT_AMOUNT');
        require(ui1 > 0 && ui2 > 0, 'BrewBoo: INSUFFICIENT_LIQUIDITY');
        amountIn = amountIn.mul(998);
        amountOut = amountIn.mul(ui2) / ui1.mul(1000).add(amountIn);

        (ui1, ui2) = isToken0 ? (uint(0), amountOut) : (amountOut, uint(0));
        pair.swap(ui1, ui2, msg.sender, new bytes(0));
    }
}

File 9 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 10 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 12 : ISwapper.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;

import "./IUniswapV2Pair.sol";

interface ISwapper {
    function swap(
        address fromToken,
        IUniswapV2Pair pair,
        uint256 amountIn
    ) external returns (uint256 amountOut);
    function overrideSlippage(address _token) external;
    function setSlippage(uint _amt) external;

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_xboo","type":"address"},{"internalType":"address","name":"_boo","type":"address"},{"internalType":"address","name":"_wftm","type":"address"},{"internalType":"address","name":"route1","type":"address"},{"internalType":"address","name":"route2","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"bridge","type":"address"}],"name":"LogBridgeSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"server","type":"address"},{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountBOO","type":"uint256"}],"name":"LogConvert","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_adr","type":"address"}],"name":"LogSlippageOverrode","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_adr","type":"address"}],"name":"LogToggleOverrode","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_addr","type":"address"}],"name":"SetDevAddr","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SetDevCut","type":"event"},{"inputs":[],"name":"BOUNTY_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"addAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"authorized","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bridgeRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeRouteAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"token0","type":"address[]"},{"internalType":"address[]","name":"token1","type":"address[]"},{"internalType":"uint256[]","name":"LPamounts","type":"uint256[]"}],"name":"convertMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devCut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAuth","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"overrideSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"overrode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"pairOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_auth","type":"address"}],"name":"revokeAuth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"setBridgeRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setBridgeRouteAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setDevAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setDevCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amt","type":"uint256"}],"name":"setSlippage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"contract ISwapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swapperApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xboo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101206040526003600a553480156200001757600080fd5b5060405162004896380380620048968339810160408190526200003a9162000221565b6200004533620001a6565b60018080556001600160a01b0387811660805286811660c05285811660e05284811661010081905260038054336001600160a01b031991821681179092556000828152600460209081526040808320805460ff1916891790556005805498890190557f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db09097018054841690941790935560099092527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b805482169093179092557f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a3680548316878516179055600290527f6cde3cea4b3a3fb2488b2808bae7556f4a405e50f65e1794383bc026131b13c38054909116918416919091179055516200016f90620001f6565b604051809103906000f0801580156200018c573d6000803e3d6000fd5b506001600160a01b031660a05250620002a2945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61123d806200365983390190565b80516001600160a01b03811681146200021c57600080fd5b919050565b60008060008060008060c087890312156200023b57600080fd5b620002468762000204565b9550620002566020880162000204565b9450620002666040880162000204565b9350620002766060880162000204565b9250620002866080880162000204565b91506200029660a0880162000204565b90509295509295509295565b60805160a05160c05160e051610100516132f46200036560003960008181610fe601528181611301015281816113d30152818161140f0152818161178c015261263a015260008181611430015281816114f1015281816115ae015281816115fa0152818161164601528181611735015261268f0152600081816101cd01526115d001526000818161029e01528181611b4a015281816120860152818161297f0152612a6c0152600081816103ec0152818161052f01526124d001526132f46000f3fe608060405234801561001057600080fd5b50600436106101c35760003560e01c80639c286837116100f9578063dbcc106d11610097578063f2fde38b11610071578063f2fde38b146104a8578063f770854d146104bb578063f8171dfa146104ce578063f87c4938146104e157600080fd5b8063dbcc106d14610441578063e1e212e114610454578063f0fa55a91461049557600080fd5b8063b5eabb1e116100d3578063b5eabb1e146103df578063c45a0155146103e7578063d1e4b9931461040e578063da09c72c1461042157600080fd5b80639c2868371461038d5780639d22ae8c14610396578063b254c785146103a957600080fd5b80635422224e11610166578063715018a611610140578063715018a6146103315780637e1b9507146103395780638da5cb5b1461034c578063950a180e1461036a57600080fd5b80635422224e146102d557806360b90406146102e85780636ebb64a21461031e57600080fd5b80630d48669a116101a25780630d48669a146102635780632520e7ff146102765780632b3297f9146102995780632e558d69146102c057600080fd5b8062b6ada2146101c85780630b6b62aa146102195780630c7e4d3514610230575b600080fd5b6101ef7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610222600a5481565b604051908152602001610210565b61025361023e366004612eb0565b60086020526000908152604090205460ff1681565b6040519015158152602001610210565b6101ef610271366004612ecd565b6104f4565b610253610284366004612eb0565b60046020526000908152604090205460ff1681565b6101ef7f000000000000000000000000000000000000000000000000000000000000000081565b6102d36102ce366004612f32565b61052b565b005b6102d36102e3366004612eb0565b61076e565b6101ef6102f6366004612eb0565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6102d361032c366004612eb0565b61089d565b6102d3610a5d565b6102d3610347366004612f74565b610aea565b60005473ffffffffffffffffffffffffffffffffffffffff166101ef565b610253610378366004612eb0565b60076020526000908152604090205460ff1681565b61022260025481565b6102d36103a436600461300e565b6116ba565b6101ef6103b7366004612ecd565b60096020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b610222600a81565b6101ef7f000000000000000000000000000000000000000000000000000000000000000081565b6102d361041c366004612ecd565b6118f5565b6003546101ef9073ffffffffffffffffffffffffffffffffffffffff1681565b6102d361044f366004612ecd565b611980565b6101ef61046236600461300e565b600c60209081526000928352604080842090915290825290205473ffffffffffffffffffffffffffffffffffffffff1681565b6102d36104a3366004612ecd565b611aa2565b6102d36104b6366004612eb0565b611bbe565b6102d36104c9366004613047565b611cee565b6102d36104dc366004612eb0565b611efb565b6102d36104ef366004612eb0565b611fc8565b6005818154811061050457600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015610598573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105bc919061306c565b905060005b82811015610768578383828181106105db576105db613089565b90506020020160208101906105f09190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8386868581811061061e5761061e613089565b90506020020160208101906106339190612eb0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa15801561069f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c391906130b8565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610733573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075791906130d1565b5061076181613122565b90506105c1565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146107f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff16600081815260046020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091556005805491820181559091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314806108da575060035473ffffffffffffffffffffffffffffffffffffffff1633145b610940576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f7420616c6c6f77656400000000000000000000000000000000000000000060448201526064016107eb565b73ffffffffffffffffffffffffffffffffffffffff81166109e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f736574446576416464722c20616464726573732063616e6e6f74206265207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016107eb565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f45c73fc162405abe4471c4228f0797176ac32cb9f7be4a25a67cbd1dda6d007e906020015b60405180910390a150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107eb565b610ae86000612129565b565b333214610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42726577426f6f3a206d7573742075736520454f41000000000000000000000060448201526064016107eb565b600260015403610bbf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107eb565b60026001556000805b86821015610fcf57858583818110610be257610be2613089565b9050602002016020810190610bf79190612eb0565b73ffffffffffffffffffffffffffffffffffffffff16888884818110610c1f57610c1f613089565b9050602002016020810190610c349190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1603610cf057610c7e888884818110610c6457610c64613089565b9050602002016020810190610c799190612eb0565b61219e565b15610ce5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f204c5020616c6c6f7765640000000000000000000000000000000000000060448201526064016107eb565b816001019150610bc8565b610d05888884818110610c6457610c64613089565b158015610d245750610d22868684818110610c6457610c64613089565b155b610d8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f204c5020616c6c6f7765640000000000000000000000000000000000000060448201526064016107eb565b610de0888884818110610d9f57610d9f613089565b9050602002016020810190610db49190612eb0565b878785818110610dc657610dc6613089565b9050602002016020810190610ddb9190612eb0565b612402565b905073ffffffffffffffffffffffffffffffffffffffff8116610e5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f42726577426f6f3a20496e76616c69642070616972000000000000000000000060448201526064016107eb565b610f33818415610e8757858585818110610e7b57610e7b613089565b90506020020135610f15565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015610ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1591906130b8565b73ffffffffffffffffffffffffffffffffffffffff841691906125a4565b6040517f89afcb4400000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8216906389afcb449060240160408051808303816000875af1158015610f9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc2919061315a565b5050816001019150610bc8565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016600090815260066020526040812043905591505b868210156112d3576006600089898581811061103857611038613089565b905060200201602081019061104d9190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544311156111ca576111758888848181106110a4576110a4613089565b90506020020160208101906110b99190612eb0565b8989858181106110cb576110cb613089565b90506020020160208101906110e09190612eb0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa15801561114c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117091906130b8565b612636565b5043600660008a8a8681811061118d5761118d613089565b90506020020160208101906111a29190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020555b600660008787858181106111e0576111e0613089565b90506020020160208101906111f59190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544311156112c85761127386868481811061124c5761124c613089565b90506020020160208101906112619190612eb0565b8787858181106110cb576110cb613089565b50436006600088888681811061128b5761128b613089565b90506020020160208101906112a09190612eb0565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020555b81600101915061101a565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561135d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138191906130b8565b9150600080600254111561140a5760006113b26127106113ac600254876128a990919063ffffffff16565b906128bc565b6003549091506113fc9073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169116836125a4565b61140684826128c8565b9350505b6114557f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000856128d4565b91508190506114c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f42726577426f6f56333a2073776170206661696c75726520696e20746f424f4f60448201526064016107eb565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa15801561154d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157191906130b8565b905060006115866127106113ac84600a6128a9565b905061159282826128c8565b94506115f573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f0000000000000000000000000000000000000000000000000000000000000000876125a4565b6116367f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1633836125a4565b60408051838152602081018790527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169133917f9a2b201cb3043b4d299009f7ad0fb8125820088a7c5033fcb41fce87939aaf2d910160405180910390a3505060018055505050505050505050565b3360009081526004602052604090205460ff16611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42726577426f6f3a20464f5242494444454e000000000000000000000000000060448201526064016107eb565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156117db57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561181357508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b611879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f42726577426f6f3a20496e76616c69642062726964676500000000000000000060448201526064016107eb565b73ffffffffffffffffffffffffffffffffffffffff8281166000818152600b602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055517f2e103aa707acc565f9a1547341914802b2bfe977fd79c595209f248ae4b006139190a35050565b3360009081526004602052604090205460ff1661196e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42726577426f6f3a20464f5242494444454e000000000000000000000000000060448201526064016107eb565b6002811161197b57600080fd5b600a55565b60005473ffffffffffffffffffffffffffffffffffffffff163314611a01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107eb565b611388811115611a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f7365744465764375743a2063757420746f6f206869676800000000000000000060448201526064016107eb565b60028190556040518181527f914990c75916d406c148e7fca9308486d7806a77c0ef66119c9329add5885d2e90602001610a52565b3360009081526004602052604090205460ff16611b1b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42726577426f6f3a20464f5242494444454e000000000000000000000000000060448201526064016107eb565b6040517ff0fa55a9000000000000000000000000000000000000000000000000000000008152600481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063f0fa55a990602401600060405180830381600087803b158015611ba357600080fd5b505af1158015611bb7573d6000803e3d6000fd5b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611c3f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107eb565b73ffffffffffffffffffffffffffffffffffffffff8116611ce2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107eb565b611ceb81612129565b50565b3360009081526004602052604090205460ff16611d67576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42726577426f6f3a20464f5242494444454e000000000000000000000000000060448201526064016107eb565b60028211611df7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f666972737420332062726964676520746f6b656e732061726520696d6d75746160448201527f626c65000000000000000000000000000000000000000000000000000000000060648201526084016107eb565b600a54821115611e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f696e64657820746f6f206c617267652c20757365206e6578742066726565207360448201527f6c6f74000000000000000000000000000000000000000000000000000000000060648201526084016107eb565b600082815260096020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316179055600a548203611ef7576001600a6000828254611ef1919061317e565b90915550505b5050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611f7c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107eb565b73ffffffffffffffffffffffffffffffffffffffff16600090815260046020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b3360009081526004602052604090205460ff16612041576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f42726577426f6f3a20464f5242494444454e000000000000000000000000000060448201526064016107eb565b6040517ff87c493800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301527f0000000000000000000000000000000000000000000000000000000000000000169063f87c493890602401600060405180830381600087803b1580156120ca57600080fd5b505af11580156120de573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841681527fbb282aa752df4e6fee49be253bb0063563473a33117712e477e7bebf6ec9bb7792506020019050610a52565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526007602052604081205460ff16156121d457506000919050565b60008290508073ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561225e575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261225b9181019061306c565b60015b6122b457505073ffffffffffffffffffffffffffffffffffffffff16600090815260076020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590565b60008273ffffffffffffffffffffffffffffffffffffffff1663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015612301573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612325919061306c565b905060006123338383612402565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16146123f65773ffffffffffffffffffffffffffffffffffffffff861660008181526007602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905590519182527fb2d21e49d911929102e12f7c1ffb79ee823301cadd6c5404be9e5775496042a3910160405180910390a150600095945050505050565b50600195945050505050565b60008173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161061243e578183612441565b82825b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600c6020908152604080832084861684529091529020549295509093501690508061259e576040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015283811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063e6a4390590604401602060405180830381865afa158015612517573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253b919061306c565b73ffffffffffffffffffffffffffffffffffffffff8481166000908152600c602090815260408083208785168452909152902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691831691909117905590505b92915050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612631908490612b82565b505050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806126dd57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156126ea5750600161259e565b73ffffffffffffffffffffffffffffffffffffffff8084166000908152600b602052604081205490911690811561272c576127268583866128d4565b90945090505b80156127425761273c8285612636565b5061289e565b60005b600a5481101561289c5760008181526009602052604090205473ffffffffffffffffffffffffffffffffffffffff1692508261278357600101612745565b61278e8684876128d4565b90955091508161283d576001600a546127a79190613196565b8103612835576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f42726577426f6f56333a2062726964676520726f757465206661696c7572652060448201527f2d20616c6c206f7074696f6e732065786861757374656400000000000000000060648201526084016107eb565b600101612745565b73ffffffffffffffffffffffffffffffffffffffff8681166000908152600b6020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001691851691909117905561289a8386612636565b505b505b505050600192915050565b60006128b582846131ad565b9392505050565b60006128b582846131ea565b60006128b58284613196565b6000808373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361291557508190506000612b7a565b73ffffffffffffffffffffffffffffffffffffffff851660009081526008602052604090205460ff16612a6a576040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602483015286169063095ea7b3906044016020604051808303816000875af11580156129f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1a91906130d1565b5073ffffffffffffffffffffffffffffffffffffffff8516600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663df791e5086612ab18888612402565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018690526064016020604051808303816000875af1925050508015612b64575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612b61918101906130b8565b60015b612b7357508190506000612b7a565b9150600190505b935093915050565b6000612be4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612c8e9092919063ffffffff16565b8051909150156126315780806020019051810190612c0291906130d1565b612631576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016107eb565b6060612c9d8484600085612ca5565b949350505050565b606082471015612d37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016107eb565b73ffffffffffffffffffffffffffffffffffffffff85163b612db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107eb565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612dde9190613251565b60006040518083038185875af1925050503d8060008114612e1b576040519150601f19603f3d011682016040523d82523d6000602084013e612e20565b606091505b5091509150612e30828286612e3b565b979650505050505050565b60608315612e4a5750816128b5565b825115612e5a5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107eb919061326d565b73ffffffffffffffffffffffffffffffffffffffff81168114611ceb57600080fd5b600060208284031215612ec257600080fd5b81356128b581612e8e565b600060208284031215612edf57600080fd5b5035919050565b60008083601f840112612ef857600080fd5b50813567ffffffffffffffff811115612f1057600080fd5b6020830191508360208260051b8501011115612f2b57600080fd5b9250929050565b60008060208385031215612f4557600080fd5b823567ffffffffffffffff811115612f5c57600080fd5b612f6885828601612ee6565b90969095509350505050565b60008060008060008060608789031215612f8d57600080fd5b863567ffffffffffffffff80821115612fa557600080fd5b612fb18a838b01612ee6565b90985096506020890135915080821115612fca57600080fd5b612fd68a838b01612ee6565b90965094506040890135915080821115612fef57600080fd5b50612ffc89828a01612ee6565b979a9699509497509295939492505050565b6000806040838503121561302157600080fd5b823561302c81612e8e565b9150602083013561303c81612e8e565b809150509250929050565b6000806040838503121561305a57600080fd5b82359150602083013561303c81612e8e565b60006020828403121561307e57600080fd5b81516128b581612e8e565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156130ca57600080fd5b5051919050565b6000602082840312156130e357600080fd5b815180151581146128b557600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613153576131536130f3565b5060010190565b6000806040838503121561316d57600080fd5b505080516020909101519092909150565b60008219821115613191576131916130f3565b500190565b6000828210156131a8576131a86130f3565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131e5576131e56130f3565b500290565b600082613220577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b83811015613240578181015183820152602001613228565b838111156107685750506000910152565b60008251613263818460208701613225565b9190910192915050565b602081526000825180602084015261328c816040850160208701613225565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220b45465f3b3d069e755173425b2cd466e06947e7b0bf5d212648c591716f4ab0664736f6c634300080d00336080604052600960015534801561001557600080fd5b5061001f33610024565b610074565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6111ba806100836000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063e19d32361161005b578063e19d3236146100ee578063f0fa55a914610121578063f2fde38b14610134578063f87c49381461014757600080fd5b80633e032a3b1461008d578063715018a6146100a95780638da5cb5b146100b3578063df791e50146100db575b600080fd5b61009660015481565b6040519081526020015b60405180910390f35b6100b161015a565b005b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a0565b6100966100e9366004610e82565b6101ec565b6101116100fc366004610ec3565b60026020526000908152604090205460ff1681565b60405190151581526020016100a0565b6100b161012f366004610ee0565b610713565b6100b1610142366004610ec3565b610803565b6100b1610155366004610ec3565b610933565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101ea6000610a08565b565b600073ffffffffffffffffffffffffffffffffffffffff831661026b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f42726577426f6f3a2043616e6e6f7420636f6e7665727400000000000000000060448201526064016101d7565b6000808473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa1580156102b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102dd9190610f1c565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915060008573ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa15801561034f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103739190610f6c565b73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16149050806103af5781836103b2565b82825b90935091506103d973ffffffffffffffffffffffffffffffffffffffff8816338888610a7d565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301526104759185918a16906370a0823190602401602060405180830381865afa15801561044b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046f9190610f89565b90610b18565b6001549095506104858487610b2b565b11806104b6575073ffffffffffffffffffffffffffffffffffffffff871660009081526002602052604090205460ff165b61051c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f736c69707061676520746f6f206869676800000000000000000000000000000060448201526064016101d7565b600085116105ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f42726577426f6f3a20494e53554646494349454e545f494e5055545f414d4f5560448201527f4e5400000000000000000000000000000000000000000000000000000000000060648201526084016101d7565b6000831180156105bc5750600082115b610622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f42726577426f6f3a20494e53554646494349454e545f4c49515549444954590060448201526064016101d7565b61062e856103e6610b37565b945061064685610640856103e8610b37565b90610b43565b6106508684610b37565b61065a9190610fd1565b9350806106695783600061066d565b6000845b604080516000815260208101918290527f022c0d9f00000000000000000000000000000000000000000000000000000000909152919450925073ffffffffffffffffffffffffffffffffffffffff87169063022c0d9f906106d79086908690339060248101611082565b600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b505050505050509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d7565b601481106107fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f736c6970706167652073657474696e6720746f6f20686967680000000000000060448201526064016101d7565b600155565b60005473ffffffffffffffffffffffffffffffffffffffff163314610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d7565b73ffffffffffffffffffffffffffffffffffffffff8116610927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101d7565b61093081610a08565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101d7565b73ffffffffffffffffffffffffffffffffffffffff16600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff90911615179055565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b12908590610b4f565b50505050565b6000610b2482846110c7565b9392505050565b6000610b248284610fd1565b6000610b2482846110de565b6000610b24828461111b565b6000610bb1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610c609092919063ffffffff16565b805190915015610c5b5780806020019051810190610bcf9190611133565b610c5b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016101d7565b505050565b6060610c6f8484600085610c77565b949350505050565b606082471015610d09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016101d7565b73ffffffffffffffffffffffffffffffffffffffff85163b610d87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101d7565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610db09190611155565b60006040518083038185875af1925050503d8060008114610ded576040519150601f19603f3d011682016040523d82523d6000602084013e610df2565b606091505b5091509150610e02828286610e0d565b979650505050505050565b60608315610e1c575081610b24565b825115610e2c5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d79190611171565b73ffffffffffffffffffffffffffffffffffffffff8116811461093057600080fd5b600080600060608486031215610e9757600080fd5b8335610ea281610e60565b92506020840135610eb281610e60565b929592945050506040919091013590565b600060208284031215610ed557600080fd5b8135610b2481610e60565b600060208284031215610ef257600080fd5b5035919050565b80516dffffffffffffffffffffffffffff81168114610f1757600080fd5b919050565b600080600060608486031215610f3157600080fd5b610f3a84610ef9565b9250610f4860208501610ef9565b9150604084015163ffffffff81168114610f6157600080fd5b809150509250925092565b600060208284031215610f7e57600080fd5b8151610b2481610e60565b600060208284031215610f9b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082611007577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60005b8381101561102757818101518382015260200161100f565b83811115610b125750506000910152565b6000815180845261105081602086016020860161100c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff831660408201526080606082015260006110bd6080830184611038565b9695505050505050565b6000828210156110d9576110d9610fa2565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561111657611116610fa2565b500290565b6000821982111561112e5761112e610fa2565b500190565b60006020828403121561114557600080fd5b81518015158114610b2457600080fd5b6000825161116781846020870161100c565b9190910192915050565b602081526000610b24602083018461103856fea2646970667358221220bb5e8c4b05ed7161fcc05931d7f63dee811450ea9da520b6672393a87ec6fb1b64736f6c634300080d0033000000000000000000000000152ee697f2e276fa89e96742e9bb9ab1f2e61be3000000000000000000000000a48d959ae2e88f1daa7d5f611e01908106de7598000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b750000000000000000000000008d11ec38a3eb5e956b052f67da8bdc9bef8abf3e

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

000000000000000000000000152ee697f2e276fa89e96742e9bb9ab1f2e61be3000000000000000000000000a48d959ae2e88f1daa7d5f611e01908106de7598000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b750000000000000000000000008d11ec38a3eb5e956b052f67da8bdc9bef8abf3e

-----Decoded View---------------
Arg [0] : _factory (address): 0x152ee697f2e276fa89e96742e9bb9ab1f2e61be3
Arg [1] : _xboo (address): 0xa48d959ae2e88f1daa7d5f611e01908106de7598
Arg [2] : _boo (address): 0x841fad6eae12c286d1fd18d1d525dffa75c7effe
Arg [3] : _wftm (address): 0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [4] : route1 (address): 0x04068da6c83afcfa0e13ba15a6696662335d5b75
Arg [5] : route2 (address): 0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000152ee697f2e276fa89e96742e9bb9ab1f2e61be3
Arg [1] : 000000000000000000000000a48d959ae2e88f1daa7d5f611e01908106de7598
Arg [2] : 000000000000000000000000841fad6eae12c286d1fd18d1d525dffa75c7effe
Arg [3] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [4] : 00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75
Arg [5] : 0000000000000000000000008d11ec38a3eb5e956b052f67da8bdc9bef8abf3e


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.