@@ -12,10 +12,11 @@ import {SalesConfiguration} from "../../../src/drops/struct/SalesConfiguration.s
12
12
13
13
library HelperDeploymentConfig {
14
14
uint256 constant dropEventConfig = 0x0000000000000000000000000000000000000000000000000000000000040000 ;
15
+
15
16
function getInitCodeHtokenETH () public pure returns (bytes memory ) {
16
17
return
17
18
abi.encode (
18
- bytes32 ( 0x000000000000000000000000000000000000000000000000000068546f6b656e ), //htokenHash
19
+ Constants.hTokenHash,
19
20
Constants.getHolographRegistryProxy (), //registry address
20
21
abi.encode (Constants.getDeployer (), uint16 (0 ))
21
22
);
@@ -30,7 +31,7 @@ library HelperDeploymentConfig {
30
31
}
31
32
32
33
function getInitCodeCxipERC721 () public pure returns (bytes memory ) {
33
- bytes32 CxipERC721Hex = 0x0000000000000000000000000000000000000000000043786970455243373231 ;
34
+ bytes32 CxipERC721Hex = Constants.cxipERC721Hex ;
34
35
return abi.encode (CxipERC721Hex, Constants.getHolographRegistryProxy (), getInitCodeSampleErc721 ());
35
36
}
36
37
@@ -46,7 +47,7 @@ library HelperDeploymentConfig {
46
47
) public pure returns (DeploymentConfig memory deployConfig ) {
47
48
deployConfig.contractType = contractType; //hToken
48
49
deployConfig.chainType = chainType; //holograph id
49
- deployConfig.salt = bytes32 ( 0x00000000000000000000000000000000000000000000000000000000000003e8 ) ;
50
+ deployConfig.salt = Constants.saltHex ;
50
51
deployConfig.byteCode = contractByteCode;
51
52
deployConfig.initCode = abi.encode (
52
53
tokenName, //token name
@@ -60,6 +61,7 @@ library HelperDeploymentConfig {
60
61
);
61
62
return deployConfig;
62
63
}
64
+
63
65
function getDeployConfigERC721 (
64
66
bytes32 contractType ,
65
67
uint32 chainType ,
@@ -98,6 +100,7 @@ library HelperDeploymentConfig {
98
100
)
99
101
);
100
102
}
103
+
101
104
/*
102
105
* @note This contract is used to get the DeploymentConfig for hToken ETH
103
106
* @dev This contract provides helper functions to get the DeploymentConfig by chainType (getHolographIdL1 or getHolographIdL2) for hToken ETH
@@ -110,12 +113,12 @@ library HelperDeploymentConfig {
110
113
) public pure returns (DeploymentConfig memory deployConfig ) {
111
114
return
112
115
getDeployConfigERC20 (
113
- bytes32 ( 0x000000000000000000000000000000000000486f6c6f67726170684552433230 ), //hToken hash
116
+ Constants.erc20Hash,
114
117
chainType,
115
118
contractByteCode,
116
119
"Holographed ETH " ,
117
120
"hETH " ,
118
- 0x0000000000000000000000000000000000000000000000000000000000000000 ,
121
+ Constants.EMPTY_BYTES32 ,
119
122
"Holographed ETH " ,
120
123
getInitCodeHtokenETH ()
121
124
);
@@ -128,7 +131,7 @@ library HelperDeploymentConfig {
128
131
) public pure returns (DeploymentConfig memory deployConfig ) {
129
132
return
130
133
getDeployConfigERC20 (
131
- bytes32 ( 0x000000000000000000000000000000000000486f6c6f67726170684552433230 ), //hToken hash
134
+ Constants.erc20Hash,
132
135
chainType,
133
136
contractByteCode,
134
137
isL1 ? "Sample ERC20 Token (localhost) " : "Sample ERC20 Token (localhost2) " ,
@@ -147,7 +150,7 @@ library HelperDeploymentConfig {
147
150
) public pure returns (DeploymentConfig memory deployConfig ) {
148
151
return
149
152
getDeployConfigERC721 (
150
- bytes32 ( 0x0000000000000000000000000000000000486f6c6f6772617068455243373231 ), //HolographERC721 hash ,
153
+ Constants.holographERC721Hash ,
151
154
chainType,
152
155
contractByteCode,
153
156
isL1 ? "CXIP ERC721 Collection (localhost) " : "CXIP ERC721 Collection (localhost2) " ,
@@ -166,7 +169,7 @@ library HelperDeploymentConfig {
166
169
) public pure returns (DeploymentConfig memory deployConfig ) {
167
170
return
168
171
getDeployConfigERC721 (
169
- bytes32 ( 0x0000000000000000000000000000000000486f6c6f6772617068455243373231 ), //HolographERC721 hash ,
172
+ Constants.holographERC721Hash ,
170
173
chainType,
171
174
contractByteCode,
172
175
isL1 ? "Sample ERC721 Contract (localhost) " : "Sample ERC721 Contract (localhost2) " ,
@@ -190,7 +193,7 @@ library HelperDeploymentConfig {
190
193
presaleEnd: 0 ,
191
194
publicSalePrice: 0 ,
192
195
maxSalePurchasePerAddress: 0 ,
193
- presaleMerkleRoot: bytes32 ( 0x0000000000000000000000000000000000000000000000000000000000000000 )
196
+ presaleMerkleRoot: Constants.EMPTY_BYTES32
194
197
});
195
198
196
199
DropsInitializerV2 memory initializer = DropsInitializerV2 ({
@@ -203,7 +206,7 @@ library HelperDeploymentConfig {
203
206
metadataRendererInit: abi.encode ("decscription " , "imageURI " , "animationURI " )
204
207
});
205
208
206
- deployConfig.contractType = bytes32 ( 0x0000000000000000000000486f6c6f677261706844726f704552433732315632 ); //Source contract type HolographDropERC721V2
209
+ deployConfig.contractType = Constants.contractTypeHolographDropERC721V2;
207
210
deployConfig.chainType = chainType; //holograph id
208
211
deployConfig.salt = Constants.saltHex;
209
212
deployConfig.byteCode = contractByteCode;
0 commit comments