Last active
November 11, 2021 03:45
-
-
Save jsonMartin/4d7780e406234b39d6120719689b13e6 to your computer and use it in GitHub Desktop.
Robotic.sol
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Robotic { | |
// Each uint is tokenID in Items contract | |
// This Psuedocode example not optimized for memory, but can select smaller uint data types to conserve memory? | |
struct Robot { // uint refers to ERC-1155 tokenId | |
uint head; | |
uint leftArm; | |
uint rightArm; | |
uint legs; | |
uint torso; | |
uint background; | |
} | |
mapping (uint => Robot[]) public parentToChild; //parent id => Robot data structure for child items | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment