Contract 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x9d471eab51397d4e237f4ee50564fbbf848e83158e1243174faa31978c573c05Upgrade To228527802021-12-23 3:29:15400 days 1 hr ago0xe3f06ec131a7e10442c2eca0f268f67cc47ebb2b IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.000982530
0x37482b7f36bd1ca19715f04036bd27d694093411abf4bbef80477dc88d77ac27Upgrade To227821872021-12-21 8:40:34401 days 20 hrs ago0xe3f06ec131a7e10442c2eca0f268f67cc47ebb2b IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.000982530
0xfcba0c67c156c8e6a717d536e9d8363142eee837eb5462c1e5664e03b61ba045Upgrade To173848982021-07-29 8:09:23546 days 20 hrs ago0xe3f06ec131a7e10442c2eca0f268f67cc47ebb2b IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001412294624.31235
0xfdce7b184fb07108656b86cb447783e88fd3e95db420d54cd40d62958881809cEmergency Withdr...173541882021-07-28 8:27:50547 days 20 hrs ago0x6efef4e3e985a44bcdc4ee1d82df3739ec7cb512 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0028639100
0x9388af0bdc8beeacf26bd25e42dee5b28dbe3e01429b646bf8b8bae1864ace4fEmergency Withdr...167612792021-07-12 1:04:50564 days 3 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0005727820
0x9917fa63a8d18445cdc4a886e2a24643a94b17c309b1f9a115a83e2de1e3c9afEmergency Withdr...167612792021-07-12 1:04:50564 days 3 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0005727820
0x9559ea4a3a982f5efccde51c061180952126647f724fe400c73654c975203084Emergency Withdr...167582112021-07-11 22:58:10564 days 5 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0002863910
0x94352840be58af6df051760474e38c618193209cc158a8dec77861812e0e6b0bEmergency Withdr...167570572021-07-11 22:11:58564 days 6 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0002863910
0xa10c7640c3a5ed0d4b1e98399280d7bc09c58104c195f094eb87f29f5ca96229Emergency Withdr...167570162021-07-11 22:07:56564 days 6 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0002863910
0xee9cce727ff142b6da4993ccdf461dcaa5cced3899ccf7d32ee6731a8d369065Emergency Withdr...167570132021-07-11 22:07:38564 days 6 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0005727820
0x15d56a2617a377b169b5592a620eca28de89c5a5d8a42e05246d99c6601db1b8Emergency Withdr...167570132021-07-11 22:07:38564 days 6 hrs ago0xc799a412b7a7dc8de8987cf2b9cb73b5093bc813 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0005725420
0x1979bb2520ea3704d297fe08758ec5aece727a92f7b7e18e9911e3ab10f8cf9fDeposit167077202021-07-10 12:49:39565 days 15 hrs ago0x3ba1d1f1f0eff962a2f92ab520da35e847caa9cc IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.00010391881.2
0x2adb70afe3a8131d94e8f5c0c2a848ebcd813557a2bd4325982e5fb9ea07aeb4Deposit167077122021-07-10 12:49:07565 days 15 hrs ago0x3ba1d1f1f0eff962a2f92ab520da35e847caa9cc IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.00010393321.2
0x174e304599f9a22e2343fc352df3f0b9c920a902ffde47d77a58e80aa735286fDeposit166830692021-07-09 21:13:57566 days 7 hrs ago0xe7ece3af2f8100b2e6844d5be8a07ecce8d4864a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0004009556284.5131823
0x18010c8c0ab88035deedb18ac4754d0746165402efcb156a7c6a9e82665e43e1Deposit166830672021-07-09 21:13:53566 days 7 hrs ago0xe7ece3af2f8100b2e6844d5be8a07ecce8d4864a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0003908912324.5131823
0xe40dba0c6a87af6f263d8e6e414df558056d94574382b260007257c02debd0a2Deposit166794282021-07-09 18:30:14566 days 10 hrs ago0xd43d1327970498e77fdf4e7aaa380194a4bb5bc2 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0000987023511.111
0x3e168168ffc719ac613e128df5c3e371211f8084fb310f97b65caca8a7958c71Withdraw166791622021-07-09 18:20:52566 days 10 hrs ago0xd43d1327970498e77fdf4e7aaa380194a4bb5bc2 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0000711282.000000001
0xb1086f141b42de67687102bc05e4328d7af776187270e9277b571aa04846237cWithdraw166721152021-07-09 13:33:19566 days 15 hrs ago0x64a50df0acc5ad686ac20291e6470f426da7a830 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.000124972
0x0994f23bb6f27e2631e31f430ac34239c7b8de249fc991d7d2aa53fb6f315281Deposit166719132021-07-09 13:24:15566 days 15 hrs ago0x24c090d199e5330d968ac013669fb75df6e4729a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001732222
0x4ed50b43170f79165358a599b1f344f460776d4647187e0a68df3500abf4fc9aDeposit166719052021-07-09 13:23:59566 days 15 hrs ago0x24c090d199e5330d968ac013669fb75df6e4729a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001776822
0x10a85ee77833541198efad4e4b97a9ab742f91d824840780dc7b998b2f037f0fDeposit166719032021-07-09 13:23:55566 days 15 hrs ago0x24c090d199e5330d968ac013669fb75df6e4729a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001732222
0xe5ad7b5abc310fb6b9243915696d5b8bc86d0289b4dbea908b53d0bc9c09659fDeposit166718952021-07-09 13:23:39566 days 15 hrs ago0x24c090d199e5330d968ac013669fb75df6e4729a IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001776822
0xd8672aab36dcd2af0cbc515d33d914c249e593e1180130ed680c0673ee939eadDeposit166717532021-07-09 13:16:39566 days 15 hrs ago0x094a9009fe93a85658e4b49604fd8177620f8cd8 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0015778161617.76
0x6da64a99089e1626b20262200198cdf2c65b2874a14dd5d559b7b0cd751a98b7Withdraw166717492021-07-09 13:16:31566 days 15 hrs ago0x42e5464aab4a992279ae1b28bae09939f27677f9 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0001785773.5
0x0b56c57765757d76a5f0c870215538871eab8c413ad0bbb743a68341b2b292dbDeposit166717312021-07-09 13:15:27566 days 15 hrs ago0x42e5464aab4a992279ae1b28bae09939f27677f9 IN  0x702638277cf7464fd815d73322bc6b4d7c6cf3b10 MATIC0.0004743891655.339754902
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x9be875337b6e05b081f81d89b52ba633e972a837b816939beb423e2e21e21317166555212021-07-09 0:28:26567 days 4 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token100 MATIC
0x1d28d9b06ddf2691260e0a8f401b6b38b15e79f2eb5b8b07aa4713cbd96eeb81166502162021-07-08 20:19:57567 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token250 MATIC
0x33baaffe7a2ec93642ecee05ceb074f3260dd538503e0109ba1ed115a37b7bb4166498822021-07-08 20:06:17567 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token2,135.144789374817283483 MATIC
0xdbc6510f21e26f580b821e2fda965b2e735136065c4c2ab6528d26af40cc4ab8166435872021-07-08 15:10:39567 days 13 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token10 wei
0x8f0acf4b4f2f8af9363ee6c1d23eaad6de89acbe28eefdf6a5aea4967287ac98166400192021-07-08 12:23:46567 days 16 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token10 MATIC
0x22f42b6b2d48f90a93a8c29fdb9080b1674726a9f1410be88bae47706d632349166313342021-07-08 6:38:14567 days 22 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token1 MATIC
0xe47d5bda6c291a6073b55101342ad51ecab9f48783e025b7ddfae64ec70ec442166285342021-07-08 4:58:32567 days 23 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token1.1 MATIC
0x160f66cd94ce11de242d1074586003c493a617b85eecb7c7d590f1dbb410ef7b166248082021-07-08 2:41:56568 days 1 hr ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token1,000 MATIC
0x13ac10f3bc474f7d2122b84b3a5aaaa3a714cfc2659e0ef63de3926b05413748166197252021-07-07 23:34:26568 days 5 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.1 MATIC
0xd6aedf6c15d898dc9b3f60d2f208479cb8e52e5c5c93979539d10e310c5544c1166191582021-07-07 23:12:48568 days 5 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.966357960277734359 MATIC
0xb883bc633c61109436487044a4bbfb08a8046a5c760d50b56e2f457fb4d104f9166190042021-07-07 23:07:28568 days 5 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token499.465354230356659396 MATIC
0xe6c9e72a247429bc2795e47b625a791b6d2818841f70508ae1ca3f1edfa573e5166164472021-07-07 21:35:18568 days 7 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token8,578.179405112444416012 MATIC
0xc0ff0e26feea95418ffbf64dd4dd9690983fb8f5bd6857b82161be25eff15664166152032021-07-07 20:48:16568 days 7 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.000106890999906891 MATIC
0x6de51d8710f718bc3a1fcae7dcb36644df5454c4ee6347e748b60e514048a34f166146072021-07-07 20:27:48568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0xffef7ce9f2b83c6f65c66e44c8923b5857ecd1ea2429c6791575b4fa9f8283af166145372021-07-07 20:25:24568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.002 MATIC
0x7c12784dc8982c7d016493463ed9333872f834130ed20105e465d1c6554279f2166144912021-07-07 20:23:48568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0x055a579a89cfa35483e6feddb17bbae537e02d31d9a015df93d1d369f43da608166144532021-07-07 20:22:28568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.002 MATIC
0xf69fbbdaab95a036eef036177504b2680009421ba8fed5f368b429a8824ee613166144152021-07-07 20:21:12568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0x585532b2262033c7bc8e82e535c15963246262ae188e81640397f45a10e0724d166143692021-07-07 20:19:36568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0x4980b4d7f891e0c45d9fecea5ceb5f02ac1b1cfc2ab617d81b00c6dc48ddf013166143542021-07-07 20:19:06568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0x21554b4342410ef83f9a6f415ea2189339d69a8acf757ead25a8eb0a4ba36e3e166143092021-07-07 20:17:32568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.001 MATIC
0xa15760ed85a94ca2deb065bcb20a019fd6621a11cc5b1be9b272f0e188622646166134062021-07-07 19:44:06568 days 8 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token5,000 MATIC
0xdc911cd009ddb997a8bc1db5591c9b174792054c3be1a5ebcb3b7627b3c3792c166083472021-07-07 16:43:48568 days 11 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.804674222239447016 MATIC
0x989aad94aea50700e36a9dccf7ba07c8d24ab004c9426b8fb3794ba7a1af4b16166072662021-07-07 16:04:30568 days 12 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token0.039039376137133521 MATIC
0xe47a83b817d533e96a59b814c95b81d71a2d532248901c5cca94055fd149f538165983142021-07-07 10:34:23568 days 18 hrs ago 0x702638277cf7464fd815d73322bc6b4d7c6cf3b1 Polygon: WMATIC Token8 MATIC
[ Download CSV Export 
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

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

Contract Name:
FarmChef

Compiler Version
v0.8.4+commit.c7e474f2

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-24
*/

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

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

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

pragma solidity >=0.6.0 <0.9.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

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

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

pragma solidity >=0.6.0 <0.9.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);
}

