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

(#34) Verify vault addresses in Investment Manager #383

Closed
wants to merge 1 commit into from

Conversation

AStox
Copy link
Contributor

@AStox AStox commented Jul 22, 2024

#34

@@ -245,6 +245,7 @@ contract InvestmentManager is Auth, IInvestmentManager {
uint128 shares
) public auth {
address vault = poolManager.getVault(poolId, trancheId, assetId);
require(vault != address(0), "InvestmentManager/vault-not-found");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can add this check to PoolManager.getVault, similar to what we do in PoolManager.getVaultAsset

Copy link

Coverage after merging 34-verify-vault-addresses into main will be

99.71%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   Auth.sol100%100%100%100%
   CentrifugeRouter.sol91.16%65.91%100%99.08%113, 113, 125, 125, 179, 179, 204, 204, 208, 208, 225, 225, 47, 54, 54, 54
   ERC7540Vault.sol98.88%92.31%100%100%150, 150
   Escrow.sol100%100%100%100%
   InvestmentManager.sol99.09%100%93.02%100%
   PoolManager.sol98.98%100%88.46%100%
   Root.sol98.68%100%92.86%100%
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.sol99.27%97.78%100%100%242, 247
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.sol98.21%100%94.12%100%

@AStox AStox closed this Jul 22, 2024
@AStox AStox deleted the 34-verify-vault-addresses branch July 22, 2024 19:48
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.

2 participants