Contract 0x9F88c0f6271D60f665FF6db05cE20B634387aCE0

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc59011215d913683f3baf61ea494af0de64658000682f6570262d7b317e0612cSwap75935332021-11-29 19:28:24172 days 7 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00219445580432.629372293
0xbfb1835cde005203afe79524c25a05125831b523af7560cf68bc136f1770bafeSwap74865602021-11-27 7:46:35174 days 19 hrs ago0x20cfbddfe2c28f38b90803b99b3f8c57026068c2 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0016822525
0xa99e2c545b6ef6f3e6b58f1ab3a2eec1d709acefee19f99b32336e0764e0d672Swap73391282021-11-23 21:23:43178 days 5 hrs ago0xbd3420e8104486b8bb782166379e6678ade9d94e IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.008978703687106.410482438
0x8a17726c49f42255b60a58b18ea1c94dda5051fff89a80842a5ab2e7c2da7350Swap73276632021-11-23 15:01:13178 days 11 hrs ago0x157a9cd6b432e3c0d00c78734ffa5ab424182bf9 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00339391722350.446167003
0xab385ccaa672be1993b2061efdc0832348b3f1fc23a59cb56c27e5cb45d80f46Swap73275042021-11-23 14:55:54178 days 11 hrs ago0x69c7f6f8d69c374c4f30c4222b8672ed36796e8e IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00411719261148.787683515
0x46ebd4b1f49dace516c0092c564f3accd67ebfcb08661221dd01c9deff82f9b5Swap73238092021-11-23 12:52:33178 days 14 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00216275855425.631782628
0xdfdc3de80d9f7cda61b558ff6c3b8baf8eb33588dfabb27dc8805bcc2bf1a0dbSwap72387022021-11-21 13:25:21180 days 13 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00242084558135.982722165
0x1f4c382cb7ab0181c3daa91434a51b6b37bc60319e73d24dfcbefb27c9f28366Swap72364212021-11-21 12:09:16180 days 14 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021094525
0x8cf954a3edcd7020ed9d7dba7c7222641bf9e8471cbd20e369f9e982f135db2fSwap72349342021-11-21 11:19:28180 days 15 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00226768385726.875297556
0xe07aab2172ab0394a34e6d0151f81acbaaa78acda0f767e046601484e7042292Swap72170352021-11-21 1:21:56181 days 1 hr ago0x96cf152391a62e6676cd698fb4e0151a0449ba9e IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0025313430
0xb2c22e989765170c9d8c63a8aafd4686e42aa76f8fcd74cb8c642af6637c4e59Swap72111632021-11-20 22:06:01181 days 4 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00698694951182.817124336
0x9838cb90dcd36b2e7a56aefb47b33e04e4e0526c7106f3bc096eaf829948498eSwap71713812021-11-19 23:56:34182 days 2 hrs ago0xca05a8f5cbda92285635f7bb3d1ddd698842fbd3 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00215251661831.994360982
0x96e72c4226f03f7121be44024cfcc700911d04696ebb2251f00a07a63eed771aSwap71532012021-11-19 13:49:16182 days 13 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00174930165526.001094791
0x5d689cca99822035d8510a47ec0c72631b2ac71ca05e50c3c932cad3c974f692Swap71509062021-11-19 12:32:08182 days 14 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021094525
0xcfe17ee48fbdb229bb56f71ccf1e165c84626cb67922738edd257360d937f38fSwap71506762021-11-19 12:24:25182 days 14 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021088525
0x5dc0b52673d2913fc7877d9080432fec1f84894954237c59c79db03086d6f691Swap71450132021-11-19 9:12:04182 days 17 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00170126293425.287061666
0x9fa50af945bcba13d248953d60dcfac1a4a98af8e65d871bd87e4a561329b805Swap71449352021-11-19 9:09:31182 days 17 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021088525
0xb34da9ab629bd21a0954c98b86b0a4aeb84964267a0cb95694757a27cd090e56Swap71447562021-11-19 9:03:26182 days 17 hrs ago0x37e229da51d1c1e1bdf05e2c0d3e9493bfd33d6c IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021088525
0x837a2dccbacc2fb323187ba12cf54838bf4b461c3bd535a344a03659fc2b7e7eSwap71421312021-11-19 7:34:29182 days 19 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021088525
0xe28993a8aa99ffd8cb79ec8a812772a8d069ecf2772e704f4606ccb1b3a5c921Swap71365352021-11-19 4:26:47182 days 22 hrs ago0x96cf152391a62e6676cd698fb4e0151a0449ba9e IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021094525
0xf926ef0f63c764fc08c12ec32dd01b05e053b07da773ec5efded1348cc5bb971Swap71360742021-11-19 4:11:13182 days 22 hrs ago0x96cf152391a62e6676cd698fb4e0151a0449ba9e IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0021094525
0xa2f0791d07431b7d2f1c52401fa4e44f7d5c000a7fb5a77a4982d735bf93d0ecSwap71241092021-11-18 21:30:21183 days 5 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00589715651569.889740397
0xf614c45432f454c18e12c5dd2f62d1419fc7564b1cdd78dad7cd0af1f0a924d0Swap71229272021-11-18 20:50:54183 days 6 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00625652934474.148822496
0x17d42f40a96a64c15601f94eeb8d43fd7f4acf932f3a3a4555bc757266658d81Swap71091092021-11-18 13:09:23183 days 13 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.0027310742732.367136823
0x14aace8eef49d6904f3df9f05ba9bf7df789522cb4c084bec340b30acfe31b07Swap71007882021-11-18 8:31:12183 days 18 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x9f88c0f6271d60f665ff6db05ce20b634387ace00 AVAX0.00217315721525.762349326
[ 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"}]

60e060405234801561001057600080fd5b50604051610ab4380380610ab483398101604081905261002f916100c3565b61003833610057565b600180556001600160a01b0391821660a052166080523360c0526100f6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100be57600080fd5b919050565b600080604083850312156100d657600080fd5b6100df836100a7565b91506100ed602084016100a7565b90509250929050565b60805160a05160c05161096e6101466000396000818160d7015261053a0152600081816087015281816103e901526105ee015260008181610139015281816102a20152610569015261096e6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b1461010357806394b918de14610121578063dc73e49c14610134578063f2fde38b1461015b57600080fd5b806336548d7e146100825780633ad10ef6146100d2578063715018a6146100f9575b600080fd5b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016e565b005b60005473ffffffffffffffffffffffffffffffffffffffff166100a9565b61010161012f366004610873565b610200565b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016936600461088c565b6106bb565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101fe60006107eb565b565b6002600154141561026d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101eb565b60026001556040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015281907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156102fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032291906108c2565b10156103b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f737761703a20796f7520686176656e277420676f7420656e6f75676820746f6b60448201527f656e7320746f207377617000000000000000000000000000000000000000000060648201526084016101eb565b6103bb816064610860565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610445573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046991906108c2565b10156104f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f737761703a20636f6e7472616374206861736e277420676f7420656e6f75676860448201527f204f4e494f4e20746f207377617000000000000000000000000000000000000060648201526084016101eb565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af11580156105b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d691906108db565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb3361061f846064610860565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b391906108db565b505060018055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461073c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101eb565b73ffffffffffffffffffffffffffffffffffffffff81166107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101eb565b6107e8816107eb565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061086c82846108fd565b9392505050565b60006020828403121561088557600080fd5b5035919050565b60006020828403121561089e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b6000602082840312156108d457600080fd5b5051919050565b6000602082840312156108ed57600080fd5b8151801515811461086c57600080fd5b600082610933577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220c1f07a55e68877d082b4ae742f6bacee31107e2f7718749fa8eb0e9836bc389064736f6c634300080a0033000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e78000000000000000000000000a005b96ef624a6646763715b667343341d590623

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

000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e78000000000000000000000000a005b96ef624a6646763715b667343341d590623

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

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


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.