Skip to content

Commit 3d80949

Browse files
committed
Add missing tests and comments
1 parent bed955f commit 3d80949

File tree

1 file changed

+196
-33
lines changed

1 file changed

+196
-33
lines changed

test/foundry/deploy/02_ValidateDeployChain2.t.sol

Lines changed: 196 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,44 @@ contract ValidateDeployChain2Test is DeployedSetUp {
3333
assertEq(holographInterfacesDeployed.code, bytecodeDeployed);
3434
}
3535

36-
/**
37-
* @notice Verifies the correct deployment of the Holograph contract.
38-
* @dev This test checks that the Holograph contract is deployed correctly by comparing the deployed bytecode
39-
* with the expected bytecode.
40-
* Refers to the hardhat test with the description 'Holograph:'
41-
*/
42-
function testHolograph() public {
43-
bytes memory bytecodeDeployed = vm.getDeployedCode("Holograph.sol:Holograph");
44-
assertEq(holographDeployed.code, bytecodeDeployed);
36+
/**
37+
* @notice Verifies the deployment of the CxIP ERC721 Holographer contract
38+
* @dev This test function verifies that the CxIP ERC721 Holographer contract is deployed correctly by comparing
39+
* the deployed bytecode with the expected bytecode.
40+
* Refers to the hardhat test with the description 'CxipERC721 Holographer:'
41+
* This test function is currently commented out because the address of the CxIP ERC721 Holographer contract has
42+
* not been found. Test will be skipped until deployment script in Foundry is done.
43+
*/
44+
// TODO: address not found
45+
function testCxipErc721Holographer() public {
46+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holographer.sol:Holographer");
47+
// assertEq(address(Constants.getCxipERC721Holographer()).code, bytecodeDeployed);
48+
}
49+
50+
/**
51+
* @notice Verifies the deployment of the CxIP ERC721 Enforcer contract
52+
* @dev This test function verifies that the CxIP ERC721 Enforcer contract is deployed correctly by comparing the
53+
* deployed bytecode with the expected bytecode.
54+
* Refers to the hardhat test with the description 'CxipERC721 Enforcer:'
55+
* This test function is currently commented out because the address of the CxIP ERC721 Enforcer contract has not
56+
* been found. Test will be skipped until deployment script in Foundry is done.
57+
*/
58+
// TODO: address not found
59+
function testCxipERC721Enforcer() public {
60+
vm.skip(true);
61+
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
62+
// bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
4563
}
4664

4765
/**
48-
* @notice Verifies the correct deployment of the Holograph ERC721 contract.
49-
* @dev This test checks that the Holograph ERC721 contract is deployed correctly by comparing the deployed bytecode
66+
* @notice Verifies the correct deployment of the CxIP ERC721 contract.
67+
* @dev This test checks that the CxIP ERC721 contract is deployed correctly by comparing the deployed bytecode
5068
* with the expected bytecode.
51-
* Refers to the hardhat test with the description 'CxipERC721 Enforcer'
69+
* Refers to the hardhat test with the description 'CxipERC721:'
5270
*/
53-
function testHolographERC721() public {
54-
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
55-
assertEq(holographERC721Deployed.code, bytecodeDeployed);
71+
function testCxipERC721() public {
72+
bytes memory bytecodeDeployed = vm.getDeployedCode("CxipERC721.sol:CxipERC721");
73+
assertEq(cxipERC721Deployed.code, bytecodeDeployed);
5674
}
5775

5876
/**
@@ -68,17 +86,6 @@ contract ValidateDeployChain2Test is DeployedSetUp {
6886
assertEq(cxipERC721ProxyDeployed.code, bytecodeDeployed);
6987
}
7088

71-
/**
72-
* @notice Verifies the correct deployment of the CxIP ERC721 contract.
73-
* @dev This test checks that the CxIP ERC721 contract is deployed correctly by comparing the deployed bytecode
74-
* with the expected bytecode.
75-
* Refers to the hardhat test with the description 'CxipERC721:'
76-
*/
77-
function testCxipERC721() public {
78-
bytes memory bytecodeDeployed = vm.getDeployedCode("CxipERC721.sol:CxipERC721");
79-
assertEq(cxipERC721Deployed.code, bytecodeDeployed);
80-
}
81-
8289
/**
8390
* @notice Verifies the correct deployment of the ERC20Mock contract.
8491
* @dev This test function checks that the ERC20Mock contract is deployed correctly by comparing the deployed bytecode
@@ -90,6 +97,17 @@ contract ValidateDeployChain2Test is DeployedSetUp {
9097
assertEq(erc20MockDeployed.code, bytecodeDeployed);
9198
}
9299

100+
/**
101+
* @notice Verifies the correct deployment of the Holograph contract.
102+
* @dev This test checks that the Holograph contract is deployed correctly by comparing the deployed bytecode
103+
* with the expected bytecode.
104+
* Refers to the hardhat test with the description 'Holograph:'
105+
*/
106+
function testHolograph() public {
107+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holograph.sol:Holograph");
108+
assertEq(holographDeployed.code, bytecodeDeployed);
109+
}
110+
93111
/**
94112
* @notice Verifies the correct deployment of the Holograph Bridge contract.
95113
* @dev This test function checks that the Holograph Bridge contract is deployed correctly by comparing the deployed bytecode
@@ -112,6 +130,21 @@ contract ValidateDeployChain2Test is DeployedSetUp {
112130
assertEq(holographBridgeProxyDeployed.code, bytecodeDeployed);
113131
}
114132

133+
/**
134+
* @notice Verifies the deployment of the Holographer contract
135+
* @dev This test function verifies that the Holographer contract is deployed correctly by comparing the deployed
136+
* bytecode with the expected bytecode.
137+
* Refers to the hardhat test with the description 'Holographer:'
138+
* This test function is currently commented out because the address of the Holographer contract has not been found.
139+
* Test will be skipped until deployment script in Foundry is done.
140+
*/
141+
// TODO: address not found
142+
function testHolographer() public {
143+
vm.skip(true);
144+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holographer.sol:Holographer");
145+
// assertEq(address(Constants.getHolographer()).code, bytecodeDeployed);
146+
}
147+
115148
/**
116149
* @notice Verifies the correct deployment of the HolographERC20 contract.
117150
* @dev This test function checks that the HolographERC20 contract is deployed correctly by comparing the deployed
@@ -123,6 +156,17 @@ contract ValidateDeployChain2Test is DeployedSetUp {
123156
assertEq(holographERC20Deployed.code, bytecodeDeployed);
124157
}
125158

159+
/**
160+
* @notice Verifies the correct deployment of the Holograph ERC721 contract.
161+
* @dev This test checks that the Holograph ERC721 contract is deployed correctly by comparing the deployed bytecode
162+
* with the expected bytecode.
163+
* Refers to the hardhat test with the description 'CxipERC721 Enforcer'
164+
*/
165+
function testHolographERC721() public {
166+
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
167+
assertEq(holographERC721Deployed.code, bytecodeDeployed);
168+
}
169+
126170
/**
127171
* @notice Verifies the correct deployment of the HolographFactory contract.
128172
* @dev This test function checks that the HolographFactory contract is deployed correctly by comparing the deployed
@@ -221,6 +265,36 @@ contract ValidateDeployChain2Test is DeployedSetUp {
221265
assertEq(holographTreasuryProxyDeployed.code, bytecodeDeployed);
222266
}
223267

268+
/**
269+
* @notice Verifies the deployment of the HToken Holographer contract
270+
* @dev This test function verifies that the HToken Holographer contract is deployed correctly by comparing the
271+
* deployed bytecode with the expected bytecode.
272+
* Refers to the hardhat test with the description 'hToken Holographer:'
273+
* This test function is currently commented out because the address of the HToken Holographer contract has not
274+
* been found. Test will be skipped until deployment script in Foundry is done.
275+
*/
276+
// TODO: address not found
277+
function testHTokenHolographer() public {
278+
vm.skip(true);
279+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holographer.sol:Holographer");
280+
// assertEq(address(Constants.getHTokenHolographer()).code, bytecodeDeployed);
281+
}
282+
283+
/**
284+
* @notice Verifies the deployment of the HToken Enforcer contract
285+
* @dev This test function verifies that the HToken Enforcer contract is deployed correctly by comparing the
286+
* deployed bytecode with the expected bytecode.
287+
* Refers to the hardhat test with the description 'hToken Enforcer:'
288+
* This test function is currently commented out because the address of the HToken Enforcer contract has not
289+
* been found. Test will be skipped until deployment script in Foundry is done.
290+
*/
291+
// TODO: address not found
292+
function testHTokenEnforcer() public {
293+
vm.skip(true);
294+
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC20.sol:HolographERC20");
295+
// assertEq(address(Constants.getHTokenEnforcer()).code, bytecodeDeployed);
296+
}
297+
224298
/**
225299
* @notice Verifies the correct deployment of the hToken contract.
226300
* @dev This test function checks that the hToken contract is deployed correctly by comparing the deployed bytecode with the expected bytecode.
@@ -241,6 +315,21 @@ contract ValidateDeployChain2Test is DeployedSetUp {
241315
assertEq(mockERC721ReceiverDeployed.code, bytecodeDeployed);
242316
}
243317

318+
/**
319+
* @notice Verifies the deployment of the MockLZEndpoint contract
320+
* @dev This test function verifies that the MockLZEndpoint contract is deployed correctly by comparing the deployed
321+
* bytecode with the expected bytecode.
322+
* Refers to the hardhat test with the description 'MockLZEndpoint:'
323+
* This test function is currently commented out because the address of the MockLZEndpoint contract has not been
324+
* found. Test will be skipped until deployment script in Foundry is done.
325+
*/
326+
// TODO: address not found
327+
function testMockLZEndpoint() public {
328+
vm.skip(true);
329+
bytes memory bytecodeDeployed = vm.getDeployedCode("MockLZEndpoint.sol:MockLZEndpoint");
330+
// assertEq(address(Constants.getMockLZEndpoint()).code, bytecodeDeployed);
331+
}
332+
244333
/**
245334
* @notice Verifies the correct deployment of the HolographRoyalties contract.
246335
* @dev This test function checks that the HolographRoyalties contract is deployed correctly by comparing the deployed bytecode with the expected bytecode.
@@ -251,19 +340,93 @@ contract ValidateDeployChain2Test is DeployedSetUp {
251340
assertEq(holographRoyaltiesDeployed.code, bytecodeDeployed);
252341
}
253342

254-
//TODO fix and add test name
255-
function testFailSampleERC20() public {
343+
/**
344+
* @notice Verifies the deployment of the Sample ERC20 Holographer contract
345+
* @dev This test function verifies that the Sample ERC20 Holographer contract is deployed correctly by comparing
346+
* the deployed bytecode with the expected bytecode.
347+
* Refers to the hardhat test with the description 'SampleERC20 Holographer:'
348+
* This test function is currently commented out because the address of the Sample ERC20 Holographer contract has
349+
* not been found. Test will be skipped until deployment script in Foundry is done.
350+
*/
351+
// TODO: address not found
352+
function testSampleERC20Holographer() public {
353+
vm.skip(true);
354+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holographer.sol:Holographer");
355+
// assertEq(address(Constants.getSampleERC20Holographer()).code, bytecodeDeployed);
356+
}
357+
358+
/**
359+
* @notice Verifies the deployment of the Sample ERC20 Enforcer contract
360+
* @dev This test function verifies that the Sample ERC20 Enforcer contract is deployed correctly by comparing
361+
* the deployed bytecode with the expected bytecode.
362+
* Refers to the hardhat test with the description 'SampleERC20 Enforcer:'
363+
* This test function is currently commented out because the address of the Sample ERC20 Enforcer contract has
364+
* not been found. Test will be skipped until deployment script in Foundry is done.
365+
*/
366+
// TODO: address not found
367+
function testSampleERC20Enforcer() public {
368+
vm.skip(true);
369+
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC20.sol:HolographERC20");
370+
// assertEq(address(Constants.getSampleERC20Enforcer()).code, bytecodeDeployed);
371+
}
372+
373+
/**
374+
* @notice Verifies the deployment of the Sample ERC20 contract
375+
* @dev This test function verifies that the Sample ERC20 contract is deployed correctly by comparing the deployed
376+
* bytecode with the expected bytecode.
377+
* Refers to the hardhat test with the description 'SampleERC20:'
378+
* This test function is currently commented out because the address of the Sample ERC20 contract has not been
379+
* found. Test will be skipped until deployment script in Foundry is done.
380+
*/
381+
// TODO: address not found
382+
function testSampleERC20() public {
256383
vm.skip(true);
257384
bytes memory bytecodeDeployed = vm.getDeployedCode("SampleERC20.sol:SampleERC20");
258-
assertEq(sampleERC20Deployed.code, bytecodeDeployed);
385+
// assertEq(address(Constants.getSampleERC20()).code, bytecodeDeployed);
259386
}
260387

388+
/**
389+
* @notice Verifies the deployment of the Sample ERC721 Holographer contract
390+
* @dev This test function verifies that the Sample ERC721 Holographer contract is deployed correctly by comparing
391+
* the deployed bytecode with the expected bytecode.
392+
* Refers to the hardhat test with the description SampleERC721 Holographer:'
393+
* This test function is currently commented out because the address of the Sample ERC721 Holographer contract has
394+
* not been found. Test will be skipped until deployment script in Foundry is done.
395+
*/
261396
// TODO: address not found
262-
function testFailSampleERC721() public {
397+
function testSampleERC721Holographer() public {
263398
vm.skip(true);
264-
bytes memory bytecodeDeployed = vm.getDeployedCode("SampleERC721.sol:SampleERC721");
265-
assertEq(sampleERC721Deployed.code, bytecodeDeployed);
399+
bytes memory bytecodeDeployed = vm.getDeployedCode("Holographer.sol:Holographer");
400+
// assertEq(address(Constants.getSampleERC721Holographer()).code, bytecodeDeployed);
401+
}
402+
403+
/**
404+
* @notice Verifies the deployment of the Sample ERC721 Enforcer contract
405+
* @dev This test function verifies that the Sample ERC721 Enforcer contract is deployed correctly by comparing
406+
* the deployed bytecode with the expected bytecode.
407+
* Refers to the hardhat test with the description 'SampleERC721 Enforcer:'
408+
* This test function is currently commented out because the address of the Sample ERC721 Enforcer contract has
409+
* not been found. Test will be skipped until deployment script in Foundry is done.
410+
*/
411+
// TODO: address not found
412+
function testSampleERC721Enforcer() public {
413+
vm.skip(true);
414+
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
415+
// assertEq(address(Constants.getSampleERC721Enforcer()).code, bytecodeDeployed);
266416
}
267417

268-
//TODO the remaining tests using sample erc20 and erc721
418+
/**
419+
* @notice Verifies the deployment of the Sample ERC721 contract
420+
* @dev This test function verifies that the Sample ERC721 contract is deployed correctly by comparing the
421+
* deployed bytecode with the expected bytecode.
422+
* Refers to the hardhat test with the description 'SampleERC721:'
423+
* This test function is currently commented out because the address of the Sample ERC721 contract has not been
424+
* found. Test will be skipped until deployment script in Foundry is done.
425+
*/
426+
// TODO: address not found
427+
function testSampleERC721() public {
428+
vm.skip(true);
429+
bytes memory bytecodeDeployed = vm.getDeployedCode("SampleERC721.sol:SampleERC721");
430+
// assertEq(address(Constants.getSampleERC721()).code, bytecodeDeployed);
431+
}
269432
}

0 commit comments

Comments
 (0)