@zoralabs/protocol-deployments 0.1.8 → 0.1.9

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.
@@ -1,20 +1,10 @@
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
1
+ $ yarn bundle-configs && tsup
11
2
  $ tsx scripts/bundle-configs.ts && yarn prettier
12
- $ prettier --write 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'
13
- src/addresses.ts 243ms (unchanged)
14
- src/index.ts 6ms (unchanged)
3
+ $ prettier --write 'src/**/*.ts' 'scripts/*'
4
+ src/addresses.ts 213ms (unchanged)
5
+ src/index.ts 10ms (unchanged)
15
6
  scripts/bundle-chainConfigs.ts 19ms (unchanged)
16
7
  scripts/bundle-configs.ts 37ms (unchanged)
17
- wagmi.config.ts 61ms (unchanged)
18
8
  CLI Building entry: src/index.ts
19
9
  CLI Using tsconfig: tsconfig.json
20
10
  CLI tsup v7.3.0
@@ -25,7 +15,7 @@ wagmi.config.ts 61ms (unchanged)
25
15
  ESM Build start
26
16
  CJS dist/index.cjs 189.63 KB
27
17
  CJS dist/index.cjs.map 352.50 KB
28
- CJS ⚡️ Build success in 57ms
18
+ CJS ⚡️ Build success in 64ms
29
19
  ESM dist/index.js 186.61 KB
30
20
  ESM dist/index.js.map 351.98 KB
31
- ESM ⚡️ Build success in 61ms
21
+ ESM ⚡️ Build success in 64ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zoralabs/protocol-deployments
2
2
 
3
+ ## 0.1.9
4
+
5
+ ### Patch Changes
6
+
7
+ - f4641f4b: Removed dependencies from `zora-1155-contracts`, `1155-deployments`, `mints-contracts`, and `mints-deployments`
8
+
3
9
  ## 0.1.8
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoralabs/protocol-deployments",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,11 +16,10 @@
16
16
  }
17
17
  },
18
18
  "scripts": {
19
- "build": "yarn wagmi && yarn bundle-configs && tsup",
19
+ "build": "yarn bundle-configs && tsup",
20
20
  "bundle-configs": "tsx scripts/bundle-configs.ts && yarn prettier",
21
- "prettier": "prettier --write 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
22
- "lint": "prettier --check 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
23
- "wagmi": "wagmi generate"
21
+ "prettier": "prettier --write 'src/**/*.ts' 'scripts/*'",
22
+ "lint": "prettier --check 'src/**/*.ts' 'scripts/*'"
24
23
  },
25
24
  "dependencies": {},
26
25
  "devDependencies": {
@@ -30,12 +29,7 @@
30
29
  "tsup": "^7.2.0",
31
30
  "glob": "^10.2.2",
32
31
  "es-main": "^1.2.0",
33
- "@wagmi/cli": "^1.0.1",
34
32
  "@types/node": "^20.1.2",
35
- "@lavamoat/preinstall-always-fail": "2.0.0",
36
- "@zoralabs/1155-deployments": "*",
37
- "@zoralabs/zora-1155-contracts": "*",
38
- "@zoralabs/mints-contracts": "*",
39
- "@zoralabs/mints-deployments": "*"
33
+ "@lavamoat/preinstall-always-fail": "2.0.0"
40
34
  }
41
35
  }
