ETH Price: $2,069.95 (+2.88%)

Contract

0xdF1Fe03Abd05798dc8F7C2479aFDc52E8EBbD571
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim157346512022-10-12 21:15:471244 days ago1665609347IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0013450116.43647238
Unstake156108302022-09-25 13:57:111262 days ago1664114231IN
0xdF1Fe03A...E8EBbD571
0 ETH0.000881567.47512588
Unstake156108242022-09-25 13:55:591262 days ago1664114159IN
0xdF1Fe03A...E8EBbD571
0 ETH0.001412798.76616191
Claim156108162022-09-25 13:54:231262 days ago1664114063IN
0xdF1Fe03A...E8EBbD571
0 ETH0.001455989.16530907
Unstake154875072022-09-07 1:36:571280 days ago1662514617IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0003133112.60418158
Unstake154875072022-09-07 1:36:571280 days ago1662514617IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0010428112.60418158
Claim154560442022-09-02 0:32:551285 days ago1662078775IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0009887510
Stake153433762022-08-15 2:17:591303 days ago1660529879IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0030136513.11090469
Stake153418112022-08-14 20:12:161303 days ago1660507936IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0003765410.69909316
Stake153418112022-08-14 20:12:161303 days ago1660507936IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0003765410.69909316
Stake153418072022-08-14 20:11:461303 days ago1660507906IN
0xdF1Fe03A...E8EBbD571
0 ETH0.00193513.16677897
Stake153361152022-08-13 22:44:031304 days ago1660430643IN
0xdF1Fe03A...E8EBbD571
0 ETH0.005274185.90585869
Stake153339802022-08-13 14:36:411305 days ago1660401401IN
0xdF1Fe03A...E8EBbD571
0 ETH0.001404189.55405761
Stake153305142022-08-13 1:35:421305 days ago1660354542IN
0xdF1Fe03A...E8EBbD571
0 ETH0.007114749.78296397
Stake153299702022-08-12 23:36:051305 days ago1660347365IN
0xdF1Fe03A...E8EBbD571
0 ETH0.000380569.550841
Stake153299692022-08-12 23:35:531305 days ago1660347353IN
0xdF1Fe03A...E8EBbD571
0 ETH0.001841888.65664207
Stake153133522022-08-10 8:41:491308 days ago1660120909IN
0xdF1Fe03A...E8EBbD571
0 ETH0.001899688.26412853
Stake153061112022-08-09 5:19:301309 days ago1660022370IN
0xdF1Fe03A...E8EBbD571
0 ETH0.00131858.97105725
Stake153051942022-08-09 1:55:481309 days ago1660010148IN
0xdF1Fe03A...E8EBbD571
0 ETH0.002053413.97130142
Stake153045352022-08-08 23:26:131309 days ago1660001173IN
0xdF1Fe03A...E8EBbD571
0 ETH0.002350715.99541802
Stake153044172022-08-08 23:00:111309 days ago1659999611IN
0xdF1Fe03A...E8EBbD571
0 ETH0.000787616.78861326
Stake153044162022-08-08 22:59:561309 days ago1659999596IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0007128415.19506333
Stake152690622022-08-03 10:55:531315 days ago1659524153IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0015620711.82639846
Stake152660322022-08-02 23:24:281315 days ago1659482668IN
0xdF1Fe03A...E8EBbD571
0 ETH0.0003191812.76748324
Stake152528262022-07-31 22:05:591317 days ago1659305159IN
0xdF1Fe03A...E8EBbD571
0 ETH0.000442185.89573875
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Stakephants

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.6;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./TUSK.sol";

contract Stakephants is Ownable, IERC721Receiver {

    mapping (uint => address) public ownership;
    mapping(uint => uint) public stakeTime;
    mapping(address => uint) public lastWithdraw;
    mapping (address => uint[]) private _qty;
    bool public paused = false;
    uint nullToken = 1 ether;
    uint tokensHour = 0.0416666667 ether;
    IERC721 public NFT;
    TUSK public TOKEN;

    modifier notPaused(){
        require(!paused, "PAUSED");
        _;
    }

    constructor() {

    }

    function setTokenshour(uint new_) external onlyOwner {
        tokensHour = new_;
    }

    function togglePause() public onlyOwner {
        paused = !paused;
    }

    function setNFTAddress(address new_) external onlyOwner {
        NFT = IERC721(new_);
    }

    function setCOINAddress(address new_) external onlyOwner {
        TOKEN = TUSK(new_);
    }

    function getAssetsByHolder(address holder) public view returns (uint[] memory){
        return _qty[holder];
    }

    function getProfits(uint tokenId) public view returns(uint) {
        if(stakeTime[tokenId] == 0 || tokenId == nullToken){
            return 0;
        }
        uint lWithdraw = stakeTime[tokenId] > lastWithdraw[_msgSender()] ? stakeTime[tokenId] : lastWithdraw[_msgSender()];
        uint sTime = (block.timestamp - lWithdraw) / 1 hours;
        return sTime * tokensHour;
    }

    function getAllProfits() public view returns(uint) {
        uint[] memory tokenIds = getAssetsByHolder(_msgSender());
        uint profits = 0 ;
        for(uint i=0; i< tokenIds.length; i++){
            uint tokenId = tokenIds[i];
            if(ownership[tokenId] == _msgSender()){
                profits += getProfits(tokenId);
            }
        }
        return profits;
    }

    function stake(uint[] calldata tokenIds) public notPaused {
        for(uint i=0; i < tokenIds.length; i++){
            uint tokenId = tokenIds[i];
            if(NFT.ownerOf(tokenId) == _msgSender()){
                stakeTime[tokenId] = block.timestamp;
                ownership[tokenId] = _msgSender();
                NFT.transferFrom(_msgSender(), address(this), tokenId);
                _qty[_msgSender()].push(tokenId);
            }
        }
    }

    function unstake(uint[] calldata tokenIds) public {
        for(uint i=0; i< tokenIds.length; i++){
            uint tokenId = tokenIds[i];
            recover(tokenId);
            removeToken(tokenId);
        }
    }

    function unstakeAll(bool wd) public {
        uint[] memory tokenIds = getAssetsByHolder(_msgSender());
        if(wd){
            claim();
        }
        for(uint i=0; i< tokenIds.length; i++){
            uint tokenId = tokenIds[i];
            recover(tokenId);
        }
        delete _qty[_msgSender()];
    }

    function recover(uint tokenId) internal {
        require(ownership[tokenId] == _msgSender(), "ownership failed");
        ownership[tokenId] = address(0);
        NFT.transferFrom(address(this), _msgSender(), tokenId);
    }

    function removeToken(uint tokenId) internal {
        for(uint i=0;i<_qty[_msgSender()].length;i++){
            if(_qty[_msgSender()][i] == tokenId){
                _qty[_msgSender()][i] = nullToken;
                break;
            }
        }
    }

    function claim() public notPaused {
        uint profits = getAllProfits();
        require(profits > 0, "WITHDRAW ZERO TOKENS");
        lastWithdraw[_msgSender()] = block.timestamp;
        TOKEN.mintTo(_msgSender(), profits);
    }

    function onERC721Received(
        address operator,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        require(address(NFT) == operator, "not allowed");
        return this.onERC721Received.selector;
    }

}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.6;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./Administration.sol";

