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

2.5.1 prerelease #379

Closed
wants to merge 14 commits into from
5 changes: 5 additions & 0 deletions .changeset/funny-rats-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/protocol-deployments": patch
---

Updated determinstic preminter deployment script to not fail if already deployed
14 changes: 14 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mode": "pre",
"tag": "prerelease",
"initialVersions": {
"@zoralabs/zora-1155-contracts": "2.5.1",
"@zoralabs/protocol-deployments": "0.0.6",
"@zoralabs/protocol-rewards": "1.2.1",
"@zoralabs/protocol-sdk": "0.3.2"
},
"changesets": [
"funny-rats-draw",
"twelve-swans-help"
]
}
5 changes: 0 additions & 5 deletions .changeset/tame-chairs-obey.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/twelve-swans-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zoralabs/protocol-deployments": patch
---

Deployed 2.5.1 to zora sepolia and zora goerli
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": "[email protected]:ourzora/zora-protocol.git",
"author": "Iain <[email protected]>",
"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-21T02:54:10.313Z
// 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";
}
}
7 changes: 7 additions & 0 deletions packages/protocol-deployments/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @zoralabs/premint-sdk

## 0.0.7-prerelease.0

### Patch Changes

- dba9bb0: Updated determinstic preminter deployment script to not fail if already deployed
- 4c4ae23: Deployed 2.5.1 to zora sepolia and zora goerli

## 0.0.6

### Patch Changes
Expand Down
12 changes: 6 additions & 6 deletions packages/protocol-deployments/addresses/999.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"CONTRACT_1155_IMPL": "0xcD7230AFfBC8C720aE607e0Bc386fbCAF5C34C2E",
"CONTRACT_1155_IMPL_VERSION": "2.4.0",
"FACTORY_IMPL": "0x869Be2EaE4AB30Cf319a46B5dE50Ac203c8784Aa",
"CONTRACT_1155_IMPL": "0xa2669e686fa4192166daEa69F269b262636eE198",
"CONTRACT_1155_IMPL_VERSION": "2.5.1",
"FACTORY_IMPL": "0x30ed75ffaDF6215A3190d43ec505750a70B29fAc",
"FACTORY_PROXY": "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
"FIXED_PRICE_SALE_STRATEGY": "0x04E2516A2c207E84a1839755675dfd8eF6302F0a",
"MERKLE_MINT_SALE_STRATEGY": "0xf48172CA3B6068B20eE4917Eb27b5472f1f272C7",
"PREMINTER_IMPL": "0x6E2AbBcd82935bFC68A1d5d2c96372b13b65eD9C",
"PREMINTER_IMPL": "0x37A7c717c3EDA58e4ec7F424B2A46934Fd8f8468",
"PREMINTER_PROXY": "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
"REDEEM_MINTER_FACTORY": "0x78964965cF77850224513a367f899435C5B69174",
"UPGRADE_GATE": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
"timestamp": 1699570171,
"commit": "385e4932"
"timestamp": 1700533625,
"commit": "8c57238e"
}
12 changes: 6 additions & 6 deletions packages/protocol-deployments/addresses/999999999.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"CONTRACT_1155_IMPL": "0xC6899816663891D7493939d74d83cb7f2BBcBB16",
"CONTRACT_1155_IMPL_VERSION": "2.4.0",
"FACTORY_IMPL": "0xA2d5B3C1feb801c0A1CF083Ee17d939A5E5D2464",
"CONTRACT_1155_IMPL": "0xF3a46845548bE811Ce37e65153563f4a0AaEbe31",
"CONTRACT_1155_IMPL_VERSION": "2.5.1",
"FACTORY_IMPL": "0xF7e49F97E82cc38ACd82E303F37Fe046f5a190B5",
"FACTORY_PROXY": "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
"FIXED_PRICE_SALE_STRATEGY": "0x6d28164C3CE04A190D5F9f0f8881fc807EAD975A",
"MERKLE_MINT_SALE_STRATEGY": "0x5e5fD4b758076BAD940db0284b711A67E8a3B88c",
"PREMINTER_IMPL": "0x4e10791d56a6E90b4b7E2840Fa96DD4fB273F3F2",
"PREMINTER_IMPL": "0x37A7c717c3EDA58e4ec7F424B2A46934Fd8f8468",
"PREMINTER_PROXY": "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
"REDEEM_MINTER_FACTORY": "0x25cFb6dd9cDE8425e781d6718a29Ccbca3F038d6",
"UPGRADE_GATE": "0x0000000000000000000000000000000000000000",
"timestamp": 1700087849,
"commit": "a2700107"
"timestamp": 1700531325,
"commit": "fdd3d044"
}
2 changes: 1 addition & 1 deletion packages/protocol-deployments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@zoralabs/protocol-deployments",
"version": "0.0.6",
"version": "0.0.7-prerelease.0",
"repository": "https://github.com/ourzora/zora-protocol",
"license": "MIT",
"main": "./dist/index.js",
Expand Down
12 changes: 10 additions & 2 deletions packages/protocol-deployments/script/DeployProxiesToNewChain.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import {ZoraDeployerBase} from "../src/ZoraDeployerBase.sol";
import {Deployment} from "../src/DeploymentConfig.sol";
import {ZoraDeployerUtils} from "../src/ZoraDeployerUtils.sol";
import {DeploymentTestingUtils} from "../src/DeploymentTestingUtils.sol";
import {IZoraCreator1155PremintExecutor} from "@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155PremintExecutor.sol";

contract DeployProxiesToNewChain is ZoraDeployerBase, DeploymentTestingUtils {
contract DeployProxiesToNewChain is ZoraDeployerBase {
function run() public returns (string memory) {
Deployment memory deployment = getDeployment();

Expand All @@ -31,7 +32,14 @@ contract DeployProxiesToNewChain is ZoraDeployerBase, DeploymentTestingUtils {

console2.log("testing premint");

signAndExecutePremint(deployment.preminterProxy, vm.envAddress("TEST_PREMINT_FUNDS_RECIPIENT"));
address fundsRecipient = vm.envAddress("TEST_PREMINT_FUNDS_RECIPIENT");
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
mintRecipient: fundsRecipient,
mintComment: "",
mintReferral: fundsRecipient
});

signAndExecutePremintV2(deployment.preminterProxy, vm.envAddress("TEST_PREMINT_FUNDS_RECIPIENT"), mintArguments);

vm.stopBroadcast();

Expand Down
35 changes: 35 additions & 0 deletions packages/protocol-deployments/script/DeployTestContracts.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "forge-std/Script.sol";
import "forge-std/console2.sol";

import {ZoraDeployerBase} from "../src/ZoraDeployerBase.sol";
import {Deployment} from "../src/DeploymentConfig.sol";
import {ZoraDeployerUtils} from "../src/ZoraDeployerUtils.sol";
import {IZoraCreator1155PremintExecutor} from "@zoralabs/zora-1155-contracts/src/interfaces/IZoraCreator1155PremintExecutor.sol";

contract DeployTestContracts is ZoraDeployerBase {
function run() public returns (string memory) {
Deployment memory deployment = getDeployment();

vm.startBroadcast();

ZoraDeployerUtils.deployTestContractForVerification(deployment.factoryProxy, makeAddr("admin"));

address fundsRecipient = vm.envAddress("DEPLOYER");
IZoraCreator1155PremintExecutor.MintArguments memory mintArguments = IZoraCreator1155PremintExecutor.MintArguments({
mintRecipient: fundsRecipient,
mintComment: "",
mintReferral: fundsRecipient
});

signAndExecutePremintV2(deployment.preminterProxy, fundsRecipient, mintArguments);

vm.stopBroadcast();

// now test signing and executing premint

return getDeploymentJSON(deployment);
}
}
Loading
Loading