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

Add more router tests #398

Closed
wants to merge 2 commits into from
Closed

Add more router tests #398

wants to merge 2 commits into from

Conversation

AStox
Copy link
Contributor

@AStox AStox commented Aug 12, 2024

This PR adds another multicall test to reflect how the frontend will be using multicalls.
It also adds a test to verify users can call unlockDepositRequest while the asset is disallowed on the pool.

hieronx
hieronx previously approved these changes Aug 12, 2024
// multicall
uint256 fuel = estimateGas();
bytes[] memory calls = new bytes[](2);
calls[0] = abi.encodeWithSelector(router.enableLockDepositRequest.selector, address(vault_), amount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this test will be used as an example for call encoding from the UI, it better uses abi.encodeCall. encodeCall makes args type check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

Copy link

Coverage after merging router-tests into main will be

99.71%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Auth.sol100%100%100%100%
   CentrifugeRouter.sol91.06%61.54%100%99.08%102, 128, 128, 145, 189, 200, 294, 302, 307, 309, 323, 51, 58, 58, 58, 85
   ERC7540Vault.sol96.28%78.13%100%100%105, 133, 138, 145, 145, 250, 263
   Escrow.sol100%100%100%100%
   InvestmentManager.sol98.41%93.83%100%100%323, 354, 359, 488, 559
   PoolManager.sol99.01%98.17%96.43%100%216, 437
   Root.sol98.65%94.44%100%100%32
src/admin
   Guardian.sol92.59%100%100%85.71%65–66
src/factories
   ERC7540VaultFactory.sol100%100%100%100%
   TrancheFactory.sol100%100%100%100%
   TransferProxyFactory.sol100%100%100%100%
src/gateway
   GasService.sol100%100%100%100%
   Gateway.sol98.15%94.12%100%100%172, 176, 261–262, 76
src/gateway/adapters/axelar
   Adapter.sol100%100%100%100%
   Forwarder.sol100%100%100%100%
src/token
   ERC20.sol100%100%100%100%
   RestrictionManager.sol100%100%100%100%
   Tranche.sol92.98%70%94.44%100%108, 123, 97

@AStox AStox requested a review from hieronx August 19, 2024 16:47
@AStox AStox closed this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants