More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 25 from a total of 214 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 21568875 | 82 days ago | IN | 0.001 ETH | 0.00048152 | ||||
Transfer | 21568717 | 82 days ago | IN | 0.0003 ETH | 0.00049215 | ||||
Transfer | 21565958 | 83 days ago | IN | 0.01 ETH | 0.0003784 | ||||
Transfer | 21565338 | 83 days ago | IN | 0.00341564 ETH | 0.00041181 | ||||
Transfer | 21564474 | 83 days ago | IN | 0.01 ETH | 0.0004722 | ||||
Transfer | 21563603 | 83 days ago | IN | 0.00004654 ETH | 0.00051588 | ||||
Transfer | 21560803 | 84 days ago | IN | 0.01 ETH | 0.00031823 | ||||
Transfer | 21560259 | 84 days ago | IN | 0.0005 ETH | 0.00043408 | ||||
Transfer | 21559184 | 84 days ago | IN | 0.012 ETH | 0.00049699 | ||||
Transfer | 21558859 | 84 days ago | IN | 0.01 ETH | 0.00044991 | ||||
Transfer | 21556969 | 84 days ago | IN | 0.003 ETH | 0.00029096 | ||||
Transfer | 21556470 | 84 days ago | IN | 0.15 ETH | 0.00015775 | ||||
Transfer | 21553305 | 85 days ago | IN | 0.02 ETH | 0.00029374 | ||||
Transfer | 21550929 | 85 days ago | IN | 0.028 ETH | 0.0003523 | ||||
Transfer | 21549981 | 85 days ago | IN | 0.002 ETH | 0.00030917 | ||||
Transfer | 21549611 | 85 days ago | IN | 0.0125 ETH | 0.00027429 | ||||
Transfer | 21549459 | 85 days ago | IN | 0.00050077 ETH | 0.00024977 | ||||
Transfer | 21548924 | 85 days ago | IN | 0.05 ETH | 0.0002847 | ||||
Transfer | 21547549 | 85 days ago | IN | 0.1 ETH | 0.00039591 | ||||
Transfer | 21544437 | 86 days ago | IN | 0.047 ETH | 0.00055803 | ||||
Transfer | 21544428 | 86 days ago | IN | 0.03 ETH | 0.00058269 | ||||
Transfer | 21544143 | 86 days ago | IN | 0.03 ETH | 0.00053491 | ||||
Transfer | 21543601 | 86 days ago | IN | 0.00008971 ETH | 0.00028588 | ||||
Transfer | 21541473 | 86 days ago | IN | 0.0029 ETH | 0.00028609 | ||||
Transfer | 21540309 | 86 days ago | IN | 0.003 ETH | 0.00030739 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 21685612 | 66 days ago | 18.51992625 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TimeLockContract
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; contract TimeLockContract is Ownable { using SafeERC20 for IERC20; uint256 public releaseTime; // Store the locked token balance for an account in `lockedBalanceOf[account][token]` // `token = 0x1` means ETH mapping(address => mapping(address => uint256)) public lockedBalanceOf; // Constructor sets the owner address and release time (in Unix timestamp) constructor(uint256 _releaseTime) Ownable(msg.sender) { if (_releaseTime > 0) { require(_releaseTime > block.timestamp, "Release time must be in the future"); require(_releaseTime < block.timestamp + 90 days, "Release time must be within 3 months"); releaseTime = _releaseTime; } } // Function to receive ETH deposits receive() external payable { uint256 amount = msg.value; require(amount > 0, "Deposit amount must be greater than zero"); lockedBalanceOf[msg.sender][address(0x1)] += amount; emit TokenLocked(msg.sender, address(0x1), amount); } // Function to receive ERC20 tokens function lockERC20(address token, uint256 amount) public { require(amount > 0, "Deposit amount must be greater than zero"); lockedBalanceOf[msg.sender][token] += amount; IERC20(token).safeTransferFrom(msg.sender, address(this), amount); emit TokenLocked(msg.sender, token, amount); } // Function to withdraw ETH, only available after release time and only to the beneficiary function withdrawETH(uint256 amount) public onlyOwner { require(releaseTime == 0 || block.timestamp >= releaseTime, "Current time is before release time"); uint256 balance = address(this).balance; require(balance >= amount, "Insufficient ETH balance"); payable(owner()).transfer(amount); emit TokenWithdrawn(address(0x1), amount); } // Function to withdraw ERC20 tokens, only available after release time and only to the beneficiary function withdrawERC20(address token, uint256 amount) public onlyOwner { require(releaseTime == 0 || block.timestamp >= releaseTime, "Current time is before release time"); IERC20 tokenContract = IERC20(token); uint256 balance = tokenContract.balanceOf(address(this)); require(balance >= amount, "Insufficient token balance"); tokenContract.safeTransfer(owner(), amount); emit TokenWithdrawn(token, amount); } event TokenLocked(address indexed account, address token, uint256 amount); event TokenWithdrawn(address token, uint256 amount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 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 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) 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 assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "viaIR": true, "metadata": { "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_releaseTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenWithdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"lockERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"lockedBalanceOf","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":"releaseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60803461019357601f61092638819003918201601f19168301916001600160401b03831184841017610198578084926020946040528339810103126101935751331561017d5760008054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3816100a2575b60405161077790816101af8239f35b4282111561013057506276a700420180421161011a578110156100c9576001553880610093565b60405162461bcd60e51b8152602060048201526024808201527f52656c656173652074696d65206d7573742062652077697468696e2033206d6f6044820152636e74687360e01b6064820152608490fd5b634e487b7160e01b600052601160045260246000fd5b62461bcd60e51b815260206004820152602260248201527f52656c656173652074696d65206d75737420626520696e207468652066757475604482015261726560f01b6064820152608490fd5b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610081575b361561001957600080fd5b6100243415156105d6565b33600052600260205260406000206001600052602052604060002061004a348254610633565b9055604080516001815234602082015233917f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d91a2005b60003560e01c80630ba01ec6146104db5780631fad6d6e1461047a578063715018a6146104215780638da5cb5b146103f8578063a1db97821461027b578063b91d40011461025d578063f14210a61461016c5763f2fde38b0361000e5734610167576020366003190112610167576100f76105c0565b6100ff6106e6565b6001600160a01b0316801561015157600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b34610167576020366003190112610167576004356101886106e6565b61019e6001548015908115610252575b50610656565b80471061020d5760008080808460018060a01b03825416828215610204575bf1156101f857604080516001815260208101929092527fa2bd9fcfcdba69f52bcd9a520846ad4bd685b187483f53efc42d035b2ddebff091a1005b6040513d6000823e3d90fd5b506108fc6101bd565b60405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74204554482062616c616e636500000000000000006044820152606490fd5b905042101583610198565b34610167576000366003190112610167576020600154604051908152f35b34610167576040366003190112610167576102946105c0565b60243561029f6106e6565b6102b460015480159081156103ed5750610656565b6040516370a0823160e01b81523060048201526001600160a01b0383169290602081602481875afa80156101f85783916000916103b8575b50106103735760005460405163a9059cbb60e01b60208201526001600160a01b039091166024820152604480820184905281527fa2bd9fcfcdba69f52bcd9a520846ad4bd685b187483f53efc42d035b2ddebff09361035691906103516064836106ae565b61070f565b604080516001600160a01b039290921682526020820192909252a1005b60405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e63650000000000006044820152606490fd5b9150506020813d6020116103e5575b816103d4602093836106ae565b8101031261016757829051856102ec565b3d91506103c7565b905042101584610198565b34610167576000366003190112610167576000546040516001600160a01b039091168152602090f35b346101675760003660031901126101675761043a6106e6565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610167576040366003190112610167576104936105c0565b602435906001600160a01b03821682036101675760018060a01b0316600052600260205260406000209060018060a01b03166000526020526020604060002054604051908152f35b34610167576040366003190112610167576104f46105c0565b7f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d6105bb6024356105268115156105d6565b336000526002602052604060002060018060a01b0385166000526020526040600020610553828254610633565b90556105986040516323b872dd60e01b6020820152336024820152306044820152826064820152606481526105896084826106ae565b6001600160a01b03861661070f565b604080516001600160a01b03909516855260208501919091523393918291820190565b0390a2005b600435906001600160a01b038216820361016757565b156105dd57565b60405162461bcd60e51b815260206004820152602860248201527f4465706f73697420616d6f756e74206d7573742062652067726561746572207460448201526768616e207a65726f60c01b6064820152608490fd5b9190820180921161064057565b634e487b7160e01b600052601160045260246000fd5b1561065d57565b60405162461bcd60e51b815260206004820152602360248201527f43757272656e742074696d65206973206265666f72652072656c656173652074604482015262696d6560e81b6064820152608490fd5b90601f8019910116810190811067ffffffffffffffff8211176106d057604052565b634e487b7160e01b600052604160045260246000fd5b6000546001600160a01b031633036106fa57565b63118cdaa760e01b6000523360045260246000fd5b906000602091828151910182855af1156101f8576000513d61076157506001600160a01b0381163b155b6107405750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b6001141561073956fea164736f6c634300081c000a0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361015610081575b361561001957600080fd5b6100243415156105d6565b33600052600260205260406000206001600052602052604060002061004a348254610633565b9055604080516001815234602082015233917f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d91a2005b60003560e01c80630ba01ec6146104db5780631fad6d6e1461047a578063715018a6146104215780638da5cb5b146103f8578063a1db97821461027b578063b91d40011461025d578063f14210a61461016c5763f2fde38b0361000e5734610167576020366003190112610167576100f76105c0565b6100ff6106e6565b6001600160a01b0316801561015157600080546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b631e4fbdf760e01b600052600060045260246000fd5b600080fd5b34610167576020366003190112610167576004356101886106e6565b61019e6001548015908115610252575b50610656565b80471061020d5760008080808460018060a01b03825416828215610204575bf1156101f857604080516001815260208101929092527fa2bd9fcfcdba69f52bcd9a520846ad4bd685b187483f53efc42d035b2ddebff091a1005b6040513d6000823e3d90fd5b506108fc6101bd565b60405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e74204554482062616c616e636500000000000000006044820152606490fd5b905042101583610198565b34610167576000366003190112610167576020600154604051908152f35b34610167576040366003190112610167576102946105c0565b60243561029f6106e6565b6102b460015480159081156103ed5750610656565b6040516370a0823160e01b81523060048201526001600160a01b0383169290602081602481875afa80156101f85783916000916103b8575b50106103735760005460405163a9059cbb60e01b60208201526001600160a01b039091166024820152604480820184905281527fa2bd9fcfcdba69f52bcd9a520846ad4bd685b187483f53efc42d035b2ddebff09361035691906103516064836106ae565b61070f565b604080516001600160a01b039290921682526020820192909252a1005b60405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e7420746f6b656e2062616c616e63650000000000006044820152606490fd5b9150506020813d6020116103e5575b816103d4602093836106ae565b8101031261016757829051856102ec565b3d91506103c7565b905042101584610198565b34610167576000366003190112610167576000546040516001600160a01b039091168152602090f35b346101675760003660031901126101675761043a6106e6565b600080546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610167576040366003190112610167576104936105c0565b602435906001600160a01b03821682036101675760018060a01b0316600052600260205260406000209060018060a01b03166000526020526020604060002054604051908152f35b34610167576040366003190112610167576104f46105c0565b7f991b8e8a2e2b8ff515f7045174eeb52eb4868e69c5bb4259da6146a93c77574d6105bb6024356105268115156105d6565b336000526002602052604060002060018060a01b0385166000526020526040600020610553828254610633565b90556105986040516323b872dd60e01b6020820152336024820152306044820152826064820152606481526105896084826106ae565b6001600160a01b03861661070f565b604080516001600160a01b03909516855260208501919091523393918291820190565b0390a2005b600435906001600160a01b038216820361016757565b156105dd57565b60405162461bcd60e51b815260206004820152602860248201527f4465706f73697420616d6f756e74206d7573742062652067726561746572207460448201526768616e207a65726f60c01b6064820152608490fd5b9190820180921161064057565b634e487b7160e01b600052601160045260246000fd5b1561065d57565b60405162461bcd60e51b815260206004820152602360248201527f43757272656e742074696d65206973206265666f72652072656c656173652074604482015262696d6560e81b6064820152608490fd5b90601f8019910116810190811067ffffffffffffffff8211176106d057604052565b634e487b7160e01b600052604160045260246000fd5b6000546001600160a01b031633036106fa57565b63118cdaa760e01b6000523360045260246000fd5b906000602091828151910182855af1156101f8576000513d61076157506001600160a01b0381163b155b6107405750565b635274afe760e01b60009081526001600160a01b0391909116600452602490fd5b6001141561073956fea164736f6c634300081c000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _releaseTime (uint256): 0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
177:2591:10:-:0;;;;;;;;;-1:-1:-1;177:2591:10;;;;;;;;1019:63;1000:9;1027:10;;1019:63;:::i;:::-;1109:10;1036:1;177:2591;1093:15;177:2591;;;1036:1;177:2591;;1036:1;177:2591;;;;1036:1;177:2591;1093:51;1000:9;177:2591;;1093:51;:::i;:::-;177:2591;;;;;;;;1000:9;177:2591;;;;1109:10;;1159:45;;;177:2591;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;177:2591:10;;;;;;:::i;:::-;1500:62:0;;:::i;:::-;-1:-1:-1;;;;;177:2591:10;2627:22:0;;2623:91;;177:2591:10;;;-1:-1:-1;;;;;;177:2591:10;;;;;;-1:-1:-1;;;;;177:2591:10;;3052:40:0;;177:2591:10;3052:40:0;177:2591:10;2623:91:0;2672:31;;;177:2591:10;2672:31:0;177:2591:10;;;;;2672:31:0;177:2591:10;;;;;;;;;;-1:-1:-1;;177:2591:10;;;;;;1500:62:0;;:::i;:::-;1742:98:10;177:2591;;1750:16;;:50;;;;;177:2591;1742:98;;:::i;:::-;1869:21;;1908:17;177:2591;;;;;;;;;;;;;;;1965:33;;;;;177:2591;1965:33;;;;177:2591;;;;;;;;;;;;;2013:36;;;177:2591;1965:33;177:2591;;;;;;;;;1965:33;;;;;177:2591;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;;;;;;;;;;;1750:50;1770:15;;;:30;;1750:50;;;177:2591;;;;;;-1:-1:-1;;177:2591:10;;;;;253:26;177:2591;;;;;;;;;;;;;-1:-1:-1;;177:2591:10;;;;;;:::i;:::-;;;1500:62:0;;:::i;:::-;2247:98:10;177:2591;;2255:16;;:50;;;;;2247:98;;:::i;:::-;177:2591;;-1:-1:-1;;;2420:38:10;;2452:4;177:2591;2420:38;;177:2591;-1:-1:-1;;;;;177:2591:10;;;;;;;;;2420:38;;;;;;;;177:2591;2420:38;;;177:2591;2476:17;;177:2591;;;;;;-1:-1:-1;;;177:2591:10;1380:43:5;;;-1:-1:-1;;;;;177:2591:10;;;;1380:43:5;;177:2591:10;;;;;;;;1380:43:5;;2593:29:10;;1380:43:5;;177:2591:10;1380:43:5;177:2591:10;;1380:43:5;:::i;:::-;;:::i;:::-;177:2591:10;;;-1:-1:-1;;;;;177:2591:10;;;;;;;;;;;;;2593:29;177:2591;;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;;;;;;;;;;;2420:38;;;;177:2591;2420:38;;177:2591;2420:38;;;;;;177:2591;2420:38;;;:::i;:::-;;;177:2591;;;;;;;2420:38;;;;;;-1:-1:-1;2420:38:10;;2255:50;2275:15;;;:30;;2255:50;;;177:2591;;;;;;-1:-1:-1;;177:2591:10;;;;;;;;-1:-1:-1;;;;;177:2591:10;;;;;;;;;;;;;;-1:-1:-1;;177:2591:10;;;;1500:62:0;;:::i;:::-;177:2591:10;;;-1:-1:-1;;;;;;177:2591:10;;;;-1:-1:-1;;;;;177:2591:10;3052:40:0;177:2591:10;;3052:40:0;177:2591:10;;;;;;;-1:-1:-1;;177:2591:10;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;177:2591:10;;;;;;;;;;;;;;407:70;177:2591;;;;;407:70;177:2591;;;;;;-1:-1:-1;177:2591:10;;;;;-1:-1:-1;177:2591:10;;;;;;;;;;;;;;-1:-1:-1;;177:2591:10;;;;;;:::i;:::-;1532:38;;177:2591;;1324:63;1332:10;;;1324:63;:::i;:::-;1414:10;177:2591;;1398:15;177:2591;;;;;;;;;;;;-1:-1:-1;177:2591:10;;;;-1:-1:-1;177:2591:10;1398:44;177:2591;;;1398:44;:::i;:::-;177:2591;;1797:53:5;177:2591:10;;;;;;1797:53:5;;;1414:10:10;177:2591;1797:53:5;;177:2591:10;1503:4;177:2591;;;;;;;;;;1797:53:5;;;;;;:::i;:::-;-1:-1:-1;;;;;177:2591:10;;1797:53:5;:::i;:::-;177:2591:10;;;-1:-1:-1;;;;;177:2591:10;;;;;;;;;;;;1414:10;;177:2591;;;;;;;1532:38;;;;177:2591;;;;;-1:-1:-1;;;;;177:2591:10;;;;;;:::o;:::-;;;;:::o;:::-;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;;;;;;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::o;:::-;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;;;;;;;;-1:-1:-1;;;177:2591:10;;;;;;;;;;1380:43:5;;177:2591:10;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;177:2591:10;;;;;-1:-1:-1;177:2591:10;1796:162:0;1710:6;177:2591:10;-1:-1:-1;;;;;177:2591:10;735:10:7;1855:23:0;1851:101;;1796:162::o;1851:101::-;1901:40;;;1710:6;1901:40;735:10:7;1901:40:0;177:2591:10;;1710:6:0;1901:40;7738:720:5;;-1:-1:-1;7875:421:5;7738:720;7875:421;;;;;;;;;;;;-1:-1:-1;7875:421:5;;8310:15;;-1:-1:-1;;;;;;177:2591:10;;8328:26:5;:31;8310:68;8306:146;;7738:720;:::o;8306:146::-;-1:-1:-1;;;;8401:40:5;;;-1:-1:-1;;;;;177:2591:10;;;;8401:40:5;177:2591:10;;;8401:40:5;8310:68;8377:1;8362:16;;8310:68;
Swarm Source
none
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.