ETH Price: $3,814.12 (+5.56%)
Gas: 10 Gwei

Contract

0xEdFE9aC42a511e1C523E067DB8345711419d4f14
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Deposit199208132024-05-21 20:57:352 hrs ago1716325055IN
0xEdFE9aC4...1419d4f14
0 ETH0.0010141611.2117489
Withdraw199206352024-05-21 20:21:352 hrs ago1716322895IN
0xEdFE9aC4...1419d4f14
0 ETH0.0010045213.4827683
Withdraw199177012024-05-21 10:31:2312 hrs ago1716287483IN
0xEdFE9aC4...1419d4f14
0 ETH0.00074859.43841797
Withdraw199155742024-05-21 3:23:4719 hrs ago1716261827IN
0xEdFE9aC4...1419d4f14
0 ETH0.0006361210.22642164
Withdraw199155112024-05-21 3:11:1119 hrs ago1716261071IN
0xEdFE9aC4...1419d4f14
0 ETH0.000493698.60037198
Withdraw199151992024-05-21 2:08:1120 hrs ago1716257291IN
0xEdFE9aC4...1419d4f14
0 ETH0.0007661912.31750883
Deposit199150012024-05-21 1:28:3521 hrs ago1716254915IN
0xEdFE9aC4...1419d4f14
0 ETH0.0019270517.91678998
Deposit199114672024-05-20 13:34:3533 hrs ago1716212075IN
0xEdFE9aC4...1419d4f14
0 ETH0.000714538.23570858
Deposit199076982024-05-20 0:56:2346 hrs ago1716166583IN
0xEdFE9aC4...1419d4f14
0 ETH0.00028962.89446021
Withdraw199033822024-05-19 10:27:112 days ago1716114431IN
0xEdFE9aC4...1419d4f14
0 ETH0.000177642.85586288
Withdraw199003182024-05-19 0:10:232 days ago1716077423IN
0xEdFE9aC4...1419d4f14
0 ETH0.000161962.60383818
Deposit198969092024-05-18 12:44:473 days ago1716036287IN
0xEdFE9aC4...1419d4f14
0 ETH0.000319763.68560672
Deposit198961852024-05-18 10:18:353 days ago1716027515IN
0xEdFE9aC4...1419d4f14
0 ETH0.000245883
Withdraw198947862024-05-18 5:35:233 days ago1716010523IN
0xEdFE9aC4...1419d4f14
0 ETH0.000207853.34152745
Withdraw198926702024-05-17 22:29:354 days ago1715984975IN
0xEdFE9aC4...1419d4f14
0 ETH0.000250623.36397865
Deposit198883802024-05-17 8:03:474 days ago1715933027IN
0xEdFE9aC4...1419d4f14
0 ETH0.001012210.21684996
Withdraw198881412024-05-17 7:15:114 days ago1715930111IN
0xEdFE9aC4...1419d4f14
0 ETH0.00038066.11989193
Deposit198824482024-05-16 12:10:235 days ago1715861423IN
0xEdFE9aC4...1419d4f14
0 ETH0.000581024.95941249
Withdraw198811462024-05-16 7:48:235 days ago1715845703IN
0xEdFE9aC4...1419d4f14
0 ETH0.000378735.08426104
Deposit198761162024-05-15 14:55:596 days ago1715784959IN
0xEdFE9aC4...1419d4f14
0 ETH0.0012311312.3030158
Deposit198747602024-05-15 10:23:356 days ago1715768615IN
0xEdFE9aC4...1419d4f14
0 ETH0.000497165.92140534
Deposit198722182024-05-15 1:53:356 days ago1715738015IN
0xEdFE9aC4...1419d4f14
0 ETH0.000340013.91898194
Withdraw198623232024-05-13 16:34:598 days ago1715618099IN
0xEdFE9aC4...1419d4f14
0 ETH0.0010997319.15774817
Deposit198560072024-05-12 19:24:359 days ago1715541875IN
0xEdFE9aC4...1419d4f14
0 ETH0.000674367.07947371
Withdraw198552932024-05-12 17:01:359 days ago1715533295IN
0xEdFE9aC4...1419d4f14
0 ETH0.000273423.67053493
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FarmV2

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "./Authorizeable.sol";
import "./Farm.sol";

contract FarmV2 is AccessControl{

    using SafeERC20 for ERC20;
    using SafeMath for uint256;
    uint256 public limit = 10000 ether;
    uint256 public total;
    
    Farm private _farmv1;

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


    struct Staker {
        uint256 amount;
        uint256 stones;
        uint256 timestamp;
        bool oldStaker;
    }

    mapping(address => Staker) public stakers;
    ERC20 private _token;

    constructor() public {
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    function setTokenAddress(ERC20 token_, address farmv1_) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _token = token_;
        _farmv1 = Farm(farmv1_);
    }

    function giveAway(address _address, uint256 stones) external onlyRole(DEFAULT_ADMIN_ROLE) {
        stakers[_address].stones = stones;
    }

    function farmed(address sender) public view returns (uint256) {
        // Returns how many ERN this account has farmed
        return (stakers[sender].amount);
    }

    function farmedStart(address sender) public view returns (uint) {
        // Returns when this account started farming
        return (stakers[sender].timestamp);
    }
    

    function payment(address buyer, uint256 amount) public onlyRole(COLLECTION_ROLE) returns (bool) {

        consolidate(buyer);

        require(rewardedStones(buyer) >= amount, "Insufficient stones!");

        stakers[buyer].stones = stakers[buyer].stones.sub(amount);
        stakers[buyer].timestamp = block.timestamp;

        return true;
    }

    function rewardedStones(address staker) public view returns (uint256) {
        if (stakers[staker].amount < 1000) {
            return stakers[staker].stones;
        }

        // solium-disable-next-line security/no-block-members
        uint256 _seconds = block.timestamp.sub(stakers[staker].timestamp).div(1 seconds);

        return stakers[staker].stones.add(stakers[staker].amount.div(1e18).mul(_seconds).mul(11574074074074000));
    }

    function consolidate(address staker) internal {
        uint256 stones = rewardedStones(staker);
        stakers[staker].stones = stones;
        
    }

    function deposit(uint256 amount ) public {
        
        address account = msg.sender;
        uint256 oldAmount = _farmv1.rewardedStones(account);
     
        require(_token.balanceOf(account) > 0, "your balance is insufficient");
        require(stakers[account].amount.add(amount) <= limit, "Limit 10000 ERN");

        _token.safeTransferFrom(account, address(this), amount);
        consolidate(account);
        total = total.add(amount);
        stakers[account].amount = stakers[account].amount.add(amount);
        
        if(stakers[account].oldStaker != true && oldAmount > 0) {
             stakers[account].stones = stakers[account].stones.add(oldAmount);
             stakers[account].oldStaker = true;
        }
        // solium-disable-next-line security/no-block-members
        stakers[account].timestamp = block.timestamp;
    }

    function withdraw(uint256 amount) public {
        address account = msg.sender;
        //require(account == msg.sender,"you are not authorized on this account!");
        require(stakers[account].amount >= amount, "Insufficient amount!");
        require(_token.transfer(account, amount), "Transfer error!");

        consolidate(account);
        stakers[account].amount = stakers[account].amount.sub(amount);
        total = total.sub(amount);

        // solium-disable-next-line security/no-block-members
        stakers[account].timestamp = block.timestamp;
    }

    
    function sell(uint256 stones, address from, address to) public {

        require(hasRole(COLLECTION_ROLE, msg.sender), "you are not authorized on this account!");

        consolidate(from);

        require(rewardedStones(from) >= stones, "Insufficient stones!");

        stakers[from].stones = stakers[from].stones.sub(stones);
        stakers[from].timestamp = block.timestamp;

        stakers[to].stones = stakers[to].stones.add(stones);
        stakers[to].timestamp = block.timestamp;
    }
}

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

