POL Price: $0.327427 (+2.97%)
Gas: 30 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Burn Holder ...272211642022-04-16 22:07:571037 days ago1650146877IN
0x0f82E7b0...839D39968
0 POL0.0032288762.10089999

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1599fE55...5d6dE393d
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
MilkChild

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

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

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

contract MilkChild is ERC20, IChildToken, HSystemChecker {

  bytes32 public constant DEPOSITOR_ROLE = keccak256("DEPOSITOR_ROLE");

  bool public _adminCanMint = true;
  bool public _canMintMilk = false;
  address public _burnHolderAddress;

  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 Strictly speaking a logged in user has given us permission to do this, but its polite to ask :)
  /// @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 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
  /// @dev Due to the way PoS bridge works we have to use a _burnHolderAddress that we control
  /// @dev on the Ethereum side. Contract will work but wallet is more versatile.
  /// @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, _burnHolderAddress, amount);
    _burn(_burnHolderAddress, 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) {
    require(_canMintMilk, "MILK: MILK minting is disabled");
    _mint(to, amount);
  }


  /* MASTER ROLES **/
  // For ease of use and security we separate TREASURY_ROLE from MASTER_ROLES

  /// @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 in wei
  function mint(address account, uint256 amount) public onlyRole(MASTER_ROLE) {
    require(_adminCanMint, "MILK: Admin cant mint");
    _mint(account, amount);
  }

  /// @notice Method to lock admin minting
  /// @dev Only use once you are 100% sure minting is done
  function lockAdminMinting() external onlyRole(MASTER_ROLE) {
    _adminCanMint = false;
  }

  /// @notice Method to enable MILK minting for the game
  /// @dev Only use when you are 100% sure users can start earning MILK
  function allowMilkMinting() external onlyRole(MASTER_ROLE) {
    _canMintMilk = true;
  }

  /// @notice Method to enable MILK minting for the game
  /// @dev Only use when you are 100% sure users can start earning MILK
  function setBurnHolderAddress(address burnHolderAddress) external onlyRole(MASTER_ROLE) {
    require(burnHolderAddress != address(0), "MILK: Cant be zero address");
    _burnHolderAddress = burnHolderAddress;
  }
}

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 setSystemCheckerContractAddress(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 createNewRole(bytes32 role) external;
    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");

    // 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",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

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":"DEPOSITOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PET_BYTES","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_adminCanMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_burnHolderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_canMintMilk","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_systemCheckerContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowMilkMinting","outputs":[],"stateMutability":"nonpayable","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":"burnHolderAddress","type":"address"}],"name":"setBurnHolderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"systemCheckerContractAddress","type":"address"}],"name":"setSystemCheckerContractAddress","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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80634eb90299116100f9578063a457c2d711610097578063cf2c52cb11610071578063cf2c52cb146103cc578063d54af94b146103df578063dd62ed3e146103ec578063e8292ae31461042557600080fd5b8063a457c2d714610392578063a9059cbb146103a5578063cb72f99a146103b857600080fd5b806375b13b75116100d357806375b13b751461033c57806395d89b4114610350578063a1b99ebe14610358578063a3b0b5a31461036b57600080fd5b80634eb90299146102d55780636a074d37146102e857806370a082311461031357600080fd5b80632e07f60d11610166578063395093511161014057806339509351146102945780633e905590146102a757806340c10f19146102af57806346260642146102c257600080fd5b80632e07f60d1461025f5780632e1a7d4d14610272578063313ce5671461028557600080fd5b806318160ddd116101a257806318160ddd146102145780631bf7dfb01461022657806323b872dd14610239578063271292f51461024c57600080fd5b806306fdde03146101c9578063095ea7b3146101e75780630fb1671e1461020a575b600080fd5b6101d1610438565b6040516101de9190611840565b60405180910390f35b6101fa6101f53660046117df565b6104ca565b60405190151581526020016101de565b6102126104e0565b005b6002545b6040519081526020016101de565b610212610234366004611726565b6105bd565b6101fa610247366004611726565b6106ec565b61021261025a3660046117df565b610796565b61021261026d3660046117df565b6108e7565b610212610280366004611828565b610a0e565b604051601281526020016101de565b6101fa6102a23660046117df565b610a1b565b610212610a57565b6102126102bd3660046117df565b610b25565b6102126102d03660046116d3565b610c43565b6102126102e33660046117df565b610d40565b6007546102fb906001600160a01b031681565b6040516001600160a01b0390911681526020016101de565b6102186103213660046116d3565b6001600160a01b031660009081526020819052604090205490565b6006546101fa90600160a01b900460ff1681565b6101d1610ec2565b6006546102fb906001600160a01b031681565b6102187f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a981565b6101fa6103a03660046117df565b610ed1565b6101fa6103b33660046117df565b610f6a565b6006546101fa90600160a81b900460ff1681565b6102126103da366004611761565b610f77565b6102186214195d60ea1b81565b6102186103fa3660046116f4565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102126104333660046116d3565b611061565b606060038054610447906118f9565b80601f0160208091040260200160405190810160405280929190818152602001828054610473906118f9565b80156104c05780601f10610495576101008083540402835291602001916104c0565b820191906000526020600020905b8154815290600101906020018083116104a357829003601f168201915b5050505050905090565b60006104d7338484611198565b50600192915050565b60055460008051602061196b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561054a57600080fd5b505af115801561055e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105829190611808565b6105a75760405162461bcd60e51b815260040161059e90611893565b60405180910390fd5b506006805460ff60a81b1916600160a81b179055565b60055460008051602061194b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561062757600080fd5b505af115801561063b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065f9190611808565b61067b5760405162461bcd60e51b815260040161059e90611893565b600554604051634209fff160e01b81526001600160a01b03808716600483015286921690634209fff190602401600060405180830381600087803b1580156106c257600080fd5b505af11580156106d6573d6000803e3d6000fd5b505050506106e58585856112bc565b5050505050565b60006106f98484846112bc565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561077e5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161059e565b61078b8533858403611198565b506001949350505050565b60055460008051602061194b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561080057600080fd5b505af1158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190611808565b6108545760405162461bcd60e51b815260040161059e90611893565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b15801561089b57600080fd5b505af11580156108af573d6000803e3d6000fd5b50506007546108cb92508691506001600160a01b0316856112bc565b6007546108e1906001600160a01b03168461148a565b50505050565b60055460008051602061194b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b15801561095157600080fd5b505af1158015610965573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109899190611808565b6109a55760405162461bcd60e51b815260040161059e90611893565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b1580156109ec57600080fd5b505af1158015610a00573d6000803e3d6000fd5b505050506108e1848461148a565b610a18338261148a565b50565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104d7918590610a529086906118ca565b611198565b60055460008051602061196b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610ac157600080fd5b505af1158015610ad5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610af99190611808565b610b155760405162461bcd60e51b815260040161059e90611893565b506006805460ff60a01b19169055565b60055460008051602061196b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610b8f57600080fd5b505af1158015610ba3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc79190611808565b610be35760405162461bcd60e51b815260040161059e90611893565b600654600160a01b900460ff16610c345760405162461bcd60e51b815260206004820152601560248201527413525312ce8810591b5a5b8818d85b9d081b5a5b9d605a1b604482015260640161059e565b610c3e83836115d8565b505050565b6005547fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610cbf57600080fd5b505af1158015610cd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf79190611808565b610d135760405162461bcd60e51b815260040161059e90611893565b50600680546001600160a01b039092166001600160a01b0319928316811790915560058054909216179055565b60055460008051602061194b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610daa57600080fd5b505af1158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de29190611808565b610dfe5760405162461bcd60e51b815260040161059e90611893565b600554604051634209fff160e01b81526001600160a01b03808616600483015285921690634209fff190602401600060405180830381600087803b158015610e4557600080fd5b505af1158015610e59573d6000803e3d6000fd5b5050600654600160a81b900460ff169150610eb890505760405162461bcd60e51b815260206004820152601e60248201527f4d494c4b3a204d494c4b206d696e74696e672069732064697361626c65640000604482015260640161059e565b6108e184846115d8565b606060048054610447906118f9565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610f535760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161059e565b610f603385858403611198565b5060019392505050565b60006104d73384846112bc565b6005547f8f4f2da22e8ac8f11e15f9fc141cddbb5deea8800186560abb6e68c5496619a9906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190611808565b6110475760405162461bcd60e51b815260040161059e90611893565b600061105583850185611828565b90506106e585826115d8565b60055460008051602061196b833981519152906001600160a01b03166391d1485482336040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401602060405180830381600087803b1580156110cb57600080fd5b505af11580156110df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111039190611808565b61111f5760405162461bcd60e51b815260040161059e90611893565b6001600160a01b0382166111755760405162461bcd60e51b815260206004820152601a60248201527f4d494c4b3a2043616e74206265207a65726f2061646472657373000000000000604482015260640161059e565b50600780546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0383166111fa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161059e565b6001600160a01b03821661125b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161059e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166113205760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161059e565b6001600160a01b0382166113825760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161059e565b6001600160a01b038316600090815260208190526040902054818110156113fa5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161059e565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906114319084906118ca565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161147d91815260200190565b60405180910390a36108e1565b6001600160a01b0382166114ea5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161059e565b6001600160a01b0382166000908152602081905260409020548181101561155e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161059e565b6001600160a01b038316600090815260208190526040812083830390556002805484929061158d9084906118e2565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b03821661162e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161059e565b806002600082825461164091906118ca565b90915550506001600160a01b0382166000908152602081905260408120805483929061166d9084906118ca565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b80356001600160a01b03811681146116ce57600080fd5b919050565b6000602082840312156116e4578081fd5b6116ed826116b7565b9392505050565b60008060408385031215611706578081fd5b61170f836116b7565b915061171d602084016116b7565b90509250929050565b60008060006060848603121561173a578081fd5b611743846116b7565b9250611751602085016116b7565b9150604084013590509250925092565b600080600060408486031215611775578283fd5b61177e846116b7565b9250602084013567ffffffffffffffff8082111561179a578384fd5b818601915086601f8301126117ad578384fd5b8135818111156117bb578485fd5b8760208285010111156117cc578485fd5b6020830194508093505050509250925092565b600080604083850312156117f1578182fd5b6117fa836116b7565b946020939093013593505050565b600060208284031215611819578081fd5b815180151581146116ed578182fd5b600060208284031215611839578081fd5b5035919050565b6000602080835283518082850152825b8181101561186c57858101830151858201604001528201611850565b8181111561187d5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252601e908201527f53433a20496e76616c6964207472616e73616374696f6e20736f757263650000604082015260600190565b600082198211156118dd576118dd611934565b500190565b6000828210156118f4576118f4611934565b500390565b600181811c9082168061190d57607f821691505b6020821081141561192e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfee1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98b8c0776df2c2176edf6f82391c35ea4891146d7a976ee36fd07f1a6fb4ead4ca2646970667358221220a9628639b9067ceb35ce6802365bbc3897fbce372a1e99fb5119ce3bed1eb66964736f6c63430008040033

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.