Contract Address Details

0x2efDE281498838C5405b4284d87aC319117e9B3C

Contract Name
TheBookOfDogStake
Creator
0xacd320–1fac21 at 0x090d4b–7c8405
Balance
0 Doge
Tokens
Fetching tokens...
Transactions
38 Transactions
Transfers
50 Transfers
Gas Used
2,855,394
Last Balance Update
24760408
Contract name:
TheBookOfDogStake




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




EVM Version
default




Verified at
2022-09-13T19:34:55.106574Z

Constructor Arguments

00000000000000000000000083f5e6f0eb916c067b7ccd4e08c7078937fb4d3b000000000000000000000000b58904a0328abacf05b288e51a578471a8317b7000000000000000000000000000000000000000000000000000000a86cc92e3da

Arg [0] (address) : 0x83f5e6f0eb916c067b7ccd4e08c7078937fb4d3b
Arg [1] (address) : 0xb58904a0328abacf05b288e51a578471a8317b70
Arg [2] (uint256) : 11574074074074

              

Contract source code

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

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

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

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol


// 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);
}

// File: default_workspace/TheBookOfDogStake.sol


pragma solidity ^0.8.17;



contract TheBookOfDogStake is Ownable {

    address public token;
    address public reward;
    uint256 public emission_rate;

    address[] public stakers;
    mapping(address => uint256) public stakingBalance;
    mapping(address => bool) public hasStaked;
    mapping(address => bool) public isStaking;
    mapping(address => uint256) public tokenStakedAt;

    constructor(address _token, address _reward, uint256 _emission_rate) {
        token = _token;
        reward = _reward;
        emission_rate = _emission_rate;
    }

    function newEmissionRate(uint256 _emission_rate) external onlyOwner() {
        emission_rate = _emission_rate;
    }

    function newReward(address _reward) external onlyOwner() {
        reward = _reward;
    }

    // stake
    
    function stakeTokens(uint256 _amount) external {
        require(_amount > 0, "staking amount can not be 0");
        require(_amount <= 1000000000000, "staking amount can not be more than 10000");

        // Transfer tokens to contract for staking
        IERC20(token).transferFrom(msg.sender, address(this), _amount);

        // Update the staking balance in map
        stakingBalance[msg.sender] = stakingBalance[msg.sender] + _amount;
        tokenStakedAt[msg.sender] = block.timestamp;

        // Add user to stakers array if they haven't staked already
        if(!hasStaked[msg.sender]) {
            stakers.push(msg.sender);
        }

        // Update staking status to track
        isStaking[msg.sender] = true;
        hasStaked[msg.sender] = true;
    }

    // calculate reward

    function calculateReward() public view returns (uint256) {
        uint256 balance = stakingBalance[msg.sender];
        require(balance > 0, "staking balance can not be 0");
        uint256 timeElapsed = block.timestamp - tokenStakedAt[msg.sender];
        return balance * (timeElapsed * emission_rate) / 100000000;
    } 

    // unstake
    
    function unstakeTokens() external {

    	// get the users staking balance in stake tokens
    	uint256 balance = stakingBalance[msg.sender];
    
        // reqire the amount staked needs to be greater then 0
        require(balance > 0, "staking balance can not be 0");

        require(IERC20(reward).balanceOf(address(this)) >= calculateReward());
    
        // transfer tokens out of this contract
        IERC20(token).transfer(msg.sender, balance);
        IERC20(reward).transfer(msg.sender, calculateReward());
    
        // reset staking balance map to 0
        stakingBalance[msg.sender] = 0;
        delete tokenStakedAt[msg.sender];
    
        // update the staking status
        isStaking[msg.sender] = false;
    }

    // withdraw reward tokens from contract

    function withdrawTokens() external onlyOwner {
        uint256 balance = IERC20(reward).balanceOf(address(this));
        IERC20(reward).transfer(msg.sender, balance);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"address","name":"_reward","internalType":"address"},{"type":"uint256","name":"_emission_rate","internalType":"uint256"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"calculateReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emission_rate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasStaked","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isStaking","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newEmissionRate","inputs":[{"type":"uint256","name":"_emission_rate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"newReward","inputs":[{"type":"address","name":"_reward","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"reward","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stakeTokens","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"stakers","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"stakingBalance","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenStakedAt","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unstakeTokens","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawTokens","inputs":[]}]
            

Contract Creation Code

0x60806040523480156200001157600080fd5b50604051620018cf380380620018cf83398181016040528101906200003791906200025a565b620000576200004b620000e960201b60201c565b620000f160201b60201c565b82600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600381905550505050620002b6565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001e782620001ba565b9050919050565b620001f981620001da565b81146200020557600080fd5b50565b6000815190506200021981620001ee565b92915050565b6000819050919050565b62000234816200021f565b81146200024057600080fd5b50565b600081519050620002548162000229565b92915050565b600080600060608486031215620002765762000275620001b5565b5b6000620002868682870162000208565b9350506020620002998682870162000208565b9250506040620002ac8682870162000243565b9150509250925092565b61160980620002c66000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c80637547c7a3116100a2578063a5ce413b11610071578063a5ce413b14610280578063c93c8f341461028a578063f2fde38b146102ba578063fc0c546a146102d6578063fd5e6dd1146102f45761010b565b80637547c7a3146102205780638d8f2adb1461023c5780638da5cb5b14610246578063990c9fd9146102645761010b565b80636f49712b116100de5780636f49712b146101ac578063715018a6146101dc578063725cedd3146101e657806373b6b16b146102045761010b565b806319551d3514610110578063228cb733146101405780633a93dd091461015e57806345bc78ab1461017c575b600080fd5b61012a6004803603810190610125919061100c565b610324565b6040516101379190611052565b60405180910390f35b61014861033c565b604051610155919061107c565b60405180910390f35b610166610362565b6040516101739190611052565b60405180910390f35b6101966004803603810190610191919061100c565b610368565b6040516101a39190611052565b60405180910390f35b6101c660048036038101906101c1919061100c565b610380565b6040516101d391906110b2565b60405180910390f35b6101e46103a0565b005b6101ee6103b4565b6040516101fb9190611052565b60405180910390f35b61021e6004803603810190610219919061100c565b6104ba565b005b61023a600480360381019061023591906110f9565b610506565b005b61024461086e565b005b61024e6109ba565b60405161025b919061107c565b60405180910390f35b61027e600480360381019061027991906110f9565b6109e3565b005b6102886109f5565b005b6102a4600480360381019061029f919061100c565b610d57565b6040516102b191906110b2565b60405180910390f35b6102d460048036038101906102cf919061100c565b610d77565b005b6102de610dfa565b6040516102eb919061107c565b60405180910390f35b61030e600480360381019061030991906110f9565b610e20565b60405161031b919061107c565b60405180910390f35b60086020528060005260406000206000915090505481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60056020528060005260406000206000915090505481565b60076020528060005260406000206000915054906101000a900460ff1681565b6103a8610e5f565b6103b26000610edd565b565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811161043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043390611183565b60405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261048991906111d2565b90506305f5e1006003548261049e9190611206565b836104a99190611206565b6104b39190611277565b9250505090565b6104c2610e5f565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008111610549576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610540906112f4565b60405180910390fd5b64e8d4a51000811115610591576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058890611386565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b81526004016105f0939291906113a6565b6020604051808303816000875af115801561060f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106339190611409565b5080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067f9190611436565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107bb576004339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610876610e5f565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108d3919061107c565b602060405180830381865afa1580156108f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610914919061147f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109739291906114ac565b6020604051808303816000875af1158015610992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b69190611409565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6109eb610e5f565b8060038190555050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111610a7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7390611183565b60405180910390fd5b610a846103b4565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610adf919061107c565b602060405180830381865afa158015610afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b20919061147f565b1015610b2b57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610b889291906114ac565b6020604051808303816000875af1158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190611409565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33610c136103b4565b6040518363ffffffff1660e01b8152600401610c309291906114ac565b6020604051808303816000875af1158015610c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c739190611409565b506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60066020528060005260406000206000915054906101000a900460ff1681565b610d7f610e5f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de590611547565b60405180910390fd5b610df781610edd565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60048181548110610e3057600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610e67610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610e856109ba565b73ffffffffffffffffffffffffffffffffffffffff1614610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed2906115b3565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610fd982610fae565b9050919050565b610fe981610fce565b8114610ff457600080fd5b50565b60008135905061100681610fe0565b92915050565b60006020828403121561102257611021610fa9565b5b600061103084828501610ff7565b91505092915050565b6000819050919050565b61104c81611039565b82525050565b60006020820190506110676000830184611043565b92915050565b61107681610fce565b82525050565b6000602082019050611091600083018461106d565b92915050565b60008115159050919050565b6110ac81611097565b82525050565b60006020820190506110c760008301846110a3565b92915050565b6110d681611039565b81146110e157600080fd5b50565b6000813590506110f3816110cd565b92915050565b60006020828403121561110f5761110e610fa9565b5b600061111d848285016110e4565b91505092915050565b600082825260208201905092915050565b7f7374616b696e672062616c616e63652063616e206e6f74206265203000000000600082015250565b600061116d601c83611126565b915061117882611137565b602082019050919050565b6000602082019050818103600083015261119c81611160565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006111dd82611039565b91506111e883611039565b9250828203905081811115611200576111ff6111a3565b5b92915050565b600061121182611039565b915061121c83611039565b925082820261122a81611039565b91508282048414831517611241576112406111a3565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061128282611039565b915061128d83611039565b92508261129d5761129c611248565b5b828204905092915050565b7f7374616b696e6720616d6f756e742063616e206e6f7420626520300000000000600082015250565b60006112de601b83611126565b91506112e9826112a8565b602082019050919050565b6000602082019050818103600083015261130d816112d1565b9050919050565b7f7374616b696e6720616d6f756e742063616e206e6f74206265206d6f7265207460008201527f68616e2031303030300000000000000000000000000000000000000000000000602082015250565b6000611370602983611126565b915061137b82611314565b604082019050919050565b6000602082019050818103600083015261139f81611363565b9050919050565b60006060820190506113bb600083018661106d565b6113c8602083018561106d565b6113d56040830184611043565b949350505050565b6113e681611097565b81146113f157600080fd5b50565b600081519050611403816113dd565b92915050565b60006020828403121561141f5761141e610fa9565b5b600061142d848285016113f4565b91505092915050565b600061144182611039565b915061144c83611039565b9250828201905080821115611464576114636111a3565b5b92915050565b600081519050611479816110cd565b92915050565b60006020828403121561149557611494610fa9565b5b60006114a38482850161146a565b91505092915050565b60006040820190506114c1600083018561106d565b6114ce6020830184611043565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611531602683611126565b915061153c826114d5565b604082019050919050565b6000602082019050818103600083015261156081611524565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061159d602083611126565b91506115a882611567565b602082019050919050565b600060208201905081810360008301526115cc81611590565b905091905056fea26469706673582212207aa76d9233147a252f972cca1c9d64a47cdd88b8e69449c8e10573460bdda20b64736f6c6343000811003300000000000000000000000083f5e6f0eb916c067b7ccd4e08c7078937fb4d3b000000000000000000000000b58904a0328abacf05b288e51a578471a8317b7000000000000000000000000000000000000000000000000000000a86cc92e3da

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80637547c7a3116100a2578063a5ce413b11610071578063a5ce413b14610280578063c93c8f341461028a578063f2fde38b146102ba578063fc0c546a146102d6578063fd5e6dd1146102f45761010b565b80637547c7a3146102205780638d8f2adb1461023c5780638da5cb5b14610246578063990c9fd9146102645761010b565b80636f49712b116100de5780636f49712b146101ac578063715018a6146101dc578063725cedd3146101e657806373b6b16b146102045761010b565b806319551d3514610110578063228cb733146101405780633a93dd091461015e57806345bc78ab1461017c575b600080fd5b61012a6004803603810190610125919061100c565b610324565b6040516101379190611052565b60405180910390f35b61014861033c565b604051610155919061107c565b60405180910390f35b610166610362565b6040516101739190611052565b60405180910390f35b6101966004803603810190610191919061100c565b610368565b6040516101a39190611052565b60405180910390f35b6101c660048036038101906101c1919061100c565b610380565b6040516101d391906110b2565b60405180910390f35b6101e46103a0565b005b6101ee6103b4565b6040516101fb9190611052565b60405180910390f35b61021e6004803603810190610219919061100c565b6104ba565b005b61023a600480360381019061023591906110f9565b610506565b005b61024461086e565b005b61024e6109ba565b60405161025b919061107c565b60405180910390f35b61027e600480360381019061027991906110f9565b6109e3565b005b6102886109f5565b005b6102a4600480360381019061029f919061100c565b610d57565b6040516102b191906110b2565b60405180910390f35b6102d460048036038101906102cf919061100c565b610d77565b005b6102de610dfa565b6040516102eb919061107c565b60405180910390f35b61030e600480360381019061030991906110f9565b610e20565b60405161031b919061107c565b60405180910390f35b60086020528060005260406000206000915090505481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60056020528060005260406000206000915090505481565b60076020528060005260406000206000915054906101000a900460ff1681565b6103a8610e5f565b6103b26000610edd565b565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811161043c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043390611183565b60405180910390fd5b6000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261048991906111d2565b90506305f5e1006003548261049e9190611206565b836104a99190611206565b6104b39190611277565b9250505090565b6104c2610e5f565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008111610549576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610540906112f4565b60405180910390fd5b64e8d4a51000811115610591576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058890611386565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b81526004016105f0939291906113a6565b6020604051808303816000875af115801561060f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106339190611409565b5080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461067f9190611436565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166107bb576004339080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6001600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610876610e5f565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108d3919061107c565b602060405180830381865afa1580156108f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610914919061147f565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b81526004016109739291906114ac565b6020604051808303816000875af1158015610992573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b69190611409565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6109eb610e5f565b8060038190555050565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111610a7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7390611183565b60405180910390fd5b610a846103b4565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610adf919061107c565b602060405180830381865afa158015610afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b20919061147f565b1015610b2b57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610b889291906114ac565b6020604051808303816000875af1158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190611409565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33610c136103b4565b6040518363ffffffff1660e01b8152600401610c309291906114ac565b6020604051808303816000875af1158015610c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c739190611409565b506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090556000600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60066020528060005260406000206000915054906101000a900460ff1681565b610d7f610e5f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610dee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de590611547565b60405180910390fd5b610df781610edd565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60048181548110610e3057600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610e67610fa1565b73ffffffffffffffffffffffffffffffffffffffff16610e856109ba565b73ffffffffffffffffffffffffffffffffffffffff1614610edb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed2906115b3565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610fd982610fae565b9050919050565b610fe981610fce565b8114610ff457600080fd5b50565b60008135905061100681610fe0565b92915050565b60006020828403121561102257611021610fa9565b5b600061103084828501610ff7565b91505092915050565b6000819050919050565b61104c81611039565b82525050565b60006020820190506110676000830184611043565b92915050565b61107681610fce565b82525050565b6000602082019050611091600083018461106d565b92915050565b60008115159050919050565b6110ac81611097565b82525050565b60006020820190506110c760008301846110a3565b92915050565b6110d681611039565b81146110e157600080fd5b50565b6000813590506110f3816110cd565b92915050565b60006020828403121561110f5761110e610fa9565b5b600061111d848285016110e4565b91505092915050565b600082825260208201905092915050565b7f7374616b696e672062616c616e63652063616e206e6f74206265203000000000600082015250565b600061116d601c83611126565b915061117882611137565b602082019050919050565b6000602082019050818103600083015261119c81611160565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006111dd82611039565b91506111e883611039565b9250828203905081811115611200576111ff6111a3565b5b92915050565b600061121182611039565b915061121c83611039565b925082820261122a81611039565b91508282048414831517611241576112406111a3565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061128282611039565b915061128d83611039565b92508261129d5761129c611248565b5b828204905092915050565b7f7374616b696e6720616d6f756e742063616e206e6f7420626520300000000000600082015250565b60006112de601b83611126565b91506112e9826112a8565b602082019050919050565b6000602082019050818103600083015261130d816112d1565b9050919050565b7f7374616b696e6720616d6f756e742063616e206e6f74206265206d6f7265207460008201527f68616e2031303030300000000000000000000000000000000000000000000000602082015250565b6000611370602983611126565b915061137b82611314565b604082019050919050565b6000602082019050818103600083015261139f81611363565b9050919050565b60006060820190506113bb600083018661106d565b6113c8602083018561106d565b6113d56040830184611043565b949350505050565b6113e681611097565b81146113f157600080fd5b50565b600081519050611403816113dd565b92915050565b60006020828403121561141f5761141e610fa9565b5b600061142d848285016113f4565b91505092915050565b600061144182611039565b915061144c83611039565b9250828201905080821115611464576114636111a3565b5b92915050565b600081519050611479816110cd565b92915050565b60006020828403121561149557611494610fa9565b5b60006114a38482850161146a565b91505092915050565b60006040820190506114c1600083018561106d565b6114ce6020830184611043565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611531602683611126565b915061153c826114d5565b604082019050919050565b6000602082019050818103600083015261156081611524565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061159d602083611126565b91506115a882611567565b602082019050919050565b600060208201905081810360008301526115cc81611590565b905091905056fea26469706673582212207aa76d9233147a252f972cca1c9d64a47cdd88b8e69449c8e10573460bdda20b64736f6c63430008110033