@zoralabs/protocol-deployments 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -665,6 +665,7 @@ export const zoraCreator1155ImplABI = [
665
665
  name: "CallFailed",
666
666
  },
667
667
  { type: "error", inputs: [], name: "Call_TokenIdMismatch" },
668
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
668
669
  {
669
670
  type: "error",
670
671
  inputs: [
@@ -763,12 +764,23 @@ export const zoraCreator1155ImplABI = [
763
764
  },
764
765
  { type: "error", inputs: [], name: "INVALID_ADDRESS_ZERO" },
765
766
  { type: "error", inputs: [], name: "INVALID_ETH_AMOUNT" },
767
+ {
768
+ type: "error",
769
+ inputs: [
770
+ { name: "mintTo", internalType: "address", type: "address" },
771
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
772
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" },
773
+ ],
774
+ name: "InvalidMerkleProof",
775
+ },
766
776
  { type: "error", inputs: [], name: "InvalidMintSchedule" },
767
777
  { type: "error", inputs: [], name: "MintNotYetStarted" },
768
778
  { type: "error", inputs: [], name: "Mint_InsolventSaleTransfer" },
769
779
  { type: "error", inputs: [], name: "Mint_TokenIDMintNotAllowed" },
770
780
  { type: "error", inputs: [], name: "Mint_UnknownCommand" },
771
781
  { type: "error", inputs: [], name: "Mint_ValueTransferFail" },
782
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
783
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
772
784
  { type: "error", inputs: [], name: "NewOwnerNeedsToBeAdmin" },
773
785
  {
774
786
  type: "error",
@@ -792,6 +804,8 @@ export const zoraCreator1155ImplABI = [
792
804
  name: "RendererNotValid",
793
805
  },
794
806
  { type: "error", inputs: [], name: "Renderer_NotValidRendererContract" },
807
+ { type: "error", inputs: [], name: "SaleEnded" },
808
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
795
809
  {
796
810
  type: "error",
797
811
  inputs: [
@@ -812,6 +826,15 @@ export const zoraCreator1155ImplABI = [
812
826
  inputs: [],
813
827
  name: "UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL",
814
828
  },
829
+ {
830
+ type: "error",
831
+ inputs: [
832
+ { name: "user", internalType: "address", type: "address" },
833
+ { name: "limit", internalType: "uint256", type: "uint256" },
834
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" },
835
+ ],
836
+ name: "UserExceedsMintLimit",
837
+ },
815
838
  {
816
839
  type: "error",
817
840
  inputs: [
@@ -821,6 +844,7 @@ export const zoraCreator1155ImplABI = [
821
844
  ],
822
845
  name: "UserMissingRoleForToken",
823
846
  },
847
+ { type: "error", inputs: [], name: "WrongValueSent" },
824
848
  {
825
849
  type: "event",
826
850
  anonymous: false,
@@ -2082,6 +2106,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2082
2106
  name: "CallFailed",
2083
2107
  },
2084
2108
  { type: "error", inputs: [], name: "Call_TokenIdMismatch" },
2109
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
2085
2110
  {
2086
2111
  type: "error",
2087
2112
  inputs: [
@@ -2138,11 +2163,23 @@ export const zoraCreator1155PremintExecutorImplABI = [
2138
2163
  inputs: [],
2139
2164
  name: "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING",
2140
2165
  },
2166
+ {
2167
+ type: "error",
2168
+ inputs: [
2169
+ { name: "mintTo", internalType: "address", type: "address" },
2170
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
2171
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" },
2172
+ ],
2173
+ name: "InvalidMerkleProof",
2174
+ },
2175
+ { type: "error", inputs: [], name: "InvalidMintSchedule" },
2141
2176
  { type: "error", inputs: [], name: "MintNotYetStarted" },
2142
2177
  { type: "error", inputs: [], name: "Mint_InsolventSaleTransfer" },
2143
2178
  { type: "error", inputs: [], name: "Mint_TokenIDMintNotAllowed" },
2144
2179
  { type: "error", inputs: [], name: "Mint_UnknownCommand" },
2145
2180
  { type: "error", inputs: [], name: "Mint_ValueTransferFail" },
2181
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
2182
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
2146
2183
  { type: "error", inputs: [], name: "NewOwnerNeedsToBeAdmin" },
2147
2184
  { type: "error", inputs: [], name: "ONLY_OWNER" },
2148
2185
  { type: "error", inputs: [], name: "ONLY_PENDING_OWNER" },
@@ -2158,6 +2195,8 @@ export const zoraCreator1155PremintExecutorImplABI = [
2158
2195
  name: "ProtocolRewardsWithdrawFailed",
2159
2196
  },
2160
2197
  { type: "error", inputs: [], name: "Renderer_NotValidRendererContract" },
2198
+ { type: "error", inputs: [], name: "SaleEnded" },
2199
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
2161
2200
  {
2162
2201
  type: "error",
2163
2202
  inputs: [
@@ -2186,6 +2225,15 @@ export const zoraCreator1155PremintExecutorImplABI = [
2186
2225
  ],
2187
2226
  name: "UpgradeToMismatchedContractName",
2188
2227
  },
2228
+ {
2229
+ type: "error",
2230
+ inputs: [
2231
+ { name: "user", internalType: "address", type: "address" },
2232
+ { name: "limit", internalType: "uint256", type: "uint256" },
2233
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" },
2234
+ ],
2235
+ name: "UserExceedsMintLimit",
2236
+ },
2189
2237
  {
2190
2238
  type: "error",
2191
2239
  inputs: [
@@ -2195,6 +2243,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2195
2243
  ],
2196
2244
  name: "UserMissingRoleForToken",
2197
2245
  },
2246
+ { type: "error", inputs: [], name: "WrongValueSent" },
2198
2247
  {
2199
2248
  type: "event",
2200
2249
  anonymous: false,
@@ -2761,6 +2810,18 @@ export const zoraCreator1155PremintExecutorImplConfig = {
2761
2810
  * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0xA5E8d0d4FCed34E86AF6d4E16131C7210Ba8b4b7)
2762
2811
  */
2763
2812
  export const zoraCreatorFixedPriceSaleStrategyABI = [
2813
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
2814
+ {
2815
+ type: "error",
2816
+ inputs: [
2817
+ { name: "mintTo", internalType: "address", type: "address" },
2818
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
2819
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" },
2820
+ ],
2821
+ name: "InvalidMerkleProof",
2822
+ },
2823
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
2824
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
2764
2825
  { type: "error", inputs: [], name: "SaleEnded" },
2765
2826
  { type: "error", inputs: [], name: "SaleHasNotStarted" },
2766
2827
  {
@@ -3039,6 +3100,7 @@ export const zoraCreatorFixedPriceSaleStrategyConfig = {
3039
3100
  * - [__View Contract on Sepolia Etherscan__](https://sepolia.etherscan.io/address/0x357D8108A77762B41Ea0C4D69fBb1eF4391251eC)
3040
3101
  */
3041
3102
  export const zoraCreatorMerkleMinterStrategyABI = [
3103
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
3042
3104
  {
3043
3105
  type: "error",
3044
3106
  inputs: [
@@ -3049,6 +3111,8 @@ export const zoraCreatorMerkleMinterStrategyABI = [
3049
3111
  name: "InvalidMerkleProof",
3050
3112
  },
3051
3113
  { type: "error", inputs: [], name: "MerkleClaimsExceeded" },
3114
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
3115
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
3052
3116
  { type: "error", inputs: [], name: "SaleEnded" },
3053
3117
  { type: "error", inputs: [], name: "SaleHasNotStarted" },
3054
3118
  {
@@ -3295,8 +3359,20 @@ export const zoraCreatorMerkleMinterStrategyConfig = {
3295
3359
  export const zoraCreatorRedeemMinterFactoryABI = [
3296
3360
  { stateMutability: "nonpayable", type: "constructor", inputs: [] },
3297
3361
  { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
3362
+ {
3363
+ type: "error",
3364
+ inputs: [
3365
+ { name: "mintTo", internalType: "address", type: "address" },
3366
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
3367
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" },
3368
+ ],
3369
+ name: "InvalidMerkleProof",
3370
+ },
3298
3371
  { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
3299
3372
  { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
3373
+ { type: "error", inputs: [], name: "SaleEnded" },
3374
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
3375
+ { type: "error", inputs: [], name: "WrongValueSent" },
3300
3376
  {
3301
3377
  type: "event",
3302
3378
  anonymous: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/protocol-deployments",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,74 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.17;
3
+
4
+ import "forge-std/Test.sol";
5
+
6
+ import {
7
+ ForkDeploymentConfig,
8
+ Deployment,
9
+ ChainConfig
10
+ } from "@zoralabs/zora-1155-contracts/src/deployment/DeploymentConfig.sol";
11
+ import {ZoraDeployerUtils} from "@zoralabs/zora-1155-contracts/src/deployment/ZoraDeployerUtils.sol";
12
+
13
+ import {Zora1155Factory} from "@zoralabs/zora-1155-contracts/src/proxies/Zora1155Factory.sol";
14
+ import {ZoraCreator1155FactoryImpl} from "@zoralabs/zora-1155-contracts/src/factory/ZoraCreator1155FactoryImpl.sol";
15
+ import {ZoraCreator1155Impl} from "@zoralabs/zora-1155-contracts/src/nft/ZoraCreator1155Impl.sol";
16
+ import {ICreatorRoyaltiesControl} from "@zoralabs/zora-1155-contracts/src/interfaces/ICreatorRoyaltiesControl.sol";
17
+ import {IMinter1155} from "@zoralabs/zora-1155-contracts/src/interfaces/IMinter1155.sol";
18
+
19
+ contract ZoraCreator1155SupplyRoyaltyDeprecationTest is Test, ForkDeploymentConfig {
20
+ address internal creator;
21
+ string[] internal chains;
22
+
23
+ function setUp() public {
24
+ creator = makeAddr("creator");
25
+
26
+ chains = new string[](1);
27
+ chains[0] = "zora_goerli";
28
+ }
29
+
30
+ function testFork_SupplyRoyaltyDeprecation() public {
31
+ for (uint256 i; i < chains.length; ++i) {
32
+ string memory chain = chains[i];
33
+
34
+ vm.createSelectFork(vm.rpcUrl(chain));
35
+
36
+ Deployment memory deployment = getDeployment();
37
+ ChainConfig memory chainConfig = getChainConfig();
38
+
39
+ ZoraCreator1155FactoryImpl factory = ZoraCreator1155FactoryImpl(deployment.factoryProxy);
40
+
41
+ uint32 invalidRoyaltyMintSchedule = 10;
42
+
43
+ ICreatorRoyaltiesControl.RoyaltyConfiguration memory royaltyConfig = ICreatorRoyaltiesControl
44
+ .RoyaltyConfiguration({
45
+ royaltyBPS: 0,
46
+ royaltyRecipient: address(0),
47
+ royaltyMintSchedule: invalidRoyaltyMintSchedule
48
+ });
49
+
50
+ vm.expectRevert(abi.encodeWithSignature("InvalidMintSchedule()"));
51
+ factory.createContract("mock uri", "mock name", royaltyConfig, payable(creator), new bytes[](0));
52
+
53
+ (address newFactoryImpl,,) = ZoraDeployerUtils.deployNew1155AndFactoryImpl({
54
+ upgradeGateAddress: deployment.upgradeGate,
55
+ mintFeeRecipient: chainConfig.mintFeeRecipient,
56
+ protocolRewards: chainConfig.protocolRewards,
57
+ merkleMinter: IMinter1155(deployment.merkleMintSaleStrategy),
58
+ redeemMinterFactory: IMinter1155(deployment.redeemMinterFactory),
59
+ fixedPriceMinter: IMinter1155(deployment.fixedPriceSaleStrategy)
60
+ });
61
+
62
+ ZoraCreator1155FactoryImpl newFactory =
63
+ ZoraCreator1155FactoryImpl(address(new Zora1155Factory(newFactoryImpl, "")));
64
+
65
+ address tokenContractAddress =
66
+ newFactory.createContract("mock uri", "mock name", royaltyConfig, payable(creator), new bytes[](0));
67
+
68
+ ZoraCreator1155Impl tokenContract = ZoraCreator1155Impl(tokenContractAddress);
69
+
70
+ // Ensure the specified royalty mint schedule is ignored + set to zero
71
+ assertEq(tokenContract.getRoyalties(0).royaltyMintSchedule, 0);
72
+ }
73
+ }
74
+ }