Contract 0x34171cCa372d73c17FB2a085375b237AF0aF60C8

Contract Overview

Balance:
0 MATIC
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x38812cc36ab9a2a2b99c4013455f17bdf2e8c95172736771f7b77c92a7b710cf0x60806040239129852022-01-15 12:56:0813 days 6 hrs ago0x772b92a6abe5129f8ef91d164cc757dd9bbd0bc7 IN  Create: MilkChild0 MATIC0.003074232 2
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MilkChild

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : MilkChild.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// See https://docs.polygon.technology/docs/develop/ethereum-polygon/mintable-assets/

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../system/HSystemChecker.sol";
import "../../common/IChildToken.sol";

contract MilkChild is ERC20, IChildToken, HSystemChecker {

    /// @dev In the event we hit any transfer issues when creating the pool, we can whitelist addresses
    /// to allow transfers. We dont want to give TREASURY_ROLE out to anyone but our trusted contracts
    /// and admin addresses
    bytes32 constant POOL_ROLE = keccak256("POOL_ROLE");

    bool transfersLocked = true;
    bool adminCanMint = true;

    constructor(
        string memory name,
        string memory symbol,
        address systemCheckerContractAddress
    ) ERC20(name, symbol) HSystemChecker(systemCheckerContractAddress) {}

    /// @notice called when token is deposited on root chain
    /// @dev Should be callable only by ChildChainManager
    /// Should handle deposit by minting the required amount for user
    /// Make sure minting is done only by this function
    /// @param user user address for whom deposit is being done
    /// @param depositData abi encoded amount
    function deposit(address user, bytes calldata depositData) external override onlyRole(DEPOSITOR_ROLE) {
        uint256 amount = abi.decode(depositData, (uint256));
        _mint(user, amount);
    }

    /// @notice called when user wants to withdraw tokens back to root chain
    /// @dev Should burn user's tokens. This transaction will be verified when exiting on root chain
    /// @dev external with no role to allow users requesting withdraw of token when not part of game
    /// @dev _burn() handles quantity check
    /// @param amount amount of tokens to withdraw
    function withdraw(uint256 amount) external {
        _burn(_msgSender(), amount);
    }

    /* TREASURY ROLES **/
    // Special role specifically for the treasury. This allows us to create a special relationship between
    // the treasury and Milk contract. Never know when you might need it :)

    /// @notice called when user wants to withdraw tokens back to root chain
    /// @dev Should burn user's tokens. This transaction will be verified when exiting on root chain
    /// @dev User requests withdrawal and game system handles it so we have to stipulate the users address
    /// @dev _burn() handles quantity check
    /// @param owner address of user withdrawing tokens
    /// @param amount amount of tokens to withdraw
    function gameWithdraw(address owner, uint256 amount) external onlyRole(TREASURY_ROLE) isUser(owner) {
        _burn(owner, amount);
    }

    /// @notice Mint that MILK
    /// @dev Designed for minting of initial token allocations
    /// @param account user for whom tokens are being minted
    /// @param amount amount of token to mint
    function mint(address account, uint256 amount) public onlyRole(TREASURY_ROLE) {
        require(adminCanMint, "MILK: Admin cant mint");
        _mint(account, amount);
    }

    /// @notice Allow the system to manage Milk within itself
    /// @dev _transfer() handles amount check
    /// @param sender Address to transfer from
    /// @param recipient Address to transfer to
    /// @param amount Amount of Gold to send - wei
    function gameTransferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external onlyRole(TREASURY_ROLE) isUser(sender) {
        _transfer(sender, recipient, amount);
    }

    /// @notice Allows system to burn tokens
    /// @dev _burn handles the amount checking
    /// @dev to prevent double milking :p we have to transfer token before burning it
    /// @param owner Holder address to burn tokens of
    /// @param amount Amount of tokens to burn
    function gameBurn(address owner, uint256 amount) external onlyRole(TREASURY_ROLE) isUser(owner) {
        _transfer(owner, address(this), amount);
        _burn(address(this), amount);
    }

    /// @notice Mint a user some gold
    /// @dev Only activate users should ever be minted Gold
    /// @dev Reserved for game generation of Gold via quests/battles/etc...
    /// @param to Address to mint to
    /// @param amount Amount of Gold to send - wei
    function gameMint(address to, uint256 amount) external onlyRole(TREASURY_ROLE) isUser(to) {
        _mint(to, amount);
    }

    /// @notice Prevent transfers before they are unlocked
    /// @dev This is a measure to help combat unfavourable LP trades early on
    /// @param from Address is being move from
    /// @param to Address is being move to
    /// @param amount Amount of token
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20) {
        // lock transfers for every address except treasury during the buffer period
        // we want to prevent bot spiking in first few minutes of LP opening
        if(transfersLocked){
            require(
                _systemChecker.hasRole(TREASURY_ROLE, _msgSender()) ||
                _systemChecker.hasRole(POOL_ROLE, _msgSender()),
                "MILK: transfers locked");
        }
        super._beforeTokenTransfer(from, to, amount);
    }

    /// @notice Method to unlock transfers, can not be locked again
    function unlockTransfers() external onlyRole(MASTER_ROLE) {
        transfersLocked = false;
    }

    /// @notice Method to lock admin minting
    function lockAdminMinting() external onlyRole(MASTER_ROLE) {
        adminCanMint = false;
    }
}

