@zoralabs/protocol-deployments 0.0.14 → 0.0.16
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,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zoralabs/protocol-deployments",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
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
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "yarn wagmi && yarn bundle-configs && tsup",
|
|
11
|
-
"bundle-configs": "
|
|
11
|
+
"bundle-configs": "tsx scripts/bundle-chainConfigs.ts && yarn prettier",
|
|
12
12
|
"prettier": "prettier --write 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
|
|
13
13
|
"lint": "prettier --check 'src/**/*.ts' 'scripts/*' 'wagmi.config.ts'",
|
|
14
14
|
"wagmi": "wagmi generate"
|
|
@@ -17,7 +17,7 @@ function makeConfig() {
|
|
|
17
17
|
const chainId = fileName.split(".")[0];
|
|
18
18
|
|
|
19
19
|
const fileContents = JSON.parse(
|
|
20
|
-
readFileSync(`../1155-deployments/chainConfigs/${fileName}
|
|
20
|
+
readFileSync(`../1155-deployments/chainConfigs/${fileName}`, "utf-8"),
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
return `[${chainId}]: ${JSON.stringify(fileContents, null, 2)}`;
|
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
|
-
});
|