pragma solidity >=0.6.0 <0.9.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;
    }
}

pragma solidity >=0.6.0 <0.9.0;

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;
    //using Address for address;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name2, string memory symbol2) {
        _name = name2;
        _symbol = symbol2;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

pragma solidity >=0.6.0 <0.9.0;


// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library SafeERC20 {
    function _safeApprove(IERC20 token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), '!TransferHelper: APPROVE_FAILED');
    }
    function safeApprove(IERC20 token, address to, uint value) internal {
        if (value > 0) _safeApprove(token, to, 0);
        return _safeApprove(token, to, value);
    }

    function safeTransfer(IERC20 token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), '!TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), '!TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, '!TransferHelper: ETH_TRANSFER_FAILED');
    }
}

/**
 *Submitted for verification at Etherscan.io on 2020-12-22
*/


pragma solidity >=0.6.0 <0.9.0;

/**
 * @title Fallback
 * @dev Implements delegation of calls to other contracts, with proper
 * forwarding of return values and bubbling of failures.
 * It defines a fallback function that delegates all calls to the address
 * returned by the abstract _implementation() internal function.
 */
abstract contract Fallback {
    /**
     * @dev Fallback function.
     * Implemented entirely in `_fallback`.
     */
    fallback() external payable {
        _fallback();
    }

    /**
     * @dev Receive function.
     * Implemented entirely in `_fallback`.
     */
    receive() external payable {
        _fallback();
    }

    /**
     * @return The Address of the implementation.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates execution to an implementation contract.
     * This is a low level function that doesn't return to its internal call site.
     * It will return to the external caller whatever the implementation returns.
     * @param implementation Address to delegate.
     */
    function _delegate(address implementation) internal {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
                // delegatecall returns 0 on error.
                case 0 {
                    revert(0, returndatasize())
                }
                default {
                    return(0, returndatasize())
                }
        }
    }

    /**
     * @dev Function that is run as the first thing in the fallback function.
     * Can be redefined in derived contracts to add functionality.
     * Redefinitions must call super._willFallback().
     */
    function _willFallback() internal virtual {}

    /**
     * @dev fallback implementation.
     * Extracted to enable manual triggering.
     */
    function _fallback() internal {
        _willFallback();
        _delegate(_implementation());
    }
}

