Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor 01_ValidateDeployChain1.t.sol and 02_ValidateDeployChain2.t.sol #347

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions test/foundry/deploy/01_ValidateDeployChain1.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* @dev This test function verifies that the CxIP ERC721 Enforcer contract is deployed correctly by comparing the
* deployed bytecode with the expected bytecode.
* Refers to the hardhat test with the description 'CxipERC721 Enforcer:'
* This test function is currently commented out because the address of the CxIP ERC721 Enforcer contract has not
* This test function is currently commented out because the address of the CxIP ERC721 Enforcer contract has not
* been found. Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
function testCxipERC721Enforcer() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
// bytes memory bytecodeDeployed = vm.getDeployedCode("HolographERC721.sol:HolographERC721");
//assertEq(address(Constants.getCxipERC721Enforcer()).code, bytecodeDeployed);
}

/**
Expand All @@ -90,7 +90,7 @@ contract ValidateDeployChain1Test is DeployedSetUp {
function testCxipERC721Proxy() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("CxipERC721Proxy.sol:CxipERC721Proxy");
// assertEq(address(Constants.getCxipERC721Proxy()).code, bytecodeDeployed);
//assertEq(cxipERC721ProxyDeployed.code, bytecodeDeployed);
}

/**
Expand Down Expand Up @@ -143,7 +143,7 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* @dev This test function verifies that the Holographer contract is deployed correctly by comparing the deployed
* bytecode with the expected bytecode.
* Refers to the hardhat test with the description 'Holographer:'
* This test function is currently commented out because the address of the Holographer contract has not been found.
* This test function is currently commented out because the address of the Holographer contract has not been found.
* Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
Expand Down Expand Up @@ -204,7 +204,8 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* Refers to the hardhat test with the description 'HolographGenesis:'
*/
//TODO bytes not match and refact to the get holograph by network
function testFailHolographGenesis() public {
function testHolographGenesis() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("HolographGenesisLocal.sol:HolographGenesisLocal");
assertEq(holographGenesisDeployed.code, bytecodeDeployed);
}
Expand Down Expand Up @@ -313,11 +314,9 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* This test function is currently commented out because the address of the HToken contract has not been found.
* Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
function testHToken() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("hToken.sol:hToken");
// assertEq(address(Constants.getHToken()).code, bytecodeDeployed);
assertEq(hTokenDeployed.code, bytecodeDeployed);
}

/**
Expand All @@ -328,11 +327,9 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* This test function is currently commented out because the address of the MockERC721Receiver contract has not
* been found. Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
function testMockERC721Receiver() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("MockERC721Receiver.sol:MockERC721Receiver");
// assertEq(address(Constants.getMockERC721Receiver()).code, bytecodeDeployed);
assertEq(mockERC721ReceiverDeployed.code, bytecodeDeployed);
}

/**
Expand Down Expand Up @@ -399,11 +396,11 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* This test function is currently commented out because the address of the Sample ERC20 contract has not been
* found. Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
// TODO: bytecodes dont match
function testSampleERC20() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("SampleERC20.sol:SampleERC20");
// assertEq(address(Constants.getSampleERC20()).code, bytecodeDeployed);
assertEq(sampleERC20Deployed.code, bytecodeDeployed);
}

/**
Expand Down Expand Up @@ -444,10 +441,10 @@ contract ValidateDeployChain1Test is DeployedSetUp {
* This test function is currently commented out because the address of the Sample ERC721 contract has not been
* found. Test will be skipped until deployment script in Foundry is done.
*/
// TODO: address not found
// TODO: bytecodes dont match
function testSampleERC721() public {
vm.skip(true);
bytes memory bytecodeDeployed = vm.getDeployedCode("SampleERC721.sol:SampleERC721");
// assertEq(address(Constants.getSampleERC721()).code, bytecodeDeployed);
assertEq(sampleERC721Deployed.code, bytecodeDeployed);
}
}
Loading
Loading