-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
starting on 1155s #7
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
_mint(recipient, tempSupply, 1, ""); | ||
|
||
_startTokenIds.push(tempSupply); | ||
_startTokenIdToSeedDetails[tempSupply] = SeedDetails(blockhash(block.number - 1), block.timestamp); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question I would have here is -
Can you go more in depth on SeedDetails
and how that hooks up to the art generation off-chain? If I pass in a bytes32 seed
to mintSeedToOneRecipient
then would this line be like -
_startTokenIdToSeedDetails[tempSupply] = SeedDetails(seed, block.timestamp);
Alright - this should be a good starting point to the conversation. Couple other questions - I see the |
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
function processRecipientMintWithHash(uint256 tokenId, bytes32 inputHash) external { | ||
collectionSeedInputs[msg.sender].push( | ||
UserInputHash(uint176(tokenId), inputHash) | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newly added function, called from ERC1155YungWkndBase
during mintSeedToOneRecipient
function.
/** | ||
* @notice Get a token's seed input | ||
*/ | ||
function getCuratedHash(uint256 tokenId, address collection) public view returns (bytes32 memory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function first checks for user input-ed hashes, and then if not found, constructs it from the seed input details
* @notice Registers a minter | ||
* @param minter New minter | ||
*/ | ||
function registerMinter(address minter) external onlyOwner { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the contracts be self-owned? In this case, you will want to consider who can register and unregister valid minters. A valid approach is to let each owner optionally kick your EOA out of minting privileges (but that would hinder functionality for their collection)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the contracts (for now) will be centrally owned by my app/EOAs.
Artists can control their art and payout details, etc. But the minter/minting mechanic will more or less be the same for every project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd strongly consider using a factory to deploy collections. We used to use a factory with CREATE2 but moved off it for other product-related reasons (that don't apply here). Advantages:
- Your backend can know a contract's address before the deploy tx completes
- Your factory can handle optional deploy config like adding files to your collection's FileSystem for example (for collections that are "in-chain"), and updating data on your renderer contract
- Using a minimal proxy will result in cheaper deploys + each instance of a collection won't need to be "verified as proxy" on block explorers, eg. Etherscan automatically displays the implementation's interface if the contract is a minimal proxy (https://eips.ethereum.org/EIPS/eip-1167)
|
||
for (uint256 i = 0; i < fileStorageAddressesLength; i++) { | ||
contents = string( | ||
abi.encodePacked( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This contract has actually been updated to be more efficient. Overall, this repository is lagging a little behind but this should be the only part that affects your branch. More to come on this later, but expect main
to be updated with a newer OnchainFileStorage
contract next week
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Signed-off-by: Campion Fellin <[email protected]>
Description
Please include a summary of the change and which issue is fixed.
Fixes HIGHLIGHT-
Starts on large 1155-based project
Proposed Changes: