Contract 0x41bad4bd3DC784DdB8E11b4b53110cdC6745AF5E

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xc8124d9151ff2c93a9bcca0a7cae88b16b5c1d1be87e21fd5942edf6f47201feSwap76057912021-11-30 2:18:30172 days 1 hr ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00196903849229.277641374
0x405d57c19c4ee61f6e6b1b35a34083853d6f6e8cbd95c62cfedc812bc8136e2aSwap75935342021-11-29 19:28:25172 days 7 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00225648284733.539683806
0x32a066186a46afba89e3e542bc22aa8316f33cf8c0c26ced9a1c24c97cf0360cSwap74865792021-11-27 7:47:17174 days 19 hrs ago0x20cfbddfe2c28f38b90803b99b3f8c57026068c2 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0016822525
0xdd07832bc4d3efea7e09b2fde5b75108e3841a1b753280ce8d7bab5d63baef4cSwap74591292021-11-26 16:18:34175 days 11 hrs ago0x37e229da51d1c1e1bdf05e2c0d3e9493bfd33d6c IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00262606663739.040029701
0x49eb420e2875ae10783f273477dcc7e7266d92fb3f6e386b1b9de2ddbda16dbaSwap74022982021-11-25 8:36:39176 days 18 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0016819525
0x6f64b580dcb0c7c02a0838be9e6d9ba9a0073d30b056082aecbae8ee5ff4b98fSwap73391342021-11-23 21:23:56178 days 5 hrs ago0xbd3420e8104486b8bb782166379e6678ade9d94e IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.007159084437106.410482438
0x5a1956bb7c7bda320fc4feee974b160cef3fdda578e5ae7b22bd7f17803acf8fSwap73275402021-11-23 14:57:07178 days 12 hrs ago0x157a9cd6b432e3c0d00c78734ffa5ab424182bf9 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00451917391953.558675483
0x98d51e0c52b0dc0449798a2755b8b26d6c49159bdf18c84a8c547bd7897db001Swap73274982021-11-23 14:55:43178 days 12 hrs ago0x69c7f6f8d69c374c4f30c4222b8672ed36796e8e IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00390730852446.300610555
0x7495e22d4882944525738e00dd4c20a71598969b908420e3199ecbed12bd6eadSwap73237732021-11-23 12:51:14178 days 14 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00205822719230.592871262
0x23dbcde49dcb872785afbb0cefed0221a083fc419676bfe85f7c32b152e9fb49Swap73117522021-11-23 6:09:35178 days 21 hrs ago0x37e229da51d1c1e1bdf05e2c0d3e9493bfd33d6c IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00349308216251.920124894
0x2c44442c39956a8066bb1c9caa05925cb699260e73d22e5016edb964bc4b187aSwap72551742021-11-21 22:35:10180 days 4 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00563120551366.737840598
0xf5674e73d8e403bf54731c563393c2b2603f405dc1d3bd211446e4f63b1647a7Swap72365832021-11-21 12:14:40180 days 15 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00224964404526.661499982
0x765a5d71f2e66bbbb897d3eb6157e875dd9bb582b0589f6b341ed9ecb6270b49Swap72351892021-11-21 11:28:02180 days 15 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0021094525
0x1b901a34f8c8d6407037c8647cfafe451f040505fe58c840d425967be6e0f8a2Swap72350662021-11-21 11:23:48180 days 15 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0021094525
0x20dcb369e20b1f2b463d912c209841fbcea857e91f3572dc73d7e745603d3cb9Swap72349522021-11-21 11:20:01180 days 15 hrs ago0x37e229da51d1c1e1bdf05e2c0d3e9493bfd33d6c IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0021094525
0xdd252bb479552a240c2f0db341e376bc6c8a2616d24d84cbe87ab633f9a42206Swap72348962021-11-21 11:18:13180 days 16 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0021094525
0xae3bafa74bff8f66c73ff03a66f56622bf10ddbadabc4f9d27446777d783ffb3Swap71902362021-11-20 10:26:46181 days 16 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0016819525
0x300c30efe280091d01f5f815351d9ac4dee46266da43c003a981706d73b1a57cSwap71890742021-11-20 9:47:48181 days 17 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0016819525
0x6e94f1546995ad2429812c3a4c7c8585faf394c16bb4dce45540c986a948a7c4Swap71733482021-11-20 1:01:55182 days 2 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00379363254844.972764162
0xd6b9e5c48eb8724340ce0abad76ce1485780bd4b67cd9b82ac22cb15abbbc62fSwap71714792021-11-19 23:59:46182 days 3 hrs ago0xca05a8f5cbda92285635f7bb3d1ddd698842fbd3 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00259117956338.51451535
0x108f993b8a85bf9a84baf86d484859c374becc8b69d1cdc885d0c0f52bb69532Swap71685792021-11-19 22:23:09182 days 4 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0016819525
0xb89203dc9180eae67d9a665090fefd998e53c569d4ad793b210f541432680c6cSwap71638622021-11-19 19:46:21182 days 7 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.0021094525
0x43218d2ffc09e6da9648fdc4797170867ddca062664b3893e9968e529627177cSwap71535662021-11-19 14:01:34182 days 13 hrs ago0x16c0c45f9a3d82a2622b04812c602d19bd4dfc42 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00176019000226.162935913
0xdce7c28ec8692569f522434da35adf97e89361f61dfe64facd260a33e84b554dSwap71533352021-11-19 13:53:49182 days 13 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00199680925729.67997351
0x0612d2f4d911ffeed318d0773a3ff823b80b4b04ee3eb8728d5af49be4bc5ae1Swap71532052021-11-19 13:49:26182 days 13 hrs ago0xc462bf6cd158e3301dc1bcdb11f48107f0ea8c82 IN  0x41bad4bd3dc784ddb8e11b4b53110cdc6745af5e0 AVAX0.00179686954326.708129602
[ 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-17
*/

// 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"}]

60e060405234801561001057600080fd5b50604051610ab4380380610ab483398101604081905261002f916100c3565b61003833610057565b600180556001600160a01b0391821660a052166080523360c0526100f6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100be57600080fd5b919050565b600080604083850312156100d657600080fd5b6100df836100a7565b91506100ed602084016100a7565b90509250929050565b60805160a05160c05161096e6101466000396000818160d7015261053a0152600081816087015281816103e901526105ee015260008181610139015281816102a20152610569015261096e6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b1461010357806394b918de14610121578063dc73e49c14610134578063f2fde38b1461015b57600080fd5b806336548d7e146100825780633ad10ef6146100d2578063715018a6146100f9575b600080fd5b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016e565b005b60005473ffffffffffffffffffffffffffffffffffffffff166100a9565b61010161012f366004610873565b610200565b6100a97f000000000000000000000000000000000000000000000000000000000000000081565b61010161016936600461088c565b6106bb565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6101fe60006107eb565b565b6002600154141561026d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016101eb565b60026001556040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015281907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156102fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032291906108c2565b10156103b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f737761703a20796f7520686176656e277420676f7420656e6f75676820746f6b60448201527f656e7320746f207377617000000000000000000000000000000000000000000060648201526084016101eb565b6103bb816064610860565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610445573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061046991906108c2565b10156104f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f737761703a20636f6e7472616374206861736e277420676f7420656e6f75676860448201527f204f4e494f4e20746f207377617000000000000000000000000000000000000060648201526084016101eb565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906064016020604051808303816000875af11580156105b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d691906108db565b5073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663a9059cbb3361061f846064610860565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af115801561068f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b391906108db565b505060018055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461073c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101eb565b73ffffffffffffffffffffffffffffffffffffffff81166107df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101eb565b6107e8816107eb565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600061086c82846108fd565b9392505050565b60006020828403121561088557600080fd5b5035919050565b60006020828403121561089e57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461086c57600080fd5b6000602082840312156108d457600080fd5b5051919050565b6000602082840312156108ed57600080fd5b8151801515811461086c57600080fd5b600082610933577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220c1f07a55e68877d082b4ae742f6bacee31107e2f7718749fa8eb0e9836bc389064736f6c634300080a0033000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e780000000000000000000000006514c73189bdc5668b497b6d70c0f69dace1addf

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

000000000000000000000000f6931e67ef0cb20423351a53069719df2ad76e780000000000000000000000006514c73189bdc5668b497b6d70c0f69dace1addf

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

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


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.