This commit enables users to stake multiple times into the same vault
with a lock increase.
If their total lock increase goes beyond the maximum lock period,
staking will revert. In this case users will have to create a new vault.
Closes#152
Co-authored-by: Andrea Franz <andrea@gravityblast.com>
We put `cancun` as evm version into the foundry toml by mistake and
ended up building on top of it with certain assumptions.
Turns out that the network we're deploying to does not support that
version so we have to compile with `paris`.
This however, also requires a downgrade of the open zeppelin libraries,
which in turn requires changes in our code base. Primarily related to
initialization of `OwnableUpgradeable` and upgrades via UUPSUpgradeable.
This commit makes all the necessary changes.
error
One of our tests uses too many local variables and causes stack too deep
errors unless optimized `--via-ir`.
We've introduced `--via-ir` to work around that until a proper fix is
done. The downside of using that option is that compilation times get
significantly longer.
This commit restructures the test such that it doesn't use as many local
variables.
Those were missing and now added.
Because of this we're running into stack to deep errors in test, so we
have to enable `via_ir` by default for now until we split things up.
ones
There are a bunch of error codes that are either similar to other ones
or not used at all.
This commit moves them to the interface and removes the ones that aren't
used anymore. Part of the reason we have so many unused errors becuase
they had been "reintroduced" in `StakeMath`, which we'll revisit as
well as described in #130
This commit introduces a function `migrateToVault(address)` that allows
`StakeVault`s to migrate to other `StakeVault` instances.
The idea is that, when an upgrade was done on the stake manager, it
might introduces functions that can't be accessed through the stake
vaults that are out there.
Users will have to create new stake vault instances that provide the
necessary functionality.
`migrateToVault()` allows them to do so.
Closes#127