File 2 of 9 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, 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}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), 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}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, 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 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 {}
}

File 3 of 9 : HSystemChecker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./ISystemChecker.sol";
import "./RolesAndKeys.sol";

contract HSystemChecker is RolesAndKeys {

    ISystemChecker _systemChecker;
    address public _systemCheckerContractAddress;

    constructor(address systemCheckerContractAddress) {
        _systemCheckerContractAddress = systemCheckerContractAddress;
        _systemChecker = ISystemChecker(systemCheckerContractAddress);
    }

    /// @notice Check if an address is a registered user or not
    /// @dev Triggers a require in systemChecker
    modifier isUser(address user) {
        _systemChecker.isUser(user);
        _;
    }

    /// @notice Check that the msg.sender has the desired role
    /// @dev Triggers a require in systemChecker
    modifier onlyRole(bytes32 role) {
        require(_systemChecker.hasRole(role, _msgSender()), "SC: Invalid transaction source");
        _;
    }

    /// @notice Push new address for the SystemChecker Contract
    /// @param systemCheckerContractAddress - address of the System Checker
    function setSystemCheckerAddress(address systemCheckerContractAddress) external onlyRole(ADMIN_ROLE) {
        _systemCheckerContractAddress = systemCheckerContractAddress;
        _systemChecker = ISystemChecker(systemCheckerContractAddress);
    }
}

File 4 of 9 : IChildToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IChildToken {
    function deposit(address user, bytes calldata depositData) external;
}

File 5 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 9 : IERC20Metadata.sol
// 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);
}

File 7 of 9 : 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;
    }
}

File 8 of 9 : ISystemChecker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ISystemChecker {
    function hasRole(bytes32 role, address account) external returns (bool);
    function hasPermission(bytes32 role, address account) external;
    function isUser(address user) external;
    function getSafeAddress(bytes32 key) external returns (address);
    function grantRole(bytes32 role, address account) external;
}

File 9 of 9 : RolesAndKeys.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/utils/Context.sol';

