ETH Price: $1,968.60 (+0.96%)

Contract

0x63003d20B84176067Dc0b67988178E69A80CfF22

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Create Competiti...955752272023-05-29 6:43:52990 days ago1685342632IN
0x63003d20...9A80CfF22
0 ETH0.000249150.1
Create Competiti...955698032023-05-29 6:21:10990 days ago1685341270IN
0x63003d20...9A80CfF22
0 ETH0.000266560.1
Create Competiti...919829282023-05-18 15:11:291000 days ago1684422689IN
0x63003d20...9A80CfF22
0 ETH0.00037470.1
Create Competiti...919727272023-05-18 14:28:461000 days ago1684420126IN
0x63003d20...9A80CfF22
0 ETH0.000350550.1
Create Competiti...859613602023-04-30 20:34:401018 days ago1682886880IN
0x63003d20...9A80CfF22
0 ETH0.00033030.1
Create Competiti...854482412023-04-29 8:41:021019 days ago1682757662IN
0x63003d20...9A80CfF22
0 ETH0.000264550.1
Create Competiti...844076182023-04-26 7:05:221023 days ago1682492722IN
0x63003d20...9A80CfF22
0 ETH0.000291510.1

Latest 7 internal transactions

Parent Transaction Hash Block From To
955752272023-05-29 6:43:52990 days ago1685342632
0x63003d20...9A80CfF22
 Contract Creation0 ETH
955698032023-05-29 6:21:10990 days ago1685341270
0x63003d20...9A80CfF22
 Contract Creation0 ETH
919829282023-05-18 15:11:291000 days ago1684422689
0x63003d20...9A80CfF22
 Contract Creation0 ETH
919727272023-05-18 14:28:461000 days ago1684420126
0x63003d20...9A80CfF22
 Contract Creation0 ETH
859613602023-04-30 20:34:401018 days ago1682886880
0x63003d20...9A80CfF22
 Contract Creation0 ETH
854482412023-04-29 8:41:021019 days ago1682757662
0x63003d20...9A80CfF22
 Contract Creation0 ETH
844076182023-04-26 7:05:221023 days ago1682492722
0x63003d20...9A80CfF22
 Contract Creation0 ETH

Cross-Chain Transactions
Loading...
Loading

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

Contract Name:
CompetitionFactory

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract CompetitionFactory {
    using SafeERC20 for IERC20;
    using Counters for Counters.Counter;

    address public restrictedAddress;
    address public treasuryAddress;

    Counters.Counter private _competitionIds;

    mapping(uint256 => Competition) public competitions;

    constructor(address _restrictedAddress, address _treasuryAddress) {
        restrictedAddress = _restrictedAddress;
        treasuryAddress = _treasuryAddress;
    }

    // Event to notify when a competition is created
    event CompetitionCreated(
        uint256 id,
        address owner,
        string name,
        uint256 entryFeeAmount,
        address entryFeeToken,
        uint256 percentageForOwner,
        uint256 percentageForTreasury,
        uint256 endDate,
        string optionsJson
    );



    function createCompetition(
        string memory name,
        address owner,
        uint256 entryFeeAmount,
        address entryFeeToken,
        uint256 percentageForOwner,
        uint256 percentageForTreasury,
        uint256 endDate,
        string memory optionsJson
    ) external returns (uint256) {
        require(bytes(name).length <= 50, "Name too long");
        require(percentageForOwner <= 90, "Owner percentage too high");
        require(percentageForTreasury <= 10, "Treasury percentage too high");
        require(
            percentageForOwner + percentageForTreasury <= 100,
            "Total percentages must be less than or equal to 100%"
        );
        require(endDate > block.timestamp, "End date must be in the future");

        _competitionIds.increment();
        uint256 newCompetitionId = _competitionIds.current();

        competitions[newCompetitionId] = new Competition(
            newCompetitionId,
            owner,
            name,
            entryFeeAmount,
            entryFeeToken,
            percentageForOwner,
            percentageForTreasury,
            endDate,
            optionsJson,
            restrictedAddress,
            treasuryAddress
        );

        // emit event
        emit CompetitionCreated(
            newCompetitionId,
            owner,
            name,
            entryFeeAmount,
            entryFeeToken,
            percentageForOwner,
            percentageForTreasury,
            endDate,
            optionsJson
        );

        return newCompetitionId;
    }
}

