Contract 0x458daaef2c714e8dbe21ab2d22b45f5155d5432d

Contract Overview

Balance:
0 HT

HT Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x4b6257c718d1724efe1ae81c537f3138691896ba48e36cc51dfaa37403b5e5bbSet Permission86163622021-09-27 11:43:0961 days 18 hrs ago0x9c6cc44a404ae7d84d1532460aee1f170afa7ac1 IN  0x458daaef2c714e8dbe21ab2d22b45f5155d5432d0 HT0.00010347525 2.25
0xacd41ec12ad5b6293fca864c4100074cdb60eb9d05eb5e886ffb8f4861c3f8e50x6080604084926102021-09-23 4:34:5566 days 1 hr ago0x9c6cc44a404ae7d84d1532460aee1f170afa7ac1 IN  Contract Creation0 HT0.000638723252.25
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MiningPool

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, Unlicense license
/**
 *Submitted for verification at hecoinfo.com on 2021-09-23
*/

// SPDX-License-Identifier: Unlicensed
pragma solidity ^0.6.12;

interface IERC20 {

    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);
}

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
 
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

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

        return c;
    }

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

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

contract MiningPool {
    using SafeMath for uint256;
    
    mapping (address => uint256) public _totalMined;
    address public dev;
    address private permission;
    
    constructor () public {
        dev = msg.sender;
    }
    
    function setPermission(address _permission) public {
        require(dev == msg.sender, "permission denied");
        permission = _permission;
    }
    
    function claimFromMiningPool(IERC20 _tokenMined, address _miner, uint256 _quantity) public {
        require(permission == msg.sender, "permission denied");
        _tokenMined.transfer(_miner, _quantity);
        _totalMined[address(_tokenMined)] = _totalMined[address(_tokenMined)].add(_quantity);
    }
    
    function renounceOwnership() public {
        require(dev == msg.sender, "permission denied");
        dev = address(0);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_totalMined","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_tokenMined","type":"address"},{"internalType":"address","name":"_miner","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"claimFromMiningPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dev","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_permission","type":"address"}],"name":"setPermission","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50600180546001600160a01b031916331790556103ca806100326000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063365da1981461005c578063715018a61461009457806391cca3db1461009e578063b85a35d2146100c2578063ce2df5a4146100e8575b600080fd5b6100826004803603602081101561007257600080fd5b50356001600160a01b031661011e565b60408051918252519081900360200190f35b61009c610130565b005b6100a6610195565b604080516001600160a01b039092168252519081900360200190f35b61009c600480360360208110156100d857600080fd5b50356001600160a01b03166101a4565b61009c600480360360608110156100fe57600080fd5b506001600160a01b03813581169160208101359091169060400135610219565b60006020819052908152604090205481565b6001546001600160a01b03163314610183576040805162461bcd60e51b81526020600482015260116024820152701c195c9b5a5cdcda5bdb8819195b9a5959607a1b604482015290519081900360640190fd5b600180546001600160a01b0319169055565b6001546001600160a01b031681565b6001546001600160a01b031633146101f7576040805162461bcd60e51b81526020600482015260116024820152701c195c9b5a5cdcda5bdb8819195b9a5959607a1b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b0316331461026c576040805162461bcd60e51b81526020600482015260116024820152701c195c9b5a5cdcda5bdb8819195b9a5959607a1b604482015290519081900360640190fd5b826001600160a01b031663a9059cbb83836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102c357600080fd5b505af11580156102d7573d6000803e3d6000fd5b505050506040513d60208110156102ed57600080fd5b50506001600160a01b0383166000908152602081905260409020546103129082610333565b6001600160a01b039093166000908152602081905260409020929092555050565b60008282018381101561038d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fea264697066735822122074d16e9cdb210834c037e654b386b44d1e9eda848533956f8bde45d791cf711e64736f6c634300060c0033

Deployed ByteCode Sourcemap

7938:870:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8004:47;;;;;;;;;;;;;;;;-1:-1:-1;8004:47:0;-1:-1:-1;;;;;8004:47:0;;:::i;:::-;;;;;;;;;;;;;;;;8676:129;;;:::i;:::-;;8058:18;;;:::i;:::-;;;;-1:-1:-1;;;;;8058:18:0;;;;;;;;;;;;;;8191:152;;;;;;;;;;;;;;;;-1:-1:-1;8191:152:0;-1:-1:-1;;;;;8191:152:0;;:::i;8355:309::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;8355:309:0;;;;;;;;;;;;;;;;;:::i;8004:47::-;;;;;;;;;;;;;;:::o;8676:129::-;8731:3;;-1:-1:-1;;;;;8731:3:0;8738:10;8731:17;8723:47;;;;;-1:-1:-1;;;8723:47:0;;;;;;;;;;;;-1:-1:-1;;;8723:47:0;;;;;;;;;;;;;;;8781:3;:16;;-1:-1:-1;;;;;;8781:16:0;;;8676:129::o;8058:18::-;;;-1:-1:-1;;;;;8058:18:0;;:::o;8191:152::-;8261:3;;-1:-1:-1;;;;;8261:3:0;8268:10;8261:17;8253:47;;;;;-1:-1:-1;;;8253:47:0;;;;;;;;;;;;-1:-1:-1;;;8253:47:0;;;;;;;;;;;;;;;8311:10;:24;;-1:-1:-1;;;;;;8311:24:0;-1:-1:-1;;;;;8311:24:0;;;;;;;;;;8191:152::o;8355:309::-;8465:10;;-1:-1:-1;;;;;8465:10:0;8479;8465:24;8457:54;;;;;-1:-1:-1;;;8457:54:0;;;;;;;;;;;;-1:-1:-1;;;8457:54:0;;;;;;;;;;;;;;;8522:11;-1:-1:-1;;;;;8522:20:0;;8543:6;8551:9;8522:39;;;;;;;;;;;;;-1:-1:-1;;;;;8522:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;8608:33:0;;:11;:33;;;8522:39;8608:33;;;;;;;:48;;8646:9;8608:37;:48::i;:::-;-1:-1:-1;;;;;8572:33:0;;;:11;:33;;;;;;;;;;:84;;;;-1:-1:-1;;8355:309:0:o;3478:181::-;3536:7;3568:5;;;3592:6;;;;3584:46;;;;;-1:-1:-1;;;3584:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;3650:1;3478:181;-1:-1:-1;;;3478:181:0:o

Swarm Source

ipfs://74d16e9cdb210834c037e654b386b44d1e9eda848533956f8bde45d791cf711e
Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading