Skip to content

Commit

Permalink
symbol override
Browse files Browse the repository at this point in the history
  • Loading branch information
aazhou1 committed Dec 19, 2024
1 parent 779add0 commit 076c69c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions script/Strategy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ contract DeployStrategy is Script {

Strategy strategy = new Strategy(
name,
"symbol"
params
);

Expand Down
7 changes: 7 additions & 0 deletions src/Strategy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ contract Strategy is BaseStrategy, Pausable, AccessControl {

RepoTokenListData internal repoTokenListData;
TermAuctionListData internal termAuctionListData;
string internal tokenSymbol;



StrategyState public strategyState;
Expand Down Expand Up @@ -288,6 +290,9 @@ contract Strategy is BaseStrategy, Pausable, AccessControl {
/*//////////////////////////////////////////////////////////////
VIEW FUNCTIONS
//////////////////////////////////////////////////////////////*/
function symbol() external view returns (string memory) {
return tokenSymbol;
}

/**
* @notice Calculates the total value of all assets managed by the strategy
Expand Down Expand Up @@ -1170,13 +1175,15 @@ contract Strategy is BaseStrategy, Pausable, AccessControl {
*/
constructor(
string memory _name,
string memory _symbol,
StrategyParams memory _params
) BaseStrategy(_params._asset, _name) {
YEARN_VAULT = IERC4626(_params._yearnVault);
TERM_VAULT_EVENT_EMITTER = ITermVaultEvents(_params._eventEmitter);
PURCHASE_TOKEN_PRECISION = 10 ** ERC20(asset).decimals();

IERC20(_params._asset).safeApprove(_params._yearnVault, type(uint256).max);
tokenSymbol = _symbol;

strategyState = StrategyState({
assetVault: address(YEARN_VAULT),
Expand Down
1 change: 1 addition & 0 deletions src/test/utils/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ contract Setup is ExtendedTest, IEvents {
);
Strategy strat = new Strategy(
"Tokenized Strategy",
"tS",
params
);

Expand Down

0 comments on commit 076c69c

Please sign in to comment.