vsuite-integrations
Documentation of vsuite-integrations
The vsuite-integrations are contracts built on top of vsuite to offer ethereum staking services to end users
Dependencies
You can then install all the other dependencies by running
make install
Installation
git clone git@github.com:kilnfi/vsuite.git --recurse-submodules
Testing
Unit Testing
Unit tests can be found in most of the files inside the test directory. You can run all the unit tests by doing.
make test
E2E Testing
A suite of E2E test files can be found in test/e2e. This test suite will use the deployment scripts found in scripts to run the deployment process inside a local anvil node. Then it will run tests on top of that state. You will need a running instance of anvil to run these tests.
You can run all the E2E tests by doing
# In one terminal that we leave opened
anvil
# In another terminal
make test-e2e
Gas Snapshotting
Some tests contain manual gas snapshots. You can usually find these tests inside the E2E test suites. The generated gas snapshots can be found in .forge-snapshots.
Tests will fail if the resulting gas snapshot value does not match the one stored on file. In order to override the files on disk, you can run
# In one terminal that we leave opened
anvil
# In another terminal
make test-force-snapshots test-e2e-force-snapshots
Static Analysis
You can run slither on the repository by running
make analyze
Formatting
You can format the repository by using
make format
and verify the formatting by running
make test-format
Deployment
The deployment uses the deploy.sol library to create artifacts using solidity.
Configuring a deployment
The configuration for a deployment can be made in a dedicated file that contains all the configuration variables required to deploy the system. Here is the example for the goerli configuration
And the Deploy.s.sol contract must be tweaked to add the network in the setUp() method.
Required variables to deploy integration contracts
admin: This address is the administrator of the integration deployment factory.proxyAdmin: This address is required to be a different one than the admin as we use a Transparent Proxy pattern.
Fixes
The same steps found in the kilnfi/vsuite repository README can be applied to deploy a fix to an integration contract.