Skip to content

Commit

Permalink
fix: feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
0xteddybear committed Jul 18, 2024
1 parent 7c89b62 commit 2eec445
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion test/unit/BPool/BPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,14 @@ contract BPool is BPoolBase {

// it calls _afterFinalize hook
bPool.expectCall__afterFinalize();
// it mints initial pool supply to controller
// it mints initial pool shares
bPool.expectCall__mintPoolShare(INIT_POOL_SUPPLY);
// it sends initial pool shares to controller
bPool.expectCall__pushPoolShare(address(this), INIT_POOL_SUPPLY);
// it emits a LOG_CALL event
bytes memory data = abi.encodeCall(IBPool.finalize, ());
vm.expectEmit(address(bPool));
emit IBPool.LOG_CALL(IBPool.finalize.selector, address(this), data);

bPool.finalize();
// it finalizes the pool
Expand Down
4 changes: 3 additions & 1 deletion test/unit/BPool/BPool.tree
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ BPool::finalize
├── when there are too few tokens bound
│ └── it should revert
└── when preconditions are met
├── it emits LOG_CALL event
├── it finalizes the pool
├── it mints initial pool supply to controller
├── it mints initial pool shares
├── it sends initial pool shares to controller
└── it calls _afterFinalize hook

0 comments on commit 2eec445

Please sign in to comment.