@zoralabs/protocol-deployments 0.1.3-MINT.1 → 0.1.3-MINT.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/protocol-deployments",
3
- "version": "0.1.3-MINT.1",
3
+ "version": "0.1.3-MINT.3",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -22,12 +22,7 @@
22
22
  "lint": "prettier --check 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
23
23
  "wagmi": "wagmi generate"
24
24
  },
25
- "dependencies": {
26
- "@zoralabs/mints-contracts": "0.1.0-MINT.0",
27
- "@zoralabs/mints-deployments": "0.0.1-MINT.0",
28
- "@zoralabs/1155-deployments": "0.0.3-MINT.1",
29
- "@zoralabs/zora-1155-contracts": "2.8.0-MINT.1"
30
- },
25
+ "dependencies": {},
31
26
  "devDependencies": {
32
27
  "zoralabs-tsconfig": "*",
33
28
  "typescript": "^5.2.2",
@@ -37,6 +32,10 @@
37
32
  "es-main": "^1.2.0",
38
33
  "@wagmi/cli": "^1.0.1",
39
34
  "@types/node": "^20.1.2",
40
- "@lavamoat/preinstall-always-fail": "2.0.0"
35
+ "@lavamoat/preinstall-always-fail": "2.0.0",
36
+ "@zoralabs/mints-contracts": "*",
37
+ "@zoralabs/mints-deployments": "*",
38
+ "@zoralabs/1155-deployments": "*",
39
+ "@zoralabs/zora-1155-contracts": "*"
41
40
  }
42
41
  }
@@ -540,7 +540,6 @@ export const zoraCreator1155ImplABI = [
540
540
  { name: '_mintFeeRecipient', internalType: 'address', type: 'address' },
541
541
  { name: '_upgradeGate', internalType: 'address', type: 'address' },
542
542
  { name: '_protocolRewards', internalType: 'address', type: 'address' },
543
- { name: '_mints', internalType: 'address', type: 'address' },
544
543
  ],
545
544
  },
546
545
  { stateMutability: 'payable', type: 'receive' },