/**
 * @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 in 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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 weiValue,
        string memory errorMessage
    ) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{value: weiValue}(data);
        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);
            }
        }
    }
}

/**
 * @title BaseFallback
 * @dev This contract implements a proxy that allows to change the
 * implementation address to which it will delegate.
 * Such a change is called an implementation upgrade.
 */
contract BaseFallback is Fallback {
    /**
     * @dev Contract constructor.
     * @param _logic Address of the initial implementation.
     * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
     * It should include the signature and the parameters of the function to be called, as described in
     * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
     * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _setImplementation(_logic);
        if (_data.length > 0) {
            (bool success, ) = _logic.delegatecall(_data);
            require(success);
        }
    }

    /**
     * @dev Emitted when the implementation is upgraded.
     * @param implementation Address of the new implementation.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Returns the current implementation.
     * @return impl Address of the current implementation
     */
    function _implementation() internal view override returns (address impl) {
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
            impl := sload(slot)
        }
    }

    /**
     * @dev Upgrades the to a new implementation.
     * @param newImplementation Address of the new implementation.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Sets the implementation address of the.
     * @param newImplementation Address of the new implementation.
     */
    function _setImplementation(address newImplementation) internal {
        require(Address.isContract(newImplementation), "Cannot set a implementation to a non-contract address");

        bytes32 slot = IMPLEMENTATION_SLOT;

        assembly {
            sstore(slot, newImplementation)
        }
    }
}

