编译器
0.8.17+commit.8df45f5f
文件 1 的 24:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
文件 2 的 24: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;
}
}
文件 3 的 24:ECDSA.sol
pragma solidity ^0.8.0;
import "../Strings.sol";
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return;
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}
文件 4 的 24:ERC165.sol
pragma solidity ^0.8.0;
import "./IERC165.sol";
abstract contract ERC165 is IERC165 {
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
文件 5 的 24:ERC2981.sol
pragma solidity ^0.8.0;
import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";
abstract contract ERC2981 is IERC2981, ERC165 {
struct RoyaltyInfo {
address receiver;
uint96 royaltyFraction;
}
RoyaltyInfo private _defaultRoyaltyInfo;
mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
}
function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];
if (royalty.receiver == address(0)) {
royalty = _defaultRoyaltyInfo;
}
uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();
return (royalty.receiver, royaltyAmount);
}
function _feeDenominator() internal pure virtual returns (uint96) {
return 10000;
}
function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: invalid receiver");
_defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
}
function _deleteDefaultRoyalty() internal virtual {
delete _defaultRoyaltyInfo;
}
function _setTokenRoyalty(
uint256 tokenId,
address receiver,
uint96 feeNumerator
) internal virtual {
require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
require(receiver != address(0), "ERC2981: Invalid parameters");
_tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
}
function _resetTokenRoyalty(uint256 tokenId) internal virtual {
delete _tokenRoyaltyInfo[tokenId];
}
}
文件 6 的 24:ERC721A.sol
pragma solidity ^0.8.4;
import 'erc721a/contracts/IERC721A.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';
contract ERC721A is Context, ERC165, IERC721A {
using Address for address;
using Strings for uint256;
uint256 internal _currentIndex;
uint256 internal _burnCounter;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) internal _ownerships;
mapping(address => AddressData) private _addressData;
mapping(uint256 => address) 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 totalSupply() public view override returns (uint256) {
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
function _totalMinted() internal view returns (uint256) {
unchecked {
return _currentIndex - _startTokenId();
}
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return uint256(_addressData[owner].balance);
}
function _numberMinted(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberMinted);
}
function _numberBurned(address owner) internal view returns (uint256) {
return uint256(_addressData[owner].numberBurned);
}
function _getAux(address owner) internal view returns (uint64) {
return _addressData[owner].aux;
}
function _setAux(address owner, uint64 aux) internal {
_addressData[owner].aux = aux;
}
function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr) if (curr < _currentIndex) {
TokenOwnership memory ownership = _ownerships[curr];
if (!ownership.burned) {
if (ownership.addr != address(0)) {
return ownership;
}
while (true) {
curr--;
ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
}
}
}
revert OwnerQueryForNonexistentToken();
}
function ownerOf(uint256 tokenId) public view override returns (address) {
return _ownershipOf(tokenId).addr;
}
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, tokenId.toString())) : '';
}
function _baseURI() internal view virtual returns (string memory) {
return '';
}
function approve(address to, uint256 tokenId) public override {
address owner = ERC721A.ownerOf(tokenId);
if (to == owner) revert ApprovalToCurrentOwner();
if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_approve(to, tokenId, owner);
}
function getApproved(uint256 tokenId) public view override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSender()) revert ApproveToCaller();
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
_transfer(from, to, tokenId);
if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
function _exists(uint256 tokenId) internal view returns (bool) {
return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
}
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, '');
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
if (to.isContract()) {
do {
emit Transfer(address(0), to, updatedIndex);
if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (updatedIndex < end);
if (_currentIndex != startTokenId) revert();
} else {
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
}
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _mint(address to, uint256 quantity) internal {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
unchecked {
_addressData[to].balance += uint64(quantity);
_addressData[to].numberMinted += uint64(quantity);
_ownerships[startTokenId].addr = to;
_ownerships[startTokenId].startTimestamp = uint64(block.timestamp);
uint256 updatedIndex = startTokenId;
uint256 end = updatedIndex + quantity;
do {
emit Transfer(address(0), to, updatedIndex++);
} while (updatedIndex < end);
_currentIndex = updatedIndex;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
_approve(address(0), tokenId, from);
unchecked {
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = to;
currSlot.startTimestamp = uint64(block.timestamp);
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
TokenOwnership memory prevOwnership = _ownershipOf(tokenId);
address from = prevOwnership.addr;
if (approvalCheck) {
bool isApprovedOrOwner = (_msgSender() == from ||
isApprovedForAll(from, _msgSender()) ||
getApproved(tokenId) == _msgSender());
if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
_approve(address(0), tokenId, from);
unchecked {
AddressData storage addressData = _addressData[from];
addressData.balance -= 1;
addressData.numberBurned += 1;
TokenOwnership storage currSlot = _ownerships[tokenId];
currSlot.addr = from;
currSlot.startTimestamp = uint64(block.timestamp);
currSlot.burned = true;
uint256 nextTokenId = tokenId + 1;
TokenOwnership storage nextSlot = _ownerships[nextTokenId];
if (nextSlot.addr == address(0)) {
if (nextTokenId != _currentIndex) {
nextSlot.addr = from;
nextSlot.startTimestamp = prevOwnership.startTimestamp;
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
unchecked {
_burnCounter++;
}
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
文件 7 的 24:ERC721AOperatorFilter.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./interfaces/IOperatorFilter.sol";
abstract contract ERC721AOperatorFilter is ERC721A, Ownable {
IOperatorFilter private operatorFilter_;
function setOperatorFilter(IOperatorFilter filter) public onlyOwner {
operatorFilter_ = filter;
}
function operatorFilter() public view returns (IOperatorFilter) {
return operatorFilter_;
}
function _beforeTokenTransfers(
address from,
address to,
uint256 tokenId,
uint256 quantity
) internal virtual override(ERC721A) {
if (
from != address(0) &&
to != address(0) &&
!_mayTransfer(msg.sender, tokenId)
) {
revert("ERC721AOperatorFilter: illegal operator");
}
super._beforeTokenTransfers(from, to, tokenId, quantity);
}
function _mayTransfer(address operator, uint256 tokenId)
private
view
returns (bool)
{
IOperatorFilter filter = operatorFilter_;
if (address(filter) == address(0)) return true;
if (operator == ownerOf(tokenId)) return true;
return filter.mayTransfer(msg.sender);
}
}
文件 8 的 24:ERC721ATokenUriDelegate.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721A.sol";
import "./interfaces/ITokenUriDelegate.sol";
abstract contract ERC721ATokenUriDelegate is ERC721A, Ownable {
ITokenUriDelegate private tokenUriDelegate_;
function setTokenUriDelegate(ITokenUriDelegate delegate) public onlyOwner {
tokenUriDelegate_ = delegate;
}
function tokenUriDelegate() public view returns (ITokenUriDelegate) {
return tokenUriDelegate_;
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
if (!_exists(tokenId)) revert("ERC721A: invalid token ID");
ITokenUriDelegate delegate = tokenUriDelegate_;
if (address(delegate) == address(0)) return "";
return delegate.tokenURI(tokenId);
}
}
文件 9 的 24:IERC1271.sol
pragma solidity ^0.8.0;
interface IERC1271 {
function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}
文件 10 的 24:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 11 的 24:IERC2981.sol
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165.sol";
interface IERC2981 is IERC165 {
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}
文件 12 的 24:IERC721.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC721 is IERC165 {
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;
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
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);
}
文件 13 的 24:IERC721A.sol
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
interface IERC721A is IERC721, IERC721Metadata {
error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();
struct TokenOwnership {
address addr;
uint64 startTimestamp;
bool burned;
}
struct AddressData {
uint64 balance;
uint64 numberMinted;
uint64 numberBurned;
uint64 aux;
}
function totalSupply() external view returns (uint256);
}
文件 14 的 24:IERC721Metadata.sol
pragma solidity ^0.8.0;
import "../IERC721.sol";
interface IERC721Metadata is IERC721 {
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 15 的 24:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 16 的 24:IOperatorFilter.sol
pragma solidity ^0.8.8;
interface IOperatorFilter {
function mayTransfer(address operator) external view returns (bool);
}
文件 17 的 24:IOwnershipable.sol
pragma solidity 0.8.17;
interface IOwnershipable {
function ownerOf(uint256 tokenId) external view returns (address owner);
}
文件 18 的 24:ITokenUriDelegate.sol
pragma solidity ^0.8.8;
interface ITokenUriDelegate {
function tokenURI(uint256 tokenId) external view returns (string memory);
}
文件 19 的 24: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);
}
}
}
文件 20 的 24: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);
}
}
文件 21 的 24:Pausable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor() {
_paused = false;
}
modifier whenNotPaused() {
_requireNotPaused();
_;
}
modifier whenPaused() {
_requirePaused();
_;
}
function paused() public view virtual returns (bool) {
return _paused;
}
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
文件 22 的 24:SignatureChecker.sol
pragma solidity ^0.8.0;
import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";
library SignatureChecker {
function isValidSignatureNow(
address signer,
bytes32 hash,
bytes memory signature
) internal view returns (bool) {
(address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
if (error == ECDSA.RecoverError.NoError && recovered == signer) {
return true;
}
(bool success, bytes memory result) = signer.staticcall(
abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
);
return (success &&
result.length == 32 &&
abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector));
}
}
文件 23 的 24: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);
}
}
文件 24 的 24:StudioUnoPalabras.sol
pragma solidity 0.8.17;
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";
import "./ERC721A.sol";
import "./interfaces/IOwnershipable.sol";
import "./ERC721ATokenUriDelegate.sol";
import "./ERC721AOperatorFilter.sol";
contract StudioUnoPalabras is ERC721A, ERC2981, Pausable, Ownable, ERC721AOperatorFilter, ERC721ATokenUriDelegate {
using SignatureChecker for address;
using Strings for uint256;
bool public allowListMinting;
bool public publicMinting;
uint256 public publicPrice;
uint256 public maxPublicMints;
string public apiBaseURI;
string public ipfsBaseURI;
uint256 public currentRoundNumber;
uint256 public lastIpfsTokenId;
address public signer;
address public trustedWallet_A;
address public trustedWallet_B;
uint256 public tokenId;
mapping(bytes32 => bool) public claimedTokenIds;
mapping(string => mapping(uint256 => uint256)) public mintedCounts;
mapping(string => mapping(uint256 => mapping(address => uint256))) public claimWithSignatureMintedCounts;
mapping(string => bool) public mintedWords;
mapping(uint256 => string) public tokenWords;
event FundsTransferred(address _wallet, uint256 _amount);
event Minted(address _buyer, uint256 _paid, uint256 _quantity, uint256 _tokenId, string _word, uint256 _round);
event ClaimMinted(address _buyer, uint256 _paid, uint256 _tokenId, string _word, uint256 _round);
event PrivateMinted(address _buyer, uint256 _quantity, uint256 _tokenId, string _word, uint256 _round);
event ArtistMinted(address _buyer, uint256 _quantity, uint256 _tokenId, string _word, uint256 _round);
event PremiumMinted(address _buyer, uint256 _paid, uint256 _tokenId, string _word, uint256 _round);
constructor(
address _trustedWallet_A,
address _trustedWallet_B,
address _signer,
uint256 _publicPrice,
uint256 _maxPublicMints
) ERC721A("StudioUno Palabras", "S1PALABRAS") {
trustedWallet_A = _trustedWallet_A;
trustedWallet_B = _trustedWallet_B;
signer = _signer;
publicPrice = _publicPrice;
maxPublicMints = _maxPublicMints;
currentRoundNumber = 1;
lastIpfsTokenId = 0;
allowListMinting = false;
publicMinting = false;
_pause();
}
function mint(address _receiver, uint256 _quantity) internal {
if(msg.value > 0) {
payment();
}
_safeMint(_receiver, _quantity);
}
function allowListMint(
string memory _word,
uint256 _roundNumber,
uint256 _quantityToMint,
uint256 _quantityAllowed,
bytes memory _signature
) external payable whenNotPaused whenAllowListMinting {
require(_quantityToMint > 0, "S1: mint quantity must be greater than 0");
require(maxPublicMints >= _quantityToMint, "S1: minted quantity is higher than max public mints");
require(_quantityAllowed >= mintedCounts[_word][_roundNumber] + _quantityToMint, "S1: wrong quantity to mint");
require(verifyAllowListMintSignature(_word, _roundNumber, _quantityAllowed, msg.sender, _signature), "S1: signature not valid");
require(_roundNumber == currentRoundNumber, "S1: wrong round number");
require(msg.value >= publicPrice * _quantityToMint, "S1: value sent is lower");
mintedCounts[_word][_roundNumber] += _quantityToMint;
for (uint256 i = 0; i < _quantityToMint; i++) {
tokenId ++;
tokenWords[tokenId] = _word;
}
mintedWords[_word] = true;
mint(msg.sender, _quantityToMint);
emit Minted(msg.sender, msg.value, _quantityToMint, tokenId, _word, _roundNumber);
}
function publicMint(
string memory _word,
uint256 _roundNumber,
uint256 _quantityToMint,
uint256 _quantityAllowed,
bytes memory _signature
) external payable whenNotPaused whenPublicMinting {
require(_quantityToMint > 0, "S1: mint quantity must be greater than 0");
require(_quantityAllowed >= mintedCounts[_word][_roundNumber] + _quantityToMint, "S1: wrong quantity to mint");
require(verifyPublicMintSignature(_word, _roundNumber, _quantityAllowed, _signature), "S1: signature not valid");
require(_roundNumber == currentRoundNumber, "S1: wrong round number");
require(msg.value >= publicPrice * _quantityToMint, "S1: value sent is lower");
mintedCounts[_word][_roundNumber] += _quantityToMint;
for (uint256 i = 0; i < _quantityToMint; i++) {
tokenId ++;
tokenWords[tokenId] = _word;
}
mintedWords[_word] = true;
mint(msg.sender, _quantityToMint);
emit Minted(msg.sender, msg.value, _quantityToMint, tokenId, _word, _roundNumber);
}
function premiumMint(
string memory _word,
uint256 _premiumPublicPrice,
bytes memory _signature
) external payable whenNotPaused {
require(msg.value >= _premiumPublicPrice, "S1: value sent is lower");
require(verifyPremiumMintSignature(_word, _premiumPublicPrice, _signature), "S1: signature not valid");
require(mintedWords[_word] == false, "S1: Premium word already minted");
tokenId++;
mintedWords[_word] = true;
tokenWords[tokenId] = _word;
mint(msg.sender, 1);
emit PremiumMinted(msg.sender, msg.value, tokenId, _word, currentRoundNumber);
}
function premiumRequestedMint(
string memory _word,
uint256 _premiumPublicPrice,
bytes memory _signature
) external payable whenNotPaused {
require(msg.value >= _premiumPublicPrice, "S1: value sent is lower");
require(verifyPremiumRequestedMintSignature(_word, msg.sender, _premiumPublicPrice, _signature), "S1: signature not valid");
require(mintedWords[_word] == false, "S1: Premium word already minted");
tokenId++;
mintedWords[_word] = true;
tokenWords[tokenId] = _word;
mint(msg.sender, 1);
emit PremiumMinted(msg.sender, msg.value, tokenId, _word, currentRoundNumber);
}
function claim(
uint256 _tokenId,
address _collectionAddress,
string memory _word,
uint256 _roundNumber,
bytes memory _signature
) external whenNotPaused {
require(IOwnershipable(_collectionAddress).ownerOf(_tokenId) == msg.sender, "S1: sender is not owner");
require(verifyClaimSignature(_word, _roundNumber, _collectionAddress, _signature), "S1: signature not valid");
require(_roundNumber == currentRoundNumber, "S1: wrong round number");
bytes32 hashed_key = keccak256(abi.encodePacked(_tokenId, _word, _collectionAddress, _roundNumber));
require(claimedTokenIds[hashed_key] == false, "S1: Token has been claimed");
claimedTokenIds[hashed_key] = true;
tokenId++;
mintedWords[_word] = true;
tokenWords[tokenId] = _word;
mint(msg.sender, 1);
emit ClaimMinted(msg.sender, 0, tokenId, _word, _roundNumber);
}
function claimWithSignature(
string memory _word,
uint256 _roundNumber,
uint256 _quantityToMint,
uint256 _quantityAllowed,
bytes memory _signature
) external whenNotPaused {
require(_quantityToMint > 0, "S1: mint quantity must be greater than 0");
require(_quantityAllowed >= claimWithSignatureMintedCounts[_word][_roundNumber][msg.sender] + _quantityToMint, "S1: wrong quantity to mint");
require(verifyClaimWithSignature(_word, _roundNumber, _quantityAllowed, msg.sender, _signature), "S1: signature not valid");
require(_roundNumber == currentRoundNumber, "S1: wrong round number");
claimWithSignatureMintedCounts[_word][_roundNumber][msg.sender] += _quantityToMint;
for (uint256 i = 0; i < _quantityToMint; i++) {
tokenId ++;
tokenWords[tokenId] = _word;
}
mintedWords[_word] = true;
mint(msg.sender, _quantityToMint);
emit ClaimMinted(msg.sender, 0, tokenId, _word, _roundNumber);
}
function privateMint(
address _receiver,
string memory _word,
uint256 _quantity,
uint256 _roundNumber,
bool _artistMint
) external onlyOwner {
mintedCounts[_word][_roundNumber] += _quantity;
for (uint256 i = 0; i < _quantity; i++) {
tokenId ++;
tokenWords[tokenId] = _word;
}
mintedWords[_word] = true;
mint(_receiver, _quantity);
if (_artistMint) {
emit ArtistMinted(_receiver, _quantity, tokenId, _word, _roundNumber);
} else {
emit PrivateMinted(_receiver, _quantity, tokenId, _word, _roundNumber);
}
}
function verifyPublicMintSignature(
string memory _word,
uint256 _roundNumber,
uint256 _quantityAllowed,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _roundNumber, _quantityAllowed));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function verifyAllowListMintSignature(
string memory _word,
uint256 _roundNumber,
uint256 _quantityAllowed,
address _senderAddress,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _roundNumber, _quantityAllowed, _senderAddress));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function verifyPremiumMintSignature(
string memory _word,
uint256 _premiumPublicPrice,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _premiumPublicPrice));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function verifyPremiumRequestedMintSignature(
string memory _word,
address _authorizedAddress,
uint256 _premiumPublicPrice,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _authorizedAddress, _premiumPublicPrice));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function verifyClaimSignature(
string memory _word,
uint256 _roundNumber,
address _collectionAddress,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _roundNumber, _collectionAddress));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function verifyClaimWithSignature(
string memory _word,
uint256 _roundNumber,
uint256 _quantityAllowed,
address _senderAddress,
bytes memory _signature
) internal view returns (bool) {
bytes32 result = keccak256(abi.encodePacked(_word, _roundNumber, _quantityAllowed, _senderAddress, "S1Claim"));
bytes32 hash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", result));
return signer.isValidSignatureNow(hash, _signature);
}
function payment() internal {
uint256 amount = (msg.value * 95) / 100;
(bool success, ) = trustedWallet_A.call{value: amount}("");
require(success, "S1: Transfer A failed");
emit FundsTransferred(trustedWallet_A, amount);
amount = msg.value - amount;
(success, ) = trustedWallet_B.call{value: amount}("");
require(success, "S1: Transfer B failed");
emit FundsTransferred(trustedWallet_B, amount);
}
function pause() external onlyOwner {
_pause();
}
function unpause() external onlyOwner {
_unpause();
}
function setSigner(address _signer) external onlyOwner {
signer = _signer;
}
function setTrustedWallet_A(address _trustedWallet) external onlyOwner {
trustedWallet_A = _trustedWallet;
}
function setTrustedWallet_B(address _trustedWallet) external onlyOwner {
trustedWallet_B = _trustedWallet;
}
function setPublicPrice(uint256 _publicPrice) external onlyOwner {
publicPrice = _publicPrice;
}
function setMaxPublicMints(uint256 _maxPublicMints) external onlyOwner {
maxPublicMints = _maxPublicMints;
}
function setLastIpfsTokenId(uint256 _newLastIpfsTokenId) external onlyOwner {
lastIpfsTokenId = _newLastIpfsTokenId;
}
function setApiBaseURI(string memory _newApiBaseURI) external onlyOwner {
apiBaseURI = _newApiBaseURI;
}
function setIpfsBaseURI(string memory _newIpfsBaseURI) external onlyOwner {
ipfsBaseURI = _newIpfsBaseURI;
}
function setAllowListMinting(bool _allowListMinting) external onlyOwner {
allowListMinting = _allowListMinting;
}
function setPublicMinting(bool _publicMinting) external onlyOwner {
publicMinting = _publicMinting;
}
function startNextRound() external onlyOwner {
currentRoundNumber += 1;
}
function tokenURI(uint256 _tokenId) public view virtual override(ERC721ATokenUriDelegate, ERC721A) returns (string memory) {
if (!_exists(_tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = "";
if(_tokenId <= lastIpfsTokenId) {
baseURI = ipfsBaseURI;
} else {
baseURI = apiBaseURI;
}
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _tokenId.toString())) : '';
}
function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC2981, ERC721A) returns (bool) {
return
_interfaceId == 0x7f5828d0 ||
super.supportsInterface(_interfaceId);
}
modifier whenPublicMinting {
require(publicMinting == true, "S1: PublicMinting is not enabled");
_;
}
modifier whenAllowListMinting {
require(allowListMinting == true, "S1: AllowListMinting is not enabled");
_;
}
function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner {
_setDefaultRoyalty(_receiver, _feeNumerator);
}
function deleteDefaultRoyalty() external onlyOwner {
_deleteDefaultRoyalty();
}
function setTokenRoyalty(uint256 _tokenId, address _receiver, uint96 _feeNumerator) external onlyOwner {
_setTokenRoyalty(_tokenId, _receiver, _feeNumerator);
}
function resetTokenRoyalty(uint256 _tokenId) external onlyOwner {
_resetTokenRoyalty(_tokenId);
}
function _beforeTokenTransfers(
address _from,
address _to,
uint256 _tokenId,
uint256 _quantity
)
internal
virtual
override(ERC721A, ERC721AOperatorFilter)
{
super._beforeTokenTransfers(_from, _to, _tokenId, _quantity);
}
}
{
"compilationTarget": {
"project:/contracts/StudioUnoPalabras.sol": "StudioUnoPalabras"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_trustedWallet_A","type":"address"},{"internalType":"address","name":"_trustedWallet_B","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"uint256","name":"_publicPrice","type":"uint256"},{"internalType":"uint256","name":"_maxPublicMints","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_word","type":"string"},{"indexed":false,"internalType":"uint256","name":"_round","type":"uint256"}],"name":"ArtistMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_paid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_word","type":"string"},{"indexed":false,"internalType":"uint256","name":"_round","type":"uint256"}],"name":"ClaimMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"FundsTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_paid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_word","type":"string"},{"indexed":false,"internalType":"uint256","name":"_round","type":"uint256"}],"name":"Minted","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_paid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_word","type":"string"},{"indexed":false,"internalType":"uint256","name":"_round","type":"uint256"}],"name":"PremiumMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"_word","type":"string"},{"indexed":false,"internalType":"uint256","name":"_round","type":"uint256"}],"name":"PrivateMinted","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"uint256","name":"_quantityToMint","type":"uint256"},{"internalType":"uint256","name":"_quantityAllowed","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"allowListMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"allowListMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"apiBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","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":"_tokenId","type":"uint256"},{"internalType":"address","name":"_collectionAddress","type":"address"},{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"uint256","name":"_quantityToMint","type":"uint256"},{"internalType":"uint256","name":"_quantityAllowed","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claimWithSignature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"claimWithSignatureMintedCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"claimedTokenIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRoundNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ipfsBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"lastIpfsTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPublicMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintedCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"mintedWords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilter","outputs":[{"internalType":"contract IOperatorFilter","name":"","type":"address"}],"stateMutability":"view","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_premiumPublicPrice","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"premiumMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_premiumPublicPrice","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"premiumRequestedMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"bool","name":"_artistMint","type":"bool"}],"name":"privateMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_word","type":"string"},{"internalType":"uint256","name":"_roundNumber","type":"uint256"},{"internalType":"uint256","name":"_quantityToMint","type":"uint256"},{"internalType":"uint256","name":"_quantityAllowed","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMinting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"resetTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowListMinting","type":"bool"}],"name":"setAllowListMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newApiBaseURI","type":"string"}],"name":"setApiBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newIpfsBaseURI","type":"string"}],"name":"setIpfsBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLastIpfsTokenId","type":"uint256"}],"name":"setLastIpfsTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPublicMints","type":"uint256"}],"name":"setMaxPublicMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IOperatorFilter","name":"filter","type":"address"}],"name":"setOperatorFilter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicMinting","type":"bool"}],"name":"setPublicMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicPrice","type":"uint256"}],"name":"setPublicPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITokenUriDelegate","name":"delegate","type":"address"}],"name":"setTokenUriDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedWallet","type":"address"}],"name":"setTrustedWallet_A","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedWallet","type":"address"}],"name":"setTrustedWallet_B","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startNextRound","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":"tokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenUriDelegate","outputs":[{"internalType":"contract ITokenUriDelegate","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenWords","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedWallet_A","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trustedWallet_B","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]