abstract contract RolesAndKeys is Context {
    // ROLES
    bytes32 constant MASTER_ROLE = keccak256("MASTER_ROLE");
    bytes32 constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    bytes32 constant GAME_ROLE = keccak256("GAME_ROLE");
    bytes32 constant CONTRACT_ROLE = keccak256("CONTRACT_ROLE");
    bytes32 constant TREASURY_ROLE = keccak256("TREASURY_ROLE");
    bytes32 constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE");

    // KEYS
    bytes32 constant MARKETPLACE_KEY_BYTES = keccak256("MARKETPLACE");
    bytes32 constant SYSTEM_KEY_BYTES = keccak256("SYSTEM");
    bytes32 constant QUEST_KEY_BYTES = keccak256("QUEST");
    bytes32 constant BATTLE_KEY_BYTES = keccak256("BATTLE");
    bytes32 constant HOUSE_KEY_BYTES = keccak256("HOUSE");
    bytes32 constant QUEST_GUILD_KEY_BYTES = keccak256("QUEST_GUILD");

    // COMMON
    bytes32 constant public PET_BYTES = 0x5065740000000000000000000000000000000000000000000000000000000000;
}

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"systemCheckerContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PET_BYTES","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_systemCheckerContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes","name":"depositData","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gameBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gameMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gameTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"gameWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockAdminMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"systemCheckerContractAddress","type":"address"}],"name":"setSystemCheckerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unlockTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526006805461ffff60a01b191661010160a01b1790553480156200002657600080fd5b5060405162001bf038038062001bf083398101604081905262000049916200020b565b808383816003908051906020019062000064929190620000b2565b5080516200007a906004906020840190620000b2565b5050600680546001600160a01b039093166001600160a01b03199384168117909155600580549093161790915550620002e792505050565b828054620000c09062000294565b90600052602060002090601f016020900481019282620000e457600085556200012f565b82601f10620000ff57805160ff19168380011785556200012f565b828001600101855582156200012f579182015b828111156200012f57825182559160200191906001019062000112565b506200013d92915062000141565b5090565b5b808211156200013d576000815560010162000142565b600082601f83011262000169578081fd5b81516001600160401b0380821115620001865762000186620002d1565b604051601f8301601f19908116603f01168101908282118183101715620001b157620001b1620002d1565b81604052838152602092508683858801011115620001cd578485fd5b8491505b83821015620001f05785820183015181830184015290820190620001d1565b838211156200020157848385830101525b9695505050505050565b60008060006060848603121562000220578283fd5b83516001600160401b038082111562000237578485fd5b620002458783880162000158565b945060208601519150808211156200025b578384fd5b506200026a8682870162000158565b604086015190935090506001600160a01b038116811462000289578182fd5b809150509250925092565b600181811c90821680620002a957607f821691505b60208210811415620002cb57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6118f980620002f76000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80633e905590116100c3578063a457c2d71161007c578063a457c2d7146102ba578063a9059cbb146102cd578063cf2c52cb146102e0578063d54af94b146102f3578063dd62ed3e14610300578063ebc416d11461033957600080fd5b80633e9055901461023057806340c10f19146102385780634eb902991461024b57806370a082311461025e57806395d89b4114610287578063a1b99ebe1461028f57600080fd5b806323b872dd1161011557806323b872dd146101c2578063271292f5146101d55780632e07f60d146101e85780632e1a7d4d146101fb578063313ce5671461020e578063395093511461021d57600080fd5b806306fdde0314610152578063095ea7b31461017057806318160ddd146101935780631bf7dfb0146101a557806321842be3146101ba575b600080fd5b61015a61034c565b6040516101679190611799565b60405180910390f35b61018361017e366004611738565b6103de565b6040519015158152602001610167565b6002545b604051908152602001610167565b6101b86101b336600461167f565b6103f4565b005b6101b861052c565b6101836101d036600461167f565b61060c565b6101b86101e3366004611738565b6106b6565b6101b86101f6366004611738565b6107ee565b6101b8610209366004611781565b610915565b60405160128152602001610167565b61018361022b366004611738565b610922565b6101b861095e565b6101b8610246366004611738565b610a3e565b6101b8610259366004611738565b610b5c565b61019761026c36600461162c565b6001600160a01b031660009081526020819052604090205490565b61015a610c83565b6006546102a2906001600160a01b031681565b6040516001600160a01b039091168152602001610167565b6101836102c8366004611738565b610c92565b6101836102db366004611738565b610d2b565b6101b86102ee3660046116ba565b610d38565b6101976214195d60ea1b81565b61019761030e36600461164d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6101b861034736600461162c565b610e22565b60606003805461035b90611852565b80601f016020809104026020016040519081016040528092919081815260200182805461038790611852565b80156103d45780601f106103a9576101008083540402835291602001916103d4565b820191906000526020600020905b8154815290600101906020018083116103b757829003601f168201915b5050505050905090565b60006103eb338484610f1f565b50600192915050565b6005546000805160206118a4833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561045e57600080fd5b505af1158015610472573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104969190611761565b6104bb5760405162461bcd60e51b81526004016104b2906117ec565b60405180910390fd5b600554604051634209fff160e01b81526001600160a01b03808716600483015286921690634209fff190602401600060405180830381600087803b15801561050257600080fd5b505af1158015610516573d6000803e3d6000fd5b50505050610525858585611043565b5050505050565b6005547f8b8c0776df2c2176edf6f82391c35ea4891146d7a976ee36fd07f1a6fb4ead4c906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b1580156105a857600080fd5b505af11580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e09190611761565b6105fc5760405162461bcd60e51b81526004016104b2906117ec565b506006805460ff60a01b19169055565b6000610619848484611043565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561069e5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016104b2565b6106ab8533858403610f1f565b506001949350505050565b6005546000805160206118a4833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561072057600080fd5b505af1158015610734573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107589190611761565b6107745760405162461bcd60e51b81526004016104b2906117ec565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b1580156107bb57600080fd5b505af11580156107cf573d6000803e3d6000fd5b505050506107de843085611043565b6107e8308461121c565b50505050565b6005546000805160206118a4833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108909190611761565b6108ac5760405162461bcd60e51b81526004016104b2906117ec565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b1580156108f357600080fd5b505af1158015610907573d6000803e3d6000fd5b505050506107e8848461121c565b61091f338261121c565b50565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916103eb918590610959908690611823565b610f1f565b6005547f8b8c0776df2c2176edf6f82391c35ea4891146d7a976ee36fd07f1a6fb4ead4c906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b1580156109da57600080fd5b505af11580156109ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a129190611761565b610a2e5760405162461bcd60e51b81526004016104b2906117ec565b506006805460ff60a81b19169055565b6005546000805160206118a4833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610aa857600080fd5b505af1158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190611761565b610afc5760405162461bcd60e51b81526004016104b2906117ec565b600654600160a81b900460ff16610b4d5760405162461bcd60e51b815260206004820152601560248201527413525312ce8810591b5a5b8818d85b9d081b5a5b9d605a1b60448201526064016104b2565b610b578383611376565b505050565b6005546000805160206118a4833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610bc657600080fd5b505af1158015610bda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bfe9190611761565b610c1a5760405162461bcd60e51b81526004016104b2906117ec565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b158015610c6157600080fd5b505af1158015610c75573d6000803e3d6000fd5b505050506107e88484611376565b60606004805461035b90611852565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610d145760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016104b2565b610d213385858403610f1f565b5060019392505050565b60006103eb338484611043565b6005547f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a9906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610db457600080fd5b505af1158015610dc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dec9190611761565b610e085760405162461bcd60e51b81526004016104b2906117ec565b6000610e1683850185611781565b90506105258582611376565b6005547fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610e9e57600080fd5b505af1158015610eb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed69190611761565b610ef25760405162461bcd60e51b81526004016104b2906117ec565b50600680546001600160a01b039092166001600160a01b0319928316811790915560058054909216179055565b6001600160a01b038316610f815760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104b2565b6001600160a01b038216610fe25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104b2565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110a75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104b2565b6001600160a01b0382166111095760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104b2565b611114838383611461565b6001600160a01b0383166000908152602081905260409020548181101561118c5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016104b2565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906111c3908490611823565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161120f91815260200190565b60405180910390a36107e8565b6001600160a01b03821661127c5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016104b2565b61128882600083611461565b6001600160a01b038216600090815260208190526040902054818110156112fc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016104b2565b6001600160a01b038316600090815260208190526040812083830390556002805484929061132b90849061183b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b0382166113cc5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016104b2565b6113d860008383611461565b80600260008282546113ea9190611823565b90915550506001600160a01b03821660009081526020819052604081208054839290611417908490611823565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600654600160a01b900460ff1615610b57576005546001600160a01b03166391d148546000805160206118a4833981519152336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b1580156114db57600080fd5b505af11580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115139190611761565b806115cb57506005546001600160a01b03166391d148547fb8179c2726c8d8961ef054875ab3f4c1c3d34e1cb429c3d5e0bc97958e4cab9d336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561159357600080fd5b505af11580156115a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cb9190611761565b610b575760405162461bcd60e51b815260206004820152601660248201527513525312ce881d1c985b9cd9995c9cc81b1bd8dad95960521b60448201526064016104b2565b80356001600160a01b038116811461162757600080fd5b919050565b60006020828403121561163d578081fd5b61164682611610565b9392505050565b6000806040838503121561165f578081fd5b61166883611610565b915061167660208401611610565b90509250929050565b600080600060608486031215611693578081fd5b61169c84611610565b92506116aa60208501611610565b9150604084013590509250925092565b6000806000604084860312156116ce578283fd5b6116d784611610565b9250602084013567ffffffffffffffff808211156116f3578384fd5b818601915086601f830112611706578384fd5b813581811115611714578485fd5b876020828501011115611725578485fd5b6020830194508093505050509250925092565b6000806040838503121561174a578182fd5b61175383611610565b946020939093013593505050565b600060208284031215611772578081fd5b81518015158114611646578182fd5b600060208284031215611792578081fd5b5035919050565b6000602080835283518082850152825b818110156117c5578581018301518582016040015282016117a9565b818111156117d65783604083870101525b50601f01601f1916929092016040019392505050565b6020808252601e908201527f53433a20496e76616c6964207472616e73616374696f6e20736f757263650000604082015260600190565b600082198211156118365761183661188d565b500190565b60008282101561184d5761184d61188d565b500390565b600181811c9082168061186657607f821691505b6020821081141561188757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfee1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca9a2646970667358221220573ea914940c08ea6c5e86792c2cb2255217955b73c400c01644f26c2406dd1664736f6c63430008040033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000d8736862555f35e4aee7b5ee1ddff35e323c275100000000000000000000000000000000000000000000000000000000000000044d696c6b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044d494c4b00000000000000000000000000000000000000000000000000000000

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000d8736862555f35e4aee7b5ee1ddff35e323c275100000000000000000000000000000000000000000000000000000000000000044d696c6b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044d494c4b00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): Milk
Arg [1] : symbol (string): MILK
Arg [2] : systemCheckerContractAddress (address): 0xd8736862555f35e4aee7b5ee1ddff35e323c2751

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000d8736862555f35e4aee7b5ee1ddff35e323c2751
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [4] : 4d696c6b00000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [6] : 4d494c4b00000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading