Skip to content

Commit

Permalink
chore: deterministic deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 committed Jul 29, 2024
1 parent efdd45d commit c3d12c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/NFTMint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ contract NFTMint is Ownable {
* @param args Arguments for the mint
*/
function createMint(MintArgs memory args) external returns (MintERC1155) {
MintERC1155 newMint = MintERC1155(Clones.clone(MINT_NFT_LOGIC));
MintERC1155 newMint = MintERC1155(
Clones.cloneDeterministic(
MINT_NFT_LOGIC, keccak256(abi.encodePacked(block.chainid, msg.sender, block.timestamp))
)
);
newMint.initialize(args.owner, args.name, args.imageURI, args.description, args.editions);

MintInfo storage mintInfo = mints[newMint];
Expand Down

0 comments on commit c3d12c5

Please sign in to comment.