Contract 0xc98c3c547ddbcc0029f38e0383c645c202ad663d

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x3fcdc00e14b494b858323e0eea7f8bddb2bd039e57bd62bfe15fda67f342a7dcConvert78134462021-12-04 22:16:4553 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01148587236
0xdd7a418ddb5696e4aa4a1ea54253bc3c316562e4040bce2aa8ea98ea65e2f2e1Convert78132812021-12-04 22:11:1153 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01082246436
0xb0101762d72db8363ea41033623fad2ef0a47c6574a10221d77e8d7d9d2a8738Convert78131702021-12-04 22:07:3153 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01146160836
0xad51ffae210c4e6e863253d80a06edbbc4b0e886a61ee32cec6c29cf213e519bConvert78129482021-12-04 22:00:0453 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01147017636
0x996c7028cd33ed8ed791dd5149ec4a255ec3b4875331cdcbbe2c31a5945d4230Convert78127582021-12-04 21:53:3953 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01143093636
0x601c35122b0c24b3f2543d0e75b822b0d7b040124e04a59e130d0583a1f79903Convert78125742021-12-04 21:47:2853 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01137636
0x5e3f9cb8b8aca7da34f21ed8bc64a97980ce1204ac3a197138bfe561a9704ed7Convert78124212021-12-04 21:42:1953 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138312836
0xe73de8dbcc9ed4275c62f9299ed6f77527621d913d19ba443c24dc68222dcc2fConvert78123272021-12-04 21:39:0053 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01135958436
0x9094e9898914ded23e6177c0fdc0779dc8ea6fff8ebf2b098b72d63bc4f19aa8Convert78121812021-12-04 21:34:0753 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138384836
0x414bf31a53f526da5f05b59974927a5936c936b4a9703c6782a967de6b73bc2cConvert78120522021-12-04 21:29:4553 days 4 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01130536836
0x06c6e42893144810ae4cedba72f35054f5b0ae51f20477b52a73e317b2cd6ae5Convert78118122021-12-04 21:21:4653 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01139097636
0x173ea6ceeec9372c2944aa204f66464d9c6605a84a47943df01ef9c03a91676dConvert78116982021-12-04 21:17:5653 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138384836
0x460ac00343780eb4238648bf26f4da1a5d2785ade69056b243211e75a4dc25b8Convert78115372021-12-04 21:12:3253 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138226436
0xbffea4c21611314781bc62ab30a5d004f73ad38af00a2465f8da78ced285e255Convert78113732021-12-04 21:06:5253 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01131321636
0x6a409813f946d24fa707b21728cac67cd3f16eb3ff26bf5ef537ffa75afe8e2cConvert78110542021-12-04 20:56:1553 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138312836
0x5f318faab57c30c97645c7197afcab5e23e6fda044da103447aff5c39eab7d6eConvert78109192021-12-04 20:51:4253 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01137556836
0x6b23aa41fa3b1f7f0a6abe20a34208289f05c3dfa6ffde966f4f6cd2155437c1Convert78108052021-12-04 20:47:5253 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01137636
0x232a54da079489082d9e7e3f2920e18cdb59857444230bbe5de7a1cb99e25cb4Convert78106162021-12-04 20:41:4453 days 5 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01138384836
0x45d3c8f66a5af0735d24855c3d7b2008c073ddadadd361d0115e15c3489f1344Convert78099592021-12-04 20:19:4153 days 6 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.0114537636
0xcf33d96848e1f802a5f6ea88b5a754d3f970135aebe3072c4e5090d3ef881ce0Convert77648192021-12-03 19:30:4854 days 6 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01147802436
0x0f28bb4e2c8d7b3f0a390e1aa07ea2cb68de79a5e15463efef2fd57a197d7834Convert77646412021-12-03 19:24:4654 days 6 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01144663236
0x5b5926195abb8b264d7439c582626502e5d5958ef2e70a110101baa33122db3cConvert77645542021-12-03 19:21:5454 days 7 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01144504836
0xd96fe0c3571d54f9b726c111785b7ae7157035470c077d2666e44162d84763e2Convert77644672021-12-03 19:19:0154 days 7 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01146902436
0x4551c0448adf6b334c4d52a3217c206e8a82256603443d8177b933463851a32cConvert77643852021-12-03 19:16:1954 days 7 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01206223236
0xef0eaeaa13c5422f66ce9f5ecdbc16e099e718139a5a2c790a4570e6684282e4Convert77642242021-12-03 19:11:0354 days 7 hrs ago0x95b5f06372a12bd0da58c4ee6316f8772bec62db IN  0xc98c3c547ddbcc0029f38e0383c645c202ad663d0 AVAX0.01147730436
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
JoeMakerV2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at snowtrace.io on 2021-11-11
*/

// File: contracts/libraries/SafeMath.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

// a library for performing overflow-safe math, updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math)
library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a + b) >= b, "SafeMath: Add Overflow");
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require((c = a - b) <= a, "SafeMath: Underflow");
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require(b == 0 || (c = a * b) / b == a, "SafeMath: Mul Overflow");
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256 c) {
        require(b > 0, "SafeMath: Div by Zero");
        c = a / b;
    }

    function to128(uint256 a) internal pure returns (uint128 c) {
        require(a <= uint128(-1), "SafeMath: uint128 Overflow");
        c = uint128(a);
    }
}

library SafeMath128 {
    function add(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a + b) >= b, "SafeMath: Add Overflow");
    }

    function sub(uint128 a, uint128 b) internal pure returns (uint128 c) {
        require((c = a - b) <= a, "SafeMath: Underflow");
    }
}

// File: contracts/interfaces/IERC20.sol

pragma solidity 0.6.12;

interface IERC20 {
    function totalSupply() external view returns (uint256);

    function balanceOf(address account) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

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

    // EIP 2612
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

// File: contracts/libraries/SafeERC20.sol

pragma solidity 0.6.12;


library SafeERC20 {
    function safeSymbol(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(0x95d89b41)
        );
        return success && data.length > 0 ? abi.decode(data, (string)) : "???";
    }

    function safeName(IERC20 token) internal view returns (string memory) {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(0x06fdde03)
        );
        return success && data.length > 0 ? abi.decode(data, (string)) : "???";
    }

    function safeDecimals(IERC20 token) public view returns (uint8) {
        (bool success, bytes memory data) = address(token).staticcall(
            abi.encodeWithSelector(0x313ce567)
        );
        return success && data.length == 32 ? abi.decode(data, (uint8)) : 18;
    }

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(0xa9059cbb, to, amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "SafeERC20: Transfer failed"
        );
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        uint256 amount
    ) internal {
        (bool success, bytes memory data) = address(token).call(
            abi.encodeWithSelector(0x23b872dd, from, address(this), amount)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "SafeERC20: TransferFrom failed"
        );
    }
}

// File: contracts/traderjoe/interfaces/IJoeERC20.sol


pragma solidity >=0.5.0;

interface IJoeERC20 {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

// File: contracts/traderjoe/interfaces/IJoePair.sol


pragma solidity >=0.5.0;

interface IJoePair {
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
    event Transfer(address indexed from, address indexed to, uint256 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 (uint256);

    function balanceOf(address owner) external view returns (uint256);

    function allowance(address owner, address spender)
        external
        view
        returns (uint256);

    function approve(address spender, uint256 value) external returns (bool);

    function transfer(address to, uint256 value) external returns (bool);

    function transferFrom(
        address from,
        address to,
        uint256 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 (uint256);

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

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

    function MINIMUM_LIQUIDITY() external pure returns (uint256);

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

    function price1CumulativeLast() external view returns (uint256);

    function kLast() external view returns (uint256);

    function mint(address to) external returns (uint256 liquidity);

    function burn(address to)
        external
        returns (uint256 amount0, uint256 amount1);

    function swap(
        uint256 amount0Out,
        uint256 amount1Out,
        address to,
        bytes calldata data
    ) external;

    function skim(address to) external;

    function sync() external;

    function initialize(address, address) external;
}

// File: contracts/traderjoe/interfaces/IJoeFactory.sol


pragma solidity >=0.5.0;

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

    function feeTo() external view returns (address);

    function feeToSetter() external view returns (address);

    function migrator() external view returns (address);

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

    function allPairs(uint256) external view returns (address pair);

    function allPairsLength() external view returns (uint256);

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

    function setFeeTo(address) external;

    function setFeeToSetter(address) external;

    function setMigrator(address) external;
}

// File: contracts/boringcrypto/BoringOwnable.sol

pragma solidity 0.6.12;

// Audit on 5-Jan-2021 by Keno and BoringCrypto
// Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol
// Edited by BoringCrypto

contract BoringOwnableData {
    address public owner;
    address public pendingOwner;
}

contract BoringOwnable is BoringOwnableData {
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    /// @notice `owner` defaults to msg.sender on construction.
    constructor() public {
        owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);
    }

