From 2f1c8feb1c3d3ae41b3a82879983de8aaaf88319 Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Thu, 3 Oct 2024 00:19:55 -0300 Subject: [PATCH] chore(StakeVault): add important comment about STAKED_TOKEN being immutable --- contracts/StakeVault.sol | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contracts/StakeVault.sol b/contracts/StakeVault.sol index ea2dd0e..1335a8a 100644 --- a/contracts/StakeVault.sol +++ b/contracts/StakeVault.sol @@ -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; /**