Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 25 from a total of 182 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Lock | 22988868 | 229 days ago | IN | 0 ETH | 0.00012865 | ||||
| Lock | 22988862 | 229 days ago | IN | 0 ETH | 0.0001642 | ||||
| Lock | 22988860 | 229 days ago | IN | 0 ETH | 0.00016373 | ||||
| Lock | 22988857 | 229 days ago | IN | 0 ETH | 0.00012385 | ||||
| Lock | 22988856 | 229 days ago | IN | 0 ETH | 0.00016554 | ||||
| Lock | 22988851 | 229 days ago | IN | 0 ETH | 0.00013727 | ||||
| Lock | 22988850 | 229 days ago | IN | 0 ETH | 0.00016697 | ||||
| Lock | 22988847 | 229 days ago | IN | 0 ETH | 0.00016741 | ||||
| Lock | 22988839 | 229 days ago | IN | 0 ETH | 0.00016404 | ||||
| Lock | 22988835 | 229 days ago | IN | 0 ETH | 0.00017481 | ||||
| Lock | 22988829 | 229 days ago | IN | 0 ETH | 0.00016364 | ||||
| Lock | 22988812 | 229 days ago | IN | 0 ETH | 0.00016622 | ||||
| Lock | 22988802 | 229 days ago | IN | 0 ETH | 0.000167 | ||||
| Lock | 22988794 | 229 days ago | IN | 0 ETH | 0.0001704 | ||||
| Lock | 22988780 | 229 days ago | IN | 0 ETH | 0.00017025 | ||||
| Lock | 22988774 | 229 days ago | IN | 0 ETH | 0.00017047 | ||||
| Lock | 22988769 | 229 days ago | IN | 0 ETH | 0.00017042 | ||||
| Lock | 22988768 | 229 days ago | IN | 0 ETH | 0.00017079 | ||||
| Lock | 22988757 | 229 days ago | IN | 0 ETH | 0.00017163 | ||||
| Lock | 22988741 | 229 days ago | IN | 0 ETH | 0.00016953 | ||||
| Lock | 22988738 | 229 days ago | IN | 0 ETH | 0.00016904 | ||||
| Lock | 22988738 | 229 days ago | IN | 0 ETH | 0.00016904 | ||||
| Lock | 22988735 | 229 days ago | IN | 0 ETH | 0.00016879 | ||||
| Lock | 22988730 | 229 days ago | IN | 0 ETH | 0.0001689 | ||||
| Lock | 22988718 | 229 days ago | IN | 0 ETH | 0.00016812 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
NftLocker
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;
import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol";
import {INftLocker} from "./interfaces/INftLocker.sol";
contract NftLocker is INftLocker {
IERC721 public nft;
uint64 public startTimestamp;
uint64 public endTimestamp;
mapping(address user => uint256 lockedNftsCount) public lockedNfts;
constructor(IERC721 _nft, uint64 _startTimestamp, uint64 _endTimestamp) {
require(block.timestamp < _endTimestamp, EndSetInThePast());
require(_startTimestamp < _endTimestamp, InvalidTimespan());
nft = _nft;
startTimestamp = _startTimestamp;
endTimestamp = _endTimestamp;
}
function lock(uint256 tokenId) external {
require(startTimestamp <= block.timestamp, LockingHasNotStarted());
require(block.timestamp < endTimestamp, LockingHasEnded());
nft.transferFrom(msg.sender, address(this), tokenId);
lockedNfts[msg.sender]++;
emit NftLocked(msg.sender, tokenId);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol)
pragma solidity ^0.8.20;
import {IERC721} from "../token/ERC721/IERC721.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC-721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC-721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// 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);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.28;
interface INftLockerErrors {
error EndSetInThePast();
error InvalidTimespan();
error LockingHasNotStarted();
error LockingHasEnded();
}
interface INftLocker is INftLockerErrors {
event NftLocked(address indexed user, uint256 indexed tokenId);
function lock(uint256 tokenId) external;
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"viaIR": true,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC721","name":"_nft","type":"address"},{"internalType":"uint64","name":"_startTimestamp","type":"uint64"},{"internalType":"uint64","name":"_endTimestamp","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EndSetInThePast","type":"error"},{"inputs":[],"name":"InvalidTimespan","type":"error"},{"inputs":[],"name":"LockingHasEnded","type":"error"},{"inputs":[],"name":"LockingHasNotStarted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NftLocked","type":"event"},{"inputs":[],"name":"endTimestamp","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"lockedNfts","outputs":[{"internalType":"uint256","name":"lockedNftsCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nft","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6080346100ff57601f61041a38819003918201601f19168301916001600160401b03831184841017610104578084926060946040528339810103126100ff5780516001600160a01b03811691908290036100ff5761005f6020820161011a565b906001600160401b03906100759060400161011a565b1691824210156100ee576001600160401b0382168311156100dd57600080546001600160e01b0319169190911760a09290921b600160a01b600160e01b0316919091179055600180546001600160401b0319169190911790556040516102eb908161012f8239f35b633308c5af60e01b60005260046000fd5b637770afe560e11b60005260046000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160401b03821682036100ff5756fe608080604052600436101561001357600080fd5b600090813560e01c90816347ccca021461028557508063a85adeab1461025d578063dd467064146100d1578063e4000ee9146100845763e6fd48bc1461005857600080fd5b3461008157806003193601126100815767ffffffffffffffff6020915460a01c16604051908152f35b80fd5b50346100815760203660031901126100815760043573ffffffffffffffffffffffffffffffffffffffff81168091036100cd578160409160209352600283522054604051908152f35b5080fd5b5034610081576020366003190112610081576004359080544267ffffffffffffffff8260a01c16116102355767ffffffffffffffff6001541642101561020d5773ffffffffffffffffffffffffffffffffffffffff16803b156100cd578180916064604051809481937f23b872dd0000000000000000000000000000000000000000000000000000000083523360048401523060248401528860448401525af18015610202576101d6575b5090338252600260205260408220805460001981146101c2576001019055337fc1f9295331f5b6b03bfcca16fd4fdcdefaf753e2624cc44e8cdf97bd53d72f8c8380a380f35b602484634e487b7160e01b81526011600452fd5b67ffffffffffffffff81116101ee576040523861017c565b602482634e487b7160e01b81526041600452fd5b6040513d84823e3d90fd5b6004827f30be36d8000000000000000000000000000000000000000000000000000000008152fd5b6004827f80d6175b000000000000000000000000000000000000000000000000000000008152fd5b5034610081578060031936011261008157602067ffffffffffffffff60015416604051908152f35b9050346100cd57816003193601126100cd5773ffffffffffffffffffffffffffffffffffffffff60209254168152f3fea264697066735822122038363d2c721001de5d5a10fc40cc4127c9107b34db008dc364b14693852f176664736f6c634300081c0033000000000000000000000000bcf2fb914965e65ec0c065757f24ae6c89117b4600000000000000000000000000000000000000000000000000000000688177800000000000000000000000000000000000000000000000000000000068822040
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c90816347ccca021461028557508063a85adeab1461025d578063dd467064146100d1578063e4000ee9146100845763e6fd48bc1461005857600080fd5b3461008157806003193601126100815767ffffffffffffffff6020915460a01c16604051908152f35b80fd5b50346100815760203660031901126100815760043573ffffffffffffffffffffffffffffffffffffffff81168091036100cd578160409160209352600283522054604051908152f35b5080fd5b5034610081576020366003190112610081576004359080544267ffffffffffffffff8260a01c16116102355767ffffffffffffffff6001541642101561020d5773ffffffffffffffffffffffffffffffffffffffff16803b156100cd578180916064604051809481937f23b872dd0000000000000000000000000000000000000000000000000000000083523360048401523060248401528860448401525af18015610202576101d6575b5090338252600260205260408220805460001981146101c2576001019055337fc1f9295331f5b6b03bfcca16fd4fdcdefaf753e2624cc44e8cdf97bd53d72f8c8380a380f35b602484634e487b7160e01b81526011600452fd5b67ffffffffffffffff81116101ee576040523861017c565b602482634e487b7160e01b81526041600452fd5b6040513d84823e3d90fd5b6004827f30be36d8000000000000000000000000000000000000000000000000000000008152fd5b6004827f80d6175b000000000000000000000000000000000000000000000000000000008152fd5b5034610081578060031936011261008157602067ffffffffffffffff60015416604051908152f35b9050346100cd57816003193601126100cd5773ffffffffffffffffffffffffffffffffffffffff60209254168152f3fea264697066735822122038363d2c721001de5d5a10fc40cc4127c9107b34db008dc364b14693852f176664736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bcf2fb914965e65ec0c065757f24ae6c89117b4600000000000000000000000000000000000000000000000000000000688177800000000000000000000000000000000000000000000000000000000068822040
-----Decoded View---------------
Arg [0] : _nft (address): 0xBcF2Fb914965E65eC0c065757f24AE6C89117B46
Arg [1] : _startTimestamp (uint64): 1753315200
Arg [2] : _endTimestamp (uint64): 1753358400
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000bcf2fb914965e65ec0c065757f24ae6c89117b46
Arg [1] : 0000000000000000000000000000000000000000000000000000000068817780
Arg [2] : 0000000000000000000000000000000000000000000000000000000068822040
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.