Contract Address Details

0x1bC83D86215DC5489E6d8b108017575CdAe1bE8B

Contract Name
DogeLocker
Creator
0x2a2e34–e9db6f at 0x5a8306–ecd318
Balance
0 Doge
Tokens
Fetching tokens...
Transactions
54 Transactions
Transfers
51 Transfers
Gas Used
8,847,752
Last Balance Update
26336150
Contract name:
DogeLocker




Optimization enabled
true
Compiler version
v0.8.16+commit.07a7930e




Optimization runs
999999
EVM Version
default




Verified at
2022-08-20T18:48:29.067238Z

Contract source code

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

// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.5.0

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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


// File @openzeppelin/contracts/utils/Address.sol@v4.5.0


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol@v4.5.0


// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;


/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}


// File @openzeppelin/contracts/utils/Context.sol@v4.5.0


// 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@v4.5.0


// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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/security/ReentrancyGuard.sol@v4.5.0


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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


// File @openzeppelin/contracts/utils/math/SafeMath.sol@v4.5.0


// OpenZeppelin Contracts v4.4.1 (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 substraction 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 contracts/DogeLocker.sol


pragma solidity 0.8.16;
contract DogeLocker is Ownable, ReentrancyGuard {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    struct Items {
        IERC20 token;
        address withdrawer;
        uint256 amount;
        uint256 unlockTimestamp;
        bool withdrawn;
    }

    uint256 public depositsCount;
    mapping(address => uint256[]) private depositsByTokenAddress;
    mapping(address => uint256[]) public depositsByWithdrawer;
    mapping(uint256 => Items) public lockedToken;
    mapping(address => mapping(address => uint256)) public walletTokenBalance;

    uint256 public lockFee = 500 ether;
    address public marketingAddress;

    event Withdraw(address withdrawer, uint256 amount);
    event Lock(address indexed user, address token, uint256 amount, uint256 id);

    constructor() {
        marketingAddress = msg.sender;
    }

    function lockTokens(
        IERC20 _token,
        address _withdrawer,
        uint256 _amount,
        uint256 _unlockTimestamp
    ) external payable nonReentrant returns (uint256 _id) {
        require(_amount > 0, "Token amount too low!");
        require(
            _unlockTimestamp < 10000000000,
            "Unlock timestamp is not in seconds!"
        );
        require(
            _unlockTimestamp > block.timestamp,
            "Unlock timestamp is not in the future!"
        );
        require(
            _token.allowance(msg.sender, address(this)) >= _amount,
            "Approve tokens first!"
        );
        require(msg.value == lockFee, "Need to pay lock fee!");

        uint256 beforeDeposit = _token.balanceOf(address(this));
        _token.safeTransferFrom(msg.sender, address(this), _amount);
        uint256 afterDeposit = _token.balanceOf(address(this));

        _amount = afterDeposit.sub(beforeDeposit);

        payable(marketingAddress).transfer(msg.value);

        walletTokenBalance[address(_token)][msg.sender] = walletTokenBalance[
            address(_token)
        ][msg.sender].add(_amount);

        _id = ++depositsCount;
        lockedToken[_id].token = _token;
        lockedToken[_id].withdrawer = _withdrawer;
        lockedToken[_id].amount = _amount;
        lockedToken[_id].unlockTimestamp = _unlockTimestamp;
        lockedToken[_id].withdrawn = false;

        depositsByTokenAddress[address(_token)].push(_id);
        depositsByWithdrawer[_withdrawer].push(_id);

        emit Lock(msg.sender, address(_token), _amount, _id);

        return _id;
    }

    function withdrawTokens(uint256 _id) external nonReentrant {
        require(
            block.timestamp >= lockedToken[_id].unlockTimestamp,
            "Tokens are still locked!"
        );
        require(
            msg.sender == lockedToken[_id].withdrawer,
            "You are not the withdrawer!"
        );
        require(!lockedToken[_id].withdrawn, "Tokens are already withdrawn!");

        lockedToken[_id].withdrawn = true;

        walletTokenBalance[address(lockedToken[_id].token)][
            msg.sender
        ] = walletTokenBalance[address(lockedToken[_id].token)][msg.sender].sub(
            lockedToken[_id].amount
        );

        emit Withdraw(msg.sender, lockedToken[_id].amount);
        lockedToken[_id].token.safeTransfer(
            msg.sender,
            lockedToken[_id].amount
        );
    }

    function setMarketingAddress(address _marketingAddress) external onlyOwner {
        marketingAddress = _marketingAddress;
    }

    function setLockFee(uint256 _lockFee) external onlyOwner {
        lockFee = _lockFee;
    }

    function getDepositsByTokenAddress(address _token)
        external
        view
        returns (uint256[] memory)
    {
        return depositsByTokenAddress[_token];
    }

    function getDepositsByWithdrawer(address _withdrawer)
        external
        view
        returns (uint256[] memory)
    {
        return depositsByWithdrawer[_withdrawer];
    }

    function getTokenTotalLockedBalance(address _token)
        external
        view
        returns (uint256)
    {
        return IERC20(_token).balanceOf(address(this));
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Lock","inputs":[{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"id","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":"Withdraw","inputs":[{"type":"address","name":"withdrawer","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"depositsByWithdrawer","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"depositsCount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getDepositsByTokenAddress","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getDepositsByWithdrawer","inputs":[{"type":"address","name":"_withdrawer","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenTotalLockedBalance","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockFee","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256","name":"_id","internalType":"uint256"}],"name":"lockTokens","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"address","name":"_withdrawer","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"},{"type":"uint256","name":"_unlockTimestamp","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"address","name":"withdrawer","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"unlockTimestamp","internalType":"uint256"},{"type":"bool","name":"withdrawn","internalType":"bool"}],"name":"lockedToken","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"marketingAddress","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":"setLockFee","inputs":[{"type":"uint256","name":"_lockFee","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMarketingAddress","inputs":[{"type":"address","name":"_marketingAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"walletTokenBalance","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawTokens","inputs":[{"type":"uint256","name":"_id","internalType":"uint256"}]}]
            

Contract Creation Code

0x6080604052681b1ae4d6e2ef50000060075534801561001d57600080fd5b5061002733610042565b60018055600880546001600160a01b03191633179055610092565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611b60806100a16000396000f3fe6080604052600436106100f35760003560e01c80638da5cb5b1161008a578063b78a153211610059578063b78a1532146102a7578063b9e7df1c146102c7578063bb941cff146102ff578063f2fde38b146103a757600080fd5b80638da5cb5b146101ee578063906e9dd01461023a5780639f7260bd1461025a578063a5ece9411461027a57600080fd5b806356a06235116100c657806356a0623514610190578063715018a6146101a65780637d533c1e146101bb57806386f65a22146101ce57600080fd5b806323c4a921146100f8578063315a095d1461012b5780634506e9351461014d578063469d86e214610163575b600080fd5b34801561010457600080fd5b506101186101133660046118ac565b6103c7565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061014b6101463660046118d8565b6103f8565b005b34801561015957600080fd5b5061011860025481565b34801561016f57600080fd5b5061018361017e3660046118f1565b610730565b604051610122919061190e565b34801561019c57600080fd5b5061011860075481565b3480156101b257600080fd5b5061014b6107a9565b6101186101c9366004611952565b610836565b3480156101da57600080fd5b506101836101e93660046118f1565b611021565b3480156101fa57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b34801561024657600080fd5b5061014b6102553660046118f1565b611098565b34801561026657600080fd5b5061014b6102753660046118d8565b611160565b34801561028657600080fd5b506008546102159073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102b357600080fd5b506101186102c23660046118f1565b6111e6565b3480156102d357600080fd5b506101186102e2366004611998565b600660209081526000928352604080842090915290825290205481565b34801561030b57600080fd5b5061036561031a3660046118d8565b6005602052600090815260409020805460018201546002830154600384015460049094015473ffffffffffffffffffffffffffffffffffffffff938416949390921692909160ff1685565b6040805173ffffffffffffffffffffffffffffffffffffffff96871681529590941660208601529284019190915260608301521515608082015260a001610122565b3480156103b357600080fd5b5061014b6103c23660046118f1565b61127d565b600460205281600052604060002081815481106103e357600080fd5b90600052602060002001600091509150505481565b600260015403610469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001556000818152600560205260409020600301544210156104e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f546f6b656e7320617265207374696c6c206c6f636b65642100000000000000006044820152606401610460565b60008181526005602052604090206001015473ffffffffffffffffffffffffffffffffffffffff163314610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f596f7520617265206e6f742074686520776974686472617765722100000000006044820152606401610460565b60008181526005602052604090206004015460ff16156105f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f546f6b656e732061726520616c72656164792077697468647261776e210000006044820152606401610460565b60008181526005602090815260408083206004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002810154905473ffffffffffffffffffffffffffffffffffffffff168452600683528184203385529092529091205461066c916113ad565b6000828152600560208181526040808420805473ffffffffffffffffffffffffffffffffffffffff168552600683528185203380875290845282862096909655938690529181526002909201548151938452918301919091527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a16000818152600560205260409020600281015490546107299173ffffffffffffffffffffffffffffffffffffffff9091169033906113c0565b5060018055565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815260409182902080548351818402810184019094528084526060939283018282801561079d57602002820191906000526020600020905b815481526020019060010190808311610789575b50505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461082a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b6108346000611499565b565b60006002600154036108a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610460565b600260015582610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f546f6b656e20616d6f756e7420746f6f206c6f772100000000000000000000006044820152606401610460565b6402540be40082106109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f556e6c6f636b2074696d657374616d70206973206e6f7420696e207365636f6e60448201527f64732100000000000000000000000000000000000000000000000000000000006064820152608401610460565b428211610a33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f556e6c6f636b2074696d657374616d70206973206e6f7420696e20746865206660448201527f75747572652100000000000000000000000000000000000000000000000000006064820152608401610460565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152839073ffffffffffffffffffffffffffffffffffffffff87169063dd62ed3e90604401602060405180830381865afa158015610aa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac991906119d1565b1015610b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f417070726f766520746f6b656e732066697273742100000000000000000000006044820152606401610460565b6007543414610b9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e65656420746f20706179206c6f636b206665652100000000000000000000006044820152606401610460565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d91906119d1565b9050610c5173ffffffffffffffffffffffffffffffffffffffff871633308761150e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa158015610cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce291906119d1565b9050610cee81836113ad565b60085460405191965073ffffffffffffffffffffffffffffffffffffffff16903480156108fc02916000818181858888f19350505050158015610d35573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600660209081526040808320338452909152902054610d719086611572565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260066020908152604080832033845290915281209190915560028054909190610db590611a19565b9190508190559250866005600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550856005600085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560008581526020019081526020016000206002018190555083600560008581526020019081526020016000206003018190555060006005600085815260200190815260200160002060040160006101000a81548160ff021916908315150217905550600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020839080600181540180825580915050600190039060005260206000200160009091909190915055600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208390806001815401808255809150506001900390600052602060002001600090919091909150553373ffffffffffffffffffffffffffffffffffffffff167f62cded90d0b4d15cd7d67fee0ae8bac1d9c61c340a9465c7d341632f495829fc88878660405161100b9392919073ffffffffffffffffffffffffffffffffffffffff9390931683526020830191909152604082015260600190565b60405180910390a2505060018055949350505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602090815260409182902080548351818402810184019094528084526060939283018282801561079d57602002820191906000526020600020908154815260200190600101908083116107895750505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611119576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b600755565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127791906119d1565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b73ffffffffffffffffffffffffffffffffffffffff81166113a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610460565b6113aa81611499565b50565b60006113b98284611a51565b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114949084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261157e565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261156c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611412565b50505050565b60006113b98284611a64565b60006115e0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661168a9092919063ffffffff16565b80519091501561149457808060200190518101906115fe9190611a77565b611494576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610460565b606061169984846000856116a1565b949350505050565b606082471015611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610460565b73ffffffffffffffffffffffffffffffffffffffff85163b6117b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610460565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117da9190611abd565b60006040518083038185875af1925050503d8060008114611817576040519150601f19603f3d011682016040523d82523d6000602084013e61181c565b606091505b509150915061182c828286611837565b979650505050505050565b606083156118465750816113b9565b8251156118565782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104609190611ad9565b73ffffffffffffffffffffffffffffffffffffffff811681146113aa57600080fd5b600080604083850312156118bf57600080fd5b82356118ca8161188a565b946020939093013593505050565b6000602082840312156118ea57600080fd5b5035919050565b60006020828403121561190357600080fd5b81356113b98161188a565b6020808252825182820181905260009190848201906040850190845b818110156119465783518352928401929184019160010161192a565b50909695505050505050565b6000806000806080858703121561196857600080fd5b84356119738161188a565b935060208501356119838161188a565b93969395505050506040820135916060013590565b600080604083850312156119ab57600080fd5b82356119b68161188a565b915060208301356119c68161188a565b809150509250929050565b6000602082840312156119e357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a4a57611a4a6119ea565b5060010190565b81810381811115611277576112776119ea565b80820180821115611277576112776119ea565b600060208284031215611a8957600080fd5b815180151581146113b957600080fd5b60005b83811015611ab4578181015183820152602001611a9c565b50506000910152565b60008251611acf818460208701611a99565b9190910192915050565b6020815260008251806020840152611af8816040850160208701611a99565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220d458db702153c781562e51cae0a1ebbf1e8d1ec6158f8d348f7feb2af1dee8cd64736f6c63430008100033

Deployed ByteCode

0x6080604052600436106100f35760003560e01c80638da5cb5b1161008a578063b78a153211610059578063b78a1532146102a7578063b9e7df1c146102c7578063bb941cff146102ff578063f2fde38b146103a757600080fd5b80638da5cb5b146101ee578063906e9dd01461023a5780639f7260bd1461025a578063a5ece9411461027a57600080fd5b806356a06235116100c657806356a0623514610190578063715018a6146101a65780637d533c1e146101bb57806386f65a22146101ce57600080fd5b806323c4a921146100f8578063315a095d1461012b5780634506e9351461014d578063469d86e214610163575b600080fd5b34801561010457600080fd5b506101186101133660046118ac565b6103c7565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061014b6101463660046118d8565b6103f8565b005b34801561015957600080fd5b5061011860025481565b34801561016f57600080fd5b5061018361017e3660046118f1565b610730565b604051610122919061190e565b34801561019c57600080fd5b5061011860075481565b3480156101b257600080fd5b5061014b6107a9565b6101186101c9366004611952565b610836565b3480156101da57600080fd5b506101836101e93660046118f1565b611021565b3480156101fa57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610122565b34801561024657600080fd5b5061014b6102553660046118f1565b611098565b34801561026657600080fd5b5061014b6102753660046118d8565b611160565b34801561028657600080fd5b506008546102159073ffffffffffffffffffffffffffffffffffffffff1681565b3480156102b357600080fd5b506101186102c23660046118f1565b6111e6565b3480156102d357600080fd5b506101186102e2366004611998565b600660209081526000928352604080842090915290825290205481565b34801561030b57600080fd5b5061036561031a3660046118d8565b6005602052600090815260409020805460018201546002830154600384015460049094015473ffffffffffffffffffffffffffffffffffffffff938416949390921692909160ff1685565b6040805173ffffffffffffffffffffffffffffffffffffffff96871681529590941660208601529284019190915260608301521515608082015260a001610122565b3480156103b357600080fd5b5061014b6103c23660046118f1565b61127d565b600460205281600052604060002081815481106103e357600080fd5b90600052602060002001600091509150505481565b600260015403610469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001556000818152600560205260409020600301544210156104e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f546f6b656e7320617265207374696c6c206c6f636b65642100000000000000006044820152606401610460565b60008181526005602052604090206001015473ffffffffffffffffffffffffffffffffffffffff163314610579576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f596f7520617265206e6f742074686520776974686472617765722100000000006044820152606401610460565b60008181526005602052604090206004015460ff16156105f5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f546f6b656e732061726520616c72656164792077697468647261776e210000006044820152606401610460565b60008181526005602090815260408083206004810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556002810154905473ffffffffffffffffffffffffffffffffffffffff168452600683528184203385529092529091205461066c916113ad565b6000828152600560208181526040808420805473ffffffffffffffffffffffffffffffffffffffff168552600683528185203380875290845282862096909655938690529181526002909201548151938452918301919091527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a16000818152600560205260409020600281015490546107299173ffffffffffffffffffffffffffffffffffffffff9091169033906113c0565b5060018055565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602090815260409182902080548351818402810184019094528084526060939283018282801561079d57602002820191906000526020600020905b815481526020019060010190808311610789575b50505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461082a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b6108346000611499565b565b60006002600154036108a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610460565b600260015582610910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f546f6b656e20616d6f756e7420746f6f206c6f772100000000000000000000006044820152606401610460565b6402540be40082106109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f556e6c6f636b2074696d657374616d70206973206e6f7420696e207365636f6e60448201527f64732100000000000000000000000000000000000000000000000000000000006064820152608401610460565b428211610a33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f556e6c6f636b2074696d657374616d70206973206e6f7420696e20746865206660448201527f75747572652100000000000000000000000000000000000000000000000000006064820152608401610460565b6040517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820152306024820152839073ffffffffffffffffffffffffffffffffffffffff87169063dd62ed3e90604401602060405180830381865afa158015610aa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac991906119d1565b1015610b31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f417070726f766520746f6b656e732066697273742100000000000000000000006044820152606401610460565b6007543414610b9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e65656420746f20706179206c6f636b206665652100000000000000000000006044820152606401610460565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8716906370a0823190602401602060405180830381865afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d91906119d1565b9050610c5173ffffffffffffffffffffffffffffffffffffffff871633308761150e565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8816906370a0823190602401602060405180830381865afa158015610cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce291906119d1565b9050610cee81836113ad565b60085460405191965073ffffffffffffffffffffffffffffffffffffffff16903480156108fc02916000818181858888f19350505050158015610d35573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff87166000908152600660209081526040808320338452909152902054610d719086611572565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260066020908152604080832033845290915281209190915560028054909190610db590611a19565b9190508190559250866005600085815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550856005600085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560008581526020019081526020016000206002018190555083600560008581526020019081526020016000206003018190555060006005600085815260200190815260200160002060040160006101000a81548160ff021916908315150217905550600360008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020839080600181540180825580915050600190039060005260206000200160009091909190915055600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208390806001815401808255809150506001900390600052602060002001600090919091909150553373ffffffffffffffffffffffffffffffffffffffff167f62cded90d0b4d15cd7d67fee0ae8bac1d9c61c340a9465c7d341632f495829fc88878660405161100b9392919073ffffffffffffffffffffffffffffffffffffffff9390931683526020830191909152604082015260600190565b60405180910390a2505060018055949350505050565b73ffffffffffffffffffffffffffffffffffffffff811660009081526003602090815260409182902080548351818402810184019094528084526060939283018282801561079d57602002820191906000526020600020908154815260200190600101908083116107895750505050509050919050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611119576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b600755565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127791906119d1565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610460565b73ffffffffffffffffffffffffffffffffffffffff81166113a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610460565b6113aa81611499565b50565b60006113b98284611a51565b9392505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526114949084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261157e565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60405173ffffffffffffffffffffffffffffffffffffffff8085166024830152831660448201526064810182905261156c9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611412565b50505050565b60006113b98284611a64565b60006115e0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661168a9092919063ffffffff16565b80519091501561149457808060200190518101906115fe9190611a77565b611494576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610460565b606061169984846000856116a1565b949350505050565b606082471015611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610460565b73ffffffffffffffffffffffffffffffffffffffff85163b6117b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610460565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516117da9190611abd565b60006040518083038185875af1925050503d8060008114611817576040519150601f19603f3d011682016040523d82523d6000602084013e61181c565b606091505b509150915061182c828286611837565b979650505050505050565b606083156118465750816113b9565b8251156118565782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104609190611ad9565b73ffffffffffffffffffffffffffffffffffffffff811681146113aa57600080fd5b600080604083850312156118bf57600080fd5b82356118ca8161188a565b946020939093013593505050565b6000602082840312156118ea57600080fd5b5035919050565b60006020828403121561190357600080fd5b81356113b98161188a565b6020808252825182820181905260009190848201906040850190845b818110156119465783518352928401929184019160010161192a565b50909695505050505050565b6000806000806080858703121561196857600080fd5b84356119738161188a565b935060208501356119838161188a565b93969395505050506040820135916060013590565b600080604083850312156119ab57600080fd5b82356119b68161188a565b915060208301356119c68161188a565b809150509250929050565b6000602082840312156119e357600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611a4a57611a4a6119ea565b5060010190565b81810381811115611277576112776119ea565b80820180821115611277576112776119ea565b600060208284031215611a8957600080fd5b815180151581146113b957600080fd5b60005b83811015611ab4578181015183820152602001611a9c565b50506000910152565b60008251611acf818460208701611a99565b9190910192915050565b6020815260008251806020840152611af8816040850160208701611a99565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220d458db702153c781562e51cae0a1ebbf1e8d1ec6158f8d348f7feb2af1dee8cd64736f6c63430008100033