-
Notifications
You must be signed in to change notification settings - Fork 86
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: first minter rewards #162
Conversation
b7ee5fa
to
3486445
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.
you could do this also with gt upstack restack
then it restacks your branches' changes on top of the premint branch
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.
can you please add test that shows: first minter gets rewards on multiple mints from different minters
|
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.
great improvements and nice new test coverage
|
||
uint256 maxQuantity = 10; | ||
uint256 pricePerToken = 1000000000000000000; | ||
uint256 pricePerToken = 1 ether; |
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.
nice change here to these units
@@ -963,6 +966,66 @@ contract ZoraCreator1155Test is Test { | |||
target.mintWithRewards(fixedPriceMinter, tokenId, quantity, abi.encode(recipient), address(0)); | |||
} | |||
|
|||
function test_FirstMinterRewardReceivedOnConsecutiveMints(uint256 quantity) public { |
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.
awesome test!
|
||
// Execute commands returned from minter | ||
_executeCommands(minter.requestMint(msg.sender, tokenId, quantity, ethValueSent, minterArguments).commands, ethValueSent, tokenId); | ||
|
||
emit Purchased(msg.sender, address(minter), tokenId, quantity, msg.value); | ||
} | ||
|
||
/// @dev Get and/or set the first minter a token | ||
function _handleFirstMinter(uint256 tokenId, bytes calldata data) internal returns (address) { |
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.
very minor (and optional improvement) - for readability, having returns (address firstMinter)
would be clearer.
62e0ee5
to
44366b7
Compare
Looks like test coverage went down to 69.5% - maybe some tests were deleted? |
todo:
|
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
* refactor: remove legacy mint fee contracts * refactor: remove unusued import * chore: update tests * chore: lint * chore: update runs * chore: update storage layout * style: update natspec * chore: update tests * chore: remove unused var * chore: update tests * fix: move hardcoded fork vars to constants * added first minter changeset * * Added changeset that depreates redeem minters. * Remove Redeem minter from coverage. --------- Co-authored-by: Rohan Kulkarni <[email protected]>
MINTs contract implementation and integration with Zora Creator 1155s and the Premint Executor. Additional improvements: * Created a new `DeterminsticTransparentProxyDeployer` for deploying the MINTs contract, which follows the TransparentProxyDeployer upgradeability method * Moved many contracts and entities into a new private shared package `shared-contracts` - enabling both the MINTs contract and Zora creator 1155 contract to use them. * simplified/flattened out rewards splits calculations to save contract storage size
No description provided.