    /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner.
    /// Can only be invoked by the current `owner`.
    /// @param newOwner Address of the new owner.
    /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`.
    /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise.
    function transferOwnership(
        address newOwner,
        bool direct,
        bool renounce
    ) public onlyOwner {
        if (direct) {
            // Checks
            require(
                newOwner != address(0) || renounce,
                "Ownable: zero address"
            );

            // Effects
            emit OwnershipTransferred(owner, newOwner);
            owner = newOwner;
            pendingOwner = address(0);
        } else {
            // Effects
            pendingOwner = newOwner;
        }
    }

    /// @notice Needs to be called by `pendingOwner` to claim ownership.
    function claimOwnership() public {
        address _pendingOwner = pendingOwner;

        // Checks
        require(
            msg.sender == _pendingOwner,
            "Ownable: caller != pending owner"
        );

        // Effects
        emit OwnershipTransferred(owner, _pendingOwner);
        owner = _pendingOwner;
        pendingOwner = address(0);
    }

    /// @notice Only allows the `owner` to execute the function.
    modifier onlyOwner() {
        require(msg.sender == owner, "Ownable: caller is not the owner");
        _;
    }
}

// File: contracts/JoeMakerV2.sol


// P1 - P3: OK
pragma solidity 0.6.12;







// JoeMakerV2 is MasterJoe's left hand and kinda a wizard. He can cook up Joe from pretty much anything!
// This contract handles "serving up" rewards for xJoe holders by trading tokens collected from fees for Joe.

// T1 - T4: OK
contract JoeMakerV2 is BoringOwnable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== CONSTANT VARIABLES ========== */

    IJoeFactory public immutable factory;
    address public immutable bar;
    address private immutable joe;
    address private immutable wavax;

    mapping(address => address) internal _bridges;

    event LogBridgeSet(address indexed token, address indexed bridge);

    event LogConvert(
        address indexed server,
        address indexed token0,
        address indexed token1,
        uint256 amount0,
        uint256 amount1,
        uint256 amountJOE
    );

    /* ========== CONSTRUCTOR ========== */

    constructor(
        address _factory,
        address _bar,
        address _joe,
        address _wavax
    ) public {
        factory = IJoeFactory(_factory);
        bar = _bar;
        joe = _joe;
        wavax = _wavax;
    }

    /* ========== External Functions ========== */

    // F3: _convert is separate to save gas by only checking the 'onlyEOA' modifier once in case of convertMultiple
    // F6: There is an exploit to add lots of JOE to the bar, run convert, then remove the JOE again.
    //     As the size of the JoeBar has grown, this requires large amounts of funds and isn't super profitable anymore
    //     The onlyEOA modifier prevents this being done with a flash loan.
    function convert(address token0, address token1) external onlyEOA {
        _convert(token0, token1);
    }

    function convertMultiple(address[] calldata token0, address[] calldata token1) external onlyEOA {
        // TODO: This can be optimized a fair bit, but this is safer and simpler for now
        uint256 len = token0.length;
        for (uint256 i = 0; i < len; i++) {
            _convert(token0[i], token1[i]);
        }
    }

    /* ========== Modifiers ========== */

    // 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, "JoeMakerV2: must use EOA");
        _;
    }

    /* ========== Public Functions ========== */

    function bridgeFor(address token) public view returns (address bridge) {
        bridge = _bridges[token];
        if (bridge == address(0)) {
            bridge = wavax;
        }
    }

    /* ========== Internal Functions ========== */

    function _convert(address token0, address token1) internal {
        // Interactions
        // S1 - S4: OK
        IJoePair pair = IJoePair(factory.getPair(token0, token1));
        require(address(pair) != address(0), "JoeMakerV2: Invalid pair");
        // balanceOf: S1 - S4: OK
        // transfer: X1 - X5: OK
        IERC20(address(pair)).safeTransfer(address(pair), pair.balanceOf(address(this)));

        // X1 - X5: OK
        // We don't take amount0 and amount1 from here, as it won't take into account reflect tokens.
        pair.burn(address(this));

        // We get the amount0 and amount1 by their respective balance of JoeMakerV2.
        uint256 amount0 = IERC20(token0).balanceOf(address(this));
        uint256 amount1 = IERC20(token1).balanceOf(address(this));

        emit LogConvert(msg.sender, token0, token1, amount0, amount1, _convertStep(token0, token1, amount0, amount1));
    }

    function _convertStep(
        address token0,
        address token1,
        uint256 amount0,
        uint256 amount1
    ) internal returns (uint256 joeOut) {
        // Interactions
        if (token0 == token1) {
            uint256 amount = amount0.add(amount1);
            if (token0 == joe) {
                IERC20(joe).safeTransfer(bar, amount);
                joeOut = amount;
            } else if (token0 == wavax) {
                joeOut = _toJOE(wavax, amount);
            } else {
                address bridge = bridgeFor(token0);
                amount = _swap(token0, bridge, amount, address(this));
                joeOut = _convertStep(bridge, bridge, amount, 0);
            }
        } else if (token0 == joe) {
            // eg. JOE - AVAX
            IERC20(joe).safeTransfer(bar, amount0);
            joeOut = _toJOE(token1, amount1).add(amount0);
        } else if (token1 == joe) {
            // eg. USDT - JOE
            IERC20(joe).safeTransfer(bar, amount1);
            joeOut = _toJOE(token0, amount0).add(amount1);
        } else if (token0 == wavax) {
            // eg. AVAX - USDC
            joeOut = _toJOE(wavax, _swap(token1, wavax, amount1, address(this)).add(amount0));
        } else if (token1 == wavax) {
            // eg. USDT - AVAX
            joeOut = _toJOE(wavax, _swap(token0, wavax, amount0, address(this)).add(amount1));
        } else {
            // eg. MIC - USDT
            address bridge0 = bridgeFor(token0);
            address bridge1 = bridgeFor(token1);
            if (bridge0 == token1) {
                // eg. MIC - USDT - and bridgeFor(MIC) = USDT
                joeOut = _convertStep(bridge0, token1, _swap(token0, bridge0, amount0, address(this)), amount1);
            } else if (bridge1 == token0) {
                // eg. WBTC - DSD - and bridgeFor(DSD) = WBTC
                joeOut = _convertStep(token0, bridge1, amount0, _swap(token1, bridge1, amount1, address(this)));
            } else {
                joeOut = _convertStep(
                    bridge0,
                    bridge1, // eg. USDT - DSD - and bridgeFor(DSD) = WBTC
                    _swap(token0, bridge0, amount0, address(this)),
                    _swap(token1, bridge1, amount1, address(this))
                );
            }
        }
    }

    function _swap(
        address fromToken,
        address toToken,
        uint256 amountIn,
        address to
    ) internal returns (uint256 realAmountOut) {
        // Checks
        // X1 - X5: OK
        IJoePair pair = IJoePair(factory.getPair(fromToken, toToken));
        require(address(pair) != address(0), "JoeMakerV2: Cannot convert");

        // Interactions
        // X1 - X5: OK
        (uint256 reserve0, uint256 reserve1, ) = pair.getReserves();

        IERC20(fromToken).safeTransfer(address(pair), amountIn);

        // Added in case fromToken is a reflect token.
        if (fromToken == pair.token0()) {
            amountIn = IERC20(fromToken).balanceOf(address(pair)) - reserve0;
        } else {
            amountIn = IERC20(fromToken).balanceOf(address(pair)) - reserve1;
        }

        uint256 balanceBefore = IERC20(toToken).balanceOf(to);

        uint256 amountInWithFee = amountIn.mul(997);
        if (fromToken == pair.token0()) {
            uint256 amountOut = amountInWithFee.mul(reserve1) / reserve0.mul(1000).add(amountInWithFee);
            pair.swap(0, amountOut, to, new bytes(0));
            // TODO: Add maximum slippage?
        } else {
            uint256 amountOut = amountInWithFee.mul(reserve0) / reserve1.mul(1000).add(amountInWithFee);
            pair.swap(amountOut, 0, to, new bytes(0));
            // TODO: Add maximum slippage?
        }

        realAmountOut = IERC20(toToken).balanceOf(to) - balanceBefore;
    }

    function _toJOE(address token, uint256 amountIn) internal returns (uint256 amountOut) {
        // X1 - X5: OK
        amountOut = _swap(token, joe, amountIn, bar);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */

    function setBridge(address token, address bridge) external onlyOwner {
        // Checks
        require(token != joe && token != wavax && token != bridge, "JoeMakerV2: Invalid bridge");

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_bar","type":"address"},{"internalType":"address","name":"_joe","type":"address"},{"internalType":"address","name":"_wavax","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":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountJOE","type":"uint256"}],"name":"LogConvert","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"},{"inputs":[],"name":"bar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"bridgeFor","outputs":[{"internalType":"address","name":"bridge","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token0","type":"address"},{"internalType":"address","name":"token1","type":"address"}],"name":"convert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"token0","type":"address[]"},{"internalType":"address[]","name":"token1","type":"address[]"}],"name":"convertMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IJoeFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"bridge","type":"address"}],"name":"setBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61010060405234801561001157600080fd5b5060405161293e38038061293e8339818101604052608081101561003457600080fd5b8101908080519060200190929190805190602001909291908051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a38373ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508073ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050505060805160601c60a05160601c60c05160601c60e05160601c6126b161028d60003980610abf5280610d2f528061165852806116af52806118d4528061192b5280611954528061199652806119ed5280611a16525080610a685280611591528061160a5280611710528061178952806117f2528061186b5280611bd4525080610e5152806115e8528061176752806118495280611bf6525080610e075280610e775280611c2752506126b16000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063a761a93911610066578063a761a9391461026f578063bd1b820c146102dd578063c45a015514610341578063e30c397814610375578063febb0f7e146103a95761009e565b8063078dfbe7146100a3578063303e6aa4146100ff5780634e71e0c8146101cd5780638da5cb5b146101d75780639d22ae8c1461020b575b600080fd5b6100fd600480360360608110156100b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291908035151590602001909291905050506103dd565b005b6101cb6004803603604081101561011557600080fd5b810190808035906020019064010000000081111561013257600080fd5b82018360208201111561014457600080fd5b8035906020019184602083028401116401000000008311171561016657600080fd5b90919293919293908035906020019064010000000081111561018757600080fd5b82018360208201111561019957600080fd5b803590602001918460208302840111640100000000831117156101bb57600080fd5b9091929391929390505050610697565b005b6101d56107ba565b005b6101df610981565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026d6004803603604081101561022157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109a5565b005b6102b16004803603602081101561028557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c94565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61033f600480360360408110156102f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d56565b005b610349610e05565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61037d610e29565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103b1610e4f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461049e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b811561065057600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415806104dd5750805b61054f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f4f776e61626c653a207a65726f2061646472657373000000000000000000000081525060200191505060405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3826000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610692565b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610738576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4a6f654d616b657256323a206d7573742075736520454f41000000000000000081525060200191505060405180910390fd5b600084849050905060005b818110156107b2576107a586868381811061075a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1685858481811061078357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610e73565b8080600101915050610743565b505050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610882576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e657281525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015610b0e57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015610b4657508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b610bb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4a6f654d616b657256323a20496e76616c69642062726964676500000000000081525060200191505060405180910390fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f2e103aa707acc565f9a1547341914802b2bfe977fd79c595209f248ae4b0061360405160405180910390a35050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610d51577f000000000000000000000000000000000000000000000000000000000000000090505b919050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610df7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4a6f654d616b657256323a206d7573742075736520454f41000000000000000081525060200191505060405180910390fd5b610e018282610e73565b5050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e6a4390584846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015610f1a57600080fd5b505afa158015610f2e573d6000803e3d6000fd5b505050506040513d6020811015610f4457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ffa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4a6f654d616b657256323a20496e76616c69642070616972000000000000000081525060200191505060405180910390fd5b6110c6818273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561106557600080fd5b505afa158015611079573d6000803e3d6000fd5b505050506040513d602081101561108f57600080fd5b81019080805190602001909291905050508373ffffffffffffffffffffffffffffffffffffffff1661135f9092919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff166389afcb44306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506040805180830381600087803b15801561112e57600080fd5b505af1158015611142573d6000803e3d6000fd5b505050506040513d604081101561115857600080fd5b810190808051906020019092919080519060200190929190505050505060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156111de57600080fd5b505afa1580156111f2573d6000803e3d6000fd5b505050506040513d602081101561120857600080fd5b8101908080519060200190929190505050905060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561128457600080fd5b505afa158015611298573d6000803e3d6000fd5b505050506040513d60208110156112ae57600080fd5b810190808051906020019092919050505090508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd06b1d7ed79b664d17472c6f6997b929f1abe463ccccb4e5b6a0038f2f730c1585856113358b8b8a8a611542565b60405180848152602001838152602001828152602001935050505060405180910390a45050505050565b600060608473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401808373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001925050506040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061142257805182526020820191506020810190506020830392506113ff565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611484576040519150601f19603f3d011682016040523d82523d6000602084013e611489565b606091505b50915091508180156114c957506000815114806114c857508080602001905160208110156114b657600080fd5b81019080805190602001909291905050505b5b61153b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f5361666545524332303a205472616e73666572206661696c656400000000000081525060200191505060405180910390fd5b5050505050565b60008373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561170e57600061158d8385611b4990919063ffffffff16565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156116565761164e7f0000000000000000000000000000000000000000000000000000000000000000827f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661135f9092919063ffffffff16565b809150611708565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156116db576116d47f000000000000000000000000000000000000000000000000000000000000000082611bcc565b9150611707565b60006116e687610c94565b90506116f487828430611c22565b91506117038182846000611542565b9250505b5b50611b41565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156117f0576117cd7f0000000000000000000000000000000000000000000000000000000000000000847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661135f9092919063ffffffff16565b6117e9836117db8685611bcc565b611b4990919063ffffffff16565b9050611b40565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156118d2576118af7f0000000000000000000000000000000000000000000000000000000000000000837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661135f9092919063ffffffff16565b6118cb826118bd8786611bcc565b611b4990919063ffffffff16565b9050611b3f565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156119945761198d7f00000000000000000000000000000000000000000000000000000000000000006119888561197a887f00000000000000000000000000000000000000000000000000000000000000008830611c22565b611b4990919063ffffffff16565b611bcc565b9050611b3e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415611a5657611a4f7f0000000000000000000000000000000000000000000000000000000000000000611a4a84611a3c897f00000000000000000000000000000000000000000000000000000000000000008930611c22565b611b4990919063ffffffff16565b611bcc565b9050611b3d565b6000611a6186610c94565b90506000611a6e86610c94565b90508573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ac257611abb8287611ab58a868a30611c22565b87611542565b9250611b3a565b8673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b1457611b0d878287611b088a868a30611c22565b611542565b9250611b39565b611b368282611b258a868a30611c22565b611b318a868a30611c22565b611542565b92505b5b50505b5b5b5b5b949350505050565b6000818284019150811015611bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f536166654d6174683a20416464204f766572666c6f770000000000000000000081525060200191505060405180910390fd5b92915050565b6000611c1a837f0000000000000000000000000000000000000000000000000000000000000000847f0000000000000000000000000000000000000000000000000000000000000000611c22565b905092915050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e6a4390587876040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015611cca57600080fd5b505afa158015611cde573d6000803e3d6000fd5b505050506040513d6020811015611cf457600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611daa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4a6f654d616b657256323a2043616e6e6f7420636f6e7665727400000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611df357600080fd5b505afa158015611e07573d6000803e3d6000fd5b505050506040513d6060811015611e1d57600080fd5b81019080805190602001909291908051906020019092919080519060200190929190505050506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150611e9283878a73ffffffffffffffffffffffffffffffffffffffff1661135f9092919063ffffffff16565b8273ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611ed857600080fd5b505afa158015611eec573d6000803e3d6000fd5b505050506040513d6020811015611f0257600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415611ff157818873ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611fae57600080fd5b505afa158015611fc2573d6000803e3d6000fd5b505050506040513d6020811015611fd857600080fd5b8101908080519060200190929190505050039550612098565b808873ffffffffffffffffffffffffffffffffffffffff166370a08231856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561205957600080fd5b505afa15801561206d573d6000803e3d6000fd5b505050506040513d602081101561208357600080fd5b81019080805190602001909291905050500395505b60008773ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561210157600080fd5b505afa158015612115573d6000803e3d6000fd5b505050506040513d602081101561212b57600080fd5b8101908080519060200190929190505050905060006121556103e5896125e690919063ffffffff16565b90508473ffffffffffffffffffffffffffffffffffffffff16630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561219d57600080fd5b505afa1580156121b1573d6000803e3d6000fd5b505050506040513d60208110156121c757600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff1614156123a1576000612234826122266103e8886125e690919063ffffffff16565b611b4990919063ffffffff16565b61224785846125e690919063ffffffff16565b8161224e57fe5b0490508573ffffffffffffffffffffffffffffffffffffffff1663022c0d9f6000838b600067ffffffffffffffff8111801561228957600080fd5b506040519080825280601f01601f1916602001820160405280156122bc5781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612334578082015181840152602081019050612319565b50505050905090810190601f1680156123615780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561238357600080fd5b505af1158015612397573d6000803e3d6000fd5b5050505050612533565b60006123ca826123bc6103e8876125e690919063ffffffff16565b611b4990919063ffffffff16565b6123dd86846125e690919063ffffffff16565b816123e457fe5b0490508573ffffffffffffffffffffffffffffffffffffffff1663022c0d9f8260008b600067ffffffffffffffff8111801561241f57600080fd5b506040519080825280601f01601f1916602001820160405280156124525781602001600182028036833780820191505090505b506040518563ffffffff1660e01b8152600401808581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156124ca5780820151818401526020810190506124af565b50505050905090810190601f1680156124f75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561251957600080fd5b505af115801561252d573d6000803e3d6000fd5b50505050505b818973ffffffffffffffffffffffffffffffffffffffff166370a08231896040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561259b57600080fd5b505afa1580156125af573d6000803e3d6000fd5b505050506040513d60208110156125c557600080fd5b81019080805190602001909291905050500395505050505050949350505050565b600080821480612603575082828385029250828161260057fe5b04145b612675576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f536166654d6174683a204d756c204f766572666c6f770000000000000000000081525060200191505060405180910390fd5b9291505056fea26469706673582212201ef3f50217f70701f9ad36a26cb5e3860aaab2415c3ed236dce651c467acd5cb64736f6c634300060c00330000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa1000000000000000000000000057319d41f71e81f3c65f2a47ca4e001ebafd4f330000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7

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

0000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa1000000000000000000000000057319d41f71e81f3c65f2a47ca4e001ebafd4f330000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7

-----Decoded View---------------
Arg [0] : _factory (address): 0x9ad6c38be94206ca50bb0d90783181662f0cfa10
Arg [1] : _bar (address): 0x57319d41f71e81f3c65f2a47ca4e001ebafd4f33
Arg [2] : _joe (address): 0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd
Arg [3] : _wavax (address): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa10
Arg [1] : 00000000000000000000000057319d41f71e81f3c65f2a47ca4e001ebafd4f33
Arg [2] : 0000000000000000000000006e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd
Arg [3] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7


Deployed ByteCode Sourcemap

12144:7927:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10604:555;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;13688:333;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;11241:377;;;:::i;:::-;;9725:20;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;19773:295;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;14447:191;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;13571:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;12310:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;9752:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;12353:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;10604:555;11746:5;;;;;;;;;;11732:19;;:10;:19;;;11724:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10743:6:::1;10739:413;;;10835:1;10815:22;;:8;:22;;;;:34;;;;10841:8;10815:34;10789:117;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;10980:8;10952:37;;10973:5;::::0;::::1;;;;;;;;10952:37;;;;;;;;;;;;11012:8;11004:5;::::0;:16:::1;;;;;;;;;;;;;;;;;;11058:1;11035:12;;:25;;;;;;;;;;;;;;;;;;10739:413;;;11132:8;11117:12;;:23;;;;;;;;;;;;;;;;;;10739:413;10604:555:::0;;;:::o;13688:333::-;14329:9;14315:23;;:10;:23;;;14307:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13885:11:::1;13899:6;;:13;;13885:27;;13928:9;13923:91;13947:3;13943:1;:7;13923:91;;;13972:30;13981:6;;13988:1;13981:9;;;;;;;;;;;;;;;13992:6;;13999:1;13992:9;;;;;;;;;;;;;;;13972:8;:30::i;:::-;13952:3;;;;;;;13923:91;;;;14378:1;13688:333:::0;;;;:::o;11241:377::-;11285:21;11309:12;;;;;;;;;;;11285:36;;11389:13;11375:27;;:10;:27;;;11353:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11528:13;11500:42;;11521:5;;;;;;;;;;11500:42;;;;;;;;;;;;11561:13;11553:5;;:21;;;;;;;;;;;;;;;;;;11608:1;11585:12;;:25;;;;;;;;;;;;;;;;;;11241:377;:::o;9725:20::-;;;;;;;;;;;;:::o;19773:295::-;11746:5;;;;;;;;;;11732:19;;:10;:19;;;11724:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19889:3:::1;19880:12;;:5;:12;;;;:30;;;;;19905:5;19896:14;;:5;:14;;;;19880:30;:49;;;;;19923:6;19914:15;;:5;:15;;;;19880:49;19872:88;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;20011:6;19993:8;:15;20002:5;19993:15;;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;;;;;20053:6;20033:27;;20046:5;20033:27;;;;;;;;;;;;19773:295:::0;;:::o;14447:191::-;14502:14;14538:8;:15;14547:5;14538:15;;;;;;;;;;;;;;;;;;;;;;;;;14529:24;;14586:1;14568:20;;:6;:20;;;14564:67;;;14614:5;14605:14;;14564:67;14447:191;;;:::o;13571:109::-;14329:9;14315:23;;:10;:23;;;14307:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13648:24:::1;13657:6;13665;13648:8;:24::i;:::-;13571:109:::0;;:::o;12310:36::-;;;:::o;9752:27::-;;;;;;;;;;;;;:::o;12353:28::-;;;:::o;14700:929::-;14819:13;14844:7;:15;;;14860:6;14868;14844:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14819:57;;14920:1;14895:27;;14903:4;14895:27;;;;14887:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15031:80;15074:4;15081;:14;;;15104:4;15081:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15046:4;15031:34;;;;:80;;;;;:::i;:::-;15251:4;:9;;;15269:4;15251:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15374:15;15399:6;15392:24;;;15425:4;15392:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15374:57;;15442:15;15467:6;15460:24;;;15493:4;15460:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15442:57;;15548:6;15517:104;;15540:6;15517:104;;15528:10;15517:104;;;15556:7;15565;15574:46;15587:6;15595;15603:7;15612;15574:12;:46::i;:::-;15517:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14700:929;;;;;:::o;3184:397::-;3303:12;3317:17;3346:5;3338:19;;3395:10;3407:2;3411:6;3372:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3338:91;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3302:127;;;;3462:7;:57;;;;;3489:1;3474:4;:11;:16;:44;;;;3505:4;3494:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3474:44;3462:57;3440:133;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3184:397;;;;;:::o;15637:2361::-;15786:14;15852:6;15842:16;;:6;:16;;;15838:2153;;;15875:14;15892:20;15904:7;15892;:11;;:20;;;;:::i;:::-;15875:37;;15941:3;15931:13;;:6;:13;;;15927:431;;;15965:37;15990:3;15995:6;15972:3;15965:24;;;;:37;;;;;:::i;:::-;16030:6;16021:15;;15927:431;;;16072:5;16062:15;;:6;:15;;;16058:300;;;16107:21;16114:5;16121:6;16107;:21::i;:::-;16098:30;;16058:300;;;16169:14;16186:17;16196:6;16186:9;:17::i;:::-;16169:34;;16231:44;16237:6;16245;16253;16269:4;16231:5;:44::i;:::-;16222:53;;16303:39;16316:6;16324;16332;16340:1;16303:12;:39::i;:::-;16294:48;;16058:300;;15927:431;15838:2153;;;;16389:3;16379:13;;:6;:13;;;16375:1616;;;16440:38;16465:3;16470:7;16447:3;16440:24;;;;:38;;;;;:::i;:::-;16502:36;16530:7;16502:23;16509:6;16517:7;16502:6;:23::i;:::-;:27;;:36;;;;:::i;:::-;16493:45;;16375:1616;;;16570:3;16560:13;;:6;:13;;;16556:1435;;;16621:38;16646:3;16651:7;16628:3;16621:24;;;;:38;;;;;:::i;:::-;16683:36;16711:7;16683:23;16690:6;16698:7;16683:6;:23::i;:::-;:27;;:36;;;;:::i;:::-;16674:45;;16556:1435;;;16751:5;16741:15;;:6;:15;;;16737:1254;;;16814:72;16821:5;16828:57;16877:7;16828:44;16834:6;16842:5;16849:7;16866:4;16828:5;:44::i;:::-;:48;;:57;;;;:::i;:::-;16814:6;:72::i;:::-;16805:81;;16737:1254;;;16918:5;16908:15;;:6;:15;;;16904:1087;;;16981:72;16988:5;16995:57;17044:7;16995:44;17001:6;17009:5;17016:7;17033:4;16995:5;:44::i;:::-;:48;;:57;;;;:::i;:::-;16981:6;:72::i;:::-;16972:81;;16904:1087;;;17117:15;17135:17;17145:6;17135:9;:17::i;:::-;17117:35;;17167:15;17185:17;17195:6;17185:9;:17::i;:::-;17167:35;;17232:6;17221:17;;:7;:17;;;17217:763;;;17331:86;17344:7;17353:6;17361:46;17367:6;17375:7;17384;17401:4;17361:5;:46::i;:::-;17409:7;17331:12;:86::i;:::-;17322:95;;17217:763;;;17454:6;17443:17;;:7;:17;;;17439:541;;;17553:86;17566:6;17574:7;17583;17592:46;17598:6;17606:7;17615;17632:4;17592:5;:46::i;:::-;17553:12;:86::i;:::-;17544:95;;17439:541;;;17689:275;17724:7;17754;17830:46;17836:6;17844:7;17853;17870:4;17830:5;:46::i;:::-;17899;17905:6;17913:7;17922;17939:4;17899:5;:46::i;:::-;17689:12;:275::i;:::-;17680:284;;17439:541;17217:763;16904:1087;;;16737:1254;16556:1435;16375:1616;15838:2153;15637:2361;;;;;;:::o;256:139::-;314:9;359:1;353;349;:5;345:9;;;344:16;;336:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;256:139;;;;:::o;19536:173::-;19603:17;19669:32;19675:5;19682:3;19687:8;19697:3;19669:5;:32::i;:::-;19657:44;;19536:173;;;;:::o;18006:1522::-;18148:21;18225:13;18250:7;:15;;;18266:9;18277:7;18250:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18225:61;;18330:1;18305:27;;18313:4;18305:27;;;;18297:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18426:16;18444;18466:4;:16;;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18425:59;;;;;;;;;18497:55;18536:4;18543:8;18504:9;18497:30;;;;:55;;;;;:::i;:::-;18638:4;:11;;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18625:26;;:9;:26;;;18621:220;;;18724:8;18686:9;18679:27;;;18715:4;18679:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;18668:64;;18621:220;;;18821:8;18783:9;18776:27;;;18812:4;18776:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:53;18765:64;;18621:220;18853:21;18884:7;18877:25;;;18903:2;18877:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18853:53;;18919:23;18945:17;18958:3;18945:8;:12;;:17;;;;:::i;:::-;18919:43;;18990:4;:11;;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18977:26;;:9;:26;;;18973:474;;;19020:17;19072:39;19095:15;19072:18;19085:4;19072:8;:12;;:18;;;;:::i;:::-;:22;;:39;;;;:::i;:::-;19040:29;19060:8;19040:15;:19;;:29;;;;:::i;:::-;:71;;;;;;19020:91;;19126:4;:9;;;19136:1;19139:9;19150:2;19164:1;19154:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19126:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18973:474;;;;19244:17;19296:39;19319:15;19296:18;19309:4;19296:8;:12;;:18;;;;:::i;:::-;:22;;:39;;;;:::i;:::-;19264:29;19284:8;19264:15;:19;;:29;;;;:::i;:::-;:71;;;;;;19244:91;;19350:4;:9;;;19360;19371:1;19374:2;19388:1;19378:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19350:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18973:474;;19507:13;19482:7;19475:25;;;19501:2;19475:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:45;19459:61;;18006:1522;;;;;;;;;;;:::o;547:153::-;605:9;640:1;635;:6;:30;;;;664:1;659;654;650;:5;646:9;;;645:15;;;;;;:20;635:30;627:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;547:153;;;;:::o

Swarm Source

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