@zoralabs/protocol-deployments 0.0.3 → 0.0.5-prerelease.0

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.
Files changed (34) hide show
  1. package/.turbo/turbo-build.log +13 -13
  2. package/CHANGELOG.md +13 -0
  3. package/addresses/7777777.json +3 -3
  4. package/addresses/999.json +6 -6
  5. package/dist/index.cjs +76 -71
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.js +76 -68
  8. package/dist/index.js.map +1 -1
  9. package/dist/package/batchPublish.test.d.ts +16 -16
  10. package/dist/package/wagmiGenerated.d.ts +312 -201
  11. package/dist/package/wagmiGenerated.d.ts.map +1 -1
  12. package/package/wagmiGenerated.ts +76 -105
  13. package/package.json +2 -3
  14. package/script/CalculateDeterministicParams.s.sol +3 -3
  15. package/script/DeployMintersAndImplementations.s.sol +3 -3
  16. package/script/DeployNew1155Impl.s.sol +25 -0
  17. package/script/DeployNewImplementation.s.sol +3 -3
  18. package/script/DeployPreminterImpl.s.sol +3 -3
  19. package/script/DeployProxiesToNewChain.s.sol +4 -4
  20. package/script/DeployUpgradeGate.s.sol +5 -5
  21. package/script/Simulate1155Upgrade.s.sol +37 -0
  22. package/script/Upgrade.s.sol +3 -3
  23. package/script/UpgradePreminter.s.sol +3 -3
  24. package/src/DeploymentConfig.sol +124 -0
  25. package/src/DeploymentTestingUtils.sol +56 -0
  26. package/src/DeterministicDeployerScript.sol +253 -0
  27. package/src/DeterministicProxyDeployer.sol +139 -0
  28. package/src/IImmutableCreate2Factory.sol +59 -0
  29. package/src/ZoraDeployerBase.sol +144 -0
  30. package/src/ZoraDeployerUtils.sol +199 -0
  31. package/test/NewFactoryProxyDeployer.t.sol +4 -4
  32. package/test/ZoraCreator1155Factory_Fork.t.sol +1 -3
  33. package/test/ZoraCreator1155PremintExecutorForkTest.t.sol +1 -1
  34. package/wagmi.config.ts +1 -7
@@ -10,14 +10,14 @@ $ wagmi generate
10
10
  ✔ Writing to package/wagmiGenerated.ts
11
11
  $ node script/bundle-chainConfigs.mjs && yarn prettier
12
12
  $ prettier --write 'package/**/*.ts' 'script/**/*.ts' 'wagmi.config.ts'
13
- package/batchPublish.test.ts 283ms
14
- package/chainConfigs.ts 15ms
15
- package/deployment.ts 14ms
13
+ package/batchPublish.test.ts 229ms
14
+ package/chainConfigs.ts 13ms
15
+ package/deployment.ts 13ms
16
16
  package/index.ts 3ms
17
- package/wagmiGenerated.ts 507ms
18
- script/copy-deployed-contracts.ts 53ms
19
- script/signDeploymentTransactions.ts 48ms
20
- wagmi.config.ts 18ms
17
+ package/wagmiGenerated.ts 357ms
18
+ script/copy-deployed-contracts.ts 40ms
19
+ script/signDeploymentTransactions.ts 38ms
20
+ wagmi.config.ts 12ms
21
21
  CLI Building entry: package/index.ts
22
22
  CLI Using tsconfig: tsconfig.json
23
23
  CLI tsup v7.2.0
@@ -26,9 +26,9 @@ wagmi.config.ts 18ms
26
26
  CLI Cleaning output folder
27
27
  CJS Build start
28
28
  ESM Build start
29
- CJS dist/index.cjs 94.77 KB
30
- CJS dist/index.cjs.map 186.52 KB
31
- CJS ⚡️ Build success in 35ms
32
- ESM dist/index.js 92.26 KB
33
- ESM dist/index.js.map 186.11 KB
34
- ESM ⚡️ Build success in 35ms
29
+ CJS dist/index.cjs 95.45 KB
30
+ CJS dist/index.cjs.map 184.87 KB
31
+ CJS ⚡️ Build success in 24ms
32
+ ESM dist/index.js 93.14 KB
33
+ ESM dist/index.js.map 184.47 KB
34
+ ESM ⚡️ Build success in 24ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @zoralabs/premint-sdk
2
2
 
3
+ ## 0.0.5-prerelease.0
4
+
5
+ ### Patch Changes
6
+
7
+ - a50ae1c: \* Moved deployment related code from 1155 to protocol-deployments package
8
+ - Deployed 2.4.0 to zora-goerli (testnet)
9
+
10
+ ## 0.0.4
11
+
12
+ ### Patch Changes
13
+
14
+ - 6cfb6f9: Add Zora mainnet 1155 v2.3.1 deploy
15
+
3
16
  ## 0.0.3
4
17
 
5
18
  ### Patch Changes
@@ -1,8 +1,8 @@
1
1
  {
2
- "CONTRACT_1155_IMPL": "0xF62b0d56BA617F803DF1C464C519FF7D29451B2f",
3
- "CONTRACT_1155_IMPL_VERSION": "2.3.0",
2
+ "CONTRACT_1155_IMPL": "0xa1F45f5B50e16E79366867E91fE45c181D18Cb67",
3
+ "CONTRACT_1155_IMPL_VERSION": "2.3.1",
4
4
  "UPGRADE_GATE": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
5
- "FACTORY_IMPL": "0x2810D376AC3b80C443ddD3F4e84E036F2e90622A",
5
+ "FACTORY_IMPL": "0x2D6d587e9B09fa01405A5816938554ccdeEf69db",
6
6
  "FACTORY_PROXY": "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
7
7
  "FIXED_PRICE_SALE_STRATEGY": "0x04E2516A2c207E84a1839755675dfd8eF6302F0a",
8
8
  "MERKLE_MINT_SALE_STRATEGY": "0xf48172CA3B6068B20eE4917Eb27b5472f1f272C7",
@@ -1,14 +1,14 @@
1
1
  {
2
- "CONTRACT_1155_IMPL": "0x26C2835dd7F048B7140906fA50E77ea8f8186Bbc",
3
- "CONTRACT_1155_IMPL_VERSION": "2.3.0",
4
- "UPGRADE_GATE": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
5
- "FACTORY_IMPL": "0x9a42d0786c17e231E0409E8441C99acf4678763d",
2
+ "CONTRACT_1155_IMPL": "0xcD7230AFfBC8C720aE607e0Bc386fbCAF5C34C2E",
3
+ "CONTRACT_1155_IMPL_VERSION": "2.4.0",
4
+ "FACTORY_IMPL": "0x869Be2EaE4AB30Cf319a46B5dE50Ac203c8784Aa",
6
5
  "FACTORY_PROXY": "0x777777C338d93e2C7adf08D102d45CA7CC4Ed021",
7
6
  "FIXED_PRICE_SALE_STRATEGY": "0x04E2516A2c207E84a1839755675dfd8eF6302F0a",
8
7
  "MERKLE_MINT_SALE_STRATEGY": "0xf48172CA3B6068B20eE4917Eb27b5472f1f272C7",
9
8
  "PREMINTER_IMPL": "0x6E2AbBcd82935bFC68A1d5d2c96372b13b65eD9C",
10
9
  "PREMINTER_PROXY": "0x7777773606e7e46C8Ba8B98C08f5cD218e31d340",
11
10
  "REDEEM_MINTER_FACTORY": "0x78964965cF77850224513a367f899435C5B69174",
12
- "timestamp": 1696017248,
13
- "commit": "7a0ae52"
11
+ "UPGRADE_GATE": "0xbC50029836A59A4E5e1Bb8988272F46ebA0F9900",
12
+ "timestamp": 1699570171,
13
+ "commit": "385e4932"
14
14
  }
package/dist/index.cjs CHANGED
@@ -21,9 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var package_exports = {};
22
22
  __export(package_exports, {
23
23
  chainConfigs: () => chainConfigs,
24
- iImmutableCreate2FactoryABI: () => iImmutableCreate2FactoryABI,
25
- iImmutableCreate2FactoryAddress: () => iImmutableCreate2FactoryAddress,
26
- iImmutableCreate2FactoryConfig: () => iImmutableCreate2FactoryConfig,
27
24
  zoraCreator1155FactoryImplABI: () => zoraCreator1155FactoryImplABI,
28
25
  zoraCreator1155FactoryImplAddress: () => zoraCreator1155FactoryImplAddress,
29
26
  zoraCreator1155FactoryImplConfig: () => zoraCreator1155FactoryImplConfig,
@@ -44,71 +41,6 @@ __export(package_exports, {
44
41
  module.exports = __toCommonJS(package_exports);
45
42
 
46
43
  // package/wagmiGenerated.ts
47
- var iImmutableCreate2FactoryABI = [
48
- {
49
- stateMutability: "view",
50
- type: "function",
51
- inputs: [
52
- { name: "salt", internalType: "bytes32", type: "bytes32" },
53
- { name: "initCode", internalType: "bytes", type: "bytes" }
54
- ],
55
- name: "findCreate2Address",
56
- outputs: [
57
- { name: "deploymentAddress", internalType: "address", type: "address" }
58
- ]
59
- },
60
- {
61
- stateMutability: "view",
62
- type: "function",
63
- inputs: [
64
- { name: "salt", internalType: "bytes32", type: "bytes32" },
65
- { name: "initCodeHash", internalType: "bytes32", type: "bytes32" }
66
- ],
67
- name: "findCreate2AddressViaHash",
68
- outputs: [
69
- { name: "deploymentAddress", internalType: "address", type: "address" }
70
- ]
71
- },
72
- {
73
- stateMutability: "view",
74
- type: "function",
75
- inputs: [
76
- { name: "deploymentAddress", internalType: "address", type: "address" }
77
- ],
78
- name: "hasBeenDeployed",
79
- outputs: [{ name: "", internalType: "bool", type: "bool" }]
80
- },
81
- {
82
- stateMutability: "payable",
83
- type: "function",
84
- inputs: [
85
- { name: "salt", internalType: "bytes32", type: "bytes32" },
86
- { name: "initializationCode", internalType: "bytes", type: "bytes" }
87
- ],
88
- name: "safeCreate2",
89
- outputs: [
90
- { name: "deploymentAddress", internalType: "address", type: "address" }
91
- ]
92
- }
93
- ];
94
- var iImmutableCreate2FactoryAddress = {
95
- 1: "0x0000000000FFe8B47B3e2130213B802212439497",
96
- 5: "0x0000000000FFe8B47B3e2130213B802212439497",
97
- 10: "0x0000000000FFe8B47B3e2130213B802212439497",
98
- 420: "0x0000000000FFe8B47B3e2130213B802212439497",
99
- 424: "0x0000000000FFe8B47B3e2130213B802212439497",
100
- 999: "0x0000000000FFe8B47B3e2130213B802212439497",
101
- 8453: "0x0000000000FFe8B47B3e2130213B802212439497",
102
- 58008: "0x0000000000FFe8B47B3e2130213B802212439497",
103
- 84531: "0x0000000000FFe8B47B3e2130213B802212439497",
104
- 7777777: "0x0000000000FFe8B47B3e2130213B802212439497",
105
- 11155111: "0x0000000000FFe8B47B3e2130213B802212439497",
106
- 999999999: "0x0000000000FFe8B47B3e2130213B802212439497"
107
- };
108
- var iImmutableCreate2FactoryConfig = {
109
- address: iImmutableCreate2FactoryAddress,
110
- abi: iImmutableCreate2FactoryABI
111
- };
112
44
  var zoraCreator1155FactoryImplABI = [
113
45
  {
114
46
  stateMutability: "nonpayable",
@@ -627,6 +559,7 @@ var zoraCreator1155ImplABI = [
627
559
  name: "CallFailed"
628
560
  },
629
561
  { type: "error", inputs: [], name: "Call_TokenIdMismatch" },
562
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
630
563
  {
631
564
  type: "error",
632
565
  inputs: [
@@ -725,12 +658,23 @@ var zoraCreator1155ImplABI = [
725
658
  },
726
659
  { type: "error", inputs: [], name: "INVALID_ADDRESS_ZERO" },
727
660
  { type: "error", inputs: [], name: "INVALID_ETH_AMOUNT" },
661
+ {
662
+ type: "error",
663
+ inputs: [
664
+ { name: "mintTo", internalType: "address", type: "address" },
665
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
666
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" }
667
+ ],
668
+ name: "InvalidMerkleProof"
669
+ },
728
670
  { type: "error", inputs: [], name: "InvalidMintSchedule" },
729
671
  { type: "error", inputs: [], name: "MintNotYetStarted" },
730
672
  { type: "error", inputs: [], name: "Mint_InsolventSaleTransfer" },
731
673
  { type: "error", inputs: [], name: "Mint_TokenIDMintNotAllowed" },
732
674
  { type: "error", inputs: [], name: "Mint_UnknownCommand" },
733
675
  { type: "error", inputs: [], name: "Mint_ValueTransferFail" },
676
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
677
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
734
678
  { type: "error", inputs: [], name: "NewOwnerNeedsToBeAdmin" },
735
679
  {
736
680
  type: "error",
@@ -754,6 +698,8 @@ var zoraCreator1155ImplABI = [
754
698
  name: "RendererNotValid"
755
699
  },
756
700
  { type: "error", inputs: [], name: "Renderer_NotValidRendererContract" },
701
+ { type: "error", inputs: [], name: "SaleEnded" },
702
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
757
703
  {
758
704
  type: "error",
759
705
  inputs: [
@@ -774,6 +720,15 @@ var zoraCreator1155ImplABI = [
774
720
  inputs: [],
775
721
  name: "UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL"
776
722
  },
723
+ {
724
+ type: "error",
725
+ inputs: [
726
+ { name: "user", internalType: "address", type: "address" },
727
+ { name: "limit", internalType: "uint256", type: "uint256" },
728
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
729
+ ],
730
+ name: "UserExceedsMintLimit"
731
+ },
777
732
  {
778
733
  type: "error",
779
734
  inputs: [
@@ -783,6 +738,7 @@ var zoraCreator1155ImplABI = [
783
738
  ],
784
739
  name: "UserMissingRoleForToken"
785
740
  },
741
+ { type: "error", inputs: [], name: "WrongValueSent" },
786
742
  {
787
743
  type: "event",
788
744
  anonymous: false,
@@ -2029,6 +1985,7 @@ var zoraCreator1155PremintExecutorImplABI = [
2029
1985
  name: "CallFailed"
2030
1986
  },
2031
1987
  { type: "error", inputs: [], name: "Call_TokenIdMismatch" },
1988
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
2032
1989
  {
2033
1990
  type: "error",
2034
1991
  inputs: [
@@ -2085,11 +2042,23 @@ var zoraCreator1155PremintExecutorImplABI = [
2085
2042
  inputs: [],
2086
2043
  name: "INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING"
2087
2044
  },
2045
+ {
2046
+ type: "error",
2047
+ inputs: [
2048
+ { name: "mintTo", internalType: "address", type: "address" },
2049
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
2050
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" }
2051
+ ],
2052
+ name: "InvalidMerkleProof"
2053
+ },
2054
+ { type: "error", inputs: [], name: "InvalidMintSchedule" },
2088
2055
  { type: "error", inputs: [], name: "MintNotYetStarted" },
2089
2056
  { type: "error", inputs: [], name: "Mint_InsolventSaleTransfer" },
2090
2057
  { type: "error", inputs: [], name: "Mint_TokenIDMintNotAllowed" },
2091
2058
  { type: "error", inputs: [], name: "Mint_UnknownCommand" },
2092
2059
  { type: "error", inputs: [], name: "Mint_ValueTransferFail" },
2060
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
2061
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
2093
2062
  { type: "error", inputs: [], name: "NewOwnerNeedsToBeAdmin" },
2094
2063
  { type: "error", inputs: [], name: "ONLY_OWNER" },
2095
2064
  { type: "error", inputs: [], name: "ONLY_PENDING_OWNER" },
@@ -2105,6 +2074,8 @@ var zoraCreator1155PremintExecutorImplABI = [
2105
2074
  name: "ProtocolRewardsWithdrawFailed"
2106
2075
  },
2107
2076
  { type: "error", inputs: [], name: "Renderer_NotValidRendererContract" },
2077
+ { type: "error", inputs: [], name: "SaleEnded" },
2078
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
2108
2079
  {
2109
2080
  type: "error",
2110
2081
  inputs: [
@@ -2133,6 +2104,15 @@ var zoraCreator1155PremintExecutorImplABI = [
2133
2104
  ],
2134
2105
  name: "UpgradeToMismatchedContractName"
2135
2106
  },
2107
+ {
2108
+ type: "error",
2109
+ inputs: [
2110
+ { name: "user", internalType: "address", type: "address" },
2111
+ { name: "limit", internalType: "uint256", type: "uint256" },
2112
+ { name: "requestedAmount", internalType: "uint256", type: "uint256" }
2113
+ ],
2114
+ name: "UserExceedsMintLimit"
2115
+ },
2136
2116
  {
2137
2117
  type: "error",
2138
2118
  inputs: [
@@ -2142,6 +2122,7 @@ var zoraCreator1155PremintExecutorImplABI = [
2142
2122
  ],
2143
2123
  name: "UserMissingRoleForToken"
2144
2124
  },
2125
+ { type: "error", inputs: [], name: "WrongValueSent" },
2145
2126
  {
2146
2127
  type: "event",
2147
2128
  anonymous: false,
@@ -2670,6 +2651,18 @@ var zoraCreator1155PremintExecutorImplConfig = {
2670
2651
  abi: zoraCreator1155PremintExecutorImplABI
2671
2652
  };
2672
2653
  var zoraCreatorFixedPriceSaleStrategyABI = [
2654
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
2655
+ {
2656
+ type: "error",
2657
+ inputs: [
2658
+ { name: "mintTo", internalType: "address", type: "address" },
2659
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
2660
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" }
2661
+ ],
2662
+ name: "InvalidMerkleProof"
2663
+ },
2664
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
2665
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
2673
2666
  { type: "error", inputs: [], name: "SaleEnded" },
2674
2667
  { type: "error", inputs: [], name: "SaleHasNotStarted" },
2675
2668
  {
@@ -2908,6 +2901,7 @@ var zoraCreatorFixedPriceSaleStrategyConfig = {
2908
2901
  abi: zoraCreatorFixedPriceSaleStrategyABI
2909
2902
  };
2910
2903
  var zoraCreatorMerkleMinterStrategyABI = [
2904
+ { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
2911
2905
  {
2912
2906
  type: "error",
2913
2907
  inputs: [
@@ -2918,6 +2912,8 @@ var zoraCreatorMerkleMinterStrategyABI = [
2918
2912
  name: "InvalidMerkleProof"
2919
2913
  },
2920
2914
  { type: "error", inputs: [], name: "MerkleClaimsExceeded" },
2915
+ { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
2916
+ { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
2921
2917
  { type: "error", inputs: [], name: "SaleEnded" },
2922
2918
  { type: "error", inputs: [], name: "SaleHasNotStarted" },
2923
2919
  {
@@ -3121,8 +3117,20 @@ var zoraCreatorMerkleMinterStrategyConfig = {
3121
3117
  var zoraCreatorRedeemMinterFactoryABI = [
3122
3118
  { stateMutability: "nonpayable", type: "constructor", inputs: [] },
3123
3119
  { type: "error", inputs: [], name: "CallerNotZoraCreator1155" },
3120
+ {
3121
+ type: "error",
3122
+ inputs: [
3123
+ { name: "mintTo", internalType: "address", type: "address" },
3124
+ { name: "merkleProof", internalType: "bytes32[]", type: "bytes32[]" },
3125
+ { name: "merkleRoot", internalType: "bytes32", type: "bytes32" }
3126
+ ],
3127
+ name: "InvalidMerkleProof"
3128
+ },
3124
3129
  { type: "error", inputs: [], name: "MinterContractAlreadyExists" },
3125
3130
  { type: "error", inputs: [], name: "MinterContractDoesNotExist" },
3131
+ { type: "error", inputs: [], name: "SaleEnded" },
3132
+ { type: "error", inputs: [], name: "SaleHasNotStarted" },
3133
+ { type: "error", inputs: [], name: "WrongValueSent" },
3126
3134
  {
3127
3135
  type: "event",
3128
3136
  anonymous: false,
@@ -3337,9 +3345,6 @@ var chainConfigs = {
3337
3345
  // Annotate the CommonJS export names for ESM import in node:
3338
3346
  0 && (module.exports = {
3339
3347
  chainConfigs,
3340
- iImmutableCreate2FactoryABI,
3341
- iImmutableCreate2FactoryAddress,
3342
- iImmutableCreate2FactoryConfig,
3343
3348
  zoraCreator1155FactoryImplABI,
3344
3349
  zoraCreator1155FactoryImplAddress,
3345
3350
  zoraCreator1155FactoryImplConfig,