Commit Graph

18 Commits

Author SHA1 Message Date
r4bbit 74ff357142 fix(StakeVault): make unstaking actually work
Unstaking didn't actually work because it was using `transferFrom()` on the
`StakeVault` with the `from` address being the vault itself.
This would result in an approval error because the vault isn't creating
any approvals to spend its own funds.

The solution is to use `transfer` instead and ensuring the return value
is checked.
2024-01-19 09:57:34 +01:00
r4bbit edc44e0c6a
chore: make linter happy 2024-01-16 12:12:26 +01:00
r4bbit b5e513ce49
refactor(StakeVault): introduce `stakedToken()` API (#36)
Because the `stakedToken` property is `immutable`, solhint recommends to
make it in all caps. This commit changes the property to adhere to that
rule and also makes the property private.

To access the `stakedToken` there's now a `stakedToken()` function on
the contract.
2023-11-07 09:40:38 +01:00
r4bbit 70c74e2c2c
refactor(StakeVault): use custom error over error strings (#35) 2023-11-07 09:38:00 +01:00
r4bbit 2e7c5148b4
refactor: migrate repository to foundry-template (#6)
This commit migrates the repo to our foundry template, which ensures we
have consistent tooling across smart contract repositories that are
maintained by Vac.

This removes all hardhat related files and workflows and replaces them
with more perfomant foundry workflows.

It also sets up tests, CI and linting.
2023-09-12 18:37:30 +02:00
Frederico Teixeira 0e95ca428f Vault's contract gets ERC20 and Manager
as arguments
2023-08-21 08:21:59 +02:00
Frederico Teixeira 9d0bb25715 introduced a ^ in the solidity compiler version 2023-07-24 17:16:03 +02:00
Ricardo Guilherme Schmidt 9ba151266d
use solidity 0.8.18 for hardhat compatibility 2023-06-28 17:51:53 -03:00
Ricardo Guilherme Schmidt 6bf8d66221
force users to migrate or leave 2023-06-26 12:26:02 -03:00
Ricardo Guilherme Schmidt 6a05b57f40
fix import 2023-06-26 11:51:42 -03:00
Ricardo Guilherme Schmidt ef9cf77c3a
fix constructor 2023-06-25 11:44:12 -03:00
Ricardo Guilherme Schmidt fc74878977
fix compilation errors 2023-06-23 20:01:59 -03:00
Ricardo Guilherme Schmidt 1417e1721a
update solc 2023-06-23 19:24:59 -03:00
Ricardo Guilherme Schmidt 26da805fd9
add upgradability 2023-06-23 18:38:55 -03:00
Ricardo Guilherme Schmidt 4849cccb81
execute epoch, user reward 2023-06-21 11:20:23 -03:00
Ricardo Guilherme Schmidt 254afe9932
save progress 2023-05-24 10:25:52 -03:00
Ricardo Guilherme Schmidt a692d32516
add mint multiplier points 2023-05-23 19:10:37 -03:00
Ricardo Guilherme Schmidt d23afa676a
skel 2023-05-16 18:59:25 -03:00