Public repository for the Fluid Contracts from Instadapp
Go to file
2024-04-06 15:53:06 +00:00
.vscode gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
contracts gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
deployments gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
docs gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
lib gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
test gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
.env.example gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
.gitignore gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
.gitmodules gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
.prettierrc.json gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
foundry.toml gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
hardhat.config.ts gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
LICENSE gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
Makefile gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
package-lock.json gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
package.json gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
README.md gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
remappings.txt gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00
tsconfig.json gh_actions: added public release automation (#351) 2024-04-06 15:53:06 +00:00

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

See ./docs/deployment.md