@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/CHANGELOG.md +6 -0
- package/dist/addresses.d.ts +164 -0
- package/dist/addresses.d.ts.map +1 -0
- package/dist/generated/mints.d.ts +45 -0
- package/dist/generated/mints.d.ts.map +1 -0
- package/dist/generated/wagmi.d.ts +4135 -93
- package/dist/generated/wagmi.d.ts.map +1 -1
- package/dist/index.cjs +1589 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1581 -177
- package/dist/index.js.map +1 -1
- package/json/1155.json +5 -5
- package/json/mints.json +46 -0
- package/package.json +4 -2
- package/src/addresses.ts +163 -0
- package/src/generated/1155.ts +5 -5
- package/src/generated/mints.ts +44 -0
- package/src/generated/wagmi.ts +1456 -78
- package/src/index.ts +1 -0
- package/.turbo/turbo-build.log +0 -29
- package/tsconfig.build.json +0 -10
- package/tsup.config.ts +0 -11
- package/wagmi.config.ts +0 -107
package/src/index.ts
CHANGED
package/.turbo/turbo-build.log
DELETED
|
@@ -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 [90msrc/generated/wagmi.ts[39m
|
|
10
|
-
✔ Writing to [90msrc/generated/wagmi.ts[39m
|
|
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
|
-
[34mCLI[39m Building entry: src/index.ts
|
|
17
|
-
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
18
|
-
[34mCLI[39m tsup v7.3.0
|
|
19
|
-
[34mCLI[39m Using tsup config: /home/runner/work/zora-protocol-private/zora-protocol-private/packages/protocol-deployments/tsup.config.ts
|
|
20
|
-
[34mCLI[39m Target: es2021
|
|
21
|
-
[34mCLI[39m Cleaning output folder
|
|
22
|
-
[34mCJS[39m Build start
|
|
23
|
-
[34mESM[39m Build start
|
|
24
|
-
[32mESM[39m [1mdist/index.js [22m[32m112.56 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m209.48 KB[39m
|
|
26
|
-
[32mESM[39m ⚡️ Build success in 47ms
|
|
27
|
-
[32mCJS[39m [1mdist/index.cjs [22m[32m114.67 KB[39m
|
|
28
|
-
[32mCJS[39m [1mdist/index.cjs.map [22m[32m209.87 KB[39m
|
|
29
|
-
[32mCJS[39m ⚡️ Build success in 48ms
|
package/tsconfig.build.json
DELETED
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
|
-
});
|