ETH Price: $1,920.66 (-1.54%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Emergency Withdr...192020962024-02-11 3:16:47743 days ago1707621407IN
0xB8a5465B...D7b068D1a
0 ETH0.0006610720.18172415
Set Weight Facto...192020952024-02-11 3:16:35743 days ago1707621395IN
0xB8a5465B...D7b068D1a
0 ETH0.0005427719.81274098
Set Admin Access192020012024-02-11 2:57:47743 days ago1707620267IN
0xB8a5465B...D7b068D1a
0 ETH0.0010052821.49477237
Withdraw188933322023-12-29 19:33:47786 days ago1703878427IN
0xB8a5465B...D7b068D1a
0 ETH0.004630821.26847759
Harvest187636712023-12-11 14:50:47804 days ago1702306247IN
0xB8a5465B...D7b068D1a
0 ETH0.0039160541.93546189
Withdraw187248122023-12-06 4:09:47810 days ago1701835787IN
0xB8a5465B...D7b068D1a
0 ETH0.0158542748.3460828
Withdraw187247622023-12-06 3:59:47810 days ago1701835187IN
0xB8a5465B...D7b068D1a
0 ETH0.0132604357.91089226
Harvest180099352023-08-28 1:43:11910 days ago1693186991IN
0xB8a5465B...D7b068D1a
0 ETH0.001132511.17677803
Withdraw180083922023-08-27 20:30:47910 days ago1693168247IN
0xB8a5465B...D7b068D1a
0 ETH0.002440711.51819606
Harvest180081522023-08-27 19:42:23910 days ago1693165343IN
0xB8a5465B...D7b068D1a
0 ETH0.0011062611.43436097
Harvest179835152023-08-24 8:57:11914 days ago1692867431IN
0xB8a5465B...D7b068D1a
0 ETH0.0016300516.84828593
Harvest179205782023-08-15 13:36:23922 days ago1692106583IN
0xB8a5465B...D7b068D1a
0 ETH0.0063539229.28199269
Harvest179142172023-08-14 16:15:35923 days ago1692029735IN
0xB8a5465B...D7b068D1a
0 ETH0.0042299538.28604101
Withdraw179108522023-08-14 4:59:23924 days ago1691989163IN
0xB8a5465B...D7b068D1a
0 ETH0.0031865111.28114398
Harvest179108492023-08-14 4:58:47924 days ago1691989127IN
0xB8a5465B...D7b068D1a
0 ETH0.0010223810.56844002
Harvest179034582023-08-13 4:09:35925 days ago1691899775IN
0xB8a5465B...D7b068D1a
0 ETH0.0012684111.84143133
Harvest178981802023-08-12 10:26:11926 days ago1691835971IN
0xB8a5465B...D7b068D1a
0 ETH0.0012389612.08287973
Harvest178916082023-08-11 12:21:11927 days ago1691756471IN
0xB8a5465B...D7b068D1a
0 ETH0.0017136218.59181418
Withdraw178908262023-08-11 9:43:23927 days ago1691747003IN
0xB8a5465B...D7b068D1a
0 ETH0.0033916716.90504839
Harvest178908232023-08-11 9:42:47927 days ago1691746967IN
0xB8a5465B...D7b068D1a
0 ETH0.0015316916.61795702
Withdraw178878692023-08-10 23:49:23927 days ago1691711363IN
0xB8a5465B...D7b068D1a
0 ETH0.0085966515.94010569
Harvest178836152023-08-10 9:32:47928 days ago1691659967IN
0xB8a5465B...D7b068D1a
0 ETH0.001540716.71568008
Harvest178831782023-08-10 8:04:35928 days ago1691654675IN
0xB8a5465B...D7b068D1a
0 ETH0.0018672717.63158358
Withdraw178827632023-08-10 6:39:59928 days ago1691649599IN
0xB8a5465B...D7b068D1a
0 ETH0.0044818513.66616255
Harvest178805122023-08-09 23:07:11928 days ago1691622431IN
0xB8a5465B...D7b068D1a
0 ETH0.0013610614.0680521
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer192020962024-02-11 3:16:47743 days ago1707621407
0xB8a5465B...D7b068D1a
6.37674423 ETH
Transfer187636712023-12-11 14:50:47804 days ago1702306247
0xB8a5465B...D7b068D1a
0.07902556 ETH
Transfer187248122023-12-06 4:09:47810 days ago1701835787
0xB8a5465B...D7b068D1a
0.05475006 ETH
Transfer187247622023-12-06 3:59:47810 days ago1701835187
0xB8a5465B...D7b068D1a
0.04582698 ETH
Transfer180099352023-08-28 1:43:11910 days ago1693186991
0xB8a5465B...D7b068D1a
0.03302576 ETH
Transfer180083922023-08-27 20:30:47910 days ago1693168247
0xB8a5465B...D7b068D1a
0.04575536 ETH
Transfer180081522023-08-27 19:42:23910 days ago1693165343
0xB8a5465B...D7b068D1a
0.02929568 ETH
Transfer179835152023-08-24 8:57:11914 days ago1692867431
0xB8a5465B...D7b068D1a
0.02528314 ETH
Transfer179205782023-08-15 13:36:23922 days ago1692106583
0xB8a5465B...D7b068D1a
0.03472628 ETH
Transfer179142172023-08-14 16:15:35923 days ago1692029735
0xB8a5465B...D7b068D1a
0.0758418 ETH
Transfer179108492023-08-14 4:58:47924 days ago1691989127
0xB8a5465B...D7b068D1a
0.07396028 ETH
Transfer179034582023-08-13 4:09:35925 days ago1691899775
0xB8a5465B...D7b068D1a
0.00798312 ETH
Transfer178981802023-08-12 10:26:11926 days ago1691835971
0xB8a5465B...D7b068D1a
0.03553441 ETH
Transfer178916082023-08-11 12:21:11927 days ago1691756471
0xB8a5465B...D7b068D1a
0.01680695 ETH
Transfer178908232023-08-11 9:42:47927 days ago1691746967
0xB8a5465B...D7b068D1a
0.01759903 ETH
Transfer178878692023-08-10 23:49:23927 days ago1691711363
0xB8a5465B...D7b068D1a
0.00058779 ETH
Transfer178836152023-08-10 9:32:47928 days ago1691659967
0xB8a5465B...D7b068D1a
0.01212543 ETH
Transfer178831782023-08-10 8:04:35928 days ago1691654675
0xB8a5465B...D7b068D1a
0.10923052 ETH
Transfer178827632023-08-10 6:39:59928 days ago1691649599
0xB8a5465B...D7b068D1a
0.02293903 ETH
Transfer178805122023-08-09 23:07:11928 days ago1691622431
0xB8a5465B...D7b068D1a
0.02448988 ETH
Transfer178798452023-08-09 20:52:47928 days ago1691614367
0xB8a5465B...D7b068D1a
0.01264217 ETH
Transfer178794032023-08-09 19:23:23928 days ago1691609003
0xB8a5465B...D7b068D1a
0.10503225 ETH
Transfer178788222023-08-09 17:26:35928 days ago1691601995
0xB8a5465B...D7b068D1a
0.01155689 ETH
Transfer178785632023-08-09 16:33:23928 days ago1691598803
0xB8a5465B...D7b068D1a
0.09396908 ETH
Transfer178784912023-08-09 16:18:47928 days ago1691597927
0xB8a5465B...D7b068D1a
0.02930089 ETH
View All Internal Transactions
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
GenArtLoyaltyVault

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../interface/IGenArtInterfaceV4.sol";
import "../interface/IGenArt.sol";
import "../access/GenArtAccess.sol";

/**
 * @title GenArtValut
 * @notice It handles the distribution of ETH loyalties
 * @notice forked from https://etherscan.io/address/0xbcd7254a1d759efa08ec7c3291b2e85c5dcc12ce#code
 */
contract GenArtLoyaltyVault is ReentrancyGuard, GenArtAccess {
    using SafeERC20 for IERC20;
    struct UserInfo {
        uint256 tokens; // shares of token staked
        uint256[] membershipIds;
        uint256 userRewardPerTokenPaid; // user reward per token paid
        uint256 rewards; // pending rewards
    }

    // Precision factor for calculating rewards and exchange rate
    uint256 public constant PRECISION_FACTOR = 10**18;

    // Reward rate (block)
    uint256 public currentRewardPerBlock;

    // Last update block for rewards
    uint256 public lastUpdateBlock;

    // Current end block for the current reward period
    uint256 public periodEndBlock;

    // Reward per token stored
    uint256 public rewardPerTokenStored;

    // Total existing shares
    uint256 public totalTokenShares;
    uint256 public totalMembershipShares;

    uint256 public minimumTokenAmount = 4_000;
    uint256 public minimumMembershipAmount = 1;

    mapping(address => UserInfo) public userInfo;

    IERC20 public immutable genartToken;
    address public immutable genartMembership;

    mapping(address => uint256) public lockedWithdraw;

    uint256 public weightFactorTokens = 2;
    uint256 public weightFactorMemberships = 1;

    mapping(uint256 => address) public membershipOwners;

    bool public emergencyWithdrawDisabled;

    event Deposit(address indexed user, uint256 amount);
    event Harvest(address indexed user, uint256 harvestedAmount);
    event NewRewardPeriod(
        uint256 numberBlocks,
        uint256 rewardPerBlock,
        uint256 reward
    );
    event Withdraw(address indexed user, uint256 amount, uint256[] memberships);

    /**
     * @notice Constructor
     * @param _genartToken address of the token staked (GRNART)
     */
    constructor(address _genartMembership, address _genartToken) {
        genartToken = IERC20(_genartToken);
        genartMembership = _genartMembership;
    }

    modifier requireNotLocked(address user) {
        require(block.timestamp > lockedWithdraw[user], "assets locked");
        _;
    }

    /**
     * @notice Deposit staked tokens (and collect reward tokens if requested)
     * @param amount amount to deposit (in GENART)
     */
    function deposit(uint256[] memory membershipIds, uint256 amount)
        external
        nonReentrant
    {
        address sender = _msgSender();
        _checkDeposit(sender, membershipIds, amount);
        _deposit(sender, membershipIds, amount);
    }

    function harvest() external nonReentrant {
        address sender = _msgSender();
        uint256 pendingRewards = _harvest(sender);
        require(pendingRewards > 0, "zero rewards to harvest");
        // transfer reward token to sender
        payable(sender).transfer(pendingRewards);
    }

    /**
     * @notice Withdraw all staked tokens (and collect reward tokens if requested)
     */
    function withdraw() external requireNotLocked(msg.sender) nonReentrant {
        address sender = _msgSender();
        require(userInfo[sender].tokens > 0, "zero shares");
        _withdraw(sender);
    }

    /**
     * @notice Withdraw staked tokens and memberships
     */
    function withdrawPartial(
        uint256 amount,
        uint256[] memory membershipsToWithdraw
    ) external requireNotLocked(msg.sender) nonReentrant {
        _withdrawPartial(msg.sender, amount, membershipsToWithdraw);
    }

    /**
     * @notice Update the reward per block (in rewardToken)
     * @dev Only callable by owner. Owner is meant to be another smart contract.
     */
    function updateRewards(uint256 rewardDurationInBlocks)
        external
        payable
        onlyAdmin
    {
        // adjust the current reward per block
        if (block.number >= periodEndBlock) {
            currentRewardPerBlock = msg.value / rewardDurationInBlocks;
        } else {
            currentRewardPerBlock =
                (msg.value +
                    ((periodEndBlock - block.number) * currentRewardPerBlock)) /
                rewardDurationInBlocks;
        }

        lastUpdateBlock = block.number;
        periodEndBlock = block.number + rewardDurationInBlocks;

        emit NewRewardPeriod(
            rewardDurationInBlocks,
            currentRewardPerBlock,
            msg.value
        );
    }

    function lockUserWithdraw(address user, uint256 toTimestamp)
        external
        onlyAdmin
    {
        if (lockedWithdraw[user] >= toTimestamp) return;
        lockedWithdraw[user] = toTimestamp;
    }

    function setWeightFactors(
        uint256 newWeightFactorTokens,
        uint256 newWeightFactorMemberships
    ) external onlyAdmin {
        weightFactorTokens = newWeightFactorTokens;
        weightFactorMemberships = newWeightFactorMemberships;
    }

    function setMinTokenAndMembershipAmount(
        uint256 minimumTokenAmount_,
        uint256 minimumMembershipAmount_
    ) external onlyAdmin {
        minimumTokenAmount = minimumTokenAmount_;
        minimumMembershipAmount = minimumMembershipAmount_;
    }

    /**
     * @dev Disable emergency withdraw
     */
    function disableEmergencyWithdraw() public onlyAdmin {
        emergencyWithdrawDisabled = true;
    }

    /**
     * @dev Withdraw funds on contract to owner in case of emergency
     */
    function emergencyWithdraw() public onlyAdmin {
        require(!emergencyWithdrawDisabled, "emergency withdraw disabled");
        payable(owner()).transfer(address(this).balance);
    }

    /**
     * Checks requirements for depositing a stake
     */
    function _checkDeposit(
        address user,
        uint256[] memory membershipIds,
        uint256 amount
    ) internal view {
        // check required amount of tokens
        require(
            amount >=
                (
                    userInfo[user].membershipIds.length == 0
                        ? minimumTokenAmount * PRECISION_FACTOR
                        : 0
                ),
            "not enough tokens"
        );
        if (userInfo[user].membershipIds.length == 0) {
            require(
                membershipIds.length >= minimumMembershipAmount,
                "not enough memberships"
            );
        }
    }

    /**
     * @notice Return share value of a membership based on tier
     */
    function _getMembershipShareValue(uint256 membershipId)
        internal
        view
        returns (uint256)
    {
        // 5 shares per gold membership. 1 share for standard memberships
        return
            (IGenArt(genartMembership).isGoldToken(membershipId) ? 5 : 1) *
            PRECISION_FACTOR;
    }

    function _deposit(
        address user,
        uint256[] memory membershipIds,
        uint256 amount
    ) internal {
        // update reward for user
        _updateReward(user);
        // send memberships to this contract
        for (uint256 i; i < membershipIds.length; i++) {
            IERC721(genartMembership).transferFrom(
                user,
                address(this),
                membershipIds[i]
            );
            // save the membership token Ids
            userInfo[user].membershipIds.push(membershipIds[i]);
            membershipOwners[membershipIds[i]] = user;
            // adjust internal membership shares
            totalMembershipShares += _getMembershipShareValue(membershipIds[i]);
        }

        // transfer GENART tokens to this address
        genartToken.transferFrom(user, address(this), amount);

        // adjust internal token shares
        userInfo[user].tokens += amount;
        totalTokenShares += amount;

        emit Deposit(user, amount);
    }

    /**
     * @notice Update reward for a user account
     * @param _user address of the user
     */
    function _updateReward(address _user) internal {
        if (block.number != lastUpdateBlock) {
            rewardPerTokenStored = _rewardPerShare();
            lastUpdateBlock = _lastRewardBlock();
        }

        userInfo[_user].rewards = _calculatePendingRewards(_user);
        userInfo[_user].userRewardPerTokenPaid = rewardPerTokenStored;
    }

    /**
     * @notice Withdraw staked tokens and memberships and collect rewards
     */
    function _withdraw(address user) internal {
        // harvest rewards
        uint256 pendingRewards = _harvest(user);
        uint256 tokens = userInfo[user].tokens;
        uint256[] memory memberships = userInfo[user].membershipIds;

        // adjust internal token shares
        userInfo[user].tokens = 0;
        totalTokenShares -= tokens;

        // transfer GENART tokens to user
        genartToken.safeTransfer(user, tokens);
        for (uint256 i = memberships.length; i >= 1; i--) {
            // remove membership token id from user info object
            userInfo[user].membershipIds.pop();
            membershipOwners[memberships[i - 1]] = address(0);
            // adjust internal membership shares
            totalMembershipShares -= _getMembershipShareValue(
                memberships[i - 1]
            );
            IERC721(genartMembership).transferFrom(
                address(this),
                user,
                memberships[i - 1]
            );
        }
        // transfer reward token to user
        payable(user).transfer(pendingRewards);
        emit Withdraw(user, tokens, memberships);
    }

    /**
     * @notice Withdraw staked tokens and memberships
     */
    function _withdrawPartial(
        address user,
        uint256 amount,
        uint256[] memory membershipsToWithdraw
    ) internal {
        // harvest rewards
        uint256 pendingRewards = _harvest(user);
        uint256 tokens = userInfo[user].tokens;

        uint256 remainingTokens;
        uint256 remainingMemberships;
        unchecked {
            remainingTokens = tokens - amount;
            remainingMemberships =
                userInfo[user].membershipIds.length -
                membershipsToWithdraw.length;
        }
        require(
            remainingTokens >= minimumTokenAmount,
            "remaining tokens less then minimumTokenAmount"
        );
        require(
            remainingMemberships >= minimumMembershipAmount,
            "remaining memberships less then minimumMembershipAmount"
        );

        // adjust internal token shares
        userInfo[user].tokens = remainingTokens;
        totalTokenShares -= amount;

        // transfer GENART tokens to user
        genartToken.safeTransfer(user, amount);
        for (uint256 i; i < membershipsToWithdraw.length; i++) {
            // remove membership token id from user info object
            uint256 vaultedMembershipIndex = findArrayIndex(
                userInfo[user].membershipIds,
                membershipsToWithdraw[i]
            );
            userInfo[user].membershipIds[vaultedMembershipIndex] = userInfo[
                user
            ].membershipIds[userInfo[user].membershipIds.length - 1];

            userInfo[user].membershipIds.pop();

            membershipOwners[membershipsToWithdraw[i]] = address(0);
            // adjust internal membership shares
            totalMembershipShares -= _getMembershipShareValue(
                membershipsToWithdraw[i]
            );
            IERC721(genartMembership).transferFrom(
                address(this),
                user,
                membershipsToWithdraw[i]
            );
        }
        // transfer reward token to user
        payable(user).transfer(pendingRewards);
        emit Withdraw(user, tokens, membershipsToWithdraw);
    }

    function findArrayIndex(uint256[] memory array, uint256 value)
        internal
        pure
        returns (uint256 index)
    {
        for (uint256 i; i < array.length; i++) {
            if (array[i] == value) return i;
        }
        revert("value not found in array");
    }

    /**
     * @notice Harvest reward tokens that are pending
     */
    function _harvest(address user) internal returns (uint256) {
        // update reward for user
        _updateReward(user);

        // retrieve pending rewards
        uint256 pendingRewards = userInfo[user].rewards;

        if (pendingRewards == 0) return 0;
        // adjust user rewards and transfer
        userInfo[user].rewards = 0;

        emit Harvest(user, pendingRewards);

        return pendingRewards;
    }

    /**
     * @notice Return last block where rewards must be distributed
     */
    function _lastRewardBlock() internal view returns (uint256) {
        return block.number < periodEndBlock ? block.number : periodEndBlock;
    }

    /**
     * @notice Return reward per share
     */
    function _rewardPerShare() internal view returns (uint256) {
        if (totalTokenShares == 0) {
            return rewardPerTokenStored;
        }

        return
            rewardPerTokenStored +
            ((_lastRewardBlock() - lastUpdateBlock) * (currentRewardPerBlock));
    }

    /**
     * @notice Calculate pending rewards for a user
     * @param user address of the user
     */
    function _calculatePendingRewards(address user)
        internal
        view
        returns (uint256)
    {
        return
            (((getUserShares(user)) *
                (_rewardPerShare() - (userInfo[user].userRewardPerTokenPaid))) /
                PRECISION_FACTOR) + userInfo[user].rewards;
    }

    /**
     * @notice Calculate pending rewards (WETH) for a user
     * @param user address of the user
     */
    function calculatePendingRewards(address user)
        external
        view
        returns (uint256)
    {
        return _calculatePendingRewards(user);
    }

    /**
     * @notice Return last block where trading rewards were distributed
     */
    function lastRewardBlock() external view returns (uint256) {
        return _lastRewardBlock();
    }

    /**
     * @notice Return rewards per share
     */
    function rewardPerShare() external view returns (uint256) {
        return _rewardPerShare();
    }

    /**
     * @notice Return weighted shares of user
     */
    function getUserShares(address user) public view returns (uint256) {
        uint256 userMembershipShares;
        for (uint256 i = 0; i < userInfo[user].membershipIds.length; i++) {
            userMembershipShares += _getMembershipShareValue(
                userInfo[user].membershipIds[i]
            );
        }
        unchecked {
            uint256 tokenShares = totalTokenShares == 0
                ? 0
                : (weightFactorTokens *
                    userInfo[user].tokens *
                    PRECISION_FACTOR) / totalTokenShares;

            uint256 membershipShares = totalMembershipShares == 0
                ? 0
                : (weightFactorMemberships *
                    userMembershipShares *
                    PRECISION_FACTOR) / totalMembershipShares;
            return
                (tokenShares + membershipShares) /
                (weightFactorMemberships + weightFactorTokens);
        }
    }

    function getStake(address user)
        external
        view
        returns (
            uint256,
            uint256[] memory,
            uint256,
            uint256
        )
    {
        return (
            userInfo[user].tokens,
            userInfo[user].membershipIds,
            totalTokenShares == 0 ? 0 : getUserShares(user),
            _calculatePendingRewards(user)
        );
    }

    function getMembershipsOf(address user)
        external
        view
        returns (uint256[] memory)
    {
        return userInfo[user].membershipIds;
    }

    receive() external payable {
        payable(owner()).transfer(msg.value);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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'
        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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

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

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";

/**
 * @dev This implements access control for owner and admins
 */
abstract contract GenArtAccess is Ownable {
    mapping(address => bool) public admins;
    address public genartAdmin;

    constructor() Ownable() {
        genartAdmin = _msgSender();
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyAdmin() {
        address sender = _msgSender();
        require(
            owner() == sender || admins[sender],
            "GenArtAccess: caller is not the owner nor admin"
        );
        _;
    }

    /**
     * @dev Throws if called by any account other than the GEN.ART admin.
     */
    modifier onlyGenArtAdmin() {
        address sender = _msgSender();
        require(
            genartAdmin == sender,
            "GenArtAccess: caller is not genart admin"
        );
        _;
    }

    function setGenArtAdmin(address admin) public onlyGenArtAdmin {
        genartAdmin = admin;
    }

    function setAdminAccess(address admin, bool access) public onlyGenArtAdmin {
        admins[admin] = access;
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IGenArt {
    function isGoldToken(uint256 _membershipId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IGenArtInterfaceV4 {
    function isGoldToken(uint256 _membershipId) external view returns (bool);

    function getMembershipsOf(address account)
        external
        view
        returns (uint256[] memory);

    function ownerOfMembership(uint256 _membershipId)
        external
        view
        returns (address, bool);

    function isVaulted(uint256 _membershipId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_genartMembership","type":"address"},{"internalType":"address","name":"_genartToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"harvestedAmount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numberBlocks","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"NewRewardPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"memberships","type":"uint256[]"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"PRECISION_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculatePendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"membershipIds","type":"uint256[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableEmergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genartAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genartMembership","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genartToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getMembershipsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"toTimestamp","type":"uint256"}],"name":"lockUserWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lockedWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"membershipOwners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumMembershipAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minimumTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bool","name":"access","type":"bool"}],"name":"setAdminAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"setGenArtAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minimumTokenAmount_","type":"uint256"},{"internalType":"uint256","name":"minimumMembershipAmount_","type":"uint256"}],"name":"setMinTokenAndMembershipAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newWeightFactorTokens","type":"uint256"},{"internalType":"uint256","name":"newWeightFactorMemberships","type":"uint256"}],"name":"setWeightFactors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalMembershipShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardDurationInBlocks","type":"uint256"}],"name":"updateRewards","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"tokens","type":"uint256"},{"internalType":"uint256","name":"userRewardPerTokenPaid","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weightFactorMemberships","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weightFactorTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"membershipsToWithdraw","type":"uint256[]"}],"name":"withdrawPartial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c0604052610fa0600a556001600b556002600e556001600f553480156200002657600080fd5b5060405162004bc938038062004bc983398181016040528101906200004c91906200021f565b600160008190555062000074620000686200013a60201b60201c565b6200014260201b60201c565b620000846200013a60201b60201c565b600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250505050620002ae565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620002198162000294565b92915050565b600080604083850312156200023357600080fd5b6000620002438582860162000208565b9250506020620002568582860162000208565b9150509250929050565b60006200026d8262000274565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200029f8162000260565b8114620002ab57600080fd5b50565b60805160601c60a05160601c6148be6200030b6000396000818161169101528181612225015281816127c001528181612bf8015261315501526000818161119401528181611e15015281816125d10152612e7701526148be6000f3fe60806040526004361061023f5760003560e01c8063a218141b1161012e578063db2e21bc116100ab578063effff6471161006f578063effff64714610890578063f2fde38b146108bb578063f65a0b3e146108e4578063fd9fce821461090d578063ff607d001461093857610294565b8063db2e21bc146107cf578063de4e5a45146107e6578063dec7fa11146107fd578063df136d6514610828578063ea85b1e51461085357610294565b8063c120cbc7116100f2578063c120cbc7146106e8578063c45fb58714610713578063cb4aec6114610750578063ccd34cd51461077b578063d6f04d0f146107a657610294565b8063a218141b146105fc578063a9f8d18114610627578063aa30d55214610652578063b1e95e941461068f578063ba0cb22b146106ab57610294565b8063446a2ec8116101bc5780637a766460116101805780637a7664601461051257806381a3b57f146105525780638da5cb5b1461057d57806397521b95146105a857806399863754146105d357610294565b8063446a2ec8146104655780634641257d14610490578063547bd9b5146104a75780635dc55f2f146104d2578063715018a6146104fb57610294565b80631cd1cb85116102035780631cd1cb851461039457806327a28e1b146103bd5780633ccfd60b146103e6578063429b62e5146103fd578063442da82f1461043a57610294565b8063053f0df314610299578063097aad10146102c25780630e0aff94146102ff5780631849dc471461032a5780631959a0021461035557610294565b366102945761024c610963565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610291573d6000803e3d6000fd5b50005b600080fd5b3480156102a557600080fd5b506102c060048036038101906102bb91906138c6565b61098d565b005b3480156102ce57600080fd5b506102e960048036038101906102e4919061377f565b610a75565b6040516102f69190614000565b60405180910390f35b34801561030b57600080fd5b50610314610a87565b6040516103219190613ceb565b60405180910390f35b34801561033657600080fd5b5061033f610aad565b60405161034c9190613d88565b60405180910390f35b34801561036157600080fd5b5061037c6004803603810190610377919061377f565b610ac0565b60405161038b93929190614097565b60405180910390f35b3480156103a057600080fd5b506103bb60048036038101906103b6919061391a565b610aea565b005b3480156103c957600080fd5b506103e460048036038101906103df91906137e4565b610bd2565b005b3480156103f257600080fd5b506103fb610d3c565b005b34801561040957600080fd5b50610424600480360381019061041f919061377f565b610eb2565b6040516104319190613d88565b60405180910390f35b34801561044657600080fd5b5061044f610ed2565b60405161045c9190614000565b60405180910390f35b34801561047157600080fd5b5061047a610ed8565b6040516104879190614000565b60405180910390f35b34801561049c57600080fd5b506104a5610ee7565b005b3480156104b357600080fd5b506104bc610fe4565b6040516104c99190614000565b60405180910390f35b3480156104de57600080fd5b506104f960048036038101906104f49190613820565b610fea565b005b34801561050757600080fd5b50610510611067565b005b34801561051e57600080fd5b506105396004803603810190610534919061377f565b61107b565b604051610549949392919061404b565b60405180910390f35b34801561055e57600080fd5b5061056761118c565b6040516105749190614000565b60405180910390f35b34801561058957600080fd5b50610592610963565b60405161059f9190613ceb565b60405180910390f35b3480156105b457600080fd5b506105bd611192565b6040516105ca9190613da3565b60405180910390f35b3480156105df57600080fd5b506105fa60048036038101906105f5919061377f565b6111b6565b005b34801561060857600080fd5b50610611611297565b60405161061e9190614000565b60405180910390f35b34801561063357600080fd5b5061063c61129d565b6040516106499190614000565b60405180910390f35b34801561065e57600080fd5b506106796004803603810190610674919061377f565b6112ac565b6040516106869190614000565b60405180910390f35b6106a960048036038101906106a4919061389d565b6112c4565b005b3480156106b757600080fd5b506106d260048036038101906106cd919061377f565b61144b565b6040516106df9190614000565b60405180910390f35b3480156106f457600080fd5b506106fd61168f565b60405161070a9190613ceb565b60405180910390f35b34801561071f57600080fd5b5061073a6004803603810190610735919061389d565b6116b3565b6040516107479190613ceb565b60405180910390f35b34801561075c57600080fd5b506107656116e6565b6040516107729190614000565b60405180910390f35b34801561078757600080fd5b506107906116ec565b60405161079d9190614000565b60405180910390f35b3480156107b257600080fd5b506107cd60048036038101906107c8919061391a565b6116f8565b005b3480156107db57600080fd5b506107e46117e0565b005b3480156107f257600080fd5b506107fb611956565b005b34801561080957600080fd5b50610812611a49565b60405161081f9190614000565b60405180910390f35b34801561083457600080fd5b5061083d611a4f565b60405161084a9190614000565b60405180910390f35b34801561085f57600080fd5b5061087a6004803603810190610875919061377f565b611a55565b6040516108879190613d66565b60405180910390f35b34801561089c57600080fd5b506108a5611aef565b6040516108b29190614000565b60405180910390f35b3480156108c757600080fd5b506108e260048036038101906108dd919061377f565b611af5565b005b3480156108f057600080fd5b5061090b600480360381019061090691906137a8565b611b79565b005b34801561091957600080fd5b50610922611c71565b60405161092f9190614000565b60405180910390f35b34801561094457600080fd5b5061094d611c77565b60405161095a9190614000565b60405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b33600d60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690613fe0565b60405180910390fd5b60026000541415610a55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4c90613fa0565b60405180910390fd5b6002600081905550610a68338484611c7d565b6001600081905550505050565b6000610a80826123a7565b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601160009054906101000a900460ff1681565b600c6020528060005260406000206000915090508060000154908060020154908060030154905083565b6000610af4612478565b90508073ffffffffffffffffffffffffffffffffffffffff16610b15610963565b73ffffffffffffffffffffffffffffffffffffffff161480610b805750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610bbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb690613f60565b60405180910390fd5b82600e8190555081600f81905550505050565b6000610bdc612478565b90508073ffffffffffffffffffffffffffffffffffffffff16610bfd610963565b73ffffffffffffffffffffffffffffffffffffffff161480610c685750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9e90613f60565b60405180910390fd5b81600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610cf257610d37565b81600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b33600d60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590613fe0565b60405180910390fd5b60026000541415610e04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfb90613fa0565b60405180910390fd5b60026000819055506000610e16612478565b90506000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411610e9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9490613f40565b60405180910390fd5b610ea681612480565b50600160008190555050565b60026020528060005260406000206000915054906101000a900460ff1681565b60065481565b6000610ee261294a565b905090565b60026000541415610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490613fa0565b60405180910390fd5b60026000819055506000610f3f612478565b90506000610f4c82612995565b905060008111610f91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8890613ec0565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610fd7573d6000803e3d6000fd5b5050506001600081905550565b600b5481565b60026000541415611030576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102790613fa0565b60405180910390fd5b60026000819055506000611042612478565b905061104f818484612a9a565b61105a818484612be1565b5060016000819055505050565b61106f612fea565b6110796000613068565b565b60006060600080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006008541461111f5761111a8761144b565b611122565b60005b61112b886123a7565b8280548060200260200160405190810160405280929190818152602001828054801561117657602002820191906000526020600020905b815481526020019060010190808311611162575b5050505050925093509350935093509193509193565b60095481565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006111c0612478565b90508073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124990613f00565b60405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60055481565b60006112a761312e565b905090565b600d6020528060005260406000206000915090505481565b60006112ce612478565b90508073ffffffffffffffffffffffffffffffffffffffff166112ef610963565b73ffffffffffffffffffffffffffffffffffffffff16148061135a5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090613f60565b60405180910390fd5b60065443106113b95781346113ae91906141e0565b6004819055506113f1565b81600454436006546113cb919061426b565b6113d59190614211565b346113e0919061418a565b6113ea91906141e0565b6004819055505b436005819055508143611404919061418a565b6006819055507f55b4fa63fe43865f67b4f2c4a4df1cf9e6c1f85767211b44b45cf4649b2c2b51826004543460405161143f93929190614097565b60405180910390a15050565b60008060005b600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905081101561154b5761152b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061151b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154613148565b82611536919061418a565b9150808061154390614399565b915050611451565b50600080600854146115e557600854670de0b6b3a7640000600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600e540202816115df577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b046115e8565b60005b90506000806009541461164157600954670de0b6b3a764000084600f5402028161163b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b04611644565b60005b9050600e54600f540181830181611684577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b049350505050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60106020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b670de0b6b3a764000081565b6000611702612478565b90508073ffffffffffffffffffffffffffffffffffffffff16611723610963565b73ffffffffffffffffffffffffffffffffffffffff16148061178e5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c490613f60565b60405180910390fd5b82600a8190555081600b81905550505050565b60006117ea612478565b90508073ffffffffffffffffffffffffffffffffffffffff1661180b610963565b73ffffffffffffffffffffffffffffffffffffffff1614806118765750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6118b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ac90613f60565b60405180910390fd5b601160009054906101000a900460ff1615611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fc90613e00565b60405180910390fd5b61190d610963565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611952573d6000803e3d6000fd5b5050565b6000611960612478565b90508073ffffffffffffffffffffffffffffffffffffffff16611981610963565b73ffffffffffffffffffffffffffffffffffffffff1614806119ec5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611a2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2290613f60565b60405180910390fd5b6001601160006101000a81548160ff02191690831515021790555050565b600a5481565b60075481565b6060600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015611ae357602002820191906000526020600020905b815481526020019060010190808311611acf575b50505050509050919050565b60085481565b611afd612fea565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6490613de0565b60405180910390fd5b611b7681613068565b50565b6000611b83612478565b90508073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0c90613f00565b60405180910390fd5b81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600f5481565b600e5481565b6000611c8884612995565b90506000600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905060008085830391508451600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050039050600a54821015611d69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6090613ea0565b60405180910390fd5b600b54811015611dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da590613fc0565b60405180910390fd5b81600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508560086000828254611e07919061426b565b92505081905550611e5987877f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661321e9092919063ffffffff16565b60005b8551811015612306576000611f41600c60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015611ef657602002820191906000526020600020905b815481526020019060010190808311611ee2575b5050505050888481518110611f34577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516132a4565b9050600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001600c60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050611fd7919061426b565b8154811061200e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154600c60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018281548110612093577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200181905550600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480612119577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160009055905560006010600089858151811061216e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061220b8783815181106121fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b6009600082825461221c919061426b565b925050819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd308b8a868151811061229a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b81526004016122c093929190613d06565b600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050505080806122fe90614399565b915050611e5c565b508673ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505015801561234d573d6000803e3d6000fd5b508673ffffffffffffffffffffffffffffffffffffffff167faef68853d1f7f9e4e5fe02896078a87a319c7b257208dac49346c8f03b36c685848760405161239692919061401b565b60405180910390a250505050505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154670de0b6b3a7640000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461244061294a565b61244a919061426b565b6124538561144b565b61245d9190614211565b61246791906141e0565b612471919061418a565b9050919050565b600033905090565b600061248b82612995565b90506000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548060200260200160405190810160405280929190818152602001828054801561256257602002820191906000526020600020905b81548152602001906001019080831161254e575b505050505090506000600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555081600860008282546125c3919061426b565b9250508190555061261584837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661321e9092919063ffffffff16565b6000815190505b600181106128ac57600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548061269c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002001600090559055600060106000846001856126c6919061426b565b815181106126fd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506127a682600183612762919061426b565b81518110612799577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b600960008282546127b7919061426b565b925050819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd30878560018661280a919061426b565b81518110612841577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b815260040161286793929190613d06565b600060405180830381600087803b15801561288157600080fd5b505af1158015612895573d6000803e3d6000fd5b5050505080806128a49061433e565b91505061261c565b508373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156128f3573d6000803e3d6000fd5b508373ffffffffffffffffffffffffffffffffffffffff167faef68853d1f7f9e4e5fe02896078a87a319c7b257208dac49346c8f03b36c685838360405161293c92919061401b565b60405180910390a250505050565b6000806008541415612960576007549050612992565b60045460055461296e61312e565b612978919061426b565b6129829190614211565b60075461298f919061418a565b90505b90565b60006129a082613357565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154905060008114156129fa576000915050612a95565b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055508273ffffffffffffffffffffffffffffffffffffffff167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba82604051612a889190614000565b60405180910390a2809150505b919050565b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905014612aee576000612b05565b670de0b6b3a7640000600a54612b049190614211565b5b811015612b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3e90613e60565b60405180910390fd5b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805490501415612bdc57600b5482511015612bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd290613e20565b60405180910390fd5b5b505050565b612bea83613357565b60005b8251811015612e74577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd8530868581518110612c6d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401612c9393929190613d06565b600060405180830381600087803b158015612cad57600080fd5b505af1158015612cc1573d6000803e3d6000fd5b50505050600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101838281518110612d40577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558360106000858481518110612dac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e49838281518110612e3c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b60096000828254612e5a919061418a565b925050819055508080612e6c90614399565b915050612bed565b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd8430846040518463ffffffff1660e01b8152600401612ed293929190613d06565b602060405180830381600087803b158015612eec57600080fd5b505af1158015612f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f249190613874565b5080600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254612f77919061418a565b925050819055508060086000828254612f90919061418a565b925050819055508273ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c82604051612fdd9190614000565b60405180910390a2505050565b612ff2612478565b73ffffffffffffffffffffffffffffffffffffffff16613010610963565b73ffffffffffffffffffffffffffffffffffffffff1614613066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305d90613e80565b60405180910390fd5b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600654431061314157600654613143565b435b905090565b6000670de0b6b3a76400007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f4ed4d15846040518263ffffffff1660e01b81526004016131ac9190614000565b60206040518083038186803b1580156131c457600080fd5b505afa1580156131d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131fc9190613874565b61320757600161320a565b60055b60ff166132179190614211565b9050919050565b61329f8363a9059cbb60e01b848460405160240161323d929190613d3d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613418565b505050565b6000805b835181101561331557828482815181106132eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015114156133025780915050613351565b808061330d90614399565b9150506132a8565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161334890613f80565b60405180910390fd5b92915050565b600554431461337d5761336861294a565b60078190555061337661312e565b6005819055505b613386816123a7565b600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550600754600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555050565b600061347a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134df9092919063ffffffff16565b90506000815111156134da578080602001905181019061349a9190613874565b6134d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134d090613f20565b60405180910390fd5b5b505050565b60606134ee84846000856134f7565b90509392505050565b60608247101561353c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353390613e40565b60405180910390fd5b6135458561360b565b613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357b90613ee0565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516135ad9190613cd4565b60006040518083038185875af1925050503d80600081146135ea576040519150601f19603f3d011682016040523d82523d6000602084013e6135ef565b606091505b50915091506135ff82828661362e565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561363e5782905061368e565b6000835111156136515782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136859190613dbe565b60405180910390fd5b9392505050565b60006136a86136a3846140f3565b6140ce565b905080838252602082019050828560208602820111156136c757600080fd5b60005b858110156136f757816136dd888261376a565b8452602084019350602083019250506001810190506136ca565b5050509392505050565b60008135905061371081614843565b92915050565b600082601f83011261372757600080fd5b8135613737848260208601613695565b91505092915050565b60008135905061374f8161485a565b92915050565b6000815190506137648161485a565b92915050565b60008135905061377981614871565b92915050565b60006020828403121561379157600080fd5b600061379f84828501613701565b91505092915050565b600080604083850312156137bb57600080fd5b60006137c985828601613701565b92505060206137da85828601613740565b9150509250929050565b600080604083850312156137f757600080fd5b600061380585828601613701565b92505060206138168582860161376a565b9150509250929050565b6000806040838503121561383357600080fd5b600083013567ffffffffffffffff81111561384d57600080fd5b61385985828601613716565b925050602061386a8582860161376a565b9150509250929050565b60006020828403121561388657600080fd5b600061389484828501613755565b91505092915050565b6000602082840312156138af57600080fd5b60006138bd8482850161376a565b91505092915050565b600080604083850312156138d957600080fd5b60006138e78582860161376a565b925050602083013567ffffffffffffffff81111561390457600080fd5b61391085828601613716565b9150509250929050565b6000806040838503121561392d57600080fd5b600061393b8582860161376a565b925050602061394c8582860161376a565b9150509250929050565b60006139628383613cb6565b60208301905092915050565b6139778161429f565b82525050565b60006139888261412f565b613992818561415d565b935061399d8361411f565b8060005b838110156139ce5781516139b58882613956565b97506139c083614150565b9250506001810190506139a1565b5085935050505092915050565b6139e4816142b1565b82525050565b60006139f58261413a565b6139ff818561416e565b9350613a0f81856020860161430b565b80840191505092915050565b613a24816142e7565b82525050565b6000613a3582614145565b613a3f8185614179565b9350613a4f81856020860161430b565b613a588161446f565b840191505092915050565b6000613a70602683614179565b9150613a7b82614480565b604082019050919050565b6000613a93601b83614179565b9150613a9e826144cf565b602082019050919050565b6000613ab6601683614179565b9150613ac1826144f8565b602082019050919050565b6000613ad9602683614179565b9150613ae482614521565b604082019050919050565b6000613afc601183614179565b9150613b0782614570565b602082019050919050565b6000613b1f602083614179565b9150613b2a82614599565b602082019050919050565b6000613b42602d83614179565b9150613b4d826145c2565b604082019050919050565b6000613b65601783614179565b9150613b7082614611565b602082019050919050565b6000613b88601d83614179565b9150613b938261463a565b602082019050919050565b6000613bab602883614179565b9150613bb682614663565b604082019050919050565b6000613bce602a83614179565b9150613bd9826146b2565b604082019050919050565b6000613bf1600b83614179565b9150613bfc82614701565b602082019050919050565b6000613c14602f83614179565b9150613c1f8261472a565b604082019050919050565b6000613c37601883614179565b9150613c4282614779565b602082019050919050565b6000613c5a601f83614179565b9150613c65826147a2565b602082019050919050565b6000613c7d603783614179565b9150613c88826147cb565b604082019050919050565b6000613ca0600d83614179565b9150613cab8261481a565b602082019050919050565b613cbf816142dd565b82525050565b613cce816142dd565b82525050565b6000613ce082846139ea565b915081905092915050565b6000602082019050613d00600083018461396e565b92915050565b6000606082019050613d1b600083018661396e565b613d28602083018561396e565b613d356040830184613cc5565b949350505050565b6000604082019050613d52600083018561396e565b613d5f6020830184613cc5565b9392505050565b60006020820190508181036000830152613d80818461397d565b905092915050565b6000602082019050613d9d60008301846139db565b92915050565b6000602082019050613db86000830184613a1b565b92915050565b60006020820190508181036000830152613dd88184613a2a565b905092915050565b60006020820190508181036000830152613df981613a63565b9050919050565b60006020820190508181036000830152613e1981613a86565b9050919050565b60006020820190508181036000830152613e3981613aa9565b9050919050565b60006020820190508181036000830152613e5981613acc565b9050919050565b60006020820190508181036000830152613e7981613aef565b9050919050565b60006020820190508181036000830152613e9981613b12565b9050919050565b60006020820190508181036000830152613eb981613b35565b9050919050565b60006020820190508181036000830152613ed981613b58565b9050919050565b60006020820190508181036000830152613ef981613b7b565b9050919050565b60006020820190508181036000830152613f1981613b9e565b9050919050565b60006020820190508181036000830152613f3981613bc1565b9050919050565b60006020820190508181036000830152613f5981613be4565b9050919050565b60006020820190508181036000830152613f7981613c07565b9050919050565b60006020820190508181036000830152613f9981613c2a565b9050919050565b60006020820190508181036000830152613fb981613c4d565b9050919050565b60006020820190508181036000830152613fd981613c70565b9050919050565b60006020820190508181036000830152613ff981613c93565b9050919050565b60006020820190506140156000830184613cc5565b92915050565b60006040820190506140306000830185613cc5565b8181036020830152614042818461397d565b90509392505050565b60006080820190506140606000830187613cc5565b8181036020830152614072818661397d565b90506140816040830185613cc5565b61408e6060830184613cc5565b95945050505050565b60006060820190506140ac6000830186613cc5565b6140b96020830185613cc5565b6140c66040830184613cc5565b949350505050565b60006140d86140e9565b90506140e48282614368565b919050565b6000604051905090565b600067ffffffffffffffff82111561410e5761410d614440565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000614195826142dd565b91506141a0836142dd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156141d5576141d46143e2565b5b828201905092915050565b60006141eb826142dd565b91506141f6836142dd565b92508261420657614205614411565b5b828204905092915050565b600061421c826142dd565b9150614227836142dd565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156142605761425f6143e2565b5b828202905092915050565b6000614276826142dd565b9150614281836142dd565b925082821015614294576142936143e2565b5b828203905092915050565b60006142aa826142bd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006142f2826142f9565b9050919050565b6000614304826142bd565b9050919050565b60005b8381101561432957808201518184015260208101905061430e565b83811115614338576000848401525b50505050565b6000614349826142dd565b9150600082141561435d5761435c6143e2565b5b600182039050919050565b6143718261446f565b810181811067ffffffffffffffff821117156143905761438f614440565b5b80604052505050565b60006143a4826142dd565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143d7576143d66143e2565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f656d657267656e63792077697468647261772064697361626c65640000000000600082015250565b7f6e6f7420656e6f756768206d656d626572736869707300000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f6e6f7420656e6f75676820746f6b656e73000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f72656d61696e696e6720746f6b656e73206c657373207468656e206d696e696d60008201527f756d546f6b656e416d6f756e7400000000000000000000000000000000000000602082015250565b7f7a65726f207265776172647320746f2068617276657374000000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f47656e4172744163636573733a2063616c6c6572206973206e6f742067656e6160008201527f72742061646d696e000000000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f7a65726f20736861726573000000000000000000000000000000000000000000600082015250565b7f47656e4172744163636573733a2063616c6c6572206973206e6f74207468652060008201527f6f776e6572206e6f722061646d696e0000000000000000000000000000000000602082015250565b7f76616c7565206e6f7420666f756e6420696e2061727261790000000000000000600082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f72656d61696e696e67206d656d6265727368697073206c657373207468656e2060008201527f6d696e696d756d4d656d62657273686970416d6f756e74000000000000000000602082015250565b7f617373657473206c6f636b656400000000000000000000000000000000000000600082015250565b61484c8161429f565b811461485757600080fd5b50565b614863816142b1565b811461486e57600080fd5b50565b61487a816142dd565b811461488557600080fd5b5056fea2646970667358221220582813dc4d02f63c976924833c8383c6ea3882d411027b1d1fe6fc2aff7235e764736f6c634300080400330000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3800000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac8

Deployed Bytecode

0x60806040526004361061023f5760003560e01c8063a218141b1161012e578063db2e21bc116100ab578063effff6471161006f578063effff64714610890578063f2fde38b146108bb578063f65a0b3e146108e4578063fd9fce821461090d578063ff607d001461093857610294565b8063db2e21bc146107cf578063de4e5a45146107e6578063dec7fa11146107fd578063df136d6514610828578063ea85b1e51461085357610294565b8063c120cbc7116100f2578063c120cbc7146106e8578063c45fb58714610713578063cb4aec6114610750578063ccd34cd51461077b578063d6f04d0f146107a657610294565b8063a218141b146105fc578063a9f8d18114610627578063aa30d55214610652578063b1e95e941461068f578063ba0cb22b146106ab57610294565b8063446a2ec8116101bc5780637a766460116101805780637a7664601461051257806381a3b57f146105525780638da5cb5b1461057d57806397521b95146105a857806399863754146105d357610294565b8063446a2ec8146104655780634641257d14610490578063547bd9b5146104a75780635dc55f2f146104d2578063715018a6146104fb57610294565b80631cd1cb85116102035780631cd1cb851461039457806327a28e1b146103bd5780633ccfd60b146103e6578063429b62e5146103fd578063442da82f1461043a57610294565b8063053f0df314610299578063097aad10146102c25780630e0aff94146102ff5780631849dc471461032a5780631959a0021461035557610294565b366102945761024c610963565b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610291573d6000803e3d6000fd5b50005b600080fd5b3480156102a557600080fd5b506102c060048036038101906102bb91906138c6565b61098d565b005b3480156102ce57600080fd5b506102e960048036038101906102e4919061377f565b610a75565b6040516102f69190614000565b60405180910390f35b34801561030b57600080fd5b50610314610a87565b6040516103219190613ceb565b60405180910390f35b34801561033657600080fd5b5061033f610aad565b60405161034c9190613d88565b60405180910390f35b34801561036157600080fd5b5061037c6004803603810190610377919061377f565b610ac0565b60405161038b93929190614097565b60405180910390f35b3480156103a057600080fd5b506103bb60048036038101906103b6919061391a565b610aea565b005b3480156103c957600080fd5b506103e460048036038101906103df91906137e4565b610bd2565b005b3480156103f257600080fd5b506103fb610d3c565b005b34801561040957600080fd5b50610424600480360381019061041f919061377f565b610eb2565b6040516104319190613d88565b60405180910390f35b34801561044657600080fd5b5061044f610ed2565b60405161045c9190614000565b60405180910390f35b34801561047157600080fd5b5061047a610ed8565b6040516104879190614000565b60405180910390f35b34801561049c57600080fd5b506104a5610ee7565b005b3480156104b357600080fd5b506104bc610fe4565b6040516104c99190614000565b60405180910390f35b3480156104de57600080fd5b506104f960048036038101906104f49190613820565b610fea565b005b34801561050757600080fd5b50610510611067565b005b34801561051e57600080fd5b506105396004803603810190610534919061377f565b61107b565b604051610549949392919061404b565b60405180910390f35b34801561055e57600080fd5b5061056761118c565b6040516105749190614000565b60405180910390f35b34801561058957600080fd5b50610592610963565b60405161059f9190613ceb565b60405180910390f35b3480156105b457600080fd5b506105bd611192565b6040516105ca9190613da3565b60405180910390f35b3480156105df57600080fd5b506105fa60048036038101906105f5919061377f565b6111b6565b005b34801561060857600080fd5b50610611611297565b60405161061e9190614000565b60405180910390f35b34801561063357600080fd5b5061063c61129d565b6040516106499190614000565b60405180910390f35b34801561065e57600080fd5b506106796004803603810190610674919061377f565b6112ac565b6040516106869190614000565b60405180910390f35b6106a960048036038101906106a4919061389d565b6112c4565b005b3480156106b757600080fd5b506106d260048036038101906106cd919061377f565b61144b565b6040516106df9190614000565b60405180910390f35b3480156106f457600080fd5b506106fd61168f565b60405161070a9190613ceb565b60405180910390f35b34801561071f57600080fd5b5061073a6004803603810190610735919061389d565b6116b3565b6040516107479190613ceb565b60405180910390f35b34801561075c57600080fd5b506107656116e6565b6040516107729190614000565b60405180910390f35b34801561078757600080fd5b506107906116ec565b60405161079d9190614000565b60405180910390f35b3480156107b257600080fd5b506107cd60048036038101906107c8919061391a565b6116f8565b005b3480156107db57600080fd5b506107e46117e0565b005b3480156107f257600080fd5b506107fb611956565b005b34801561080957600080fd5b50610812611a49565b60405161081f9190614000565b60405180910390f35b34801561083457600080fd5b5061083d611a4f565b60405161084a9190614000565b60405180910390f35b34801561085f57600080fd5b5061087a6004803603810190610875919061377f565b611a55565b6040516108879190613d66565b60405180910390f35b34801561089c57600080fd5b506108a5611aef565b6040516108b29190614000565b60405180910390f35b3480156108c757600080fd5b506108e260048036038101906108dd919061377f565b611af5565b005b3480156108f057600080fd5b5061090b600480360381019061090691906137a8565b611b79565b005b34801561091957600080fd5b50610922611c71565b60405161092f9190614000565b60405180910390f35b34801561094457600080fd5b5061094d611c77565b60405161095a9190614000565b60405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b33600d60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690613fe0565b60405180910390fd5b60026000541415610a55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4c90613fa0565b60405180910390fd5b6002600081905550610a68338484611c7d565b6001600081905550505050565b6000610a80826123a7565b9050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601160009054906101000a900460ff1681565b600c6020528060005260406000206000915090508060000154908060020154908060030154905083565b6000610af4612478565b90508073ffffffffffffffffffffffffffffffffffffffff16610b15610963565b73ffffffffffffffffffffffffffffffffffffffff161480610b805750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610bbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bb690613f60565b60405180910390fd5b82600e8190555081600f81905550505050565b6000610bdc612478565b90508073ffffffffffffffffffffffffffffffffffffffff16610bfd610963565b73ffffffffffffffffffffffffffffffffffffffff161480610c685750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610ca7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9e90613f60565b60405180910390fd5b81600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610cf257610d37565b81600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b33600d60008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544211610dbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610db590613fe0565b60405180910390fd5b60026000541415610e04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfb90613fa0565b60405180910390fd5b60026000819055506000610e16612478565b90506000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411610e9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9490613f40565b60405180910390fd5b610ea681612480565b50600160008190555050565b60026020528060005260406000206000915054906101000a900460ff1681565b60065481565b6000610ee261294a565b905090565b60026000541415610f2d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2490613fa0565b60405180910390fd5b60026000819055506000610f3f612478565b90506000610f4c82612995565b905060008111610f91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8890613ec0565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610fd7573d6000803e3d6000fd5b5050506001600081905550565b600b5481565b60026000541415611030576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102790613fa0565b60405180910390fd5b60026000819055506000611042612478565b905061104f818484612a9a565b61105a818484612be1565b5060016000819055505050565b61106f612fea565b6110796000613068565b565b60006060600080600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160006008541461111f5761111a8761144b565b611122565b60005b61112b886123a7565b8280548060200260200160405190810160405280929190818152602001828054801561117657602002820191906000526020600020905b815481526020019060010190808311611162575b5050505050925093509350935093509193509193565b60095481565b7f00000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac881565b60006111c0612478565b90508073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611252576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124990613f00565b60405180910390fd5b81600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60055481565b60006112a761312e565b905090565b600d6020528060005260406000206000915090505481565b60006112ce612478565b90508073ffffffffffffffffffffffffffffffffffffffff166112ef610963565b73ffffffffffffffffffffffffffffffffffffffff16148061135a5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611399576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139090613f60565b60405180910390fd5b60065443106113b95781346113ae91906141e0565b6004819055506113f1565b81600454436006546113cb919061426b565b6113d59190614211565b346113e0919061418a565b6113ea91906141e0565b6004819055505b436005819055508143611404919061418a565b6006819055507f55b4fa63fe43865f67b4f2c4a4df1cf9e6c1f85767211b44b45cf4649b2c2b51826004543460405161143f93929190614097565b60405180910390a15050565b60008060005b600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905081101561154b5761152b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061151b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154613148565b82611536919061418a565b9150808061154390614399565b915050611451565b50600080600854146115e557600854670de0b6b3a7640000600c60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600e540202816115df577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b046115e8565b60005b90506000806009541461164157600954670de0b6b3a764000084600f5402028161163b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b04611644565b60005b9050600e54600f540181830181611684577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b049350505050919050565b7f0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3881565b60106020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b670de0b6b3a764000081565b6000611702612478565b90508073ffffffffffffffffffffffffffffffffffffffff16611723610963565b73ffffffffffffffffffffffffffffffffffffffff16148061178e5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6117cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c490613f60565b60405180910390fd5b82600a8190555081600b81905550505050565b60006117ea612478565b90508073ffffffffffffffffffffffffffffffffffffffff1661180b610963565b73ffffffffffffffffffffffffffffffffffffffff1614806118765750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b6118b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ac90613f60565b60405180910390fd5b601160009054906101000a900460ff1615611905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118fc90613e00565b60405180910390fd5b61190d610963565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611952573d6000803e3d6000fd5b5050565b6000611960612478565b90508073ffffffffffffffffffffffffffffffffffffffff16611981610963565b73ffffffffffffffffffffffffffffffffffffffff1614806119ec5750600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611a2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2290613f60565b60405180910390fd5b6001601160006101000a81548160ff02191690831515021790555050565b600a5481565b60075481565b6060600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015611ae357602002820191906000526020600020905b815481526020019060010190808311611acf575b50505050509050919050565b60085481565b611afd612fea565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6490613de0565b60405180910390fd5b611b7681613068565b50565b6000611b83612478565b90508073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c0c90613f00565b60405180910390fd5b81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b600f5481565b600e5481565b6000611c8884612995565b90506000600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905060008085830391508451600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050039050600a54821015611d69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6090613ea0565b60405180910390fd5b600b54811015611dae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da590613fc0565b60405180910390fd5b81600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508560086000828254611e07919061426b565b92505081905550611e5987877f00000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac873ffffffffffffffffffffffffffffffffffffffff1661321e9092919063ffffffff16565b60005b8551811015612306576000611f41600c60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480602002602001604051908101604052809291908181526020018280548015611ef657602002820191906000526020600020905b815481526020019060010190808311611ee2575b5050505050888481518110611f34577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516132a4565b9050600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001600c60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050611fd7919061426b565b8154811061200e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200154600c60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018281548110612093577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200181905550600c60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805480612119577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160009055905560006010600089858151811061216e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061220b8783815181106121fe577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b6009600082825461221c919061426b565b925050819055507f0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3873ffffffffffffffffffffffffffffffffffffffff166323b872dd308b8a868151811061229a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b81526004016122c093929190613d06565b600060405180830381600087803b1580156122da57600080fd5b505af11580156122ee573d6000803e3d6000fd5b505050505080806122fe90614399565b915050611e5c565b508673ffffffffffffffffffffffffffffffffffffffff166108fc859081150290604051600060405180830381858888f1935050505015801561234d573d6000803e3d6000fd5b508673ffffffffffffffffffffffffffffffffffffffff167faef68853d1f7f9e4e5fe02896078a87a319c7b257208dac49346c8f03b36c685848760405161239692919061401b565b60405180910390a250505050505050565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154670de0b6b3a7640000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461244061294a565b61244a919061426b565b6124538561144b565b61245d9190614211565b61246791906141e0565b612471919061418a565b9050919050565b600033905090565b600061248b82612995565b90506000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015490506000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548060200260200160405190810160405280929190818152602001828054801561256257602002820191906000526020600020905b81548152602001906001019080831161254e575b505050505090506000600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018190555081600860008282546125c3919061426b565b9250508190555061261584837f00000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac873ffffffffffffffffffffffffffffffffffffffff1661321e9092919063ffffffff16565b6000815190505b600181106128ac57600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548061269c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002001600090559055600060106000846001856126c6919061426b565b815181106126fd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506127a682600183612762919061426b565b81518110612799577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b600960008282546127b7919061426b565b925050819055507f0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3873ffffffffffffffffffffffffffffffffffffffff166323b872dd30878560018661280a919061426b565b81518110612841577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b815260040161286793929190613d06565b600060405180830381600087803b15801561288157600080fd5b505af1158015612895573d6000803e3d6000fd5b5050505080806128a49061433e565b91505061261c565b508373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156128f3573d6000803e3d6000fd5b508373ffffffffffffffffffffffffffffffffffffffff167faef68853d1f7f9e4e5fe02896078a87a319c7b257208dac49346c8f03b36c685838360405161293c92919061401b565b60405180910390a250505050565b6000806008541415612960576007549050612992565b60045460055461296e61312e565b612978919061426b565b6129829190614211565b60075461298f919061418a565b90505b90565b60006129a082613357565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154905060008114156129fa576000915050612a95565b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055508273ffffffffffffffffffffffffffffffffffffffff167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba82604051612a889190614000565b60405180910390a2809150505b919050565b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905014612aee576000612b05565b670de0b6b3a7640000600a54612b049190614211565b5b811015612b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3e90613e60565b60405180910390fd5b6000600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805490501415612bdc57600b5482511015612bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd290613e20565b60405180910390fd5b5b505050565b612bea83613357565b60005b8251811015612e74577f0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3873ffffffffffffffffffffffffffffffffffffffff166323b872dd8530868581518110612c6d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040518463ffffffff1660e01b8152600401612c9393929190613d06565b600060405180830381600087803b158015612cad57600080fd5b505af1158015612cc1573d6000803e3d6000fd5b50505050600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101838281518110612d40577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190806001815401808255809150506001900390600052602060002001600090919091909150558360106000858481518110612dac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e49838281518110612e3c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151613148565b60096000828254612e5a919061418a565b925050819055508080612e6c90614399565b915050612bed565b507f00000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac873ffffffffffffffffffffffffffffffffffffffff166323b872dd8430846040518463ffffffff1660e01b8152600401612ed293929190613d06565b602060405180830381600087803b158015612eec57600080fd5b505af1158015612f00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f249190613874565b5080600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254612f77919061418a565b925050819055508060086000828254612f90919061418a565b925050819055508273ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c82604051612fdd9190614000565b60405180910390a2505050565b612ff2612478565b73ffffffffffffffffffffffffffffffffffffffff16613010610963565b73ffffffffffffffffffffffffffffffffffffffff1614613066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305d90613e80565b60405180910390fd5b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600654431061314157600654613143565b435b905090565b6000670de0b6b3a76400007f0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3873ffffffffffffffffffffffffffffffffffffffff1663f4ed4d15846040518263ffffffff1660e01b81526004016131ac9190614000565b60206040518083038186803b1580156131c457600080fd5b505afa1580156131d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131fc9190613874565b61320757600161320a565b60055b60ff166132179190614211565b9050919050565b61329f8363a9059cbb60e01b848460405160240161323d929190613d3d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613418565b505050565b6000805b835181101561331557828482815181106132eb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015114156133025780915050613351565b808061330d90614399565b9150506132a8565b506040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161334890613f80565b60405180910390fd5b92915050565b600554431461337d5761336861294a565b60078190555061337661312e565b6005819055505b613386816123a7565b600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030181905550600754600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555050565b600061347a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166134df9092919063ffffffff16565b90506000815111156134da578080602001905181019061349a9190613874565b6134d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016134d090613f20565b60405180910390fd5b5b505050565b60606134ee84846000856134f7565b90509392505050565b60608247101561353c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353390613e40565b60405180910390fd5b6135458561360b565b613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161357b90613ee0565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516135ad9190613cd4565b60006040518083038185875af1925050503d80600081146135ea576040519150601f19603f3d011682016040523d82523d6000602084013e6135ef565b606091505b50915091506135ff82828661362e565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561363e5782905061368e565b6000835111156136515782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016136859190613dbe565b60405180910390fd5b9392505050565b60006136a86136a3846140f3565b6140ce565b905080838252602082019050828560208602820111156136c757600080fd5b60005b858110156136f757816136dd888261376a565b8452602084019350602083019250506001810190506136ca565b5050509392505050565b60008135905061371081614843565b92915050565b600082601f83011261372757600080fd5b8135613737848260208601613695565b91505092915050565b60008135905061374f8161485a565b92915050565b6000815190506137648161485a565b92915050565b60008135905061377981614871565b92915050565b60006020828403121561379157600080fd5b600061379f84828501613701565b91505092915050565b600080604083850312156137bb57600080fd5b60006137c985828601613701565b92505060206137da85828601613740565b9150509250929050565b600080604083850312156137f757600080fd5b600061380585828601613701565b92505060206138168582860161376a565b9150509250929050565b6000806040838503121561383357600080fd5b600083013567ffffffffffffffff81111561384d57600080fd5b61385985828601613716565b925050602061386a8582860161376a565b9150509250929050565b60006020828403121561388657600080fd5b600061389484828501613755565b91505092915050565b6000602082840312156138af57600080fd5b60006138bd8482850161376a565b91505092915050565b600080604083850312156138d957600080fd5b60006138e78582860161376a565b925050602083013567ffffffffffffffff81111561390457600080fd5b61391085828601613716565b9150509250929050565b6000806040838503121561392d57600080fd5b600061393b8582860161376a565b925050602061394c8582860161376a565b9150509250929050565b60006139628383613cb6565b60208301905092915050565b6139778161429f565b82525050565b60006139888261412f565b613992818561415d565b935061399d8361411f565b8060005b838110156139ce5781516139b58882613956565b97506139c083614150565b9250506001810190506139a1565b5085935050505092915050565b6139e4816142b1565b82525050565b60006139f58261413a565b6139ff818561416e565b9350613a0f81856020860161430b565b80840191505092915050565b613a24816142e7565b82525050565b6000613a3582614145565b613a3f8185614179565b9350613a4f81856020860161430b565b613a588161446f565b840191505092915050565b6000613a70602683614179565b9150613a7b82614480565b604082019050919050565b6000613a93601b83614179565b9150613a9e826144cf565b602082019050919050565b6000613ab6601683614179565b9150613ac1826144f8565b602082019050919050565b6000613ad9602683614179565b9150613ae482614521565b604082019050919050565b6000613afc601183614179565b9150613b0782614570565b602082019050919050565b6000613b1f602083614179565b9150613b2a82614599565b602082019050919050565b6000613b42602d83614179565b9150613b4d826145c2565b604082019050919050565b6000613b65601783614179565b9150613b7082614611565b602082019050919050565b6000613b88601d83614179565b9150613b938261463a565b602082019050919050565b6000613bab602883614179565b9150613bb682614663565b604082019050919050565b6000613bce602a83614179565b9150613bd9826146b2565b604082019050919050565b6000613bf1600b83614179565b9150613bfc82614701565b602082019050919050565b6000613c14602f83614179565b9150613c1f8261472a565b604082019050919050565b6000613c37601883614179565b9150613c4282614779565b602082019050919050565b6000613c5a601f83614179565b9150613c65826147a2565b602082019050919050565b6000613c7d603783614179565b9150613c88826147cb565b604082019050919050565b6000613ca0600d83614179565b9150613cab8261481a565b602082019050919050565b613cbf816142dd565b82525050565b613cce816142dd565b82525050565b6000613ce082846139ea565b915081905092915050565b6000602082019050613d00600083018461396e565b92915050565b6000606082019050613d1b600083018661396e565b613d28602083018561396e565b613d356040830184613cc5565b949350505050565b6000604082019050613d52600083018561396e565b613d5f6020830184613cc5565b9392505050565b60006020820190508181036000830152613d80818461397d565b905092915050565b6000602082019050613d9d60008301846139db565b92915050565b6000602082019050613db86000830184613a1b565b92915050565b60006020820190508181036000830152613dd88184613a2a565b905092915050565b60006020820190508181036000830152613df981613a63565b9050919050565b60006020820190508181036000830152613e1981613a86565b9050919050565b60006020820190508181036000830152613e3981613aa9565b9050919050565b60006020820190508181036000830152613e5981613acc565b9050919050565b60006020820190508181036000830152613e7981613aef565b9050919050565b60006020820190508181036000830152613e9981613b12565b9050919050565b60006020820190508181036000830152613eb981613b35565b9050919050565b60006020820190508181036000830152613ed981613b58565b9050919050565b60006020820190508181036000830152613ef981613b7b565b9050919050565b60006020820190508181036000830152613f1981613b9e565b9050919050565b60006020820190508181036000830152613f3981613bc1565b9050919050565b60006020820190508181036000830152613f5981613be4565b9050919050565b60006020820190508181036000830152613f7981613c07565b9050919050565b60006020820190508181036000830152613f9981613c2a565b9050919050565b60006020820190508181036000830152613fb981613c4d565b9050919050565b60006020820190508181036000830152613fd981613c70565b9050919050565b60006020820190508181036000830152613ff981613c93565b9050919050565b60006020820190506140156000830184613cc5565b92915050565b60006040820190506140306000830185613cc5565b8181036020830152614042818461397d565b90509392505050565b60006080820190506140606000830187613cc5565b8181036020830152614072818661397d565b90506140816040830185613cc5565b61408e6060830184613cc5565b95945050505050565b60006060820190506140ac6000830186613cc5565b6140b96020830185613cc5565b6140c66040830184613cc5565b949350505050565b60006140d86140e9565b90506140e48282614368565b919050565b6000604051905090565b600067ffffffffffffffff82111561410e5761410d614440565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000614195826142dd565b91506141a0836142dd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156141d5576141d46143e2565b5b828201905092915050565b60006141eb826142dd565b91506141f6836142dd565b92508261420657614205614411565b5b828204905092915050565b600061421c826142dd565b9150614227836142dd565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156142605761425f6143e2565b5b828202905092915050565b6000614276826142dd565b9150614281836142dd565b925082821015614294576142936143e2565b5b828203905092915050565b60006142aa826142bd565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006142f2826142f9565b9050919050565b6000614304826142bd565b9050919050565b60005b8381101561432957808201518184015260208101905061430e565b83811115614338576000848401525b50505050565b6000614349826142dd565b9150600082141561435d5761435c6143e2565b5b600182039050919050565b6143718261446f565b810181811067ffffffffffffffff821117156143905761438f614440565b5b80604052505050565b60006143a4826142dd565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143d7576143d66143e2565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f656d657267656e63792077697468647261772064697361626c65640000000000600082015250565b7f6e6f7420656e6f756768206d656d626572736869707300000000000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f6e6f7420656e6f75676820746f6b656e73000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f72656d61696e696e6720746f6b656e73206c657373207468656e206d696e696d60008201527f756d546f6b656e416d6f756e7400000000000000000000000000000000000000602082015250565b7f7a65726f207265776172647320746f2068617276657374000000000000000000600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f47656e4172744163636573733a2063616c6c6572206973206e6f742067656e6160008201527f72742061646d696e000000000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f7a65726f20736861726573000000000000000000000000000000000000000000600082015250565b7f47656e4172744163636573733a2063616c6c6572206973206e6f74207468652060008201527f6f776e6572206e6f722061646d696e0000000000000000000000000000000000602082015250565b7f76616c7565206e6f7420666f756e6420696e2061727261790000000000000000600082015250565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b7f72656d61696e696e67206d656d6265727368697073206c657373207468656e2060008201527f6d696e696d756d4d656d62657273686970416d6f756e74000000000000000000602082015250565b7f617373657473206c6f636b656400000000000000000000000000000000000000600082015250565b61484c8161429f565b811461485757600080fd5b50565b614863816142b1565b811461486e57600080fd5b50565b61487a816142dd565b811461488557600080fd5b5056fea2646970667358221220582813dc4d02f63c976924833c8383c6ea3882d411027b1d1fe6fc2aff7235e764736f6c63430008040033

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

0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f3800000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac8

-----Decoded View---------------
Arg [0] : _genartMembership (address): 0x1Ca39c7F0F65B4Da24b094A9afac7aCf626B7f38
Arg [1] : _genartToken (address): 0x12E56851Ec22874520Dc4c7fa0A8a8d7DBa1BaC8

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001ca39c7f0f65b4da24b094a9afac7acf626b7f38
Arg [1] : 00000000000000000000000012e56851ec22874520dc4c7fa0a8a8d7dba1bac8


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.