Contract 0x616b7A750C51af2419D4A720549f2c45Fc57AE41

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x22c2413c6f3f4ee15c23322cc83b327a9503d50eb632dfa2a1ab0e8e72675818Swap75795652021-11-29 11:41:01172 days 14 hrs ago0xa9d0f7f41a7f1dc3c0e3788619db706139342c7a IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0x9a8b2f21fcc325e471e442f6d1a7a4900147dc72826f4580fb5d2a3d3706bdaaSwap74934232021-11-27 11:39:03174 days 14 hrs ago0x0493a263cbcdc0e8b7876d76b63031ea5043124f IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0x1c8f4273787c0c99717671d731607e83f52af308def402b815faa0086dd5cf67Swap74865682021-11-27 7:46:52174 days 18 hrs ago0x20cfbddfe2c28f38b90803b99b3f8c57026068c2 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0x25403dac86c9e065734dee5d228dc2edad2b96f14f3fed4291371a62397df2f6Swap74591302021-11-26 16:18:39175 days 10 hrs ago0x37e229da51d1c1e1bdf05e2c0d3e9493bfd33d6c IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00262653511839.040029701
0x064cbf30fac6dd597162e3d3dc3a8dae58bd9b26768bba49437bd4b16a9dfebcSwap74385092021-11-26 4:48:34175 days 21 hrs ago0x8cb66cf5c62bd29175e5ec411ea29b9e4607e6bf IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0021094525
0x9f475eec0f9a92f7c8842ef33a7adf2331ee17f2b3979b209570e5511aa6b016Swap74121122021-11-25 14:05:14176 days 12 hrs ago0x2b3740e7553fa04b2328d0a8aa3ad92755f3698a IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00219347698825.995840011
0x6740a2b7e8003cd28cefafec9f2356ef2e11a57804762d78ba70c8e81a0c9a88Swap74033642021-11-25 9:12:19176 days 17 hrs ago0x726ed27113ec97da911999abef7818555d088b38 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0xa41e08f27a78d307455e485a4d109f7b7bcd9db70b4346e500bee65e2889fa9eSwap74021612021-11-25 8:32:02176 days 17 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0xbb54bcb3fc8a224ceb2b0c51535601b22189220cf867e7223a4249bb2a4c3fe0Swap74008512021-11-25 7:48:04176 days 18 hrs ago0x91d3abd2286de6df6b8a4668891b389eba4656c6 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016819525
0x61275934e686bf7aa4c611cb85006d942b43430d922fa9ce38429ffc2db079cfSwap74001112021-11-25 7:23:16176 days 19 hrs ago0x61fda6d231bbd130895f4533161b0f73d55d5496 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00199885180229.710333279
0xb01e313f7ee2b663d3dc860b982fda6e1e913420ccec367d2169fa07192944a2Swap73990132021-11-25 6:46:30176 days 19 hrs ago0x2ec4904997c7193f8f3ec803682224e97598ce07 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0016822525
0xe2a390b5ccaee32d6293624e30e70208eb448f5b3200993c4c1e7c7072e491deSwap73984502021-11-25 6:27:43176 days 20 hrs ago0x69c7f6f8d69c374c4f30c4222b8672ed36796e8e IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0021094525
0xdae4029d8139bac9f3f4c675fa88f7f99dd9fbacd6bff3bfa921c94d09b72fcaSwap73929732021-11-25 3:24:26176 days 23 hrs ago0x51aad11e5a5bd05b3409358853d0d6a66aa60c40 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00320403383947.623797377
0x951015c35914173e9026fc761125eac1083ac8ed956dada36c5ac2c4fecced7cSwap73835712021-11-24 22:09:36177 days 4 hrs ago0x085d1a6519f9ca696c4260115cb79dca926afb78 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00525479206378.105652125
0x5ca4679c342c6f81b48ec56a85818c05b27de1288262161d9a27053325f24183Swap73742972021-11-24 16:59:19177 days 9 hrs ago0x512e3eb472d53df71db0252cb8dccd25cd05e9e9 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00361652058953.754876619
0xb9bf8956e59dcd36c256655b1631ab2d12801d8c981cc6177f04bb5767d02630Swap73718412021-11-24 15:37:23177 days 10 hrs ago0xb288607e428ab487b284690495a7143345ea6633 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00573452027185.251394035
0xd89176f3447ed7f6964825fdcabf7d7a5f4669052d39eca9b787f1d94996b921Swap73698182021-11-24 14:29:52177 days 12 hrs ago0xbd3420e8104486b8bb782166379e6678ade9d94e IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00428444041463.682636437
0x4708342f63edeb85d9ff7dc058813937987ec94be58cf66dedfdedddc2aba50cSwap73611102021-11-24 9:39:07177 days 16 hrs ago0x085d1a6519f9ca696c4260115cb79dca926afb78 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00211573959925.078107291
0x99f983360846e1e4b147b9bafc44a1da2bca04125145525f7215a51f5771389bSwap73596872021-11-24 8:51:27177 days 17 hrs ago0x61fda6d231bbd130895f4533161b0f73d55d5496 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.0021094525
0xffcf94724796f384550518c7ddd163edcd1cd5ebb1f64233ad42c5e8c4ae9edcSwap73559402021-11-24 6:45:55177 days 19 hrs ago0xb288607e428ab487b284690495a7143345ea6633 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00242790726828.774174177
0xd0754c162efa59dc31a6f3db392a24cde52964b2877d450ea00a8217924db375Swap73391342021-11-23 21:23:56178 days 5 hrs ago0xbd3420e8104486b8bb782166379e6678ade9d94e IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.007159084437106.410482438
0x14d0044ee472cf979b8b1b2433bc71f42694f43df3dbf3ccb6578c3b277ded22Swap73351012021-11-23 19:09:30178 days 7 hrs ago0x0493a263cbcdc0e8b7876d76b63031ea5043124f IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00608888625990.535674597
0xd2c598d71acafd236994f6d61cbf258124e6b768b7f47ccebf6b2fffe84822d8Swap73346442021-11-23 18:54:18178 days 7 hrs ago0x0493a263cbcdc0e8b7876d76b63031ea5043124f IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00424167177563.046936231
0xb80385a5263386207509ef46721c443e97ef38e3afc4f1e8b711d252763f4fc7Swap73275462021-11-23 14:57:19178 days 11 hrs ago0x157a9cd6b432e3c0d00c78734ffa5ab424182bf9 IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00321465296747.781636896
0xa419b681ca8721e0a8e214be38d9a3aa1f7e5c565a09ae10ebca86d02d469b28Swap73275042021-11-23 14:55:54178 days 11 hrs ago0x69c7f6f8d69c374c4f30c4222b8672ed36796e8e IN  0x616b7a750c51af2419d4a720549f2c45fc57ae410 AVAX0.00411719261148.787683515
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FarmersOnlySwapContract

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at snowtrace.io on 2021-11-15
*/

// SPDX-License-Identifier: MIT

/**
 * XXX
 * 𝗖𝗼𝗻𝘁𝗿𝗮𝗰𝘁 𝗼𝗿𝗶𝗴𝗶𝗻𝗮𝗹𝗹𝘆 𝗰𝗿𝗲𝗮𝘁𝗲𝗱 𝗯𝘆 𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆 𝗗𝗲𝘃
 * 𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆: 𝗮𝗻 𝗶𝗻𝗻𝗼𝘃𝗮𝘁𝗶𝘃𝗲 𝗗𝗲𝗙𝗶 𝗽𝗿𝗼𝘁𝗼𝗰𝗼𝗹 𝗳𝗼𝗿 𝗬𝗶𝗲𝗹𝗱 𝗙𝗮𝗿𝗺𝗶𝗻𝗴 𝗼𝗻 𝗔𝘃𝗮𝗹𝗮𝗻𝗰𝗵𝗲
 * 
 * 𝗟𝗶𝗻𝗸𝘀:
 * 𝗵𝘁𝘁𝗽𝘀://𝗳𝗮𝗿𝗺𝗲𝗿𝘀𝗼𝗻𝗹𝘆.𝗳𝗮𝗿𝗺
 * 𝗵𝘁𝘁𝗽𝘀://𝘁.𝗺𝗲/𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆𝟮
 * 𝗵𝘁𝘁𝗽𝘀://𝘁𝘄𝗶𝘁𝘁𝗲𝗿.𝗰𝗼𝗺/𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆𝗗𝗲𝗙𝗶
 * XXX
 */