contract Competition {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    uint256 public id;
    address public owner;
    string public name;
    uint256 public entryFeeAmount;
    address public entryFeeToken;
    uint256 public endDate;
    string public optionsJson;
    address private restrictedAddress;
    address private treasuryAddress;
    uint256 public percentageForOwner;
    uint256 public percentageForTreasury;

    struct Participant {
        address user;
        uint256 joinDate;
    }

    Participant[] public participants;
    mapping(address => bool) public hasJoined;

    mapping(uint256 => address) public winners;

    // Address -> Amount (we should use a iterable map instead of this)
    mapping(uint256 => address) public additionalRewardsAddresses;
    mapping(address => uint256) public additionalRewardsAmounts;
    uint256 public rewardCount;

    uint256 public winnerCount;
    uint256[] public rewardDistribution;

    // Event when a user joined competition
    event Joined(address user, uint256 joinDate);

    // Update the constructor with the new parameters
    constructor(
        uint256 _id,
        address _owner,
        string memory _name,
        uint256 _entryFeeAmount,
        address _entryFeeToken,
        uint256 _percentageForOwner,
        uint256 _percentageForTreasury,
        uint256 _endDate,
        string memory _optionsJson,
        address _restrictedAddress,
        address _treasuryAddress
    ) {
        id = _id;
        owner = _owner;
        name = _name;
        entryFeeAmount = _entryFeeAmount;
        entryFeeToken = _entryFeeToken;
        endDate = _endDate;
        optionsJson = _optionsJson;
        restrictedAddress = _restrictedAddress;
        treasuryAddress = _treasuryAddress;
        percentageForOwner = _percentageForOwner;
        percentageForTreasury = _percentageForTreasury;
    }

    function join() external {
        require(block.timestamp < endDate, "Competition ended");
        require(!hasJoined[msg.sender], "Already joined");

   
        if (entryFeeAmount > 0) {
             uint256 balance = IERC20(entryFeeToken).balanceOf(msg.sender);
            require(balance >= entryFeeAmount, "Insufficient balance");
            IERC20(entryFeeToken).transferFrom(
                msg.sender,
                address(this),
                entryFeeAmount
            );
        }

        participants.push(Participant(msg.sender, block.timestamp));
        hasJoined[msg.sender] = true;

        emit Joined(msg.sender, block.timestamp);
    }

    function invite(address player) external {
        // Require owner to invite
        require(msg.sender == owner, "Not authorized");
        require(block.timestamp < endDate, "Competition ended");
        require(!hasJoined[player], "Already joined");

        participants.push(Participant(player, block.timestamp));
        hasJoined[player] = true;

        emit Joined(player, block.timestamp);
    }

    function setWinners(
        address[] calldata _winners,
        uint256[] calldata rewardDistributionPercentages
    ) external {
        require(block.timestamp >= endDate, "Competition not ended");
        require(msg.sender == restrictedAddress, "Not authorized");

        require(
            _winners.length == rewardDistributionPercentages.length,
            "Invalid input"
        );

        // Validate reward distribution
        uint256 totalPercentage;
        for (uint256 i = 0; i < rewardDistributionPercentages.length; i++) {
            totalPercentage += rewardDistributionPercentages[i];
        }
        require(
            totalPercentage == 100,
            "Total reward distribution must equal 100%"
        );

        for (uint256 i = 0; i < _winners.length; i++) {
            require(hasJoined[_winners[i]], "Winner not a participant");
        }

        uint256 balance = IERC20(entryFeeToken).balanceOf(address(this));
        // owner amount is owner percentage of the total balance

        if (balance > 0) {
            uint256 ownerAmount = percentageForOwner > 0
                ? (balance * percentageForOwner) / 100
                : 0;
            uint256 treasuryAmount = percentageForTreasury > 0
                ? (balance * percentageForTreasury) / 100
                : 0;
            uint256 winnersAmount = balance - ownerAmount - treasuryAmount;

            for (uint256 i = 0; i < _winners.length; i++) {
                winners[i] = _winners[i];
                uint256 winnerAmount = (winnersAmount *
                    rewardDistributionPercentages[i]) / 100;

                // Transfer fee rewards
                IERC20(entryFeeToken).safeTransfer(_winners[i], winnerAmount);

                claimRewards(_winners[i], rewardDistributionPercentages[i]);
            }
            // Transfer fee rewards

            IERC20(entryFeeToken).safeTransfer(treasuryAddress, treasuryAmount);
            IERC20(entryFeeToken).safeTransfer(owner, ownerAmount);
        } else {
            for (uint256 i = 0; i < _winners.length; i++) {
                winners[i] = _winners[i];
                claimRewards(_winners[i], rewardDistributionPercentages[i]);
            }
        }
    }

    function claimRewards(address winner, uint256 winnerPercentage) internal {
        // Transfer additional rewards
        for (uint256 i = 0; i < rewardCount; i++) {
            address rewardAddress = additionalRewardsAddresses[i];
            uint256 rewardAmount = additionalRewardsAmounts[rewardAddress];

            if (rewardAmount > 0) {
                uint256 winnerRewardShare = (rewardAmount * winnerPercentage) /
                    100;
                IERC20(rewardAddress).safeTransfer(winner, winnerRewardShare);
            }
        }
    }

    function addReward(address _rewardAddress, uint256 _amount) external {
        require(msg.sender == owner, "Not authorized");
        require(block.timestamp < endDate, "Competition ended");
        require(_amount > 0, "Invalid amount");

        IERC20(_rewardAddress).transferFrom(
            msg.sender,
            address(this),
            _amount
        );

        // If it didn't exist, add it to the list
        if (additionalRewardsAmounts[_rewardAddress] == 0) {
            additionalRewardsAddresses[rewardCount] = _rewardAddress;

            rewardCount++;
        }

        additionalRewardsAmounts[_rewardAddress] += _amount;
    }

    // Function to see the total rewards accumulated (subtracting the amounts for owner and treasury)
    // only the ones from entry fees
    function getTotalRewards() external view returns (uint256) {
        uint256 balance = IERC20(entryFeeToken).balanceOf(address(this));

        if (balance == 0) {
            return 0;
        }

        uint256 ownerAmount = percentageForOwner > 0
            ? (balance * percentageForOwner) / 100
            : 0;
        uint256 treasuryAmount = percentageForTreasury > 0
            ? (balance * percentageForTreasury) / 100
            : 0;
        return balance - ownerAmount - treasuryAmount;
    }


    // Returns the number of players that joined
    function getParticipantsCount() external view returns (uint256) {
        return participants.length;
    }
}

