Contract 0xf039fe26456901f863c873556f40fb207c6c9c18

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x865e8a2fa6a10886d7072cd59a8ca680d33efbaa5eeb0dd07ee64c1bb05cc0c7Beef In240970942022-01-24 7:41:285 mins ago0x0f19af7e10354ec2dc3243eb20f39ebfdc86470e IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.013000063758 30.109258455
0x9e1b15f69b2db7c53c7c7cce823db5ab54eec97e7c8de75452913b6a74ef2894Beef Out And Swa...240964242022-01-24 7:16:0230 mins ago0x2208a5f9a29484e3203a90dbc355f9e4e062cad1 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.01310412405530.068502613
0x7a768f0c10896533929cf93ab5c7208b9078eb54f0216398a68019fa863965d7Beef Out240960352022-01-24 7:02:4044 mins ago0x5fa441d2c6d754725c08841f7d03cdb625203cd6 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.010849020513 30.068597274
0xb5a9ae0a4a4cc17bd16b9bc808edd0f0f53994cd4ffdd081698e2e3db4d4db25Beef In240946562022-01-24 6:15:181 hr 31 mins ago0xad8dfa291ce1719e505ae9d46bd89052ab8007d4 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.01924357611 44.586392349
0x26cae6533bfb13b5ffb1d49efe2e955acd71f32456c233a9deafab57fce2d5f4Beef In240934262022-01-24 5:29:362 hrs 17 mins ago0xad8dfa291ce1719e505ae9d46bd89052ab8007d4 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.003650909983 33.81004402
0x0edc0e40fa60e76bf2c8893627869f05833d13de3270426f01247ca8814ab2adBeef In240933462022-01-24 5:26:502 hrs 20 mins ago0x925cd09730ba1830f429148261ba46712ffdd870 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.013539238123 31.233103701
0xcf42225cfe7fec53eeead72cfde52c75fb9985bae7fa0f9e371712ce06d3ede0Beef In240918412022-01-24 4:34:583 hrs 11 mins ago0xad8dfa291ce1719e505ae9d46bd89052ab8007d4 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.016231834406 37.239996252
0x714384aea0d5b3457da743e29588cef97a91f25cd026c0cd7675fe21cc6b5357Beef In240900262022-01-24 3:32:314 hrs 14 mins ago0xb3fc61cf741c5f86a078d30329f5763a58f7b1d0 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.028798500289 32.250713404
0x722bf1d56f2c172f8d1fe564510418189afc3b3d867509c4d248b7f9cc9c50e9Beef Out240895282022-01-24 3:15:234 hrs 31 mins ago0xc482373030af1187e54f2dee7356043e39889eee IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.01990537186553.724104995
0xdc0598fcb0c00fd3915649d81e85f5f23726005a7f2f87f2cd64643be722ae05Beef In240887002022-01-24 2:42:395 hrs 4 mins ago0xad8dfa291ce1719e505ae9d46bd89052ab8007d4 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.018277414996 41.933756851
0x961593e43a32ce50a3d1dadf7c3703d954762275021b9ed63f228234e725e36eBeef Out And Swa...240841972022-01-23 23:57:127 hrs 49 mins ago0x1727ba5e37209cee3793b87c49c6e89a6a63b695 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.023930777854 58.450436849
0xbeac4e258434e11559f7430c5e1c3aa9547b80b5f5467450095ba50eaa21608cBeef In240824242022-01-23 22:54:068 hrs 52 mins ago0xad8dfa291ce1719e505ae9d46bd89052ab8007d4 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.014248804717 31.867822915
0x52714bfbaac4ff31a2881a553123f0a15b966e00e441840a38d59e1ad29589afBeef In240823962022-01-23 22:53:108 hrs 53 mins ago0x677c40a8d4f9018df9131886f91721455e8d029f IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.014516514402 32.598744698
0x7aea6b71f9e10bcdfd536b4a0f54e7158252e33d8af01d92e1f79f6ff0f07cedBeef In240816362022-01-23 22:27:029 hrs 19 mins ago0x129db7c9ca8e9819db8e72a89d9d4ec0c3b3070d IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.014353783353 32.23606153
0x05faa53d3b6bab0f45e073b5ac64997fafac0f8b0bcca06c1689fbe5476286baBeef In240814652022-01-23 22:21:089 hrs 25 mins ago0xaf93b54a7d9d6b244870275e300f9470eb3baac2 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.021333971409 47.553599646
0xd02f1e9a0c10e388bf2b301e14fc036a79e9928247a073425613c6100f410ef3Beef In ETH240812762022-01-23 22:12:269 hrs 34 mins ago0x3394e8355fb91dd62e2cf16e10bb120d7afc3f7c IN  0xf039fe26456901f863c873556f40fb207c6c9c186 MATIC0.034282381443 38.539882234
0x9ffb51108d4a0401b84df8cac016451ccdf693d8633013333c8061701d9e1fe5Beef In240808112022-01-23 21:56:129 hrs 50 mins ago0xaf93b54a7d9d6b244870275e300f9470eb3baac2 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.001227302079 36.776401755
0xcd46c3230caf84ce1b7099aa8bb4b06c3ed0125404fc6999cbd77fb3b7172a0fBeef In240805932022-01-23 21:48:449 hrs 58 mins ago0x6ae9607e63b94571e3b09f0fce2de14f948fc923 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.030269382914 35.362296171
0xbc59989c9a52d973de3b8fcb69fa09f099dcd6cf431b00076e710d6c2209f2d1Beef In240805382022-01-23 21:46:5010 hrs ago0xf6cbaeb9cb0b57eeca7335197c92e9539fff4d05 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.017123379556 38.457726313
0x5606e73d3689733d1820ccab2a1d94eafaccc9dafac90c9131017fbefda68b8dBeef In240802302022-01-23 21:36:1410 hrs 10 mins ago0x677c40a8d4f9018df9131886f91721455e8d029f IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.01778625692 38.335920322
0xb6faf16e8a9e89458fbcdb11fa190ae211bf89206d7483fe4426eac0fdf2ebf1Beef In240791142022-01-23 20:57:5110 hrs 49 mins ago0xb89dd038b8f64d81e1b848353ac9177ec1aeefc5 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.018667941878 41.925652656
0x8534499a0d904ef1348e644487ffa0a9a079fe8e28e2a7f1760ba28f799b4e58Beef In240788002022-01-23 20:47:0310 hrs 59 mins ago0x6c18363bc66fe7b78abb20475c33a17be5b820ab IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.021362150
0xbd429b57538562388a6f4230a4766932533f8958cb25203130735159552f10d3Beef In ETH240787942022-01-23 20:46:5111 hrs ago0x2ae9dcaf95a841670c43c0b5001e3db990ddc460 IN  0xf039fe26456901f863c873556f40fb207c6c9c18225 MATIC0.003874521953 40.103941062
0xdb8034c926aed579784f23353b42fca37d6126c9ec286f16599eed51d01eee00Beef In240787532022-01-23 20:45:2511 hrs 1 min ago0x6c18363bc66fe7b78abb20475c33a17be5b820ab IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.022513550
0x516f5850fd16b57f5e701a5ccb0113546d33eec66ecb46bcb9f047a830975925Beef In240784442022-01-23 20:34:4711 hrs 12 mins ago0xa3b53da8a5138bd60ce0aa49c197faadf30fc226 IN  0xf039fe26456901f863c873556f40fb207c6c9c180 MATIC0.028201783908 63.337362208
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xd02f1e9a0c10e388bf2b301e14fc036a79e9928247a073425613c6100f410ef3240812762022-01-23 22:12:269 hrs 34 mins ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6 MATIC
0xbd429b57538562388a6f4230a4766932533f8958cb25203130735159552f10d3240787942022-01-23 20:46:5111 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token225 MATIC
0xd263897bdbf5c8860a4e57c445e25aef714ea30d1ba1220f3f0ba8c5f9186ae6240744822022-01-23 18:17:3713 hrs 29 mins ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6.5 MATIC
0xaace9cfdc9f02d8792b9109e911b5ef595941804f8cddb9a1fa8c9cd63ff4a87240598742022-01-23 8:54:4522 hrs 52 mins ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token225 MATIC
0xdb15d84cfdc2560945ffea13ab4f3547a7cee62d965c5326a71417df8466caf2240513592022-01-23 3:55:221 day 3 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token100 MATIC
0x5b792182d24067a053f8f30320c10093a747c8a4d1fdaf42e0656540de519ffd240435512022-01-22 23:20:101 day 8 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6 MATIC
0x18b0f8c6e853c887b4233862771e02be2f257cafe229c2f1e894f52ff58b2a60240435512022-01-22 23:20:101 day 8 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6 MATIC
0x93e6c0b6020bfcdc1d067c27022fb1f204074422a8337cf437af2414d825f3cc240433382022-01-22 23:12:521 day 8 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6 MATIC
0x39282adfc01c05f69c138adad477dbdf08daf95b236bca0335e8d916de6a34a9240420162022-01-22 22:25:081 day 9 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token6 MATIC
0x845e56085a0de38930768acac1dc4fd29d166a79339ef34aff2b27c91ae945ad240382702022-01-22 20:07:301 day 11 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c180x530115e78f7bc2fe235666651f9113db9cece5a24.250360830030521577 MATIC
0x845e56085a0de38930768acac1dc4fd29d166a79339ef34aff2b27c91ae945ad240382702022-01-22 20:07:301 day 11 hrs ago Polygon: WMATIC Token 0xf039fe26456901f863c873556f40fb207c6c9c184.250360830030521577 MATIC
0xf19950589364db395e04629813277548f6b4f5d67cd1cabb6c2876eefe7ed570240354122022-01-22 18:25:021 day 13 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token4 MATIC
0x29830389ba35237aa204c13603de908860b0cce99d0f25164236fd15b650b5c2240330902022-01-22 17:00:291 day 14 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token52.41233975 MATIC
0x8dd4edf8a48a4998dbd647ed57d42b6f6c814c48afb4671e8e36077c1e04f144239925972022-01-21 16:21:122 days 15 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c180xed0f5c184146a1d7987e419a5b1399200ba65962111.052286774719492863 MATIC
0x8dd4edf8a48a4998dbd647ed57d42b6f6c814c48afb4671e8e36077c1e04f144239925972022-01-21 16:21:122 days 15 hrs ago Polygon: WMATIC Token 0xf039fe26456901f863c873556f40fb207c6c9c18111.052286774719492863 MATIC
0xf0434492f0b761e8fd5bfe5687ce93cec7d12a2e30b235a7f16f63b67263e84e239750782022-01-21 5:39:493 days 2 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token15.17184715 MATIC
0x62b54ffd7ba144920f0d225fffdae290ff1dfab17ff882c030c1d85592317680239750782022-01-21 5:39:493 days 2 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token30.51491432 MATIC
0x0024dc4d94db5d4130e4a695f54484e84ec900e5e83c4ea60262a5bf4d67d21b239621262022-01-20 21:53:473 days 9 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c180xf7d1e2e39c9918ef7539225c40696b886171bd2220.602306468678814862 MATIC
0x0024dc4d94db5d4130e4a695f54484e84ec900e5e83c4ea60262a5bf4d67d21b239621262022-01-20 21:53:473 days 9 hrs ago Polygon: WMATIC Token 0xf039fe26456901f863c873556f40fb207c6c9c1820.602306468678814862 MATIC
0x96871bb578e6f1c4880fb36e36d2f93e2f009a02b38b8addead130b6150bcaf7238934462022-01-19 4:43:065 days 3 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token60 MATIC
0x2742e280cf46ccbcd1127f2daf33266e4fda1ce87d59d308a082fed4623244e4238933942022-01-19 4:41:185 days 3 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c18 Polygon: WMATIC Token62 MATIC
0xe1864c83b65c4d9ccc892cd889c89e304c0d0f9bc2544adb4661d9ebc80ff2d7236721812022-01-13 13:13:1310 days 18 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c180xbbc93b44f292568292dd28a4da059d3a6224078b8.582222151919789697 MATIC
0xe1864c83b65c4d9ccc892cd889c89e304c0d0f9bc2544adb4661d9ebc80ff2d7236721812022-01-13 13:13:1310 days 18 hrs ago Polygon: WMATIC Token 0xf039fe26456901f863c873556f40fb207c6c9c188.582222151919789697 MATIC
0x8ed10b6b0a1d3f1442310dc4ca05c732fc192d9753ab5b6b99ba1d0fd0564a61236579962022-01-13 4:29:0911 days 3 hrs ago 0xf039fe26456901f863c873556f40fb207c6c9c180x5a400f772931ee27e92bfecb15ae684b90f3b1b32,560.91306505954428315 MATIC
0x8ed10b6b0a1d3f1442310dc4ca05c732fc192d9753ab5b6b99ba1d0fd0564a61236579962022-01-13 4:29:0911 days 3 hrs ago Polygon: WMATIC Token 0xf039fe26456901f863c873556f40fb207c6c9c182,560.91306505954428315 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeefyUniV2Zap

