Skip to content

Instantly share code, notes, and snippets.

@ilamanov
Created March 7, 2022 20:40
Show Gist options
  • Select an option

  • Save ilamanov/a6f291372135243c2cb862c1f69de81c to your computer and use it in GitHub Desktop.

Select an option

Save ilamanov/a6f291372135243c2cb862c1f69de81c to your computer and use it in GitHub Desktop.
contract ERC721Metadata {
function getMetadata(uint256 _tokenId, string) public view returns (bytes32[4] buffer, uint256 count) {
if (_tokenId == 1) {
buffer[0] = "Hello World! :D";
count = 15;
} else if (_tokenId == 2) {
buffer[0] = "I would definitely choose a medi";
buffer[1] = "um length string.";
count = 49;
} else if (_tokenId == 3) {
buffer[0] = "Lorem ipsum dolor sit amet, mi e";
buffer[1] = "st accumsan dapibus augue lorem,";
buffer[2] = " tristique vestibulum id, libero";
buffer[3] = " suscipit varius sapien aliquam.";
count = 128;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment