编译器
0.8.21+commit.d9974bed
文件 1 的 6:GnarsHD.sol
pragma solidity 0.8.21;
import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol";
import {Owned} from "solmate/auth/Owned.sol";
import {Base64} from "base64/base64.sol";
contract GnarsHD is Owned {
struct Artwork {
string ipfsFolder;
uint48 amountBackgrounds;
uint48 amountBodies;
uint48 amountAccessories;
uint48 amountHeads;
uint48 amountNoggles;
}
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
error Untransferable();
error TokenDoesNotExist(uint256 tokenId);
string public name = "Gnars HD";
string public symbol = "GNARSHD";
string public rendererBaseUri;
string public contractURI;
Artwork public artwork;
ISkateContractV2 public gnarsV2;
constructor(
address _gnarsV2Address,
string memory _rendererBaseUri,
Artwork memory _artwork,
string memory _contractURI,
address _owner
) Owned(_owner) {
gnarsV2 = ISkateContractV2(_gnarsV2Address);
rendererBaseUri = _rendererBaseUri;
artwork = _artwork;
contractURI = _contractURI;
}
function setArtwork(Artwork memory _artwork) public onlyOwner {
artwork = _artwork;
}
function setContractUri(string memory _contractURI) public onlyOwner {
contractURI = _contractURI;
}
function setRendererBaseUri(string memory _rendererBaseUri) public onlyOwner {
rendererBaseUri = _rendererBaseUri;
}
function getAttributes(uint256 _tokenId)
public
view
returns (string memory resultAttributes, string memory queryString)
{
(uint48 background, uint48 body, uint48 accessory, uint48 head, uint48 glasses) = gnarsV2.seeds(_tokenId);
IGnarDescriptorV2 descriptor = IGnarDescriptorV2(gnarsV2.descriptor());
IGnarDecorator decorator = IGnarDecorator(descriptor.decorator());
queryString = string.concat(
"?contractAddress=",
Strings.toHexString(address(this)),
"&tokenId=",
Strings.toString(_tokenId),
getBackgroundQueryParam(background),
getPartQueryParam("BODY", body, artwork.amountBodies),
getPartQueryParam("ACCESSORY", accessory, artwork.amountAccessories),
getPartQueryParam("HEADS", head, artwork.amountHeads),
getPartQueryParam("NOGGLES", glasses, artwork.amountNoggles)
);
resultAttributes = string.concat(
getPartTrait("Background", background, decorator.backgrounds),
",",
getPartTrait("Body", body, decorator.bodies),
",",
getPartTrait("Accessory", accessory, decorator.accessories),
",",
getPartTrait("Head", head, decorator.heads),
",",
getPartTrait("Glasses", glasses, decorator.glasses)
);
}
function getPartQueryParam(string memory folder, uint48 partIndex, uint48 amountOfPart)
public
view
returns (string memory)
{
if (partIndex >= amountOfPart) {
return string.concat("&images=", artwork.ipfsFolder, "/", folder, "/FALLBACK.PNG");
}
return string.concat("&images=", artwork.ipfsFolder, "/", folder, "/", Strings.toString(partIndex), ".PNG");
}
function getBackgroundQueryParam(uint48 backgroundIndex) public view returns (string memory) {
if (backgroundIndex >= artwork.amountBackgrounds) {
return string.concat("&images=", artwork.ipfsFolder, "/BACKGROUND/FALLBACK.PNG");
}
return string.concat("&images=", artwork.ipfsFolder, "/BACKGROUND/", Strings.toString(backgroundIndex), ".PNG");
}
function getPartTrait(
string memory traitType,
uint48 partIndex,
function (uint256) external view returns (string memory) getPartDescription
) public view returns (string memory) {
try getPartDescription(partIndex) returns (string memory partDescription) {
return string.concat('{"trait_type":"', traitType, '","value":"', partDescription, '"}');
} catch {
return string.concat('{"trait_type":"', traitType, '","value":"Unknown"}');
}
}
function tokenURI(uint256 _tokenId) public view returns (string memory) {
if (gnarsV2.ownerOf(_tokenId) == address(0)) {
revert TokenDoesNotExist(_tokenId);
}
(string memory attributes, string memory queryString) = getAttributes(_tokenId);
return string(
abi.encodePacked(
"data:application/json;base64,",
Base64.encode(
bytes(
abi.encodePacked(
'{"name":"Gnar HD #',
Strings.toString(_tokenId),
'", "description":"High definition Gnar #',
Strings.toString(_tokenId),
" counterpart",
'", "attributes": [',
attributes,
'], "image": "',
string.concat(rendererBaseUri, queryString),
'"}'
)
)
)
)
);
}
function totalSupply() external view returns (uint256) {
return gnarsV2.totalSupply();
}
function tokenByIndex(uint256 _index) external view returns (uint256) {
return gnarsV2.tokenByIndex(_index);
}
function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256) {
return gnarsV2.tokenOfOwnerByIndex(_owner, _index);
}
function ownerOf(uint256 id) public view returns (address owner) {
return gnarsV2.ownerOf(id);
}
function balanceOf(address owner) public view returns (uint256) {
return gnarsV2.balanceOf(owner);
}
function assertOwnership(uint256[] memory tokenIds) public {
for (uint256 i = 0; i < tokenIds.length; i++) {
uint256 tokenId = tokenIds[i];
emit Transfer(address(0), gnarsV2.ownerOf(tokenId), tokenId);
}
}
function approve(address, uint256) public pure {
revert Untransferable();
}
function setApprovalForAll(address, bool) public pure {
revert Untransferable();
}
function transferFrom(address, address, uint256) public pure {
revert Untransferable();
}
function safeTransferFrom(address, address, uint256) public pure {
revert Untransferable();
}
function safeTransferFrom(address, address, uint256, bytes calldata) public pure {
revert Untransferable();
}
function isTransferable(uint256, address, address) external pure returns (bool) {
return false;
}
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == 0x01ffc9a7
|| interfaceId == 0x80ac58cd
|| interfaceId == 0x5b5e139f
|| interfaceId == 0x780e9d63
|| interfaceId == 0x7f5828d0
|| interfaceId == 0x91a6262f;
}
}
interface IGnarDecorator {
function accessories(uint256) external view returns (string memory);
function backgrounds(uint256) external view returns (string memory);
function bodies(uint256) external view returns (string memory);
function glasses(uint256) external view returns (string memory);
function heads(uint256) external view returns (string memory);
}
interface IGnarDescriptorV2 {
function decorator() external view returns (address);
}
interface ISkateContractV2 {
function balanceOf(address owner) external view returns (uint256);
function descriptor() external view returns (address);
function ownerOf(uint256 tokenId) external view returns (address);
function seeds(uint256)
external
view
returns (uint48 background, uint48 body, uint48 accessory, uint48 head, uint48 glasses);
function tokenByIndex(uint256 index) external view returns (uint256);
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
function totalSupply() external view returns (uint256);
}
文件 2 的 6:Math.sol
pragma solidity ^0.8.0;
library Math {
enum Rounding {
Down,
Up,
Zero
}
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
function average(uint256 a, uint256 b) internal pure returns (uint256) {
return (a & b) + (a ^ b) / 2;
}
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
return a == 0 ? 0 : (a - 1) / b + 1;
}
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
uint256 prod0;
uint256 prod1;
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
if (prod1 == 0) {
return prod0 / denominator;
}
require(denominator > prod1, "Math: mulDiv overflow");
uint256 remainder;
assembly {
remainder := mulmod(x, y, denominator)
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
uint256 twos = denominator & (~denominator + 1);
assembly {
denominator := div(denominator, twos)
prod0 := div(prod0, twos)
twos := add(div(sub(0, twos), twos), 1)
}
prod0 |= prod1 * twos;
uint256 inverse = (3 * denominator) ^ 2;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
inverse *= 2 - denominator * inverse;
result = prod0 * inverse;
return result;
}
}
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 result = 1 << (log2(a) >> 1);
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}
文件 3 的 6:Owned.sol
pragma solidity >=0.8.0;
abstract contract Owned {
event OwnershipTransferred(address indexed user, address indexed newOwner);
address public owner;
modifier onlyOwner() virtual {
require(msg.sender == owner, "UNAUTHORIZED");
_;
}
constructor(address _owner) {
owner = _owner;
emit OwnershipTransferred(address(0), _owner);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
owner = newOwner;
emit OwnershipTransferred(msg.sender, newOwner);
}
}
文件 4 的 6:SignedMath.sol
pragma solidity ^0.8.0;
library SignedMath {
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
function average(int256 a, int256 b) internal pure returns (int256) {
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
function abs(int256 n) internal pure returns (uint256) {
unchecked {
return uint256(n >= 0 ? n : -n);
}
}
}
文件 5 的 6:Strings.sol
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
文件 6 的 6:base64.sol
pragma solidity >=0.6.0;
library Base64 {
string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";
function encode(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return '';
string memory table = TABLE_ENCODE;
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)
mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
resultPtr := add(resultPtr, 1)
mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
resultPtr := add(resultPtr, 1)
mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
resultPtr := add(resultPtr, 1)
mstore8(resultPtr, 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 decode(string memory _data) internal pure returns (bytes memory) {
bytes memory data = bytes(_data);
if (data.length == 0) return new bytes(0);
require(data.length % 4 == 0, "invalid base64 decoder input");
bytes memory table = TABLE_DECODE;
uint256 decodedLen = (data.length / 4) * 3;
bytes memory result = new bytes(decodedLen + 32);
assembly {
let lastBytes := mload(add(data, mload(data)))
if eq(and(lastBytes, 0xFF), 0x3d) {
decodedLen := sub(decodedLen, 1)
if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
decodedLen := sub(decodedLen, 1)
}
}
mstore(result, decodedLen)
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, 4)
let input := mload(dataPtr)
let output := add(
add(
shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
add(
shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
and(mload(add(tablePtr, and( input , 0xFF))), 0xFF)
)
)
mstore(resultPtr, shl(232, output))
resultPtr := add(resultPtr, 3)
}
}
return result;
}
}
{
"compilationTarget": {
"src/GnarsHD.sol": "GnarsHD"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":base64/=lib/base64/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":openzeppelin/=lib/openzeppelin-contracts/contracts/",
":solmate/=lib/solmate/src/"
]
}
[{"inputs":[{"internalType":"address","name":"_gnarsV2Address","type":"address"},{"internalType":"string","name":"_rendererBaseUri","type":"string"},{"components":[{"internalType":"string","name":"ipfsFolder","type":"string"},{"internalType":"uint48","name":"amountBackgrounds","type":"uint48"},{"internalType":"uint48","name":"amountBodies","type":"uint48"},{"internalType":"uint48","name":"amountAccessories","type":"uint48"},{"internalType":"uint48","name":"amountHeads","type":"uint48"},{"internalType":"uint48","name":"amountNoggles","type":"uint48"}],"internalType":"struct GnarsHD.Artwork","name":"_artwork","type":"tuple"},{"internalType":"string","name":"_contractURI","type":"string"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"Untransferable","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","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":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"artwork","outputs":[{"internalType":"string","name":"ipfsFolder","type":"string"},{"internalType":"uint48","name":"amountBackgrounds","type":"uint48"},{"internalType":"uint48","name":"amountBodies","type":"uint48"},{"internalType":"uint48","name":"amountAccessories","type":"uint48"},{"internalType":"uint48","name":"amountHeads","type":"uint48"},{"internalType":"uint48","name":"amountNoggles","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"assertOwnership","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":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getAttributes","outputs":[{"internalType":"string","name":"resultAttributes","type":"string"},{"internalType":"string","name":"queryString","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint48","name":"backgroundIndex","type":"uint48"}],"name":"getBackgroundQueryParam","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"folder","type":"string"},{"internalType":"uint48","name":"partIndex","type":"uint48"},{"internalType":"uint48","name":"amountOfPart","type":"uint48"}],"name":"getPartQueryParam","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"traitType","type":"string"},{"internalType":"uint48","name":"partIndex","type":"uint48"},{"internalType":"function (uint256) view external returns (string)","name":"getPartDescription","type":"function"}],"name":"getPartTrait","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gnarsV2","outputs":[{"internalType":"contract ISkateContractV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isTransferable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rendererBaseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"ipfsFolder","type":"string"},{"internalType":"uint48","name":"amountBackgrounds","type":"uint48"},{"internalType":"uint48","name":"amountBodies","type":"uint48"},{"internalType":"uint48","name":"amountAccessories","type":"uint48"},{"internalType":"uint48","name":"amountHeads","type":"uint48"},{"internalType":"uint48","name":"amountNoggles","type":"uint48"}],"internalType":"struct GnarsHD.Artwork","name":"_artwork","type":"tuple"}],"name":"setArtwork","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_rendererBaseUri","type":"string"}],"name":"setRendererBaseUri","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":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]