@zoralabs/protocol-deployments 0.1.4 → 0.1.5-DEV.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.
package/src/index.ts CHANGED
@@ -3,3 +3,4 @@
3
3
  // The can be generated by running `yarn prepack` in the root
4
4
  export * from "./generated/wagmi";
5
5
  export * as contracts1155 from "./generated/1155";
6
+ export * as mints from "./generated/mints";
@@ -1,29 +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/index.ts 200ms (unchanged)
14
- scripts/bundle-configs.ts 49ms (unchanged)
15
- wagmi.config.ts 34ms (unchanged)
16
- CLI Building entry: src/index.ts
17
- CLI Using tsconfig: tsconfig.json
18
- CLI tsup v7.3.0
19
- CLI Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-deployments/tsup.config.ts
20
- CLI Target: es2021
21
- CLI Cleaning output folder
22
- CJS Build start
23
- ESM Build start
24
- ESM dist/index.js 112.56 KB
25
- ESM dist/index.js.map 209.48 KB
26
- ESM ⚡️ Build success in 47ms
27
- CJS dist/index.cjs 114.67 KB
28
- CJS dist/index.cjs.map 209.87 KB
29
- CJS ⚡️ Build success in 48ms
@@ -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,107 +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
-
6
- type Address = `0x${string}`;
7
-
8
- type Addresses = {
9
- [contractName: string]: {
10
- address: {
11
- [chainId: number]: Address;
12
- };
13
- abi: Abi;
14
- };
15
- };
16
-
17
- const getAddresses = () => {
18
- const addresses: Addresses = {};
19
-
20
- const addressesFiles = readdirSync("../1155-deployments/addresses");
21
-
22
- const addAddress = ({
23
- contractName,
24
- chainId,
25
- address,
26
- abi,
27
- }: {
28
- contractName: string;
29
- chainId: number;
30
- address?: Address;
31
- abi: Abi;
32
- }) => {
33
- if (!address) return;
34
- if (!addresses[contractName]) {
35
- addresses[contractName] = {
36
- address: {},
37
- abi,
38
- };
39
- }
40
-
41
- addresses[contractName]!.address[chainId] = address;
42
- };
43
-
44
- for (const addressesFile of addressesFiles) {
45
- const jsonAddress = JSON.parse(
46
- readFileSync(`../1155-deployments/addresses/${addressesFile}`, "utf-8"),
47
- ) as {
48
- FIXED_PRICE_SALE_STRATEGY: Address;
49
- MERKLE_MINT_SALE_STRATEGY: Address;
50
- REDEEM_MINTER_FACTORY: Address;
51
- "1155_IMPL": Address;
52
- FACTORY_IMPL: Address;
53
- FACTORY_PROXY: Address;
54
- PREMINTER_PROXY?: Address;
55
- };
56
-
57
- const chainId = parseInt(addressesFile.split(".")[0]);
58
-
59
- addAddress({
60
- contractName: "ZoraCreatorFixedPriceSaleStrategy",
61
- chainId,
62
- address: jsonAddress.FIXED_PRICE_SALE_STRATEGY,
63
- abi: abis.zoraCreatorFixedPriceSaleStrategyABI,
64
- });
65
- addAddress({
66
- contractName: "ZoraCreatorMerkleMinterStrategy",
67
- chainId,
68
- address: jsonAddress.MERKLE_MINT_SALE_STRATEGY,
69
- abi: abis.zoraCreatorMerkleMinterStrategyABI,
70
- });
71
- addAddress({
72
- contractName: "ZoraCreator1155FactoryImpl",
73
- chainId,
74
- address: jsonAddress.FACTORY_PROXY,
75
- abi: abis.zoraCreator1155FactoryImplABI,
76
- });
77
- addAddress({
78
- contractName: "ZoraCreatorRedeemMinterFactory",
79
- chainId,
80
- address: jsonAddress.REDEEM_MINTER_FACTORY,
81
- abi: abis.zoraCreatorRedeemMinterFactoryABI,
82
- });
83
- addAddress({
84
- contractName: "ZoraCreator1155PremintExecutorImpl",
85
- chainId,
86
- address: jsonAddress.PREMINTER_PROXY,
87
- abi: abis.zoraCreator1155PremintExecutorImplABI,
88
- });
89
- }
90
-
91
- return addresses;
92
- };
93
-
94
- export default defineConfig({
95
- out: "src/generated/wagmi.ts",
96
- contracts: [
97
- ...Object.entries(getAddresses()).map(([contractName, addressConfig]) => ({
98
- abi: addressConfig.abi,
99
- address: addressConfig.address,
100
- name: contractName,
101
- })),
102
- {
103
- abi: abis.zoraCreator1155ImplABI,
104
- name: "ZoraCreator1155Impl",
105
- },
106
- ],
107
- });