contract TUSK is ERC20, Administration {
    
    constructor() ERC20("Pop Elephants TUSK", "TUSK") {
        
    }

    function mintTokens(uint amount) public onlyAdmin {
        _mint(owner(), amount);
    }

    function mintTo(address to, uint amount) public onlyAdmin {
        _mint(to, amount);
    }
    
    function burnTokens(uint amount) external onlyAdmin {
        _burn(owner(), amount);
    }

    function buy(address from, uint amount) external onlyAdmin {
        _burn(from, amount);
    }

    function withdraw() external onlyOwner {
        payable(_msgSender()).transfer(address(this).balance);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 4 of 11 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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);
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.6;
import "@openzeppelin/contracts/access/Ownable.sol";

contract Administration is Ownable {
    
    event SetAdmin(address indexed admin, bool active);
    
    mapping (address => bool) private admins;
    
    modifier onlyAdmin(){
        require(admins[_msgSender()] || owner() == _msgSender(), "Admin: caller is not an admin");
        _;
    }
    
    function setAdmin(address admin, bool active) external onlyOwner {
        admins[admin] = active;
        emit SetAdmin(admin, active);
    }
    
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"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":"NFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract TUSK","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllProfits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getAssetsByHolder","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getProfits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownership","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"new_","type":"address"}],"name":"setCOINAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"new_","type":"address"}],"name":"setNFTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"new_","type":"uint256"}],"name":"setTokenshour","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"wd","type":"bool"}],"name":"unstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600560006101000a81548160ff021916908315150217905550670de0b6b3a76400006006556694079cd3a0cb0060075534801561004257600080fd5b5061005f61005461006460201b60201c565b61006c60201b60201c565b610130565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611f1c8061013f6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80637fa76e43116100b8578063c4ae31681161007c578063c4ae316814610314578063e1ae37db1461031e578063e449f3411461034e578063f2fde38b1461036a578063f345075114610386578063f5081b3d146103b657610137565b80637fa76e4314610270578063802e9c9e1461028c57806382bfefc8146102a85780638da5cb5b146102c6578063a0f45b69146102e457610137565b8063624d7b72116100ff578063624d7b72146101e057806369d03738146102105780636f23d6961461022c578063715018a6146102485780637c0b8de21461025257610137565b80630a42f0491461013c5780630fbf0a931461016c578063150b7a02146101885780634e71d92d146101b85780635c975abb146101c2575b600080fd5b610156600480360381019061015191906115de565b6103d4565b6040516101639190611985565b60405180910390f35b61018660048036038101906101819190611564565b6103ec565b005b6101a2600480360381019061019d91906114e1565b6106dd565b6040516101af9190611874565b60405180910390f35b6101c0610781565b005b6101ca610904565b6040516101d79190611859565b60405180910390f35b6101fa60048036038101906101f59190611487565b610917565b6040516102079190611985565b60405180910390f35b61022a60048036038101906102259190611487565b61092f565b005b610246600480360381019061024191906115de565b61097b565b005b61025061098d565b005b61025a6109a1565b604051610267919061188f565b60405180910390f35b61028a600480360381019061028591906115b1565b6109c7565b005b6102a660048036038101906102a19190611487565b610a89565b005b6102b0610ad5565b6040516102bd91906118aa565b60405180910390f35b6102ce610afb565b6040516102db91906117bc565b60405180910390f35b6102fe60048036038101906102f991906115de565b610b24565b60405161030b91906117bc565b60405180910390f35b61031c610b57565b005b61033860048036038101906103339190611487565b610b8b565b6040516103459190611837565b60405180910390f35b61036860048036038101906103639190611564565b610c22565b005b610384600480360381019061037f9190611487565b610c79565b005b6103a0600480360381019061039b91906115de565b610cfd565b6040516103ad9190611985565b60405180910390f35b6103be610e29565b6040516103cb9190611985565b60405180910390f35b60026020528060005260406000206000915090505481565b600560009054906101000a900460ff161561043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906118c5565b60405180910390fd5b60005b828290508110156106d857600083838381811061045f5761045e611cf8565b5b905060200201359050610470610f0c565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016104e19190611985565b60206040518083038186803b1580156104f957600080fd5b505afa15801561050d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053191906114b4565b73ffffffffffffffffffffffffffffffffffffffff1614156106c45742600260008381526020019081526020016000208190555061056d610f0c565b6001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610604610f0c565b30846040518463ffffffff1660e01b8152600401610624939291906117d7565b600060405180830381600087803b15801561063e57600080fd5b505af1158015610652573d6000803e3d6000fd5b5050505060046000610662610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150506001900390600052602060002001600090919091909150555b5080806106d090611c51565b91505061043f565b505050565b60008473ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076690611905565b60405180910390fd5b63150b7a0260e01b9050949350505050565b600560009054906101000a900460ff16156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906118c5565b60405180910390fd5b60006107db610e29565b905060008111610820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081790611925565b60405180910390fd5b426003600061082d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663449a52f86108b1610f0c565b836040518363ffffffff1660e01b81526004016108cf92919061180e565b600060405180830381600087803b1580156108e957600080fd5b505af11580156108fd573d6000803e3d6000fd5b5050505050565b600560009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b610937610f14565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610983610f14565b8060078190555050565b610995610f14565b61099f6000610f92565b565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d96109d4610f0c565b610b8b565b905081156109ea576109e9610781565b5b60005b8151811015610a32576000828281518110610a0b57610a0a611cf8565b5b60200260200101519050610a1e81611056565b508080610a2a90611c51565b9150506109ed565b5060046000610a3f610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a85919061132f565b5050565b610a91610f14565b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b5f610f14565b600560009054906101000a900460ff1615600560006101000a81548160ff021916908315150217905550565b6060600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610c1657602002820191906000526020600020905b815481526020019060010190808311610c02575b50505050509050919050565b60005b82829050811015610c74576000838383818110610c4557610c44611cf8565b5b905060200201359050610c5781611056565b610c60816111ec565b508080610c6c90611c51565b915050610c25565b505050565b610c81610f14565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce8906118e5565b60405180910390fd5b610cfa81610f92565b50565b60008060026000848152602001908152602001600020541480610d21575060065482145b15610d2f5760009050610e24565b600060036000610d3d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600260008581526020019081526020016000205411610ddd5760036000610d9d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610df2565b60026000848152602001908152602001600020545b90506000610e108242610e059190611b21565b610e0f9190611a96565b905060075481610e1f9190611ac7565b925050505b919050565b600080610e3c610e37610f0c565b610b8b565b90506000805b8251811015610f03576000838281518110610e6057610e5f611cf8565b5b60200260200101519050610e72610f0c565b73ffffffffffffffffffffffffffffffffffffffff166001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610eef57610ee181610cfd565b83610eec9190611a40565b92505b508080610efb90611c51565b915050610e42565b50809250505090565b600033905090565b610f1c610f0c565b73ffffffffffffffffffffffffffffffffffffffff16610f3a610afb565b73ffffffffffffffffffffffffffffffffffffffff1614610f90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8790611945565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61105e610f0c565b73ffffffffffffffffffffffffffffffffffffffff166001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f590611965565b60405180910390fd5b60006001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30611198610f0c565b846040518463ffffffff1660e01b81526004016111b7939291906117d7565b600060405180830381600087803b1580156111d157600080fd5b505af11580156111e5573d6000803e3d6000fd5b5050505050565b60005b600460006111fb610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561132b57816004600061124d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061129957611298611cf8565b5b9060005260206000200154141561131857600654600460006112b9610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061130557611304611cf8565b5b906000526020600020018190555061132b565b808061132390611c51565b9150506111ef565b5050565b508054600082559060005260206000209081019061134d9190611350565b50565b5b80821115611369576000816000905550600101611351565b5090565b600061138061137b846119c5565b6119a0565b90508281526020810184848401111561139c5761139b611d65565b5b6113a7848285611c11565b509392505050565b6000813590506113be81611ea1565b92915050565b6000815190506113d381611ea1565b92915050565b60008083601f8401126113ef576113ee611d5b565b5b8235905067ffffffffffffffff81111561140c5761140b611d56565b5b60208301915083602082028301111561142857611427611d60565b5b9250929050565b60008135905061143e81611eb8565b92915050565b600082601f83011261145957611458611d5b565b5b813561146984826020860161136d565b91505092915050565b60008135905061148181611ecf565b92915050565b60006020828403121561149d5761149c611d6f565b5b60006114ab848285016113af565b91505092915050565b6000602082840312156114ca576114c9611d6f565b5b60006114d8848285016113c4565b91505092915050565b600080600080608085870312156114fb576114fa611d6f565b5b6000611509878288016113af565b945050602061151a878288016113af565b935050604061152b87828801611472565b925050606085013567ffffffffffffffff81111561154c5761154b611d6a565b5b61155887828801611444565b91505092959194509250565b6000806020838503121561157b5761157a611d6f565b5b600083013567ffffffffffffffff81111561159957611598611d6a565b5b6115a5858286016113d9565b92509250509250929050565b6000602082840312156115c7576115c6611d6f565b5b60006115d58482850161142f565b91505092915050565b6000602082840312156115f4576115f3611d6f565b5b600061160284828501611472565b91505092915050565b6000611617838361179e565b60208301905092915050565b61162c81611b55565b82525050565b600061163d82611a06565b6116478185611a1e565b9350611652836119f6565b8060005b8381101561168357815161166a888261160b565b975061167583611a11565b925050600181019050611656565b5085935050505092915050565b61169981611b67565b82525050565b6116a881611b73565b82525050565b6116b781611bc9565b82525050565b6116c681611bdb565b82525050565b60006116d9600683611a2f565b91506116e482611d85565b602082019050919050565b60006116fc602683611a2f565b915061170782611dae565b604082019050919050565b600061171f600b83611a2f565b915061172a82611dfd565b602082019050919050565b6000611742601483611a2f565b915061174d82611e26565b602082019050919050565b6000611765602083611a2f565b915061177082611e4f565b602082019050919050565b6000611788601083611a2f565b915061179382611e78565b602082019050919050565b6117a781611bbf565b82525050565b6117b681611bbf565b82525050565b60006020820190506117d16000830184611623565b92915050565b60006060820190506117ec6000830186611623565b6117f96020830185611623565b61180660408301846117ad565b949350505050565b60006040820190506118236000830185611623565b61183060208301846117ad565b9392505050565b600060208201905081810360008301526118518184611632565b905092915050565b600060208201905061186e6000830184611690565b92915050565b6000602082019050611889600083018461169f565b92915050565b60006020820190506118a460008301846116ae565b92915050565b60006020820190506118bf60008301846116bd565b92915050565b600060208201905081810360008301526118de816116cc565b9050919050565b600060208201905081810360008301526118fe816116ef565b9050919050565b6000602082019050818103600083015261191e81611712565b9050919050565b6000602082019050818103600083015261193e81611735565b9050919050565b6000602082019050818103600083015261195e81611758565b9050919050565b6000602082019050818103600083015261197e8161177b565b9050919050565b600060208201905061199a60008301846117ad565b92915050565b60006119aa6119bb565b90506119b68282611c20565b919050565b6000604051905090565b600067ffffffffffffffff8211156119e0576119df611d27565b5b6119e982611d74565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a4b82611bbf565b9150611a5683611bbf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611a8b57611a8a611c9a565b5b828201905092915050565b6000611aa182611bbf565b9150611aac83611bbf565b925082611abc57611abb611cc9565b5b828204905092915050565b6000611ad282611bbf565b9150611add83611bbf565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b1657611b15611c9a565b5b828202905092915050565b6000611b2c82611bbf565b9150611b3783611bbf565b925082821015611b4a57611b49611c9a565b5b828203905092915050565b6000611b6082611b9f565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611bd482611bed565b9050919050565b6000611be682611bed565b9050919050565b6000611bf882611bff565b9050919050565b6000611c0a82611b9f565b9050919050565b82818337600083830152505050565b611c2982611d74565b810181811067ffffffffffffffff82111715611c4857611c47611d27565b5b80604052505050565b6000611c5c82611bbf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611c8f57611c8e611c9a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5041555345440000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f6e6f7420616c6c6f776564000000000000000000000000000000000000000000600082015250565b7f5749544844524157205a45524f20544f4b454e53000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6f776e657273686970206661696c656400000000000000000000000000000000600082015250565b611eaa81611b55565b8114611eb557600080fd5b50565b611ec181611b67565b8114611ecc57600080fd5b50565b611ed881611bbf565b8114611ee357600080fd5b5056fea264697066735822122000b56e7dc9723072b14e79a6e36cd9a57be65bf652c9b2d1c42fe3e864a765b764736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101375760003560e01c80637fa76e43116100b8578063c4ae31681161007c578063c4ae316814610314578063e1ae37db1461031e578063e449f3411461034e578063f2fde38b1461036a578063f345075114610386578063f5081b3d146103b657610137565b80637fa76e4314610270578063802e9c9e1461028c57806382bfefc8146102a85780638da5cb5b146102c6578063a0f45b69146102e457610137565b8063624d7b72116100ff578063624d7b72146101e057806369d03738146102105780636f23d6961461022c578063715018a6146102485780637c0b8de21461025257610137565b80630a42f0491461013c5780630fbf0a931461016c578063150b7a02146101885780634e71d92d146101b85780635c975abb146101c2575b600080fd5b610156600480360381019061015191906115de565b6103d4565b6040516101639190611985565b60405180910390f35b61018660048036038101906101819190611564565b6103ec565b005b6101a2600480360381019061019d91906114e1565b6106dd565b6040516101af9190611874565b60405180910390f35b6101c0610781565b005b6101ca610904565b6040516101d79190611859565b60405180910390f35b6101fa60048036038101906101f59190611487565b610917565b6040516102079190611985565b60405180910390f35b61022a60048036038101906102259190611487565b61092f565b005b610246600480360381019061024191906115de565b61097b565b005b61025061098d565b005b61025a6109a1565b604051610267919061188f565b60405180910390f35b61028a600480360381019061028591906115b1565b6109c7565b005b6102a660048036038101906102a19190611487565b610a89565b005b6102b0610ad5565b6040516102bd91906118aa565b60405180910390f35b6102ce610afb565b6040516102db91906117bc565b60405180910390f35b6102fe60048036038101906102f991906115de565b610b24565b60405161030b91906117bc565b60405180910390f35b61031c610b57565b005b61033860048036038101906103339190611487565b610b8b565b6040516103459190611837565b60405180910390f35b61036860048036038101906103639190611564565b610c22565b005b610384600480360381019061037f9190611487565b610c79565b005b6103a0600480360381019061039b91906115de565b610cfd565b6040516103ad9190611985565b60405180910390f35b6103be610e29565b6040516103cb9190611985565b60405180910390f35b60026020528060005260406000206000915090505481565b600560009054906101000a900460ff161561043c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610433906118c5565b60405180910390fd5b60005b828290508110156106d857600083838381811061045f5761045e611cf8565b5b905060200201359050610470610f0c565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016104e19190611985565b60206040518083038186803b1580156104f957600080fd5b505afa15801561050d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053191906114b4565b73ffffffffffffffffffffffffffffffffffffffff1614156106c45742600260008381526020019081526020016000208190555061056d610f0c565b6001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd610604610f0c565b30846040518463ffffffff1660e01b8152600401610624939291906117d7565b600060405180830381600087803b15801561063e57600080fd5b505af1158015610652573d6000803e3d6000fd5b5050505060046000610662610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150506001900390600052602060002001600090919091909150555b5080806106d090611c51565b91505061043f565b505050565b60008473ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461076f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076690611905565b60405180910390fd5b63150b7a0260e01b9050949350505050565b600560009054906101000a900460ff16156107d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c8906118c5565b60405180910390fd5b60006107db610e29565b905060008111610820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081790611925565b60405180910390fd5b426003600061082d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663449a52f86108b1610f0c565b836040518363ffffffff1660e01b81526004016108cf92919061180e565b600060405180830381600087803b1580156108e957600080fd5b505af11580156108fd573d6000803e3d6000fd5b5050505050565b600560009054906101000a900460ff1681565b60036020528060005260406000206000915090505481565b610937610f14565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610983610f14565b8060078190555050565b610995610f14565b61099f6000610f92565b565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d96109d4610f0c565b610b8b565b905081156109ea576109e9610781565b5b60005b8151811015610a32576000828281518110610a0b57610a0a611cf8565b5b60200260200101519050610a1e81611056565b508080610a2a90611c51565b9150506109ed565b5060046000610a3f610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610a85919061132f565b5050565b610a91610f14565b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610b5f610f14565b600560009054906101000a900460ff1615600560006101000a81548160ff021916908315150217905550565b6060600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610c1657602002820191906000526020600020905b815481526020019060010190808311610c02575b50505050509050919050565b60005b82829050811015610c74576000838383818110610c4557610c44611cf8565b5b905060200201359050610c5781611056565b610c60816111ec565b508080610c6c90611c51565b915050610c25565b505050565b610c81610f14565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce8906118e5565b60405180910390fd5b610cfa81610f92565b50565b60008060026000848152602001908152602001600020541480610d21575060065482145b15610d2f5760009050610e24565b600060036000610d3d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600260008581526020019081526020016000205411610ddd5760036000610d9d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610df2565b60026000848152602001908152602001600020545b90506000610e108242610e059190611b21565b610e0f9190611a96565b905060075481610e1f9190611ac7565b925050505b919050565b600080610e3c610e37610f0c565b610b8b565b90506000805b8251811015610f03576000838281518110610e6057610e5f611cf8565b5b60200260200101519050610e72610f0c565b73ffffffffffffffffffffffffffffffffffffffff166001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610eef57610ee181610cfd565b83610eec9190611a40565b92505b508080610efb90611c51565b915050610e42565b50809250505090565b600033905090565b610f1c610f0c565b73ffffffffffffffffffffffffffffffffffffffff16610f3a610afb565b73ffffffffffffffffffffffffffffffffffffffff1614610f90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8790611945565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61105e610f0c565b73ffffffffffffffffffffffffffffffffffffffff166001600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110f590611965565b60405180910390fd5b60006001600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30611198610f0c565b846040518463ffffffff1660e01b81526004016111b7939291906117d7565b600060405180830381600087803b1580156111d157600080fd5b505af11580156111e5573d6000803e3d6000fd5b5050505050565b60005b600460006111fb610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561132b57816004600061124d610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061129957611298611cf8565b5b9060005260206000200154141561131857600654600460006112b9610f0c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061130557611304611cf8565b5b906000526020600020018190555061132b565b808061132390611c51565b9150506111ef565b5050565b508054600082559060005260206000209081019061134d9190611350565b50565b5b80821115611369576000816000905550600101611351565b5090565b600061138061137b846119c5565b6119a0565b90508281526020810184848401111561139c5761139b611d65565b5b6113a7848285611c11565b509392505050565b6000813590506113be81611ea1565b92915050565b6000815190506113d381611ea1565b92915050565b60008083601f8401126113ef576113ee611d5b565b5b8235905067ffffffffffffffff81111561140c5761140b611d56565b5b60208301915083602082028301111561142857611427611d60565b5b9250929050565b60008135905061143e81611eb8565b92915050565b600082601f83011261145957611458611d5b565b5b813561146984826020860161136d565b91505092915050565b60008135905061148181611ecf565b92915050565b60006020828403121561149d5761149c611d6f565b5b60006114ab848285016113af565b91505092915050565b6000602082840312156114ca576114c9611d6f565b5b60006114d8848285016113c4565b91505092915050565b600080600080608085870312156114fb576114fa611d6f565b5b6000611509878288016113af565b945050602061151a878288016113af565b935050604061152b87828801611472565b925050606085013567ffffffffffffffff81111561154c5761154b611d6a565b5b61155887828801611444565b91505092959194509250565b6000806020838503121561157b5761157a611d6f565b5b600083013567ffffffffffffffff81111561159957611598611d6a565b5b6115a5858286016113d9565b92509250509250929050565b6000602082840312156115c7576115c6611d6f565b5b60006115d58482850161142f565b91505092915050565b6000602082840312156115f4576115f3611d6f565b5b600061160284828501611472565b91505092915050565b6000611617838361179e565b60208301905092915050565b61162c81611b55565b82525050565b600061163d82611a06565b6116478185611a1e565b9350611652836119f6565b8060005b8381101561168357815161166a888261160b565b975061167583611a11565b925050600181019050611656565b5085935050505092915050565b61169981611b67565b82525050565b6116a881611b73565b82525050565b6116b781611bc9565b82525050565b6116c681611bdb565b82525050565b60006116d9600683611a2f565b91506116e482611d85565b602082019050919050565b60006116fc602683611a2f565b915061170782611dae565b604082019050919050565b600061171f600b83611a2f565b915061172a82611dfd565b602082019050919050565b6000611742601483611a2f565b915061174d82611e26565b602082019050919050565b6000611765602083611a2f565b915061177082611e4f565b602082019050919050565b6000611788601083611a2f565b915061179382611e78565b602082019050919050565b6117a781611bbf565b82525050565b6117b681611bbf565b82525050565b60006020820190506117d16000830184611623565b92915050565b60006060820190506117ec6000830186611623565b6117f96020830185611623565b61180660408301846117ad565b949350505050565b60006040820190506118236000830185611623565b61183060208301846117ad565b9392505050565b600060208201905081810360008301526118518184611632565b905092915050565b600060208201905061186e6000830184611690565b92915050565b6000602082019050611889600083018461169f565b92915050565b60006020820190506118a460008301846116ae565b92915050565b60006020820190506118bf60008301846116bd565b92915050565b600060208201905081810360008301526118de816116cc565b9050919050565b600060208201905081810360008301526118fe816116ef565b9050919050565b6000602082019050818103600083015261191e81611712565b9050919050565b6000602082019050818103600083015261193e81611735565b9050919050565b6000602082019050818103600083015261195e81611758565b9050919050565b6000602082019050818103600083015261197e8161177b565b9050919050565b600060208201905061199a60008301846117ad565b92915050565b60006119aa6119bb565b90506119b68282611c20565b919050565b6000604051905090565b600067ffffffffffffffff8211156119e0576119df611d27565b5b6119e982611d74565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a4b82611bbf565b9150611a5683611bbf565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611a8b57611a8a611c9a565b5b828201905092915050565b6000611aa182611bbf565b9150611aac83611bbf565b925082611abc57611abb611cc9565b5b828204905092915050565b6000611ad282611bbf565b9150611add83611bbf565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b1657611b15611c9a565b5b828202905092915050565b6000611b2c82611bbf565b9150611b3783611bbf565b925082821015611b4a57611b49611c9a565b5b828203905092915050565b6000611b6082611b9f565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611bd482611bed565b9050919050565b6000611be682611bed565b9050919050565b6000611bf882611bff565b9050919050565b6000611c0a82611b9f565b9050919050565b82818337600083830152505050565b611c2982611d74565b810181811067ffffffffffffffff82111715611c4857611c47611d27565b5b80604052505050565b6000611c5c82611bbf565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611c8f57611c8e611c9a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f5041555345440000000000000000000000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f6e6f7420616c6c6f776564000000000000000000000000000000000000000000600082015250565b7f5749544844524157205a45524f20544f4b454e53000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f6f776e657273686970206661696c656400000000000000000000000000000000600082015250565b611eaa81611b55565b8114611eb557600080fd5b50565b611ec181611b67565b8114611ecc57600080fd5b50565b611ed881611bbf565b8114611ee357600080fd5b5056fea264697066735822122000b56e7dc9723072b14e79a6e36cd9a57be65bf652c9b2d1c42fe3e864a765b764736f6c63430008070033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.