ETH Price: $2,717.85 (-1.71%)

Contract

0xe44c142B1c7996D7bbdb3b331Fbf7288B2CdCb2b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim205897742024-08-23 7:21:113 days ago1724397671IN
0xe44c142B...8B2CdCb2b
0 ETH0.000069371.0571364
Claim205775102024-08-21 14:11:355 days ago1724249495IN
0xe44c142B...8B2CdCb2b
0 ETH0.0009607514.64097582
Claim205297402024-08-14 22:05:4711 days ago1723673147IN
0xe44c142B...8B2CdCb2b
0 ETH0.000304333.67900508
Claim205103142024-08-12 5:01:5914 days ago1723438919IN
0xe44c142B...8B2CdCb2b
0 ETH0.000160871.94474783
Claim205037732024-08-11 7:06:3515 days ago1723359995IN
0xe44c142B...8B2CdCb2b
0 ETH0.00010191.2319672
Claim204981302024-08-10 12:12:3516 days ago1723291955IN
0xe44c142B...8B2CdCb2b
0 ETH0.000278732.82498255
Claim204967932024-08-10 7:43:2316 days ago1723275803IN
0xe44c142B...8B2CdCb2b
0 ETH0.000104141.58713901
Claim204818902024-08-08 5:51:4718 days ago1723096307IN
0xe44c142B...8B2CdCb2b
0 ETH0.000157042.39328287
Claim203925902024-07-26 18:43:3530 days ago1722019415IN
0xe44c142B...8B2CdCb2b
0 ETH0.000205812.48809913
Claim203691922024-07-23 12:20:1134 days ago1721737211IN
0xe44c142B...8B2CdCb2b
0 ETH0.000406426.19347542
Claim203193762024-07-16 13:29:2341 days ago1721136563IN
0xe44c142B...8B2CdCb2b
0 ETH0.000571418.70785582
Claim203096722024-07-15 4:57:4742 days ago1721019467IN
0xe44c142B...8B2CdCb2b
0 ETH0.000084562.52708139
Claim203096712024-07-15 4:57:3542 days ago1721019455IN
0xe44c142B...8B2CdCb2b
0 ETH0.000201632.43753292
Claim202107822024-07-01 9:30:2356 days ago1719826223IN
0xe44c142B...8B2CdCb2b
0 ETH0.000491014.97651519
Claim201040282024-06-16 11:22:5971 days ago1718536979IN
0xe44c142B...8B2CdCb2b
0 ETH0.000489495.91741267
Claim199488722024-05-25 19:07:1192 days ago1716664031IN
0xe44c142B...8B2CdCb2b
0 ETH0.000459387.0006475
Claim199103072024-05-20 9:41:1198 days ago1716198071IN
0xe44c142B...8B2CdCb2b
0 ETH0.000421876.4289638
Claim198982292024-05-18 17:10:2399 days ago1716052223IN
0xe44c142B...8B2CdCb2b
0 ETH0.000378115.76211252
Claim198969372024-05-18 12:50:23100 days ago1716036623IN
0xe44c142B...8B2CdCb2b
0 ETH0.000229863.50284319
Claim198871452024-05-17 3:54:35101 days ago1715918075IN
0xe44c142B...8B2CdCb2b
0 ETH0.000222343.3883214
Claim198110582024-05-06 12:31:35112 days ago1714998695IN
0xe44c142B...8B2CdCb2b
0 ETH0.000521497.94709078
Claim198106662024-05-06 11:12:35112 days ago1714993955IN
0xe44c142B...8B2CdCb2b
0 ETH0.000391295.96295072
Claim197162312024-04-23 6:12:59125 days ago1713852779IN
0xe44c142B...8B2CdCb2b
0 ETH0.0010340712.50077542
Claim197040172024-04-21 13:16:23127 days ago1713705383IN
0xe44c142B...8B2CdCb2b
0 ETH0.000587218.94856331
Claim197012042024-04-21 3:49:35127 days ago1713671375IN
0xe44c142B...8B2CdCb2b
0 ETH0.000437115.28417066
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
tMall_Tokenswap

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, BSD-3-Clause license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-03-16
*/

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


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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol


// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// 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/utils/SafeERC20.sol


// OpenZeppelin Contracts (last updated v4.8.0) (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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

// 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: tMALL_Tokenswap.sol

pragma solidity >=0.8.0;




contract tMall_Tokenswap is Ownable {
    using SafeERC20 for IERC20;

    bool public depositsEnabled = true;
    bool public claimsEnabled = true;
    uint public constant periodTime = 30 days;
    uint public constant numPeriods = 18;
   
    address public constant token1 = 0x323dA808a28D490D4Eaa223c7E96dB937Fb5D591; // tMALL Token
    address public constant token2 = 0xE31Fe8478e8EFC5416B750cF7a452E613D8b20B6; // MALL Token
    
    mapping(address => uint) public amountDeposited;   // Total amount deposited by an user
    mapping(address => uint) public lastDepositedTime; // Total amount deposited by an user
    mapping(address => uint) public amountUnbridged;   // Total amount unbridged by an user (pending to claim)
    mapping(address => uint) public amountClaimed;     // Total amount bridged/claimed by an user
    mapping(address => uint) public amountPerPeriod;   // Amount per period to claim by an user
    mapping(address => uint) public lastClaimedTime;

    event Deposited(address holder, uint amount);
    event Claimed(address holder, uint amount);

    function changeState(bool _newDeposits, bool _newClaims) public onlyOwner {
        depositsEnabled = _newDeposits;
        claimsEnabled = _newClaims;
    }
    
    function deposit(uint amount) public {
        require(depositsEnabled , "Dsabled");
        IERC20(token1).safeTransferFrom(_msgSender(), address(this), amount);

        amountDeposited[_msgSender()] = amountDeposited[_msgSender()] + amount;
        amountUnbridged[_msgSender()] = amountUnbridged[_msgSender()] + amount;
        amountPerPeriod[_msgSender()] = amountUnbridged[_msgSender()] / numPeriods;
        
        lastClaimedTime[_msgSender()] = block.timestamp;
        lastDepositedTime[_msgSender()] = block.timestamp;
        emit Deposited(_msgSender(), amount);
    }

    function claim() public {
        require(claimsEnabled , "Disabled");
        require(getClaimableAmount(_msgSender()) > 0 , "Unavailable");
        require(amountUnbridged[_msgSender()] >= amountPerPeriod[_msgSender()], "Error amount");

        uint _amountToSend = getClaimableAmount(_msgSender());
        
        amountUnbridged[_msgSender()] = amountUnbridged[_msgSender()] - _amountToSend;
        amountClaimed[_msgSender()] = amountClaimed[_msgSender()] + _amountToSend;
        lastClaimedTime[_msgSender()] = block.timestamp;

        IERC20(token2).safeTransfer(_msgSender(), _amountToSend);
        emit Claimed(_msgSender(), _amountToSend);
    }

    function getClaimableAmount(address holder) public view returns (uint){
        if(!claimsEnabled) return 0;

        uint _amountToSend = amountPerPeriod[holder];
        uint _numPeriods = (block.timestamp - lastDepositedTime[holder] ) / periodTime;
        if(lastDepositedTime[holder] != lastClaimedTime[holder]){
            _numPeriods = _numPeriods - ((lastClaimedTime[holder] - lastDepositedTime[holder] ) / periodTime);
        }

        _amountToSend = _amountToSend * _numPeriods;

        if(_amountToSend > amountUnbridged[holder]) _amountToSend = amountUnbridged[holder];

        return _amountToSend;
    }

    function getTimeToClaim(address holder) public view returns(uint _res){
        if(!claimsEnabled) return 0;
        if(amountUnbridged[holder] == 0) return 0;
        if(getClaimableAmount(holder) > 0) return 0;

        uint _numPeriods = (block.timestamp - lastDepositedTime[holder] ) / periodTime;

        _res = periodTime * (_numPeriods + 1) + lastDepositedTime[holder] - block.timestamp;
    }
    
    function getDeposited() public onlyOwner {
        uint amount = IERC20(token1).balanceOf(address(this));
        IERC20(token1).safeTransfer(owner(), amount);
    }

    function getUnused() public onlyOwner {
        uint amount = IERC20(token2).balanceOf(address(this));
        IERC20(token2).safeTransfer(owner(), amount);
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountDeposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountPerPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountUnbridged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_newDeposits","type":"bool"},{"internalType":"bool","name":"_newClaims","type":"bool"}],"name":"changeState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositsEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getClaimableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDeposited","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getTimeToClaim","outputs":[{"internalType":"uint256","name":"_res","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastDepositedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numPeriods","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805461ffff60a01b191661010160a01b17905534801561002557600080fd5b5061002f33610034565b610084565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610fbf806100936000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80639e7ef34c116100b8578063e12f3a611161007c578063e12f3a61146102b6578063ea0ab056146102c9578063f2fde38b146102d1578063f3f91fa0146102e4578063f4f0e1ae14610304578063fe9e374b1461032457600080fd5b80639e7ef34c14610240578063b6b55f2514610260578063d21220a714610273578063d7e1ea171461028e578063dcd65479146102ae57600080fd5b80634e71d92d1161010a5780634e71d92d146101d85780635392fd1c146101e0578063715018a6146101f457806377d0da76146101fc578063894d973e1461021c5780638da5cb5b1461022f57600080fd5b80630406aa61146101475780631387c4fd146101705780631d31fac01461017a57806325be124e146101925780633695e615146101c5575b600080fd5b60005461015b90600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b610178610344565b005b61018462278d0081565b604051908152602001610167565b6101ad73e31fe8478e8efc5416b750cf7a452e613d8b20b681565b6040516001600160a01b039091168152602001610167565b6101786101d3366004610dea565b6103f8565b610178610434565b60005461015b90600160a01b900460ff1681565b6101786105f5565b61018461020a366004610e23565b60056020526000908152604090205481565b61018461022a366004610e23565b610609565b6000546001600160a01b03166101ad565b61018461024e366004610e23565b60036020526000908152604090205481565b61017861026e366004610e4c565b6106e6565b6101ad73323da808a28d490d4eaa223c7e96db937fb5d59181565b61018461029c366004610e23565b60046020526000908152604090205481565b610184601281565b6101846102c4366004610e23565b6107fe565b61017861091f565b6101786102df366004610e23565b6109b4565b6101846102f2366004610e23565b60066020526000908152604090205481565b610184610312366004610e23565b60016020526000908152604090205481565b610184610332366004610e23565b60026020526000908152604090205481565b61034c610a2a565b6040516370a0823160e01b815230600482015260009073323da808a28d490d4eaa223c7e96db937fb5d591906370a0823190602401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c29190610e65565b90506103f56103d96000546001600160a01b031690565b73323da808a28d490d4eaa223c7e96db937fb5d5919083610a84565b50565b610400610a2a565b6000805461ffff60a01b1916600160a01b9315159390930260ff60a81b191692909217600160a81b91151591909102179055565b600054600160a81b900460ff1661047d5760405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b60448201526064015b60405180910390fd5b6000610488336107fe565b116104c35760405162461bcd60e51b815260206004820152600b60248201526a556e617661696c61626c6560a81b6044820152606401610474565b33600090815260056020908152604080832054600390925290912054101561051c5760405162461bcd60e51b815260206004820152600c60248201526b115c9c9bdc88185b5bdd5b9d60a21b6044820152606401610474565b6000610527336107fe565b33600090815260036020526040902054909150610545908290610e94565b3360009081526003602090815260408083209390935560049052205461056c908290610ead565b3360008181526004602090815260408083209490945560069052919091204290556105ae905b73e31fe8478e8efc5416b750cf7a452e613d8b20b69083610a84565b7fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a335b604080516001600160a01b039092168252602082018490520160405180910390a150565b6105fd610a2a565b6106076000610aec565b565b60008054600160a81b900460ff1661062357506000919050565b6001600160a01b038216600090815260036020526040812054900361064a57506000919050565b6000610655836107fe565b111561066357506000919050565b6001600160a01b03821660009081526002602052604081205462278d009061068b9042610e94565b6106959190610ec0565b6001600160a01b03841660009081526002602052604090205490915042906106be836001610ead565b6106cb9062278d00610ee2565b6106d59190610ead565b6106df9190610e94565b9392505050565b600054600160a01b900460ff166107295760405162461bcd60e51b8152602060048201526007602482015266111cd8589b195960ca1b6044820152606401610474565b61074973323da808a28d490d4eaa223c7e96db937fb5d591333084610b3c565b33600090815260016020526040902054610764908290610ead565b3360009081526001602090815260408083209390935560039052205461078b908290610ead565b3360009081526003602052604090208190556107a990601290610ec0565b336000818152600560209081526040808320949094556006815283822042908190556002909152929020919091557f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906105d1565b60008054600160a81b900460ff1661081857506000919050565b6001600160a01b038216600090815260056020908152604080832054600290925282205490919062278d009061084e9042610e94565b6108589190610ec0565b6001600160a01b038516600090815260066020908152604080832054600290925290912054919250146108cf576001600160a01b03841660009081526002602090815260408083205460069092529091205462278d00916108b891610e94565b6108c29190610ec0565b6108cc9082610e94565b90505b6108d98183610ee2565b6001600160a01b038516600090815260036020526040902054909250821115610918576001600160a01b03841660009081526003602052604090205491505b5092915050565b610927610a2a565b6040516370a0823160e01b815230600482015260009073e31fe8478e8efc5416b750cf7a452e613d8b20b6906370a0823190602401602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190610e65565b90506103f56105926000546001600160a01b031690565b6109bc610a2a565b6001600160a01b038116610a215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610474565b6103f581610aec565b6000546001600160a01b031633146106075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610474565b6040516001600160a01b038316602482015260448101829052610ae790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b7a565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b749085906323b872dd60e01b90608401610ab0565b50505050565b6000610bcf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c4c9092919063ffffffff16565b805190915015610ae75780806020019051810190610bed9190610ef9565b610ae75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610474565b6060610c5b8484600085610c63565b949350505050565b606082471015610cc45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610474565b600080866001600160a01b03168587604051610ce09190610f3a565b60006040518083038185875af1925050503d8060008114610d1d576040519150601f19603f3d011682016040523d82523d6000602084013e610d22565b606091505b5091509150610d3387838387610d3e565b979650505050505050565b60608315610dad578251600003610da6576001600160a01b0385163b610da65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610474565b5081610c5b565b610c5b8383815115610dc25781518083602001fd5b8060405162461bcd60e51b81526004016104749190610f56565b80151581146103f557600080fd5b60008060408385031215610dfd57600080fd5b8235610e0881610ddc565b91506020830135610e1881610ddc565b809150509250929050565b600060208284031215610e3557600080fd5b81356001600160a01b03811681146106df57600080fd5b600060208284031215610e5e57600080fd5b5035919050565b600060208284031215610e7757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ea757610ea7610e7e565b92915050565b80820180821115610ea757610ea7610e7e565b600082610edd57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610ea757610ea7610e7e565b600060208284031215610f0b57600080fd5b81516106df81610ddc565b60005b83811015610f31578181015183820152602001610f19565b50506000910152565b60008251610f4c818460208701610f16565b9190910192915050565b6020815260008251806020840152610f75816040850160208701610f16565b601f01601f1916919091016040019291505056fea2646970667358221220fe234cdf76f31fa057a65ea55442b20f414cbb1b629e92669e1f8ae620f8538c64736f6c63430008120033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101425760003560e01c80639e7ef34c116100b8578063e12f3a611161007c578063e12f3a61146102b6578063ea0ab056146102c9578063f2fde38b146102d1578063f3f91fa0146102e4578063f4f0e1ae14610304578063fe9e374b1461032457600080fd5b80639e7ef34c14610240578063b6b55f2514610260578063d21220a714610273578063d7e1ea171461028e578063dcd65479146102ae57600080fd5b80634e71d92d1161010a5780634e71d92d146101d85780635392fd1c146101e0578063715018a6146101f457806377d0da76146101fc578063894d973e1461021c5780638da5cb5b1461022f57600080fd5b80630406aa61146101475780631387c4fd146101705780631d31fac01461017a57806325be124e146101925780633695e615146101c5575b600080fd5b60005461015b90600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b610178610344565b005b61018462278d0081565b604051908152602001610167565b6101ad73e31fe8478e8efc5416b750cf7a452e613d8b20b681565b6040516001600160a01b039091168152602001610167565b6101786101d3366004610dea565b6103f8565b610178610434565b60005461015b90600160a01b900460ff1681565b6101786105f5565b61018461020a366004610e23565b60056020526000908152604090205481565b61018461022a366004610e23565b610609565b6000546001600160a01b03166101ad565b61018461024e366004610e23565b60036020526000908152604090205481565b61017861026e366004610e4c565b6106e6565b6101ad73323da808a28d490d4eaa223c7e96db937fb5d59181565b61018461029c366004610e23565b60046020526000908152604090205481565b610184601281565b6101846102c4366004610e23565b6107fe565b61017861091f565b6101786102df366004610e23565b6109b4565b6101846102f2366004610e23565b60066020526000908152604090205481565b610184610312366004610e23565b60016020526000908152604090205481565b610184610332366004610e23565b60026020526000908152604090205481565b61034c610a2a565b6040516370a0823160e01b815230600482015260009073323da808a28d490d4eaa223c7e96db937fb5d591906370a0823190602401602060405180830381865afa15801561039e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103c29190610e65565b90506103f56103d96000546001600160a01b031690565b73323da808a28d490d4eaa223c7e96db937fb5d5919083610a84565b50565b610400610a2a565b6000805461ffff60a01b1916600160a01b9315159390930260ff60a81b191692909217600160a81b91151591909102179055565b600054600160a81b900460ff1661047d5760405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b60448201526064015b60405180910390fd5b6000610488336107fe565b116104c35760405162461bcd60e51b815260206004820152600b60248201526a556e617661696c61626c6560a81b6044820152606401610474565b33600090815260056020908152604080832054600390925290912054101561051c5760405162461bcd60e51b815260206004820152600c60248201526b115c9c9bdc88185b5bdd5b9d60a21b6044820152606401610474565b6000610527336107fe565b33600090815260036020526040902054909150610545908290610e94565b3360009081526003602090815260408083209390935560049052205461056c908290610ead565b3360008181526004602090815260408083209490945560069052919091204290556105ae905b73e31fe8478e8efc5416b750cf7a452e613d8b20b69083610a84565b7fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a335b604080516001600160a01b039092168252602082018490520160405180910390a150565b6105fd610a2a565b6106076000610aec565b565b60008054600160a81b900460ff1661062357506000919050565b6001600160a01b038216600090815260036020526040812054900361064a57506000919050565b6000610655836107fe565b111561066357506000919050565b6001600160a01b03821660009081526002602052604081205462278d009061068b9042610e94565b6106959190610ec0565b6001600160a01b03841660009081526002602052604090205490915042906106be836001610ead565b6106cb9062278d00610ee2565b6106d59190610ead565b6106df9190610e94565b9392505050565b600054600160a01b900460ff166107295760405162461bcd60e51b8152602060048201526007602482015266111cd8589b195960ca1b6044820152606401610474565b61074973323da808a28d490d4eaa223c7e96db937fb5d591333084610b3c565b33600090815260016020526040902054610764908290610ead565b3360009081526001602090815260408083209390935560039052205461078b908290610ead565b3360009081526003602052604090208190556107a990601290610ec0565b336000818152600560209081526040808320949094556006815283822042908190556002909152929020919091557f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906105d1565b60008054600160a81b900460ff1661081857506000919050565b6001600160a01b038216600090815260056020908152604080832054600290925282205490919062278d009061084e9042610e94565b6108589190610ec0565b6001600160a01b038516600090815260066020908152604080832054600290925290912054919250146108cf576001600160a01b03841660009081526002602090815260408083205460069092529091205462278d00916108b891610e94565b6108c29190610ec0565b6108cc9082610e94565b90505b6108d98183610ee2565b6001600160a01b038516600090815260036020526040902054909250821115610918576001600160a01b03841660009081526003602052604090205491505b5092915050565b610927610a2a565b6040516370a0823160e01b815230600482015260009073e31fe8478e8efc5416b750cf7a452e613d8b20b6906370a0823190602401602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d9190610e65565b90506103f56105926000546001600160a01b031690565b6109bc610a2a565b6001600160a01b038116610a215760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610474565b6103f581610aec565b6000546001600160a01b031633146106075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610474565b6040516001600160a01b038316602482015260448101829052610ae790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b7a565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b749085906323b872dd60e01b90608401610ab0565b50505050565b6000610bcf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c4c9092919063ffffffff16565b805190915015610ae75780806020019051810190610bed9190610ef9565b610ae75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610474565b6060610c5b8484600085610c63565b949350505050565b606082471015610cc45760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610474565b600080866001600160a01b03168587604051610ce09190610f3a565b60006040518083038185875af1925050503d8060008114610d1d576040519150601f19603f3d011682016040523d82523d6000602084013e610d22565b606091505b5091509150610d3387838387610d3e565b979650505050505050565b60608315610dad578251600003610da6576001600160a01b0385163b610da65760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610474565b5081610c5b565b610c5b8383815115610dc25781518083602001fd5b8060405162461bcd60e51b81526004016104749190610f56565b80151581146103f557600080fd5b60008060408385031215610dfd57600080fd5b8235610e0881610ddc565b91506020830135610e1881610ddc565b809150509250929050565b600060208284031215610e3557600080fd5b81356001600160a01b03811681146106df57600080fd5b600060208284031215610e5e57600080fd5b5035919050565b600060208284031215610e7757600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610ea757610ea7610e7e565b92915050565b80820180821115610ea757610ea7610e7e565b600082610edd57634e487b7160e01b600052601260045260246000fd5b500490565b8082028115828204841417610ea757610ea7610e7e565b600060208284031215610f0b57600080fd5b81516106df81610ddc565b60005b83811015610f31578181015183820152602001610f19565b50506000910152565b60008251610f4c818460208701610f16565b9190910192915050565b6020815260008251806020840152610f75816040850160208701610f16565b601f01601f1916919091016040019291505056fea2646970667358221220fe234cdf76f31fa057a65ea55442b20f414cbb1b629e92669e1f8ae620f8538c64736f6c63430008120033

Deployed Bytecode Sourcemap

22835:3973:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22954:32;;;;;-1:-1:-1;;;22954:32:0;;;;;;;;;179:14:1;;172:22;154:41;;142:2;127:18;22954:32:0;;;;;;;;26464:168;;;:::i;:::-;;22993:41;;23027:7;22993:41;;;;;352:25:1;;;340:2;325:18;22993:41:0;206:177:1;23186:75:0;;23219:42;23186:75;;;;;-1:-1:-1;;;;;552:32:1;;;534:51;;522:2;507:18;23186:75:0;388:203:1;23940:160:0;;;;;;:::i;:::-;;:::i;24715:675::-;;;:::i;22913:34::-;;;;;-1:-1:-1;;;22913:34:0;;;;;;21952:103;;;:::i;23685:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;26043:409;;;;;;:::i;:::-;;:::i;21304:87::-;21350:7;21377:6;-1:-1:-1;;;;;21377:6:0;21304:87;;23474:47;;;;;;:::i;:::-;;;;;;;;;;;;;;24112:595;;;;;;:::i;:::-;;:::i;23089:75::-;;23122:42;23089:75;;23586:45;;;;;;:::i;:::-;;;;;;;;;;;;;;23041:36;;23075:2;23041:36;;25398:637;;;;;;:::i;:::-;;:::i;26640:165::-;;;:::i;22210:201::-;;;;;;:::i;:::-;;:::i;23782:47::-;;;;;;:::i;:::-;;;;;;;;;;;;;;23288;;;;;;:::i;:::-;;;;;;;;;;;;;;23381:49;;;;;;:::i;:::-;;;;;;;;;;;;;;26464:168;21190:13;:11;:13::i;:::-;26530:39:::1;::::0;-1:-1:-1;;;26530:39:0;;26563:4:::1;26530:39;::::0;::::1;534:51:1::0;26516:11:0::1;::::0;23122:42:::1;::::0;26530:24:::1;::::0;507:18:1;;26530:39:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26516:53;;26580:44;26608:7;21350::::0;21377:6;-1:-1:-1;;;;;21377:6:0;;21304:87;26608:7:::1;23122:42;::::0;26617:6;26580:27:::1;:44::i;:::-;26505:127;26464:168::o:0;23940:160::-;21190:13;:11;:13::i;:::-;24025:15:::1;:30:::0;;-1:-1:-1;;;;24066:26:0;-1:-1:-1;;;24025:30:0;::::1;;::::0;;;::::1;-1:-1:-1::0;;;;24066:26:0;;;;;-1:-1:-1;;;24066:26:0;::::1;;::::0;;;::::1;;::::0;;23940:160::o;24715:675::-;24758:13;;-1:-1:-1;;;24758:13:0;;;;24750:35;;;;-1:-1:-1;;;24750:35:0;;1967:2:1;24750:35:0;;;1949:21:1;2006:1;1986:18;;;1979:29;-1:-1:-1;;;2024:18:1;;;2017:38;2072:18;;24750:35:0;;;;;;;;;24839:1;24804:32;19935:10;25398:637;:::i;24804:32::-;:36;24796:61;;;;-1:-1:-1;;;24796:61:0;;2303:2:1;24796:61:0;;;2285:21:1;2342:2;2322:18;;;2315:30;-1:-1:-1;;;2361:18:1;;;2354:41;2412:18;;24796:61:0;2101:335:1;24796:61:0;19935:10;24909:29;;;;:15;:29;;;;;;;;;24876:15;:29;;;;;;;:62;;24868:87;;;;-1:-1:-1;;;24868:87:0;;2643:2:1;24868:87:0;;;2625:21:1;2682:2;2662:18;;;2655:30;-1:-1:-1;;;2701:18:1;;;2694:42;2753:18;;24868:87:0;2441:336:1;24868:87:0;24968:18;24989:32;19935:10;25398:637;:::i;24989:32::-;19935:10;25074:29;;;;:15;:29;;;;;;24968:53;;-1:-1:-1;25074:45:0;;24968:53;;25074:45;:::i;:::-;19935:10;25042:29;;;;:15;:29;;;;;;;;:77;;;;25160:13;:27;;;;:43;;25190:13;;25160:43;:::i;:::-;19935:10;25130:27;;;;:13;:27;;;;;;;;:73;;;;25214:15;:29;;;;;;25246:15;25214:47;;25274:56;;25302:12;23219:42;;25316:13;25274:27;:56::i;:::-;25346:36;19935:10;25354:12;25346:36;;;-1:-1:-1;;;;;3369:32:1;;;3351:51;;3433:2;3418:18;;3411:34;;;3324:18;25346:36:0;;;;;;;24739:651;24715:675::o;21952:103::-;21190:13;:11;:13::i;:::-;22017:30:::1;22044:1;22017:18;:30::i;:::-;21952:103::o:0;26043:409::-;26103:9;26128:13;;-1:-1:-1;;;26128:13:0;;;;26124:27;;-1:-1:-1;26150:1:0;;26043:409;-1:-1:-1;26043:409:0:o;26124:27::-;-1:-1:-1;;;;;26165:23:0;;;;;;:15;:23;;;;;;:28;;26162:41;;-1:-1:-1;26202:1:0;;26043:409;-1:-1:-1;26043:409:0:o;26162:41::-;26246:1;26217:26;26236:6;26217:18;:26::i;:::-;:30;26214:43;;;-1:-1:-1;26256:1:0;;26043:409;-1:-1:-1;26043:409:0:o;26214:43::-;-1:-1:-1;;;;;26308:25:0;;26270:16;26308:25;;;:17;:25;;;;;;23027:7;;26290:43;;:15;:43;:::i;:::-;26289:59;;;;:::i;:::-;-1:-1:-1;;;;;26401:25:0;;;;;;:17;:25;;;;;;26270:78;;-1:-1:-1;26429:15:0;;26382;26270:78;26396:1;26382:15;:::i;:::-;26368:30;;23027:7;26368:30;:::i;:::-;:58;;;;:::i;:::-;:76;;;;:::i;:::-;26361:83;26043:409;-1:-1:-1;;;26043:409:0:o;24112:595::-;24168:15;;-1:-1:-1;;;24168:15:0;;;;24160:36;;;;-1:-1:-1;;;24160:36:0;;4053:2:1;24160:36:0;;;4035:21:1;4092:1;4072:18;;;4065:29;-1:-1:-1;;;4110:18:1;;;4103:37;4157:18;;24160:36:0;3851:330:1;24160:36:0;24207:68;23122:42;19935:10;24261:4;24268:6;24207:31;:68::i;:::-;19935:10;24320:29;;;;:15;:29;;;;;;:38;;24352:6;;24320:38;:::i;:::-;19935:10;24288:29;;;;:15;:29;;;;;;;;:70;;;;24401:15;:29;;;;:38;;24433:6;;24401:38;:::i;:::-;19935:10;24369:29;;;;:15;:29;;;;;:70;;;24482:42;;23075:2;;24482:42;:::i;:::-;19935:10;24450:29;;;;:15;:29;;;;;;;;:74;;;;24545:15;:29;;;;;24577:15;24545:47;;;;24603:17;:31;;;;;;:49;;;;24668:31;;24678:12;19855:98;25398:637;25463:4;25483:13;;-1:-1:-1;;;25483:13:0;;;;25479:27;;-1:-1:-1;25505:1:0;;25398:637;-1:-1:-1;25398:637:0:o;25479:27::-;-1:-1:-1;;;;;25540:23:0;;25519:18;25540:23;;;:15;:23;;;;;;;;;25612:17;:25;;;;;;25540:23;;25519:18;23027:7;;25594:43;;:15;:43;:::i;:::-;25593:59;;;;:::i;:::-;-1:-1:-1;;;;;25695:23:0;;;;;;:15;:23;;;;;;;;;25666:17;:25;;;;;;;25574:78;;-1:-1:-1;25666:52:0;25663:180;;-1:-1:-1;;;;;25790:25:0;;;;;;:17;:25;;;;;;;;;25764:15;:23;;;;;;;23027:7;;25764:51;;;:::i;:::-;25763:67;;;;:::i;:::-;25748:83;;:11;:83;:::i;:::-;25734:97;;25663:180;25871:27;25887:11;25871:13;:27;:::i;:::-;-1:-1:-1;;;;;25930:23:0;;;;;;:15;:23;;;;;;25855:43;;-1:-1:-1;25914:39:0;;25911:83;;;-1:-1:-1;;;;;25971:23:0;;;;;;:15;:23;;;;;;;-1:-1:-1;25911:83:0;-1:-1:-1;26014:13:0;25398:637;-1:-1:-1;;25398:637:0:o;26640:165::-;21190:13;:11;:13::i;:::-;26703:39:::1;::::0;-1:-1:-1;;;26703:39:0;;26736:4:::1;26703:39;::::0;::::1;534:51:1::0;26689:11:0::1;::::0;23219:42:::1;::::0;26703:24:::1;::::0;507:18:1;;26703:39:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;26689:53;;26753:44;26781:7;21350::::0;21377:6;-1:-1:-1;;;;;21377:6:0;;21304:87;22210:201;21190:13;:11;:13::i;:::-;-1:-1:-1;;;;;22299:22:0;::::1;22291:73;;;::::0;-1:-1:-1;;;22291:73:0;;4388:2:1;22291:73:0::1;::::0;::::1;4370:21:1::0;4427:2;4407:18;;;4400:30;4466:34;4446:18;;;4439:62;-1:-1:-1;;;4517:18:1;;;4510:36;4563:19;;22291:73:0::1;4186:402:1::0;22291:73:0::1;22375:28;22394:8;22375:18;:28::i;21469:132::-:0;21350:7;21377:6;-1:-1:-1;;;;;21377:6:0;19935:10;21533:23;21525:68;;;;-1:-1:-1;;;21525:68:0;;4795:2:1;21525:68:0;;;4777:21:1;;;4814:18;;;4807:30;4873:34;4853:18;;;4846:62;4925:18;;21525:68:0;4593:356:1;15386:211:0;15530:58;;-1:-1:-1;;;;;3369:32:1;;15530:58:0;;;3351:51:1;3418:18;;;3411:34;;;15503:86:0;;15523:5;;-1:-1:-1;;;15553:23:0;3324:18:1;;15530:58:0;;;;-1:-1:-1;;15530:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;15530:58:0;-1:-1:-1;;;;;;15530:58:0;;;;;;;;;;15503:19;:86::i;:::-;15386:211;;;:::o;22571:191::-;22645:16;22664:6;;-1:-1:-1;;;;;22681:17:0;;;-1:-1:-1;;;;;;22681:17:0;;;;;;22714:40;;22664:6;;;;;;;22714:40;;22645:16;22714:40;22634:128;22571:191;:::o;15605:248::-;15776:68;;-1:-1:-1;;;;;5212:15:1;;;15776:68:0;;;5194:34:1;5264:15;;5244:18;;;5237:43;5296:18;;;5289:34;;;15749:96:0;;15769:5;;-1:-1:-1;;;15799:27:0;5129:18:1;;15776:68:0;4954:375:1;15749:96:0;15605:248;;;;:::o;18453:716::-;18877:23;18903:69;18931:4;18903:69;;;;;;;;;;;;;;;;;18911:5;-1:-1:-1;;;;;18903:27:0;;;:69;;;;;:::i;:::-;18987:17;;18877:95;;-1:-1:-1;18987:21:0;18983:179;;19084:10;19073:30;;;;;;;;;;;;:::i;:::-;19065:85;;;;-1:-1:-1;;;19065:85:0;;5786:2:1;19065:85:0;;;5768:21:1;5825:2;5805:18;;;5798:30;5864:34;5844:18;;;5837:62;-1:-1:-1;;;5915:18:1;;;5908:40;5965:19;;19065:85:0;5584:406:1;3990:229:0;4127:12;4159:52;4181:6;4189:4;4195:1;4198:12;4159:21;:52::i;:::-;4152:59;3990:229;-1:-1:-1;;;;3990:229:0:o;5110:455::-;5280:12;5338:5;5313:21;:30;;5305:81;;;;-1:-1:-1;;;5305:81:0;;6197:2:1;5305:81:0;;;6179:21:1;6236:2;6216:18;;;6209:30;6275:34;6255:18;;;6248:62;-1:-1:-1;;;6326:18:1;;;6319:36;6372:19;;5305:81:0;5995:402:1;5305:81:0;5398:12;5412:23;5439:6;-1:-1:-1;;;;;5439:11:0;5458:5;5465:4;5439:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5397:73;;;;5488:69;5515:6;5523:7;5532:10;5544:12;5488:26;:69::i;:::-;5481:76;5110:455;-1:-1:-1;;;;;;;5110:455:0:o;7683:644::-;7868:12;7897:7;7893:427;;;7925:10;:17;7946:1;7925:22;7921:290;;-1:-1:-1;;;;;1528:19:0;;;8135:60;;;;-1:-1:-1;;;8135:60:0;;7151:2:1;8135:60:0;;;7133:21:1;7190:2;7170:18;;;7163:30;7229:31;7209:18;;;7202:59;7278:18;;8135:60:0;6949:353:1;8135:60:0;-1:-1:-1;8232:10:0;8225:17;;7893:427;8275:33;8283:10;8295:12;9030:17;;:21;9026:388;;9262:10;9256:17;9319:15;9306:10;9302:2;9298:19;9291:44;9026:388;9389:12;9382:20;;-1:-1:-1;;;9382:20:0;;;;;;;;:::i;596:118:1:-;682:5;675:13;668:21;661:5;658:32;648:60;;704:1;701;694:12;719:376;781:6;789;842:2;830:9;821:7;817:23;813:32;810:52;;;858:1;855;848:12;810:52;897:9;884:23;916:28;938:5;916:28;:::i;:::-;963:5;-1:-1:-1;1020:2:1;1005:18;;992:32;1033:30;992:32;1033:30;:::i;:::-;1082:7;1072:17;;;719:376;;;;;:::o;1100:286::-;1159:6;1212:2;1200:9;1191:7;1187:23;1183:32;1180:52;;;1228:1;1225;1218:12;1180:52;1254:23;;-1:-1:-1;;;;;1306:31:1;;1296:42;;1286:70;;1352:1;1349;1342:12;1391:180;1450:6;1503:2;1491:9;1482:7;1478:23;1474:32;1471:52;;;1519:1;1516;1509:12;1471:52;-1:-1:-1;1542:23:1;;1391:180;-1:-1:-1;1391:180:1:o;1576:184::-;1646:6;1699:2;1687:9;1678:7;1674:23;1670:32;1667:52;;;1715:1;1712;1705:12;1667:52;-1:-1:-1;1738:16:1;;1576:184;-1:-1:-1;1576:184:1:o;2782:127::-;2843:10;2838:3;2834:20;2831:1;2824:31;2874:4;2871:1;2864:15;2898:4;2895:1;2888:15;2914:128;2981:9;;;3002:11;;;2999:37;;;3016:18;;:::i;:::-;2914:128;;;;:::o;3047:125::-;3112:9;;;3133:10;;;3130:36;;;3146:18;;:::i;3456:217::-;3496:1;3522;3512:132;;3566:10;3561:3;3557:20;3554:1;3547:31;3601:4;3598:1;3591:15;3629:4;3626:1;3619:15;3512:132;-1:-1:-1;3658:9:1;;3456:217::o;3678:168::-;3751:9;;;3782;;3799:15;;;3793:22;;3779:37;3769:71;;3820:18;;:::i;5334:245::-;5401:6;5454:2;5442:9;5433:7;5429:23;5425:32;5422:52;;;5470:1;5467;5460:12;5422:52;5502:9;5496:16;5521:28;5543:5;5521:28;:::i;6402:250::-;6487:1;6497:113;6511:6;6508:1;6505:13;6497:113;;;6587:11;;;6581:18;6568:11;;;6561:39;6533:2;6526:10;6497:113;;;-1:-1:-1;;6644:1:1;6626:16;;6619:27;6402:250::o;6657:287::-;6786:3;6824:6;6818:13;6840:66;6899:6;6894:3;6887:4;6879:6;6875:17;6840:66;:::i;:::-;6922:16;;;;;6657:287;-1:-1:-1;;6657:287:1:o;7307:396::-;7456:2;7445:9;7438:21;7419:4;7488:6;7482:13;7531:6;7526:2;7515:9;7511:18;7504:34;7547:79;7619:6;7614:2;7603:9;7599:18;7594:2;7586:6;7582:15;7547:79;:::i;:::-;7687:2;7666:15;-1:-1:-1;;7662:29:1;7647:45;;;;7694:2;7643:54;;7307:396;-1:-1:-1;;7307:396:1:o

Swarm Source

ipfs://fe234cdf76f31fa057a65ea55442b20f414cbb1b629e92669e1f8ae620f8538c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.