Compiler Version
v0.7.0+commit.9e61f92b

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-09
*/

// SPDX-License-Identifier: MIT
// File: contracts/BIFI/zap/IUniswapV2Pair.sol

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: contracts/BIFI/zap/Babylonian.sol


pragma solidity >=0.4.0;

// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
    // credit for this implementation goes to
    // https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687
    function sqrt(uint256 x) internal pure returns (uint256) {
        if (x == 0) return 0;
        // this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);
        // however that code costs significantly more gas
        uint256 xx = x;
        uint256 r = 1;
        if (xx >= 0x100000000000000000000000000000000) {
            xx >>= 128;
            r <<= 64;
        }
        if (xx >= 0x10000000000000000) {
            xx >>= 64;
            r <<= 32;
        }
        if (xx >= 0x100000000) {
            xx >>= 32;
            r <<= 16;
        }
        if (xx >= 0x10000) {
            xx >>= 16;
            r <<= 8;
        }
        if (xx >= 0x100) {
            xx >>= 8;
            r <<= 4;
        }
        if (xx >= 0x10) {
            xx >>= 4;
            r <<= 2;
        }
        if (xx >= 0x8) {
            r <<= 1;
        }
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1;
        r = (r + x / r) >> 1; // Seven iterations should be enough
        uint256 r1 = x / r;
        return (r < r1 ? r : r1);
    }
}

// File: contracts/BIFI/zap/IERC20.sol


pragma solidity >=0.6.0 <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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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: contracts/BIFI/zap/SafeMath.sol


pragma solidity >=0.6.0 <0.8.0;

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

        return c;
    }

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

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

// File: contracts/BIFI/zap/Address.sol


pragma solidity >=0.6.2 <0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: contracts/BIFI/zap/SafeERC20.sol


pragma solidity >=0.6.0 <0.8.0;




