编译器
0.8.12+commit.f00d7308
文件 1 的 14: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 的 14:AnonymiceLibrary.sol
pragma solidity ^0.8.2;
library AnonymiceLibrary {
string internal constant TABLE =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
function encode(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return "";
string memory table = TABLE;
uint256 encodedLen = 4 * ((data.length + 2) / 3);
string memory result = new string(encodedLen + 32);
assembly {
mstore(result, encodedLen)
let tablePtr := add(table, 1)
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
let resultPtr := add(result, 32)
for {
} lt(dataPtr, endPtr) {
} {
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
mstore(
resultPtr,
shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))
)
resultPtr := add(resultPtr, 1)
mstore(
resultPtr,
shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))
)
resultPtr := add(resultPtr, 1)
mstore(
resultPtr,
shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F))))
)
resultPtr := add(resultPtr, 1)
mstore(
resultPtr,
shl(248, mload(add(tablePtr, and(input, 0x3F))))
)
resultPtr := add(resultPtr, 1)
}
switch mod(mload(data), 3)
case 1 {
mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
}
case 2 {
mstore(sub(resultPtr, 1), shl(248, 0x3d))
}
}
return result;
}
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 parseInt(string memory _a)
internal
pure
returns (uint8 _parsedInt)
{
bytes memory bresult = bytes(_a);
uint8 mint = 0;
for (uint8 i = 0; i < bresult.length; i++) {
if (
(uint8(uint8(bresult[i])) >= 48) &&
(uint8(uint8(bresult[i])) <= 57)
) {
mint *= 10;
mint += uint8(bresult[i]) - 48;
}
}
return mint;
}
function substring(
string memory str,
uint256 startIndex,
uint256 endIndex
) internal pure returns (string memory) {
bytes memory strBytes = bytes(str);
bytes memory result = new bytes(endIndex - startIndex);
for (uint256 i = startIndex; i < endIndex; i++) {
result[i - startIndex] = strBytes[i];
}
return string(result);
}
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
}
文件 3 的 14: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;
}
}
文件 4 的 14: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 的 14:ERC721A.sol
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.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,
IERC721,
IERC721Metadata,
IERC721Enumerable
{
using Address for address;
using Strings for uint256;
struct TokenOwnership {
address addr;
uint64 startTimestamp;
}
struct AddressData {
uint128 balance;
uint128 numberMinted;
}
uint256 private currentIndex = 0;
uint256 private burnedCount = 0;
uint256 private immutable startChildIndex;
uint256 private currentChildIndex;
uint256 internal immutable maxBatchSize;
string private _name;
string private _symbol;
mapping(uint256 => TokenOwnership) private _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_,
uint256 maxBatchSize_,
uint256 maxGenesisCap_
) {
require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
_name = name_;
_symbol = symbol_;
maxBatchSize = maxBatchSize_;
startChildIndex = maxGenesisCap_;
currentChildIndex = maxGenesisCap_;
}
function totalSupply() public view override returns (uint256) {
return totalGenesisSupply() + totalChildSupply();
}
function totalGenesisSupply() public view returns (uint256) {
return currentIndex;
}
function totalChildSupply() public view returns (uint256) {
return currentChildIndex - startChildIndex - burnedCount;
}
function burn() internal {
burnedCount++;
}
function tokenByIndex(uint256 index) public view override returns (uint256) {
require(index < totalGenesisSupply() || (index >= startChildIndex && index < totalChildSupply() + startChildIndex) , "ERC721A: global index out of bounds");
return index;
}
function tokenOfOwnerByIndex(address owner, uint256 index)
public
view
override
returns (uint256)
{
require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
address currOwnershipAddr = address(0);
uint256 tokenIdsIdx = 0;
for(uint8 j = 0; j < 2; j++) {
uint256 numMintedSoFar = j < 1 ? totalGenesisSupply() : totalChildSupply() + startChildIndex + burnedCount;
for (uint256 i = j < 1 ? 0 : startChildIndex; i < numMintedSoFar; i++) {
TokenOwnership memory ownership = _ownerships[i];
if (ownership.addr != address(0)) {
currOwnershipAddr = ownership.addr;
}
if (currOwnershipAddr == owner) {
if (tokenIdsIdx == index) {
return i;
}
tokenIdsIdx++;
}
}
}
revert("ERC721A: unable to get token of owner by index");
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC165, IERC165)
returns (bool)
{
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
interfaceId == type(IERC721Enumerable).interfaceId ||
super.supportsInterface(interfaceId);
}
function balanceOf(address owner) public view override returns (uint256) {
require(owner != address(0), "ERC721A: balance query for the zero address");
return uint256(_addressData[owner].balance);
}
function _numberMinted(address owner) internal view returns (uint256) {
require(
owner != address(0),
"ERC721A: number minted query for the zero address"
);
return uint256(_addressData[owner].numberMinted);
}
function ownershipOf(uint256 tokenId)
internal
view
returns (TokenOwnership memory)
{
require(_exists(tokenId), "ERC721A: owner query for nonexistent token");
uint256 lowestTokenToCheck;
if (tokenId >= maxBatchSize) {
lowestTokenToCheck = tokenId - maxBatchSize + 1;
}
for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
TokenOwnership memory ownership = _ownerships[curr];
if (ownership.addr != address(0)) {
return ownership;
}
}
revert("ERC721A: unable to determine the owner of token");
}
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)
{
require(
_exists(tokenId),
"ERC721Metadata: URI query for nonexistent token"
);
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);
require(to != owner, "ERC721A: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721A: approve caller is not owner nor approved for all"
);
_approve(to, tokenId, owner);
}
function getApproved(uint256 tokenId) public view override returns (address) {
require(_exists(tokenId), "ERC721A: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
function setApprovalForAll(address operator, bool approved) public override {
require(operator != _msgSender(), "ERC721A: approve to caller");
_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 override {
_transfer(from, to, tokenId);
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public override {
safeTransferFrom(from, to, tokenId, "");
}
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public override {
_transfer(from, to, tokenId);
require(
_checkOnERC721Received(from, to, tokenId, _data),
"ERC721A: transfer to non ERC721Receiver implementer"
);
}
function _exists(uint256 tokenId) internal view returns (bool) {
return tokenId < currentIndex || tokenId >= startChildIndex && tokenId < currentChildIndex;
}
function _safeMint(address to, uint256 quantity) internal {
_safeMint(to, quantity, "");
}
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal {
bool child = _data.length > 0;
uint256 startTokenId = child ? currentChildIndex : currentIndex;
require(to != address(0), "ERC721A: mint to the zero address");
require(!_exists(startTokenId), "ERC721A: token already minted");
require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");
_beforeTokenTransfers(address(0), to, startTokenId, quantity, _data);
AddressData memory addressData = _addressData[to];
_addressData[to] = AddressData(
addressData.balance + uint128(quantity),
addressData.numberMinted + uint128(quantity)
);
_ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));
uint256 updatedIndex = startTokenId;
for (uint256 i = 0; i < quantity; i++) {
emit Transfer(address(0), to, updatedIndex);
require(
_checkOnERC721Received(address(0), to, updatedIndex, _data),
"ERC721A: transfer to non ERC721Receiver implementer"
);
updatedIndex++;
}
currentIndex = child ? currentIndex : updatedIndex;
currentChildIndex = child ? updatedIndex : currentChildIndex;
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
function _transfer(
address from,
address to,
uint256 tokenId
) private {
TokenOwnership memory prevOwnership = ownershipOf(tokenId);
bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
getApproved(tokenId) == _msgSender() ||
isApprovedForAll(prevOwnership.addr, _msgSender()));
require(
isApprovedOrOwner,
"ERC721A: transfer caller is not owner nor approved"
);
require(
prevOwnership.addr == from,
"ERC721A: transfer from incorrect owner"
);
require(to != address(0), "ERC721A: transfer to the zero address");
_beforeTokenTransfers(from, to, tokenId, 1, "");
_approve(address(0), tokenId, prevOwnership.addr);
_addressData[from].balance -= 1;
_addressData[to].balance += 1;
_ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));
uint256 nextTokenId = tokenId + 1;
if (_ownerships[nextTokenId].addr == address(0)) {
if (_exists(nextTokenId)) {
_ownerships[nextTokenId] = TokenOwnership(
prevOwnership.addr,
prevOwnership.startTimestamp
);
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
function _approve(
address to,
uint256 tokenId,
address owner
) private {
_tokenApprovals[tokenId] = to;
emit Approval(owner, to, tokenId);
}
uint256 public nextOwnerToExplicitlySet = 0;
function _setOwnersExplicit(uint256 quantity) internal {
uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
require(quantity > 0, "quantity must be nonzero");
uint256 endIndex = oldNextOwnerToSet + quantity - 1;
if (endIndex > currentIndex - 1) {
endIndex = currentIndex - 1;
}
require(_exists(endIndex), "not enough minted yet for this cleanup");
for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
if (_ownerships[i].addr == address(0)) {
TokenOwnership memory ownership = ownershipOf(i);
_ownerships[i] = TokenOwnership(
ownership.addr,
ownership.startTimestamp
);
}
}
nextOwnerToExplicitlySet = endIndex + 1;
}
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
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("ERC721A: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity,
bytes memory data
) internal virtual {}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
}
文件 6 的 14:IERC165.sol
pragma solidity ^0.8.0;
interface IERC165 {
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
文件 7 的 14: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
) external;
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
function approve(address to, uint256 tokenId) external;
function getApproved(uint256 tokenId) external view returns (address operator);
function setApprovalForAll(address operator, bool _approved) external;
function isApprovedForAll(address owner, address operator) external view returns (bool);
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
文件 8 的 14:IERC721Enumerable.sol
pragma solidity ^0.8.0;
import "../IERC721.sol";
interface IERC721Enumerable is IERC721 {
function totalSupply() external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function tokenByIndex(uint256 index) external view returns (uint256);
}
文件 9 的 14: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);
}
文件 10 的 14:IERC721Receiver.sol
pragma solidity ^0.8.0;
interface IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
文件 11 的 14:MerkleProof.sol
pragma solidity ^0.8.0;
library MerkleProof {
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
bytes32 computedHash = leaf;
for (uint256 i = 0; i < proof.length; i++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
computedHash = _efficientHash(computedHash, proofElement);
} else {
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}
文件 12 的 14:Nodes.sol
pragma solidity ^0.8.2;
import "./ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./AnonymiceLibrary.sol";
contract Nodes is ERC721A, Ownable {
using AnonymiceLibrary for uint8;
struct Trait {
string traitName;
string traitType;
}
bool public MINT_ENABLE = false;
bool public PUBLIC_ENABLE = false;
uint256 public START_BLOCK = 0;
string private p5Url;
string private p5Integrity;
string private pakoUrl;
string private pakoIntegrity;
string private imageUrl;
string private imageUrlExtension;
string private animationUrl;
string private gzip;
string private description;
string private c;
string private meta;
string private constant traitType = "{\"trait_type\":\"";
string private constant traitValue = "\",\"value\":\"";
string private constant terminator = "\"}";
uint8[11] private seq = [1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1];
uint8[9] private costs = [0,3,4,0,5,3,4,0,5];
uint8 private constant fuseCost = 2;
uint private constant ONE_DAY = 86400;
uint8 private constant TRAIT_COUNT = 5;
uint8 private constant PADDED_TRAIT_COUNT = 2;
uint256 private constant mult = 16807;
uint256 private constant mod = 2147483647;
uint private immutable TRAIT_TOKEN_EPOCH = ONE_DAY;
uint private immutable FUSE_COOLDOWN = ONE_DAY * 3;
uint private immutable PRICE;
uint16 public immutable GENISIS_CAP;
bytes32 public generalMerkleRoot;
bytes32 public devMerkleRoot;
uint16 public immutable FUSED_CAP;
uint16[][TRAIT_COUNT] private rarityTree;
mapping(address => uint) private addrToMintedQ;
mapping(address => uint) private addrToMintedP;
mapping(string => bool) private hashToMinted;
mapping(uint => string) private tokenIdToHash;
mapping(uint => uint) private tokenIdToTimestamp;
mapping(uint => uint) private tokenIdToCooldown;
mapping(uint => uint) private tokenIdToSpent;
mapping(uint => uint16) private tokenIdToSizeX;
mapping(uint => uint16) private tokenIdToSizeY;
mapping(uint256 => Trait[]) private traitTypes;
mapping(address => uint) private lastWrite;
uint8 public teamMints = 0;
constructor(bytes32 _generalMerkleRoot, bytes32 _devMerkleRoot, uint16 genesisCap) ERC721A("NODES", "NODE", 12, genesisCap) {
rarityTree[0] = [630, 450, 360, 270, 270, 100, 450, 360, 450, 450, 360, 270, 270, 360, 270, 360, 270, 360, 270, 540, 180, 270, 270, 270, 360, 360, 270, 450, 450];
rarityTree[1] = [195, 388, 388, 388, 1553, 777, 777, 1942, 1165, 485, 388, 777, 777];
rarityTree[2] = [2500, 2500, 5000];
rarityTree[3] = [3334, 3333, 3333];
rarityTree[4] = [1613, 645, 968, 1613, 1290, 968, 1290, 645, 645, 323];
generalMerkleRoot = _generalMerkleRoot;
devMerkleRoot = _devMerkleRoot;
PRICE = 50000000000000000;
GENISIS_CAP = genesisCap;
FUSED_CAP = genesisCap * 2;
imageUrlExtension = ".gif";
}
modifier noContract() {
require(!AnonymiceLibrary.isContract(msg.sender), "c0");
_;
}
modifier disallowIfStateIsChanging() {
require(owner() == msg.sender || lastWrite[msg.sender] < block.number, "no.");
_;
}
function tokenHTML(uint256 tokenId)
public
view
disallowIfStateIsChanging
returns (string memory)
{
require(_exists(tokenId),"e0");
return string(
abi.encodePacked(
headData(),
tokenIdToHash[tokenId],
"%27%3B%20const%20size%20%3D%20%5B",
tokenIdToSizeX[tokenId] > 0 ? AnonymiceLibrary.toString(tokenIdToSizeX[tokenId]) : "500",
"%2C",
tokenIdToSizeY[tokenId] > 0 ? AnonymiceLibrary.toString(tokenIdToSizeY[tokenId]) : "500",
"%5D%3B%20const%20g%20%3D%20%27",
gzip,
"%27%3B%20const%20e%20%3D%20Function(%27%22use%20strict%22%3Breturn%20(%27%20%2B%20pako.inflate(new%20Uint8Array(atob(g).split(%27%27).map(function(x)%7Breturn%20x.charCodeAt(0)%3B%20%7D))%2C%20%7B%20to%3A%20%27string%27%20%7D)%2B%20%27)%27)()%3B%20new%20p5(e.nodes%2C%20%27nodes%27)%3B%20%3C%2Fscript%3E%3Cdiv%20id%3D%22nodes%22%20name%3D%22nodes%22%3E%3C%2Fdiv%3E%3C%2Fbody%3E%3C%2Fhtml%3E"
)
);
}
function headData() private view returns (bytes memory) {
return abi.encodePacked(
"data:text/html,%3Chtml%3E%3Chead%3E",
meta,
"%3Cscript%20src%3D%22",
p5Url,
"%22%20integrity%3D%22",
p5Integrity,
"%22%20crossorigin%3D%22anonymous%22%20referrerpolicy%3D%22no-referrer%22%3E%3C%2Fscript%3E%3Cscript%20src%3D%22",
pakoUrl,
"%22%20integrity%3D%22",
pakoIntegrity,
"%22%20crossorigin%3D%22anonymous%22%20referrerpolicy%3D%22no-referrer%22%3E%3C%2Fscript%3E%3C%2Fhead%3E%3C%2Fbody%3E%3Cscript%3Econst%20h%20%3D%20%27"
);
}
function tokenURI(uint256 _tokenId)
public
view
override
disallowIfStateIsChanging
returns (string memory)
{
require(_exists(_tokenId), "e0");
return
string(
abi.encodePacked(
"data:application/json;base64,",
AnonymiceLibrary.encode(
bytes(
string(
abi.encodePacked(
"{\"name\": \"NODES #",
AnonymiceLibrary.toString(_tokenId),
"\",\"description\": \"",
description,
"\",\"animation_url\": \"",
bytes(animationUrl).length > 0 ? animationUrl : tokenHTML(_tokenId),
bytes(animationUrl).length > 0 ? AnonymiceLibrary.toString(_tokenId) : "",
"\",\"external_url\": \"",
tokenHTML(_tokenId),
"\",\"image\": \"",
imageUrl,
AnonymiceLibrary.toString(_tokenId),
imageUrlExtension,
"\",\"attributes\": ",
hashToMetadata(getTokenHash(_tokenId)),
"}"
)
)
)
)
)
);
}
function mintNodes(uint256 quantity, bytes32[] calldata merkleProof) public payable noContract {
require(msg.value >= PRICE * quantity,"m1");
lastWrite[msg.sender] = block.number;
mint(quantity, merkleProof, false);
}
function mintNodesTeam(uint256 quantity, bytes32[] calldata merkleProof) public noContract {
mint(quantity, merkleProof, true);
}
function mint(uint256 quantity, bytes32[] calldata merkleProof, bool isTeamMint) private {
uint256 limit = isTeamMint ? 12 : 2;
require((PUBLIC_ENABLE ? addrToMintedP[msg.sender] : addrToMintedQ[msg.sender]) + quantity <= limit, "m2");
require((totalGenesisSupply() + quantity) <= GENISIS_CAP, "m3");
require(MerkleProof.verify(merkleProof, isTeamMint ? devMerkleRoot : generalMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "m4");
_safeMint(msg.sender, quantity);
if(isTeamMint) {
teamMints += uint8(quantity);
require(addrToMintedQ[msg.sender] + addrToMintedP[msg.sender] + quantity <= limit, "m6");
} else {
require(MINT_ENABLE == true, "m0");
require((PUBLIC_ENABLE ? addrToMintedP[msg.sender] : addrToMintedQ[msg.sender]) == 0, "m5");
}
if(PUBLIC_ENABLE) {
addrToMintedP[msg.sender] += quantity;
} else {
addrToMintedQ[msg.sender] += quantity;
}
}
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity,
bytes memory data
) internal override {
if(from == address(0)) {
if(data.length > 0) {
require(quantity == 1, "btt0");
tokenIdToHash[startTokenId] = string(data);
} else {
string memory hashi = hash(startTokenId, to, uint8(quantity));
for(uint i = 0; i < quantity; i++) {
tokenIdToHash[startTokenId + i] = string(abi.encodePacked("00", AnonymiceLibrary.substring(hashi, 0 + i*12, 12 + i*12)));
}
}
}
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
for(uint i = 0; i < quantity; i++) {
tokenIdToTimestamp[startTokenId + i] = block.timestamp;
tokenIdToCooldown[startTokenId + i] = block.timestamp + FUSE_COOLDOWN;
delete tokenIdToSpent[startTokenId + i];
delete tokenIdToSizeX[startTokenId + i];
delete tokenIdToSizeY[startTokenId + i];
}
}
function fuse(
uint256 tokenId0,
uint256 tokenId1,
int8[9] memory phenotype,
uint256 tokenCostPreference
) public noContract {
require(MINT_ENABLE);
require(ownerOf(tokenId0) == msg.sender && ownerOf(tokenId1) == msg.sender, "f1");
require(tokenId0 != tokenId1, "f2");
require(getRemainingCooldown(tokenId0) == 0 && getRemainingCooldown(tokenId1) == 0, "f3");
string memory h1 = getTokenHash(tokenId0);
string memory h2 = getTokenHash(tokenId1);
string memory out;
uint8 curr = 2;
uint8 cost = fuseCost;
for(uint8 i = 0; i < phenotype.length; i++) {
if(phenotype[i] == -2) {
out = string(abi.encodePacked(out, AnonymiceLibrary.substring(h1, curr, curr + seq[i + 2])));
} else if(phenotype[i] == -1) {
out = string(abi.encodePacked(out, AnonymiceLibrary.substring(h2, curr, curr + seq[i + 2])));
} else {
require(phenotype[i] >= 0 && i != 0 && i != 3 && i != 7, "f4");
require(uint8(phenotype[i]) < rarityTree[i < 5 ? i : i - 4].length, "f5");
cost += costs[i];
uint8 rar = uint8(phenotype[i]);
out = string(
abi.encodePacked(out, string(abi.encodePacked((rar <= 9 && seq[i+2] == 2) ? "0" : "", rar.toString())))
);
}
curr += seq[i+2];
}
uint256 bal0 = getTraitTokenBalance(tokenId0);
uint256 bal1 = getTraitTokenBalance(tokenId1);
uint256 t0spend;
uint256 t1spend;
require(bal0 + bal1 >= uint256(cost), "f6");
if(tokenCostPreference == tokenId0) {
t0spend = cost > bal0 ? bal0 : cost;
t1spend = cost > t0spend ? cost - t0spend : 0;
} else {
t1spend = cost > bal1 ? bal1 : cost;
t0spend = cost > t1spend ? cost - t1spend : 0;
}
tokenIdToSpent[tokenId0] += t0spend;
tokenIdToSpent[tokenId1] += t1spend;
_safeMint(msg.sender, 1, abi.encodePacked("01", out));
burnIfFused(tokenId0, h1);
burnIfFused(tokenId1, h2);
require(totalChildSupply() <= FUSED_CAP, "f7");
}
function burnIfFused(uint256 tokenId, string memory h1) private {
if(AnonymiceLibrary.parseInt(AnonymiceLibrary.substring(h1, 1, 2)) != 0) {
safeTransferFrom(msg.sender, address(0xdead), tokenId);
tokenIdToHash[tokenId] = string(abi.encodePacked("1",AnonymiceLibrary.substring(h1, 1, bytes(h1).length)));
burn();
} else {
tokenIdToCooldown[tokenId] = block.timestamp + FUSE_COOLDOWN;
}
}
function rarityGen(uint256 _randinput, uint8 _rarityTier)
private
view
returns (uint8)
{
uint16 currentLowerBound = 0;
for (uint8 i = 0; i < rarityTree[_rarityTier].length; i++) {
uint16 thisPercentage = rarityTree[_rarityTier][i];
if (
_randinput >= currentLowerBound &&
_randinput < currentLowerBound + thisPercentage
) return i;
currentLowerBound = currentLowerBound + thisPercentage;
}
revert("r1");
}
function hash(
uint256 _t,
address _a,
uint8 q
) private returns (string memory) {
string memory currentHash;
string memory out;
uint8 draws = 0;
uint8 selected = 0;
uint256 seed =
uint256(
keccak256(
abi.encodePacked(
block.timestamp,
block.difficulty,
_t,
_a,
c
)
)
) % 123456789;
uint256 x = (seed * mult + 1) % mod;
do {
for (uint8 i = 0; i < TRAIT_COUNT; i++) {
uint16 _randinput = uint16(x % 10000);
x = (x * mult + 1) % mod;
uint8 rar = rarityGen(_randinput, i);
currentHash = string(
abi.encodePacked(currentHash, string(abi.encodePacked((rar <= 9 && i <= 1) ? "0" : "", rar.toString())))
);
}
if(!hashToMinted[currentHash]) {
selected++;
hashToMinted[currentHash] = true;
uint8 offset = 2;
out = string(
abi.encodePacked(out, currentHash, AnonymiceLibrary.substring(currentHash, offset, TRAIT_COUNT + offset))
);
}
currentHash = "";
draws++;
if(draws >= q*2) {
revert("h1");
}
} while (selected < q);
return out;
}
function hashToMetadata(string memory _hash)
private
view
returns (string memory)
{
uint8 curr = 0;
uint8 idx = 0;
string memory metadataString;
for(uint8 i = 0; i < seq.length; i++) {
idx = AnonymiceLibrary.parseInt(
AnonymiceLibrary.substring(_hash, curr, curr + seq[i])
);
metadataString = string(
abi.encodePacked(
metadataString,
traitType,
abi.encodePacked(traitTypes[i > 6 ? i - 4 : i][idx].traitType, i > 6 ? "2" : ""),
traitValue,
traitTypes[i > 6 ? i - 4 : i][idx].traitName,
terminator,
i < seq.length-1 ? "," : ""
)
);
curr += seq[i];
}
return string(abi.encodePacked("[", metadataString, "]"));
}
function toggleMint() public onlyOwner {
MINT_ENABLE = !MINT_ENABLE;
if(START_BLOCK == 0) {
START_BLOCK = block.number;
}
}
function togglePublic() public onlyOwner {
PUBLIC_ENABLE = !PUBLIC_ENABLE;
}
function getTraitTokenBalance(uint256 tokenId) public view returns(uint) {
require(_exists(tokenId), "e0");
return ((block.timestamp - tokenIdToTimestamp[tokenId]) / TRAIT_TOKEN_EPOCH) - tokenIdToSpent[tokenId];
}
function getRemainingCooldown(uint256 tokenId) public view returns (uint) {
require(_exists(tokenId), "e0");
return block.timestamp > tokenIdToCooldown[tokenId] ? 0 : tokenIdToCooldown[tokenId] - block.timestamp;
}
function getTokenHash(uint256 tokenId) public view disallowIfStateIsChanging returns (string memory) {
require(_exists(tokenId), "e0");
return tokenIdToHash[tokenId];
}
function getTokenSize(uint tokenId) public view disallowIfStateIsChanging returns (string memory) {
require(_exists(tokenId), "e0");
return string(
abi.encodePacked(
"[",
tokenIdToSizeX[tokenId],
",",
tokenIdToSizeY[tokenId],
"]"
)
);
}
function addTraitType(uint256 _traitTypeIndex, Trait[] memory traits)
public
onlyOwner
{
delete traitTypes[_traitTypeIndex];
for (uint256 i = 0; i < traits.length; i++) {
traitTypes[_traitTypeIndex].push(
Trait(
traits[i].traitName,
traits[i].traitType
)
);
}
return;
}
function setSizeForTokenId(uint256 tokenId, uint16 xInPixels, uint16 yInPixels) public {
require(ownerOf(tokenId) == msg.sender, "s0");
if(xInPixels > 0 && xInPixels <= 5000 && yInPixels > 0 && yInPixels <= 5000) {
tokenIdToSizeX[tokenId] = xInPixels;
tokenIdToSizeY[tokenId] = yInPixels;
} else {
revert("s1");
}
}
function setMeta(string memory _meta) public onlyOwner {
meta = _meta;
}
function setp5Address(string memory _p5Url) public onlyOwner {
p5Url = _p5Url;
}
function setp5Integrity(string memory _p5Integrity) public onlyOwner {
p5Integrity = _p5Integrity;
}
function setPakoAddress(string memory _pakoUrl) public onlyOwner {
pakoUrl = _pakoUrl;
}
function setPakoIntegrity(string memory _pakoIntegrity) public onlyOwner {
pakoIntegrity = _pakoIntegrity;
}
function setGzipSource(string memory _b64Gzip) public onlyOwner {
gzip = _b64Gzip;
}
function setImageUrl(string memory _imageUrl) public onlyOwner {
imageUrl = _imageUrl;
}
function setImageUrlExtension(string memory _imageUrlExtension) public onlyOwner {
imageUrlExtension = _imageUrlExtension;
}
function setAnimationUrl(string memory _animationUrl) public onlyOwner {
animationUrl = _animationUrl;
}
function setDescription(string memory _description) public onlyOwner {
description = _description;
}
function clearTraits() public onlyOwner {
for (uint8 i = 0; i < TRAIT_COUNT+2; i++) {
delete traitTypes[i];
}
}
function setMerkelRoots(bytes32 _generalMerkleRoot, bytes32 _devMerkleRoot) public onlyOwner {
generalMerkleRoot = _generalMerkleRoot;
devMerkleRoot = _devMerkleRoot;
}
function setC(string memory _c) public onlyOwner {
c = _c;
}
function payTheDevs() public onlyOwner {
(bool success, ) = owner().call{value: address(this).balance}("");
require(success);
}
}
文件 13 的 14: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());
}
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);
}
}
文件 14 的 14: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": {
"contracts/Nodes.sol": "Nodes"
},
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"bytes32","name":"_generalMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_devMerkleRoot","type":"bytes32"},{"internalType":"uint16","name":"genesisCap","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FUSED_CAP","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GENISIS_CAP","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_ENABLE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PUBLIC_ENABLE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"START_BLOCK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traitTypeIndex","type":"uint256"},{"components":[{"internalType":"string","name":"traitName","type":"string"},{"internalType":"string","name":"traitType","type":"string"}],"internalType":"struct Nodes.Trait[]","name":"traits","type":"tuple[]"}],"name":"addTraitType","outputs":[],"stateMutability":"nonpayable","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":[],"name":"clearTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId0","type":"uint256"},{"internalType":"uint256","name":"tokenId1","type":"uint256"},{"internalType":"int8[9]","name":"phenotype","type":"int8[9]"},{"internalType":"uint256","name":"tokenCostPreference","type":"uint256"}],"name":"fuse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generalMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRemainingCooldown","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenSize","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTraitTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintNodes","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintNodesTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"payTheDevs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"string","name":"_animationUrl","type":"string"}],"name":"setAnimationUrl","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":"string","name":"_c","type":"string"}],"name":"setC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_b64Gzip","type":"string"}],"name":"setGzipSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_imageUrl","type":"string"}],"name":"setImageUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_imageUrlExtension","type":"string"}],"name":"setImageUrlExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_generalMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_devMerkleRoot","type":"bytes32"}],"name":"setMerkelRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_meta","type":"string"}],"name":"setMeta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_pakoUrl","type":"string"}],"name":"setPakoAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_pakoIntegrity","type":"string"}],"name":"setPakoIntegrity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint16","name":"xInPixels","type":"uint16"},{"internalType":"uint16","name":"yInPixels","type":"uint16"}],"name":"setSizeForTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_p5Url","type":"string"}],"name":"setp5Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_p5Integrity","type":"string"}],"name":"setp5Integrity","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":"teamMints","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"togglePublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","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":"totalChildSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalGenesisSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]