Contract 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca 7

 

Contract Overview

Balance:
0 ETH

ETH Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8c93f71a5f6b9c6e58e0bc50fc88bc63b2f8c5a9161b20c1f3edc7a95d898150Withdraw Rewards1744153262024-01-26 15:33:4062 days 5 hrs agoJones DAO: Deployer IN  0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH0.00005306 0.1
0x29ff98a7d0bdda238957a8a476c1d429d47468179f22818e7341864266aea2a8Update Milliner1734992542024-01-23 22:44:1064 days 22 hrs agoJones DAO: Deployer IN  0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH0.00002459 0.1
0xc341a9269d26d238f93df07f28e453a9d951e16b96ab1e5ab889d9b0ce723b49Transfer Ownersh...339784982022-10-30 19:50:44515 days 1 hr agoJones DAO: Deployer IN  0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH0.00001134 0.1
0x1f20ed8d3223d2be9b290ffeedc6730320e804672695dbd248c35a1e754bd09b0x60806040339760592022-10-30 19:37:29515 days 1 hr agoJones DAO: Deployer IN  Create: HatDistributionCenterV20 ETH0.00018338 0.1
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x22e19db745adfaeef120fb4132630505efba5c50bc46b18b7499a200bc77b5e3720766152023-03-21 9:37:21373 days 11 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x22e19db745adfaeef120fb4132630505efba5c50bc46b18b7499a200bc77b5e3720766152023-03-21 9:37:21373 days 11 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x22e19db745adfaeef120fb4132630505efba5c50bc46b18b7499a200bc77b5e3720766152023-03-21 9:37:21373 days 11 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0x22e19db745adfaeef120fb4132630505efba5c50bc46b18b7499a200bc77b5e3720766152023-03-21 9:37:21373 days 11 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x22e19db745adfaeef120fb4132630505efba5c50bc46b18b7499a200bc77b5e3720766152023-03-21 9:37:21373 days 11 hrs ago Jones DAO: Milliner V2 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH
0x42b34784ba301b99a7e76083e53c7f8487a60c6b999984f90d9560a647b94da1720398192023-03-21 7:06:27373 days 13 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x42b34784ba301b99a7e76083e53c7f8487a60c6b999984f90d9560a647b94da1720398192023-03-21 7:06:27373 days 13 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0x42b34784ba301b99a7e76083e53c7f8487a60c6b999984f90d9560a647b94da1720398192023-03-21 7:06:27373 days 13 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x42b34784ba301b99a7e76083e53c7f8487a60c6b999984f90d9560a647b94da1720398192023-03-21 7:06:27373 days 13 hrs ago Jones DAO: Milliner V2 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH
0x71e73ff9e26a1f40902c9eaa1a7ca23f3c947d6d0113c2ff08457c15f883f6c4720364772023-03-21 6:52:50373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x71e73ff9e26a1f40902c9eaa1a7ca23f3c947d6d0113c2ff08457c15f883f6c4720364772023-03-21 6:52:50373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0x71e73ff9e26a1f40902c9eaa1a7ca23f3c947d6d0113c2ff08457c15f883f6c4720364772023-03-21 6:52:50373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x71e73ff9e26a1f40902c9eaa1a7ca23f3c947d6d0113c2ff08457c15f883f6c4720364772023-03-21 6:52:50373 days 14 hrs ago Jones DAO: Milliner V2 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH
0xcd8f5ad28c887a26b9926761f901771d7b4d9a157d9679976d2c3783066d22b0720364082023-03-21 6:52:32373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0xcd8f5ad28c887a26b9926761f901771d7b4d9a157d9679976d2c3783066d22b0720364082023-03-21 6:52:32373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0xcd8f5ad28c887a26b9926761f901771d7b4d9a157d9679976d2c3783066d22b0720364082023-03-21 6:52:32373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0xcd8f5ad28c887a26b9926761f901771d7b4d9a157d9679976d2c3783066d22b0720364082023-03-21 6:52:32373 days 14 hrs ago Jones DAO: Milliner V2 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH
0x399226d2f32f8a0f0c556fbe552b4d9711572ff06a9a67939a51d2381ea3edeb720362942023-03-21 6:52:04373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x399226d2f32f8a0f0c556fbe552b4d9711572ff06a9a67939a51d2381ea3edeb720362942023-03-21 6:52:04373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0x399226d2f32f8a0f0c556fbe552b4d9711572ff06a9a67939a51d2381ea3edeb720362942023-03-21 6:52:04373 days 14 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x399226d2f32f8a0f0c556fbe552b4d9711572ff06a9a67939a51d2381ea3edeb720362942023-03-21 6:52:04373 days 14 hrs ago Jones DAO: Milliner V2 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca0 ETH
0x1df79be3eb2a13859bf43f6b1e75b04e0c6d79acae46b2ed0ab08525c47e0294720045852023-03-21 4:41:20373 days 16 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x1df79be3eb2a13859bf43f6b1e75b04e0c6d79acae46b2ed0ab08525c47e0294720045852023-03-21 4:41:20373 days 16 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
0x1df79be3eb2a13859bf43f6b1e75b04e0c6d79acae46b2ed0ab08525c47e0294720045852023-03-21 4:41:20373 days 16 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: Milliner V20 ETH
0x1df79be3eb2a13859bf43f6b1e75b04e0c6d79acae46b2ed0ab08525c47e0294720045852023-03-21 4:41:20373 days 16 hrs ago 0x4c163b64fd2c777bd0752cfc4312c7bbea757bca Jones DAO: JONES Token0 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HatDistributionCenterV2

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : HatDistributionCenterV2.sol
// SPDX-License-Identifier: GPL-3.0
/*                            ******@@@@@@@@@**@*                               
                        ***@@@@@@@@@@@@@@@@@@@@@@**                             
                     *@@@@@@**@@@@@@@@@@@@@@@@@*@@@*                            
                  *@@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@*@**                          
                 *@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@*                         
                **@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@**                       
                **@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@@@@@*                      
                **@@@@@@@@@@@@@@@@*************************                    
                **@@@@@@@@***********************************                   
                 *@@@***********************&@@@@@@@@@@@@@@@****,    ******@@@@*
           *********************@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@************* 
      ***@@@@@@@@@@@@@@@*****@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@****@@*********      
   **@@@@@**********************@@@@*****************#@@@@**********            
  *@@******************************************************                     
 *@************************************                                         
 @*******************************                                               
 *@*************************                                                    
   ********************* 
   
    /$$$$$                                               /$$$$$$$   /$$$$$$   /$$$$$$ 
   |__  $$                                              | $$__  $$ /$$__  $$ /$$__  $$
      | $$  /$$$$$$  /$$$$$$$   /$$$$$$   /$$$$$$$      | $$  \ $$| $$  \ $$| $$  \ $$
      | $$ /$$__  $$| $$__  $$ /$$__  $$ /$$_____/      | $$  | $$| $$$$$$$$| $$  | $$
 /$$  | $$| $$  \ $$| $$  \ $$| $$$$$$$$|  $$$$$$       | $$  | $$| $$__  $$| $$  | $$
| $$  | $$| $$  | $$| $$  | $$| $$_____/ \____  $$      | $$  | $$| $$  | $$| $$  | $$
|  $$$$$$/|  $$$$$$/| $$  | $$|  $$$$$$$ /$$$$$$$/      | $$$$$$$/| $$  | $$|  $$$$$$/
 \______/  \______/ |__/  |__/ \_______/|_______/       |_______/ |__/  |__/ \______/                                      
*/

pragma solidity ^0.8.2;

// Libraries
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

// Interfaces
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMilliner {
    struct PoolInfo {
        IERC20 lpToken;
        uint256 allocPoint;
        uint256 lastRewardSecond;
        uint256 accJonesPerShare;
        uint256 currentDeposit;
    }

    function poolInfo(uint256 _pid) external returns (PoolInfo memory);
}

/* Reponsible for the distribution of hats produced by the Milliner */
contract HatDistributionCenterV2 is Ownable {
    using SafeERC20 for IERC20;

    address public milliner;
    IERC20 public rewardToken;
    uint256 public singleStakePid;

    constructor(
        address _rewardToken,
        address _milliner,
        uint256 _singleStakePid
    ) {
        rewardToken = IERC20(_rewardToken);
        milliner = _milliner;
        singleStakePid = _singleStakePid;
    }

    // ============================== Milliner Functions ==============================

    function sendRewards(uint256 _amount, address _user) public onlyMilliner {
        address millinerAddress = milliner;
        uint256 farmTokenBalance = rewardToken.balanceOf(millinerAddress);
        uint256 farmTokenDeposit = IMilliner(millinerAddress)
            .poolInfo(singleStakePid)
            .currentDeposit;

        if (farmTokenBalance < farmTokenDeposit) {
            rewardToken.safeTransfer(
                millinerAddress,
                farmTokenDeposit - farmTokenBalance
            );
        }

        rewardToken.safeTransfer(_user, _amount);
        emit Shipped(_user, _amount);
    }

    // ============================== Admin Functions ==============================

    function updateMilliner(address _milliner) public onlyOwner {
        milliner = _milliner;
    }

    function updateSingleStakePid(uint256 _pid) public onlyOwner {
        singleStakePid = _pid;
    }

    function withdrawRewards(uint256 _amount, address _destination)
        public
        onlyOwner
    {
        rewardToken.safeTransfer(_destination, _amount);
    }

    // ============================== Modifiers ==============================

    modifier onlyMilliner() {
        if (msg.sender != milliner) {
            revert Only_Milliner();
        }
        _;
    }

    // ============================== Erors ==============================

    error Only_Milliner(); // Only milliner
    error Zero_Address(); // Zero address

    // ============================== Events ==============================

    event Shipped(address user, uint256 amount);
}

File 2 of 6 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 3 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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.
 */
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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 5 of 6 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 6 of 6 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"internalType":"address","name":"_milliner","type":"address"},{"internalType":"uint256","name":"_singleStakePid","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Only_Milliner","type":"error"},{"inputs":[],"name":"Zero_Address","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Shipped","type":"event"},{"inputs":[],"name":"milliner","outputs":[{"internalType":"address","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":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"sendRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"singleStakePid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_milliner","type":"address"}],"name":"updateMilliner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updateSingleStakePid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_destination","type":"address"}],"name":"withdrawRewards","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610b22380380610b2283398101604081905261002f916100dc565b61003833610070565b600280546001600160a01b039485166001600160a01b0319918216179091556001805493909416921691909117909155600355610118565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146100d757600080fd5b919050565b6000806000606084860312156100f157600080fd5b6100fa846100c0565b9250610108602085016100c0565b9150604084015190509250925092565b6109fb806101276000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063d1168db611610066578063d1168db614610114578063ee5651af14610127578063f2fde38b1461013a578063f3301f6b1461014d578063f7c618c11461016057600080fd5b8063042f7e6a146100a3578063715018a6146100bf57806385a9e759146100c95780638da5cb5b146100dc578063cb7b1ccf14610101575b600080fd5b6100ac60035481565b6040519081526020015b60405180910390f35b6100c7610173565b005b6100c76100d73660046107c4565b6101b2565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100b6565b6100c761010f3660046107e1565b6101fe565b6100c76101223660046107fa565b61022d565b6001546100e9906001600160a01b031681565b6100c76101483660046107c4565b6103d3565b6100c761015b3660046107fa565b61046e565b6002546100e9906001600160a01b031681565b6000546001600160a01b031633146101a65760405162461bcd60e51b815260040161019d9061082a565b60405180910390fd5b6101b060006104b3565b565b6000546001600160a01b031633146101dc5760405162461bcd60e51b815260040161019d9061082a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102285760405162461bcd60e51b815260040161019d9061082a565b600355565b6001546001600160a01b0316331461025857604051630806bfe760e11b815260040160405180910390fd5b6001546002546040516370a0823160e01b81526001600160a01b03928316600482018190529260009216906370a0823190602401602060405180830381865afa1580156102a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cd919061085f565b90506000826001600160a01b0316631526fe276003546040518263ffffffff1660e01b815260040161030191815260200190565b60a0604051808303816000875af1158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190610878565b60800151905080821015610373576103738361036084846108ff565b6002546001600160a01b03169190610503565b60025461038a906001600160a01b03168587610503565b604080516001600160a01b0386168152602081018790527f79075bc8e01a054a9d98a26a8da0ef5a887c4bbf1241ac94cc7c69a0d62ac39c910160405180910390a15050505050565b6000546001600160a01b031633146103fd5760405162461bcd60e51b815260040161019d9061082a565b6001600160a01b0381166104625760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161019d565b61046b816104b3565b50565b6000546001600160a01b031633146104985760405162461bcd60e51b815260040161019d9061082a565b6002546104af906001600160a01b03168284610503565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261055590849061055a565b505050565b60006105af826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661062c9092919063ffffffff16565b80519091501561055557808060200190518101906105cd9190610924565b6105555760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161019d565b606061063b8484600085610645565b90505b9392505050565b6060824710156106a65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161019d565b6001600160a01b0385163b6106fd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161019d565b600080866001600160a01b031685876040516107199190610976565b60006040518083038185875af1925050503d8060008114610756576040519150601f19603f3d011682016040523d82523d6000602084013e61075b565b606091505b509150915061076b828286610776565b979650505050505050565b6060831561078557508161063e565b8251156107955782518084602001fd5b8160405162461bcd60e51b815260040161019d9190610992565b6001600160a01b038116811461046b57600080fd5b6000602082840312156107d657600080fd5b813561063e816107af565b6000602082840312156107f357600080fd5b5035919050565b6000806040838503121561080d57600080fd5b82359150602083013561081f816107af565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561087157600080fd5b5051919050565b600060a0828403121561088a57600080fd5b60405160a0810181811067ffffffffffffffff821117156108bb57634e487b7160e01b600052604160045260246000fd5b60405282516108c9816107af565b80825250602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b60008282101561091f57634e487b7160e01b600052601160045260246000fd5b500390565b60006020828403121561093657600080fd5b8151801515811461063e57600080fd5b60005b83811015610961578181015183820152602001610949565b83811115610970576000848401525b50505050565b60008251610988818460208701610946565b9190910192915050565b60208152600082518060208401526109b1816040850160208701610946565b601f01601f1916919091016040019291505056fea26469706673582212201555253578bb24561eb36c20467983b862e590fd2c0e0eac3a81e1b862484a6c64736f6c634300080a003300000000000000000000000010393c20975cf177a3513071bc110f7962cd67da000000000000000000000000b94d1959084081c5a11c460012ab522f5a0fd7560000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063d1168db611610066578063d1168db614610114578063ee5651af14610127578063f2fde38b1461013a578063f3301f6b1461014d578063f7c618c11461016057600080fd5b8063042f7e6a146100a3578063715018a6146100bf57806385a9e759146100c95780638da5cb5b146100dc578063cb7b1ccf14610101575b600080fd5b6100ac60035481565b6040519081526020015b60405180910390f35b6100c7610173565b005b6100c76100d73660046107c4565b6101b2565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100b6565b6100c761010f3660046107e1565b6101fe565b6100c76101223660046107fa565b61022d565b6001546100e9906001600160a01b031681565b6100c76101483660046107c4565b6103d3565b6100c761015b3660046107fa565b61046e565b6002546100e9906001600160a01b031681565b6000546001600160a01b031633146101a65760405162461bcd60e51b815260040161019d9061082a565b60405180910390fd5b6101b060006104b3565b565b6000546001600160a01b031633146101dc5760405162461bcd60e51b815260040161019d9061082a565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146102285760405162461bcd60e51b815260040161019d9061082a565b600355565b6001546001600160a01b0316331461025857604051630806bfe760e11b815260040160405180910390fd5b6001546002546040516370a0823160e01b81526001600160a01b03928316600482018190529260009216906370a0823190602401602060405180830381865afa1580156102a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102cd919061085f565b90506000826001600160a01b0316631526fe276003546040518263ffffffff1660e01b815260040161030191815260200190565b60a0604051808303816000875af1158015610320573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103449190610878565b60800151905080821015610373576103738361036084846108ff565b6002546001600160a01b03169190610503565b60025461038a906001600160a01b03168587610503565b604080516001600160a01b0386168152602081018790527f79075bc8e01a054a9d98a26a8da0ef5a887c4bbf1241ac94cc7c69a0d62ac39c910160405180910390a15050505050565b6000546001600160a01b031633146103fd5760405162461bcd60e51b815260040161019d9061082a565b6001600160a01b0381166104625760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161019d565b61046b816104b3565b50565b6000546001600160a01b031633146104985760405162461bcd60e51b815260040161019d9061082a565b6002546104af906001600160a01b03168284610503565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261055590849061055a565b505050565b60006105af826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661062c9092919063ffffffff16565b80519091501561055557808060200190518101906105cd9190610924565b6105555760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161019d565b606061063b8484600085610645565b90505b9392505050565b6060824710156106a65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161019d565b6001600160a01b0385163b6106fd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161019d565b600080866001600160a01b031685876040516107199190610976565b60006040518083038185875af1925050503d8060008114610756576040519150601f19603f3d011682016040523d82523d6000602084013e61075b565b606091505b509150915061076b828286610776565b979650505050505050565b6060831561078557508161063e565b8251156107955782518084602001fd5b8160405162461bcd60e51b815260040161019d9190610992565b6001600160a01b038116811461046b57600080fd5b6000602082840312156107d657600080fd5b813561063e816107af565b6000602082840312156107f357600080fd5b5035919050565b6000806040838503121561080d57600080fd5b82359150602083013561081f816107af565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561087157600080fd5b5051919050565b600060a0828403121561088a57600080fd5b60405160a0810181811067ffffffffffffffff821117156108bb57634e487b7160e01b600052604160045260246000fd5b60405282516108c9816107af565b80825250602083015160208201526040830151604082015260608301516060820152608083015160808201528091505092915050565b60008282101561091f57634e487b7160e01b600052601160045260246000fd5b500390565b60006020828403121561093657600080fd5b8151801515811461063e57600080fd5b60005b83811015610961578181015183820152602001610949565b83811115610970576000848401525b50505050565b60008251610988818460208701610946565b9190910192915050565b60208152600082518060208401526109b1816040850160208701610946565b601f01601f1916919091016040019291505056fea26469706673582212201555253578bb24561eb36c20467983b862e590fd2c0e0eac3a81e1b862484a6c64736f6c634300080a0033

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

00000000000000000000000010393c20975cf177a3513071bc110f7962cd67da000000000000000000000000b94d1959084081c5a11c460012ab522f5a0fd7560000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x10393c20975cF177a3513071bC110f7962CD67da
Arg [1] : _milliner (address): 0xb94d1959084081c5a11C460012Ab522F5a0FD756
Arg [2] : _singleStakePid (uint256): 0

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000010393c20975cf177a3513071bc110f7962cd67da
Arg [1] : 000000000000000000000000b94d1959084081c5a11c460012ab522f5a0fd756
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000


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.