/**
 * @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 SafeMath for uint256;
    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// File: contracts/BIFI/zap/LowGasSafeMath.sol

pragma solidity >=0.7.0;

/// @title Optimized overflow and underflow safe math operations
/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost
library LowGasSafeMath {
    /// @notice Returns x + y, reverts if sum overflows uint256
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x);
    }

    /// @notice Returns x - y, reverts if underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x);
    }

    /// @notice Returns x * y, reverts if overflows
    /// @param x The multiplicand
    /// @param y The multiplier
    /// @return z The product of x and y
    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(x == 0 || (z = x * y) / x == y);
    }

    /// @notice Returns x + y, reverts if overflows or underflows
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x + y) >= x == (y >= 0));
    }

    /// @notice Returns x - y, reverts if overflows or underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x - y) <= x == (y >= 0));
    }
}

// File: contracts/BIFI/zap/IUniswapV2Router01.sol

pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

// File: contracts/BIFI/zap/IUniswapV2Router02.sol

pragma solidity >=0.6.2;


interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

// File: contracts/BIFI/zap/BeefyUniV2Zap.sol


// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.

// @author Wivern for Beefy.Finance
// @notice This contract adds liquidity to Uniswap V2 compatible liquidity pair pools and stake.

pragma solidity >=0.7.0;






interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint256 wad) external;
}

interface IBeefyVaultV6 is IERC20 {
    function deposit(uint256 amount) external;
    function withdraw(uint256 shares) external;
    function want() external pure returns (address);
}

contract BeefyUniV2Zap {
    using LowGasSafeMath for uint256;
    using SafeERC20 for IERC20;
    using SafeERC20 for IBeefyVaultV6;

    IUniswapV2Router02 public immutable router;
    address public immutable WETH;
    uint256 public constant minimumAmount = 1000;

    constructor(address _router, address _WETH) {
        router = IUniswapV2Router02(_router);
        WETH = _WETH;
    }

    receive() external payable {
        assert(msg.sender == WETH);
    }

    function beefInETH (address beefyVault, uint256 tokenAmountOutMin) external payable {
        require(msg.value >= minimumAmount, 'Beefy: Insignificant input amount');

        IWETH(WETH).deposit{value: msg.value}();

        _swapAndStake(beefyVault, tokenAmountOutMin, WETH);
    }

    function beefIn (address beefyVault, uint256 tokenAmountOutMin, address tokenIn, uint256 tokenInAmount) external {
        require(tokenInAmount >= minimumAmount, 'Beefy: Insignificant input amount');
        require(IERC20(tokenIn).allowance(msg.sender, address(this)) >= tokenInAmount, 'Beefy: Input token is not approved');

        IERC20(tokenIn).safeTransferFrom(msg.sender, address(this), tokenInAmount);

        _swapAndStake(beefyVault, tokenAmountOutMin, tokenIn);
    }

    function beefOut (address beefyVault, uint256 withdrawAmount) external {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        IERC20(beefyVault).safeTransferFrom(msg.sender, address(this), withdrawAmount);
        vault.withdraw(withdrawAmount);

        if (pair.token0() != WETH && pair.token1() != WETH) {
            return _removeLiqudity(address(pair), msg.sender);
        }

        _removeLiqudity(address(pair), address(this));

        address[] memory tokens = new address[](2);
        tokens[0] = pair.token0();
        tokens[1] = pair.token1();

        _returnAssets(tokens);
    }

    function beefOutAndSwap(address beefyVault, uint256 withdrawAmount, address desiredToken, uint256 desiredTokenOutMin) external {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);
        address token0 = pair.token0();
        address token1 = pair.token1();
        require(token0 == desiredToken || token1 == desiredToken, 'Beefy: desired token not present in liqudity pair');

        vault.safeTransferFrom(msg.sender, address(this), withdrawAmount);
        vault.withdraw(withdrawAmount);
        _removeLiqudity(address(pair), address(this));

        address swapToken = token1 == desiredToken ? token0 : token1;
        address[] memory path = new address[](2);
        path[0] = swapToken;
        path[1] = desiredToken;

        _approveTokenIfNeeded(path[0], address(router));
        router.swapExactTokensForTokens(IERC20(swapToken).balanceOf(address(this)), desiredTokenOutMin, path, address(this), block.timestamp);

        _returnAssets(path);
    }

    function _removeLiqudity(address pair, address to) private {
        IERC20(pair).safeTransfer(pair, IERC20(pair).balanceOf(address(this)));
        (uint256 amount0, uint256 amount1) = IUniswapV2Pair(pair).burn(to);

        require(amount0 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT');
        require(amount1 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT');
    }

    function _getVaultPair (address beefyVault) private view returns (IBeefyVaultV6 vault, IUniswapV2Pair pair) {
        vault = IBeefyVaultV6(beefyVault);
        pair = IUniswapV2Pair(vault.want());
        require(pair.factory() == router.factory(), 'Beefy: Incompatible liquidity pair factory');
    }

    function _swapAndStake(address beefyVault, uint256 tokenAmountOutMin, address tokenIn) private {
        (IBeefyVaultV6 vault, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
        require(reserveA > minimumAmount && reserveB > minimumAmount, 'Beefy: Liquidity pair reserves too low');

        bool isInputA = pair.token0() == tokenIn;
        require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair');

        address[] memory path = new address[](2);
        path[0] = tokenIn;
        path[1] = isInputA ? pair.token1() : pair.token0();

        uint256 fullInvestment = IERC20(tokenIn).balanceOf(address(this));
        uint256 swapAmountIn;
        if (isInputA) {
            swapAmountIn = _getSwapAmount(fullInvestment, reserveA, reserveB);
        } else {
            swapAmountIn = _getSwapAmount(fullInvestment, reserveB, reserveA);
        }

        _approveTokenIfNeeded(path[0], address(router));
        uint256[] memory swapedAmounts = router
            .swapExactTokensForTokens(swapAmountIn, tokenAmountOutMin, path, address(this), block.timestamp);

        _approveTokenIfNeeded(path[1], address(router));
        (,, uint256 amountLiquidity) = router
            .addLiquidity(path[0], path[1], fullInvestment.sub(swapedAmounts[0]), swapedAmounts[1], 1, 1, address(this), block.timestamp);

        _approveTokenIfNeeded(address(pair), address(vault));
        vault.deposit(amountLiquidity);

        vault.safeTransfer(msg.sender, vault.balanceOf(address(this)));
        _returnAssets(path);
    }

    function _returnAssets(address[] memory tokens) private {
        uint256 balance;
        for (uint256 i; i < tokens.length; i++) {
            balance = IERC20(tokens[i]).balanceOf(address(this));
            if (balance > 0) {
                if (tokens[i] == WETH) {
                    IWETH(WETH).withdraw(balance);
                    (bool success,) = msg.sender.call{value: balance}(new bytes(0));
                    require(success, 'Beefy: ETH transfer failed');
                } else {
                    IERC20(tokens[i]).safeTransfer(msg.sender, balance);
                }
            }
        }
    }

    function _getSwapAmount(uint256 investmentA, uint256 reserveA, uint256 reserveB) private view returns (uint256 swapAmount) {
        uint256 halfInvestment = investmentA / 2;
        uint256 nominator = router.getAmountOut(halfInvestment, reserveA, reserveB);
        uint256 denominator = router.quote(halfInvestment, reserveA.add(halfInvestment), reserveB.sub(nominator));
        swapAmount = investmentA.sub(Babylonian.sqrt(halfInvestment * halfInvestment * nominator / denominator));
    }

    function estimateSwap(address beefyVault, address tokenIn, uint256 fullInvestmentIn) public view returns(uint256 swapAmountIn, uint256 swapAmountOut, address swapTokenOut) {
        checkWETH();
        (, IUniswapV2Pair pair) = _getVaultPair(beefyVault);

        bool isInputA = pair.token0() == tokenIn;
        require(isInputA || pair.token1() == tokenIn, 'Beefy: Input token not present in liqudity pair');

        (uint256 reserveA, uint256 reserveB,) = pair.getReserves();
        (reserveA, reserveB) = isInputA ? (reserveA, reserveB) : (reserveB, reserveA);

        swapAmountIn = _getSwapAmount(fullInvestmentIn, reserveA, reserveB);
        swapAmountOut = router.getAmountOut(swapAmountIn, reserveA, reserveB);
        swapTokenOut = isInputA ? pair.token1() : pair.token0();
    }

    function checkWETH() public view returns (bool isValid) {
        isValid = WETH == router.WETH();
        require(isValid, 'Beefy: WETH address not matching Router.WETH()');
    }

    function _approveTokenIfNeeded(address token, address spender) private {
        if (IERC20(token).allowance(address(this), spender) == 0) {
            IERC20(token).safeApprove(spender, uint256(~0));
        }
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"tokenInAmount","type":"uint256"}],"name":"beefIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"tokenAmountOutMin","type":"uint256"}],"name":"beefInETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"beefOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"internalType":"address","name":"desiredToken","type":"address"},{"internalType":"uint256","name":"desiredTokenOutMin","type":"uint256"}],"name":"beefOutAndSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkWETH","outputs":[{"internalType":"bool","name":"isValid","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beefyVault","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"fullInvestmentIn","type":"uint256"}],"name":"estimateSwap","outputs":[{"internalType":"uint256","name":"swapAmountIn","type":"uint256"},{"internalType":"uint256","name":"swapAmountOut","type":"uint256"},{"internalType":"address","name":"swapTokenOut","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405234801561001057600080fd5b50604051612a9e380380612a9e8339818101604052604081101561003357600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c6129cc6100d260003980609a5280610b4d5280610bc65280610c775280610d6b5280610e0c528061101d52806117f752806118445250806104b252806108c152806108e75280610bf252806111665280611210528061134a52806113f65280611e085280611fb252506129cc6000f3fe60806040526004361061008a5760003560e01c8063a28c361b11610059578063a28c361b146101ce578063ad5c464814610207578063bb0c829814610238578063f5d07b601461025f578063f887ea40146102a6576100c3565b80633f2f869a146100c857806351c9cf911461013257806370fae20d146101795780638437fabe146101a5576100c3565b366100c357336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100c157fe5b005b600080fd5b3480156100d457600080fd5b5061010b600480360360608110156100eb57600080fd5b506001600160a01b038135811691602081013590911690604001356102bb565b6040805193845260208401929092526001600160a01b031682820152519081900360600190f35b34801561013e57600080fd5b506100c16004803603608081101561015557600080fd5b506001600160a01b0381358116916020810135916040820135169060600135610636565b6100c16004803603604081101561018f57600080fd5b506001600160a01b038135169060200135610b0a565b3480156101b157600080fd5b506101ba610bee565b604080519115158252519081900360200190f35b3480156101da57600080fd5b506100c1600480360360408110156101f157600080fd5b506001600160a01b038135169060200135610ce5565b34801561021357600080fd5b5061021c61101b565b604080516001600160a01b039092168252519081900360200190f35b34801561024457600080fd5b5061024d61103f565b60408051918252519081900360200190f35b34801561026b57600080fd5b506100c16004803603608081101561028257600080fd5b506001600160a01b0381358116916020810135916040820135169060600135611045565b3480156102b257600080fd5b5061021c611164565b60008060006102c8610bee565b5060006102d487611188565b9150506000866001600160a01b0316826001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d602081101561034657600080fd5b50516001600160a01b031614905080806103d55750866001600160a01b0316826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561039e57600080fd5b505afa1580156103b2573d6000803e3d6000fd5b505050506040513d60208110156103c857600080fd5b50516001600160a01b0316145b6104105760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b600080836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561044c57600080fd5b505afa158015610460573d6000803e3d6000fd5b505050506040513d606081101561047657600080fd5b5080516020909101516001600160701b0391821693501690508261049b57808261049e565b81815b90925090506104ae88838361133d565b96507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48884846040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d602081101561054e57600080fd5b50519550826105c157836001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561059057600080fd5b505afa1580156105a4573d6000803e3d6000fd5b505050506040513d60208110156105ba57600080fd5b5051610627565b836001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156105fa57600080fd5b505afa15801561060e573d6000803e3d6000fd5b505050506040513d602081101561062457600080fd5b50515b94505050505093509350939050565b60008061064286611188565b915091506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561068157600080fd5b505afa158015610695573d6000803e3d6000fd5b505050506040513d60208110156106ab57600080fd5b50516040805163d21220a760e01b815290519192506000916001600160a01b0385169163d21220a7916004808301926020929190829003018186803b1580156106f357600080fd5b505afa158015610707573d6000803e3d6000fd5b505050506040513d602081101561071d57600080fd5b505190506001600160a01b03828116908716148061074c5750856001600160a01b0316816001600160a01b0316145b6107875760405162461bcd60e51b81526004018080602001828103825260318152602001806128b66031913960400191505060405180910390fd5b61079c6001600160a01b03851633308a6114cb565b836001600160a01b0316632e1a7d4d886040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156107e257600080fd5b505af11580156107f6573d6000803e3d6000fd5b505050506108048330611525565b6000866001600160a01b0316826001600160a01b0316146108255781610827565b825b604080516002808252606080830184529394509091602083019080368337019050509050818160008151811061085957fe5b60200260200101906001600160a01b031690816001600160a01b031681525050878160018151811061088757fe5b60200260200101906001600160a01b031690816001600160a01b0316815250506108e5816000815181106108b757fe5b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006116be565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561096157600080fd5b505afa158015610975573d6000803e3d6000fd5b505050506040513d602081101561098b57600080fd5b50516040516001600160e01b031960e084901b16815260048101828152602482018c90523060648301819052426084840181905260a060448501908152885160a486015288518f958a95929160c4909101906020878101910280838360005b83811015610a025781810151838201526020016109ea565b505050509050019650505050505050600060405180830381600087803b158015610a2b57600080fd5b505af1158015610a3f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610a6857600080fd5b8101908080516040519392919084640100000000821115610a8857600080fd5b908301906020820185811115610a9d57600080fd5b8251866020820283011164010000000082111715610aba57600080fd5b82525081516020918201928201910280838360005b83811015610ae7578181015183820152602001610acf565b5050505090500160405250505050610afe81611754565b50505050505050505050565b6103e8341015610b4b5760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610ba657600080fd5b505af1158015610bba573d6000803e3d6000fd5b5050505050610bea82827f0000000000000000000000000000000000000000000000000000000000000000611a02565b5050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6020811015610c7357600080fd5b50517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116911614905080610ce25760405162461bcd60e51b815260040180806020018281038252602e8152602001806127c5602e913960400191505060405180910390fd5b90565b600080610cf184611188565b9092509050610d0b6001600160a01b0385163330866114cb565b816001600160a01b0316632e1a7d4d846040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610dcc57600080fd5b505afa158015610de0573d6000803e3d6000fd5b505050506040513d6020811015610df657600080fd5b50516001600160a01b031614801590610ea557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6d57600080fd5b505afa158015610e81573d6000803e3d6000fd5b505050506040513d6020811015610e9757600080fd5b50516001600160a01b031614155b15610ebb57610eb48133611525565b5050610bea565b610ec58130611525565b6040805160028082526060808301845292602083019080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610f1e57600080fd5b505afa158015610f32573d6000803e3d6000fd5b505050506040513d6020811015610f4857600080fd5b505181518290600090610f5757fe5b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610fb057600080fd5b505afa158015610fc4573d6000803e3d6000fd5b505050506040513d6020811015610fda57600080fd5b5051815182906001908110610feb57fe5b60200260200101906001600160a01b031690816001600160a01b03168152505061101481611754565b5050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6103e881565b6103e88110156110865760405162461bcd60e51b81526004018080602001828103825260218152602001806127a46021913960400191505060405180910390fd5b60408051636eb1769f60e11b8152336004820152306024820152905182916001600160a01b0385169163dd62ed3e91604480820192602092909190829003018186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d60208110156110ff57600080fd5b5051101561113e5760405162461bcd60e51b81526004018080602001828103825260228152602001806128656022913960400191505060405180910390fd5b6111536001600160a01b0383163330846114cb565b61115e848484611a02565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c757600080fd5b505afa1580156111db573d6000803e3d6000fd5b505050506040513d60208110156111f157600080fd5b50516040805163c45a015560e01b815290519192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c45a015591600480820192602092909190829003018186803b15801561125757600080fd5b505afa15801561126b573d6000803e3d6000fd5b505050506040513d602081101561128157600080fd5b50516040805163c45a015560e01b815290516001600160a01b039283169284169163c45a0155916004808301926020929190829003018186803b1580156112c757600080fd5b505afa1580156112db573d6000803e3d6000fd5b505050506040513d60208110156112f157600080fd5b50516001600160a01b0316146113385760405162461bcd60e51b815260040180806020018281038252602a8152602001806128e7602a913960400191505060405180910390fd5b915091565b60008060028504905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663054d50d48387876040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b1580156113bc57600080fd5b505afa1580156113d0573d6000803e3d6000fd5b505050506040513d60208110156113e657600080fd5b5051905060006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ad615dec84611426898261220b565b6114308987612221565b6040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b15801561147257600080fd5b505afa158015611486573d6000803e3d6000fd5b505050506040513d602081101561149c57600080fd5b505190506114c06114b9828580028502816114b357fe5b04612231565b8890612221565b979650505050505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261115e908590612379565b6115b382836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561157657600080fd5b505afa15801561158a573d6000803e3d6000fd5b505050506040513d60208110156115a057600080fd5b50516001600160a01b038516919061242a565b600080836001600160a01b03166389afcb44846040518263ffffffff1660e01b815260040180826001600160a01b031681526020019150506040805180830381600087803b15801561160457600080fd5b505af1158015611618573d6000803e3d6000fd5b505050506040513d604081101561162e57600080fd5b50805160209091015190925090506103e882101561167d5760405162461bcd60e51b81526004018080602001828103825260268152602001806129116026913960400191505060405180910390fd5b6103e881101561115e5760405162461bcd60e51b81526004018080602001828103825260268152602001806128196026913960400191505060405180910390fd5b60408051636eb1769f60e11b81523060048201526001600160a01b03838116602483015291519184169163dd62ed3e91604480820192602092909190829003018186803b15801561170e57600080fd5b505afa158015611722573d6000803e3d6000fd5b505050506040513d602081101561173857600080fd5b5051610bea57610bea6001600160a01b0383168260001961247c565b6000805b82518110156119fd5782818151811061176d57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b5051915081156119f5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683828151811061182b57fe5b60200260200101516001600160a01b031614156119c4577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156118a857600080fd5b505af11580156118bc573d6000803e3d6000fd5b505060408051600080825260208201928390528151909450339350869290819081908082805b602083106119015780518252601f1990920191602091820191016118e2565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611963576040519150601f19603f3d011682016040523d82523d6000602084013e611968565b606091505b50509050806119be576040805162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c6564000000000000604482015290519081900360640190fd5b506119f5565b6119f533838584815181106119d557fe5b60200260200101516001600160a01b031661242a9092919063ffffffff16565b600101611758565b505050565b600080611a0e85611188565b91509150600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a4e57600080fd5b505afa158015611a62573d6000803e3d6000fd5b505050506040513d6060811015611a7857600080fd5b5080516020909101516001600160701b0391821693501690506103e882118015611aa357506103e881115b611ade5760405162461bcd60e51b81526004018080602001828103825260268152602001806127f36026913960400191505060405180910390fd5b6000856001600160a01b0316846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2357600080fd5b505afa158015611b37573d6000803e3d6000fd5b505050506040513d6020811015611b4d57600080fd5b50516001600160a01b03161490508080611bdc5750856001600160a01b0316846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611ba557600080fd5b505afa158015611bb9573d6000803e3d6000fd5b505050506040513d6020811015611bcf57600080fd5b50516001600160a01b0316145b611c175760405162461bcd60e51b815260040180806020018281038252602f815260200180612887602f913960400191505060405180910390fd5b60408051600280825260608083018452926020830190803683370190505090508681600081518110611c4557fe5b60200260200101906001600160a01b031690816001600160a01b03168152505081611cd457846001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015611ca357600080fd5b505afa158015611cb7573d6000803e3d6000fd5b505050506040513d6020811015611ccd57600080fd5b5051611d3a565b846001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015611d0d57600080fd5b505afa158015611d21573d6000803e3d6000fd5b505050506040513d6020811015611d3757600080fd5b50515b81600181518110611d4757fe5b6001600160a01b03928316602091820292909201810191909152604080516370a0823160e01b815230600482015290516000938b16926370a082319260248082019391829003018186803b158015611d9e57600080fd5b505afa158015611db2573d6000803e3d6000fd5b505050506040513d6020811015611dc857600080fd5b5051905060008315611de657611ddf82878761133d565b9050611df4565b611df182868861133d565b90505b611e04836000815181106108b757fe5b60607f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166338ed1739838d8730426040518663ffffffff1660e01b81526004018086815260200185815260200180602001846001600160a01b03168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015611eaa578181015183820152602001611e92565b505050509050019650505050505050600060405180830381600087803b158015611ed357600080fd5b505af1158015611ee7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611f1057600080fd5b8101908080516040519392919084640100000000821115611f3057600080fd5b908301906020820185811115611f4557600080fd5b8251866020820283011164010000000082111715611f6257600080fd5b82525081516020918201928201910280838360005b83811015611f8f578181015183820152602001611f77565b505050509050016040525050509050611fae846001815181106108b757fe5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e8e3370086600081518110611fec57fe5b60200260200101518760018151811061200157fe5b60200260200101516120308660008151811061201957fe5b60200260200101518961222190919063ffffffff16565b8660018151811061203d57fe5b602002602001015160018030426040518963ffffffff1660e01b815260040180896001600160a01b03168152602001886001600160a01b03168152602001878152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200198505050505050505050606060405180830381600087803b1580156120cc57600080fd5b505af11580156120e0573d6000803e3d6000fd5b505050506040513d60608110156120f657600080fd5b50604001519050612107898b6116be565b896001600160a01b031663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561214d57600080fd5b505af1158015612161573d6000803e3d6000fd5b505050506121f3338b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156121b657600080fd5b505afa1580156121ca573d6000803e3d6000fd5b505050506040513d60208110156121e057600080fd5b50516001600160a01b038d16919061242a565b6121fc85611754565b50505050505050505050505050565b8082018281101561221b57600080fd5b92915050565b8082038281111561221b57600080fd5b60008161224057506000612374565b816001600160801b82106122595760809190911c9060401b5b6801000000000000000082106122745760409190911c9060201b5b640100000000821061228b5760209190911c9060101b5b6201000082106122a05760109190911c9060081b5b61010082106122b45760089190911c9060041b5b601082106122c75760049190911c9060021b5b600882106122d35760011b5b60018185816122de57fe5b048201901c905060018185816122f057fe5b048201901c9050600181858161230257fe5b048201901c9050600181858161231457fe5b048201901c9050600181858161232657fe5b048201901c9050600181858161233857fe5b048201901c9050600181858161234a57fe5b048201901c9050600081858161235c57fe5b04905080821061236c578061236e565b815b93505050505b919050565b60606123ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661258f9092919063ffffffff16565b8051909150156119fd578080602001905160208110156123ed57600080fd5b50516119fd5760405162461bcd60e51b815260040180806020018281038252602a815260200180612937602a913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526119fd908490612379565b801580612502575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156124d457600080fd5b505afa1580156124e8573d6000803e3d6000fd5b505050506040513d60208110156124fe57600080fd5b5051155b61253d5760405162461bcd60e51b81526004018080602001828103825260368152602001806129616036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526119fd908490612379565b606061259e84846000856125a8565b90505b9392505050565b6060824710156125e95760405162461bcd60e51b815260040180806020018281038252602681526020018061283f6026913960400191505060405180910390fd5b6125f2856126f9565b612643576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106126825780518252601f199092019160209182019101612663565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146126e4576040519150601f19603f3d011682016040523d82523d6000602084013e6126e9565b606091505b50915091506114c08282866126ff565b3b151590565b6060831561270e5750816125a1565b82511561271e5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612768578181015183820152602001612750565b50505050905090810190601f1680156127955780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e7442656566793a20574554482061646472657373206e6f74206d61746368696e6720526f757465722e57455448282942656566793a204c6971756964697479207061697220726573657276657320746f6f206c6f77556e69737761705632526f757465723a20494e53554646494349454e545f425f414d4f554e54416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c42656566793a20496e70757420746f6b656e206973206e6f7420617070726f76656442656566793a20496e70757420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a206465736972656420746f6b656e206e6f742070726573656e7420696e206c69717564697479207061697242656566793a20496e636f6d70617469626c65206c6971756964697479207061697220666163746f7279556e69737761705632526f757465723a20494e53554646494349454e545f415f414d4f554e545361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a26469706673582212201820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e64736f6c634300070000330000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b479975060000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270

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

0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b479975060000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270

-----Decoded View---------------
Arg [0] : _router (address): 0x1b02da8cb0d097eb8d57a175b88c7d8b47997506
Arg [1] : _WETH (address): 0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001b02da8cb0d097eb8d57a175b88c7d8b47997506
Arg [1] : 0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270


Deployed ByteCode Sourcemap

30949:7754:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31406:10;-1:-1:-1;;;;;31420:4:0;31406:18;;31399:26;;;;30949:7754;;;;;37469:809;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;37469:809:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;-1:-1:-1;;;;;37469:809:0;;;;;;;;;;;;;;32894:1017;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32894:1017:0;;;;;;;;;;;;;;;;;;;;:::i;31441:290::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;31441:290:0;;;;;;;;:::i;38286:183::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;32235:651;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;32235:651:0;;;;;;;;:::i;31142:29::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;31142:29:0;;;;;;;;;;;;;;31178:44;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;31739:488;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;31739:488:0;;;;;;;;;;;;;;;;;;;;:::i;31093:42::-;;;;;;;;;;;;;:::i;37469:809::-;37574:20;37596:21;37619:20;37652:11;:9;:11::i;:::-;;37677:19;37700:25;37714:10;37700:13;:25::i;:::-;37674:51;;;37738:13;37771:7;-1:-1:-1;;;;;37754:24:0;:4;-1:-1:-1;;;;;37754:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37754:13:0;-1:-1:-1;;;;;37754:24:0;;;-1:-1:-1;37754:24:0;;37797:36;;;37826:7;-1:-1:-1;;;;;37809:24:0;:4;-1:-1:-1;;;;;37809:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37809:13:0;-1:-1:-1;;;;;37809:24:0;;37797:36;37789:96;;;;-1:-1:-1;;;37789:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;37899:16;37917;37938:4;-1:-1:-1;;;;;37938:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37938:18:0;;;;;;;-1:-1:-1;;;;;37898:58:0;;;;-1:-1:-1;37898:58:0;;-1:-1:-1;37990:8:0;:54;;38025:8;38035;37990:54;;;38002:8;38012;37990:54;37967:77;;-1:-1:-1;37967:77:0;-1:-1:-1;38072:52:0;38087:16;37967:77;;38072:14;:52::i;:::-;38057:67;;38151:6;-1:-1:-1;;;;;38151:19:0;;38171:12;38185:8;38195;38151:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38151:53:0;;-1:-1:-1;38230:8:0;:40;;38257:4;-1:-1:-1;;;;;38257:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38257:13:0;38230:40;;;38241:4;-1:-1:-1;;;;;38241:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38241:13:0;38230:40;38215:55;;37469:809;;;;;;;;;;;:::o;32894:1017::-;33033:19;33054;33077:25;33091:10;33077:13;:25::i;:::-;33032:70;;;;33113:14;33130:4;-1:-1:-1;;;;;33130:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33130:13:0;33171;;;-1:-1:-1;;;33171:13:0;;;;33130;;-1:-1:-1;33154:14:0;;-1:-1:-1;;;;;33171:11:0;;;;;:13;;;;;33130;;33171;;;;;;;:11;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33171:13:0;;-1:-1:-1;;;;;;33203:22:0;;;;;;;;:48;;;33239:12;-1:-1:-1;;;;;33229:22:0;:6;-1:-1:-1;;;;;33229:22:0;;33203:48;33195:110;;;;-1:-1:-1;;;33195:110:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33318:65;-1:-1:-1;;;;;33318:22:0;;33341:10;33361:4;33368:14;33318:22;:65::i;:::-;33394:5;-1:-1:-1;;;;;33394:14:0;;33409;33394:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33435:45;33459:4;33474;33435:15;:45::i;:::-;33493:17;33523:12;-1:-1:-1;;;;;33513:22:0;:6;-1:-1:-1;;;;;33513:22:0;;:40;;33547:6;33513:40;;;33538:6;33513:40;33588:16;;;33602:1;33588:16;;;33564:21;33588:16;;;;;33493:60;;-1:-1:-1;33588:16:0;;;;;;;;;;;;-1:-1:-1;33588:16:0;33564:40;;33625:9;33615:4;33620:1;33615:7;;;;;;;;;;;;;:19;-1:-1:-1;;;;;33615:19:0;;;-1:-1:-1;;;;;33615:19:0;;;;;33655:12;33645:4;33650:1;33645:7;;;;;;;;;;;;;:22;-1:-1:-1;;;;;33645:22:0;;;-1:-1:-1;;;;;33645:22:0;;;;;33680:47;33702:4;33707:1;33702:7;;;;;;;;;;;;;;33719:6;33680:21;:47::i;:::-;33738:6;-1:-1:-1;;;;;33738:31:0;;33777:9;-1:-1:-1;;;;;33770:27:0;;33806:4;33770:42;;;;;;;;;;;;;-1:-1:-1;;;;;33770:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33770:42:0;33738:133;;-1:-1:-1;;;;;;33738:133:0;;;;;;;;;;;;;;;;;;;33848:4;33738:133;;;;;;33855:15;33738:133;;;;;;;;;;;;;;;;;;;;;33814:18;;33834:4;;33738:133;;;;;;;33770:42;33738:133;;;;;;;;-1:-1:-1;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;33738:133:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33884:19;33898:4;33884:13;:19::i;:::-;32894:1017;;;;;;;;;;:::o;31441:290::-;31218:4;31544:9;:26;;31536:72;;;;-1:-1:-1;;;31536:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31627:4;-1:-1:-1;;;;;31621:19:0;;31648:9;31621:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31673:50;31687:10;31699:17;31718:4;31673:13;:50::i;:::-;31441:290;;:::o;38286:183::-;38328:12;38371:6;-1:-1:-1;;;;;38371:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38371:13:0;38363:4;-1:-1:-1;;;;;38363:21:0;;;;;;;-1:-1:-1;38363:21:0;38395:66;;;;-1:-1:-1;;;38395:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38286:183;:::o;32235:651::-;32318:19;32339;32362:25;32376:10;32362:13;:25::i;:::-;32317:70;;-1:-1:-1;32317:70:0;-1:-1:-1;32400:78:0;-1:-1:-1;;;;;32400:35:0;;32436:10;32456:4;32463:14;32400:35;:78::i;:::-;32489:5;-1:-1:-1;;;;;32489:14:0;;32504;32489:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32553:4;-1:-1:-1;;;;;32536:21:0;:4;-1:-1:-1;;;;;32536:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32536:13:0;-1:-1:-1;;;;;32536:21:0;;;;;:46;;;32578:4;-1:-1:-1;;;;;32561:21:0;:4;-1:-1:-1;;;;;32561:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32561:13:0;-1:-1:-1;;;;;32561:21:0;;;32536:46;32532:128;;;32606:42;32630:4;32637:10;32606:15;:42::i;:::-;32599:49;;;;32532:128;32672:45;32696:4;32711;32672:15;:45::i;:::-;32756:16;;;32770:1;32756:16;;;32730:23;32756:16;;;;;32730:23;32756:16;;;;;;;;;;-1:-1:-1;32756:16:0;32730:42;;32795:4;-1:-1:-1;;;;;32795:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32795:13:0;32783:9;;:6;;32790:1;;32783:9;;;;;;;;;:25;-1:-1:-1;;;;;32783:25:0;;;-1:-1:-1;;;;;32783:25:0;;;;;32831:4;-1:-1:-1;;;;;32831:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32831:13:0;32819:9;;:6;;32826:1;;32819:9;;;;;;;;;;;:25;-1:-1:-1;;;;;32819:25:0;;;-1:-1:-1;;;;;32819:25:0;;;;;32857:21;32871:6;32857:13;:21::i;:::-;32235:651;;;;;:::o;31142:29::-;;;:::o;31178:44::-;31218:4;31178:44;:::o;31739:488::-;31218:4;31871:13;:30;;31863:76;;;;-1:-1:-1;;;31863:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31958:52;;;-1:-1:-1;;;31958:52:0;;31984:10;31958:52;;;;32004:4;31958:52;;;;;;32014:13;;-1:-1:-1;;;;;31958:25:0;;;;;:52;;;;;;;;;;;;;;;:25;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31958:52:0;:69;;31950:116;;;;-1:-1:-1;;;31950:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32079:74;-1:-1:-1;;;;;32079:32:0;;32112:10;32132:4;32139:13;32079:32;:74::i;:::-;32166:53;32180:10;32192:17;32211:7;32166:13;:53::i;:::-;31739:488;;;;:::o;31093:42::-;;;:::o;34326:306::-;34392:19;34413;34467:10;34445:33;;34511:5;-1:-1:-1;;;;;34511:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34511:12:0;34561:16;;;-1:-1:-1;;;34561:16:0;;;;34511:12;;-1:-1:-1;;;;;;34561:6:0;:14;;;;:16;;;;;34511:12;;34561:16;;;;;;;;:14;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34561:16:0;34543:14;;;-1:-1:-1;;;34543:14:0;;;;-1:-1:-1;;;;;34543:34:0;;;;:12;;;;;:14;;;;;34561:16;;34543:14;;;;;;;:12;:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34543:14:0;-1:-1:-1;;;;;34543:34:0;;34535:89;;;;-1:-1:-1;;;34535:89:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34326:306;;;:::o;36962:499::-;37065:18;;37135:1;37121:11;:15;37096:40;;37147:17;37167:6;-1:-1:-1;;;;;37167:19:0;;37187:14;37203:8;37213;37167:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37167:55:0;;-1:-1:-1;37233:19:0;-1:-1:-1;;;;;37255:6:0;:12;;37268:14;37284:28;:8;37268:14;37284:12;:28::i;:::-;37314:23;:8;37327:9;37314:12;:23::i;:::-;37255:83;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;37255:83:0;;-1:-1:-1;37362:91:0;37378:74;37255:83;37394:31;;;:43;;37255:83;37394:57;;;;;37378:15;:74::i;:::-;37362:11;;:15;:91::i;:::-;37349:104;36962:499;-1:-1:-1;;;;;;;36962:499:0:o;20219:205::-;20347:68;;;-1:-1:-1;;;;;20347:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20347:68:0;-1:-1:-1;;;20347:68:0;;;20320:96;;20340:5;;20320:19;:96::i;33919:399::-;33989:70;34015:4;34028;-1:-1:-1;;;;;34021:22:0;;34052:4;34021:37;;;;;;;;;;;;;-1:-1:-1;;;;;34021:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34021:37:0;-1:-1:-1;;;;;33989:25:0;;;:70;:25;:70::i;:::-;34071:15;34088;34122:4;-1:-1:-1;;;;;34107:25:0;;34133:2;34107:29;;;;;;;;;;;;;-1:-1:-1;;;;;34107:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34107:29:0;;;;;;;;;-1:-1:-1;34107:29:0;-1:-1:-1;31218:4:0;34157:24;;;34149:75;;;;-1:-1:-1;;;34149:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31218:4;34243:7;:24;;34235:75;;;;-1:-1:-1;;;34235:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38477:221;38563:47;;;-1:-1:-1;;;38563:47:0;;38595:4;38563:47;;;;-1:-1:-1;;;;;38563:47:0;;;;;;;;;:23;;;;;;:47;;;;;;;;;;;;;;;:23;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;38563:47:0;38559:132;;38632:47;-1:-1:-1;;;;;38632:25:0;;38658:7;-1:-1:-1;;38632:25:0;:47::i;36320:634::-;36387:15;36418:9;36413:534;36433:6;:13;36429:1;:17;36413:534;;;36485:6;36492:1;36485:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36478:27:0;;36514:4;36478:42;;;;;;;;;;;;;-1:-1:-1;;;;;36478:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36478:42:0;;-1:-1:-1;36539:11:0;;36535:401;;36588:4;-1:-1:-1;;;;;36575:17:0;:6;36582:1;36575:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36575:17:0;;36571:350;;;36623:4;-1:-1:-1;;;;;36617:20:0;;36638:7;36617:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;36719:12:0;;;36670;36719;;;;;;;;;;36687:45;;36670:12;;-1:-1:-1;36687:10:0;;-1:-1:-1;36710:7:0;;36719:12;;;;;36687:45;36719:12;;36687:45;;;;;;;;;;-1:-1:-1;;36687:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36669:63;;;36763:7;36755:46;;;;;-1:-1:-1;;;36755:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;36571:350;;;;36850:51;36881:10;36893:7;36857:6;36864:1;36857:9;;;;;;;;;;;;;;-1:-1:-1;;;;;36850:30:0;;;:51;;;;;:::i;:::-;36448:3;;36413:534;;;;36320:634;;:::o;34640:1672::-;34747:19;34768;34791:25;34805:10;34791:13;:25::i;:::-;34746:70;;;;34830:16;34848;34869:4;-1:-1:-1;;;;;34869:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;34869:18:0;;;;;;;-1:-1:-1;;;;;34829:58:0;;;;-1:-1:-1;34829:58:0;;-1:-1:-1;31218:4:0;34906:24;;:52;;;;;31218:4;34934:8;:24;34906:52;34898:103;;;;-1:-1:-1;;;34898:103:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35014:13;35047:7;-1:-1:-1;;;;;35030:24:0;:4;-1:-1:-1;;;;;35030:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35030:13:0;-1:-1:-1;;;;;35030:24:0;;;-1:-1:-1;35030:24:0;;35073:36;;;35102:7;-1:-1:-1;;;;;35085:24:0;:4;-1:-1:-1;;;;;35085:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35085:13:0;-1:-1:-1;;;;;35085:24:0;;35073:36;35065:96;;;;-1:-1:-1;;;35065:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35198:16;;;35212:1;35198:16;;;35174:21;35198:16;;;;;35174:21;35198:16;;;;;;;;;;-1:-1:-1;35198:16:0;35174:40;;35235:7;35225:4;35230:1;35225:7;;;;;;;;;;;;;:17;-1:-1:-1;;;;;35225:17:0;;;-1:-1:-1;;;;;35225:17:0;;;;;35263:8;:40;;35290:4;-1:-1:-1;;;;;35290:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35290:13:0;35263:40;;;35274:4;-1:-1:-1;;;;;35274:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35274:13:0;35263:40;35253:4;35258:1;35253:7;;;;;;;;-1:-1:-1;;;;;35253:50:0;;;:7;;;;;;;;;;:50;;;;35341:40;;;-1:-1:-1;;;35341:40:0;;35375:4;35341:40;;;;;;35316:22;;35341:25;;;;;:40;;;;;;;;;;;:25;:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35341:40:0;;-1:-1:-1;35392:20:0;35423:204;;;;35467:50;35482:14;35498:8;35508;35467:14;:50::i;:::-;35452:65;;35423:204;;;35565:50;35580:14;35596:8;35606;35565:14;:50::i;:::-;35550:65;;35423:204;35639:47;35661:4;35666:1;35661:7;;;;;;;35639:47;35697:30;35730:6;-1:-1:-1;;;;;35730:45:0;;35776:12;35790:17;35809:4;35823;35830:15;35730:116;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35730:116:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35697:149;;35859:47;35881:4;35886:1;35881:7;;;;;;;35859:47;35921:23;35948:6;-1:-1:-1;;;;;35948:33:0;;35982:4;35987:1;35982:7;;;;;;;;;;;;;;35991:4;35996:1;35991:7;;;;;;;;;;;;;;36000:36;36019:13;36033:1;36019:16;;;;;;;;;;;;;;36000:14;:18;;:36;;;;:::i;:::-;36038:13;36052:1;36038:16;;;;;;;;;;;;;;36056:1;36059;36070:4;36077:15;35948:145;;;;;;;;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35948:145:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;35948:145:0;;;;-1:-1:-1;36106:52:0;36136:4;36151:5;36106:21;:52::i;:::-;36169:5;-1:-1:-1;;;;;36169:13:0;;36183:15;36169:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;36212:62;36231:10;36243:5;-1:-1:-1;;;;;36243:15:0;;36267:4;36243:30;;;;;;;;;;;;;-1:-1:-1;;;;;36243:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;36243:30:0;-1:-1:-1;;;;;36212:18:0;;;:62;:18;:62::i;:::-;36285:19;36299:4;36285:13;:19::i;:::-;34640:1672;;;;;;;;;;;;;:::o;23556:113::-;23649:5;;;23644:16;;;;23636:25;;;;;;23556:113;;;;:::o;23839:::-;23932:5;;;23927:16;;;;23919:25;;;;;2952:1239;3000:7;3024:6;3020:20;;-1:-1:-1;3039:1:0;3032:8;;3020:20;3218:1;3242;-1:-1:-1;;;3258:41:0;;3254:107;;3323:3;3316:10;;;;;3347:2;3341:8;3254:107;3381:19;3375:2;:25;3371:90;;3424:2;3417:9;;;;;3447:2;3441:8;3371:90;3481:11;3475:2;:17;3471:82;;3516:2;3509:9;;;;;3539:2;3533:8;3471:82;3573:7;3567:2;:13;3563:77;;3604:2;3597:9;;;;;3627:1;3621:7;3563:77;3660:5;3654:2;:11;3650:74;;3689:1;3682:8;;;;;3711:1;3705:7;3650:74;3744:4;3738:2;:10;3734:73;;3772:1;3765:8;;;;;3794:1;3788:7;3734:73;3827:3;3821:2;:9;3817:49;;3853:1;3847:7;3817:49;3895:1;3889;3885;:5;;;;;;3881:1;:9;3880:16;;3876:20;;3926:1;3920;3916;:5;;;;;;3912:1;:9;3911:16;;3907:20;;3957:1;3951;3947;:5;;;;;;3943:1;:9;3942:16;;3938:20;;3988:1;3982;3978;:5;;;;;;3974:1;:9;3973:16;;3969:20;;4019:1;4013;4009;:5;;;;;;4005:1;:9;4004:16;;4000:20;;4050:1;4044;4040;:5;;;;;;4036:1;:9;4035:16;;4031:20;;4081:1;4075;4071;:5;;;;;;4067:1;:9;4066:16;;4062:20;;4130:10;4147:1;4143;:5;;;;;;4130:18;;4171:2;4167:1;:6;:15;;4180:2;4167:15;;;4176:1;4167:15;4159:24;;;;;2952:1239;;;;:::o;22339:761::-;22763:23;22789:69;22817:4;22789:69;;;;;;;;;;;;;;;;;22797:5;-1:-1:-1;;;;;22789:27:0;;;:69;;;;;:::i;:::-;22873:17;;22763:95;;-1:-1:-1;22873:21:0;22869:224;;23015:10;23004:30;;;;;;;;;;;;;;;-1:-1:-1;23004:30:0;22996:85;;;;-1:-1:-1;;;22996:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20034:177;20144:58;;;-1:-1:-1;;;;;20144:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;20144:58:0;-1:-1:-1;;;20144:58:0;;;20117:86;;20137:5;;20117:19;:86::i;20693:622::-;21063:10;;;21062:62;;-1:-1:-1;21079:39:0;;;-1:-1:-1;;;21079:39:0;;21103:4;21079:39;;;;-1:-1:-1;;;;;21079:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;21079:39:0;:44;21062:62;21054:152;;;;-1:-1:-1;;;21054:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21244:62;;;-1:-1:-1;;;;;21244:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;21244:62:0;-1:-1:-1;;;21244:62:0;;;21217:90;;21237:5;;21217:19;:90::i;16050:195::-;16153:12;16185:52;16207:6;16215:4;16221:1;16224:12;16185:21;:52::i;:::-;16178:59;;16050:195;;;;;;:::o;17102:530::-;17229:12;17287:5;17262:21;:30;;17254:81;;;;-1:-1:-1;;;17254:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17354:18;17365:6;17354:10;:18::i;:::-;17346:60;;;;;-1:-1:-1;;;17346:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;17480:12;17494:23;17521:6;-1:-1:-1;;;;;17521:11:0;17541:5;17549:4;17521:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;17521:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17479:75;;;;17572:52;17590:7;17599:10;17611:12;17572:17;:52::i;13132:422::-;13499:20;13538:8;;;13132:422::o;18638:742::-;18753:12;18782:7;18778:595;;;-1:-1:-1;18813:10:0;18806:17;;18778:595;18927:17;;:21;18923:439;;19190:10;19184:17;19251:15;19238:10;19234:2;19230:19;19223:44;19138:148;19333:12;19326:20;;-1:-1:-1;;;19326:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://1820f479943c0e522ebeee9f31fc0890ee5b3116243a648fa64579ab7ce5c58e
Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
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.