Skip to content

Commit

Permalink
feat: overriding BPool with BCoWPool on factory [failing]
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed May 16, 2024
1 parent 264aa4e commit fdfe708
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/contracts/BFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ pragma solidity 0.8.25;

// Builds new BPools, logging their addresses and providing `isBPool(address) -> (bool)`

import './BPool.sol';
import {BCoWPool as BPool} from './BCoWPool.sol';
import {BBronze} from './BColor.sol';
import {IERC20} from 'forge-std/interfaces/IERC20.sol';
import 'interfaces/IBFactory.sol';

contract BFactory is IBFactory, BBronze {
Expand Down Expand Up @@ -57,7 +59,7 @@ contract BFactory is IBFactory, BBronze {

function collect(BPool pool) external {
require(msg.sender == _bLabs, 'ERR_NOT_BLABS');
uint256 collected = IERC20(pool).balanceOf(address(this));
uint256 collected = IERC20(address(pool)).balanceOf(address(this));
bool xfer = pool.transfer(_bLabs, collected);
require(xfer, 'ERR_ERC20_FAILED');
}
Expand Down

0 comments on commit fdfe708

Please sign in to comment.