/**
 * @title FarmChef
 * @dev This contract combines an upgradeability with an authorization
 * mechanism for administrative tasks.
 * All external functions in this contract must be guarded by the
 * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
 * feature proposal that would enable this to be done automatically.
 */
contract FarmChef is BaseFallback {
    /**
     * Contract constructor.
     * @param _logic address of the initial implementation.
     * @param _admin_ Address of the administrator.
     * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
     * It should include the signature and the parameters of the function to be called, as described in
     * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
     * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
     */
    constructor(
        address _logic,
        address _admin_,
        bytes memory _data
    ) payable BaseFallback(_logic, _data) {
        assert(ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
        _setAdmin(_admin_);
    }

    /**
     * @dev Emitted when the administration has been transferred.
     * @param previousAdmin Address of the previous admin.
     * @param newAdmin Address of the new admin.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */

    bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Modifier to check whether the `msg.sender` is the admin.
     * If it is, it will run the function. Otherwise, it will delegate the call
     * to the implementation.
     */
    modifier ifAdmin() {
        if (msg.sender == _admin()) {
            _;
        } else {
            _fallback();
        }
    }

    /**
     * @return addr The address of the admin.
     */
    function admin() external ifAdmin returns (address addr) {
        addr = _admin();
    }

    /**
     * @return addr The address of the implementation.
     */
    function implementation() external ifAdmin returns (address addr) {
        addr = _implementation();
    }

    /**
     * @dev Changes the admin of the.
     * Only the current admin can call this function.
     * @param newAdmin Address to transfer administration to.
     */
    function changeAdmin(address newAdmin) external ifAdmin {
        require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
        emit AdminChanged(_admin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev Upgrade the backing implementation of the proxy.
     * Only the admin can call this function.
     * @param newImplementation Address of the new implementation.
     */
    function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeTo(newImplementation);
    }

    /**
     * @dev Upgrade the backing implementation of the proxy and call a function
     * on the new implementation.
     * This is useful to initialize the proxied contract.
     * @param newImplementation Address of the new implementation.
     * @param data Data to send as msg.data in the low level call.
     * It should include the signature and the parameters of the function to be called, as described in
     * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
     */
    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
        _upgradeTo(newImplementation);
        (bool success, ) = newImplementation.delegatecall(data);
        require(success);
    }

    /**
     * @return adm The admin slot.
     */
    function _admin() internal view returns (address adm) {
        bytes32 slot = ADMIN_SLOT;
        assembly {
            adm := sload(slot)
        }
    }

    /**
     * @dev Sets the address of the proxy admin.
     * @param newAdmin Address of the new proxy admin.
     */
    function _setAdmin(address newAdmin) internal {
        bytes32 slot = ADMIN_SLOT;

        assembly {
            sstore(slot, newAdmin)
        }
    }

    /**
     * @dev Only fall back when the sender is not the admin.
     */
    function _willFallback() internal virtual override {
        require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
        super._willFallback();
    }
}

pragma solidity >=0.6.0 <0.9.0;

// SushiToken with Governance.
contract SushiToken is ERC20("SushiSwap", "SUSHI"), Ownable {
    using SafeMath for uint256;
    /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
    function mint(address _to, uint256 _amount) public onlyOwner {
        _mint(_to, _amount);
        _moveDelegates(address(0), _delegates[_to], _amount);
    }

    // Copied and modified from YAM code:
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernanceStorage.sol
    // https://github.com/yam-finance/yam-protocol/blob/master/contracts/token/YAMGovernance.sol
    // Which is copied and modified from COMPOUND:
    // https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol

    mapping (address => address) internal _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

      /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegator The address to get delegatee for
     */
    function delegates(address delegator)
        external
        view
        returns (address)
    {
        return _delegates[delegator];
    }

   /**
    * @notice Delegate votes from `msg.sender` to `delegatee`
    * @param delegatee The address to delegate votes to
    */
    function delegate(address delegatee) external {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint nonce,
        uint expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    )
        external
    {
        bytes32 domainSeparator = keccak256(
            abi.encode(
                DOMAIN_TYPEHASH,
                keccak256(bytes(name())),
                getChainId(),
                address(this)
            )
        );

        bytes32 structHash = keccak256(
            abi.encode(
                DELEGATION_TYPEHASH,
                delegatee,
                nonce,
                expiry
            )
        );

        bytes32 digest = keccak256(
            abi.encodePacked(
                "\x19\x01",
                domainSeparator,
                structHash
            )
        );

        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "SUSHI::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "SUSHI::delegateBySig: invalid nonce");
        require(block.timestamp <= expiry, "SUSHI::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account)
        external
        view
        returns (uint256)
    {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber)
        external
        view
        returns (uint256)
    {
        require(blockNumber < block.number, "SUSHI::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee)
        internal
    {
        address currentDelegate = _delegates[delegator];
        uint256 delegatorBalance = balanceOf(delegator); // balance of underlying SUSHIs (not scaled);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                // decrease old representative
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub(amount);
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                // increase new representative
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint256 oldVotes,
        uint256 newVotes
    )
        internal
    {
        uint32 blockNumber = safe32(block.number, "SUSHI::_writeCheckpoint: block number exceeds 32 bits");

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function getChainId() internal view returns (uint) {
        return block.chainid;
    }
}


pragma solidity >=0.6.0 <0.9.0;

contract MasterChef is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    // Info of each user.
    struct UserInfo {
        uint256 amount;     // How many LP tokens the user has provided.
        uint256 boostAmount;// How many LP tokens with multilex the user has provided.
        uint256 untilLock;  // Until Lock timestamp.
        uint256 rewardDebt; // Reward debt. See explanation below.
        //
        // We do some fancy math here. Basically, any point in time, the amount of SUSHIs
        // entitled to a user but is pending to be distributed is:
        //
        //   pending reward = (user.amount * pool.accSushiPerShare) - user.rewardDebt
        //
        // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
        //   1. The pool's `accSushiPerShare` (and `lastRewardBlock`) gets updated.
        //   2. User receives the pending reward sent to his/her address.
        //   3. User's `amount` gets updated.
        //   4. User's `rewardDebt` gets updated.
    }

    // Info of each pool.
    struct PoolInfo {
        IERC20 lpToken;           // Address of LP token contract.
        uint256 allocPoint;       // How many allocation points assigned to this pool. SUSHIs to distribute per block.
        uint256 lastRewardBlock;  // Last block number that SUSHIs distribution occurs.
        uint256 accSushiPerShare; // Accumulated SUSHIs per share, times 1e12. See below.
    }

    // The SUSHI TOKEN!
    SushiToken public sushi;
    // Dev address.
    address public devaddr;
    // Block number when bonus SUSHI period ends.
    uint256 public bonusEndBlock;
    // SUSHI tokens created per block.
    uint256 public sushiPerBlock;

    // Info of each pool.
    PoolInfo[] public poolInfo;
    // Info of each user that stakes LP tokens.
    mapping (uint256 => mapping (address => UserInfo)) public userInfo;
    // Total allocation poitns. Must be the sum of all allocation points in all pools.
    uint256 public totalAllocPoint = 0;
    // The block number when SUSHI mining starts.
    uint256 public startBlock;
    uint256 public constant BONUS_MULTIPLIER = 10;

    event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);

    constructor(
        SushiToken _sushi,
        address _devaddr,
        uint256 _sushiPerBlock,
        uint256 _startBlock,
        uint256 _bonusEndBlock
    ) {
        sushi = _sushi;
        devaddr = _devaddr;
        sushiPerBlock = _sushiPerBlock;
        bonusEndBlock = _bonusEndBlock;
        startBlock = _startBlock;
    }

    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    // Add a new lp to the pool. Can only be called by the owner.
    function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock;
        totalAllocPoint = totalAllocPoint.add(_allocPoint);
        poolInfo.push(PoolInfo({
            lpToken: _lpToken,
            allocPoint: _allocPoint,
            lastRewardBlock: lastRewardBlock,
            accSushiPerShare: 0
        }));
    }

    // Update the given pool's SUSHI allocation point. Can only be called by the owner.
    function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // Return reward multiplier over the given _from to _to block.
    function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
        if (_to <= bonusEndBlock) {
            return _to.sub(_from).mul(BONUS_MULTIPLIER);
        } else if (_from >= bonusEndBlock) {
            return _to.sub(_from);
        } else {
            return bonusEndBlock.sub(_from).mul(BONUS_MULTIPLIER).add(
                _to.sub(bonusEndBlock)
            );
        }
    }

    // View function to see pending SUSHIs on frontend.
    function pendingSushi(uint256 _pid, address _user) external view returns (uint256) {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 accSushiPerShare = pool.accSushiPerShare;
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (block.number > pool.lastRewardBlock && lpSupply != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 sushiReward = multiplier.mul(sushiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
            accSushiPerShare = accSushiPerShare.add(sushiReward.mul(1e12).div(lpSupply));
        }
        return user.amount.mul(accSushiPerShare).div(1e12).sub(user.rewardDebt);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            pool.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
        uint256 sushiReward = multiplier.mul(sushiPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
        pool.accSushiPerShare = pool.accSushiPerShare.add(sushiReward.mul(1e12).div(lpSupply));
        pool.lastRewardBlock = block.number;
    }

    function formatDuration(uint256 sec_) public pure returns (uint256) {
        if (sec_ == 0) return 0;
        else if (sec_ <= 1 days) return 1 days;
        else if (sec_ <= 5 days) return 5 days;
        else if (sec_ <= 15 days) return 15 days;
        else return 15 days;
    }
    function getTimeMultiplex(uint256 sec_) public pure returns (uint256) {
        if (sec_ == 0) return 100;
        else if (sec_ <= 1 days) return 101;
        else if (sec_ <= 5 days) return 108;
        else if (sec_ <= 15 days) return 120;
        else return 120;
    }

    // Deposit LP tokens to MasterChef for SUSHI allocation.
    function deposit(uint256 _pid, uint256 _amount, uint256 _durationSec) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        updatePool(_pid);
        if (user.amount > 0) {
            uint256 pending = user.amount.mul(pool.accSushiPerShare).div(1e12).sub(user.rewardDebt);
            if(pending > 0) {
                pending = pending.mul(user.boostAmount).div(user.amount);
                safeSushiTransfer(msg.sender, pending);
            }
        }
        if(_amount > 0) {
            uint256 lockUntil;
            uint256 duration;

            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);

            if (user.untilLock < block.timestamp) lockUntil = block.timestamp;
            else lockUntil = user.untilLock;

            _durationSec = formatDuration(_durationSec);
            duration = ((lockUntil - block.timestamp) * user.amount + _durationSec * _amount) / (user.amount + _amount);
            user.untilLock = block.timestamp + duration;
            user.boostAmount = user.boostAmount.add(_amount * getTimeMultiplex(_durationSec) / 100);

            user.amount = user.amount.add(_amount);
        }
        user.rewardDebt = user.amount.mul(pool.accSushiPerShare).div(1e12);
        emit Deposit(msg.sender, _pid, _amount);
    }

    // Withdraw LP tokens from MasterChef.
    function withdraw(uint256 _pid, uint256 _amount) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.amount >= _amount, "withdraw: not good");
        updatePool(_pid);
        uint256 pending = user.amount.mul(pool.accSushiPerShare).div(1e12).sub(user.rewardDebt);
        if(pending > 0) {
            pending = pending.mul(user.boostAmount).div(user.amount);
            safeSushiTransfer(msg.sender, pending);
        }
        if(_amount > 0) {
            uint256 boostAmount = user.boostAmount.mul(_amount).div(user.amount);
            user.amount = user.amount.sub(_amount);
            user.boostAmount = user.boostAmount.sub(boostAmount);
            pool.lpToken.safeTransfer(address(msg.sender), _amount);
        }
        user.rewardDebt = user.amount.mul(pool.accSushiPerShare).div(1e12);
        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        pool.lpToken.safeTransfer(address(msg.sender), user.amount);
        emit EmergencyWithdraw(msg.sender, _pid, user.amount);
        user.amount = 0;
        user.rewardDebt = 0;
    }

    // Safe sushi transfer function, just in case if rounding error causes pool to not have enough SUSHIs.
    function safeSushiTransfer(address _to, uint256 _amount) internal {
        uint256 sushiBal = sushi.balanceOf(address(this));
        if (_amount > sushiBal) {
            sushi.transfer(_to, sushiBal);
        } else {
            sushi.transfer(_to, _amount);
        }
    }

    // Update dev address by the previous dev.
    function dev(address _devaddr) public {
        require(msg.sender == devaddr, "dev: wut?");
        devaddr = _devaddr;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"address","name":"_admin_","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"addr","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"addr","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260405162000a7e38038062000a7e833981016040819052620000269162000243565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6200033d565b60008051602062000a5e833981519152146200008157634e487b7160e01b600052600160045260246000fd5b6200008c8262000180565b80511562000103576000826001600160a01b031682604051620000b091906200031f565b600060405180830381855af49150503d8060008114620000ed576040519150601f19603f3d011682016040523d82523d6000602084013e620000f2565b606091505b50509050806200010157600080fd5b505b5062000133905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046200033d565b60008051602062000a3e833981519152146200015f57634e487b7160e01b600052600160045260246000fd5b620001778260008051602062000a3e83398151915255565b505050620003aa565b62000196816200022060201b620003dd1760201c565b6200020d5760405162461bcd60e51b815260206004820152603560248201527f43616e6e6f7420736574206120696d706c656d656e746174696f6e20746f206160448201527f206e6f6e2d636f6e747261637420616464726573730000000000000000000000606482015260840160405180910390fd5b60008051602062000a5e83398151915255565b3b151590565b80516001600160a01b03811681146200023e57600080fd5b919050565b60008060006060848603121562000258578283fd5b620002638462000226565b9250620002736020850162000226565b60408501519092506001600160401b038082111562000290578283fd5b818601915086601f830112620002a4578283fd5b815181811115620002b957620002b962000394565b604051601f8201601f19908116603f01168101908382118183101715620002e457620002e462000394565b81604052828152896020848701011115620002fd578586fd5b6200031083602083016020880162000361565b80955050505050509250925092565b600082516200033381846020870162000361565b9190910192915050565b6000828210156200035c57634e487b7160e01b81526011600452602481fd5b500390565b60005b838110156200037e57818101518382015260200162000364565b838111156200038e576000848401525b50505050565b634e487b7160e01b600052604160045260246000fd5b61068480620003ba6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b61008036600461057f565b610138565b61005b6100933660046105a0565b610175565b3480156100a457600080fd5b506100ad610224565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e436600461057f565b610286565b3480156100f557600080fd5b506100ad610398565b6101066103e3565b6101366101317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b61046f565b565b60008051602061062f833981519152546001600160a01b0316336001600160a01b0316141561016d5761016a81610493565b50565b61016a6100fe565b60008051602061062f833981519152546001600160a01b0316336001600160a01b03161415610217576101a783610493565b6000836001600160a01b031683836040516101c392919061061e565b600060405180830381855af49150503d80600081146101fe576040519150601f19603f3d011682016040523d82523d6000602084013e610203565b606091505b505090508061021157600080fd5b50505050565b61021f6100fe565b505050565b600061023c60008051602061062f8339815191525490565b6001600160a01b0316336001600160a01b0316141561027b57507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6102836100fe565b90565b60008051602061062f833981519152546001600160a01b0316336001600160a01b0316141561016d576001600160a01b0381166103295760405162461bcd60e51b815260206004820152603660248201527f43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f604482015275787920746f20746865207a65726f206164647265737360501b60648201526084015b60405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61036060008051602061062f8339815191525490565b604080516001600160a01b03928316815291841660208301520160405180910390a161016a8160008051602061062f83398151915255565b60006103b060008051602061062f8339815191525490565b6001600160a01b0316336001600160a01b0316141561027b575060008051602061062f8339815191525490565b3b151590565b60008051602061062f833981519152546001600160a01b0316336001600160a01b031614156101365760405162461bcd60e51b815260206004820152603260248201527f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667260448201527137b6903a343290383937bc3c9030b236b4b760711b6064820152608401610320565b3660008037600080366000845af43d6000803e80801561048e573d6000f35b3d6000fd5b61049c816104d3565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b803b61053f5760405162461bcd60e51b815260206004820152603560248201527f43616e6e6f7420736574206120696d706c656d656e746174696f6e20746f2061604482015274206e6f6e2d636f6e7472616374206164647265737360581b6064820152608401610320565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b80356001600160a01b038116811461057a57600080fd5b919050565b600060208284031215610590578081fd5b61059982610563565b9392505050565b6000806000604084860312156105b4578182fd5b6105bd84610563565b9250602084013567ffffffffffffffff808211156105d9578384fd5b818601915086601f8301126105ec578384fd5b8135818111156105fa578485fd5b87602082850101111561060b578485fd5b6020830194508093505050509250925092565b818382376000910190815291905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103a26469706673582212205e5f649162630a0b896a62e8b450cfc6c0c81be3f1f649375056826fd2b8152d64736f6c63430008040033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc000000000000000000000000488ef0998974ebe7e73c5e81eff72f59b7d76f14000000000000000000000000e3f06ec131a7e10442c2eca0f268f67cc47ebb2b00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployed ByteCode Sourcemap

35855:4491:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24701:11;:9;:11::i;:::-;35855:4491;;24542:11;:9;:11::i;38655:111::-;;;;;;;;;;-1:-1:-1;38655:111:0;;;;;:::i;:::-;;:::i;39314:240::-;;;;;;:::i;:::-;;:::i;37918:109::-;;;;;;;;;;;;;:::i;:::-;;;-1:-1:-1;;;;;1555:32:1;;;1537:51;;1525:2;1510:18;37918:109:0;;;;;;;38210:242;;;;;;;;;;-1:-1:-1;38210:242:0;;;;;:::i;:::-;;:::i;37745:91::-;;;;;;;;;;;;;:::i;26493:103::-;26534:15;:13;:15::i;:::-;26560:28;26570:17;34354:66;34716:11;;34693:45;26570:17;26560:9;:28::i;:::-;26493:103::o;38655:111::-;-1:-1:-1;;;;;;;;;;;39748:11:0;-1:-1:-1;;;;;37569:22:0;:10;-1:-1:-1;;;;;37569:22:0;;37565:100;;;38729:29:::1;38740:17;38729:10;:29::i;:::-;38655:111:::0;:::o;37565:100::-;37642:11;:9;:11::i;39314:240::-;-1:-1:-1;;;;;;;;;;;39748:11:0;-1:-1:-1;;;;;37569:22:0;:10;-1:-1:-1;;;;;37569:22:0;;37565:100;;;39424:29:::1;39435:17;39424:10;:29::i;:::-;39465:12;39483:17;-1:-1:-1::0;;;;;39483:30:0::1;39514:4;;39483:36;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;39464:55;;;39538:7;39530:16;;;::::0;::::1;;37608:1;39314:240:::0;;;:::o;37565:100::-;37642:11;:9;:11::i;:::-;39314:240;;;:::o;37918:109::-;37970:12;37583:8;-1:-1:-1;;;;;;;;;;;39748:11:0;;39726:44;37583:8;-1:-1:-1;;;;;37569:22:0;:10;-1:-1:-1;;;;;37569:22:0;;37565:100;;;-1:-1:-1;34354:66:0;34716:11;;37918:109::o;37565:100::-;37642:11;:9;:11::i;:::-;37918:109;:::o;38210:242::-;-1:-1:-1;;;;;;;;;;;39748:11:0;-1:-1:-1;;;;;37569:22:0;:10;-1:-1:-1;;;;;37569:22:0;;37565:100;;;-1:-1:-1;;;;;38285:22:0;::::1;38277:89;;;::::0;-1:-1:-1;;;38277:89:0;;2529:2:1;38277:89:0::1;::::0;::::1;2511:21:1::0;2568:2;2548:18;;;2541:30;2607:34;2587:18;;;2580:62;-1:-1:-1;;;2658:18:1;;;2651:52;2720:19;;38277:89:0::1;;;;;;;;;38382:32;38395:8;-1:-1:-1::0;;;;;;;;;;;39748:11:0;;39726:44;38395:8:::1;38382:32;::::0;;-1:-1:-1;;;;;1829:15:1;;;1811:34;;1881:15;;;1876:2;1861:18;;1854:43;1746:18;38382:32:0::1;;;;;;;38425:19;38435:8;-1:-1:-1::0;;;;;;;;;;;40028:22:0;40013:48;37745:91;37788:12;37583:8;-1:-1:-1;;;;;;;;;;;39748:11:0;;39726:44;37583:8;-1:-1:-1;;;;;37569:22:0;:10;-1:-1:-1;;;;;37569:22:0;;37565:100;;;-1:-1:-1;;;;;;;;;;;;39748:11:0;;37918:109::o;27284:444::-;27664:20;27712:8;;;27284:444::o;40156:187::-;-1:-1:-1;;;;;;;;;;;39748:11:0;-1:-1:-1;;;;;40226:22:0;:10;-1:-1:-1;;;;;40226:22:0;;;40218:85;;;;-1:-1:-1;;;40218:85:0;;2110:2:1;40218:85:0;;;2092:21:1;2149:2;2129:18;;;2122:30;2188:34;2168:18;;;2161:62;-1:-1:-1;;;2239:18:1;;;2232:48;2297:19;;40218:85:0;2082:240:1;25172:938:0;25507:14;25504:1;25501;25488:34;25725:1;25722;25706:14;25703:1;25687:14;25680:5;25667:60;25804:16;25801:1;25798;25783:38;25844:6;25921:76;;;;26056:16;26053:1;26046:27;25921:76;25961:16;25958:1;25951:27;34890:155;34957:37;34976:17;34957:18;:37::i;:::-;35010:27;;-1:-1:-1;;;;;35010:27:0;;;;;;;;34890:155;:::o;35192:311::-;27664:20;;35267:103;;;;-1:-1:-1;;;35267:103:0;;2952:2:1;35267:103:0;;;2934:21:1;2991:2;2971:18;;;2964:30;3030:34;3010:18;;;3003:62;-1:-1:-1;;;3081:18:1;;;3074:51;3142:19;;35267:103:0;2924:243:1;35267:103:0;34354:66;35454:31;35439:57::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:196::-;251:6;304:2;292:9;283:7;279:23;275:32;272:2;;;325:6;317;310:22;272:2;353:29;372:9;353:29;:::i;:::-;343:39;262:126;-1:-1:-1;;;262:126:1:o;393:715::-;472:6;480;488;541:2;529:9;520:7;516:23;512:32;509:2;;;562:6;554;547:22;509:2;590:29;609:9;590:29;:::i;:::-;580:39;;670:2;659:9;655:18;642:32;693:18;734:2;726:6;723:14;720:2;;;755:6;747;740:22;720:2;798:6;787:9;783:22;773:32;;843:7;836:4;832:2;828:13;824:27;814:2;;870:6;862;855:22;814:2;915;902:16;941:2;933:6;930:14;927:2;;;962:6;954;947:22;927:2;1012:7;1007:2;998:6;994:2;990:15;986:24;983:37;980:2;;;1038:6;1030;1023:22;980:2;1074;1070;1066:11;1056:21;;1096:6;1086:16;;;;;499:609;;;;;:::o;1113:273::-;1296:6;1288;1283:3;1270:33;1252:3;1322:16;;1347:15;;;1322:16;1260:126;-1:-1:-1;1260:126:1:o

Swarm Source

ipfs://5e5f649162630a0b896a62e8b450cfc6c0c81be3f1f649375056826fd2b8152d
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.