// 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.8.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.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

// 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
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_restrictedAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"entryFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"entryFeeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"percentageForOwner","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"percentageForTreasury","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endDate","type":"uint256"},{"indexed":false,"internalType":"string","name":"optionsJson","type":"string"}],"name":"CompetitionCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"competitions","outputs":[{"internalType":"contract Competition","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"entryFeeAmount","type":"uint256"},{"internalType":"address","name":"entryFeeToken","type":"address"},{"internalType":"uint256","name":"percentageForOwner","type":"uint256"},{"internalType":"uint256","name":"percentageForTreasury","type":"uint256"},{"internalType":"uint256","name":"endDate","type":"uint256"},{"internalType":"string","name":"optionsJson","type":"string"}],"name":"createCompetition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restrictedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

0x608060405234801561001057600080fd5b5060405161228138038061228183398101604081905261002f9161007c565b600080546001600160a01b039384166001600160a01b031991821617909155600180549290931691161790556100af565b80516001600160a01b038116811461007757600080fd5b919050565b6000806040838503121561008f57600080fd5b61009883610060565b91506100a660208401610060565b90509250929050565b6121c3806100be6000396000f3fe60806040523480156200001157600080fd5b5060043610620000525760003560e01c80637f4ae68d14620000575780639f6828d91462000088578063c5f956af14620000b4578063d081844214620000c8575b600080fd5b6000546200006b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6200006b62000099366004620003ce565b6003602052600090815260409020546001600160a01b031681565b6001546200006b906001600160a01b031681565b620000df620000d9366004620004b0565b620000ee565b6040519081526020016200007f565b6000603289511115620001385760405162461bcd60e51b815260206004820152600d60248201526c4e616d6520746f6f206c6f6e6760981b60448201526064015b60405180910390fd5b605a8511156200018b5760405162461bcd60e51b815260206004820152601960248201527f4f776e65722070657263656e7461676520746f6f20686967680000000000000060448201526064016200012f565b600a841115620001de5760405162461bcd60e51b815260206004820152601c60248201527f54726561737572792070657263656e7461676520746f6f20686967680000000060448201526064016200012f565b6064620001ec858762000567565b1115620002595760405162461bcd60e51b815260206004820152603460248201527f546f74616c2070657263656e7461676573206d757374206265206c657373207460448201527368616e206f7220657175616c20746f203130302560601b60648201526084016200012f565b428311620002aa5760405162461bcd60e51b815260206004820152601e60248201527f456e642064617465206d75737420626520696e2074686520667574757265000060448201526064016200012f565b620002b9600280546001019055565b6000620002c560025490565b905080898b8a8a8a8a8a8a60008054906101000a90046001600160a01b0316600160009054906101000a90046001600160a01b03166040516200030890620003c0565b6200031e9b9a99989796959493929190620005d7565b604051809103906000f0801580156200033b573d6000803e3d6000fd5b506000828152600360205260409081902080546001600160a01b0319166001600160a01b039390931692909217909155517f7e12b57fe8cba0b2806a08c93d4374a27c4b8e4f0047d8c609df7936d3a09afc90620003ab9083908c908e908d908d908d908d908d908d9062000662565b60405180910390a19998505050505050505050565b611ab580620006d983390190565b600060208284031215620003e157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200041057600080fd5b813567ffffffffffffffff808211156200042e576200042e620003e8565b604051601f8301601f19908116603f01168101908282118183101715620004595762000459620003e8565b816040528381528660208588010111156200047357600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b0381168114620004ab57600080fd5b919050565b600080600080600080600080610100898b031215620004ce57600080fd5b883567ffffffffffffffff80821115620004e757600080fd5b620004f58c838d01620003fe565b99506200050560208c0162000493565b985060408b013597506200051c60608c0162000493565b965060808b0135955060a08b0135945060c08b0135935060e08b01359150808211156200054857600080fd5b50620005578b828c01620003fe565b9150509295985092959890939650565b808201808211156200058957634e487b7160e01b600052601160045260246000fd5b92915050565b6000815180845260005b81811015620005b75760208185018101518683018201520162000599565b506000602082860101526020601f19601f83011685010191505092915050565b8b81526001600160a01b038b8116602083015261016060408301819052600091620006058483018e6200058f565b91508b6060850152808b1660808501528960a08501528860c08501528760e08501528382036101008501526200063c82886200058f565b925080861661012085015280851661014085015250509c9b505050505050505050505050565b8981526001600160a01b03898116602083015261012060408301819052600091620006908483018c6200058f565b91508960608501528089166080850152508660a08401528560c08401528460e0840152828103610100840152620006c881856200058f565b9c9b50505050505050505050505056fe60806040523480156200001157600080fd5b5060405162001ab538038062001ab58339810160408190526200003491620001bc565b60008b9055600180546001600160a01b0319166001600160a01b038c161790556002620000628a8262000337565b506003889055600480546001600160a01b0319166001600160a01b0389161790556005849055600662000096848262000337565b50600780546001600160a01b039384166001600160a01b031991821617909155600880549290931691161790555050600991909155600a5550620004039350505050565b80516001600160a01b0381168114620000f257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200011f57600080fd5b81516001600160401b03808211156200013c576200013c620000f7565b604051601f8301601f19908116603f01168101908282118183101715620001675762000167620000f7565b816040528381526020925086838588010111156200018457600080fd5b600091505b83821015620001a8578582018301518183018401529082019062000189565b600093810190920192909252949350505050565b60008060008060008060008060008060006101608c8e031215620001df57600080fd5b8b519a50620001f160208d01620000da565b60408d0151909a506001600160401b038111156200020e57600080fd5b6200021c8e828f016200010d565b99505060608c015197506200023460808d01620000da565b965060a08c0151955060c08c0151945060e08c015193506101008c015160018060401b038111156200026557600080fd5b620002738e828f016200010d565b935050620002856101208d01620000da565b9150620002966101408d01620000da565b90509295989b509295989b9093969950565b600181811c90821680620002bd57607f821691505b602082108103620002de57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033257600081815260208120601f850160051c810160208610156200030d5750805b601f850160051c820191505b818110156200032e5782815560010162000319565b5050505b505050565b81516001600160401b03811115620003535762000353620000f7565b6200036b81620003648454620002a8565b84620002e4565b602080601f831160018114620003a357600084156200038a5750858301515b600019600386901b1c1916600185901b1785556200032e565b600085815260208120601f198616915b82811015620003d457888601518255948401946001909101908401620003b3565b5085821015620003f35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6116a280620004136000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063b9ad68bf1161007c578063b9ad68bf1461030d578063c24a0f8b14610315578063c4e5feb61461031e578063caa02e0814610327578063cabfaa1814610330578063e627f2db1461033857600080fd5b80638da5cb5b146102845780639bedb33d146102975780639feb8f50146102c0578063a2fb1175146102d3578063af640d0f146102fc578063b688a3631461030557600080fd5b80637295b649116101155780637295b649146101ee57806379085425146101f757806379192c85146102005780637b149763146102135780637d36f7661461023e578063877f4e121461025157600080fd5b806306fdde0314610152578063111c4422146101705780632baa7d5f1461019e57806335c1d349146101a75780634b77c468146101d9575b600080fd5b61015a610340565b6040516101679190611372565b60405180910390f35b61019061017e3660046113c1565b600f6020526000908152604090205481565b604051908152602001610167565b610190600a5481565b6101ba6101b53660046113e3565b6103ce565b604080516001600160a01b039093168352602083019190915201610167565b6101ec6101e73660046113c1565b610406565b005b61019060095481565b61019060105481565b6101ec61020e366004611448565b61059e565b600454610226906001600160a01b031681565b6040516001600160a01b039091168152602001610167565b61019061024c3660046113e3565b610abb565b61027461025f3660046113c1565b600c6020526000908152604090205460ff1681565b6040519015158152602001610167565b600154610226906001600160a01b031681565b6102266102a53660046113e3565b600e602052600090815260409020546001600160a01b031681565b6101ec6102ce3660046114b4565b610adc565b6102266102e13660046113e3565b600d602052600090815260409020546001600160a01b031681565b61019060005481565b6101ec610c6e565b61015a610f0c565b61019060055481565b61019060035481565b61019060115481565b600b54610190565b610190610f19565b6002805461034d906114de565b80601f0160208091040260200160405190810160405280929190818152602001828054610379906114de565b80156103c65780601f1061039b576101008083540402835291602001916103c6565b820191906000526020600020905b8154815290600101906020018083116103a957829003601f168201915b505050505081565b600b81815481106103de57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001546001600160a01b031633146104395760405162461bcd60e51b815260040161043090611518565b60405180910390fd5b600554421061045a5760405162461bcd60e51b815260040161043090611540565b6001600160a01b0381166000908152600c602052604090205460ff16156104b45760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610430565b6040805180820182526001600160a01b03838116808352426020808501828152600b805460018082018355600092835297517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600290920291820180546001600160a01b031916919098161790965590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90950194909455828452600c815292859020805460ff19169094179093558351908152908101919091527f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d910160405180910390a150565b6005544210156105e85760405162461bcd60e51b815260206004820152601560248201527410dbdb5c195d1a5d1a5bdb881b9bdd08195b991959605a1b6044820152606401610430565b6007546001600160a01b031633146106125760405162461bcd60e51b815260040161043090611518565b8281146106515760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610430565b6000805b828110156106955783838281811061066f5761066f61156b565b90506020020135826106819190611597565b91508061068d816115b0565b915050610655565b50806064146106f85760405162461bcd60e51b815260206004820152602960248201527f546f74616c2072657761726420646973747269627574696f6e206d75737420656044820152687175616c203130302560b81b6064820152608401610430565b60005b848110156107a957600c60008787848181106107195761071961156b565b905060200201602081019061072e91906113c1565b6001600160a01b0316815260208101919091526040016000205460ff166107975760405162461bcd60e51b815260206004820152601860248201527f57696e6e6572206e6f742061207061727469636970616e7400000000000000006044820152606401610430565b806107a1816115b0565b9150506106fb565b50600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c91906115c9565b90508015610a055760008060095411610836576000610850565b60646009548361084691906115e2565b61085091906115f9565b9050600080600a541161086457600061087e565b6064600a548461087491906115e2565b61087e91906115f9565b905060008161088d848661161b565b610897919061161b565b905060005b888110156109c2578989828181106108b6576108b661156b565b90506020020160208101906108cb91906113c1565b6000828152600d6020526040812080546001600160a01b0319166001600160a01b039390931692909217909155606489898481811061090c5761090c61156b565b905060200201358461091e91906115e2565b61092891906115f9565b90506109678b8b8481811061093f5761093f61156b565b905060200201602081019061095491906113c1565b6004546001600160a01b03169083611016565b6109af8b8b8481811061097c5761097c61156b565b905060200201602081019061099191906113c1565b8a8a858181106109a3576109a361156b565b9050602002013561106d565b50806109ba816115b0565b91505061089c565b506008546004546109e0916001600160a01b03918216911684611016565b6001546004546109fd916001600160a01b03918216911685611016565b505050610ab3565b60005b85811015610ab157868682818110610a2257610a2261156b565b9050602002016020810190610a3791906113c1565b6000828152600d6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055610a9f878783818110610a7857610a7861156b565b9050602002016020810190610a8d91906113c1565b8686848181106109a3576109a361156b565b80610aa9816115b0565b915050610a08565b505b505050505050565b60128181548110610acb57600080fd5b600091825260209091200154905081565b6001546001600160a01b03163314610b065760405162461bcd60e51b815260040161043090611518565b6005544210610b275760405162461bcd60e51b815260040161043090611540565b60008111610b685760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610430565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303816000875af1158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061162e565b506001600160a01b0382166000908152600f60205260408120549003610c3d57601080546000908152600e6020526040812080546001600160a01b0319166001600160a01b03861617905581549190610c37836115b0565b91905055505b6001600160a01b0382166000908152600f602052604081208054839290610c65908490611597565b90915550505050565b6005544210610c8f5760405162461bcd60e51b815260040161043090611540565b336000908152600c602052604090205460ff1615610ce05760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610430565b60035415610e2557600480546040516370a0823160e01b815233928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5a91906115c9565b9050600354811015610da55760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610430565b600480546003546040516323b872dd60e01b8152339381019390935230602484015260448301526001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610dfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e22919061162e565b50505b60408051808201825233808252426020808401828152600b805460018082018355600092835296517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600290920291820180546001600160a01b0319166001600160a01b0390921691909117905591517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90920191909155838152600c8252859020805460ff19169094179093558351918252918101919091527f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d910160405180910390a1565b6006805461034d906114de565b600480546040516370a0823160e01b8152309281019290925260009182916001600160a01b0316906370a0823190602401602060405180830381865afa158015610f67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8b91906115c9565b905080600003610f9d57600091505090565b60008060095411610faf576000610fc9565b606460095483610fbf91906115e2565b610fc991906115f9565b9050600080600a5411610fdd576000610ff7565b6064600a5484610fed91906115e2565b610ff791906115f9565b905080611004838561161b565b61100e919061161b565b935050505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110689084906110ec565b505050565b60005b601054811015611068576000818152600e60209081526040808320546001600160a01b0316808452600f9092529091205480156110d757600060646110b586846115e2565b6110bf91906115f9565b90506110d56001600160a01b0384168783611016565b505b505080806110e4906115b0565b915050611070565b6000611141826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111be9092919063ffffffff16565b805190915015611068578080602001905181019061115f919061162e565b6110685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610430565b60606111cd84846000856111d5565b949350505050565b6060824710156112365760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610430565b600080866001600160a01b031685876040516112529190611650565b60006040518083038185875af1925050503d806000811461128f576040519150601f19603f3d011682016040523d82523d6000602084013e611294565b606091505b50915091506112a5878383876112b0565b979650505050505050565b6060831561131f578251600003611318576001600160a01b0385163b6113185760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610430565b50816111cd565b6111cd83838151156113345781518083602001fd5b8060405162461bcd60e51b81526004016104309190611372565b60005b83811015611369578181015183820152602001611351565b50506000910152565b602081526000825180602084015261139181604085016020870161134e565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113bc57600080fd5b919050565b6000602082840312156113d357600080fd5b6113dc826113a5565b9392505050565b6000602082840312156113f557600080fd5b5035919050565b60008083601f84011261140e57600080fd5b50813567ffffffffffffffff81111561142657600080fd5b6020830191508360208260051b850101111561144157600080fd5b9250929050565b6000806000806040858703121561145e57600080fd5b843567ffffffffffffffff8082111561147657600080fd5b611482888389016113fc565b9096509450602087013591508082111561149b57600080fd5b506114a8878288016113fc565b95989497509550505050565b600080604083850312156114c757600080fd5b6114d0836113a5565b946020939093013593505050565b600181811c908216806114f257607f821691505b60208210810361151257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60208082526011908201527010dbdb5c195d1a5d1a5bdb88195b991959607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156115aa576115aa611581565b92915050565b6000600182016115c2576115c2611581565b5060010190565b6000602082840312156115db57600080fd5b5051919050565b80820281158282048414176115aa576115aa611581565b60008261161657634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156115aa576115aa611581565b60006020828403121561164057600080fd5b815180151581146113dc57600080fd5b6000825161166281846020870161134e565b919091019291505056fea264697066735822122059f2baa4b35dbdcd09bf50ea35bd3d310f010be3f00824533a55b50cefe5541d64736f6c63430008110033a2646970667358221220d83e32863a11728e6d85a9e1a577eb11e84388770c862a5a3f0926427b3c8ca264736f6c63430008110033000000000000000000000000846ff49d72f4e3ca7a3d318820c6c2debe23c68a000000000000000000000000eefc874ac40bcf8a00b4484f26f599d0ce6c0f47

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620000525760003560e01c80637f4ae68d14620000575780639f6828d91462000088578063c5f956af14620000b4578063d081844214620000c8575b600080fd5b6000546200006b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6200006b62000099366004620003ce565b6003602052600090815260409020546001600160a01b031681565b6001546200006b906001600160a01b031681565b620000df620000d9366004620004b0565b620000ee565b6040519081526020016200007f565b6000603289511115620001385760405162461bcd60e51b815260206004820152600d60248201526c4e616d6520746f6f206c6f6e6760981b60448201526064015b60405180910390fd5b605a8511156200018b5760405162461bcd60e51b815260206004820152601960248201527f4f776e65722070657263656e7461676520746f6f20686967680000000000000060448201526064016200012f565b600a841115620001de5760405162461bcd60e51b815260206004820152601c60248201527f54726561737572792070657263656e7461676520746f6f20686967680000000060448201526064016200012f565b6064620001ec858762000567565b1115620002595760405162461bcd60e51b815260206004820152603460248201527f546f74616c2070657263656e7461676573206d757374206265206c657373207460448201527368616e206f7220657175616c20746f203130302560601b60648201526084016200012f565b428311620002aa5760405162461bcd60e51b815260206004820152601e60248201527f456e642064617465206d75737420626520696e2074686520667574757265000060448201526064016200012f565b620002b9600280546001019055565b6000620002c560025490565b905080898b8a8a8a8a8a8a60008054906101000a90046001600160a01b0316600160009054906101000a90046001600160a01b03166040516200030890620003c0565b6200031e9b9a99989796959493929190620005d7565b604051809103906000f0801580156200033b573d6000803e3d6000fd5b506000828152600360205260409081902080546001600160a01b0319166001600160a01b039390931692909217909155517f7e12b57fe8cba0b2806a08c93d4374a27c4b8e4f0047d8c609df7936d3a09afc90620003ab9083908c908e908d908d908d908d908d908d9062000662565b60405180910390a19998505050505050505050565b611ab580620006d983390190565b600060208284031215620003e157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200041057600080fd5b813567ffffffffffffffff808211156200042e576200042e620003e8565b604051601f8301601f19908116603f01168101908282118183101715620004595762000459620003e8565b816040528381528660208588010111156200047357600080fd5b836020870160208301376000602085830101528094505050505092915050565b80356001600160a01b0381168114620004ab57600080fd5b919050565b600080600080600080600080610100898b031215620004ce57600080fd5b883567ffffffffffffffff80821115620004e757600080fd5b620004f58c838d01620003fe565b99506200050560208c0162000493565b985060408b013597506200051c60608c0162000493565b965060808b0135955060a08b0135945060c08b0135935060e08b01359150808211156200054857600080fd5b50620005578b828c01620003fe565b9150509295985092959890939650565b808201808211156200058957634e487b7160e01b600052601160045260246000fd5b92915050565b6000815180845260005b81811015620005b75760208185018101518683018201520162000599565b506000602082860101526020601f19601f83011685010191505092915050565b8b81526001600160a01b038b8116602083015261016060408301819052600091620006058483018e6200058f565b91508b6060850152808b1660808501528960a08501528860c08501528760e08501528382036101008501526200063c82886200058f565b925080861661012085015280851661014085015250509c9b505050505050505050505050565b8981526001600160a01b03898116602083015261012060408301819052600091620006908483018c6200058f565b91508960608501528089166080850152508660a08401528560c08401528460e0840152828103610100840152620006c881856200058f565b9c9b50505050505050505050505056fe60806040523480156200001157600080fd5b5060405162001ab538038062001ab58339810160408190526200003491620001bc565b60008b9055600180546001600160a01b0319166001600160a01b038c161790556002620000628a8262000337565b506003889055600480546001600160a01b0319166001600160a01b0389161790556005849055600662000096848262000337565b50600780546001600160a01b039384166001600160a01b031991821617909155600880549290931691161790555050600991909155600a5550620004039350505050565b80516001600160a01b0381168114620000f257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200011f57600080fd5b81516001600160401b03808211156200013c576200013c620000f7565b604051601f8301601f19908116603f01168101908282118183101715620001675762000167620000f7565b816040528381526020925086838588010111156200018457600080fd5b600091505b83821015620001a8578582018301518183018401529082019062000189565b600093810190920192909252949350505050565b60008060008060008060008060008060006101608c8e031215620001df57600080fd5b8b519a50620001f160208d01620000da565b60408d0151909a506001600160401b038111156200020e57600080fd5b6200021c8e828f016200010d565b99505060608c015197506200023460808d01620000da565b965060a08c0151955060c08c0151945060e08c015193506101008c015160018060401b038111156200026557600080fd5b620002738e828f016200010d565b935050620002856101208d01620000da565b9150620002966101408d01620000da565b90509295989b509295989b9093969950565b600181811c90821680620002bd57607f821691505b602082108103620002de57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033257600081815260208120601f850160051c810160208610156200030d5750805b601f850160051c820191505b818110156200032e5782815560010162000319565b5050505b505050565b81516001600160401b03811115620003535762000353620000f7565b6200036b81620003648454620002a8565b84620002e4565b602080601f831160018114620003a357600084156200038a5750858301515b600019600386901b1c1916600185901b1785556200032e565b600085815260208120601f198616915b82811015620003d457888601518255948401946001909101908401620003b3565b5085821015620003f35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6116a280620004136000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638da5cb5b116100c3578063b9ad68bf1161007c578063b9ad68bf1461030d578063c24a0f8b14610315578063c4e5feb61461031e578063caa02e0814610327578063cabfaa1814610330578063e627f2db1461033857600080fd5b80638da5cb5b146102845780639bedb33d146102975780639feb8f50146102c0578063a2fb1175146102d3578063af640d0f146102fc578063b688a3631461030557600080fd5b80637295b649116101155780637295b649146101ee57806379085425146101f757806379192c85146102005780637b149763146102135780637d36f7661461023e578063877f4e121461025157600080fd5b806306fdde0314610152578063111c4422146101705780632baa7d5f1461019e57806335c1d349146101a75780634b77c468146101d9575b600080fd5b61015a610340565b6040516101679190611372565b60405180910390f35b61019061017e3660046113c1565b600f6020526000908152604090205481565b604051908152602001610167565b610190600a5481565b6101ba6101b53660046113e3565b6103ce565b604080516001600160a01b039093168352602083019190915201610167565b6101ec6101e73660046113c1565b610406565b005b61019060095481565b61019060105481565b6101ec61020e366004611448565b61059e565b600454610226906001600160a01b031681565b6040516001600160a01b039091168152602001610167565b61019061024c3660046113e3565b610abb565b61027461025f3660046113c1565b600c6020526000908152604090205460ff1681565b6040519015158152602001610167565b600154610226906001600160a01b031681565b6102266102a53660046113e3565b600e602052600090815260409020546001600160a01b031681565b6101ec6102ce3660046114b4565b610adc565b6102266102e13660046113e3565b600d602052600090815260409020546001600160a01b031681565b61019060005481565b6101ec610c6e565b61015a610f0c565b61019060055481565b61019060035481565b61019060115481565b600b54610190565b610190610f19565b6002805461034d906114de565b80601f0160208091040260200160405190810160405280929190818152602001828054610379906114de565b80156103c65780601f1061039b576101008083540402835291602001916103c6565b820191906000526020600020905b8154815290600101906020018083116103a957829003601f168201915b505050505081565b600b81815481106103de57600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03909116915082565b6001546001600160a01b031633146104395760405162461bcd60e51b815260040161043090611518565b60405180910390fd5b600554421061045a5760405162461bcd60e51b815260040161043090611540565b6001600160a01b0381166000908152600c602052604090205460ff16156104b45760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610430565b6040805180820182526001600160a01b03838116808352426020808501828152600b805460018082018355600092835297517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600290920291820180546001600160a01b031916919098161790965590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90950194909455828452600c815292859020805460ff19169094179093558351908152908101919091527f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d910160405180910390a150565b6005544210156105e85760405162461bcd60e51b815260206004820152601560248201527410dbdb5c195d1a5d1a5bdb881b9bdd08195b991959605a1b6044820152606401610430565b6007546001600160a01b031633146106125760405162461bcd60e51b815260040161043090611518565b8281146106515760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610430565b6000805b828110156106955783838281811061066f5761066f61156b565b90506020020135826106819190611597565b91508061068d816115b0565b915050610655565b50806064146106f85760405162461bcd60e51b815260206004820152602960248201527f546f74616c2072657761726420646973747269627574696f6e206d75737420656044820152687175616c203130302560b81b6064820152608401610430565b60005b848110156107a957600c60008787848181106107195761071961156b565b905060200201602081019061072e91906113c1565b6001600160a01b0316815260208101919091526040016000205460ff166107975760405162461bcd60e51b815260206004820152601860248201527f57696e6e6572206e6f742061207061727469636970616e7400000000000000006044820152606401610430565b806107a1816115b0565b9150506106fb565b50600480546040516370a0823160e01b815230928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c91906115c9565b90508015610a055760008060095411610836576000610850565b60646009548361084691906115e2565b61085091906115f9565b9050600080600a541161086457600061087e565b6064600a548461087491906115e2565b61087e91906115f9565b905060008161088d848661161b565b610897919061161b565b905060005b888110156109c2578989828181106108b6576108b661156b565b90506020020160208101906108cb91906113c1565b6000828152600d6020526040812080546001600160a01b0319166001600160a01b039390931692909217909155606489898481811061090c5761090c61156b565b905060200201358461091e91906115e2565b61092891906115f9565b90506109678b8b8481811061093f5761093f61156b565b905060200201602081019061095491906113c1565b6004546001600160a01b03169083611016565b6109af8b8b8481811061097c5761097c61156b565b905060200201602081019061099191906113c1565b8a8a858181106109a3576109a361156b565b9050602002013561106d565b50806109ba816115b0565b91505061089c565b506008546004546109e0916001600160a01b03918216911684611016565b6001546004546109fd916001600160a01b03918216911685611016565b505050610ab3565b60005b85811015610ab157868682818110610a2257610a2261156b565b9050602002016020810190610a3791906113c1565b6000828152600d6020526040902080546001600160a01b0319166001600160a01b0392909216919091179055610a9f878783818110610a7857610a7861156b565b9050602002016020810190610a8d91906113c1565b8686848181106109a3576109a361156b565b80610aa9816115b0565b915050610a08565b505b505050505050565b60128181548110610acb57600080fd5b600091825260209091200154905081565b6001546001600160a01b03163314610b065760405162461bcd60e51b815260040161043090611518565b6005544210610b275760405162461bcd60e51b815260040161043090611540565b60008111610b685760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610430565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303816000875af1158015610bbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bdf919061162e565b506001600160a01b0382166000908152600f60205260408120549003610c3d57601080546000908152600e6020526040812080546001600160a01b0319166001600160a01b03861617905581549190610c37836115b0565b91905055505b6001600160a01b0382166000908152600f602052604081208054839290610c65908490611597565b90915550505050565b6005544210610c8f5760405162461bcd60e51b815260040161043090611540565b336000908152600c602052604090205460ff1615610ce05760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610430565b60035415610e2557600480546040516370a0823160e01b815233928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610d36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5a91906115c9565b9050600354811015610da55760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610430565b600480546003546040516323b872dd60e01b8152339381019390935230602484015260448301526001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610dfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e22919061162e565b50505b60408051808201825233808252426020808401828152600b805460018082018355600092835296517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9600290920291820180546001600160a01b0319166001600160a01b0390921691909117905591517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba90920191909155838152600c8252859020805460ff19169094179093558351918252918101919091527f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d910160405180910390a1565b6006805461034d906114de565b600480546040516370a0823160e01b8152309281019290925260009182916001600160a01b0316906370a0823190602401602060405180830381865afa158015610f67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8b91906115c9565b905080600003610f9d57600091505090565b60008060095411610faf576000610fc9565b606460095483610fbf91906115e2565b610fc991906115f9565b9050600080600a5411610fdd576000610ff7565b6064600a5484610fed91906115e2565b610ff791906115f9565b905080611004838561161b565b61100e919061161b565b935050505090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110689084906110ec565b505050565b60005b601054811015611068576000818152600e60209081526040808320546001600160a01b0316808452600f9092529091205480156110d757600060646110b586846115e2565b6110bf91906115f9565b90506110d56001600160a01b0384168783611016565b505b505080806110e4906115b0565b915050611070565b6000611141826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111be9092919063ffffffff16565b805190915015611068578080602001905181019061115f919061162e565b6110685760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610430565b60606111cd84846000856111d5565b949350505050565b6060824710156112365760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610430565b600080866001600160a01b031685876040516112529190611650565b60006040518083038185875af1925050503d806000811461128f576040519150601f19603f3d011682016040523d82523d6000602084013e611294565b606091505b50915091506112a5878383876112b0565b979650505050505050565b6060831561131f578251600003611318576001600160a01b0385163b6113185760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610430565b50816111cd565b6111cd83838151156113345781518083602001fd5b8060405162461bcd60e51b81526004016104309190611372565b60005b83811015611369578181015183820152602001611351565b50506000910152565b602081526000825180602084015261139181604085016020870161134e565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146113bc57600080fd5b919050565b6000602082840312156113d357600080fd5b6113dc826113a5565b9392505050565b6000602082840312156113f557600080fd5b5035919050565b60008083601f84011261140e57600080fd5b50813567ffffffffffffffff81111561142657600080fd5b6020830191508360208260051b850101111561144157600080fd5b9250929050565b6000806000806040858703121561145e57600080fd5b843567ffffffffffffffff8082111561147657600080fd5b611482888389016113fc565b9096509450602087013591508082111561149b57600080fd5b506114a8878288016113fc565b95989497509550505050565b600080604083850312156114c757600080fd5b6114d0836113a5565b946020939093013593505050565b600181811c908216806114f257607f821691505b60208210810361151257634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b60208082526011908201527010dbdb5c195d1a5d1a5bdb88195b991959607a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156115aa576115aa611581565b92915050565b6000600182016115c2576115c2611581565b5060010190565b6000602082840312156115db57600080fd5b5051919050565b80820281158282048414176115aa576115aa611581565b60008261161657634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156115aa576115aa611581565b60006020828403121561164057600080fd5b815180151581146113dc57600080fd5b6000825161166281846020870161134e565b919091019291505056fea264697066735822122059f2baa4b35dbdcd09bf50ea35bd3d310f010be3f00824533a55b50cefe5541d64736f6c63430008110033a2646970667358221220d83e32863a11728e6d85a9e1a577eb11e84388770c862a5a3f0926427b3c8ca264736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.