Contract 0x0e8e14da021692cdecb3300eecbe60331d437014

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
Ad
Ad
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x53f97ae022cda9ab6394e63af160ed9e05bcfe5cfdf733761281725b6078aac7Born Hero203638522021-10-19 1:26:451 min ago0x8b42436d567cb464ae0567f49cb6a1a16a9c8c8d IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.07322948
0xcd017ab63f1475ea0d8fba165b01e915782bf431ad05856d2ff895564a78c6b7Born Hero203637072021-10-19 1:21:097 mins ago0x186268d02dfab4b97675821366945c6786907783 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05988456
0x158164177fb3932247bf714aa6723b806030c5e5d47df7f2925f8b11e6406b41Born Hero203636482021-10-19 1:17:1311 mins ago0x12dcc4b208c051e5bfb064759315e9b57920e6e1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.058404
0x1182f059036c8a78b1867550ffc7b2d609af90e156260144071f07cc67def413Born Hero203636142021-10-19 1:15:5912 mins ago0x616c9d1f55eda979bbc9d2f02e936530afd494ec IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.0599248
0x0739095d87d5a3e27bc6f8151fec9d03f678ee6a36251a86058eb1efcf3b44ffBorn Hero203636102021-10-19 1:15:5112 mins ago0x12dcc4b208c051e5bfb064759315e9b57920e6e1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.0599056
0xe9821e5dea663f36d0bc162ffc22bd59a68a03d32e133b185c59ae4b7dadcf5cBorn Hero203635762021-10-19 1:14:3913 mins ago0x12dcc4b208c051e5bfb064759315e9b57920e6e1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.06117228
0xaf20145e8fa2548859b884a869ce8b8e9dd2158777f6a4a44fe9f5718476f9aeBorn Hero203635522021-10-19 1:13:5114 mins ago0x5aa6dcb3c520c72bcbe1619072b6745ad2cd0d3e IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05870868
0xabbc8e7241db344b0fdb79a42e905d865ff214c38442d30c28c192482d4b07cdBorn Hero203635522021-10-19 1:13:5114 mins ago0x9f455ed3878e46bc09ec783c32d32c09a5406c46 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.057948
0x355f7584423f0d9e9886e9ffc410d7bda389430ff8d0501432e3cc38772b0042Born Hero203634712021-10-19 1:11:0517 mins ago0xb4f60005320c19f2cf0fd27d3cf0e357284426a6 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.07221432
0x3d3356c7a42e4a3a249aa8d427400b42968fd3d3f0cabb3efff2fe3bb2057704Born Hero203634512021-10-19 1:10:1318 mins ago0x5e4fe8840cd43c09661a8011b7a6473826a2e9d2 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05906168
0x14a974ca0163098e7568521937884a77ab958763622250accc22c0d62e950c9cBorn Hero203634512021-10-19 1:10:1318 mins ago0xc9ed3ca26b5f68147ba942b3f9ff23348c7bad3c IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.058083
0x7bf4663e1ea4c51dc077346de759c1cb8beefd1d26dfe539a5bd48602c85eb1dBorn Hero203634492021-10-19 1:10:0518 mins ago0x5aa6dcb3c520c72bcbe1619072b6745ad2cd0d3e IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.0596582
0x8c1b286b8f466a94b9438449e6522540dbd7c47e9682fe846213631b1095f953Born Hero203634332021-10-19 1:09:0119 mins ago0x5e4fe8840cd43c09661a8011b7a6473826a2e9d2 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05862248
0x65004f012a8256bd45dc4452ff2c65721dfc209f3b5e29590c14a30f28dd022bBorn Hero203634272021-10-19 1:08:3719 mins ago0xce7b1f26567d8daaed1055a1508fb349b39b35a1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05867256
0x585125f56e07fb04f272ab77ab67f3bc1c3c89b025602d0c2a7f857824b12184Born Hero203634222021-10-19 1:08:1720 mins ago0xfb93b850552c82fdbf6dc642c83bc2dad127d198 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05854212
0x5644ca6b323aa6ccfd5442934b04e000087a02bf0bf4f35cef3da8e0eed7573eBorn Hero203634192021-10-19 1:08:0520 mins ago0xa5c56f224db10884ce74aeb85a0790cda80451ba IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05449056
0xd37ec321687db4b810bae49606b5d5ad0be7367cba3313c36edc444a870fea05Born Hero203634162021-10-19 1:07:5320 mins ago0x5e4fe8840cd43c09661a8011b7a6473826a2e9d2 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.0746938
0x68b730ecc89b8574d7c5d536d7415d1161772c03f5466b5a5ac6df766204c021Born Hero203634142021-10-19 1:07:4520 mins ago0x03bbf3ee25a8316d7a2741d6848308fb903149a1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.06023088
0x1ba7ee1f8ac7e65734eee7a6698d08235eb6563ba4873f0da38fd9614316ace8Born Hero203633912021-10-19 1:06:0922 mins ago0xa542bbfc403321c22c42ac0bfca9335dde80a490 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05858964
0x7805ab213a8a58cf06b99346a16496f96410b53c1f8a217fef68efdde587b2a8Born Hero203633702021-10-19 1:05:2722 mins ago0xce7b1f26567d8daaed1055a1508fb349b39b35a1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05981888
0x2c532008585500ea44ffcef74258f9b46058646affdc2fecc25f9f2d31b8beffBorn Hero203633552021-10-19 1:04:5723 mins ago0xce7b1f26567d8daaed1055a1508fb349b39b35a1 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.0746544
0x8bc46d3a06fd52a1d99dea56f622c7054f57d1f4449f253342228a1b468b8efaBorn Hero203632912021-10-19 1:02:4525 mins ago0x186268d02dfab4b97675821366945c6786907783 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.07344304
0xd561a6e78839a7e846b4399255fdb1d85ba7399cbf0e7270489f11dcdd90f70aBorn Hero203632662021-10-19 1:01:5526 mins ago0xb9f57e2bd41b95adb06f7ff636c0decc8ec87bc3 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.07257884
0x41ef6f4f81616f1a8b3017160b1ecfe352950507bb71a75b50529566ad96e8d6Born Hero203632332021-10-19 0:59:4528 mins ago0xfb93b850552c82fdbf6dc642c83bc2dad127d198 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.07436836
0x4b01000f28d91933ce432c100082acf27c73b1655f0b05e6e9c27c8972533138Born Hero203632082021-10-19 0:57:5230 mins ago0x5e3b4d391cf532812012b3709f8b358ed9e94d26 IN  0x0e8e14da021692cdecb3300eecbe60331d4370140 MATIC0.05910228
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HeroBorn

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 21 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 2 of 21 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account) internal virtual override {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
}

File 3 of 21 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 21 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 5 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 21 : IERC20.sol
// SPDX-License-Identifier: MIT

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 7 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 21 : Context.sol
// SPDX-License-Identifier: MIT

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 9 of 21 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 10 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 21 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 12 of 21 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 13 of 21 : HeroBorn.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./interface/IHeroGene.sol";
import "./interface/IIdleHero.sol";
import "./base/ERC721HeroCallerBase.sol";
import "./base/ERC20TokenCallerBase.sol";
import "./base/GeneCallerBase.sol";
import "./base/SecurityBase.sol";

contract HeroBorn is ERC721HeroCallerBase, ERC20TokenCallerBase, GeneCallerBase, SecurityBase {

    uint256[] private bornTokenPriceList;
    uint256 private bornTokenTotal;
    uint256 private bornTokenBase;
    uint256 private BORN_CD = 120 hours;
    mapping(uint256 => uint256) private bornTimeMap;

    constructor() {
        bornTokenPriceList = [100 ether, 200 ether, 300 ether, 500 ether, 800 ether, 1300 ether, 2100 ether];
    }

    function _checkHeroModifier(address caller) internal virtual override {
        _checkRole(MINTER_ROLE, caller);
    }

    function _checkTokenModifier(address caller) internal virtual override {
        _checkRole(MINTER_ROLE, caller);
    }

    function _checkRNGModifier(address caller) internal virtual override {
        _checkRole(MINTER_ROLE, caller);
    }

    function _checkGeneModifier(address caller) internal virtual override {
        _checkRole(MINTER_ROLE, caller);
    }

    function calcBornPrice(uint256 parentIDA, uint256 parentIDB) public view returns (uint256) {
        (, , , uint256 parent_a_borncount) = IIdleHero(_heroContract).heroDetail(parentIDA);
        (, , , uint256 parent_b_borncount) = IIdleHero(_heroContract).heroDetail(parentIDB);
        return _calcBornPrice(parent_a_borncount, parent_b_borncount);
    }

    function _calcBornPrice(uint256 parent_a_borncount, uint256 parent_b_borncount) internal view returns (uint256) {
        uint256 born_a_price = bornTokenPriceList[parent_a_borncount];
        uint256 born_b_price = bornTokenPriceList[parent_b_borncount];
        uint256 _bornTokenPrice = born_a_price + born_b_price;
        return _bornTokenPrice;
    }

    function bornHero(uint256 parentIDA, uint256 parentIDB) public whenNotPaused heroReady token20Ready geneReady {
        _bornHeroTo(msg.sender, parentIDA, parentIDB);
    }

    function bornHeroTo(address to, uint256 parentIDA, uint256 parentIDB) public whenNotPaused heroReady token20Ready geneReady {
        _bornHeroTo(to, parentIDA, parentIDB);
    }

    function setBornTokenBase(uint256 base) public whenNotPaused onlyMinter {
        bornTokenBase = base;
    }

    function getBornTokenTotal() public view returns (uint256)  {
        return bornTokenBase + bornTokenTotal;
    }

    function setBornCD(uint _hours) public whenNotPaused onlyMinter {
        BORN_CD = _hours * 1 hours;
    }

    function getBornCD() public view returns (uint) {
        return BORN_CD;
    }

    function withdrawTokens(address to, uint256 amount) public whenNotPaused onlyMinter {
        transferERC20Token(to, amount);
    }

    function _bornHeroTo(address to, uint256 parentIDA, uint256 parentIDB) internal whenNotPaused heroReady token20Ready geneReady {
        require(to != address(0), "New hero owner could not be NullAddress");
        require(parentIDA != parentIDB, "Parents should not be the same");
        require(block.timestamp >= (bornTimeMap[parentIDA] + BORN_CD), "Parent A not yet awake");
        require(block.timestamp >= (bornTimeMap[parentIDB] + BORN_CD), "Parent B not yet awake");

        (uint256 parent_a_dna, , , uint256 parent_a_borncount) = IIdleHero(_heroContract).heroDetail(parentIDA);
        (uint256 parent_b_dna, , , uint256 parent_b_borncount) = IIdleHero(_heroContract).heroDetail(parentIDB);

        require(IERC721(_heroContract).ownerOf(parentIDA) == msg.sender, "The sender is not the owner of NFT parent A");
        require(IERC721(_heroContract).ownerOf(parentIDB) == msg.sender, "The sender is not the owner of NFT parent B");
        require(parent_a_borncount <= 6, "Parents born count must less than 7");
        require(parent_b_borncount <= 6, "Parents born count must less than 7");

        uint256 _bornTokenPrice = _calcBornPrice(parent_a_borncount, parent_b_borncount);

        uint256 tokenBalance = balanceOfERC20Token(msg.sender);
        require(tokenBalance >= _bornTokenPrice, "Token balance not enought");

        uint256 allowanceToken = allowanceOfERC20Token(msg.sender, address(this));
        require(allowanceToken >= _bornTokenPrice, "Token allowance not enough");

        transferERC20TokenFrom(msg.sender, address(this), _bornTokenPrice);

        uint256 newDNA = IHeroGene(_geneContract).getBornDNA(parent_a_dna, parent_b_dna, to);
        uint256 tokenId = _safeMintHero(to, newDNA);

        IIdleHero(_heroContract).addParentsChilds(parentIDA, parentIDB, tokenId);
        bornTokenTotal += _bornTokenPrice;
        bornTimeMap[tokenId] = block.timestamp;
    }
}

