Contract Address Details

0xc6c6239614723298591f16bB2f779C9199b5AB1a

Token
SeaShell (SHL)
Creator
0x0690c9–bbca57 at 0xdf4530–c30f49
Balance
0 EWT ( )
Tokens
Fetching tokens...
Transactions
6,031 Transactions
Transfers
3,152 Transfers
Gas Used
1,571,383,658
Last Balance Update
29729307
Contract name:
TubbyTurtleSeaStaking




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




EVM Version
default




Verified at
2023-01-28T20:40:36.195295Z

Contract source code

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol


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

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;


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

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

// File: @openzeppelin/contracts/utils/math/SafeMath.sol


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

// 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: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;


/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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


// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;



/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

// File: staking.sol


pragma solidity ^0.8.0;






contract TubbyTurtleSeaStaking is ERC20Burnable, Ownable {
    using SafeMath for uint256;
    using SafeMath for uint8;

    uint256 public emissionsRate = 115740740740740;
    uint256 public claimEndTime = 1893500000;
    uint256 public mintedSupply = 0;
    uint256 public maxSupply = 685000000 * 1e18;

    address nullAddress = 0x0000000000000000000000000000000000000000;

    address public tubbyTurtleAddress;
    IERC20 public shellToken;
    uint256 public stakingCost = 0;
    uint8[] public turtleRarities;

    function setShellTokenAddress(address _newaddress) public onlyOwner {
        shellToken = IERC20(_newaddress);
    }

    function setTurtleRarities(uint8[] calldata _newList) public onlyOwner returns (uint8[] memory) {
        turtleRarities = _newList;
        return turtleRarities;
    }

    function setClaimEndTime(uint256 _newClaimEndTime) public onlyOwner {
        claimEndTime = _newClaimEndTime;
    }

    function setEmissionsRate(uint256 _newEmissionsRate) public onlyOwner {
        emissionsRate = _newEmissionsRate;
    }

    function getTurtleRarities()public view returns(uint8[] memory) {
        return turtleRarities;
    }

    function setStakingCost(uint256 _newStakingCost) public onlyOwner {
        stakingCost = _newStakingCost;
    }

    //Mapping of turtle to timestamp
    mapping(uint256 => uint256) internal tokenIdToTimeStamp;

    //Mapping of turtle to staker
    mapping(uint256 => address) internal tokenIdToStaker;

    //Mapping of staker to turtle
    mapping(address => uint256[]) internal stakerToTokenIds;

    constructor() ERC20("SeaShell", "SHL") {}

    function setTubbyTurtleAddress(address _tubbyTurtleAddress) public onlyOwner {
        tubbyTurtleAddress = _tubbyTurtleAddress;
    }

    function getTokensStaked(address staker) public view returns (uint256[] memory) {
        return stakerToTokenIds[staker];
    }

    function remove(address staker, uint256 index) internal {
        if (index >= stakerToTokenIds[staker].length) return;

        for (uint256 i = index; i < stakerToTokenIds[staker].length - 1; i++) {
            stakerToTokenIds[staker][i] = stakerToTokenIds[staker][i + 1];
        }
        stakerToTokenIds[staker].pop();
    }

    function removeTokenIdFromStaker(address staker, uint256 tokenId) internal {
        for (uint256 i = 0; i < stakerToTokenIds[staker].length; i++) {
            if (stakerToTokenIds[staker][i] == tokenId) {
                remove(staker, i);
            }
        }
    }

    function stakeByIds(uint256[] memory tokenIds) public {
        if (stakingCost > 0) {
            require(IERC20(shellToken).transferFrom(msg.sender, address(this), stakingCost*(tokenIds.length)));
        }
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(
                IERC721(tubbyTurtleAddress).ownerOf(tokenIds[i]) == msg.sender &&
                    tokenIdToStaker[tokenIds[i]] == nullAddress,
                "Token must be stakable by you!"
            );

            IERC721(tubbyTurtleAddress).transferFrom(
                msg.sender,
                address(this),
                tokenIds[i]
            );

            stakerToTokenIds[msg.sender].push(tokenIds[i]);

            tokenIdToTimeStamp[tokenIds[i]] = block.timestamp;
            tokenIdToStaker[tokenIds[i]] = msg.sender;
        }
    }

    function unstakeAll() public {
        require(
            stakerToTokenIds[msg.sender].length > 0,
            "Must have at least one token staked!"
        );
        uint256 totalRewards = 0;

        for (uint256 i = stakerToTokenIds[msg.sender].length; i > 0; i--) {
            uint256 tokenId = stakerToTokenIds[msg.sender][i - 1];

            IERC721(tubbyTurtleAddress).transferFrom(
                address(this),
                msg.sender,
                tokenId
            );

            totalRewards =
                totalRewards +
                ((block.timestamp - tokenIdToTimeStamp[tokenId]) * emissionsRate) * (turtleRarities[tokenId-1]);

            removeTokenIdFromStaker(msg.sender, tokenId);

            tokenIdToStaker[tokenId] = nullAddress;
        }
        mintedSupply = mintedSupply + totalRewards;
        require(mintedSupply < maxSupply);
        _mint(msg.sender, totalRewards);
    }

    function unstakeByIds(uint256[] memory tokenIds) public {
        uint256 totalRewards = 0;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(
                tokenIdToStaker[tokenIds[i]] == msg.sender,
                "Message sender was not original staker!"
            );

            IERC721(tubbyTurtleAddress).transferFrom(
                address(this),
                msg.sender,
                tokenIds[i]
            );

            totalRewards =
                totalRewards +
                ((block.timestamp - tokenIdToTimeStamp[tokenIds[i]]) * emissionsRate) * (turtleRarities[tokenIds[i]-1]);

            removeTokenIdFromStaker(msg.sender, tokenIds[i]);

            tokenIdToStaker[tokenIds[i]] = nullAddress;
        }

        mintedSupply = mintedSupply + totalRewards;
        require(mintedSupply < maxSupply);
        _mint(msg.sender, totalRewards);
    }

    function claimByTokenId(uint256 tokenId) public {
        require(
            tokenIdToStaker[tokenId] == msg.sender,
            "Token is not claimable by you!"
        );
        require(block.timestamp < claimEndTime, "Claim period is over!");

        mintedSupply = mintedSupply + ((block.timestamp - tokenIdToTimeStamp[tokenId]) * emissionsRate) * (turtleRarities[tokenId-1]);
        require(mintedSupply < maxSupply);
        _mint(
            msg.sender,
            ((block.timestamp - tokenIdToTimeStamp[tokenId]) * emissionsRate) * (turtleRarities[tokenId-1])
        );

        tokenIdToTimeStamp[tokenId] = block.timestamp;
    }

    function claimAll() public {
        require(block.timestamp < claimEndTime, "Claim period is over!");
        uint256[] memory tokenIds = stakerToTokenIds[msg.sender];
        uint256 totalRewards = 0;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(
                tokenIdToStaker[tokenIds[i]] == msg.sender,
                "Token is not claimable by you!"
            );

            totalRewards =
                totalRewards +
                ((block.timestamp - tokenIdToTimeStamp[tokenIds[i]]) * emissionsRate) * (turtleRarities[tokenIds[i]-1]);

            tokenIdToTimeStamp[tokenIds[i]] = block.timestamp;
        }

        mintedSupply = mintedSupply + totalRewards;
        require(mintedSupply < maxSupply);
        _mint(msg.sender, totalRewards);
    }

    function getAllRewards(address staker) public view returns (uint256) {
        uint256[] memory tokenIds = stakerToTokenIds[staker];
        uint256 totalRewards = 0;

        for (uint256 i = 0; i < tokenIds.length; i++) {
            totalRewards =
                totalRewards +
                ((block.timestamp - tokenIdToTimeStamp[tokenIds[i]]) * emissionsRate) * (turtleRarities[tokenIds[i]-1]);
        }

        return totalRewards;
    }

    function getRewardsByTokenId(uint256 tokenId)
        public
        view
        returns (uint256)
    {
        require(
            tokenIdToStaker[tokenId] != nullAddress,
            "Token is not staked!"
        );

        uint256 secondsStaked = block.timestamp - tokenIdToTimeStamp[tokenId];

        return (secondsStaked * emissionsRate) * (turtleRarities[tokenId-1]);
    }

    function getStaker(uint256 tokenId) public view returns (address) {
        return tokenIdToStaker[tokenId];
    }

    function mint(uint256 _amount) public onlyOwner {
        mintedSupply = mintedSupply + _amount;
        require(mintedSupply < maxSupply);
        _mint(msg.sender, _amount);
    }

    function withdraw() public payable onlyOwner {
        require(payable(msg.sender).send(address(this).balance));
    }

    // withdraw function for erc20 tokens if tokens are sent by accident to this contract
    function withdrawToken(address _tokenContract, uint256 _amount) public payable onlyOwner {
      IERC20 tokenContract = IERC20(_tokenContract);
          
      tokenContract.transfer(msg.sender, _amount);
    }
    // withdraw function for erc721 tokens if an nft is sent by accident to this contract
    function withdrawERC721(address _tokenContract, address _from, address _to, uint256 _tokenId) public payable onlyOwner {
      IERC721 tokenContract = IERC721(_tokenContract);
          
      tokenContract.transferFrom(_from, _to, _tokenId);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","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":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burnFrom","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimAll","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimByTokenId","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimEndTime","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"emissionsRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAllRewards","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getRewardsByTokenId","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getStaker","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getTokensStaked","inputs":[{"type":"address","name":"staker","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8[]","name":"","internalType":"uint8[]"}],"name":"getTurtleRarities","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintedSupply","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setClaimEndTime","inputs":[{"type":"uint256","name":"_newClaimEndTime","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setEmissionsRate","inputs":[{"type":"uint256","name":"_newEmissionsRate","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setShellTokenAddress","inputs":[{"type":"address","name":"_newaddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setStakingCost","inputs":[{"type":"uint256","name":"_newStakingCost","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTubbyTurtleAddress","inputs":[{"type":"address","name":"_tubbyTurtleAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint8[]","name":"","internalType":"uint8[]"}],"name":"setTurtleRarities","inputs":[{"type":"uint8[]","name":"_newList","internalType":"uint8[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"shellToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"stakeByIds","inputs":[{"type":"uint256[]","name":"tokenIds","internalType":"uint256[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"stakingCost","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"tubbyTurtleAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"turtleRarities","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unstakeAll","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unstakeByIds","inputs":[{"type":"uint256[]","name":"tokenIds","internalType":"uint256[]"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"withdraw","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"withdrawERC721","inputs":[{"type":"address","name":"_tokenContract","internalType":"address"},{"type":"address","name":"_from","internalType":"address"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"withdrawToken","inputs":[{"type":"address","name":"_tokenContract","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]}]
            

Deployed ByteCode

0x6080604052600436106102675760003560e01c8063722e6bcf11610144578063c0cf442a116100b6578063d9ffad471161007a578063d9ffad4714610907578063dbda5bf914610930578063dd62ed3e1461095b578063e3c998fe14610998578063e4bb1272146109d5578063f2fde38b146109fe57610267565b8063c0cf442a14610846578063c1bd8cf914610871578063cc5f5f211461089c578063d1058e59146108c5578063d5abeb01146108dc57610267565b806395d89b411161010857806395d89b41146107335780639a3aa7661461075e5780639e281a9814610787578063a0712d68146107a3578063a457c2d7146107cc578063a9059cbb1461080957610267565b8063722e6bcf1461064e5780637786ad7a1461067957806379a61b09146106b657806379cc6790146106df5780638da5cb5b1461070857610267565b80633a690d32116101dd578063515ec105116101a1578063515ec1051461052c57806352eb7796146105695780635e1f1e2a146105a65780636aae314c146105cf57806370a08231146105fa578063715018a61461063757610267565b80633a690d32146104895780633ccfd60b146104a557806340d1d255146104af57806342966c68146104da57806348aa19361461050357610267565b806323b872dd1161022f57806323b872dd14610353578063313ce5671461039057806331a10681146103bb57806335322f37146103f8578063362a3fad1461040f578063395093511461044c57610267565b806306e9ec951461026c57806306fdde0314610297578063095ea7b3146102c257806316107711146102ff57806318160ddd14610328575b600080fd5b34801561027857600080fd5b50610281610a27565b60405161028e91906132aa565b60405180910390f35b3480156102a357600080fd5b506102ac610a4d565b6040516102b99190613355565b60405180910390f35b3480156102ce57600080fd5b506102e960048036038101906102e491906133ed565b610adf565b6040516102f69190613448565b60405180910390f35b34801561030b57600080fd5b5061032660048036038101906103219190613463565b610b02565b005b34801561033457600080fd5b5061033d610b4e565b60405161034a919061349f565b60405180910390f35b34801561035f57600080fd5b5061037a600480360381019061037591906134ba565b610b58565b6040516103879190613448565b60405180910390f35b34801561039c57600080fd5b506103a5610b87565b6040516103b29190613529565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd91906135a9565b610b90565b6040516103ef91906136b4565b60405180910390f35b34801561040457600080fd5b5061040d610c2b565b005b34801561041b57600080fd5b5061043660048036038101906104319190613463565b610f49565b604051610443919061349f565b60405180910390f35b34801561045857600080fd5b50610473600480360381019061046e91906133ed565b6110c1565b6040516104809190613448565b60405180910390f35b6104a3600480360381019061049e91906136d6565b6110f8565b005b6104ad61117b565b005b3480156104bb57600080fd5b506104c46111c3565b6040516104d1919061349f565b60405180910390f35b3480156104e657600080fd5b5061050160048036038101906104fc919061373d565b6111c9565b005b34801561050f57600080fd5b5061052a600480360381019061052591906138a8565b6111dd565b005b34801561053857600080fd5b50610553600480360381019061054e919061373d565b611502565b604051610560919061349f565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190613463565b61164d565b60405161059d91906139af565b60405180910390f35b3480156105b257600080fd5b506105cd60048036038101906105c8919061373d565b6116e4565b005b3480156105db57600080fd5b506105e4611902565b6040516105f19190613a30565b60405180910390f35b34801561060657600080fd5b50610621600480360381019061061c9190613463565b611928565b60405161062e919061349f565b60405180910390f35b34801561064357600080fd5b5061064c611970565b005b34801561065a57600080fd5b50610663611984565b604051610670919061349f565b60405180910390f35b34801561068557600080fd5b506106a0600480360381019061069b919061373d565b61198a565b6040516106ad9190613529565b60405180910390f35b3480156106c257600080fd5b506106dd60048036038101906106d8919061373d565b6119be565b005b3480156106eb57600080fd5b50610706600480360381019061070191906133ed565b6119d0565b005b34801561071457600080fd5b5061071d6119f0565b60405161072a91906132aa565b60405180910390f35b34801561073f57600080fd5b50610748611a1a565b6040516107559190613355565b60405180910390f35b34801561076a57600080fd5b506107856004803603810190610780919061373d565b611aac565b005b6107a1600480360381019061079c91906133ed565b611abe565b005b3480156107af57600080fd5b506107ca60048036038101906107c5919061373d565b611b4f565b005b3480156107d857600080fd5b506107f360048036038101906107ee91906133ed565b611b88565b6040516108009190613448565b60405180910390f35b34801561081557600080fd5b50610830600480360381019061082b91906133ed565b611bff565b60405161083d9190613448565b60405180910390f35b34801561085257600080fd5b5061085b611c22565b604051610868919061349f565b60405180910390f35b34801561087d57600080fd5b50610886611c28565b604051610893919061349f565b60405180910390f35b3480156108a857600080fd5b506108c360048036038101906108be919061373d565b611c2e565b005b3480156108d157600080fd5b506108da611c40565b005b3480156108e857600080fd5b506108f1611f10565b6040516108fe919061349f565b60405180910390f35b34801561091357600080fd5b5061092e600480360381019061092991906138a8565b611f16565b005b34801561093c57600080fd5b50610945612390565b60405161095291906136b4565b60405180910390f35b34801561096757600080fd5b50610982600480360381019061097d9190613a4b565b61240e565b60405161098f919061349f565b60405180910390f35b3480156109a457600080fd5b506109bf60048036038101906109ba919061373d565b612495565b6040516109cc91906132aa565b60405180910390f35b3480156109e157600080fd5b506109fc60048036038101906109f79190613463565b6124d2565b005b348015610a0a57600080fd5b50610a256004803603810190610a209190613463565b61251e565b005b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060038054610a5c90613aba565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8890613aba565b8015610ad55780601f10610aaa57610100808354040283529160200191610ad5565b820191906000526020600020905b815481529060010190602001808311610ab857829003601f168201915b5050505050905090565b600080610aea6125a1565b9050610af78185856125a9565b600191505092915050565b610b0a612772565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600254905090565b600080610b636125a1565b9050610b708582856127f0565b610b7b85858561287c565b60019150509392505050565b60006012905090565b6060610b9a612772565b8282600e9190610bab9291906131a2565b50600e805480602002602001604051908101604052809291908181526020018280548015610c1e57602002820191906000526020600020906000905b82829054906101000a900460ff1660ff1681526020019060010190602082600001049283019260010382029150808411610be75790505b5050505050905092915050565b6000601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905011610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790613b5d565b60405180910390fd5b600080601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905090505b6000811115610f17576000601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600183610d509190613bac565b81548110610d6157610d60613be0565b5b90600052602060002001549050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033846040518463ffffffff1660e01b8152600401610dcd93929190613c0f565b600060405180830381600087803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b50505050600e600182610e0e9190613bac565b81548110610e1f57610e1e613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f60008481526020019081526020016000205442610e649190613bac565b610e6e9190613c46565b610e789190613c46565b83610e839190613c88565b9250610e8f3382612af2565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166010600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508080610f0f90613cbc565b915050610cf9565b5080600854610f269190613c88565b60088190555060095460085410610f3c57600080fd5b610f463382612bc4565b50565b600080601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015610fd557602002820191906000526020600020905b815481526020019060010190808311610fc1575b505050505090506000805b82518110156110b657600e600184838151811061100057610fff613be0565b5b60200260200101516110129190613bac565b8154811061102357611022613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f60008685815181106110605761105f613be0565b5b6020026020010151815260200190815260200160002054426110829190613bac565b61108c9190613c46565b6110969190613c46565b826110a19190613c88565b915080806110ae90613ce5565b915050610fe0565b508092505050919050565b6000806110cc6125a1565b90506110ed8185856110de858961240e565b6110e89190613c88565b6125a9565b600191505092915050565b611100612772565b60008490508073ffffffffffffffffffffffffffffffffffffffff166323b872dd8585856040518463ffffffff1660e01b815260040161114293929190613c0f565b600060405180830381600087803b15801561115c57600080fd5b505af1158015611170573d6000803e3d6000fd5b505050505050505050565b611183612772565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050506111c157600080fd5b565b60075481565b6111da6111d46125a1565b82612d1a565b50565b6000805b82518110156114cf573373ffffffffffffffffffffffffffffffffffffffff166010600085848151811061121857611217613be0565b5b6020026020010151815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129c90613d9f565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30338685815181106112f8576112f7613be0565b5b60200260200101516040518463ffffffff1660e01b815260040161131e93929190613c0f565b600060405180830381600087803b15801561133857600080fd5b505af115801561134c573d6000803e3d6000fd5b50505050600e600184838151811061136757611366613be0565b5b60200260200101516113799190613bac565b8154811061138a57611389613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f60008685815181106113c7576113c6613be0565b5b6020026020010151815260200190815260200160002054426113e99190613bac565b6113f39190613c46565b6113fd9190613c46565b826114089190613c88565b915061142e3384838151811061142157611420613be0565b5b6020026020010151612af2565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166010600085848151811061146857611467613be0565b5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080806114c790613ce5565b9150506111e1565b50806008546114de9190613c88565b600881905550600954600854106114f457600080fd5b6114fe3382612bc4565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166010600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036115c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115be90613e0b565b60405180910390fd5b6000600f600084815260200190815260200160002054426115e89190613bac565b9050600e6001846115f99190613bac565b8154811061160a57611609613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff166006548261163b9190613c46565b6116459190613c46565b915050919050565b6060601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156116d857602002820191906000526020600020905b8154815260200190600101908083116116c4575b50505050509050919050565b3373ffffffffffffffffffffffffffffffffffffffff166010600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177c90613e77565b60405180910390fd5b60075442106117c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c090613ee3565b60405180910390fd5b600e6001826117d89190613bac565b815481106117e9576117e8613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f6000848152602001908152602001600020544261182e9190613bac565b6118389190613c46565b6118429190613c46565b60085461184f9190613c88565b6008819055506009546008541061186557600080fd5b6118e733600e6001846118789190613bac565b8154811061188957611888613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f600086815260200190815260200160002054426118ce9190613bac565b6118d89190613c46565b6118e29190613c46565b612bc4565b42600f60008381526020019081526020016000208190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611978612772565b6119826000612ee7565b565b60065481565b600e818154811061199a57600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b6119c6612772565b80600d8190555050565b6119e2826119dc6125a1565b836127f0565b6119ec8282612d1a565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054611a2990613aba565b80601f0160208091040260200160405190810160405280929190818152602001828054611a5590613aba565b8015611aa25780601f10611a7757610100808354040283529160200191611aa2565b820191906000526020600020905b815481529060010190602001808311611a8557829003601f168201915b5050505050905090565b611ab4612772565b8060078190555050565b611ac6612772565b60008290508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b8152600401611b06929190613f03565b6020604051808303816000875af1158015611b25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b499190613f58565b50505050565b611b57612772565b80600854611b659190613c88565b60088190555060095460085410611b7b57600080fd5b611b853382612bc4565b50565b600080611b936125a1565b90506000611ba1828661240e565b905083811015611be6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bdd90613ff7565b60405180910390fd5b611bf382868684036125a9565b60019250505092915050565b600080611c0a6125a1565b9050611c1781858561287c565b600191505092915050565b600d5481565b60085481565b611c36612772565b8060068190555050565b6007544210611c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c7b90613ee3565b60405180910390fd5b6000601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015611d0f57602002820191906000526020600020905b815481526020019060010190808311611cfb575b505050505090506000805b8251811015611edd573373ffffffffffffffffffffffffffffffffffffffff1660106000858481518110611d5157611d50613be0565b5b6020026020010151815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611dde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd590613e77565b60405180910390fd5b600e6001848381518110611df557611df4613be0565b5b6020026020010151611e079190613bac565b81548110611e1857611e17613be0565b5b90600052602060002090602091828204019190069054906101000a900460ff1660ff16600654600f6000868581518110611e5557611e54613be0565b5b602002602001015181526020019081526020016000205442611e779190613bac565b611e819190613c46565b611e8b9190613c46565b82611e969190613c88565b915042600f6000858481518110611eb057611eaf613be0565b5b60200260200101518152602001908152602001600020819055508080611ed590613ce5565b915050611d1a565b5080600854611eec9190613c88565b60088190555060095460085410611f0257600080fd5b611f0c3382612bc4565b5050565b60095481565b6000600d541115611fdb57600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33308451600d54611f709190613c46565b6040518463ffffffff1660e01b8152600401611f8e93929190613c0f565b6020604051808303816000875af1158015611fad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd19190613f58565b611fda57600080fd5b5b60005b815181101561238c573373ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e84848151811061204f5761204e613be0565b5b60200260200101516040518263ffffffff1660e01b8152600401612073919061349f565b602060405180830381865afa158015612090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b4919061402c565b73ffffffffffffffffffffffffffffffffffffffff161480156121715750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166010600084848151811061212257612121613be0565b5b6020026020010151815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6121b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121a7906140a5565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333085858151811061220357612202613be0565b5b60200260200101516040518463ffffffff1660e01b815260040161222993929190613c0f565b600060405180830381600087803b15801561224357600080fd5b505af1158015612257573d6000803e3d6000fd5b50505050601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208282815181106122ad576122ac613be0565b5b6020026020010151908060018154018082558091505060019003906000526020600020016000909190919091505542600f60008484815181106122f3576122f2613be0565b5b6020026020010151815260200190815260200160002081905550336010600084848151811061232557612324613be0565b5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808061238490613ce5565b915050611fde565b5050565b6060600e80548060200260200160405190810160405280929190818152602001828054801561240457602002820191906000526020600020906000905b82829054906101000a900460ff1660ff16815260200190600101906020826000010492830192600103820291508084116123cd5790505b5050505050905090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006010600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6124da612772565b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b612526612772565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612595576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258c90614137565b60405180910390fd5b61259e81612ee7565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612618576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260f906141c9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612687576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267e9061425b565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051612765919061349f565b60405180910390a3505050565b61277a6125a1565b73ffffffffffffffffffffffffffffffffffffffff166127986119f0565b73ffffffffffffffffffffffffffffffffffffffff16146127ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127e5906142c7565b60405180910390fd5b565b60006127fc848461240e565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146128765781811015612868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285f90614333565b60405180910390fd5b61287584848484036125a9565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036128eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e2906143c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361295a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161295190614457565b60405180910390fd5b612965838383612fad565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156129eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129e2906144e9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612ad9919061349f565b60405180910390a3612aec848484612fb2565b50505050565b60005b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050811015612bbf5781601160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110612b9157612b90613be0565b5b906000526020600020015403612bac57612bab8382612fb7565b5b8080612bb790613ce5565b915050612af5565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612c33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c2a90614555565b60405180910390fd5b612c3f60008383612fad565b8060026000828254612c519190613c88565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612d02919061349f565b60405180910390a3612d1660008383612fb2565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d80906145e7565b60405180910390fd5b612d9582600083612fad565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015612e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1290614679565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612ece919061349f565b60405180910390a3612ee283600084612fb2565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905081101561319e5760008190505b6001601160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506130569190613bac565b81101561313757601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001826130a99190613c88565b815481106130ba576130b9613be0565b5b9060005260206000200154601160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020828154811061311657613115613be0565b5b9060005260206000200181905550808061312f90613ce5565b915050613007565b50601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548061318757613186614699565b5b600190038181906000526020600020016000905590555b5050565b82805482825590600052602060002090601f0160209004810192821561323b5791602002820160005b8382111561320c57833560ff1683826101000a81548160ff021916908360ff16021790555092602001926001016020816000010492830192600103026131cb565b80156132395782816101000a81549060ff021916905560010160208160000104928301926001030261320c565b505b509050613248919061324c565b5090565b5b8082111561326557600081600090555060010161324d565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061329482613269565b9050919050565b6132a481613289565b82525050565b60006020820190506132bf600083018461329b565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156132ff5780820151818401526020810190506132e4565b60008484015250505050565b6000601f19601f8301169050919050565b6000613327826132c5565b61333181856132d0565b93506133418185602086016132e1565b61334a8161330b565b840191505092915050565b6000602082019050818103600083015261336f818461331c565b905092915050565b6000604051905090565b600080fd5b600080fd5b61339481613289565b811461339f57600080fd5b50565b6000813590506133b18161338b565b92915050565b6000819050919050565b6133ca816133b7565b81146133d557600080fd5b50565b6000813590506133e7816133c1565b92915050565b6000806040838503121561340457613403613381565b5b6000613412858286016133a2565b9250506020613423858286016133d8565b9150509250929050565b60008115159050919050565b6134428161342d565b82525050565b600060208201905061345d6000830184613439565b92915050565b60006020828403121561347957613478613381565b5b6000613487848285016133a2565b91505092915050565b613499816133b7565b82525050565b60006020820190506134b46000830184613490565b92915050565b6000806000606084860312156134d3576134d2613381565b5b60006134e1868287016133a2565b93505060206134f2868287016133a2565b9250506040613503868287016133d8565b9150509250925092565b600060ff82169050919050565b6135238161350d565b82525050565b600060208201905061353e600083018461351a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261356957613568613544565b5b8235905067ffffffffffffffff81111561358657613585613549565b5b6020830191508360208202830111156135a2576135a161354e565b5b9250929050565b600080602083850312156135c0576135bf613381565b5b600083013567ffffffffffffffff8111156135de576135dd613386565b5b6135ea85828601613553565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61362b8161350d565b82525050565b600061363d8383613622565b60208301905092915050565b6000602082019050919050565b6000613661826135f6565b61366b8185613601565b935061367683613612565b8060005b838110156136a757815161368e8882613631565b975061369983613649565b92505060018101905061367a565b5085935050505092915050565b600060208201905081810360008301526136ce8184613656565b905092915050565b600080600080608085870312156136f0576136ef613381565b5b60006136fe878288016133a2565b945050602061370f878288016133a2565b9350506040613720878288016133a2565b9250506060613731878288016133d8565b91505092959194509250565b60006020828403121561375357613752613381565b5b6000613761848285016133d8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6137a28261330b565b810181811067ffffffffffffffff821117156137c1576137c061376a565b5b80604052505050565b60006137d4613377565b90506137e08282613799565b919050565b600067ffffffffffffffff821115613800576137ff61376a565b5b602082029050602081019050919050565b600061382461381f846137e5565b6137ca565b905080838252602082019050602084028301858111156138475761384661354e565b5b835b81811015613870578061385c88826133d8565b845260208401935050602081019050613849565b5050509392505050565b600082601f83011261388f5761388e613544565b5b813561389f848260208601613811565b91505092915050565b6000602082840312156138be576138bd613381565b5b600082013567ffffffffffffffff8111156138dc576138db613386565b5b6138e88482850161387a565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613926816133b7565b82525050565b6000613938838361391d565b60208301905092915050565b6000602082019050919050565b600061395c826138f1565b61396681856138fc565b93506139718361390d565b8060005b838110156139a2578151613989888261392c565b975061399483613944565b925050600181019050613975565b5085935050505092915050565b600060208201905081810360008301526139c98184613951565b905092915050565b6000819050919050565b60006139f66139f16139ec84613269565b6139d1565b613269565b9050919050565b6000613a08826139db565b9050919050565b6000613a1a826139fd565b9050919050565b613a2a81613a0f565b82525050565b6000602082019050613a456000830184613a21565b92915050565b60008060408385031215613a6257613a61613381565b5b6000613a70858286016133a2565b9250506020613a81858286016133a2565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613ad257607f821691505b602082108103613ae557613ae4613a8b565b5b50919050565b7f4d7573742068617665206174206c65617374206f6e6520746f6b656e2073746160008201527f6b65642100000000000000000000000000000000000000000000000000000000602082015250565b6000613b476024836132d0565b9150613b5282613aeb565b604082019050919050565b60006020820190508181036000830152613b7681613b3a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613bb7826133b7565b9150613bc2836133b7565b9250828203905081811115613bda57613bd9613b7d565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000606082019050613c24600083018661329b565b613c31602083018561329b565b613c3e6040830184613490565b949350505050565b6000613c51826133b7565b9150613c5c836133b7565b9250828202613c6a816133b7565b91508282048414831517613c8157613c80613b7d565b5b5092915050565b6000613c93826133b7565b9150613c9e836133b7565b9250828201905080821115613cb657613cb5613b7d565b5b92915050565b6000613cc7826133b7565b915060008203613cda57613cd9613b7d565b5b600182039050919050565b6000613cf0826133b7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613d2257613d21613b7d565b5b600182019050919050565b7f4d6573736167652073656e64657220776173206e6f74206f726967696e616c2060008201527f7374616b65722100000000000000000000000000000000000000000000000000602082015250565b6000613d896027836132d0565b9150613d9482613d2d565b604082019050919050565b60006020820190508181036000830152613db881613d7c565b9050919050565b7f546f6b656e206973206e6f74207374616b656421000000000000000000000000600082015250565b6000613df56014836132d0565b9150613e0082613dbf565b602082019050919050565b60006020820190508181036000830152613e2481613de8565b9050919050565b7f546f6b656e206973206e6f7420636c61696d61626c6520627920796f75210000600082015250565b6000613e61601e836132d0565b9150613e6c82613e2b565b602082019050919050565b60006020820190508181036000830152613e9081613e54565b9050919050565b7f436c61696d20706572696f64206973206f766572210000000000000000000000600082015250565b6000613ecd6015836132d0565b9150613ed882613e97565b602082019050919050565b60006020820190508181036000830152613efc81613ec0565b9050919050565b6000604082019050613f18600083018561329b565b613f256020830184613490565b9392505050565b613f358161342d565b8114613f4057600080fd5b50565b600081519050613f5281613f2c565b92915050565b600060208284031215613f6e57613f6d613381565b5b6000613f7c84828501613f43565b91505092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000613fe16025836132d0565b9150613fec82613f85565b604082019050919050565b6000602082019050818103600083015261401081613fd4565b9050919050565b6000815190506140268161338b565b92915050565b60006020828403121561404257614041613381565b5b600061405084828501614017565b91505092915050565b7f546f6b656e206d757374206265207374616b61626c6520627920796f75210000600082015250565b600061408f601e836132d0565b915061409a82614059565b602082019050919050565b600060208201905081810360008301526140be81614082565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006141216026836132d0565b915061412c826140c5565b604082019050919050565b6000602082019050818103600083015261415081614114565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006141b36024836132d0565b91506141be82614157565b604082019050919050565b600060208201905081810360008301526141e2816141a6565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006142456022836132d0565b9150614250826141e9565b604082019050919050565b6000602082019050818103600083015261427481614238565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006142b16020836132d0565b91506142bc8261427b565b602082019050919050565b600060208201905081810360008301526142e0816142a4565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061431d601d836132d0565b9150614328826142e7565b602082019050919050565b6000602082019050818103600083015261434c81614310565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006143af6025836132d0565b91506143ba82614353565b604082019050919050565b600060208201905081810360008301526143de816143a2565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006144416023836132d0565b915061444c826143e5565b604082019050919050565b6000602082019050818103600083015261447081614434565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006144d36026836132d0565b91506144de82614477565b604082019050919050565b60006020820190508181036000830152614502816144c6565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b600061453f601f836132d0565b915061454a82614509565b602082019050919050565b6000602082019050818103600083015261456e81614532565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006145d16021836132d0565b91506145dc82614575565b604082019050919050565b60006020820190508181036000830152614600816145c4565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006146636022836132d0565b915061466e82614607565b604082019050919050565b6000602082019050818103600083015261469281614656565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212209d656a678fbac1c6f8cd2ebdc9394a21bfb760d92440522610c74c11ff02da8a64736f6c63430008110033