编译器
0.8.10+commit.fc410830
文件 1 的 19: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 functionCall(target, data, "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");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(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) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(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) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 19: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 的 19: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");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' 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 if (signature.length == 64) {
bytes32 r;
bytes32 vs;
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} 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);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
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 的 19:ERC1155.sol
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
mapping(uint256 => mapping(address => uint256)) private _balances;
mapping(address => mapping(address => bool)) private _operatorApprovals;
string private _uri;
constructor(string memory uri_) {
_setURI(uri_);
}
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
function uri(uint256) public view virtual override returns (string memory) {
return _uri;
}
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return _balances[id][account];
}
function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
public
view
virtual
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts[i], ids[i]);
}
return batchBalances;
}
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_safeTransferFrom(from, to, id, amount, data);
}
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: transfer caller is not owner nor approved"
);
_safeBatchTransferFrom(from, to, ids, amounts, data);
}
function _safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
emit TransferSingle(operator, from, to, id, amount);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
}
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
}
emit TransferBatch(operator, from, to, ids, amounts);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
}
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
function _mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
_balances[id][to] += amount;
emit TransferSingle(operator, address(0), to, id, amount);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
}
function _mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; i++) {
_balances[ids[i]][to] += amounts[i];
}
emit TransferBatch(operator, address(0), to, ids, amounts);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
}
function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
emit TransferSingle(operator, from, address(0), id, amount);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
function _burnBatch(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
}
emit TransferBatch(operator, from, address(0), ids, amounts);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC1155: setting approval status for self");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
function _afterTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
uint256[] memory array = new uint256[](1);
array[0] = element;
return array;
}
}
文件 5 的 19:ERC1155Burnable.sol
pragma solidity ^0.8.0;
import "../ERC1155.sol";
abstract contract ERC1155Burnable is ERC1155 {
function burn(
address account,
uint256 id,
uint256 value
) public virtual {
require(
account == _msgSender() || isApprovedForAll(account, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_burn(account, id, value);
}
function burnBatch(
address account,
uint256[] memory ids,
uint256[] memory values
) public virtual {
require(
account == _msgSender() || isApprovedForAll(account, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_burnBatch(account, ids, values);
}
}
文件 6 的 19: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;
}
}
文件 7 的 19:HyperMintERC1155_2_2_0.sol
pragma solidity ^0.8.10;
import '@openzeppelin/contracts/interfaces/IERC2981.sol';
import '@openzeppelin/contracts/interfaces/IERC20.sol';
import '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import './opensea-operator-filter/OperatorFilterer.sol';
import './Ownable_1_0_0.sol';
import './Interfaces/IHyperMintERC1155_2_2_0.sol';
contract HyperMintERC1155_2_2_0 is
IHyperMintERC1155_2_2_0,
ERC1155Burnable,
Ownable,
OperatorFilterer
{
using SafeERC20 for IERC20;
uint256 internal constant BASIS_POINTS = 10000;
string public constant version = '2.2.0';
GeneralConfig public generalConfig;
TokenConfig[] public tokenConfigs;
Addresses public addresses;
uint256[] public supplies;
constructor(
GeneralConfig memory _generalConfig,
Addresses memory _addresses
)
ERC1155('')
OperatorFilterer(
address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6),
true
)
{
_transferOwnership(_addresses.collectionOwnerAddress);
generalConfig = _generalConfig;
addresses = _addresses;
_setURI(generalConfig.tokenMetadataUrl);
}
function getTokenConfigs()
external
view
returns (TokenConfig[] memory configs)
{
configs = tokenConfigs;
}
function getSupplies()
external
view
returns (uint256[] memory tokenSupplies)
{
tokenSupplies = supplies;
}
function name() public view returns (string memory collectionName) {
collectionName = generalConfig.name;
}
function symbol() public view returns (string memory collectionSymbol) {
collectionSymbol = generalConfig.symbol;
}
function contractURI() public view virtual returns (string memory uri) {
uri = generalConfig.contractMetadataUrl;
}
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view returns (address royaltyAddress, uint256 royaltyAmount) {
royaltyAddress = addresses.secondaryRoyaltyAddress;
royaltyAmount =
(_salePrice * generalConfig.secondaryRoyaltyFee) /
BASIS_POINTS;
}
function supportsInterface(
bytes4 _interfaceId
)
public
view
virtual
override(ERC1155, IHyperMintERC1155_2_2_0)
returns (bool result)
{
result = (_interfaceId == type(IERC2981).interfaceId ||
super.supportsInterface(_interfaceId));
}
function setNameAndSymbol(
string calldata _newName,
string calldata _newSymbol
) external onlyContractManager {
generalConfig.name = _newName;
generalConfig.symbol = _newSymbol;
}
function setMetadataURIs(
string calldata _contractURI,
string calldata _tokenURI
) external onlyContractManager {
generalConfig.contractMetadataUrl = _contractURI;
generalConfig.tokenMetadataUrl = _tokenURI;
_setURI(_tokenURI);
}
function setDates(
uint256 _publicSale,
uint256 _saleClosed
) external onlyContractManager {
generalConfig.publicSaleDate = _publicSale;
generalConfig.saleCloseDate = _saleClosed;
}
function setTokenConfig(
uint256 _id,
uint256 _price,
uint256 _maxSupply,
uint256 _maxPerTransaction
) external onlyContractManager {
if (supplies[_id] > _maxSupply) revert NewSupplyTooLow();
tokenConfigs[_id].price = _price;
tokenConfigs[_id].maxSupply = _maxSupply;
tokenConfigs[_id].maxPerTransaction = _maxPerTransaction;
}
function setAddresses(
Addresses calldata _addresses
) external onlyContractManager {
if (_addresses.recoveryAddress != addresses.recoveryAddress)
revert ImmutableRecoveryAddress();
if (
addresses.collectionOwnerAddress !=
_addresses.collectionOwnerAddress
) {
_transferOwnership(_addresses.collectionOwnerAddress);
}
addresses = _addresses;
}
function setAllowBuy(bool _allowBuy) external onlyContractManager {
generalConfig.allowBuy = _allowBuy;
}
function setAllowPublicTransfer(
bool _allowPublicTransfer
) external onlyContractManager {
generalConfig.allowPublicTransfer = _allowPublicTransfer;
}
function setEnableOpenSeaOperatorFilterRegistry(
bool _enable
) external onlyContractManager {
generalConfig.enableOpenSeaOperatorFilterRegistry = _enable;
}
function setRoyalty(
uint256 _primaryFee,
uint256 _secondaryFee
) external onlyContractManager {
generalConfig.primaryRoyaltyFee = _primaryFee;
generalConfig.secondaryRoyaltyFee = _secondaryFee;
}
function addTokens(
TokenConfig[] calldata _tokens
) external onlyContractManager {
for (uint256 i = 0; i < _tokens.length; ) {
supplies.push(0);
tokenConfigs.push(_tokens[i]);
unchecked {
++i;
}
}
}
function mintBatch(
address[] calldata _to,
uint256[][] calldata _ids,
uint256[][] calldata _amounts
) external onlyContractManager nonContract {
uint256 toLength = _to.length;
for (uint256 i = 0; i < toLength; ) {
uint256 idsLength = _ids[i].length;
for (uint256 j = 0; j < idsLength; ) {
uint256 _supply = supplies[_ids[i][j]];
if (
_supply + _amounts[i][j] >
tokenConfigs[_ids[i][j]].maxSupply
) revert MaxSupplyExceeded();
unchecked {
_supply += _amounts[i][j];
}
supplies[_ids[i][j]] = _supply;
unchecked {
++j;
}
}
_mintBatch(_to[i], _ids[i], _amounts[i], '0x');
unchecked {
++i;
}
}
}
function buyAuthorised(
uint256 _id,
uint256 _amount,
uint256 _totalPrice,
uint256 _maxPerAddress,
uint256 _expires,
bytes calldata _signature
) external payable buyAllowed nonContract {
if (block.timestamp >= _expires) revert SignatureExpired();
bytes32 hash = keccak256(
abi.encodePacked(
address(this),
msg.sender,
_amount,
_totalPrice,
_maxPerAddress,
_expires,
_id
)
);
bytes32 message = ECDSA.toEthSignedMessageHash(hash);
if (
ECDSA.recover(message, _signature) != addresses.authorisationAddress
) revert NotAuthorised();
_buy(_id, _amount, _totalPrice);
}
function buy(
uint256 _id,
uint256 _amount
) external payable buyAllowed nonContract {
if (
generalConfig.publicSaleDate == 0 ||
block.timestamp < generalConfig.publicSaleDate
) revert PublicSaleClosed();
uint256 totalPrice = tokenConfigs[_id].price * _amount;
_buy(_id, _amount, totalPrice);
}
function _buy(uint256 _id, uint256 _amount, uint256 _totalPrice) internal {
if (generalConfig.saleCloseDate != 0) {
if (block.timestamp >= generalConfig.saleCloseDate)
revert SaleClosed();
}
uint256 _supply = supplies[_id];
uint256 _maxSupply = tokenConfigs[_id].maxSupply;
if (_supply + _amount > _maxSupply) revert MaxSupplyExceeded();
uint256 _maxPerTransaction = tokenConfigs[_id].maxPerTransaction;
if (_maxPerTransaction != 0) {
if (_amount > _maxPerTransaction)
revert MaxPerTransactionsExceeded();
}
uint256 royaltyAmount = (_totalPrice *
generalConfig.primaryRoyaltyFee) / BASIS_POINTS;
if (addresses.purchaseTokenAddress != address(0)) {
IERC20 token = IERC20(addresses.purchaseTokenAddress);
token.safeTransferFrom(
msg.sender,
addresses.managerPrimaryRoyaltyAddress,
royaltyAmount
);
token.safeTransferFrom(
msg.sender,
addresses.customerPrimaryRoyaltyAddress,
_totalPrice - royaltyAmount
);
} else {
if (msg.value < _totalPrice) revert InsufficientPaymentValue();
payable(addresses.managerPrimaryRoyaltyAddress).transfer(
royaltyAmount
);
payable(addresses.customerPrimaryRoyaltyAddress).transfer(
_totalPrice - royaltyAmount
);
}
unchecked {
_supply += _amount;
}
supplies[_id] = _supply;
_mint(msg.sender, _id, _amount, '0x');
}
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
)
internal
override(ERC1155)
transferAllowed(from, to)
onlyAllowedOperator(
from,
generalConfig.enableOpenSeaOperatorFilterRegistry
)
{
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
}
function transferAuthorised(
address _from,
address _to,
uint256 _tokenId,
uint256 _amount,
uint256 _expires,
bytes calldata _signature
) external nonContract {
if (block.timestamp >= _expires) revert SignatureExpired();
bytes32 hash = keccak256(
abi.encodePacked(
address(this),
msg.sender,
_from,
_to,
_tokenId,
_amount,
_expires
)
);
bytes32 message = ECDSA.toEthSignedMessageHash(hash);
if (
ECDSA.recover(message, _signature) != addresses.authorisationAddress
) revert NotAuthorised();
super.safeTransferFrom(_from, _to, _tokenId, _amount, '0x');
}
function recoverContract() external {
if (msg.sender != addresses.recoveryAddress) revert NotAuthorised();
_transferContractManager(addresses.recoveryAddress);
}
modifier buyAllowed() {
if (!generalConfig.allowBuy) revert BuyDisabled();
_;
}
modifier nonContract() {
if (tx.origin != msg.sender) revert ContractCallBlocked();
_;
}
modifier transferAllowed(address from, address to) {
bool isMinting = from == address(0);
bool isBurning = to == address(0);
bool isContractManager = from == this.contractManager();
bool isTransferAuthorised = msg.sig == this.transferAuthorised.selector;
if (
!isMinting &&
!isContractManager &&
!isBurning &&
!isTransferAuthorised
) {
if (!generalConfig.allowPublicTransfer) revert TransfersDisabled();
}
_;
}
}
文件 8 的 19:IERC1155.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC1155 is IERC165 {
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
function balanceOf(address account, uint256 id) external view returns (uint256);
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external;
function isApprovedForAll(address account, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}
文件 9 的 19:IERC1155MetadataURI.sol
pragma solidity ^0.8.0;
import "../IERC1155.sol";
interface IERC1155MetadataURI is IERC1155 {
function uri(uint256 id) external view returns (string memory);
}
文件 10 的 19:IERC1155Receiver.sol
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
interface IERC1155Receiver is IERC165 {
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}
文件 11 的 19:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 12 的 19:IERC20.sol
pragma solidity ^0.8.0;
import "../token/ERC20/IERC20.sol";
文件 13 的 19: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);
}
文件 14 的 19:IHyperMintERC1155_2_2_0.sol
pragma solidity ^0.8.10;
struct GeneralConfig {
string name;
string symbol;
string contractMetadataUrl;
string tokenMetadataUrl;
bool allowBuy;
bool allowPublicTransfer;
bool enableOpenSeaOperatorFilterRegistry;
uint256 publicSaleDate;
uint256 saleCloseDate;
uint256 primaryRoyaltyFee;
uint256 secondaryRoyaltyFee;
}
struct TokenConfig {
uint256 price;
uint256 maxSupply;
uint256 maxPerTransaction;
}
struct Addresses {
address recoveryAddress;
address collectionOwnerAddress;
address authorisationAddress;
address purchaseTokenAddress;
address managerPrimaryRoyaltyAddress;
address customerPrimaryRoyaltyAddress;
address secondaryRoyaltyAddress;
}
interface IHyperMintERC1155_2_2_0 {
error NewSupplyTooLow();
error ArrayLengthMismatch();
error MaxSupplyExceeded();
error SignatureExpired();
error NotAuthorised();
error BuyDisabled();
error InsufficientPaymentValue();
error PublicSaleClosed();
error SaleClosed();
error MaxPerTransactionsExceeded();
error ContractCallBlocked();
error ImmutableRecoveryAddress();
error TransfersDisabled();
function name() external view returns (string memory collectionName);
function symbol() external view returns (string memory collectionSymbol);
function getTokenConfigs()
external
view
returns (TokenConfig[] memory configs);
function getSupplies()
external
view
returns (uint256[] memory tokenSupplies);
function contractURI() external view returns (string memory uri);
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view returns (address royaltyAddress, uint256 royaltyAmount);
function supportsInterface(
bytes4 _interfaceId
) external view returns (bool result);
function setNameAndSymbol(
string calldata _name,
string calldata _symbol
) external;
function setMetadataURIs(
string calldata _contractUri,
string calldata _tokenUri
) external;
function setDates(uint256 _publicSale, uint256 _saleClosed) external;
function setTokenConfig(
uint256 _id,
uint256 _price,
uint256 _maxSupply,
uint256 _maxPerTransaction
) external;
function setAddresses(Addresses calldata _addresses) external;
function setAllowBuy(bool allowBuy) external;
function setAllowPublicTransfer(bool _allowPublicTransfer) external;
function setEnableOpenSeaOperatorFilterRegistry(bool _enable) external;
function setRoyalty(uint256 primaryFee, uint256 secondaryFee) external;
function addTokens(TokenConfig[] calldata _tokens) external;
function mintBatch(
address[] calldata _to,
uint256[][] calldata _ids,
uint256[][] calldata _amounts
) external;
function buyAuthorised(
uint256 _id,
uint256 _amount,
uint256 _totalPrice,
uint256 _maxPerAddress,
uint256 _expires,
bytes calldata _signature
) external payable;
function buy(uint256 _id, uint256 _amount) external payable;
function transferAuthorised(
address _from,
address _to,
uint256 _tokenId,
uint256 _amount,
uint256 _expires,
bytes calldata _signature
) external;
}
文件 15 的 19:IOperatorFilterRegistry.sol
pragma solidity ^0.8.4;
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);
}
文件 16 的 19:OperatorFilterer.sol
pragma solidity ^0.8.4;
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, bool switchedOn) virtual {
if (!switchedOn) {
_;
return;
}
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);
}
}
_;
}
}
文件 17 的 19:Ownable_1_0_0.sol
pragma solidity ^0.8.4;
import '@openzeppelin/contracts/utils/Context.sol';
abstract contract Ownable is Context {
address private _owner;
address private _contractManager;
event ContractManagerTransferred(
address indexed previousContractManager,
address indexed newContractManager
);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
constructor() {
_transferContractManager(msg.sender);
}
function owner() public view virtual returns (address) {
return _owner;
}
modifier onlyOwner() {
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);
}
function contractManager() public view virtual returns (address) {
return _contractManager;
}
modifier onlyContractManager() {
require(
_msgSender() == _contractManager,
'Ownable: caller is not the contract manager'
);
_;
}
function transferContractManager(address newContractManager)
public
virtual
onlyContractManager
{
require(
newContractManager != address(0),
'Ownable: new contract owner is the zero address'
);
_transferContractManager(newContractManager);
}
function _transferContractManager(address newContractManager)
internal
virtual
{
address oldContractManager = _contractManager;
_contractManager = newContractManager;
emit ContractManagerTransferred(oldContractManager, newContractManager);
}
}
文件 18 的 19:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 19 的 19:Strings.sol
pragma solidity ^0.8.0;
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
function toString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
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] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
{
"compilationTarget": {
"src/contracts/HyperMintERC1155_2_2_0.sol": "HyperMintERC1155_2_2_0"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 1000
},
"remappings": []
}
[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"contractMetadataUrl","type":"string"},{"internalType":"string","name":"tokenMetadataUrl","type":"string"},{"internalType":"bool","name":"allowBuy","type":"bool"},{"internalType":"bool","name":"allowPublicTransfer","type":"bool"},{"internalType":"bool","name":"enableOpenSeaOperatorFilterRegistry","type":"bool"},{"internalType":"uint256","name":"publicSaleDate","type":"uint256"},{"internalType":"uint256","name":"saleCloseDate","type":"uint256"},{"internalType":"uint256","name":"primaryRoyaltyFee","type":"uint256"},{"internalType":"uint256","name":"secondaryRoyaltyFee","type":"uint256"}],"internalType":"struct GeneralConfig","name":"_generalConfig","type":"tuple"},{"components":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"internalType":"struct Addresses","name":"_addresses","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"BuyDisabled","type":"error"},{"inputs":[],"name":"ContractCallBlocked","type":"error"},{"inputs":[],"name":"ImmutableRecoveryAddress","type":"error"},{"inputs":[],"name":"InsufficientPaymentValue","type":"error"},{"inputs":[],"name":"MaxPerTransactionsExceeded","type":"error"},{"inputs":[],"name":"MaxSupplyExceeded","type":"error"},{"inputs":[],"name":"NewSupplyTooLow","type":"error"},{"inputs":[],"name":"NotAuthorised","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"PublicSaleClosed","type":"error"},{"inputs":[],"name":"SaleClosed","type":"error"},{"inputs":[],"name":"SignatureExpired","type":"error"},{"inputs":[],"name":"TransfersDisabled","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"address","name":"previousContractManager","type":"address"},{"indexed":true,"internalType":"address","name":"newContractManager","type":"address"}],"name":"ContractManagerTransferred","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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerTransaction","type":"uint256"}],"internalType":"struct TokenConfig[]","name":"_tokens","type":"tuple[]"}],"name":"addTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addresses","outputs":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_totalPrice","type":"uint256"},{"internalType":"uint256","name":"_maxPerAddress","type":"uint256"},{"internalType":"uint256","name":"_expires","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyAuthorised","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"generalConfig","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"contractMetadataUrl","type":"string"},{"internalType":"string","name":"tokenMetadataUrl","type":"string"},{"internalType":"bool","name":"allowBuy","type":"bool"},{"internalType":"bool","name":"allowPublicTransfer","type":"bool"},{"internalType":"bool","name":"enableOpenSeaOperatorFilterRegistry","type":"bool"},{"internalType":"uint256","name":"publicSaleDate","type":"uint256"},{"internalType":"uint256","name":"saleCloseDate","type":"uint256"},{"internalType":"uint256","name":"primaryRoyaltyFee","type":"uint256"},{"internalType":"uint256","name":"secondaryRoyaltyFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSupplies","outputs":[{"internalType":"uint256[]","name":"tokenSupplies","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenConfigs","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerTransaction","type":"uint256"}],"internalType":"struct TokenConfig[]","name":"configs","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[][]","name":"_ids","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_amounts","type":"uint256[][]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"collectionName","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recoveryAddress","type":"address"},{"internalType":"address","name":"collectionOwnerAddress","type":"address"},{"internalType":"address","name":"authorisationAddress","type":"address"},{"internalType":"address","name":"purchaseTokenAddress","type":"address"},{"internalType":"address","name":"managerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"customerPrimaryRoyaltyAddress","type":"address"},{"internalType":"address","name":"secondaryRoyaltyAddress","type":"address"}],"internalType":"struct Addresses","name":"_addresses","type":"tuple"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowBuy","type":"bool"}],"name":"setAllowBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_allowPublicTransfer","type":"bool"}],"name":"setAllowPublicTransfer","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":"uint256","name":"_publicSale","type":"uint256"},{"internalType":"uint256","name":"_saleClosed","type":"uint256"}],"name":"setDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enable","type":"bool"}],"name":"setEnableOpenSeaOperatorFilterRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setMetadataURIs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newName","type":"string"},{"internalType":"string","name":"_newSymbol","type":"string"}],"name":"setNameAndSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_primaryFee","type":"uint256"},{"internalType":"uint256","name":"_secondaryFee","type":"uint256"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxPerTransaction","type":"uint256"}],"name":"setTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supplies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"collectionSymbol","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenConfigs","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"maxPerTransaction","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"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_expires","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"transferAuthorised","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newContractManager","type":"address"}],"name":"transferContractManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]