import "@openzeppelin/contracts/access/AccessControl.sol";

contract Authorizeable is AccessControl {
    bytes32 public constant MODERATOR_ROLE = keccak256("MODERATOR_ROLE");

    constructor (){
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MODERATOR_ROLE, msg.sender);
    }
}

File 3 of 15 : Farm.sol
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./Authorizeable.sol";

contract Farm is Ownable{
    using SafeERC20 for ERC20;
    using SafeMath for uint256;
    uint256 public limit = 10000 ether;
    uint256 public total;



    struct Staker {
        uint256 amount;
        uint256 stones;
        uint256 timestamp;
    }

    mapping(address => Staker) public stakers;
    ERC20 private _token;

    // constructor() {}

    function setTokenAddress(ERC20 token_) external onlyOwner {
        _token = token_;
    }

    function giveAway(address _address, uint256 stones) external onlyOwner {
        stakers[_address].stones = stones;
    }

    function farmed(address sender) public view returns (uint256) {
        // Returns how many ERN this account has farmed
        return (stakers[sender].amount);
    }

    function farmedStart(address sender) public view returns (uint) {
        // Returns when this account started farming
        return (stakers[sender].timestamp);
    }

    function payment(address buyer, uint256 amount) external returns (bool) {
        consolidate(buyer);
        require(rewardedStones(buyer) >= amount, "Insufficient stones!");
        stakers[buyer].stones = stakers[buyer].stones.sub(amount);

        return true;
    }

    function rewardedStones(address staker) public view returns (uint256) {
        if (stakers[staker].amount < 1000) {
            return stakers[staker].stones;
        }

        // solium-disable-next-line security/no-block-members
        uint256 _seconds = block.timestamp.sub(stakers[staker].timestamp).div(1 seconds);
        return stakers[staker].stones.add(stakers[staker].amount.div(1e18).mul(_seconds).mul(11574074074074000));
    }

    function consolidate(address staker) internal {
        uint256 stones = rewardedStones(staker);
        stakers[staker].stones = stones;
       
    }

    function deposit(uint256 amount) public {
        address sender = msg.sender;
        require(stakers[sender].amount.add(amount) <= limit, "Limit 10000 ERN");

        _token.safeTransferFrom(sender, address(this), amount);
        consolidate(sender);
        total = total.add(amount);
        stakers[sender].amount = stakers[sender].amount.add(amount);

        // solium-disable-next-line security/no-block-members
        stakers[sender].timestamp = block.timestamp;
    }

    function withdraw(uint256 amount) public {
        address sender = msg.sender;

        require(stakers[sender].amount >= amount, "Insufficient amount!");
        require(_token.transfer(address(sender), amount), "Transfer error!");

        consolidate(sender);
        stakers[sender].amount = stakers[sender].amount.sub(amount);
        total = total.sub(amount);

        // solium-disable-next-line security/no-block-members
        stakers[sender].timestamp = block.timestamp;
    }
}

File 5 of 15 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

/**
 * @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 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 {_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 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]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _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]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    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 {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = 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 6 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 7 of 15 : ERC20.sol
// SPDX-License-Identifier: MIT

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 guidelines: functions revert instead
 * of 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 defaut 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");
        _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");
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(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:
     *
     * - `to` 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);
    }

    /**
     * @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");
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;

        emit Transfer(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 to 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 { }
}

File 8 of 15 : 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 9 of 15 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

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 10 of 15 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 15 : 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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 13 of 15 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 14 of 15 : 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 15 of 15 : 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 16 of 15 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

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

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "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":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"},{"inputs":[],"name":"COLLECTION_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"farmed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"farmedStart","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":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"stones","type":"uint256"}],"name":"giveAway","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":"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":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"payment","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"address","name":"staker","type":"address"}],"name":"rewardedStones","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"stones","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"sell","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"token_","type":"address"},{"internalType":"address","name":"farmv1_","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakers","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"stones","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bool","name":"oldStaker","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"total","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405269021e19e0c9bab24000006001553480156200001f57600080fd5b506200002d60003362000033565b620000fa565b6200003f828262000043565b5050565b6200004f8282620000cd565b6200003f576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905562000089620000f6565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3390565b6116e2806200010a6000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80636f08e177116100ad578063a4d66daf11610071578063a4d66daf14610262578063b6b55f251461026a578063c7afe9f21461027d578063ca80014414610290578063d547741f146102a35761012c565b80636f08e177146101fe57806375c7e973146102115780639168ae721461022457806391d1485414610247578063a217fddf1461025a5761012c565b80632f2ff15d116100f45780632f2ff15d1461019f57806336568abe146101b257806338066f3a146101c55780634216f972146101d857806367a09c23146101eb5761012c565b806301ffc9a714610131578063145f8dd41461015a578063248a9ca31461016f5780632ddbd13a146101825780632e1a7d4d1461018a575b600080fd5b61014461013f366004611162565b6102b6565b60405161015191906112f2565b60405180910390f35b6101626102e3565b60405161015191906112fd565b61016261017d36600461111b565b610307565b61016261031c565b61019d61019836600461111b565b610322565b005b61019d6101ad366004611133565b610471565b61019d6101c0366004611133565b61049a565b6101626101d33660046110b4565b6104e0565b6101626101e63660046110b4565b6104fe565b6101446101f93660046110d0565b610519565b61019d61020c3660046111cf565b6105d0565b61016261021f3660046110b4565b6106d5565b6102376102323660046110b4565b6107bf565b60405161015194939291906115b0565b610144610255366004611133565b6107e9565b610162610812565b610162610817565b61019d61027836600461111b565b61081d565b61019d61028b36600461118a565b610a8e565b61019d61029e3660046110d0565b610acb565b61019d6102b1366004611133565b610af9565b60006001600160e01b03198216637965db0b60e01b14806102db57506102db82610b18565b90505b919050565b7f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c81565b60009081526020819052604090206001015490565b60025481565b3360008181526004602052604090205482111561035a5760405162461bcd60e51b815260040161035190611582565b60405180910390fd5b60055460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061038c90849086906004016112d9565b602060405180830381600087803b1580156103a657600080fd5b505af11580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906110fb565b6103fa5760405162461bcd60e51b81526004016103519061136e565b61040381610b31565b6001600160a01b0381166000908152600460205260409020546104269083610b5f565b6001600160a01b03821660009081526004602052604090205560025461044c9083610b5f565b60029081556001600160a01b0390911660009081526004602052604090204291015550565b61047a82610307565b61048b81610486610b6b565b610b6f565b6104958383610bd3565b505050565b6104a2610b6b565b6001600160a01b0316816001600160a01b0316146104d25760405162461bcd60e51b815260040161035190611533565b6104dc8282610c58565b5050565b6001600160a01b031660009081526004602052604090206002015490565b6001600160a01b031660009081526004602052604090205490565b60007f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c61054881610486610b6b565b61055184610b31565b8261055b856106d5565b10156105795760405162461bcd60e51b81526004016103519061143d565b6001600160a01b03841660009081526004602052604090206001015461059f9084610b5f565b6001600160a01b03851660009081526004602052604090206001808201929092554260029091015591505092915050565b6105fa7f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c336107e9565b6106165760405162461bcd60e51b8152600401610351906114ec565b61061f82610b31565b82610629836106d5565b10156106475760405162461bcd60e51b81526004016103519061143d565b6001600160a01b03821660009081526004602052604090206001015461066d9084610b5f565b6001600160a01b038084166000908152600460205260408082206001808201959095554260029091015591841681522001546106a99084610cdb565b6001600160a01b0390911660009081526004602052604090206001810191909155426002909101555050565b6001600160a01b0381166000908152600460205260408120546103e8111561071957506001600160a01b0381166000908152600460205260409020600101546102de565b6001600160a01b03821660009081526004602052604081206002015461074d90600190610747904290610b5f565b90610ce7565b6001600160a01b0384166000908152600460205260409020549091506107b8906107969066291e8f1dca0b90906107909085908290670de0b6b3a7640000610ce7565b90610cf3565b6001600160a01b03851660009081526004602052604090206001015490610cdb565b9392505050565b60046020526000908152604090208054600182015460028301546003909301549192909160ff1684565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b60015481565b6003546040516375c7e97360e01b815233916000916001600160a01b03909116906375c7e973906108529085906004016112a1565b60206040518083038186803b15801561086a57600080fd5b505afa15801561087e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a291906111b7565b6005546040516370a0823160e01b81529192506000916001600160a01b03909116906370a08231906108d89086906004016112a1565b60206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092891906111b7565b116109455760405162461bcd60e51b815260040161035190611397565b6001546001600160a01b03831660009081526004602052604090205461096b9085610cdb565b11156109895760405162461bcd60e51b815260040161035190611414565b6005546109a1906001600160a01b0316833086610cff565b6109aa82610b31565b6002546109b79084610cdb565b6002556001600160a01b0382166000908152600460205260409020546109dd9084610cdb565b6001600160a01b03831660009081526004602052604090209081556003015460ff161515600114801590610a115750600081115b15610a6c576001600160a01b038216600090815260046020526040902060010154610a3c9082610cdb565b6001600160a01b0383166000908152600460205260409020600180820192909255600301805460ff191690911790555b506001600160a01b031660009081526004602052604090204260029091015550565b6000610a9c81610486610b6b565b50600580546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6000610ad981610486610b6b565b506001600160a01b03909116600090815260046020526040902060010155565b610b0282610307565b610b0e81610486610b6b565b6104958383610c58565b6001600160e01b031981166301ffc9a760e01b14919050565b6000610b3c826106d5565b6001600160a01b0390921660009081526004602052604090206001019190915550565b60006107b88284611624565b3390565b610b7982826107e9565b6104dc57610b91816001600160a01b03166014610d5d565b610b9c836020610d5d565b604051602001610bad92919061122c565b60408051601f198184030181529082905262461bcd60e51b825261035191600401611306565b610bdd82826107e9565b6104dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c14610b6b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610c6282826107e9565b156104dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055610c97610b6b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006107b882846115cd565b60006107b882846115e5565b60006107b88284611605565b610d57846323b872dd60e01b858585604051602401610d20939291906112b5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f0f565b50505050565b60606000610d6c836002611605565b610d779060026115cd565b67ffffffffffffffff811115610d9d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610dc7576020820181803683370190505b509050600360fc1b81600081518110610df057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e2d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610e51846002611605565b610e5c9060016115cd565b90505b6001811115610ef0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610e9e57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610ec257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610ee981611667565b9050610e5f565b5083156107b85760405162461bcd60e51b815260040161035190611339565b6000610f64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f9e9092919063ffffffff16565b8051909150156104955780806020019051810190610f8291906110fb565b6104955760405162461bcd60e51b8152600401610351906114a2565b6060610fad8484600085610fb5565b949350505050565b606082471015610fd75760405162461bcd60e51b8152600401610351906113ce565b610fe085611075565b610ffc5760405162461bcd60e51b81526004016103519061146b565b600080866001600160a01b031685876040516110189190611210565b60006040518083038185875af1925050503d8060008114611055576040519150601f19603f3d011682016040523d82523d6000602084013e61105a565b606091505b509150915061106a82828661107b565b979650505050505050565b3b151590565b6060831561108a5750816107b8565b82511561109a5782518084602001fd5b8160405162461bcd60e51b81526004016103519190611306565b6000602082840312156110c5578081fd5b81356107b881611694565b600080604083850312156110e2578081fd5b82356110ed81611694565b946020939093013593505050565b60006020828403121561110c578081fd5b815180151581146107b8578182fd5b60006020828403121561112c578081fd5b5035919050565b60008060408385031215611145578182fd5b82359150602083013561115781611694565b809150509250929050565b600060208284031215611173578081fd5b81356001600160e01b0319811681146107b8578182fd5b6000806040838503121561119c578182fd5b82356111a781611694565b9150602083013561115781611694565b6000602082840312156111c8578081fd5b5051919050565b6000806000606084860312156111e3578081fd5b8335925060208401356111f581611694565b9150604084013561120581611694565b809150509250925092565b6000825161122281846020870161163b565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161126481601785016020880161163b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161129581602884016020880161163b565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b600060208252825180602084015261132581604085016020870161163b565b601f01601f19169190910160400192915050565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b6020808252600f908201526e5472616e73666572206572726f722160881b604082015260600190565b6020808252601c908201527f796f75722062616c616e636520697320696e73756666696369656e7400000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252600f908201526e2634b6b4ba1018981818181022a92760891b604082015260600190565b602080825260149082015273496e73756666696369656e742073746f6e65732160601b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526027908201527f796f7520617265206e6f7420617574686f72697a6564206f6e2074686973206160408201526663636f756e742160c81b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b602080825260149082015273496e73756666696369656e7420616d6f756e742160601b604082015260600190565b938452602084019290925260408301521515606082015260800190565b600082198211156115e0576115e061167e565b500190565b60008261160057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561161f5761161f61167e565b500290565b6000828210156116365761163661167e565b500390565b60005b8381101561165657818101518382015260200161163e565b83811115610d575750506000910152565b6000816116765761167661167e565b506000190190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146116a957600080fd5b5056fea26469706673582212208d1ea2deeb85db5694cb01940cee59b2f26f057d033b1ca23580e568c859abf564736f6c63430008000033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80636f08e177116100ad578063a4d66daf11610071578063a4d66daf14610262578063b6b55f251461026a578063c7afe9f21461027d578063ca80014414610290578063d547741f146102a35761012c565b80636f08e177146101fe57806375c7e973146102115780639168ae721461022457806391d1485414610247578063a217fddf1461025a5761012c565b80632f2ff15d116100f45780632f2ff15d1461019f57806336568abe146101b257806338066f3a146101c55780634216f972146101d857806367a09c23146101eb5761012c565b806301ffc9a714610131578063145f8dd41461015a578063248a9ca31461016f5780632ddbd13a146101825780632e1a7d4d1461018a575b600080fd5b61014461013f366004611162565b6102b6565b60405161015191906112f2565b60405180910390f35b6101626102e3565b60405161015191906112fd565b61016261017d36600461111b565b610307565b61016261031c565b61019d61019836600461111b565b610322565b005b61019d6101ad366004611133565b610471565b61019d6101c0366004611133565b61049a565b6101626101d33660046110b4565b6104e0565b6101626101e63660046110b4565b6104fe565b6101446101f93660046110d0565b610519565b61019d61020c3660046111cf565b6105d0565b61016261021f3660046110b4565b6106d5565b6102376102323660046110b4565b6107bf565b60405161015194939291906115b0565b610144610255366004611133565b6107e9565b610162610812565b610162610817565b61019d61027836600461111b565b61081d565b61019d61028b36600461118a565b610a8e565b61019d61029e3660046110d0565b610acb565b61019d6102b1366004611133565b610af9565b60006001600160e01b03198216637965db0b60e01b14806102db57506102db82610b18565b90505b919050565b7f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c81565b60009081526020819052604090206001015490565b60025481565b3360008181526004602052604090205482111561035a5760405162461bcd60e51b815260040161035190611582565b60405180910390fd5b60055460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061038c90849086906004016112d9565b602060405180830381600087803b1580156103a657600080fd5b505af11580156103ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103de91906110fb565b6103fa5760405162461bcd60e51b81526004016103519061136e565b61040381610b31565b6001600160a01b0381166000908152600460205260409020546104269083610b5f565b6001600160a01b03821660009081526004602052604090205560025461044c9083610b5f565b60029081556001600160a01b0390911660009081526004602052604090204291015550565b61047a82610307565b61048b81610486610b6b565b610b6f565b6104958383610bd3565b505050565b6104a2610b6b565b6001600160a01b0316816001600160a01b0316146104d25760405162461bcd60e51b815260040161035190611533565b6104dc8282610c58565b5050565b6001600160a01b031660009081526004602052604090206002015490565b6001600160a01b031660009081526004602052604090205490565b60007f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c61054881610486610b6b565b61055184610b31565b8261055b856106d5565b10156105795760405162461bcd60e51b81526004016103519061143d565b6001600160a01b03841660009081526004602052604090206001015461059f9084610b5f565b6001600160a01b03851660009081526004602052604090206001808201929092554260029091015591505092915050565b6105fa7f40a5c770eee7730548a6335e1f372e76bf4759f6fda1a932bd9cfc33106f0b4c336107e9565b6106165760405162461bcd60e51b8152600401610351906114ec565b61061f82610b31565b82610629836106d5565b10156106475760405162461bcd60e51b81526004016103519061143d565b6001600160a01b03821660009081526004602052604090206001015461066d9084610b5f565b6001600160a01b038084166000908152600460205260408082206001808201959095554260029091015591841681522001546106a99084610cdb565b6001600160a01b0390911660009081526004602052604090206001810191909155426002909101555050565b6001600160a01b0381166000908152600460205260408120546103e8111561071957506001600160a01b0381166000908152600460205260409020600101546102de565b6001600160a01b03821660009081526004602052604081206002015461074d90600190610747904290610b5f565b90610ce7565b6001600160a01b0384166000908152600460205260409020549091506107b8906107969066291e8f1dca0b90906107909085908290670de0b6b3a7640000610ce7565b90610cf3565b6001600160a01b03851660009081526004602052604090206001015490610cdb565b9392505050565b60046020526000908152604090208054600182015460028301546003909301549192909160ff1684565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b60015481565b6003546040516375c7e97360e01b815233916000916001600160a01b03909116906375c7e973906108529085906004016112a1565b60206040518083038186803b15801561086a57600080fd5b505afa15801561087e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a291906111b7565b6005546040516370a0823160e01b81529192506000916001600160a01b03909116906370a08231906108d89086906004016112a1565b60206040518083038186803b1580156108f057600080fd5b505afa158015610904573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092891906111b7565b116109455760405162461bcd60e51b815260040161035190611397565b6001546001600160a01b03831660009081526004602052604090205461096b9085610cdb565b11156109895760405162461bcd60e51b815260040161035190611414565b6005546109a1906001600160a01b0316833086610cff565b6109aa82610b31565b6002546109b79084610cdb565b6002556001600160a01b0382166000908152600460205260409020546109dd9084610cdb565b6001600160a01b03831660009081526004602052604090209081556003015460ff161515600114801590610a115750600081115b15610a6c576001600160a01b038216600090815260046020526040902060010154610a3c9082610cdb565b6001600160a01b0383166000908152600460205260409020600180820192909255600301805460ff191690911790555b506001600160a01b031660009081526004602052604090204260029091015550565b6000610a9c81610486610b6b565b50600580546001600160a01b039384166001600160a01b03199182161790915560038054929093169116179055565b6000610ad981610486610b6b565b506001600160a01b03909116600090815260046020526040902060010155565b610b0282610307565b610b0e81610486610b6b565b6104958383610c58565b6001600160e01b031981166301ffc9a760e01b14919050565b6000610b3c826106d5565b6001600160a01b0390921660009081526004602052604090206001019190915550565b60006107b88284611624565b3390565b610b7982826107e9565b6104dc57610b91816001600160a01b03166014610d5d565b610b9c836020610d5d565b604051602001610bad92919061122c565b60408051601f198184030181529082905262461bcd60e51b825261035191600401611306565b610bdd82826107e9565b6104dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c14610b6b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610c6282826107e9565b156104dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055610c97610b6b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60006107b882846115cd565b60006107b882846115e5565b60006107b88284611605565b610d57846323b872dd60e01b858585604051602401610d20939291906112b5565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610f0f565b50505050565b60606000610d6c836002611605565b610d779060026115cd565b67ffffffffffffffff811115610d9d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610dc7576020820181803683370190505b509050600360fc1b81600081518110610df057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e2d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000610e51846002611605565b610e5c9060016115cd565b90505b6001811115610ef0576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610e9e57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110610ec257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93610ee981611667565b9050610e5f565b5083156107b85760405162461bcd60e51b815260040161035190611339565b6000610f64826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f9e9092919063ffffffff16565b8051909150156104955780806020019051810190610f8291906110fb565b6104955760405162461bcd60e51b8152600401610351906114a2565b6060610fad8484600085610fb5565b949350505050565b606082471015610fd75760405162461bcd60e51b8152600401610351906113ce565b610fe085611075565b610ffc5760405162461bcd60e51b81526004016103519061146b565b600080866001600160a01b031685876040516110189190611210565b60006040518083038185875af1925050503d8060008114611055576040519150601f19603f3d011682016040523d82523d6000602084013e61105a565b606091505b509150915061106a82828661107b565b979650505050505050565b3b151590565b6060831561108a5750816107b8565b82511561109a5782518084602001fd5b8160405162461bcd60e51b81526004016103519190611306565b6000602082840312156110c5578081fd5b81356107b881611694565b600080604083850312156110e2578081fd5b82356110ed81611694565b946020939093013593505050565b60006020828403121561110c578081fd5b815180151581146107b8578182fd5b60006020828403121561112c578081fd5b5035919050565b60008060408385031215611145578182fd5b82359150602083013561115781611694565b809150509250929050565b600060208284031215611173578081fd5b81356001600160e01b0319811681146107b8578182fd5b6000806040838503121561119c578182fd5b82356111a781611694565b9150602083013561115781611694565b6000602082840312156111c8578081fd5b5051919050565b6000806000606084860312156111e3578081fd5b8335925060208401356111f581611694565b9150604084013561120581611694565b809150509250925092565b6000825161122281846020870161163b565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008252835161126481601785016020880161163b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161129581602884016020880161163b565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b600060208252825180602084015261132581604085016020870161163b565b601f01601f19169190910160400192915050565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b6020808252600f908201526e5472616e73666572206572726f722160881b604082015260600190565b6020808252601c908201527f796f75722062616c616e636520697320696e73756666696369656e7400000000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252600f908201526e2634b6b4ba1018981818181022a92760891b604082015260600190565b602080825260149082015273496e73756666696369656e742073746f6e65732160601b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526027908201527f796f7520617265206e6f7420617574686f72697a6564206f6e2074686973206160408201526663636f756e742160c81b606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201526e103937b632b9903337b91039b2b63360891b606082015260800190565b602080825260149082015273496e73756666696369656e7420616d6f756e742160601b604082015260600190565b938452602084019290925260408301521515606082015260800190565b600082198211156115e0576115e061167e565b500190565b60008261160057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561161f5761161f61167e565b500290565b6000828210156116365761163661167e565b500390565b60005b8381101561165657818101518382015260200161163e565b83811115610d575750506000910152565b6000816116765761167661167e565b506000190190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146116a957600080fd5b5056fea26469706673582212208d1ea2deeb85db5694cb01940cee59b2f26f057d033b1ca23580e568c859abf564736f6c63430008000033

Block Transaction Difficulty 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
Loading...
Loading
[ Download: CSV Export  ]

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