File 14 of 21 : ERC20TokenCallerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

abstract contract ERC20TokenCallerBase {

    address internal _token20Contract;

    constructor() {
    }

    modifier token20Ready() {
        require(_token20Contract != address(0), "Token contract is not ready");
        _;
    }

    function _checkTokenModifier(address caller) internal virtual;

    function token20Contract() public view returns (address) {
        return _token20Contract;
    }

    function setToken20Contract(address addr) public {
        _checkTokenModifier(msg.sender);
        _token20Contract = addr;
    }

    function transferERC20TokenFrom(address sender, address recipient, uint256 amount) internal token20Ready {
        IERC20(_token20Contract).transferFrom(sender, recipient, amount);
    }

    function transferERC20Token(address recipient, uint256 amount) internal token20Ready {
        IERC20(_token20Contract).transfer(recipient, amount);
    }

    function balanceOfERC20Token(address owner) internal view token20Ready returns (uint256) {
        return IERC20(_token20Contract).balanceOf(owner);
    }
    
    function allowanceOfERC20Token(address owner, address spender) internal view token20Ready returns (uint256) {
        return IERC20(_token20Contract).allowance(owner, spender);
    }

    function checkERC20TokenBalanceAndApproved(address owner, uint256 amount) internal view token20Ready {
        uint256 tokenBalance = balanceOfERC20Token(owner);
        require(tokenBalance >= amount, "Token balance not enough");

        uint256 allowanceToken = allowanceOfERC20Token(owner, address(this));
        require(allowanceToken >= amount, "Token allowance not enough");
    }
}

File 15 of 21 : ERC721HeroCallerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../interface/IIdleHero.sol";

abstract contract ERC721HeroCallerBase {

    address internal _heroContract;

    constructor() {
    }

    modifier heroReady() {
        require(_heroContract != address(0), "Hero contract is not ready");
        _;
    }

    function _checkHeroModifier(address caller) internal virtual;

    function heroContract() public view returns (address) {
        return _heroContract;
    }

    function setHeroContract(address addr) public {
        _checkHeroModifier(msg.sender);
        _heroContract = addr;
    }

    function ownerOfHero(uint256 tokenId) internal view heroReady returns (address)  {
        return IERC721(_heroContract).ownerOf(tokenId);
    }

    function _safeMintHero(address to, uint256 newDNA) internal returns (uint256) {
        return IIdleHero(_heroContract).safeMintHero(to, newDNA);
    }

    function _safeTransferHeroToken(address from, address to, uint256 tokenId) internal heroReady {
        IERC721(_heroContract).safeTransferFrom(from, to, tokenId);
    }
    
}

File 16 of 21 : GeneCallerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interface/IHeroGene.sol";
import "./RNGCallerBase.sol";

abstract contract GeneCallerBase is RNGCallerBase {

    address internal _geneContract;

    constructor() {
    }

    modifier geneReady() {
        require(_geneContract != address(0), "Gene contract is not ready");
        _;
    }

    function _checkGeneModifier(address caller) internal virtual;

    function geneContract() public view returns (address) {
        return _geneContract;
    }

    function setGeneContract(address addr) public {
        _checkGeneModifier(msg.sender);
        _geneContract = addr;
    }

    function generateGene(uint256 dna_a, uint256 dna_b, address owner) internal geneReady returns (uint256) {
        uint256 newDNA = IHeroGene(_geneContract).getBornDNA(dna_a, dna_b, owner);
        return newDNA;
    }
    
}

File 17 of 21 : RNGCallerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interface/IIdleRNG.sol";

abstract contract RNGCallerBase {

    address internal _RNGContract;

    constructor() {
    }

    modifier RNGReady() {
        require(_RNGContract != address(0), "RNG contract is not ready");
        _;
    }

    function _checkRNGModifier(address caller) internal virtual;

    function RNGContract() public view returns (address) {
        return _RNGContract;
    }

    function setRNGContract(address addr) public {
        _checkRNGModifier(msg.sender);
        _RNGContract = addr;
    }

    function isRNGSeedReady(address from) public view RNGReady returns (bool) {
        return IIdleRNG(_RNGContract).isSeedReady(from);
    }

    function hasRVFRequested(address from) public view returns (bool) {
        return IIdleRNG(_RNGContract).hasRVFRequested(from);
    }

    function generateRNGSeed() public virtual RNGReady {
        _generateRNGSeedTo(msg.sender);
    }

    function _generateRNGSeedTo(address from) internal RNGReady {
        IIdleRNG(_RNGContract).getRandomNumber(from);
    }

    function _expandRandomness(address from, uint256 n) internal RNGReady returns (uint256[] memory expandedValues) {
        return IIdleRNG(_RNGContract).expandRandomness(from, n);
    }
    
}

File 18 of 21 : SecurityBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";

