@zoralabs/protocol-deployments 0.0.14 → 0.1.0-bundle-test.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/package.json CHANGED
@@ -1,21 +1,26 @@
1
1
  {
2
2
  "name": "@zoralabs/protocol-deployments",
3
- "version": "0.0.14",
3
+ "version": "0.1.0-bundle-test.0",
4
4
  "repository": "https://github.com/ourzora/zora-protocol",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
- "types": "./dist/index.d.ts",
7
+ "types": "./dist/src/index.d.ts",
8
+ "files": [
9
+ "bundled-configs"
10
+ ],
8
11
  "type": "module",
9
12
  "scripts": {
10
13
  "build": "yarn wagmi && yarn bundle-configs && tsup",
11
- "bundle-configs": "node scripts/bundle-chainConfigs.mjs && yarn prettier",
14
+ "bundle-configs": "tsx scripts/bundle-configs.ts && yarn prettier",
12
15
  "prettier": "prettier --write 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
13
16
  "lint": "prettier --check 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
14
17
  "wagmi": "wagmi generate"
15
18
  },
16
19
  "dependencies": {
17
- "@zoralabs/1155-deployments": "*",
18
- "@zoralabs/zora-1155-contracts": "*"
20
+ "@zoralabs/mints-contracts": "*",
21
+ "@zoralabs/mints-deployments": "*",
22
+ "@zoralabs/1155-deployments": "0.0.2-bundle-test.0",
23
+ "@zoralabs/zora-1155-contracts": "2.8.0-bundle-test.0"
19
24
  },
20
25
  "devDependencies": {
21
26
  "zoralabs-tsconfig": "*",
package/CHANGELOG.md DELETED
@@ -1,128 +0,0 @@
1
- # @zoralabs/premint-sdk
2
-
3
- ## 0.0.14
4
-
5
- ### Patch Changes
6
-
7
- - Added back protocol-deployments - bundling 1155-deployments into it
8
-
9
- ## 0.0.13
10
-
11
- ### Patch Changes
12
-
13
- - f3332ee: Remove pgn chain configs and addresses
14
- - d2085fd: Deployed to Arbitrum One & Arbitrum Sepolia
15
- - a51a0cb: Renamed protocol-deployments to 1155-deployments
16
- - Updated dependencies [8107ffe]
17
- - @zoralabs/zora-1155-contracts@2.7.1
18
-
19
- ## 0.0.12
20
-
21
- ### Patch Changes
22
-
23
- - 3af77cf: Deploy 2.7.0 to mainnet, zora mainnet, zora sepolia, zora goerli, optimism, base
24
- - 23dba1c: Deployed all contracts to sepolia
25
-
26
- ## 0.0.11
27
-
28
- ### Patch Changes
29
-
30
- - bff853a: Include latest abi in protocol deployments
31
-
32
- ## 0.0.10
33
-
34
- ### Patch Changes
35
-
36
- - 68c70a9: Tie protocol deployments to v2.5.4 of 1155
37
- - Updated dependencies [f0c380d]
38
- - Updated dependencies [98e78d7]
39
- - Updated dependencies [050b689]
40
- - Updated dependencies [3f8b18f]
41
- - @zoralabs/zora-1155-contracts@2.6.0
42
-
43
- ## 0.0.9
44
-
45
- ### Patch Changes
46
-
47
- - 5156b9e: Deploy latest premint executor to zora sepolia and goerli
48
- - Updated dependencies [7e00197]
49
- - @zoralabs/zora-1155-contracts@2.5.4
50
-
51
- ## 0.0.8
52
-
53
- ### Patch Changes
54
-
55
- - 4b77307: Deployed 3.5.3 to zora sepolia and goerli
56
-
57
- ## 0.0.7
58
-
59
- ### Patch Changes
60
-
61
- - 128b05c: Updated determinstic preminter deployment script to not fail if already deployed
62
- - 1d58cd1: Deployed 2.5.2 to zora sepolia and zora goerli
63
- - 128b05c: Deployed 2.5.1 to zora sepolia and zora goerli
64
- - Updated dependencies [e4edaac]
65
- - @zoralabs/zora-1155-contracts@2.5.2
66
-
67
- ## 0.0.6
68
-
69
- ### Patch Changes
70
-
71
- - f3b7df8: Deployed 2.4.0 with collaborators to zora-goerli, zora-sepolia, base, optimism, mainnet
72
- - Updated dependencies [885ffa4]
73
- - Updated dependencies [ffb5cb7]
74
- - Updated dependencies [ffb5cb7]
75
- - Updated dependencies [d84721a]
76
- - Updated dependencies [cacb543]
77
- - @zoralabs/zora-1155-contracts@2.5.0
78
-
79
- ## 0.0.5
80
-
81
- ### Patch Changes
82
-
83
- - 293e2c0: Moved deployment related code from 1155 to protocol-deployments package
84
-
85
- ## 0.0.4
86
-
87
- ### Patch Changes
88
-
89
- - 6cfb6f9: Add Zora mainnet 1155 v2.3.1 deploy
90
-
91
- ## 0.0.3
92
-
93
- ### Patch Changes
94
-
95
- - 85bdd23: Update Zora Network addresses to v2.3.0
96
-
97
- ## 0.0.2
98
-
99
- ### Patch Changes
100
-
101
- - 4d79b49: Deployed to zora sepolia
102
- - b62e471: created new package `protocol-deployments` that includes the deployed contract addresses.
103
-
104
- - 1155-contracts js no longer exports deployed addresses, just the abis
105
- - premint-sdk imports deployed addresses from `protocol-deployments
106
-
107
- - 7d1a4c1: Deployed 2.3.0 to zora goerli
108
-
109
- ## 0.0.2-premint-api.2
110
-
111
- ### Patch Changes
112
-
113
- - c29e080: Update retry and error reporting
114
-
115
- ## 0.0.2-premint-api.1
116
-
117
- ### Patch Changes
118
-
119
- - 6eaf7bb: add retries
120
-
121
- ## 0.0.2-premint-api.0
122
-
123
- ### Patch Changes
124
-
125
- - Updated dependencies [8395b8e]
126
- - Updated dependencies [aae756b]
127
- - Updated dependencies [cf184b3]
128
- - @zoralabs/zora-1155-contracts@2.1.1-premint-api.0
@@ -1,38 +0,0 @@
1
- import { readdirSync, readFileSync, writeFileSync } from "fs";
2
-
3
- // Reads all the chain configs in ./chainConfigs folder, and bundles them into a typescript
4
- // definition that looks like:
5
- // export const chainConfigs = {
6
- // [chainId]: {
7
- // ...chainConfig
8
- // }
9
- //}
10
- function makeConfig() {
11
- // read all files in the chainConfigs folder
12
- const files = readdirSync("../1155-deployments/chainConfigs");
13
-
14
- // combine them into a single mapping
15
- const chainConfigsInner = files
16
- .map((fileName) => {
17
- const chainId = fileName.split(".")[0];
18
-
19
- const fileContents = JSON.parse(
20
- readFileSync(`../1155-deployments/chainConfigs/${fileName}`),
21
- );
22
-
23
- return `[${chainId}]: ${JSON.stringify(fileContents, null, 2)}`;
24
- })
25
- .join(", ");
26
-
27
- return `export const chainConfigs = {
28
- ${chainConfigsInner}
29
- };`;
30
- }
31
-
32
- async function bundleChainConfigs() {
33
- const configString = makeConfig();
34
-
35
- writeFileSync("./src/chainConfigs.ts", configString);
36
- }
37
-
38
- await bundleChainConfigs();
package/src/deployment.ts DELETED
@@ -1,94 +0,0 @@
1
- import { Address, LocalAccount, Hex } from "viem";
2
-
3
- export type ConfiguredSalt = `0x${string}`;
4
- // Load environment variables from `.env.local`
5
- export type DeterministicDeploymentConfig = {
6
- proxyDeployerAddress: Address;
7
- proxyShimSalt: ConfiguredSalt;
8
- proxySalt: ConfiguredSalt;
9
- proxyCreationCode: Hex;
10
- };
11
-
12
- export type GenericDeploymentConfiguration = {
13
- creationCode: Hex;
14
- salt: Hex;
15
- deployerAddress: Address;
16
- upgradeGateAddress: Address;
17
- proxyDeployerAddress: Address;
18
- };
19
-
20
- export type DeployedContracts = {
21
- factoryImplAddress: Address;
22
- };
23
-
24
- export const signDeployFactory = ({
25
- account,
26
- deterministicDeploymentConfig: config,
27
- implementationAddress,
28
- owner,
29
- chainId,
30
- }: {
31
- account: LocalAccount;
32
- deterministicDeploymentConfig: DeterministicDeploymentConfig;
33
- implementationAddress: Address;
34
- owner: Address;
35
- chainId: number;
36
- }) =>
37
- account.signTypedData({
38
- types: {
39
- createProxy: [
40
- { name: "proxyShimSalt", type: "bytes32" },
41
- { name: "proxySalt", type: "bytes32" },
42
- { name: "proxyCreationCode", type: "bytes" },
43
- { name: "implementationAddress", type: "address" },
44
- { name: "owner", type: "address" },
45
- ],
46
- },
47
- message: {
48
- proxyShimSalt: config.proxyShimSalt,
49
- implementationAddress,
50
- proxyCreationCode: config.proxyCreationCode,
51
- proxySalt: config.proxySalt,
52
- owner: owner,
53
- },
54
- primaryType: "createProxy",
55
- domain: {
56
- chainId,
57
- name: "DeterministicProxyDeployer",
58
- version: "1",
59
- verifyingContract: config.proxyDeployerAddress,
60
- },
61
- });
62
-
63
- export const signGenericDeploy = ({
64
- account,
65
- config,
66
- chainId,
67
- initCall,
68
- }: {
69
- account: LocalAccount;
70
- config: GenericDeploymentConfiguration;
71
- initCall: Hex;
72
- chainId: number;
73
- }) =>
74
- account.signTypedData({
75
- types: {
76
- createGenericContract: [
77
- { name: "salt", type: "bytes32" },
78
- { name: "creationCode", type: "bytes" },
79
- { name: "initCall", type: "bytes" },
80
- ],
81
- },
82
- message: {
83
- salt: config.salt,
84
- creationCode: config.creationCode,
85
- initCall,
86
- },
87
- primaryType: "createGenericContract",
88
- domain: {
89
- chainId,
90
- name: "DeterministicProxyDeployer",
91
- version: "1",
92
- verifyingContract: config.proxyDeployerAddress,
93
- },
94
- });
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- // the below files are auto-generated and will be
2
- // built at build time. They are not checked in to git.
3
- // The can be generated by running `yarn prepack` in the root
4
- export * from "./wagmiGenerated";
5
- export { chainConfigs } from "./chainConfigs";
package/tsconfig.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "zoralabs-tsconfig/tsconfig.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "outDir": "dist"
6
- },
7
- "exclude": ["node_modules/**", "dist/**"],
8
- "include": ["src/**/*.ts", "scripts/*.ts"]
9
- }
package/tsup.config.ts DELETED
@@ -1,10 +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: "tsc --emitDeclarationOnly --declaration --declarationMap",
10
- });
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/wagmiGenerated.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
- });