staking/test
r4bbit d397466f75 feat(script): add deployment script for new `StakeManager`s
This is needed to deploy individual new `StakeManager` instances in
both, production environment and testing.

The script can be used as follows:

Within tests, to get a new `StakeManager` instance that has a reference
to an older `StakeManager` instance, run:

```solidity
function setUp() public virtual override {
    super.setUp();
    DeployMigrationStakeManager deployment = new DeployMigrationStakeManager(address(stakeManager), stakeToken);
    newStakeManager = deployment.run();
}
```

Where `address(stakeManager)` is the address of the current
`StakeManager` and `stakeToken` is the address of the stake token.

To deploy a new instance from the CLI using `forge`, one can make use of
the `PREV_STAKE_MANAGER` and `STAKE_TOKEN_ADDRESS` environment variables
like this:

```sh
$ PREV_STAKE_MANAGER=0x123 STAKE_TOKEN_ADDRES=0x456 forge script script/DeployMigrationStakeManager.s.sol
```

The script will revert when `STAKE_TOKEN_ADDRESS` is `address(0)`.

Closes #71
2024-02-29 11:19:18 -03:00
..
mocks fix(StakeVault): make unstaking actually work 2024-01-19 09:57:34 +01:00
script fix(StakeVault): make unstaking actually work 2024-01-19 09:57:34 +01:00
StakeManager.t.sol feat(script): add deployment script for new `StakeManager`s 2024-02-29 11:19:18 -03:00
StakeVault.t.sol fix(StakeVault): make unstaking actually work 2024-01-19 09:57:34 +01:00
VaultFactory.t.sol cleanup(VaultFactoryTest): remove unused import 2024-01-23 15:11:10 +01:00