contract SecurityBase is AccessControlEnumerable, Pausable {

    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

    modifier onlyMinter() {
        _checkRole(MINTER_ROLE, msg.sender);
        _;
    }

    modifier onlyAdmin() {
        _checkRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _;
    }

    constructor() {
        _init_admin_role();
    }

    // init creator as admin role
    function _init_admin_role() internal virtual {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(PAUSER_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, msg.sender);
    }

    function pause() public virtual {
        require(hasRole(PAUSER_ROLE, msg.sender));
        _pause();
    }

    function unpause() public virtual {
        require(hasRole(PAUSER_ROLE, msg.sender));
        _unpause();
    }

    function grantMinter(address account) public virtual onlyRole(getRoleAdmin(MINTER_ROLE)) {
        _setupRole(MINTER_ROLE, account);
    }

    function grantPauser(address account) public virtual onlyRole(getRoleAdmin(PAUSER_ROLE)) {
        _setupRole(PAUSER_ROLE, account);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(AccessControlEnumerable)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

}

File 19 of 21 : IHeroGene.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// market contract interface
interface IHeroGene {
    function getBornDNA(uint parent_a_dna, uint parent_b_dna, address owner) external returns(uint256 _dna);
}

File 20 of 21 : IIdleHero.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// IdleHero contract interface
interface IIdleHero {
    function safeMintHero(address to, uint256 dna) external returns (uint256);
    function addParentsChilds(uint256 parentIDA, uint256 parentIDB, uint256 tokenId) external;
    function heroDNA(uint256 tokenId) external view returns (uint256);
    function heroDetail(uint256 tokenId) external view returns (uint256 dna, uint256[] memory parents, uint256[] memory childs, uint256 bornCount);
    function burn(uint256 tokenId) external;
}

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

// contract interface
interface IIdleRNG {
    function getRandomNumber(address from) external;

    function expandRandomness(address from, uint256 n) external returns (uint256[] memory expandedValues);

    function isSeedReady(address from) external view returns (bool);

    function hasRVFRequested(address from) external view  returns (bool);

    function setRandomSeed(address addr, uint256 randomness) external;
}

Settings
{
  "remappings": [],
  "optimizer": {
    "details": {
      "constantOptimizer": true,
      "cse": true,
      "deduplicate": true,
      "jumpdestRemover": true,
      "orderLiterals": true,
      "peephole": true,
      "yul": false
    },
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RNGContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"parentIDA","type":"uint256"},{"internalType":"uint256","name":"parentIDB","type":"uint256"}],"name":"bornHero","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"parentIDA","type":"uint256"},{"internalType":"uint256","name":"parentIDB","type":"uint256"}],"name":"bornHeroTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"parentIDA","type":"uint256"},{"internalType":"uint256","name":"parentIDB","type":"uint256"}],"name":"calcBornPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"geneContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"generateRNGSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBornCD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBornTokenTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"hasRVFRequested","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"heroContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"}],"name":"isRNGSeedReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hours","type":"uint256"}],"name":"setBornCD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"base","type":"uint256"}],"name":"setBornTokenBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setGeneContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setHeroContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setRNGContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setToken20Contract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token20Contract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405262069780600a553480156200001857600080fd5b506006805460ff191690556200002d620000b5565b6040805160e08101825268056bc75e2d631000008152680ad78ebc5ac62000006020820152681043561a882930000091810191909152681b1ae4d6e2ef5000006060820152682b5e3af16b1880000060808201526846791fc84e07d0000060a08201526871d75ab9b92050000060c0820152620000ae9060079081620002b1565b5062000323565b620000c26000336200011c565b620000ee7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336200011c565b6200011a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336200011c565b565b6200013382826200015f60201b62000b9a1760201c565b60008281526005602090815260409091206200015a91839062000ba46200016f821b17901c565b505050565b6200016b82826200018f565b5050565b600062000186836001600160a01b0384166200021b565b90505b92915050565b6200019b82826200026a565b6200016b5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001d762000295565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000229838362000299565b620002615750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000189565b50600062000189565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b3390565b60009081526001919091016020526040902054151590565b828054828255906000526020600020908101928215620002fa579160200282015b82811115620002fa57825182906001600160481b0316905591602001919060010190620002d2565b50620003089291506200030c565b5090565b5b808211156200030857600081556001016200030d565b6128a980620003336000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806363a2326511610125578063ca15c873116100ad578063da41b0db1161007c578063da41b0db14610414578063dc00577f1461041c578063e38bf1c31461042f578063e63ab1e914610442578063e8a0de5c1461044a57610211565b8063ca15c873146103d3578063d2ac0f59146103e6578063d5391393146103f9578063d547741f1461040157610211565b80639010d07c116100f45780639010d07c1461037f57806391d148541461039257806398b4473e146103a5578063a217fddf146103b8578063a5e943c7146103c057610211565b806363a232651461033e5780638456cb591461035157806388da055e146103595780638bdb86a61461036c57610211565b806330b57ec2116101a857806340cc79491161017757806340cc7949146103005780634b6c6c6814610308578063540c15a71461031b57806356a25cea146103235780635c975abb1461033657610211565b806330b57ec2146102d557806336568abe146102dd5780633b0d05ca146102f05780633f4ba83a146102f857610211565b80630daf999a116101e45780630daf999a1461027a578063248a9ca31461028f578063261707fa146102af5780632f2ff15d146102c257610211565b806301ffc9a714610216578063034a63ff1461023f57806306b091f91461025257806309c1d95f14610267575b600080fd5b610229610224366004611e8e565b610452565b60405161023691906124e4565b60405180910390f35b61022961024d366004611d40565b610463565b610265610260366004611d7c565b610517565b005b610265610275366004611d40565b610562565b6102826105a2565b6040516102369190612478565b6102a261029d366004611e21565b6105b1565b60405161023691906124f2565b6102656102bd366004611d40565b6105c6565b6102656102d0366004611e3f565b610601565b610282610628565b6102656102eb366004611e3f565b610637565b6102a2610659565b61026561065f565b61028261068a565b610265610316366004611e21565b610699565b6102656106db565b610265610331366004611e21565b61070c565b61022961075b565b61022961034c366004611d40565b610764565b610265610795565b610265610367366004611d40565b6107be565b61026561037a366004611e6f565b6107e9565b61028261038d366004611e6f565b610891565b6102296103a0366004611e3f565b6108b0565b6102a26103b3366004611e6f565b6108db565b6102a2610a01565b6102656103ce366004611db6565b610a06565b6102a26103e1366004611e21565b610aae565b6102656103f4366004611d40565b610ac5565b6102a2610af0565b61026561040f366004611e3f565b610b02565b6102a2610b0c565b61026561042a366004611d40565b610b23565b61026561043d366004611d40565b610b4e565b6102a2610b79565b610282610b8b565b600061045d82610bb9565b92915050565b6002546000906001600160a01b03166104975760405162461bcd60e51b815260040161048e906125c1565b60405180910390fd5b600254604051633f76377560e01b81526001600160a01b0390911690633f763775906104c7908590600401612478565b60206040518083038186803b1580156104df57600080fd5b505afa1580156104f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045d9190611e03565b61051f61075b565b1561053c5760405162461bcd60e51b815260040161048e90612551565b61055460008051602061285483398151915233610bde565b61055e8282610c42565b5050565b6105796000805160206128348339815191526105b1565b61058a81610585610cee565b610bde565b61055e60008051602061283483398151915283610cf2565b6000546001600160a01b031690565b60009081526004602052604090206001015490565b6105dd6000805160206128548339815191526105b1565b6105e981610585610cee565b61055e60008051602061285483398151915283610cf2565b61060b8282610cfc565b60008281526005602052604090206106239082610ba4565b505050565b6003546001600160a01b031690565b6106418282610d1b565b60008281526005602052604090206106239082610d5d565b600a5490565b610677600080516020612834833981519152336108b0565b61068057600080fd5b610688610d72565b565b6001546001600160a01b031690565b6106a161075b565b156106be5760405162461bcd60e51b815260040161048e90612551565b6106d660008051602061285483398151915233610bde565b600955565b6002546001600160a01b03166107035760405162461bcd60e51b815260040161048e906125c1565b61068833610de0565b61071461075b565b156107315760405162461bcd60e51b815260040161048e90612551565b61074960008051602061285483398151915233610bde565b61075581610e106126f2565b600a5550565b60065460ff1690565b6002546040516363a2326560e01b81526000916001600160a01b0316906363a23265906104c7908590600401612478565b6107ad600080516020612834833981519152336108b0565b6107b657600080fd5b610688610e6d565b6107c733610ec8565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6107f161075b565b1561080e5760405162461bcd60e51b815260040161048e90612551565b6000546001600160a01b03166108365760405162461bcd60e51b815260040161048e90612601565b6001546001600160a01b031661085e5760405162461bcd60e51b815260040161048e90612531565b6003546001600160a01b03166108865760405162461bcd60e51b815260040161048e90612591565b61055e338383610ee3565b60008281526005602052604081206108a9908361149e565b9392505050565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008054604051628e9f9b60e11b815282916001600160a01b03169063011d3f369061090b9087906004016124f2565b60006040518083038186803b15801561092357600080fd5b505afa158015610937573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261095f9190810190611eca565b60008054604051628e9f9b60e11b81529296509094506001600160a01b0316925063011d3f3691506109959087906004016124f2565b60006040518083038186803b1580156109ad57600080fd5b505afa1580156109c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109e99190810190611eca565b93505050506109f882826114aa565b95945050505050565b600081565b610a0e61075b565b15610a2b5760405162461bcd60e51b815260040161048e90612551565b6000546001600160a01b0316610a535760405162461bcd60e51b815260040161048e90612601565b6001546001600160a01b0316610a7b5760405162461bcd60e51b815260040161048e90612531565b6003546001600160a01b0316610aa35760405162461bcd60e51b815260040161048e90612591565b610623838383610ee3565b600081815260056020526040812061045d9061151f565b610ace33610ec8565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008051602061285483398151915281565b610641828261152a565b6000600854600954610b1e91906126c4565b905090565b610b2c33610ec8565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b610b5733610ec8565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008051602061283483398151915281565b6002546001600160a01b031690565b61055e8282611549565b60006108a9836001600160a01b0384166115d0565b60006001600160e01b03198216635a05180f60e01b148061045d575061045d8261161a565b610be882826108b0565b61055e57610c00816001600160a01b0316601461163f565b610c0b83602061163f565b604051602001610c1c92919061244a565b60408051601f198184030181529082905262461bcd60e51b825261048e91600401612500565b6001546001600160a01b0316610c6a5760405162461bcd60e51b815260040161048e90612531565b60015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610c9c90859085906004016124c9565b602060405180830381600087803b158015610cb657600080fd5b505af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106239190611e03565b3390565b61060b8282610b9a565b610d05826105b1565b610d1181610585610cee565b6106238383611549565b610d23610cee565b6001600160a01b0316816001600160a01b031614610d535760405162461bcd60e51b815260040161048e90612611565b61055e82826117f1565b60006108a9836001600160a01b038416611876565b610d7a61075b565b610d965760405162461bcd60e51b815260040161048e90612521565b6006805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610dc9610cee565b604051610dd69190612478565b60405180910390a1565b6002546001600160a01b0316610e085760405162461bcd60e51b815260040161048e906125c1565b600254604051633b6dde1360e01b81526001600160a01b0390911690633b6dde1390610e38908490600401612478565b600060405180830381600087803b158015610e5257600080fd5b505af1158015610e66573d6000803e3d6000fd5b5050505050565b610e7561075b565b15610e925760405162461bcd60e51b815260040161048e90612551565b6006805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610dc9610cee565b610ee060008051602061285483398151915282610bde565b50565b610eeb61075b565b15610f085760405162461bcd60e51b815260040161048e90612551565b6000546001600160a01b0316610f305760405162461bcd60e51b815260040161048e90612601565b6001546001600160a01b0316610f585760405162461bcd60e51b815260040161048e90612531565b6003546001600160a01b0316610f805760405162461bcd60e51b815260040161048e90612591565b6001600160a01b038316610fa65760405162461bcd60e51b815260040161048e90612571565b80821415610fc65760405162461bcd60e51b815260040161048e90612561565b600a546000838152600b6020526040902054610fe291906126c4565b4210156110015760405162461bcd60e51b815260040161048e90612581565b600a546000828152600b602052604090205461101d91906126c4565b42101561103c5760405162461bcd60e51b815260040161048e906125f1565b60008054604051628e9f9b60e11b815282916001600160a01b03169063011d3f369061106c9087906004016124f2565b60006040518083038186803b15801561108457600080fd5b505afa158015611098573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110c09190810190611eca565b60008054604051628e9f9b60e11b8152959750919550938493506001600160a01b03909116915063011d3f36906110fb9088906004016124f2565b60006040518083038186803b15801561111357600080fd5b505afa158015611127573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261114f9190810190611eca565b6000546040516331a9108f60e11b815294965090945033936001600160a01b039091169250636352211e9150611189908a906004016124f2565b60206040518083038186803b1580156111a157600080fd5b505afa1580156111b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d99190611d5e565b6001600160a01b0316146111ff5760405162461bcd60e51b815260040161048e906125e1565b6000546040516331a9108f60e11b815233916001600160a01b031690636352211e9061122f9089906004016124f2565b60206040518083038186803b15801561124757600080fd5b505afa15801561125b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127f9190611d5e565b6001600160a01b0316146112a55760405162461bcd60e51b815260040161048e906125d1565b60068311156112c65760405162461bcd60e51b815260040161048e906125a1565b60068111156112e75760405162461bcd60e51b815260040161048e906125a1565b60006112f384836114aa565b9050600061130033611993565b9050818110156113225760405162461bcd60e51b815260040161048e906125b1565b600061132e3330611a3e565b9050828110156113505760405162461bcd60e51b815260040161048e90612541565b61135b333085611aeb565b6000600360009054906101000a90046001600160a01b03166001600160a01b031663ff0c8e8189888e6040518463ffffffff1660e01b81526004016113a293929190612621565b602060405180830381600087803b1580156113bc57600080fd5b505af11580156113d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f49190611eac565b905060006114028c83611b9f565b600054604051636d779cdb60e11b81529192506001600160a01b03169063daef39b690611437908e908e908690600401612649565b600060405180830381600087803b15801561145157600080fd5b505af1158015611465573d6000803e3d6000fd5b50505050846008600082825461147b91906126c4565b90915550506000908152600b602052604090204290555050505050505050505050565b60006108a98383611c00565b600080600784815481106114ce57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490506000600784815481106114fe57634e487b7160e01b600052603260045260246000fd5b6000918252602082200154915061151582846126c4565b9695505050505050565b600061045d82611c38565b611533826105b1565b61153f81610585610cee565b61062383836117f1565b61155382826108b0565b61055e5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561158c610cee565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006115dc8383611c3c565b6116125750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561045d565b50600061045d565b60006001600160e01b03198216637965db0b60e01b148061045d575061045d82611c54565b6060600061164e8360026126f2565b6116599060026126c4565b67ffffffffffffffff81111561167f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156116a9576020820181803683370190505b509050600360fc1b816000815181106116d257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061170f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006117338460026126f2565b61173e9060016126c4565b90505b60018111156117d2576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061178057634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106117a457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936117cb816127ac565b9050611741565b5083156108a95760405162461bcd60e51b815260040161048e90612511565b6117fb82826108b0565b1561055e5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19169055611832610cee565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6000818152600183016020526040812054801561198957600061189a600183612727565b85549091506000906118ae90600190612727565b905081811461192f5760008660000182815481106118dc57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061190d57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061194e57634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061045d565b600091505061045d565b6001546000906001600160a01b03166119be5760405162461bcd60e51b815260040161048e90612531565b6001546040516370a0823160e01b81526001600160a01b03909116906370a08231906119ee908590600401612478565b60206040518083038186803b158015611a0657600080fd5b505afa158015611a1a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045d9190611eac565b6001546000906001600160a01b0316611a695760405162461bcd60e51b815260040161048e90612531565b600154604051636eb1769f60e11b81526001600160a01b039091169063dd62ed3e90611a9b9086908690600401612486565b60206040518083038186803b158015611ab357600080fd5b505afa158015611ac7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190611eac565b6001546001600160a01b0316611b135760405162461bcd60e51b815260040161048e90612531565b6001546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611b47908690869086906004016124a1565b602060405180830381600087803b158015611b6157600080fd5b505af1158015611b75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b999190611e03565b50505050565b600080546040516321ded23b60e21b81526001600160a01b039091169063877b48ec90611bd290869086906004016124c9565b602060405180830381600087803b158015611bec57600080fd5b505af1158015611ac7573d6000803e3d6000fd5b6000826000018281548110611c2557634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b5490565b60009081526001919091016020526040902054151590565b6001600160e01b031981166301ffc9a760e01b14919050565b6000611c80611c7b8461268e565b612664565b90508083825260208201905082856020860282011115611c9f57600080fd5b60005b85811015611ccb5781611cb58882611d35565b8452506020928301929190910190600101611ca2565b5050509392505050565b803561045d81612804565b805161045d81612804565b600082601f830112611cfc57600080fd5b8151611d0c848260208601611c6d565b949350505050565b805161045d81612818565b803561045d81612821565b803561045d8161282a565b805161045d81612821565b600060208284031215611d5257600080fd5b6000611d0c8484611cd5565b600060208284031215611d7057600080fd5b6000611d0c8484611ce0565b60008060408385031215611d8f57600080fd5b6000611d9b8585611cd5565b9250506020611dac85828601611d1f565b9150509250929050565b600080600060608486031215611dcb57600080fd5b6000611dd78686611cd5565b9350506020611de886828701611d1f565b9250506040611df986828701611d1f565b9150509250925092565b600060208284031215611e1557600080fd5b6000611d0c8484611d14565b600060208284031215611e3357600080fd5b6000611d0c8484611d1f565b60008060408385031215611e5257600080fd5b6000611e5e8585611d1f565b9250506020611dac85828601611cd5565b60008060408385031215611e8257600080fd5b6000611d9b8585611d1f565b600060208284031215611ea057600080fd5b6000611d0c8484611d2a565b600060208284031215611ebe57600080fd5b6000611d0c8484611d35565b60008060008060808587031215611ee057600080fd5b6000611eec8787611d35565b945050602085015167ffffffffffffffff811115611f0957600080fd5b611f1587828801611ceb565b935050604085015167ffffffffffffffff811115611f3257600080fd5b611f3e87828801611ceb565b9250506060611f4f87828801611d35565b91505092959194509250565b611f6481612754565b82525050565b611f648161275f565b611f6481612764565b6000611f87826126b2565b611f9181856126b6565b9350611fa1818560208601612780565b611faa816127fa565b9093019392505050565b6000611fbf826126b2565b611fc981856126bf565b9350611fd9818560208601612780565b9290920192915050565b6000611ff06020836126b6565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74815260200192915050565b60006120296014836126b6565b7314185d5cd8589b194e881b9bdd081c185d5cd95960621b815260200192915050565b6000612059601b836126b6565b7f546f6b656e20636f6e7472616374206973206e6f742072656164790000000000815260200192915050565b6000612092601a836126b6565b7f546f6b656e20616c6c6f77616e6365206e6f7420656e6f756768000000000000815260200192915050565b60006120cb6010836126b6565b6f14185d5cd8589b194e881c185d5cd95960821b815260200192915050565b60006120f7601e836126b6565b7f506172656e74732073686f756c64206e6f74206265207468652073616d650000815260200192915050565b60006121306027836126b6565b7f4e6577206865726f206f776e657220636f756c64206e6f74206265204e756c6c8152664164647265737360c81b602082015260400192915050565b60006121796016836126b6565b75506172656e742041206e6f7420796574206177616b6560501b815260200192915050565b60006121ab601a836126b6565b7f47656e6520636f6e7472616374206973206e6f74207265616479000000000000815260200192915050565b60006121e46023836126b6565b7f506172656e747320626f726e20636f756e74206d757374206c657373207468618152626e203760e81b602082015260400192915050565b60006122296019836126b6565b7f546f6b656e2062616c616e6365206e6f7420656e6f7567687400000000000000815260200192915050565b60006122626019836126b6565b7f524e4720636f6e7472616374206973206e6f7420726561647900000000000000815260200192915050565b600061229b602b836126b6565b7f5468652073656e646572206973206e6f7420746865206f776e6572206f66204e81526a232a103830b932b73a102160a91b602082015260400192915050565b60006122e8602b836126b6565b7f5468652073656e646572206973206e6f7420746865206f776e6572206f66204e81526a465420706172656e74204160a81b602082015260400192915050565b60006123356017836126bf565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260170192915050565b600061236e6016836126b6565b75506172656e742042206e6f7420796574206177616b6560501b815260200192915050565b60006123a0601a836126b6565b7f4865726f20636f6e7472616374206973206e6f74207265616479000000000000815260200192915050565b60006123d96011836126bf565b7001034b99036b4b9b9b4b733903937b6329607d1b815260110192915050565b6000612406602f836126b6565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581526e103937b632b9903337b91039b2b63360891b602082015260400192915050565b600061245582612328565b91506124618285611fb4565b915061246c826123cc565b9150611d0c8284611fb4565b6020810161045d8284611f5b565b604081016124948285611f5b565b6108a96020830184611f5b565b606081016124af8286611f5b565b6124bc6020830185611f5b565b611d0c6040830184611f73565b604081016124d78285611f5b565b6108a96020830184611f73565b6020810161045d8284611f6a565b6020810161045d8284611f73565b602080825281016108a98184611f7c565b6020808252810161045d81611fe3565b6020808252810161045d8161201c565b6020808252810161045d8161204c565b6020808252810161045d81612085565b6020808252810161045d816120be565b6020808252810161045d816120ea565b6020808252810161045d81612123565b6020808252810161045d8161216c565b6020808252810161045d8161219e565b6020808252810161045d816121d7565b6020808252810161045d8161221c565b6020808252810161045d81612255565b6020808252810161045d8161228e565b6020808252810161045d816122db565b6020808252810161045d81612361565b6020808252810161045d81612393565b6020808252810161045d816123f9565b6060810161262f8286611f73565b61263c6020830185611f73565b611d0c6040830184611f5b565b606081016126578286611f73565b6124bc6020830185611f73565b60405181810167ffffffffffffffff81118282101715612686576126866127e4565b604052919050565b600067ffffffffffffffff8211156126a8576126a86127e4565b5060209081020190565b5190565b90815260200190565b919050565b60006126cf82612764565b91506126da83612764565b925082198211156126ed576126ed6127ce565b500190565b60006126fd82612764565b915061270883612764565b9250816000190483118215151615612722576127226127ce565b500290565b600061273282612764565b915061273d83612764565b92508282101561274f5761274f6127ce565b500390565b600061045d82612774565b151590565b90565b6001600160e01b03191690565b6001600160a01b031690565b60005b8381101561279b578181015183820152602001612783565b83811115611b995750506000910152565b60006127b782612764565b9150816127c6576127c66127ce565b506000190190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b601f01601f191690565b61280d81612754565b8114610ee057600080fd5b61280d8161275f565b61280d81612764565b61280d8161276756fe65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a2646970667358221220b4a308917b550d422c9d2a18a04c814c62771794490037752d0835eb7b98a09364736f6c63430008000033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.