@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.
- package/.turbo/turbo-build.log +6 -16
- package/CHANGELOG.md +6 -0
- package/package.json +5 -11
- package/wagmi.config.ts +0 -189
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
$ yarn
|
|
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
|
|
1
|
+
$ yarn bundle-configs && tsup
|
|
11
2
|
$ tsx scripts/bundle-configs.ts && yarn prettier
|
|
12
|
-
$ prettier --write 'src/**/*.ts' 'scripts/*'
|
|
13
|
-
src/addresses.ts
|
|
14
|
-
src/index.ts
|
|
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
|
[34mCLI[39m Building entry: src/index.ts
|
|
19
9
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
20
10
|
[34mCLI[39m tsup v7.3.0
|
|
@@ -25,7 +15,7 @@ wagmi.config.ts 61ms (unchanged)
|
|
|
25
15
|
[34mESM[39m Build start
|
|
26
16
|
[32mCJS[39m [1mdist/index.cjs [22m[32m189.63 KB[39m
|
|
27
17
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m352.50 KB[39m
|
|
28
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 64ms
|
|
29
19
|
[32mESM[39m [1mdist/index.js [22m[32m186.61 KB[39m
|
|
30
20
|
[32mESM[39m [1mdist/index.js.map [22m[32m351.98 KB[39m
|
|
31
|
-
[32mESM[39m ⚡️ Build success in
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 64ms
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-deployments",
|
|
3
|
-
"version": "0.1.
|
|
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
|
|
19
|
+
"build": "yarn bundle-configs && tsup",
|
|
20
20
|
"bundle-configs": "tsx scripts/bundle-configs.ts && yarn prettier",
|
|
21
|
-
"prettier": "prettier --write 'src/**/*.ts' 'scripts/*'
|
|
22
|
-
"lint": "prettier --check 'src/**/*.ts' 'scripts/*'
|
|
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
|
-
});
|