Skip to content

Commit

Permalink
reduce to just 1 parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrent committed Oct 16, 2024
1 parent 879f44f commit bae1c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contracts/facade/factories/CollateralFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ contract CollateralFactory {
emit DemurrageCollateralDeployed(newCollateral);
}

function deployNewUnpricedCollateral(IERC20Metadata _erc20, bytes32 _targetName)
function deployNewUnpricedCollateral(IERC20Metadata _erc20)
external
returns (address newCollateral)
{
newCollateral = address(new UnpricedCollateral(_erc20, _targetName));
newCollateral = address(new UnpricedCollateral(_erc20));
emit UnpricedCollateralDeployed(newCollateral);
}
}
5 changes: 2 additions & 3 deletions contracts/plugins/assets/UnpricedCollateral.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,11 @@ contract UnpricedCollateral is ICollateral, VersionedAsset {

bytes32 public immutable targetName;

constructor(IERC20Metadata _erc20, bytes32 _targetName) {
constructor(IERC20Metadata _erc20) {
require(address(_erc20) != address(0), "missing erc20");
require(_targetName != bytes32(0), "targetName missing");
erc20 = _erc20;
erc20Decimals = _erc20.decimals();
targetName = _targetName;
targetName = bytes32(bytes(_erc20.symbol()));
}

// solhint-disable no-empty-blocks
Expand Down

0 comments on commit bae1c19

Please sign in to comment.