SunWeb3Sec/DeFiHackLabs

Errors preventing `forge build` to compile the project

JustDravee opened this issue · 1 comments

Hey, thanks for this awesome project!

I noticed several issues preventing forge build to work:

  • Missing CheatCodes in src/test/LiFi_exp.sol:
File: LiFi_exp.sol
37: contract ContractTest is DSTest {
38:     address from = address(0x00c6f2bde06967e04caaf4bf4e43717c3342680d76);
39:     address lifi = address(0x005a9fd7c39a6c488e715437d7b1f3c823d5596ed1);
40:     address exploiter = address(0x00878099f08131a18fab6bb0b4cfc6b6dae54b177e);  
+ 41:     CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);
  • log_named_bool doesn't exist. Consider the following in Qubit_exp.sol:
File: Qubit_exp.sol
- 45:   emit log_named_bool("is 0 address whitelisted", IQBridgeHandler(QBridgeHandler).contractWhitelist(address(0)));
+ 45:   emit log_named_uint("is 0 address whitelisted", IQBridgeHandler(QBridgeHandler).contractWhitelist(address(0)) ? 1 : 0);
  • Commented bracket in Ronin_exp.sol:
File: Ronin_exp.sol
-  43:    // https://medium.com/coinmonks/how-to-implement-gas-less-transactions-on-ethereum-9f9273d2f059  }
+ 43:     // https://medium.com/coinmonks/how-to-implement-gas-less-transactions-on-ethereum-9f9273d2f059  
+ 44:   }

Then we can get:

Compiling 73 files with 0.8.10
Solc 0.8.10 finished in 11.30s
Compiler run successful (with warnings)

Awesome! Thanks for the report. I have fixed all the issues. I am planning to integrate action to avoid this kind of errors.