chore(StakeVault): add important comment about STAKED_TOKEN being immutable

This commit is contained in:
Ricardo Guilherme Schmidt 2024-10-03 00:19:55 -03:00
parent c08fe417ba
commit 2f1c8feb1c
No known key found for this signature in database
GPG Key ID: 54B4454CC123AD17
1 changed files with 4 additions and 1 deletions

View File

@ -19,8 +19,11 @@ contract StakeVault is Ownable {
error StakeVault__StakingFailed();
error StakeVault__UnstakingFailed();
StakeManager private stakeManager;
//STAKED_TOKEN must be kept as an immutable, otherwise, StakeManager would accept StakeVaults with any token
//if is needed that STAKED_TOKEN to be a variable, StakeManager should be changed to check codehash and
//StakeVault(msg.sender).stakedToken()
ERC20 public immutable STAKED_TOKEN;
StakeManager private stakeManager;
uint256 public amountStaked = 0;
/**