This repository contains the smart contracts for integration with the Notional protocol. Savings Vault is implemented according to the ERC4626 standard.
Scripts & tests depend on several environment variables to work, as well as external services for some additional functionality.
You will need to create an .env
file in the root folder and provides values for variables according to the .env.example
file.
cp .env.example .env
In case you don't have `Foundry installed make sure to follow the steps described in the following link.
- Use Foundry:
forge install
forge build
- Use Hardhat:
npm install
npx hardhat compile
- Write / run tests with either Hardhat or Foundry:
forge test
# or
npx hardhat test
- Install libraries with Foundry which work with Hardhat.
forge install rari-capital/solmate # Already in this repo, just an example
- Update libraries with Foundry:
forge update
Whenever you install new libraries using Foundry, make sure to update your remappings.txt
file by running forge remappings > remappings.txt
. This is required because we use hardhat-preprocessor
and the remappings.txt
file to allow Hardhat to resolve libraries you install with Foundry.
The openzeppelin-contract-upgradeable library has been set to commit 54803be6
since there were some changes to how ERC4626Upgradeable
contract handles the decimals of underlying asset in later versions. In case this library is updated, be aware that some tests are going to be failing.
The primary license for Phuture Savings Vault V1 is the Business Source License 1.1 (BUSL-1.1
), see LICENSE_PHUTURE
.
- Files in
src/interfaces/
are licensed underGPL-2.0-or-later
(as indicated in their SPDX headers), seesrc/interfaces/LICENSE_GPL
- Files in
src/libraries/
are licensed underGPL-2.0-or-later
(as indicated in their SPDX headers), seesrc/libraries/LICENSE_GPL
- Files in
src/external/
are licensed underMIT
(as indicated in their SPDX headers), seesrc/external/LICENSE_MIT
- Several files in
src/external/notional/interfaces
are licensed underAGPL-3.0-only
(as indicated in their SPDX headers), seesrc/external/notional/interfaces/LICENSE_AGPL
- Several files in
src/external/notional/interfaces
are licensed underGPL-3.0-only
(as indicated in their SPDX headers), seesrc/external/notional/interfaces/LICENSE_GPL
- All files in
test
andsrc/test
remain unlicensed.