-
Notifications
You must be signed in to change notification settings - Fork 103
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
Premint #161
Conversation
oveddan
commented
Sep 7, 2023
•
edited
Loading
edited
- Premint - delegated contract & token creation, & minting
- First minter rewards
- Determinstic contract addresses
b7ee5fa
to
01b9ec0
Compare
8d81d3b
to
d54c425
Compare
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.
some minor fixes should be worked on before merging to master
src/premint/README.md
Outdated
@@ -0,0 +1,59 @@ | |||
# Preminter |
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 should be made up to date before merging to master
} | ||
|
||
// todo: move to its own contract | ||
error MintNotYetStarted(); |
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.
lets do this todo, and just reference IZora1155Errors.MintNotYetStarted
import {ECDSAUpgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol"; | ||
import {ZoraCreatorFixedPriceSaleStrategy} from "../minters/fixed-price/ZoraCreatorFixedPriceSaleStrategy.sol"; | ||
|
||
struct ContractCreationConfig { |
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 doesn't quite belong in this file, as it is primarily used to create new contracts and get a deterministic address based on these fields
import {IMinter1155} from "../interfaces/IMinter1155.sol"; | ||
import {PremintConfig, ContractCreationConfig, TokenCreationConfig, ZoraCreator1155Attribution} from "./ZoraCreator1155Attribution.sol"; | ||
|
||
/// @title Enables creation of and minting tokens on Zora1155 contracts transactions using eip-712 signatures. |
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.
add Enjoy graphic (and inherit from it)
isNewContract = contractAddress.code.length == 0; | ||
|
||
if (isNewContract) { | ||
// if address doesnt exist for hash, createi t |
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.
fix typo
return "ZORA 1155 Premint Executor"; | ||
} | ||
|
||
// upgrade functionality |
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.
duplicate comment
Premint - update documentation
* move upgrade gate to initalizer pattern * formatting
refactor: remove mint fee amount deploy param
refactor: implement first minter reward on adminMint
* refactor: only mint if specified quantity is greater than 0 * fix tests --------- Co-authored-by: Dan Oved <stangogh@gmail.com>
* Can mine for a determinstic address for the proxy shim in a script, and have a test that shows we can determinstically deploy proxy to that address with that salt and deployer account * wip on deploy via script. nneed to create web ui * cleanup * update test to work with new params :) * deployment works now!. lets genericize stuff :) * consolidated into one * end to end scripting works :) * renamed and refactored to be more usable * Determinstic deployer scripts are more generic and can deploy and verify :) * rename * another rename :) * Premint proxy deploy (#211) * made premint executor ugparde scripts. renamed executor to proxy * deploy preminter impl with script, and updated the config for that chain * Have premint proxy deploy scripts. can deploy both now * preminter proxy pushed * Refactor deterministic add upgrade gate (#210) * large refactor * update scripts * updates to test code * test naming updates * compiler run correctly * update with new deterministic configs * make node deps only for scripts * Premint deploy determinstic fix tests (#213) * fixed tests by just making it more dyanmic * fix stack too deep error for coverage * ignore deployment folder for coverage * properly filter out deployment --------- Co-authored-by: Iain Nash <iain@zora.co>
* fix: remove unused param names * fix: linting
package/batchPublish.test.ts
Outdated
@@ -281,7 +280,7 @@ describe("ZoraCreator1155Preminter", () => { | |||
[collectorAccount] | |||
); | |||
|
|||
const zoraMintFee = chainConfigs[zora.id].MINT_FEE_AMOUNT; | |||
const zoraMintFee = parseEther("0.0007"); |
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.
Should this be 0.000777
?
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 delete this test for now
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.
yes, fixing
* Premint * Add back mint fee getter (#198) * add back mint fee getter * add mint fee to interface * * Updated script to deploy preminter to now deploy the proxy (#189) * Extracted common deployment tasks to reusable helper functions * Added script to upgrade preminter * Premint - move premint state to its own contract (#188) Renamed Premint folder to delegated mint * fix: redeem minter tests * fix: token transfer hook for single token transfers * feat: add unit tests * Seperate upgrade gate new contract (#204) * wip * wip * fix tests * chore: run lint & update natspec * update storage layout --------- Co-authored-by: Rohan Kulkarni <kulkarohan@gmail.com> * refactor: add helper to read uups implementation * fix: param name casing * refactor: use updated zora 1155 impl getter * refactor: add helper to read uups implementation * fix: zora 1155 impl var name * chore: run lint * chore: run lint * refactor: implement first minter reward on adminMint * chore: update runs * refactor: remove mint fee amount deploy param * chore: run lint * chore: run lint * chore: remove mint fee amount from chain configs * chore: update fork test * fix: use mint w rewards to gurantee mint fee amount * Premint: updated documentation (#199) Premint - update documentation * move upgrade gate to initializer pattern (#209) * move upgrade gate to initalizer pattern * formatting * refactor: only mint if specified quantity is greater than 0 (#212) * refactor: only mint if specified quantity is greater than 0 * fix tests --------- Co-authored-by: Dan Oved <stangogh@gmail.com> * Premint - factory proxy 777 deployments (#191) * Can mine for a determinstic address for the proxy shim in a script, and have a test that shows we can determinstically deploy proxy to that address with that salt and deployer account * wip on deploy via script. nneed to create web ui * cleanup * update test to work with new params :) * deployment works now!. lets genericize stuff :) * consolidated into one * end to end scripting works :) * renamed and refactored to be more usable * Determinstic deployer scripts are more generic and can deploy and verify :) * rename * another rename :) * Premint proxy deploy (#211) * made premint executor ugparde scripts. renamed executor to proxy * deploy preminter impl with script, and updated the config for that chain * Have premint proxy deploy scripts. can deploy both now * preminter proxy pushed * Refactor deterministic add upgrade gate (#210) * large refactor * update scripts * updates to test code * test naming updates * compiler run correctly * update with new deterministic configs * make node deps only for scripts * Premint deploy determinstic fix tests (#213) * fixed tests by just making it more dyanmic * fix stack too deep error for coverage * ignore deployment folder for coverage * properly filter out deployment --------- Co-authored-by: Iain Nash <iain@zora.co> * update deps * add back release command * fix version publish * fix contract version * move wagmi cli to proper version * more things in dev deps * move all into deps * update protocol rewards package (#226) * fix build * fix wagmi build * Clean Up Transfer Hook Mock (#229) * fix: remove unused param names * fix: linting --------- Co-authored-by: Rohan Kulkarni <kulkarohan@gmail.com> Co-authored-by: Rohan Kulkarni <rohan@ourzora.com> Co-authored-by: Isabella Smallcombe <isabella@ourzora.com> Co-authored-by: Iain Nash <iain@zora.co> Co-authored-by: Isabella Smallcombe <isabella.smallcombe@gmail.com>