编译器
0.8.18+commit.87f61d96
文件 1 的 15:Coliseum.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./src/DefaultOperatorFilterer.sol";
import "./ColiseumReservations.sol";
import "./ColiseumReservationsNormal.sol";
import "./ERC721A.sol";
import "./IERC721A.sol";
contract Coliseum is
ERC721A,
Ownable,
ReentrancyGuard,
DefaultOperatorFilterer
{
using Strings for uint256;
using SafeMath for uint256;
error MaxSupplyExceeded();
error NotAllowlisted();
error MaxPerWalletExceeded();
error InsufficientValue();
error PreSaleNotActive();
error PublicSaleNotActive();
error NoContracts();
error NotReserved();
error SettingMaxSupplyIsFrozen();
error SoulBoundTokensMayOnlyBeBurned();
error NotAController();
error SaleSupplyExceeded();
error LockedUpPeriodNotOverForToken();
error PreSaleReservationAlreadyClaimed();
error PreSaleAlreadyClaimed();
error NormalReservationAlreadyClaimed();
error NormalAlreadyClaimed();
error HighTierAlreadyClaimed();
error LocksAreFrozen();
error NotAnOwner();
ColiseumReservations public reservationContract =
ColiseumReservations(0x262428D0F12366a486dA19A123FAb4528B6a2bf4);
ColiseumReservationsNormal public reservationNormalContract =
ColiseumReservationsNormal(0xcE7f5ABB916b2fcC9505f58aA988cA0C4ED6E34B);
uint256 public totalReservedPreSale;
uint256 public totalReservedNormalSale;
uint256 public presaleCost = 0.5 ether;
uint256 public normalCost = 0.5 ether;
uint256 public highTierCost = 3 ether;
uint256 public publicCost = 3 ether;
uint256 public deployTime;
uint256 public deadlineTime;
uint256 public deployTimeLater;
uint256 public deadlineTimeLater;
uint256 public presaleMintedAmount = 0;
uint256 public normalMintedAmount = 0;
uint256 public highTierMintedAmount = 0;
uint256 public soulBoundedAmount = 0;
uint16 public maxSupplyForPresale = 205;
uint16 public maxSupplyForNormal = 205;
uint16 public maxSupplyForHighTier = 123;
uint16 public maxSupply = 533;
uint8 public maxMintAmount = 2;
string private _baseTokenURI =
"https://nftstorage.link/ipfs/bafybeicksu2nga5i2kwuc5wu2ovbsouwsaisgdyp2rhtrkfu7augoen76y/";
bool public presaleActive;
bool public normalActive;
bool public highTierActive;
bool public publicSaleActive;
bool public LocksFrozen;
bool public soulBoundLockActive = true;
bool public setMaxSupplyFrozen;
mapping(address => bool) private _controller;
mapping(address => bool) private _preSaleReservationClaimed;
mapping(address => bool) private _normalReservationClaimed;
mapping(address => bool) private _preSaleClaimed;
mapping(address => bool) private _normalClaimed;
mapping(address => bool) private _highTierClaimed;
mapping(uint256 => bool) private _lockedTokenId;
mapping(uint256 => bool) private _lockedTokenIdLater;
bytes32 private presaleMerkleRoot;
bytes32 private normalMerkleRoot;
bytes32 private highTierMerkleRoot;
mapping(uint256 => address) private _soulBoundList;
mapping(address => uint8) private _amountAddressSoulbounded;
mapping(uint256 => uint8) private _tokenToTier;
constructor() ERC721A("Coliseum", "COLISEUM") {
_mint(msg.sender, 1);
_tokenToTier[1] = 1;
deployTime = block.timestamp;
deadlineTime = 201600;
}
modifier onlyController() {
if (_controller[msg.sender] == false) revert NotAController();
_;
}
modifier callerIsUser() {
if (msg.sender != tx.origin) revert NoContracts();
_;
}
function freezeSetMaxSupply() external onlyOwner {
setMaxSupplyFrozen = true;
}
function setMaxSupply(uint16 _maxSupply) external onlyOwner {
if (setMaxSupplyFrozen == true) revert SettingMaxSupplyIsFrozen();
maxSupply = _maxSupply;
}
function setToNormalReservationAmountOfContract() external onlyOwner {
totalReservedNormalSale = reservationNormalContract.reservedCounter();
}
function setToPresaleReservationAmountOfContract() external onlyOwner {
totalReservedPreSale = reservationNormalContract.reservedCounter();
}
function setToNormalReservationAmount(uint256 _amount) external onlyOwner {
totalReservedNormalSale = _amount;
}
function setToPresaleReservationAmount(uint256 _amount) external onlyOwner {
totalReservedPreSale = _amount;
}
function setMaxSupplyForPresale(
uint16 _maxSupplyForPresale
) external onlyOwner {
maxSupplyForPresale = _maxSupplyForPresale;
}
function setMaxSupplyForNormalMint(
uint16 _maxSupplyForNormal
) external onlyOwner {
maxSupplyForNormal = _maxSupplyForNormal;
}
function setMaxSupplyForHighTierMint(
uint16 _maxSupplyForHighTier
) external onlyOwner {
maxSupplyForHighTier = _maxSupplyForHighTier;
}
function setPreSaleCost(uint256 _newPreSaleCost) external onlyOwner {
presaleCost = _newPreSaleCost;
}
function setNormalCost(uint256 _newNormalCost) external onlyOwner {
normalCost = _newNormalCost;
}
function setHighTierCost(uint256 _newHighTierCost) external onlyOwner {
highTierCost = _newHighTierCost;
}
function setPublicSaleCost(uint256 _newPublicCost) external onlyOwner {
publicCost = _newPublicCost;
}
function setReservationContractPreSale(
ColiseumReservations _contractAddress
) external onlyOwner {
reservationContract = _contractAddress;
}
function setReservationContractNormal(
ColiseumReservationsNormal _contractAddress
) external onlyOwner {
reservationNormalContract = _contractAddress;
}
function setTierForTokens(
uint256[] calldata _tokenIds,
uint8 _tokenTier
) external onlyController {
for (uint256 i = 0; i < _tokenIds.length; i++) {
_tokenToTier[_tokenIds[i]] = _tokenTier;
}
}
function setTierForToken(
uint256 _tokenId,
uint8 _tokenTier
) external onlyController {
_tokenToTier[_tokenId] = _tokenTier;
}
function setTiersForTokens(
uint256[] calldata _tokenIds,
uint8[] calldata _tokenTier
) external onlyController {
for (uint256 i = 0; i < _tokenIds.length; i++) {
_tokenToTier[_tokenIds[i]] = _tokenTier[i];
}
}
function presaleReservedMint() external callerIsUser {
if (!presaleActive) revert PreSaleNotActive();
if (reservationContract.userReserved(msg.sender) == false)
revert NotReserved();
if (presaleMintedAmount + 2 > maxSupplyForPresale)
revert SaleSupplyExceeded();
if (totalSupply() - soulBoundedAmount + 2 > maxSupply)
revert MaxSupplyExceeded();
if (_preSaleReservationClaimed[msg.sender])
revert PreSaleReservationAlreadyClaimed();
_preSaleReservationClaimed[msg.sender] = true;
_mint(msg.sender, 2);
presaleMintedAmount += 2;
_lockedTokenId[totalMinted()] = true;
_tokenToTier[totalMinted() - 1] = 2;
_tokenToTier[totalMinted()] = 2;
}
function presaleMint(
bytes32[] calldata _proof
) external payable callerIsUser {
if (!presaleActive) revert PreSaleNotActive();
if (
presaleMintedAmount + 2 >
maxSupplyForPresale - (totalReservedPreSale * 2)
) revert SaleSupplyExceeded();
if (totalSupply() - soulBoundedAmount + 2 > maxSupply)
revert MaxSupplyExceeded();
if (
!MerkleProof.verify(
_proof,
presaleMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotAllowlisted();
if (msg.value != presaleCost) revert InsufficientValue();
if (_preSaleClaimed[msg.sender]) revert PreSaleAlreadyClaimed();
_preSaleClaimed[msg.sender] = true;
_mint(msg.sender, 2);
_lockedTokenIdLater[totalMinted()] = true;
_lockedTokenIdLater[totalMinted() - 1] = true;
_tokenToTier[totalMinted() - 1] = 2;
_tokenToTier[totalMinted()] = 2;
}
function normalReservedMint() external callerIsUser {
if (!normalActive) revert PreSaleNotActive();
if (reservationNormalContract.userReserved(msg.sender) == false)
revert NotReserved();
if (
normalMintedAmount + 1 >
maxSupplyForNormal - totalReservedNormalSale
) revert SaleSupplyExceeded();
if (totalSupply() - soulBoundedAmount + 1 > maxSupply)
revert MaxSupplyExceeded();
if (_normalReservationClaimed[msg.sender])
revert NormalReservationAlreadyClaimed();
_normalReservationClaimed[msg.sender] = true;
normalMintedAmount++;
_mint(msg.sender, 1);
_tokenToTier[totalMinted()] = 2;
}
function normalMint(
bytes32[] calldata _proof
) external payable callerIsUser {
if (!normalActive) revert PreSaleNotActive();
if (normalMintedAmount + 1 > maxSupplyForNormal)
revert SaleSupplyExceeded();
if (totalSupply() - soulBoundedAmount + 1 > maxSupply)
revert MaxSupplyExceeded();
if (
!MerkleProof.verify(
_proof,
normalMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotAllowlisted();
if (msg.value != normalCost) revert InsufficientValue();
if (_normalClaimed[msg.sender]) revert NormalAlreadyClaimed();
_normalClaimed[msg.sender] = true;
normalMintedAmount++;
_mint(msg.sender, 1);
_lockedTokenIdLater[totalMinted()] = true;
_tokenToTier[totalMinted()] = 2;
}
function highTierMint(
bytes32[] calldata _proof
) external payable callerIsUser {
if (!highTierActive) revert PreSaleNotActive();
if (highTierMintedAmount + 1 > maxSupplyForHighTier)
revert SaleSupplyExceeded();
if (totalSupply() - soulBoundedAmount + 1 > maxSupply)
revert MaxSupplyExceeded();
if (
!MerkleProof.verify(
_proof,
highTierMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotAllowlisted();
if (msg.value != highTierCost) revert InsufficientValue();
if (_highTierClaimed[msg.sender]) revert HighTierAlreadyClaimed();
_highTierClaimed[msg.sender] = true;
highTierMintedAmount++;
_mint(msg.sender, 1);
_lockedTokenIdLater[totalMinted()] = true;
_tokenToTier[totalMinted()] = 1;
}
function mint(uint8 _amount) external payable callerIsUser {
if (!publicSaleActive) revert PublicSaleNotActive();
if (totalSupply() - soulBoundedAmount + _amount > maxSupply)
revert MaxSupplyExceeded();
if (_numberMinted(msg.sender) + _amount > maxMintAmount)
revert MaxPerWalletExceeded();
if (msg.value != publicCost * _amount) revert InsufficientValue();
_mint(msg.sender, _amount);
_lockedTokenIdLater[totalMinted()] = true;
}
function airDrop(address[] calldata targets) external {
require(
(_controller[msg.sender] == true) || (owner() == _msgSender()),
"Caller is not authorized"
);
if (targets.length + totalSupply() - soulBoundedAmount > maxSupply)
revert MaxSupplyExceeded();
for (uint256 i = 0; i < targets.length; i++) {
_mint(targets[i], 1);
_tokenToTier[totalMinted()] = 2;
}
}
function airDropAndSoulbound(
address[] calldata targets
) external onlyOwner {
for (uint256 i = 0; i < targets.length; i++) {
soulBoundedAmount++;
_amountAddressSoulbounded[targets[i]] += 1;
_mint(targets[i], 1);
_soulBoundList[totalMinted()] = targets[i];
}
}
function soulboundTokensToAddresses(
uint256[] calldata tokenIds,
address[] calldata targets
) external onlyOwner {
for (uint256 i = 0; i < targets.length; i++) {
if (targets[i] != ownerOf(tokenIds[i])) revert NotAnOwner();
if (_soulBoundList[tokenIds[i]] == address(0)) {
_soulBoundList[tokenIds[i]] = targets[i];
_amountAddressSoulbounded[targets[i]] += 1;
soulBoundedAmount++;
}
}
}
function unSoulboundTokens(uint256[] calldata tokenIds) external onlyOwner {
for (uint256 i = 0; i < tokenIds.length; i++) {
if (_soulBoundList[tokenIds[i]] != address(0)) {
_amountAddressSoulbounded[_soulBoundList[tokenIds[i]]] -= 1;
_soulBoundList[tokenIds[i]] = address(0);
soulBoundedAmount--;
}
}
}
function hasUserSoulbounded(address _user) public view returns (bool) {
bool result = false;
for (uint256 i = 1; i <= totalMinted(); i++) {
if (_soulBoundList[i] == _user) {
result = true;
}
}
return result;
}
function getSoulboundTokensOfUser(
address _user
) public view returns (uint256[] memory) {
uint256[] memory tokenIds = new uint256[](totalMinted());
uint256 tokenCount = 0;
for (uint256 i = 1; i <= totalMinted(); i++) {
if (_soulBoundList[i] == _user) {
tokenIds[tokenCount] = i;
tokenCount++;
}
}
uint256[] memory result = new uint256[](tokenCount);
for (uint256 j = 0; j < tokenCount; j++) {
result[j] = tokenIds[j];
}
return result;
}
function getAllSoulboundedTokens() public view returns (uint256[] memory) {
uint256[] memory tokenIds = new uint256[](totalMinted());
uint256 tokenCount = 0;
for (uint256 i = 1; i <= totalMinted(); i++) {
if (_soulBoundList[i] != address(0)) {
tokenIds[tokenCount] = i;
tokenCount++;
}
}
uint256[] memory result = new uint256[](tokenCount);
for (uint256 j = 0; j < tokenCount; j++) {
result[j] = tokenIds[j];
}
return result;
}
function burn(uint256[] calldata tokenIds) external onlyController {
for (uint256 i = 0; i < tokenIds.length; i++) {
_soulBoundList[i] = address(0);
_burn(tokenIds[i]);
}
}
function setMaxMintAmount(uint8 _maxMintAmount) external onlyOwner {
maxMintAmount = _maxMintAmount;
}
function _baseURI() internal view virtual override returns (string memory) {
return _baseTokenURI;
}
function setBaseURI(string calldata baseURI) external onlyOwner {
_baseTokenURI = baseURI;
}
function togglePublicSale() external onlyOwner {
publicSaleActive = !publicSaleActive;
}
function togglePresale() external onlyOwner {
presaleActive = !presaleActive;
}
function toggleNormal() external onlyOwner {
normalActive = !normalActive;
}
function toggleHighTier() external onlyOwner {
highTierActive = !highTierActive;
}
function toggleSoulboundLock() external onlyOwner {
soulBoundLockActive = !soulBoundLockActive;
}
function addControllers(address[] calldata _addresses) external onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
_controller[_addresses[i]] = true;
}
}
function removeControllers(
address[] calldata _addresses
) external onlyOwner {
for (uint256 i = 0; i < _addresses.length; i++) {
_controller[_addresses[i]] = false;
}
}
function isController(address _address) external view returns (bool) {
return _controller[_address];
}
function setPreSaleMerkleRoot(bytes32 _newMerkleRoot) external onlyOwner {
presaleMerkleRoot = _newMerkleRoot;
}
function setNormalMerkleRoot(bytes32 _newMerkleRoot) external onlyOwner {
normalMerkleRoot = _newMerkleRoot;
}
function setHighTierMerkleRoot(bytes32 _newMerkleRoot) external onlyOwner {
highTierMerkleRoot = _newMerkleRoot;
}
function getSoulboundAmount(address _user) external view returns (uint256) {
return _amountAddressSoulbounded[_user];
}
function isPreSaleValid(
address _user,
bytes32[] calldata _proof
) external view returns (bool) {
return
MerkleProof.verify(
_proof,
presaleMerkleRoot,
keccak256(abi.encodePacked(_user))
);
}
function isNormalValid(
address _user,
bytes32[] calldata _proof
) external view returns (bool) {
return
MerkleProof.verify(
_proof,
normalMerkleRoot,
keccak256(abi.encodePacked(_user))
);
}
function isHighTierValid(
address _user,
bytes32[] calldata _proof
) external view returns (bool) {
return
MerkleProof.verify(
_proof,
highTierMerkleRoot,
keccak256(abi.encodePacked(_user))
);
}
function getTokenTier(uint256 _tokenId) public view returns (uint8) {
return _tokenToTier[_tokenId];
}
function freezeLock() external onlyOwner {
if (LocksFrozen) revert LocksAreFrozen();
LocksFrozen = true;
}
function setLock(
uint256 _delayTime,
bool _updateDeployTime
) external onlyOwner {
if (LocksFrozen) revert LocksAreFrozen();
if (_updateDeployTime) {
deployTime = block.timestamp;
deadlineTime = _delayTime;
} else {
deadlineTime = _delayTime;
}
}
function setLockForLater(
uint256 _delayTime,
bool _updateDeployTime
) external onlyOwner {
if (LocksFrozen) revert LocksAreFrozen();
if (_updateDeployTime) {
deployTimeLater = block.timestamp;
deadlineTimeLater = _delayTime;
} else {
deadlineTimeLater = _delayTime;
}
}
function hasClaimedPreSaleReservation(
address _user
) public view returns (bool) {
return _preSaleReservationClaimed[_user];
}
function hasClaimedPreSaleMint(address _user) public view returns (bool) {
return _preSaleClaimed[_user];
}
function hasClaimedNormalReservation(
address _user
) public view returns (bool) {
return _normalReservationClaimed[_user];
}
function hasClaimedNormalMint(address _user) public view returns (bool) {
return _normalClaimed[_user];
}
function hasClaimedHighTierMint(address _user) public view returns (bool) {
return _highTierClaimed[_user];
}
function islockedTokenId(uint256 _tokenId) public view returns (bool) {
if (_lockedTokenId[_tokenId] == false) {
return false;
} else {
if (deployTime + deadlineTime > block.timestamp) {
return true;
} else {
return false;
}
}
}
function islockedTokenIdForLater(
uint256 _tokenId
) public view returns (bool) {
if (_lockedTokenIdLater[_tokenId] == false) {
return false;
} else {
if (deployTimeLater + deadlineTimeLater > block.timestamp) {
return true;
} else {
return false;
}
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual override {
if (soulBoundLockActive) {
if (_soulBoundList[startTokenId] != address(0)) {
if (!_controller[msg.sender]) {
if (to != address(0))
revert SoulBoundTokensMayOnlyBeBurned();
}
}
}
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
if (_lockedTokenId[tokenId]) {
if (deployTime + deadlineTime > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenId[tokenId] = false;
}
if (_lockedTokenIdLater[tokenId]) {
if (deployTimeLater + deadlineTimeLater > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenIdLater[tokenId] = false;
}
super.transferFrom(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable override onlyAllowedOperator(from) {
if (_lockedTokenId[tokenId]) {
if (deployTime + deadlineTime > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenId[tokenId] = false;
}
if (_lockedTokenIdLater[tokenId]) {
if (deployTimeLater + deadlineTimeLater > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenIdLater[tokenId] = false;
}
super.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory data
) public payable override onlyAllowedOperator(from) {
if (_lockedTokenId[tokenId]) {
if (deployTime + deadlineTime > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenId[tokenId] = false;
}
if (_lockedTokenIdLater[tokenId]) {
if (deployTimeLater + deadlineTimeLater > block.timestamp)
revert LockedUpPeriodNotOverForToken();
_lockedTokenIdLater[tokenId] = false;
}
super.safeTransferFrom(from, to, tokenId, data);
}
function withdraw() external onlyOwner nonReentrant {
uint256 balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
}
文件 2 的 15:ColiseumReservations.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ColiseumReservations is Ownable, ReentrancyGuard {
error NoContracts();
error InvalidAmount();
error AlreadyReserved();
error AllocationWouldExceedMax();
error NotQualified();
uint256 private reservationPrice = 0.5 ether;
uint256 public reservedCounter = 1;
uint256 public maxReservable = 102;
bytes32 private qualifiedMerkleRoot;
mapping(address => bool) private _reserved;
constructor() {
_reserved[msg.sender] = true;
}
modifier callerIsUser() {
if (msg.sender != tx.origin) revert NoContracts();
_;
}
function setQualifiedMerkleRoot(bytes32 _qualifiedMerkleRoot)
external
onlyOwner
{
qualifiedMerkleRoot = _qualifiedMerkleRoot;
}
function isValid(address _user, bytes32[] calldata _proof)
external
view
returns (bool)
{
return
MerkleProof.verify(
_proof,
qualifiedMerkleRoot,
keccak256(abi.encodePacked(_user))
);
}
function setReservationPrice(uint256 _reservationPrice) external onlyOwner {
reservationPrice = _reservationPrice;
}
function reserve(bytes32[] calldata _proof) external payable callerIsUser {
if (_reserved[msg.sender]) revert AlreadyReserved();
if (msg.value != reservationPrice) revert InvalidAmount();
if (
!MerkleProof.verify(
_proof,
qualifiedMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotQualified();
if (reservedCounter + 1 > maxReservable)
revert AllocationWouldExceedMax();
_reserved[msg.sender] = true;
reservedCounter++;
}
function addAddressesReserved(address[] calldata _addresses)
external
onlyOwner
{
for (uint256 i = 0; i < _addresses.length; i++) {
if (_reserved[_addresses[i]] == false) {
reservedCounter++;
_reserved[_addresses[i]] = true;
}
}
}
function removeAddressesReserved(address[] calldata _addresses)
external
onlyOwner
{
for (uint256 i = 0; i < _addresses.length; i++) {
if (_reserved[_addresses[i]] == true) {
reservedCounter = reservedCounter - 1;
_reserved[_addresses[i]] = false;
}
}
}
function setMaxReservable(uint256 _newMaxReservable) external onlyOwner {
maxReservable = _newMaxReservable;
}
function getReservationPrice() external view returns (uint256) {
return reservationPrice;
}
function userReserved(address _user) external view returns (bool) {
return _reserved[_user];
}
function withdraw() external onlyOwner nonReentrant {
uint256 balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
}
文件 3 的 15:ColiseumReservationsNormal.sol
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
contract ColiseumReservationsNormal is Ownable, ReentrancyGuard {
error NoContracts();
error InvalidAmount();
error AlreadyReserved();
error AllocationWouldExceedMax();
error NotQualified();
uint256 private reservationPrice = 0.5 ether;
uint256 public reservedCounter = 1;
uint256 public maxReservable = 205;
bytes32 private qualifiedMerkleRoot;
mapping(address => bool) private _reserved;
constructor() {
_reserved[msg.sender] = true;
}
modifier callerIsUser() {
if (msg.sender != tx.origin) revert NoContracts();
_;
}
function setQualifiedMerkleRoot(bytes32 _qualifiedMerkleRoot)
external
onlyOwner
{
qualifiedMerkleRoot = _qualifiedMerkleRoot;
}
function isValid(address _user, bytes32[] calldata _proof)
external
view
returns (bool)
{
return
MerkleProof.verify(
_proof,
qualifiedMerkleRoot,
keccak256(abi.encodePacked(_user))
);
}
function setReservationPrice(uint256 _reservationPrice) external onlyOwner {
reservationPrice = _reservationPrice;
}
function reserve(bytes32[] calldata _proof) external payable callerIsUser {
if (_reserved[msg.sender]) revert AlreadyReserved();
if (msg.value != reservationPrice) revert InvalidAmount();
if (
!MerkleProof.verify(
_proof,
qualifiedMerkleRoot,
keccak256(abi.encodePacked(msg.sender))
)
) revert NotQualified();
if (reservedCounter + 1 > maxReservable)
revert AllocationWouldExceedMax();
_reserved[msg.sender] = true;
reservedCounter++;
}
function addAddressesReserved(address[] calldata _addresses)
external
onlyOwner
{
for (uint256 i = 0; i < _addresses.length; i++) {
if (_reserved[_addresses[i]] == false) {
reservedCounter++;
_reserved[_addresses[i]] = true;
}
}
}
function removeAddressesReserved(address[] calldata _addresses)
external
onlyOwner
{
for (uint256 i = 0; i < _addresses.length; i++) {
if (_reserved[_addresses[i]] == true) {
reservedCounter = reservedCounter - 1;
_reserved[_addresses[i]] = false;
}
}
}
function setMaxReservable(uint256 _newMaxReservable) external onlyOwner {
maxReservable = _newMaxReservable;
}
function getReservationPrice() external view returns (uint256) {
return reservationPrice;
}
function userReserved(address _user) external view returns (bool) {
return _reserved[_user];
}
function withdraw() external onlyOwner nonReentrant {
uint256 balance = address(this).balance;
payable(msg.sender).transfer(balance);
}
}
文件 4 的 15:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 5 的 15:DefaultOperatorFilterer.sol
pragma solidity ^0.8.13;
import {OperatorFilterer} from "./OperatorFilterer.sol";
abstract contract DefaultOperatorFilterer is OperatorFilterer {
address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}
文件 6 的 15:ERC721A.sol
pragma solidity ^0.8.4;
import './IERC721A.sol';
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
contract ERC721A is IERC721A {
struct TokenApprovalRef {
address value;
}
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
uint256 private constant _BITPOS_AUX = 192;
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
uint256 private constant _BITMASK_BURNED = 1 << 224;
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
uint256 private constant _BITPOS_EXTRA_DATA = 232;
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
uint256 private _currentIndex;
uint256 private _burnCounter;
string private _name;
string private _symbol;
mapping(uint256 => uint256) private _packedOwnerships;
mapping(address => uint256) private _packedAddressData;
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
function _startTokenId() internal view virtual returns (uint256) {
return 1;
}
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
function totalSupply() public view virtual override returns (uint256) {
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
function totalMinted() public view virtual returns (uint256) {
unchecked {
return _currentIndex - _startTokenId();
}
}
function _totalMinted() internal view virtual returns (uint256) {
unchecked {
return _currentIndex - _startTokenId();
}
}
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return
interfaceId == 0x01ffc9a7 ||
interfaceId == 0x80ac58cd ||
interfaceId == 0x5b5e139f;
}
function name() public view virtual override returns (string memory) {
return _name;
}
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
function _baseURI() internal view virtual returns (string memory) {
return '';
}
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
if (packed & _BITMASK_BURNED == 0) {
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
ownership.burned = packed & _BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
}
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
owner := and(owner, _BITMASK_ADDRESS)
result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
assembly {
result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
function approve(address to, uint256 tokenId) public payable virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
function setApprovalForAll(address operator, bool approved) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex &&
_packedOwnerships[tokenId] & _BITMASK_BURNED == 0;
}
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
owner := and(owner, _BITMASK_ADDRESS)
msgSender := and(msgSender, _BITMASK_ADDRESS)
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
assembly {
if approvedAddress {
sstore(approvedAddressSlot, 0)
}
}
unchecked {
--_packedAddressData[from];
++_packedAddressData[to];
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
if (_packedOwnerships[nextTokenId] == 0) {
if (nextTokenId != _currentIndex) {
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public payable virtual override {
safeTransferFrom(from, to, tokenId, '');
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public payable virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
unchecked {
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 toMasked;
uint256 end = startTokenId + quantity;
assembly {
toMasked := and(to, _BITMASK_ADDRESS)
log4(
0,
0,
_TRANSFER_EVENT_SIGNATURE,
0,
toMasked,
startTokenId
)
for {
let tokenId := add(startTokenId, 1)
} iszero(eq(tokenId, end)) {
tokenId := add(tokenId, 1)
} {
log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
}
}
if (toMasked == 0) revert MintToZeroAddress();
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
unchecked {
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
if (_currentIndex != end) revert();
}
}
}
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);
if (approvalCheck) {
if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
assembly {
if approvedAddress {
sstore(approvedAddressSlot, 0)
}
}
unchecked {
_packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
if (_packedOwnerships[nextTokenId] == 0) {
if (nextTokenId != _currentIndex) {
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
unchecked {
_burnCounter++;
}
}
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) revert OwnershipNotInitializedForExtraData();
uint256 extraDataCasted;
assembly {
extraDataCasted := extraData
}
packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
}
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
function _toString(uint256 value) internal pure virtual returns (string memory str) {
assembly {
let m := add(mload(0x40), 0xa0)
mstore(0x40, m)
str := sub(m, 0x20)
mstore(str, 0)
let end := str
for { let temp := value } 1 {} {
str := sub(str, 1)
mstore8(str, add(48, mod(temp, 10)))
temp := div(temp, 10)
if iszero(temp) { break }
}
let length := sub(end, str)
str := sub(str, 0x20)
mstore(str, length)
}
}
}
文件 7 的 15:IERC721A.sol
pragma solidity ^0.8.4;
interface IERC721A {
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
error MintERC2309QuantityExceedsLimit();
error OwnershipNotInitializedForExtraData();
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
uint24 extraData;
}
function totalSupply() external view returns (uint256);
function supportsInterface(bytes4 interfaceId) external view returns (bool);
event Transfer(
address indexed from,
address indexed to,
uint256 indexed tokenId
);
event Approval(
address indexed owner,
address indexed approved,
uint256 indexed tokenId
);
event ApprovalForAll(
address indexed owner,
address indexed operator,
bool approved
);
function balanceOf(address owner) external view returns (uint256 balance);
function ownerOf(uint256 tokenId) external view returns (address owner);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external payable;
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external payable;
function transferFrom(
address from,
address to,
uint256 tokenId
) external payable;
function approve(address to, uint256 tokenId) external payable;
function setApprovalForAll(address operator, bool _approved) external;
function getApproved(uint256 tokenId)
external
view
returns (address operator);
function isApprovedForAll(address owner, address operator)
external
view
returns (bool);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
event ConsecutiveTransfer(
uint256 indexed fromTokenId,
uint256 toTokenId,
address indexed from,
address indexed to
);
}
文件 8 的 15:IOperatorFilterRegistry.sol
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function register(address registrant) external;
function registerAndSubscribe(address registrant, address subscription) external;
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
function updateOperator(address registrant, address operator, bool filtered) external;
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
function subscribe(address registrant, address registrantToSubscribe) external;
function unsubscribe(address registrant, bool copyExistingEntries) external;
function subscriptionOf(address addr) external returns (address registrant);
function subscribers(address registrant) external returns (address[] memory);
function subscriberAt(address registrant, uint256 index) external returns (address);
function copyEntriesOf(address registrant, address registrantToCopy) external;
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function filteredOperators(address addr) external returns (address[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function isRegistered(address addr) external returns (bool);
function codeHashOf(address addr) external returns (bytes32);
}
文件 9 的 15:Math.sol
pragma solidity ^0.8.0;
library Math {
enum Rounding {
Down,
Up,
Zero
}
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
function average(uint256 a, uint256 b) internal pure returns (uint256) {
return (a & b) + (a ^ b) / 2;
}
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
return a == 0 ? 0 : (a - 1) / b + 1;
}
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
uint256 prod0;
uint256 prod1;
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
if (prod1 == 0) {
return prod0 / denominator;
}
require(denominator > prod1);
uint256 remainder;
assembly {
remainder := mulmod(x, y, denominator)
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
uint256 twos = denominator & (~denominator + 1);
assembly {
denominator := div(denominator, twos)
prod0 := div(prod0, twos)
twos := add(div(sub(0, twos), twos), 1)
}
prod0 |= prod1 * twos;
uint256 inverse = (3 * denominator) ^ 2;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
result = prod0 * inverse;
return result;
}
}
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 result = 1 << (log2(a) >> 1);
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}
文件 10 的 15:MerkleProof.sol
pragma solidity ^0.8.0;
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
function verifyCalldata(
bytes32[] calldata proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProofCalldata(proof, leaf) == root;
}
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
computedHash = _hashPair(computedHash, proof[i]);
}
return computedHash;
}
function multiProofVerify(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProof(proof, proofFlags, leaves) == root;
}
function multiProofVerifyCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32 root,
bytes32[] memory leaves
) internal pure returns (bool) {
return processMultiProofCalldata(proof, proofFlags, leaves) == root;
}
function processMultiProof(
bytes32[] memory proof,
bool[] memory proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function processMultiProofCalldata(
bytes32[] calldata proof,
bool[] calldata proofFlags,
bytes32[] memory leaves
) internal pure returns (bytes32 merkleRoot) {
uint256 leavesLen = leaves.length;
uint256 totalHashes = proofFlags.length;
require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");
bytes32[] memory hashes = new bytes32[](totalHashes);
uint256 leafPos = 0;
uint256 hashPos = 0;
uint256 proofPos = 0;
for (uint256 i = 0; i < totalHashes; i++) {
bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
hashes[i] = _hashPair(a, b);
}
if (totalHashes > 0) {
return hashes[totalHashes - 1];
} else if (leavesLen > 0) {
return leaves[0];
} else {
return proof[0];
}
}
function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
文件 11 的 15:OperatorFilterer.sol
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
abstract contract OperatorFilterer {
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry constant operatorFilterRegistry =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
if (address(operatorFilterRegistry).code.length > 0) {
if (subscribe) {
operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
operatorFilterRegistry.register(address(this));
}
}
}
}
modifier onlyAllowedOperator(address from) virtual {
if (address(operatorFilterRegistry).code.length > 0) {
if (from == msg.sender) {
_;
return;
}
if (
!(
operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)
&& operatorFilterRegistry.isOperatorAllowed(address(this), from)
)
) {
revert OperatorNotAllowed(msg.sender);
}
}
_;
}
}
文件 12 的 15:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 13 的 15:ReentrancyGuard.sol
pragma solidity ^0.8.0;
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
}
function _nonReentrantAfter() private {
_status = _NOT_ENTERED;
}
}
文件 14 的 15:SafeMath.sol
pragma solidity ^0.8.0;
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
文件 15 的 15:Strings.sol
pragma solidity ^0.8.0;
import "./math/Math.sol";
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
{
"compilationTarget": {
"contracts/Coliseum.sol": "Coliseum"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"HighTierAlreadyClaimed","type":"error"},{"inputs":[],"name":"InsufficientValue","type":"error"},{"inputs":[],"name":"LockedUpPeriodNotOverForToken","type":"error"},{"inputs":[],"name":"LocksAreFrozen","type":"error"},{"inputs":[],"name":"MaxPerWalletExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoContracts","type":"error"},{"inputs":[],"name":"NormalAlreadyClaimed","type":"error"},{"inputs":[],"name":"NormalReservationAlreadyClaimed","type":"error"},{"inputs":[],"name":"NotAController","type":"error"},{"inputs":[],"name":"NotAllowlisted","type":"error"},{"inputs":[],"name":"NotAnOwner","type":"error"},{"inputs":[],"name":"NotReserved","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PreSaleAlreadyClaimed","type":"error"},{"inputs":[],"name":"PreSaleNotActive","type":"error"},{"inputs":[],"name":"PreSaleReservationAlreadyClaimed","type":"error"},{"inputs":[],"name":"PublicSaleNotActive","type":"error"},{"inputs":[],"name":"SaleSupplyExceeded","type":"error"},{"inputs":[],"name":"SettingMaxSupplyIsFrozen","type":"error"},{"inputs":[],"name":"SoulBoundTokensMayOnlyBeBurned","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"LocksFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addControllers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"}],"name":"airDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"}],"name":"airDropAndSoulbound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadlineTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadlineTimeLater","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployTimeLater","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezeSetMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllSoulboundedTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getSoulboundAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getSoulboundTokensOfUser","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenTier","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasClaimedHighTierMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasClaimedNormalMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasClaimedNormalReservation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasClaimedPreSaleMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasClaimedPreSaleReservation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"hasUserSoulbounded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"highTierActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"highTierCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"highTierMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"highTierMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"isHighTierValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"isNormalValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"isPreSaleValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"islockedTokenId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"islockedTokenIdForLater","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyForHighTier","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyForNormal","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupplyForPresale","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"normalActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"normalCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"normalMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"normalMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"normalReservedMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"presaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"presaleMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleReservedMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"publicCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeControllers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservationContract","outputs":[{"internalType":"contract ColiseumReservations","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservationNormalContract","outputs":[{"internalType":"contract ColiseumReservationsNormal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newHighTierCost","type":"uint256"}],"name":"setHighTierCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newMerkleRoot","type":"bytes32"}],"name":"setHighTierMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delayTime","type":"uint256"},{"internalType":"bool","name":"_updateDeployTime","type":"bool"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delayTime","type":"uint256"},{"internalType":"bool","name":"_updateDeployTime","type":"bool"}],"name":"setLockForLater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxMintAmount","type":"uint8"}],"name":"setMaxMintAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupply","type":"uint16"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupplyForHighTier","type":"uint16"}],"name":"setMaxSupplyForHighTierMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupplyForNormal","type":"uint16"}],"name":"setMaxSupplyForNormalMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupplyForPresale","type":"uint16"}],"name":"setMaxSupplyForPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setMaxSupplyFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newNormalCost","type":"uint256"}],"name":"setNormalCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newMerkleRoot","type":"bytes32"}],"name":"setNormalMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPreSaleCost","type":"uint256"}],"name":"setPreSaleCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newMerkleRoot","type":"bytes32"}],"name":"setPreSaleMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPublicCost","type":"uint256"}],"name":"setPublicSaleCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ColiseumReservationsNormal","name":"_contractAddress","type":"address"}],"name":"setReservationContractNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ColiseumReservations","name":"_contractAddress","type":"address"}],"name":"setReservationContractPreSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint8","name":"_tokenTier","type":"uint8"}],"name":"setTierForToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint8","name":"_tokenTier","type":"uint8"}],"name":"setTierForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint8[]","name":"_tokenTier","type":"uint8[]"}],"name":"setTiersForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setToNormalReservationAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setToNormalReservationAmountOfContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setToPresaleReservationAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setToPresaleReservationAmountOfContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"soulBoundLockActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"soulBoundedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address[]","name":"targets","type":"address[]"}],"name":"soulboundTokensToAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleHighTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleNormal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSoulboundLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReservedNormalSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReservedPreSale","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unSoulboundTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]