pragma solidity ^0.8.10;

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

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

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

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

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

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

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

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

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

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

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

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

// File [email protected]
/**
 * @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.

        
    𝑮𝑼𝒀 𝑾𝑯𝑶 𝑩𝑳𝑰𝑵𝑫𝑳𝒀 𝑭𝑶𝑹𝑲𝑬𝑫 𝑻𝑯𝑬 𝑪𝑶𝑵𝑻𝑹𝑨𝑪𝑻
                    |
                   |
                  |
                 V
                    
        
 /     \             \            /    \       
|       |             \          |      |      
|       `.             |         |       :     
`        F             |        \|       |     
 \       | /       /  \\\   --__ \\       :    
  \      \/   _--~~          ~--__| A     |      
   \      \_-~                    ~-_\    |    
    \_     R        _.--------.______\|   |    
      \     \______// _ ___ _ (_(__>  \   |    
       \   .  C ___)  ______ (_(____>  M  /    
       /\ |   C ____)/      \ (_____>  |_/     
      / /\|   C_____)       |  (___>   /  \    
     |   E   _C_____)\______/  // _/ /     \   
     |    \  |__   \\_________// (__/       |  
    | \    \____)   `----   --'             R  
    |  \_          ___\       /_          _/ | 
   S              /    |     |  \            | 
   |             |    /       \  \           | 
   |          / /    O         |  \           |
   |         / /      \__/\___/    N          |
  |           /        |    |       |         |
  L          |         |    |       |         Y
                      
                      
                       ^
                      /
                    / 
                  /
            𝑭𝑨𝑹𝑴𝑬𝑹𝑺𝑶𝑵𝑳𝒀 𝑫𝑬𝑽'𝒔 𝑩𝑰𝑮 𝑩𝑶𝒀


 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File [email protected]
/**
 * XXX
 * 𝗖𝗼𝗻𝘁𝗿𝗮𝗰𝘁 𝗼𝗿𝗶𝗴𝗶𝗻𝗮𝗹𝗹𝘆 𝗰𝗿𝗲𝗮𝘁𝗲𝗱 𝗯𝘆 𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆 𝗗𝗲𝘃
 * 𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆: 𝗮𝗻 𝗶𝗻𝗻𝗼𝘃𝗮𝘁𝗶𝘃𝗲 𝗗𝗲𝗙𝗶 𝗽𝗿𝗼𝘁𝗼𝗰𝗼𝗹 𝗳𝗼𝗿 𝗬𝗶𝗲𝗹𝗱 𝗙𝗮𝗿𝗺𝗶𝗻𝗴 𝗼𝗻 𝗔𝘃𝗮𝗹𝗮𝗻𝗰𝗵𝗲
 * 
 * 𝗟𝗶𝗻𝗸𝘀:
 * 𝗵𝘁𝘁𝗽𝘀://𝗳𝗮𝗿𝗺𝗲𝗿𝘀𝗼𝗻𝗹𝘆.𝗳𝗮𝗿𝗺
 * 𝗵𝘁𝘁𝗽𝘀://𝘁.𝗺𝗲/𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆𝟮
 * 𝗵𝘁𝘁𝗽𝘀://𝘁𝘄𝗶𝘁𝘁𝗲𝗿.𝗰𝗼𝗺/𝗙𝗮𝗿𝗺𝗲𝗿𝘀𝗢𝗻𝗹𝘆𝗗𝗲𝗙𝗶
 * XXX
 */
contract FarmersOnlySwapContract is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    
    IERC20 public immutable swapToken;
    IERC20 public immutable onion;
    address public immutable devAddress;
    
    constructor (
        IERC20 _onion,
        IERC20 _swapToken
        ){
            onion = _onion;
            swapToken = _swapToken;
            devAddress = msg.sender;
        }

    function swap(uint256 amount) nonReentrant public {
        require(swapToken.balanceOf(msg.sender) >= amount, "swap: you haven't got enough tokens to swap");
        require(onion.balanceOf(address(this)) >= amount.div(100), "swap: contract hasn't got enough ONION to swap");

        swapToken.transferFrom(msg.sender, devAddress, amount);
        onion.transfer(msg.sender, amount.div(100));
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_onion","type":"address"},{"internalType":"contract IERC20","name":"_swapToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"devAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onion","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e060405234801561001057600080fd5b50604051610ab4380380610ab483398101604081905261002f916100c3565b61003833610057565b600180556001600160a01b0391821660a052166080523360c0526100f6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100be57600080fd5b919050565b600080604083850312156100d657600080fd5b6100df836100a7565b91506100ed602084016100a7565b90509250929050565b60805160a05160c05161096e6101466000396000818160d7015261053a0152600081816087015281816103e901526105ee015260008181610139015281816102a20152610569015261096e6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b1461010357806394b918de14610121578063dc73e49c14610134578063f2fde38b1461015b57600080fd5b806336548d7e146100825780633ad10ef6146100d2578063715018a6146100f9575b600080fd5b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016e565b005b60005473ffffffffffffffffffffffffffffffffffffffff166100a9565b61010161012f366004610873565b610200565b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016936600461088c565b6106bb565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101fe60006107eb565b565b6002600154141561026d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101eb565b60026001556040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015281907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156102fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032291906108c2565b10156103b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f737761703a20796f7520686176656e277420676f7420656e6f75676820746f6b60448201527f656e7320746f207377617000000000000000000000000000000000000000000060648201526084016101eb565b6103bb816064610860565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610445573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046991906108c2565b10156104f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f737761703a20636f6e7472616374206861736e277420676f7420656e6f75676860448201527f204f4e494f4e20746f207377617000000000000000000000000000000000000060648201526084016101eb565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af11580156105b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d691906108db565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb3361061f846064610860565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b391906108db565b505060018055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461073c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101eb565b73ffffffffffffffffffffffffffffffffffffffff81166107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101eb565b6107e8816107eb565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061086c82846108fd565b9392505050565b60006020828403121561088557600080fd5b5035919050565b60006020828403121561089e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b6000602082840312156108d457600080fd5b5051919050565b6000602082840312156108ed57600080fd5b8151801515811461086c57600080fd5b600082610933577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220c1f07a55e68877d082b4ae742f6bacee31107e2f7718749fa8eb0e9836bc389064736f6c634300080a0033000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e78000000000000000000000000b7837ab6000dbda8683951309c6614ae279ac62a

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

000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e78000000000000000000000000b7837ab6000dbda8683951309c6614ae279ac62a

-----Decoded View---------------
Arg [0] : _onion (address): 0xf6931e67ef0cb20423351a53069719df2ad76e78
Arg [1] : _swapToken (address): 0xb7837ab6000dbda8683951309c6614ae279ac62a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e78
Arg [1] : 000000000000000000000000b7837ab6000dbda8683951309c6614ae279ac62a


Deployed ByteCode Sourcemap

18446:839:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18593:29;;;;;;;;204:42:1;192:55;;;174:74;;162:2;147:18;18593:29:0;;;;;;;18629:35;;;;;16975:94;;;:::i;:::-;;16324:87;16370:7;16397:6;;;16324:87;;18876:406;;;;;;:::i;:::-;;:::i;18553:33::-;;;;;17224:192;;;;;;:::i;:::-;;:::i;16975:94::-;16370:7;16397:6;16544:23;16397:6;13662:10;16544:23;16536:68;;;;;;;1191:2:1;16536:68:0;;;1173:21:1;;;1210:18;;;1203:30;1269:34;1249:18;;;1242:62;1321:18;;16536:68:0;;;;;;;;;17040:21:::1;17058:1;17040:9;:21::i;:::-;16975:94::o:0;18876:406::-;12070:1;12666:7;;:19;;12658:63;;;;;;;1552:2:1;12658:63:0;;;1534:21:1;1591:2;1571:18;;;1564:30;1630:33;1610:18;;;1603:61;1681:18;;12658:63:0;1350:355:1;12658:63:0;12070:1;12799:7;:18;18945:31:::1;::::0;;;;18965:10:::1;18945:31;::::0;::::1;174:74:1::0;18980:6:0;;18945:9:::1;:19;;::::0;::::1;::::0;147:18:1;;18945:31:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:41;;18937:97;;;::::0;::::1;::::0;;2101:2:1;18937:97:0::1;::::0;::::1;2083:21:1::0;2140:2;2120:18;;;2113:30;2179:34;2159:18;;;2152:62;2250:13;2230:18;;;2223:41;2281:19;;18937:97:0::1;1899:407:1::0;18937:97:0::1;19087:15;:6:::0;19098:3:::1;19087:10;:15::i;:::-;19053:30;::::0;;;;19077:4:::1;19053:30;::::0;::::1;174:74:1::0;19053:5:0::1;:15;;::::0;::::1;::::0;147:18:1;;19053:30:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;19045:108;;;::::0;::::1;::::0;;2513:2:1;19045:108:0::1;::::0;::::1;2495:21:1::0;2552:2;2532:18;;;2525:30;2591:34;2571:18;;;2564:62;2662:16;2642:18;;;2635:44;2696:19;;19045:108:0::1;2311:410:1::0;19045:108:0::1;19166:54;::::0;;;;19189:10:::1;19166:54;::::0;::::1;2989:34:1::0;19166:22:0::1;19201:10;3059:15:1::0;;3039:18;;;3032:43;3091:18;;;3084:34;;;19166:9:0::1;:22;::::0;::::1;::::0;2901:18:1;;19166:54:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;19231:14:0::1;:5;:14;;19246:10;19258:15;:6:::0;19269:3:::1;19258:10;:15::i;:::-;19231:43;::::0;;::::1;::::0;;;;;;3615:42:1;3603:55;;;19231:43:0::1;::::0;::::1;3585:74:1::0;3675:18;;;3668:34;3558:18;;19231:43:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;12026:1:0;12978:22;;18876:406::o;17224:192::-;16370:7;16397:6;16544:23;16397:6;13662:10;16544:23;16536:68;;;;;;;1191:2:1;16536:68:0;;;1173:21:1;;;1210:18;;;1203:30;1269:34;1249:18;;;1242:62;1321:18;;16536:68:0;989:356:1;16536:68:0;17313:22:::1;::::0;::::1;17305:73;;;::::0;::::1;::::0;;3915:2:1;17305:73:0::1;::::0;::::1;3897:21:1::0;3954:2;3934:18;;;3927:30;3993:34;3973:18;;;3966:62;4064:8;4044:18;;;4037:36;4090:19;;17305:73:0::1;3713:402:1::0;17305:73:0::1;17389:19;17399:8;17389:9;:19::i;:::-;17224:192:::0;:::o;17424:173::-;17480:16;17499:6;;;17516:17;;;;;;;;;;17549:40;;17499:6;;;;;;;17549:40;;17480:16;17549:40;17469:128;17424:173;:::o;4583:98::-;4641:7;4668:5;4672:1;4668;:5;:::i;:::-;4661:12;4583:98;-1:-1:-1;;;4583:98:0:o;490:180:1:-;549:6;602:2;590:9;581:7;577:23;573:32;570:52;;;618:1;615;608:12;570:52;-1:-1:-1;641:23:1;;490:180;-1:-1:-1;490:180:1:o;675:309::-;734:6;787:2;775:9;766:7;762:23;758:32;755:52;;;803:1;800;793:12;755:52;842:9;829:23;892:42;885:5;881:54;874:5;871:65;861:93;;950:1;947;940:12;1710:184;1780:6;1833:2;1821:9;1812:7;1808:23;1804:32;1801:52;;;1849:1;1846;1839:12;1801:52;-1:-1:-1;1872:16:1;;1710:184;-1:-1:-1;1710:184:1:o;3129:277::-;3196:6;3249:2;3237:9;3228:7;3224:23;3220:32;3217:52;;;3265:1;3262;3255:12;3217:52;3297:9;3291:16;3350:5;3343:13;3336:21;3329:5;3326:32;3316:60;;3372:1;3369;3362:12;4120:274;4160:1;4186;4176:189;;4221:77;4218:1;4211:88;4322:4;4319:1;4312:15;4350:4;4347:1;4340:15;4176:189;-1:-1:-1;4379:9:1;;4120:274::o

Swarm Source

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