@@ -689,12 +688,12 @@ export const zoraCreator1155ImplABI = [
689
688
  {
690
689
  stateMutability: 'pure',
691
690
  type: 'function',
692
- inputs: [{ name: 'totalReward', internalType: 'uint256', type: 'uint256' }],
691
+ inputs: [{ name: 'numTokens', internalType: 'uint256', type: 'uint256' }],
693
692
  name: 'computeFreeMintRewards',
694
693
  outputs: [
695
694
  {
696
695
  name: '',
697
- internalType: 'struct IRewardSplits.RewardsSettings',
696
+ internalType: 'struct RewardsSettings',
698
697
  type: 'tuple',
699
698
  components: [
700
699
  { name: 'creatorReward', internalType: 'uint256', type: 'uint256' },
@@ -721,12 +720,12 @@ export const zoraCreator1155ImplABI = [
721
720
  {
722
721
  stateMutability: 'pure',
723
722
  type: 'function',
724
- inputs: [{ name: 'totalReward', internalType: 'uint256', type: 'uint256' }],
723
+ inputs: [{ name: 'numTokens', internalType: 'uint256', type: 'uint256' }],
725
724
  name: 'computePaidMintRewards',
726
725
  outputs: [
727
726
  {
728
727
  name: '',
729
- internalType: 'struct IRewardSplits.RewardsSettings',
728
+ internalType: 'struct RewardsSettings',
730
729
  type: 'tuple',
731
730
  components: [
732
731
  { name: 'creatorReward', internalType: 'uint256', type: 'uint256' },
@@ -753,20 +752,7 @@ export const zoraCreator1155ImplABI = [
753
752
  {
754
753
  stateMutability: 'pure',
755
754
  type: 'function',
756
- inputs: [
757
- { name: 'totalReward', internalType: 'uint256', type: 'uint256' },
758
- { name: 'rewardPct', internalType: 'uint256', type: 'uint256' },
759
- ],
760
- name: 'computeRewardsPct',
761
- outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
762
- },
763
- {
764
- stateMutability: 'pure',
765
- type: 'function',
766
- inputs: [
767
- { name: 'mintPrice', internalType: 'uint256', type: 'uint256' },
768
- { name: 'quantity', internalType: 'uint256', type: 'uint256' },
769
- ],
755
+ inputs: [{ name: 'numTokens', internalType: 'uint256', type: 'uint256' }],
770
756
  name: 'computeTotalReward',
771
757
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
772
758
  },
@@ -1004,32 +990,12 @@ export const zoraCreator1155ImplABI = [
1004
990
  outputs: [],
1005
991
  },
1006
992
  {
1007
- stateMutability: 'view',
993
+ stateMutability: 'pure',
1008
994
  type: 'function',
1009
995
  inputs: [],
1010
996
  name: 'mintFee',
1011
997
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1012
998
  },
1013
- {
1014
- stateMutability: 'payable',
1015
- type: 'function',
1016
- inputs: [
1017
- { name: 'mintTokenIds', internalType: 'uint256[]', type: 'uint256[]' },
1018
- { name: 'quantities', internalType: 'uint256[]', type: 'uint256[]' },
1019
- { name: 'minter', internalType: 'contract IMinter1155', type: 'address' },
1020
- { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
1021
- {
1022
- name: 'rewardsRecipients',
1023
- internalType: 'address[]',
1024
- type: 'address[]',
1025
- },
1026
- { name: 'minterArguments', internalType: 'bytes', type: 'bytes' },
1027
- ],
1028
- name: 'mintWithMints',
1029
- outputs: [
1030
- { name: 'quantityMinted', internalType: 'uint256', type: 'uint256' },
1031
- ],
1032
- },
1033
999
  {
1034
1000
  stateMutability: 'payable',
1035
1001
  type: 'function',
@@ -1064,19 +1030,6 @@ export const zoraCreator1155ImplABI = [
1064
1030
  name: 'nextTokenId',
1065
1031
  outputs: [{ name: '', internalType: 'uint256', type: 'uint256' }],
1066
1032
  },
1067
- {
1068
- stateMutability: 'pure',
1069
- type: 'function',
1070
- inputs: [
1071
- { name: '', internalType: 'address', type: 'address' },
1072
- { name: '', internalType: 'address', type: 'address' },
1073
- { name: '', internalType: 'uint256', type: 'uint256' },
1074
- { name: '', internalType: 'uint256', type: 'uint256' },
1075
- { name: '', internalType: 'bytes', type: 'bytes' },
1076
- ],
1077
- name: 'onERC1155Received',
1078
- outputs: [{ name: '', internalType: 'bytes4', type: 'bytes4' }],
1079
- },
1080
1033
  {
1081
1034
  stateMutability: 'view',
1082
1035
  type: 'function',
@@ -1900,8 +1853,17 @@ export const zoraCreator1155ImplABI = [
1900
1853
  name: 'InvalidMerkleProof',
1901
1854
  },
1902
1855
  { type: 'error', inputs: [], name: 'InvalidMintSchedule' },
1903
- { type: 'error', inputs: [], name: 'InvalidMintSchedule' },
1904
- { type: 'error', inputs: [], name: 'InvalidSignature' },
1856
+ {
1857
+ type: 'error',
1858
+ inputs: [
1859
+ {
1860
+ name: 'recoverError',
1861
+ internalType: 'enum ECDSAUpgradeable.RecoverError',
1862
+ type: 'uint8',
1863
+ },
1864
+ ],
1865
+ name: 'InvalidSignature',
1866
+ },
1905
1867
  { type: 'error', inputs: [], name: 'InvalidSignatureVersion' },
1906
1868
  {
1907
1869
  type: 'error',
@@ -1910,7 +1872,6 @@ export const zoraCreator1155ImplABI = [
1910
1872
  },
1911
1873
  { type: 'error', inputs: [], name: 'MintNotYetStarted' },
1912
1874
  { type: 'error', inputs: [], name: 'Mint_InsolventSaleTransfer' },
1913
- { type: 'error', inputs: [], name: 'Mint_InvalidMintArrayLength' },
1914
1875
  { type: 'error', inputs: [], name: 'Mint_TokenIDMintNotAllowed' },
1915
1876
  { type: 'error', inputs: [], name: 'Mint_UnknownCommand' },
1916
1877
  { type: 'error', inputs: [], name: 'Mint_ValueTransferFail' },
@@ -2248,7 +2209,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2248
2209
  { name: 'quantityToMint', internalType: 'uint256', type: 'uint256' },
2249
2210
  {
2250
2211
  name: 'mintArguments',
2251
- internalType: 'struct MintArguments',
2212
+ internalType: 'struct IZoraCreator1155PremintExecutor.MintArguments',
2252
2213
  type: 'tuple',
2253
2214
  components: [
2254
2215
  { name: 'mintRecipient', internalType: 'address', type: 'address' },
@@ -2265,7 +2226,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2265
2226
  outputs: [
2266
2227
  {
2267
2228
  name: 'result',
2268
- internalType: 'struct PremintResult',
2229
+ internalType: 'struct IZoraCreator1155PremintExecutor.PremintResult',
2269
2230
  type: 'tuple',
2270
2231
  components: [
2271
2232
  { name: 'contractAddress', internalType: 'address', type: 'address' },
@@ -2336,7 +2297,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2336
2297
  { name: 'quantityToMint', internalType: 'uint256', type: 'uint256' },
2337
2298
  {
2338
2299
  name: 'mintArguments',
2339
- internalType: 'struct MintArguments',
2300
+ internalType: 'struct IZoraCreator1155PremintExecutor.MintArguments',
2340
2301
  type: 'tuple',
2341
2302
  components: [
2342
2303
  { name: 'mintRecipient', internalType: 'address', type: 'address' },
@@ -2353,7 +2314,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2353
2314
  outputs: [
2354
2315
  {
2355
2316
  name: 'result',
2356
- internalType: 'struct PremintResult',
2317
+ internalType: 'struct IZoraCreator1155PremintExecutor.PremintResult',
2357
2318
  type: 'tuple',
2358
2319
  components: [
2359
2320
  { name: 'contractAddress', internalType: 'address', type: 'address' },
@@ -2424,7 +2385,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2424
2385
  { name: 'quantityToMint', internalType: 'uint256', type: 'uint256' },
2425
2386
  {
2426
2387
  name: 'mintArguments',
2427
- internalType: 'struct MintArguments',
2388
+ internalType: 'struct IZoraCreator1155PremintExecutor.MintArguments',
2428
2389
  type: 'tuple',
2429
2390
  components: [
2430
2391
  { name: 'mintRecipient', internalType: 'address', type: 'address' },
@@ -2442,78 +2403,7 @@ export const zoraCreator1155PremintExecutorImplABI = [
2442
2403
  outputs: [
2443
2404
  {
2444
2405
  name: 'result',
2445
- internalType: 'struct PremintResult',
2446
- type: 'tuple',
2447
- components: [
2448
- { name: 'contractAddress', internalType: 'address', type: 'address' },
2449
- { name: 'tokenId', internalType: 'uint256', type: 'uint256' },
2450
- { name: 'createdNewContract', internalType: 'bool', type: 'bool' },
2451
- ],
2452
- },
2453
- ],
2454
- },
2455
- {
2456
- stateMutability: 'payable',
2457
- type: 'function',
2458
- inputs: [
2459
- { name: 'mintTokenIds', internalType: 'uint256[]', type: 'uint256[]' },
2460
- {
2461
- name: 'mintTokenIdQuantities',
2462
- internalType: 'uint256[]',
2463
- type: 'uint256[]',
2464
- },
2465
- {
2466
- name: 'contractConfig',
2467
- internalType: 'struct ContractCreationConfig',
2468
- type: 'tuple',
2469
- components: [
2470
- { name: 'contractAdmin', internalType: 'address', type: 'address' },
2471
- { name: 'contractURI', internalType: 'string', type: 'string' },
2472
- { name: 'contractName', internalType: 'string', type: 'string' },
2473
- ],
2474
- },
2475
- {
2476
- name: 'encodedPremintConfig',
2477
- internalType: 'struct EncodedPremintConfig',
2478
- type: 'tuple',
2479
- components: [
2480
- { name: 'premintConfig', internalType: 'bytes', type: 'bytes' },
2481
- {
2482
- name: 'premintConfigVersion',
2483
- internalType: 'bytes32',
2484
- type: 'bytes32',
2485
- },
2486
- { name: 'uid', internalType: 'uint32', type: 'uint32' },
2487
- {
2488
- name: 'fixedPriceMinter',
2489
- internalType: 'address',
2490
- type: 'address',
2491
- },
2492
- ],
2493
- },
2494
- { name: 'signature', internalType: 'bytes', type: 'bytes' },
2495
- {
2496
- name: 'mintArguments',
2497
- internalType: 'struct MintArguments',
2498
- type: 'tuple',
2499
- components: [
2500
- { name: 'mintRecipient', internalType: 'address', type: 'address' },
2501
- { name: 'mintComment', internalType: 'string', type: 'string' },
2502
- {
2503
- name: 'mintRewardsRecipients',
2504
- internalType: 'address[]',
2505
- type: 'address[]',
2506
- },
2507
- ],
2508
- },
2509
- { name: 'minter', internalType: 'address', type: 'address' },
2510
- { name: 'signerContract', internalType: 'address', type: 'address' },
2511
- ],
2512
- name: 'premintWithMints',
2513
- outputs: [
2514
- {
2515
- name: 'result',
2516
- internalType: 'struct PremintResult',
2406
+ internalType: 'struct IZoraCreator1155PremintExecutor.PremintResult',
2517
2407
  type: 'tuple',
2518
2408
  components: [
2519
2409
  { name: 'contractAddress', internalType: 'address', type: 'address' },
@@ -2911,7 +2801,17 @@ export const zoraCreator1155PremintExecutorImplABI = [
2911
2801
  name: 'InvalidMerkleProof',
2912
2802
  },
2913
2803
  { type: 'error', inputs: [], name: 'InvalidMintSchedule' },
2914
- { type: 'error', inputs: [], name: 'InvalidSignature' },
2804
+ {
2805
+ type: 'error',
2806
+ inputs: [
2807
+ {
2808
+ name: 'recoverError',
2809
+ internalType: 'enum ECDSAUpgradeable.RecoverError',
2810
+ type: 'uint8',
2811
+ },
2812
+ ],
2813
+ name: 'InvalidSignature',
2814
+ },
2915
2815
  { type: 'error', inputs: [], name: 'InvalidSignatureVersion' },
2916
2816
  {
2917
2817
  type: 'error',
@@ -2920,7 +2820,6 @@ export const zoraCreator1155PremintExecutorImplABI = [
2920
2820
  },
2921
2821
  { type: 'error', inputs: [], name: 'MintNotYetStarted' },
2922
2822
  { type: 'error', inputs: [], name: 'Mint_InsolventSaleTransfer' },
2923
- { type: 'error', inputs: [], name: 'Mint_InvalidMintArrayLength' },
2924
2823
  { type: 'error', inputs: [], name: 'Mint_TokenIDMintNotAllowed' },
2925
2824
  { type: 'error', inputs: [], name: 'Mint_UnknownCommand' },
2926
2825
  { type: 'error', inputs: [], name: 'Mint_ValueTransferFail' },
@@ -1,31 +0,0 @@
1
- $ yarn wagmi && yarn bundle-configs && tsup
2
- $ wagmi generate
3
- - Validating plugins
4
- ✔ Validating plugins
5
- - Resolving contracts
6
- ✔ Resolving contracts
7
- - Running plugins
8
- ✔ Running plugins
9
- - Writing to src/generated/wagmi.ts
10
- ✔ Writing to src/generated/wagmi.ts
11
- $ tsx scripts/bundle-configs.ts && yarn prettier
12
- $ prettier --write 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'
13
- src/addresses.ts 274ms (unchanged)
14
- src/index.ts 8ms (unchanged)
15
- scripts/bundle-chainConfigs.ts 22ms (unchanged)
16
- scripts/bundle-configs.ts 29ms (unchanged)
17
- wagmi.config.ts 33ms (unchanged)
18
- CLI Building entry: src/index.ts
19
- CLI Using tsconfig: tsconfig.json
20
- CLI tsup v7.3.0
21
- CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-deployments/tsup.config.ts
22
- CLI Target: es2021
23
- CLI Cleaning output folder
24
- CJS Build start
25
- ESM Build start
26
- CJS dist/index.cjs 138.28 KB
27
- CJS dist/index.cjs.map 252.11 KB
28
- CJS ⚡️ Build success in 50ms
29
- ESM dist/index.js 136.02 KB
30
- ESM dist/index.js.map 251.65 KB
31
- ESM ⚡️ Build success in 50ms
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "zoralabs-tsconfig/tsconfig.json",
3
- "compilerOptions": {
4
- "lib": ["es2021", "DOM"],
5
- "baseUrl": ".",
6
- "outDir": "dist"
7
- },
8
- "exclude": ["node_modules/**", "dist/**"],
9
- "include": ["src/**/*.ts"]
10
- }
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from "tsup";
2
-
3
- export default defineConfig({
4
- entry: ["src/index.ts"],
5
- sourcemap: true,
6
- clean: true,
7
- dts: false,
8
- format: ["cjs", "esm"],
9
- onSuccess:
10
- "tsc --project tsconfig.build.json --emitDeclarationOnly --declaration --declarationMap",
11
- });
package/wagmi.config.ts DELETED
@@ -1,135 +0,0 @@
1
- import { defineConfig } from "@wagmi/cli";
2
- import { Abi } from "viem";
3
- import { readdirSync, readFileSync } from "fs";
4
- import * as abis from "@zoralabs/zora-1155-contracts";
5
- import { zoraMintsImplABI } from "@zoralabs/mints-contracts";
6
-
7
- type Address = `0x${string}`;
8
-
9
- type Addresses = {
10
- [contractName: string]: {
11
- address: {
12
- [chainId: number]: Address;
13
- };
14
- abi: Abi;
15
- };
16
- };
17
-
18
- const get1155Addresses = () => {
19
- const addresses: Addresses = {};
20
-
21
- const addressesFiles = readdirSync("../1155-deployments/addresses");
22
-
23
- const addAddress = ({
24
- contractName,
25
- chainId,
26
- address,
27
- abi,
28
- }: {
29
- contractName: string;
30
- chainId: number;
31
- address?: Address;
32
- abi: Abi;
33
- }) => {
34
- if (!address) return;
35
- if (!addresses[contractName]) {
36
- addresses[contractName] = {
37
- address: {},
38
- abi,
39
- };
40
- }
41
-
42
- addresses[contractName]!.address[chainId] = address;
43
- };
44
-
45
- for (const addressesFile of addressesFiles) {
46
- const jsonAddress = JSON.parse(
47
- readFileSync(`../1155-deployments/addresses/${addressesFile}`, "utf-8"),
48
- ) as {
49
- FIXED_PRICE_SALE_STRATEGY: Address;
50
- MERKLE_MINT_SALE_STRATEGY: Address;
51
- REDEEM_MINTER_FACTORY: Address;
52
- "1155_IMPL": Address;
53
- FACTORY_IMPL: Address;
54
- FACTORY_PROXY: Address;
55
- PREMINTER_PROXY?: Address;
56
- };
57
-
58
- const chainId = parseInt(addressesFile.split(".")[0]);
59
-
60
- addAddress({
61
- contractName: "ZoraCreatorFixedPriceSaleStrategy",
62
- chainId,
63
- address: jsonAddress.FIXED_PRICE_SALE_STRATEGY,
64
- abi: abis.zoraCreatorFixedPriceSaleStrategyABI,
65
- });
66
- addAddress({
67
- contractName: "ZoraCreatorMerkleMinterStrategy",
68
- chainId,
69
- address: jsonAddress.MERKLE_MINT_SALE_STRATEGY,
70
- abi: abis.zoraCreatorMerkleMinterStrategyABI,
71
- });
72
- addAddress({
73
- contractName: "ZoraCreator1155FactoryImpl",
74
- chainId,
75
- address: jsonAddress.FACTORY_PROXY,
76
- abi: abis.zoraCreator1155FactoryImplABI,
77
- });
78
- addAddress({
79
- contractName: "ZoraCreatorRedeemMinterFactory",
80
- chainId,
81
- address: jsonAddress.REDEEM_MINTER_FACTORY,
82
- abi: abis.zoraCreatorRedeemMinterFactoryABI,
83
- });
84
- addAddress({
85
- contractName: "ZoraCreator1155PremintExecutorImpl",
86
- chainId,
87
- address: jsonAddress.PREMINTER_PROXY,
88
- abi: abis.zoraCreator1155PremintExecutorImplABI,
89
- });
90
- }
91
-
92
- return addresses;
93
- };
94
-
95
- const getMintsAddresses = () => {
96
- const addressesFiles = readdirSync("../mints-deployments/addresses");
97
-
98
- const chainIds = addressesFiles.map((x) => Number(x.split(".")[0]));
99
-
100
- const mintsProxyConfig = JSON.parse(
101
- readFileSync(
102
- "../mints-deployments/deterministicConfig/mintsProxy/params.json",
103
- "utf-8",
104
- ),
105
- );
106
-
107
- const mintsProxyAddress =
108
- mintsProxyConfig.expectedTransparentProxyAddress as Address;
109
-
110
- return Object.fromEntries(
111
- chainIds.map((chainId) => [chainId, mintsProxyAddress]),
112
- );
113
- };
114
-
115
- export default defineConfig({
116
- out: "src/generated/wagmi.ts",
117
- contracts: [
118
- ...Object.entries(get1155Addresses()).map(
119
- ([contractName, addressConfig]) => ({
120
- abi: addressConfig.abi,
121
- address: addressConfig.address,
122
- name: contractName,
123
- }),
124
- ),
125
- {
126
- abi: abis.zoraCreator1155ImplABI,
127
- name: "ZoraCreator1155Impl",
128
- },
129
- {
130
- abi: zoraMintsImplABI,
131
- name: "ZoraMintsImpl",
132
- address: getMintsAddresses(),
133
- },
134
- ],
135
- });