mirror of
https://github.com/Instadapp/fluid-contracts-public.git
synced 2024-07-29 21:57:37 +00:00
Public repository for the Fluid Contracts from Instadapp
d7a58e88ff
ARB: deploy protocols |
||
---|---|---|
.vscode | ||
contracts | ||
deployments | ||
docs | ||
lib | ||
test | ||
.env.example | ||
.gitignore | ||
.gitmodules | ||
.prettierrc.json | ||
foundry.toml | ||
hardhat.config.ts | ||
LICENSE | ||
Makefile | ||
package-lock.json | ||
package.json | ||
README.md | ||
remappings.txt | ||
tsconfig.json |
Fluid
Instadapp Fluid is a combination of DeFi protocols with a Liquidity layer at the core. New protocols will be added to the architecture over time with liquidity automatically being available to those newer protocols.
See docs.md for technical docs.
Development
Create a .env
file and set the MAINNET_RPC_URL
and other params like in .env.example
.
Install
Install Foundry.
Install dependencies
forge install foundry-rs/forge-std --no-git
forge install a16z/erc4626-tests --no-git
forge install transmissions11/solmate@b5c9aed --no-git
forge install OpenZeppelin/openzeppelin-contracts@v4.8.2 --no-git
forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v4.8.2 --no-git
Install npm dependencies:
npm i
Forge
Build
forge build
Test
forge test
or for full logs
forge test -vvvv
or in a certain folder
forge test -vvv --mp "test/foundry/liquidity/**/**.sol"
Gas usage snapshot
Creates current gas usage for tests
forge snapshot
Create gas report and store it in file:
forge test --gas-report
Or to store in file:
forge snapshot > .gas-snapshot
forge test --gas-report > .gas-report
(or make gas-report
if you have make installed)
Contract size
With hardhat:
npx hardhat size-contracts
With foundry:
forge build --sizes
Genearting docs
With foundry:
forge doc
See https://book.getfoundry.sh/reference/forge/forge-doc
Deployment, dev internal docs etc.
See dev internal docs in ./docs/internal-dev/