package/wagmi.config.ts DELETED
@@ -1,189 +0,0 @@
1
- import { defineConfig } from "@wagmi/cli";
2
- import { Abi, zeroAddress } from "viem";
3
- import { readdirSync, readFileSync } from "fs";
4
- import * as abis from "@zoralabs/zora-1155-contracts";
5
- import {
6
- zoraMints1155ABI,
7
- zoraMintsManagerImplABI,
8
- mintsEthUnwrapperAndCallerABI,
9
- iUnwrapAndForwardActionABI,
10
- } from "@zoralabs/mints-contracts";
11
-
12
- type Address = `0x${string}`;
13
-
14
- type Addresses = {
15
- [contractName: string]: {
16
- address: {
17
- [chainId: number]: Address;
18
- };
19
- abi: Abi;
20
- };
21
- };
22
-
23
- const get1155Addresses = () => {
24
- const addresses: Addresses = {};
25
-
26
- const addressesFiles = readdirSync("../1155-deployments/addresses");
27
-
28
- const addAddress = ({
29
- contractName,
30
- chainId,
31
- address,
32
- abi,
33
- }: {
34
- contractName: string;
35
- chainId: number;
36
- address?: Address;
37
- abi: Abi;
38
- }) => {
39
- if (!address || address === zeroAddress) return;
40
- if (!addresses[contractName]) {
41
- addresses[contractName] = {
42
- address: {},
43
- abi,
44
- };
45
- }
46
-
47
- addresses[contractName]!.address[chainId] = address;
48
- };
49
-
50
- const protocolRewardsConfig = JSON.parse(
51
- readFileSync("../protocol-rewards/deterministicConfig.json", "utf-8"),
52
- ) as {
53
- expectedAddress: Address;
54
- };
55
-
56
- for (const addressesFile of addressesFiles) {
57
- const jsonAddress = JSON.parse(
58
- readFileSync(`../1155-deployments/addresses/${addressesFile}`, "utf-8"),
59
- ) as {
60
- FIXED_PRICE_SALE_STRATEGY: Address;
61
- MERKLE_MINT_SALE_STRATEGY: Address;
62
- REDEEM_MINTER_FACTORY: Address;
63
- "1155_IMPL": Address;
64
- FACTORY_IMPL: Address;
65
- FACTORY_PROXY: Address;
66
- PREMINTER_PROXY?: Address;
67
- ERC20_MINTER?: Address;
68
- };
69
-
70
- const chainId = parseInt(addressesFile.split(".")[0]);
71
-
72
- addAddress({
73
- contractName: "ZoraCreatorFixedPriceSaleStrategy",
74
- chainId,
75
- address: jsonAddress.FIXED_PRICE_SALE_STRATEGY,
76
- abi: abis.zoraCreatorFixedPriceSaleStrategyABI,
77
- });
78
- addAddress({
79
- contractName: "ZoraCreatorMerkleMinterStrategy",
80
- chainId,
81
- address: jsonAddress.MERKLE_MINT_SALE_STRATEGY,
82
- abi: abis.zoraCreatorMerkleMinterStrategyABI,
83
- });
84
- addAddress({
85
- contractName: "ZoraCreator1155FactoryImpl",
86
- chainId,
87
- address: jsonAddress.FACTORY_PROXY,
88
- abi: abis.zoraCreator1155FactoryImplABI,
89
- });
90
- addAddress({
91
- contractName: "ZoraCreatorRedeemMinterFactory",
92
- chainId,
93
- address: jsonAddress.REDEEM_MINTER_FACTORY,
94
- abi: abis.zoraCreatorRedeemMinterFactoryABI,
95
- });
96
- addAddress({
97
- contractName: "ZoraCreator1155PremintExecutorImpl",
98
- chainId,
99
- address: jsonAddress.PREMINTER_PROXY,
100
- abi: abis.zoraCreator1155PremintExecutorImplABI,
101
- });
102
- addAddress({
103
- contractName: "ProtocolRewards",
104
- chainId,
105
- address: protocolRewardsConfig.expectedAddress,
106
- abi: abis.protocolRewardsABI,
107
- });
108
- addAddress({
109
- contractName: "ERC20Minter",
110
- chainId,
111
- abi: abis.erc20MinterABI,
112
- address: jsonAddress.ERC20_MINTER,
113
- });
114
- }
115
-
116
- return addresses;
117
- };
118
-
119
- const getMintsAddresses = () => {
120
- const addressesFiles = readdirSync("../mints-deployments/addresses");
121
-
122
- const chainIds = addressesFiles.map((x) => Number(x.split(".")[0]));
123
-
124
- const mintsProxyConfig = JSON.parse(
125
- readFileSync(
126
- "../mints-deployments/deterministicConfig/mintsProxy/params.json",
127
- "utf-8",
128
- ),
129
- );
130
-
131
- const mintsEthUnwrapperAndCallerAddress = JSON.parse(
132
- readFileSync("../mints-deployments/addresses/999999999.json", "utf-8"),
133
- ).MINTS_ETH_UNWRAPPER_AND_CALLER as Address;
134
-
135
- const mintsManagerAddress = mintsProxyConfig.manager
136
- .deployedAddress as Address;
137
- const zoraMints1155Address = mintsProxyConfig.mints1155
138
- .deployedAddress as Address;
139
-
140
- return {
141
- mintsManager: Object.fromEntries(
142
- chainIds.map((chainId) => [chainId, mintsManagerAddress]),
143
- ),
144
- mints1155: Object.fromEntries(
145
- chainIds.map((chainId) => [chainId, zoraMints1155Address as Address]),
146
- ),
147
- mintsEthUnwrapperAndCaller: Object.fromEntries(
148
- chainIds.map((chainId) => [chainId, mintsEthUnwrapperAndCallerAddress]),
149
- ),
150
- };
151
- };
152
-
153
- const mintsAddresses = getMintsAddresses();
154
-
155
- export default defineConfig({
156
- out: "src/generated/wagmi.ts",
157
- contracts: [
158
- ...Object.entries(get1155Addresses()).map(
159
- ([contractName, addressConfig]) => ({
160
- abi: addressConfig.abi,
161
- address: addressConfig.address,
162
- name: contractName,
163
- }),
164
- ),
165
- {
166
- abi: abis.zoraCreator1155ImplABI,
167
- name: "ZoraCreator1155Impl",
168
- },
169
- {
170
- abi: zoraMintsManagerImplABI,
171
- name: "ZoraMintsManagerImpl",
172
- address: mintsAddresses.mintsManager,
173
- },
174
- {
175
- abi: zoraMints1155ABI,
176
- name: "ZoraMints1155",
177
- address: mintsAddresses.mints1155,
178
- },
179
- {
180
- abi: mintsEthUnwrapperAndCallerABI,
181
- name: "MintsEthUnwrapperAndCaller",
182
- address: mintsAddresses.mintsEthUnwrapperAndCaller,
183
- },
184
- {
185
- abi: iUnwrapAndForwardActionABI,
186
- name: "IUnwrapAndForwardAction",
187
- },
188
- ],
189
- });