Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull changes #474

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion contracts/ERC721A.sol
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,15 @@ contract ERC721A is IERC721A {
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;

// Define Unlock Time (Storage)
uint256 public unlockTime;


// =============================================================
// CONSTRUCTOR
// =============================================================

constructor(string memory name_, string memory symbol_) {
constructor(uint256 _unlockTime, string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
Expand Down Expand Up @@ -1146,4 +1150,11 @@ contract ERC721A is IERC721A {
revert(0x00, 0x04)
}
}

// Create Modifier for Time Restriction
modifier onlyAfterUnlock() {
require(block.timestamp >= unlockTime, "Time lock not expired");
_;
}

}