false
false
0

Contract Address Details

0x24C42b6798adeca04bf4B1F8867309dB4E5226C7

Contract Name
RafflePool
Creator
0x898993–dfc88e at 0x76ddcc–b02478
Balance
0 FTN ( )
Tokens
Fetching tokens...
Transactions
98 Transactions
Transfers
0 Transfers
Gas Used
442,242,967
Last Balance Update
4283713
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
RafflePool




Optimization enabled
true
Compiler version
v0.8.17+commit.8df45f5f




Optimization runs
200
EVM Version
default




Verified at
2024-05-20T14:37:51.164436Z

Constructor Arguments

00000000000000000000000004d6712d0e892096107b8914960a4087f3d3b84f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000e706f6f6c322875696e7432353629000000000000000000000000000000000000

Arg [0] (address) : 0x04d6712d0e892096107b8914960a4087f3d3b84f
Arg [1] (string) : pool2(uint256)

              

RafflePool.sol

// Sources flattened with hardhat v2.19.3 https://hardhat.org

// SPDX-License-Identifier: MIT

// File @openzeppelin/contracts/utils/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}


// File @openzeppelin/contracts/access/[email protected]

// Original license: SPDX_License_Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

/**
 * @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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 contracts/RafflePool.sol

// Original license: SPDX_License_Identifier: MIT
pragma solidity ^0.8.17;

contract RafflePool is Ownable {

    struct Payout {
        uint256 from;
        uint256 to;
        uint256 amount;
    }

    struct Pool {
        address poolAddress;
        bytes4 selector;
    }

    Pool public pool;
    uint256[] public places;
    mapping(uint256 => bool) public paidTable;

    uint256 public currentRafflePosition = 0;
    uint256 public currentPayPosition = 0;
    Payout[] public payoutStructure;


    event Claimed(address indexed user, uint256 indexed index, uint256 amount);


    receive() external payable {}
    fallback() external payable {}

    constructor(address poolAddress_, string memory functionPrototype_) {

        pool.poolAddress = poolAddress_;
        pool.selector = bytes4(keccak256(bytes(functionPrototype_)));

        (bool success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, 0));
        require(success, "RafflePool: Invalid pool address or selector");
    }

    function setPayoutStructure(uint256[] calldata payoutStructure_) external onlyOwner() {

        require(0 == payoutStructure.length, "RafflePool: Payout structure already set");

        require(0 != payoutStructure_.length, "RafflePool: Length of payout structure cannot be 0");
        require(0 == payoutStructure_.length % 3, "RafflePool: length % 3 should be 0");
        uint256 pl = payoutStructure_[payoutStructure_.length - 2];

        (bool success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, pl - 1));
        require(success, "RafflePool: Payout structure not correspond with pool");
        (success, ) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, pl));
        require(! success, "RafflePool: Payout structure not correspond with pool");

        require(0 == payoutStructure_[0], "RafflePool: Invalid payout structure");
        require(payoutStructure_[0] < payoutStructure_[1], "RafflePool: Invalid payout structure");
        payoutStructure.push(Payout({
            from: payoutStructure_[0],
            to: payoutStructure_[1],
            amount: payoutStructure_[2]
        }));

        for (uint256 i = 3; i < payoutStructure_.length; i += 3) {

            require(payoutStructure_[i] == payoutStructure[payoutStructure.length - 1].to,
                    "RafflePool: Invalid payout structure");
            require(payoutStructure_[i] < payoutStructure_[i + 1], "RafflePool: Invalid payout structure");
            payoutStructure.push(Payout({
                from: payoutStructure_[i],
                to: payoutStructure_[i + 1],
                amount: payoutStructure_[i + 2]
            }));
        }
    }

    function rafflePool(uint256 count_) external onlyOwner() {

        require(0 != payoutStructure.length, "RafflePool: Payout structure not set");

        uint256 pl = payoutStructure[payoutStructure.length - 1].to;
        require(pl != currentRafflePosition, "RafflePool: Pool already raffled");
        require(0 != count_, "RafflePool: Count must be greater than 0");
        require(currentRafflePosition + count_ - 1 < pl, "RafflePool: Out of index");

        bytes32 hash = bytes32(abi.encodePacked(blockhash(block.number - 1)));
        uint256 from = currentRafflePosition;
        currentRafflePosition += count_;

        uint256[] storage places_ = places;
        for (uint256 i = from; i < currentRafflePosition; i++) {

            places_.push(places_.length);
            uint256 n = uint256(hash) % (i + 1);
            uint256 t = places_[n];
            places_[n] = places_[places_.length - 1];
            places_[places_.length - 1] = t;
            hash = keccak256(abi.encodePacked(hash));
        }
    }

    function payWithIndex(uint256 userIndex_) external {
        _pay(userIndex_);
    }

    function payWithCount(uint256 count_) external {

        require(0 != count_, "RafflePool: Count must be greater than 0");
        uint256 pl = payoutStructure[payoutStructure.length - 1].to;
        require(currentPayPosition + count_ <= pl, "RafflePool: Out of index");

        for (uint256 i = 0; i < count_; i++) {
            _pay(currentPayPosition);
            ++currentPayPosition;
        }
    }

    function getPayoutStructure() external view returns (Payout[] memory) {
        return payoutStructure;
    }

    function getPlaces() external view returns (uint256[] memory) {
        return places;
    }

    function withdraw(address _recipient) public onlyOwner() {
        payable(_recipient).transfer(address(this).balance);
    }

    /// Helper member functions

    function _pay(uint256 index_) private {

        uint256 pl = payoutStructure[payoutStructure.length - 1].to;
        require(pl == currentRafflePosition,  "RafflePool: Raffle not ended");
        require(pl > currentPayPosition, "RafflePool: Pool already paid");

        if (paidTable[index_]) {
            return;
        }
        (bool success, bytes memory data) = pool.poolAddress.call(abi.encodeWithSelector(pool.selector, index_));
        require(success, "RafflePool: Pool call failed");
        address ua = _bytesToAddress(data);

        Payout memory payout;
        for (uint256 i = 0; i < payoutStructure.length; i++) {
            payout = payoutStructure[i];
            if (payout.from <= places[index_] && places[index_] < payout.to) {
                paidTable[index_] = true;
                (success,) = payable(ua).call{ value: payout.amount }("");
                require(success, "RafflePool: transfer failed");
                emit Claimed(ua, index_, payout.amount);
                return;
            }
        }
    }

    function _bytesToAddress(bytes memory data) private pure returns (address addr) {
        require(data.length >= 20, "RafflePool: Invalid address data");
        assembly {
            addr := mload(add(data, 0x20))
        }
    }
}
        

Compiler Settings

{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{"RafflePool.sol":{"FTN":"0x6749840C3239B4C9C9aC44874E2AB386c51e3b3B"}}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"poolAddress_","internalType":"address"},{"type":"string","name":"functionPrototype_","internalType":"string"}]},{"type":"event","name":"Claimed","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"uint256","name":"index","internalType":"uint256","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentPayPosition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentRafflePosition","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct RafflePool.Payout[]","components":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"to","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}]}],"name":"getPayoutStructure","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getPlaces","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paidTable","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"payWithCount","inputs":[{"type":"uint256","name":"count_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"payWithIndex","inputs":[{"type":"uint256","name":"userIndex_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"from","internalType":"uint256"},{"type":"uint256","name":"to","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"}],"name":"payoutStructure","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"places","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"poolAddress","internalType":"address"},{"type":"bytes4","name":"selector","internalType":"bytes4"}],"name":"pool","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rafflePool","inputs":[{"type":"uint256","name":"count_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPayoutStructure","inputs":[{"type":"uint256[]","name":"payoutStructure_","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[{"type":"address","name":"_recipient","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x6080604052600060045560006005553480156200001b57600080fd5b5060405162001a8638038062001a868339810160408190526200003e9162000223565b620000493362000197565b60018054825160208401206001600160a01b038581166001600160c01b031990931692909217600160a01b60e092831c8102919091179384905560405160006024820181905294938416939190910490911b9060440160408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051620000df9190620002fe565b6000604051808303816000865af19150503d80600081146200011e576040519150601f19603f3d011682016040523d82523d6000602084013e62000123565b606091505b50509050806200018e5760405162461bcd60e51b815260206004820152602c60248201527f526166666c65506f6f6c3a20496e76616c696420706f6f6c206164647265737360448201526b1037b91039b2b632b1ba37b960a11b606482015260840160405180910390fd5b5050506200031c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200021a57818101518382015260200162000200565b50506000910152565b600080604083850312156200023757600080fd5b82516001600160a01b03811681146200024f57600080fd5b60208401519092506001600160401b03808211156200026d57600080fd5b818501915085601f8301126200028257600080fd5b815181811115620002975762000297620001e7565b604051601f8201601f19908116603f01168101908382118183101715620002c257620002c2620001e7565b81604052828152886020848701011115620002dc57600080fd5b620002ef836020830160208801620001fd565b80955050505050509250929050565b6000825162000312818460208701620001fd565b9190910192915050565b61175a806200032c6000396000f3fe6080604052600436106100eb5760003560e01c80639c2d2d8e11610084578063cc5ee36511610056578063cc5ee365146102d2578063e557bb4e146102e8578063f289eaa514610308578063f2fde38b1461034357005b80639c2d2d8e14610230578063a980e79f14610252578063bc23f84814610272578063c7634a791461029257005b806351cff8d9116100bd57806351cff8d9146101b3578063715018a6146101d35780638da5cb5b146101e85780639494582d1461021057005b806308d62b03146100f45780630cff68271461011457806316f0115b1461013d5780633b0e84de1461019157005b366100f257005b005b34801561010057600080fd5b506100f261010f3660046113ff565b610363565b34801561012057600080fd5b5061012a60045481565b6040519081526020015b60405180910390f35b34801561014957600080fd5b50600154610169906001600160a01b03811690600160a01b900460e01b82565b604080516001600160a01b0390931683526001600160e01b0319909116602083015201610134565b34801561019d57600080fd5b506101a661045c565b6040516101349190611418565b3480156101bf57600080fd5b506100f26101ce36600461145c565b6104b4565b3480156101df57600080fd5b506100f26104f5565b3480156101f457600080fd5b506000546040516001600160a01b039091168152602001610134565b34801561021c57600080fd5b506100f261022b36600461148c565b610509565b34801561023c57600080fd5b50610245610ad5565b6040516101349190611501565b34801561025e57600080fd5b506100f261026d3660046113ff565b610b52565b34801561027e57600080fd5b506100f261028d3660046113ff565b610e31565b34801561029e57600080fd5b506102c26102ad3660046113ff565b60036020526000908152604090205460ff1681565b6040519015158152602001610134565b3480156102de57600080fd5b5061012a60055481565b3480156102f457600080fd5b5061012a6103033660046113ff565b610e3d565b34801561031457600080fd5b506103286103233660046113ff565b610e5e565b60408051938452602084019290925290820152606001610134565b34801561034f57600080fd5b506100f261035e36600461145c565b610e91565b8060000361038c5760405162461bcd60e51b81526004016103839061155a565b60405180910390fd5b60068054600091906103a0906001906115b8565b815481106103b0576103b06115d1565b906000526020600020906003020160010154905080826005546103d391906115e7565b111561041c5760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b6044820152606401610383565b60005b8281101561045757610432600554610f07565b600560008154610441906115fa565b909155508061044f816115fa565b91505061041f565b505050565b606060028054806020026020016040519081016040528092919081815260200182805480156104aa57602002820191906000526020600020905b815481526020019060010190808311610496575b5050505050905090565b6104bc6112f9565b6040516001600160a01b038216904780156108fc02916000818181858888f193505050501580156104f1573d6000803e3d6000fd5b5050565b6104fd6112f9565b6105076000611353565b565b6105116112f9565b600654156105725760405162461bcd60e51b815260206004820152602860248201527f526166666c65506f6f6c3a205061796f75742073747275637475726520616c726044820152671958591e481cd95d60c21b6064820152608401610383565b60008190036105de5760405162461bcd60e51b815260206004820152603260248201527f526166666c65506f6f6c3a204c656e677468206f66207061796f75742073747260448201527107563747572652063616e6e6f7420626520360741b6064820152608401610383565b6105e9600382611613565b156106415760405162461bcd60e51b815260206004820152602260248201527f526166666c65506f6f6c3a206c656e677468202520332073686f756c64206265604482015261020360f41b6064820152608401610383565b600082826106506002826115b8565b81811061065f5761065f6115d1565b600180546020909202939093013593506000926001600160a01b0382169250600160a01b90910460e01b9061069490856115b8565b6040516024016106a691815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516106e49190611635565b6000604051808303816000865af19150503d8060008114610721576040519150601f19603f3d011682016040523d82523d6000602084013e610726565b606091505b50509050806107475760405162461bcd60e51b815260040161038390611664565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b03191617905290516001600160a01b03909216916107a59190611635565b6000604051808303816000865af19150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b5090915050801561080a5760405162461bcd60e51b815260040161038390611664565b8383600081811061081d5761081d6115d1565b905060200201356000146108435760405162461bcd60e51b8152600401610383906116b9565b83836001818110610856576108566115d1565b9050602002013584846000818110610870576108706115d1565b90506020020135106108945760405162461bcd60e51b8152600401610383906116b9565b60066040518060600160405280868660008181106108b4576108b46115d1565b905060200201358152602001868660018181106108d3576108d36115d1565b905060200201358152602001868660028181106108f2576108f26115d1565b60209081029290920135909252835460018181018655600095865294829020845160039283029091019081559184015194820194909455604090920151600290920191909155505b83811015610ace5760068054610952906001906115b8565b81548110610962576109626115d1565b906000526020600020906003020160010154858583818110610986576109866115d1565b90506020020135146109aa5760405162461bcd60e51b8152600401610383906116b9565b84846109b78360016115e7565b8181106109c6576109c66115d1565b905060200201358585838181106109df576109df6115d1565b9050602002013510610a035760405162461bcd60e51b8152600401610383906116b9565b60066040518060600160405280878785818110610a2257610a226115d1565b9050602002013581526020018787856001610a3d91906115e7565b818110610a4c57610a4c6115d1565b9050602002013581526020018787856002610a6791906115e7565b818110610a7657610a766115d1565b6020908102929092013590925283546001818101865560009586529482902084516003928302909101908155918401519482019490945560409092015160029092019190915550610ac790826115e7565b905061093a565b5050505050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015610b495783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610af9565b50505050905090565b610b5a6112f9565b600654600003610bb85760405162461bcd60e51b8152602060048201526024808201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f74604482015263081cd95d60e21b6064820152608401610383565b6006805460009190610bcc906001906115b8565b81548110610bdc57610bdc6115d1565b90600052602060002090600302016001015490506004548103610c415760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920726166666c65646044820152606401610383565b81600003610c615760405162461bcd60e51b81526004016103839061155a565b80600183600454610c7291906115e7565b610c7c91906115b8565b10610cc45760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b6044820152606401610383565b6000610cd16001436115b8565b604080519140602083015201604051602081830303815290604052610cf5906116fd565b6004805491925084906000610d0a83856115e7565b9091555060029050815b600454811015610e2957815460018082018455600084815260208120830192909255610d419083906115e7565b610d4b9086611613565b90506000838281548110610d6157610d616115d1565b906000526020600020015490508360018580549050610d8091906115b8565b81548110610d9057610d906115d1565b9060005260206000200154848381548110610dad57610dad6115d1565b600091825260209091200155835481908590610dcb906001906115b8565b81548110610ddb57610ddb6115d1565b906000526020600020018190555085604051602001610dfc91815260200190565b60405160208183030381529060405280519060200120955050508080610e21906115fa565b915050610d14565b505050505050565b610e3a81610f07565b50565b60028181548110610e4d57600080fd5b600091825260209091200154905081565b60068181548110610e6e57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b610e996112f9565b6001600160a01b038116610efe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610383565b610e3a81611353565b6006805460009190610f1b906001906115b8565b81548110610f2b57610f2b6115d1565b90600052602060002090600302016001015490506004548114610f905760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20526166666c65206e6f7420656e646564000000006044820152606401610383565b6005548111610fe15760405162461bcd60e51b815260206004820152601d60248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920706169640000006044820152606401610383565b60008281526003602052604090205460ff1615610ffc575050565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b039091169161105f9190611635565b6000604051808303816000865af19150503d806000811461109c576040519150601f19603f3d011682016040523d82523d6000602084013e6110a1565b606091505b5091509150816110f35760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20506f6f6c2063616c6c206661696c6564000000006044820152606401610383565b60006110fe826113a3565b905061112460405180606001604052806000815260200160008152602001600081525090565b60005b6006548110156112f05760068181548110611144576111446115d1565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050915060028781548110611190576111906115d1565b90600052602060002001548260000151111580156111ce57508160200151600288815481106111c1576111c16115d1565b9060005260206000200154105b156112de57600087815260036020526040808220805460ff191660011790558381015190516001600160a01b0386169281818185875af1925050503d8060008114611235576040519150601f19603f3d011682016040523d82523d6000602084013e61123a565b606091505b5050809550508461128d5760405162461bcd60e51b815260206004820152601b60248201527f526166666c65506f6f6c3a207472616e73666572206661696c656400000000006044820152606401610383565b86836001600160a01b03167f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a84604001516040516112cd91815260200190565b60405180910390a350505050505050565b806112e8816115fa565b915050611127565b50505050505050565b6000546001600160a01b031633146105075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610383565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006014825110156113f75760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20496e76616c6964206164647265737320646174616044820152606401610383565b506020015190565b60006020828403121561141157600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561145057835183529284019291840191600101611434565b50909695505050505050565b60006020828403121561146e57600080fd5b81356001600160a01b038116811461148557600080fd5b9392505050565b6000806020838503121561149f57600080fd5b823567ffffffffffffffff808211156114b757600080fd5b818501915085601f8301126114cb57600080fd5b8135818111156114da57600080fd5b8660208260051b85010111156114ef57600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b8281101561154d578151805185528681015187860152850151858501526060909301929085019060010161151e565b5091979650505050505050565b60208082526028908201527f526166666c65506f6f6c3a20436f756e74206d75737420626520677265617465604082015267072207468616e20360c41b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115cb576115cb6115a2565b92915050565b634e487b7160e01b600052603260045260246000fd5b808201808211156115cb576115cb6115a2565b60006001820161160c5761160c6115a2565b5060010190565b60008261163057634e487b7160e01b600052601260045260246000fd5b500690565b6000825160005b81811015611656576020818601810151858301520161163c565b506000920191825250919050565b60208082526035908201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f746040820152740818dbdc9c995cdc1bdb99081dda5d1a081c1bdbdb605a1b606082015260800190565b60208082526024908201527f526166666c65506f6f6c3a20496e76616c6964207061796f75742073747275636040820152637475726560e01b606082015260800190565b8051602080830151919081101561171e576000198160200360031b1b821691505b5091905056fea2646970667358221220fdf8bcd33f13cfde89db60639daeed6ea5c9b0a72c85fed936920021251e5e3864736f6c6343000811003300000000000000000000000004d6712d0e892096107b8914960a4087f3d3b84f0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000e706f6f6c322875696e7432353629000000000000000000000000000000000000

Deployed ByteCode

0x6080604052600436106100eb5760003560e01c80639c2d2d8e11610084578063cc5ee36511610056578063cc5ee365146102d2578063e557bb4e146102e8578063f289eaa514610308578063f2fde38b1461034357005b80639c2d2d8e14610230578063a980e79f14610252578063bc23f84814610272578063c7634a791461029257005b806351cff8d9116100bd57806351cff8d9146101b3578063715018a6146101d35780638da5cb5b146101e85780639494582d1461021057005b806308d62b03146100f45780630cff68271461011457806316f0115b1461013d5780633b0e84de1461019157005b366100f257005b005b34801561010057600080fd5b506100f261010f3660046113ff565b610363565b34801561012057600080fd5b5061012a60045481565b6040519081526020015b60405180910390f35b34801561014957600080fd5b50600154610169906001600160a01b03811690600160a01b900460e01b82565b604080516001600160a01b0390931683526001600160e01b0319909116602083015201610134565b34801561019d57600080fd5b506101a661045c565b6040516101349190611418565b3480156101bf57600080fd5b506100f26101ce36600461145c565b6104b4565b3480156101df57600080fd5b506100f26104f5565b3480156101f457600080fd5b506000546040516001600160a01b039091168152602001610134565b34801561021c57600080fd5b506100f261022b36600461148c565b610509565b34801561023c57600080fd5b50610245610ad5565b6040516101349190611501565b34801561025e57600080fd5b506100f261026d3660046113ff565b610b52565b34801561027e57600080fd5b506100f261028d3660046113ff565b610e31565b34801561029e57600080fd5b506102c26102ad3660046113ff565b60036020526000908152604090205460ff1681565b6040519015158152602001610134565b3480156102de57600080fd5b5061012a60055481565b3480156102f457600080fd5b5061012a6103033660046113ff565b610e3d565b34801561031457600080fd5b506103286103233660046113ff565b610e5e565b60408051938452602084019290925290820152606001610134565b34801561034f57600080fd5b506100f261035e36600461145c565b610e91565b8060000361038c5760405162461bcd60e51b81526004016103839061155a565b60405180910390fd5b60068054600091906103a0906001906115b8565b815481106103b0576103b06115d1565b906000526020600020906003020160010154905080826005546103d391906115e7565b111561041c5760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b6044820152606401610383565b60005b8281101561045757610432600554610f07565b600560008154610441906115fa565b909155508061044f816115fa565b91505061041f565b505050565b606060028054806020026020016040519081016040528092919081815260200182805480156104aa57602002820191906000526020600020905b815481526020019060010190808311610496575b5050505050905090565b6104bc6112f9565b6040516001600160a01b038216904780156108fc02916000818181858888f193505050501580156104f1573d6000803e3d6000fd5b5050565b6104fd6112f9565b6105076000611353565b565b6105116112f9565b600654156105725760405162461bcd60e51b815260206004820152602860248201527f526166666c65506f6f6c3a205061796f75742073747275637475726520616c726044820152671958591e481cd95d60c21b6064820152608401610383565b60008190036105de5760405162461bcd60e51b815260206004820152603260248201527f526166666c65506f6f6c3a204c656e677468206f66207061796f75742073747260448201527107563747572652063616e6e6f7420626520360741b6064820152608401610383565b6105e9600382611613565b156106415760405162461bcd60e51b815260206004820152602260248201527f526166666c65506f6f6c3a206c656e677468202520332073686f756c64206265604482015261020360f41b6064820152608401610383565b600082826106506002826115b8565b81811061065f5761065f6115d1565b600180546020909202939093013593506000926001600160a01b0382169250600160a01b90910460e01b9061069490856115b8565b6040516024016106a691815260200190565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516106e49190611635565b6000604051808303816000865af19150503d8060008114610721576040519150601f19603f3d011682016040523d82523d6000602084013e610726565b606091505b50509050806107475760405162461bcd60e51b815260040161038390611664565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b03191617905290516001600160a01b03909216916107a59190611635565b6000604051808303816000865af19150503d80600081146107e2576040519150601f19603f3d011682016040523d82523d6000602084013e6107e7565b606091505b5090915050801561080a5760405162461bcd60e51b815260040161038390611664565b8383600081811061081d5761081d6115d1565b905060200201356000146108435760405162461bcd60e51b8152600401610383906116b9565b83836001818110610856576108566115d1565b9050602002013584846000818110610870576108706115d1565b90506020020135106108945760405162461bcd60e51b8152600401610383906116b9565b60066040518060600160405280868660008181106108b4576108b46115d1565b905060200201358152602001868660018181106108d3576108d36115d1565b905060200201358152602001868660028181106108f2576108f26115d1565b60209081029290920135909252835460018181018655600095865294829020845160039283029091019081559184015194820194909455604090920151600290920191909155505b83811015610ace5760068054610952906001906115b8565b81548110610962576109626115d1565b906000526020600020906003020160010154858583818110610986576109866115d1565b90506020020135146109aa5760405162461bcd60e51b8152600401610383906116b9565b84846109b78360016115e7565b8181106109c6576109c66115d1565b905060200201358585838181106109df576109df6115d1565b9050602002013510610a035760405162461bcd60e51b8152600401610383906116b9565b60066040518060600160405280878785818110610a2257610a226115d1565b9050602002013581526020018787856001610a3d91906115e7565b818110610a4c57610a4c6115d1565b9050602002013581526020018787856002610a6791906115e7565b818110610a7657610a766115d1565b6020908102929092013590925283546001818101865560009586529482902084516003928302909101908155918401519482019490945560409092015160029092019190915550610ac790826115e7565b905061093a565b5050505050565b60606006805480602002602001604051908101604052809291908181526020016000905b82821015610b495783829060005260206000209060030201604051806060016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190610af9565b50505050905090565b610b5a6112f9565b600654600003610bb85760405162461bcd60e51b8152602060048201526024808201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f74604482015263081cd95d60e21b6064820152608401610383565b6006805460009190610bcc906001906115b8565b81548110610bdc57610bdc6115d1565b90600052602060002090600302016001015490506004548103610c415760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920726166666c65646044820152606401610383565b81600003610c615760405162461bcd60e51b81526004016103839061155a565b80600183600454610c7291906115e7565b610c7c91906115b8565b10610cc45760405162461bcd60e51b81526020600482015260186024820152770a4c2ccccd8caa0deded874409eeae840decc40d2dcc8caf60431b6044820152606401610383565b6000610cd16001436115b8565b604080519140602083015201604051602081830303815290604052610cf5906116fd565b6004805491925084906000610d0a83856115e7565b9091555060029050815b600454811015610e2957815460018082018455600084815260208120830192909255610d419083906115e7565b610d4b9086611613565b90506000838281548110610d6157610d616115d1565b906000526020600020015490508360018580549050610d8091906115b8565b81548110610d9057610d906115d1565b9060005260206000200154848381548110610dad57610dad6115d1565b600091825260209091200155835481908590610dcb906001906115b8565b81548110610ddb57610ddb6115d1565b906000526020600020018190555085604051602001610dfc91815260200190565b60405160208183030381529060405280519060200120955050508080610e21906115fa565b915050610d14565b505050505050565b610e3a81610f07565b50565b60028181548110610e4d57600080fd5b600091825260209091200154905081565b60068181548110610e6e57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b610e996112f9565b6001600160a01b038116610efe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610383565b610e3a81611353565b6006805460009190610f1b906001906115b8565b81548110610f2b57610f2b6115d1565b90600052602060002090600302016001015490506004548114610f905760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20526166666c65206e6f7420656e646564000000006044820152606401610383565b6005548111610fe15760405162461bcd60e51b815260206004820152601d60248201527f526166666c65506f6f6c3a20506f6f6c20616c726561647920706169640000006044820152606401610383565b60008281526003602052604090205460ff1615610ffc575050565b60015460408051602480820186905282518083039091018152604490910182526020810180516001600160e01b0316600160a01b850460e01b6001600160e01b031916179052905160009283926001600160a01b039091169161105f9190611635565b6000604051808303816000865af19150503d806000811461109c576040519150601f19603f3d011682016040523d82523d6000602084013e6110a1565b606091505b5091509150816110f35760405162461bcd60e51b815260206004820152601c60248201527f526166666c65506f6f6c3a20506f6f6c2063616c6c206661696c6564000000006044820152606401610383565b60006110fe826113a3565b905061112460405180606001604052806000815260200160008152602001600081525090565b60005b6006548110156112f05760068181548110611144576111446115d1565b90600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050915060028781548110611190576111906115d1565b90600052602060002001548260000151111580156111ce57508160200151600288815481106111c1576111c16115d1565b9060005260206000200154105b156112de57600087815260036020526040808220805460ff191660011790558381015190516001600160a01b0386169281818185875af1925050503d8060008114611235576040519150601f19603f3d011682016040523d82523d6000602084013e61123a565b606091505b5050809550508461128d5760405162461bcd60e51b815260206004820152601b60248201527f526166666c65506f6f6c3a207472616e73666572206661696c656400000000006044820152606401610383565b86836001600160a01b03167f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a84604001516040516112cd91815260200190565b60405180910390a350505050505050565b806112e8816115fa565b915050611127565b50505050505050565b6000546001600160a01b031633146105075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610383565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006014825110156113f75760405162461bcd60e51b815260206004820181905260248201527f526166666c65506f6f6c3a20496e76616c6964206164647265737320646174616044820152606401610383565b506020015190565b60006020828403121561141157600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561145057835183529284019291840191600101611434565b50909695505050505050565b60006020828403121561146e57600080fd5b81356001600160a01b038116811461148557600080fd5b9392505050565b6000806020838503121561149f57600080fd5b823567ffffffffffffffff808211156114b757600080fd5b818501915085601f8301126114cb57600080fd5b8135818111156114da57600080fd5b8660208260051b85010111156114ef57600080fd5b60209290920196919550909350505050565b602080825282518282018190526000919060409081850190868401855b8281101561154d578151805185528681015187860152850151858501526060909301929085019060010161151e565b5091979650505050505050565b60208082526028908201527f526166666c65506f6f6c3a20436f756e74206d75737420626520677265617465604082015267072207468616e20360c41b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b818103818111156115cb576115cb6115a2565b92915050565b634e487b7160e01b600052603260045260246000fd5b808201808211156115cb576115cb6115a2565b60006001820161160c5761160c6115a2565b5060010190565b60008261163057634e487b7160e01b600052601260045260246000fd5b500690565b6000825160005b81811015611656576020818601810151858301520161163c565b506000920191825250919050565b60208082526035908201527f526166666c65506f6f6c3a205061796f757420737472756374757265206e6f746040820152740818dbdc9c995cdc1bdb99081dda5d1a081c1bdbdb605a1b606082015260800190565b60208082526024908201527f526166666c65506f6f6c3a20496e76616c6964207061796f75742073747275636040820152637475726560e01b606082015260800190565b8051602080830151919081101561171e576000198160200360031b1b821691505b5091905056fea2646970667358221220fdf8bcd33f13cfde89db60639daeed6ea5c9b0a72c85fed936920021251e5e3864736f6c63430008110033

External libraries