Skip to content
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

Bump premint to 2.5.1 #377

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/tame-chairs-obey.md

This file was deleted.

20 changes: 13 additions & 7 deletions packages/1155-contracts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @zoralabs/zora-1155-contracts

## 2.5.1

### Patch Changes

- 68566fce: Fixed setting uid when doing a premint v1

## 2.5.0

### Minor Changes
Expand All @@ -8,7 +14,7 @@

### New fields on signature

Adding a new `PremintConfigV2` struct that can be signed, that now contains a `createReferral`. `ZoraCreator1155PremintExecutor` recognizes new version of the premint config, and still works with the v1 (legacy) version of the `PremintConfig`. Version one of the premint config still works and is still defined in the `PremintConfig` struct.
Adding a new `PremintConfigV2` struct that can be signed, that now contains a `createReferral`. `ZoraCreator1155PremintExecutor` recognizes new version of the premint config, and still works with the v1 (legacy) version of the `PremintConfig`. Version one of the premint config still works and is still defined in the `PremintConfig` struct.

Additional changes included in `PremintConfigV2`:

Expand All @@ -22,18 +28,18 @@
### Replacing external signature validation and authorization check with just authorization check

`ZoraCreator1155PremintExecutor`'s function `isValidSignature(contractConfig, premintConfig)` is deprecated in favor of:

```solidity
isAuthorizedToCreatePremint(
address signer,
address premintContractConfigContractAdmin,
address contractAddress
) public view returns (bool isAuthorized)
```
which instead of validating signatures and checking if the signer is authorized to create premints, just checks if an signer is authorized to create premints on the contract. This offloads signature decoding/validation to calling clients offchain, and reduces needing to create different signatures for this function on the contract for each version of the premint config. It also allows Premints to be validated on contracts that were not created using premints, such as contracts that are upgraded, and contracts created directly via the factory.

### Changes to handling of setting of fundsRecipient

which instead of validating signatures and checking if the signer is authorized to create premints, just checks if an signer is authorized to create premints on the contract. This offloads signature decoding/validation to calling clients offchain, and reduces needing to create different signatures for this function on the contract for each version of the premint config. It also allows Premints to be validated on contracts that were not created using premints, such as contracts that are upgraded, and contracts created directly via the factory.

### Changes to handling of setting of fundsRecipient

Previously the `fundsRecipient` on the fixed priced minters' sales config for the token was set to the signer of the premint. This has been changed to be set to the `payoutRecipient` of the premint config on `PremintConfigV2`, and to the `royaltyRecipient` of the premint config for v1 of the premint config, for 1155 contracts that are to be newly created, and for existing 1155 contracts that are upgraded to the latest version.

Expand Down Expand Up @@ -137,7 +143,7 @@
takes a signer, contractConfig.contractAdmin, and 1155 address, and determines if the signer is authorized to sign premints on the given contract. Replaces `isValidSignature` - by putting the burden on clients to first decode the signature, then pass the recovered signer to this function to determine if the signer has premint authorization on the contract.

- deprecated function `isValidSignature` - call `isAuthorizedToCreatePremint` instead

### Patch Changes

- 885ffa4: Premint executor can still execute premint mints that were created with V1 signatures for `delegateSetupNewToken`
Expand Down
2 changes: 1 addition & 1 deletion packages/1155-contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zoralabs/zora-1155-contracts",
"version": "2.5.0",
"version": "2.5.1",
"repository": "git@github.com:ourzora/zora-protocol.git",
"author": "Iain <iain@zora.co>",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/1155-contracts/src/version/ContractVersionBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is automatically generated by code; do not manually update
// Last updated on 2023-11-20T19:36:43.527Z
// Last updated on 2023-11-21T01:06:09.129Z
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

Expand All @@ -10,6 +10,6 @@ import {IVersionedContract} from "../interfaces/IVersionedContract.sol";
contract ContractVersionBase is IVersionedContract {
/// @notice The version of the contract
function contractVersion() external pure override returns (string memory) {
return "2.5.0";
return "2.5.1";
}
}
Loading