修正nft合约lock功能无效的bug

This commit is contained in:
CounterFire2023 2023-08-23 14:24:28 +08:00
parent 65a0d36702
commit 56f84d850d
2 changed files with 2 additions and 0 deletions

View File

@ -161,6 +161,7 @@ contract BEBadge is AccessControl, ERC721Enumerable {
uint256 firstTokenId,
uint256 batchSize
) internal virtual override {
require(!lockedTokens[firstTokenId], "Can not transfer locked token");
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
}

View File

@ -126,6 +126,7 @@ contract NFT is AccessControl, ERC721Enumerable {
uint256 firstTokenId,
uint256 batchSize
) internal virtual override {
require(!lockedTokens[firstTokenId], "Can not transfer locked token");
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
}