Skip to content

Commit

Permalink
build: change name
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Sep 19, 2024
1 parent 4d49917 commit a24434b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 400 deletions.
15 changes: 6 additions & 9 deletions contracts/Managers/RoleManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,17 @@ contract RoleManager is Positions {
uint256 _depositLimit,
uint256 _profitMaxUnlockTime
) internal virtual returns (address _vault) {
string memory _categoryString = Strings.toString(_category);
string memory _categoryString = _category != 0
? string(abi.encodePacked("-", Strings.toString(_category)))
: "";

// Name is "{SYMBOL}-{CATEGORY} yVault"
// Name is "{SYMBOL}-{CATEGORY} Vault"
string memory _name = string(
abi.encodePacked(
ERC20(_asset).symbol(),
"-",
_categoryString,
" yVault"
)
abi.encodePacked(ERC20(_asset).symbol(), _categoryString, " yVault")
);
// Symbol is "yv{SYMBOL}-{CATEGORY}".
string memory _symbol = string(
abi.encodePacked("yv", ERC20(_asset).symbol(), "-", _categoryString)
abi.encodePacked("yv", ERC20(_asset).symbol(), _categoryString)
);

// Deploy through the registry so it is automatically endorsed.
Expand Down
Loading

0 comments on commit a24434b

Please sign in to comment.