-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Instructions | ||
|
||
## Requirements | ||
|
||
- [Node.js](https://nodejs.org/) (v20 or later) | ||
- [pnpm](https://pnpm.io/) (v8) | ||
- [Foundry](https://book.getfoundry.sh/getting-started/installation) | ||
|
||
## Dependencies | ||
|
||
```sh | ||
git clone [email protected]:liquity/bold.git | ||
cd bold | ||
pnpm install # install dependencies for all packages | ||
cd contracts | ||
forge install # install the contracts dependencies | ||
``` | ||
|
||
## Local setup | ||
|
||
```sh | ||
# Run the anvil local node (keep it running in a separate terminal): | ||
anvil | ||
|
||
# Build & deploy the contracts: | ||
cd contracts | ||
./deploy local --open-demo-troves # optionally open troves for the first 8 anvil accounts | ||
|
||
# Print the addresses of the deployed contracts (you will need them later): | ||
pnpm tsx utils/deployment-manifest-to-app-env.ts deployment-manifest.json | ||
|
||
# We are now ready to copy the deployed contracts to the app: | ||
cd ../frontend/app | ||
|
||
# Copy the example .env file: | ||
cp .env .env.local | ||
|
||
# Edit the .env.local file: | ||
# - Make sure the Hardhat / Anvil section is uncommented. | ||
# - Paste into it the addresses printed by command above. | ||
|
||
# Run the app development server: | ||
pnpm dev | ||
|
||
# You can now open https://localhost:3000 in your browser. | ||
``` | ||
|
||
See [frontend/app/README.md](./frontend/app/README.md) for more details about the app development. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Liquity V2 | ||
![Liquity V2](https://github.com/user-attachments/assets/b3ffbc5e-b7a8-46b6-a080-e18a0792bb64) | ||
|
||
[![Coverage Status](https://coveralls.io/repos/github/liquity/bold/badge.svg?branch=main&t=yZSfc8)](https://coveralls.io/github/liquity/bold?branch=main) | ||
|
||
|
@@ -1570,52 +1570,3 @@ This may be used to lock in a bit more bad debt. | |
Liquidations already carry a collateral premium to the caller and to the liquidators. | ||
|
||
Redemptions at this CR may allow for a bit more bad debt to be redistributed which could cause a liquidation cascade, however the difference doesn't seem particularly meaningful when compared to how high the Liquidation Premium tends to be for liquidations. | ||
|
||
## Requirements | ||
|
||
- [Node.js](https://nodejs.org/) | ||
- [pnpm](https://pnpm.io/) | ||
- [Foundry](https://book.getfoundry.sh/getting-started/installation) | ||
|
||
|
||
|
||
## Setup | ||
|
||
```sh | ||
git clone [email protected]:liquity/bold.git | ||
cd bold/contracts | ||
forge install | ||
cd .. | ||
pnpm install | ||
``` | ||
|
||
## How to develop | ||
|
||
```sh | ||
# Run the anvil local node (keep it running in a separate terminal): | ||
anvil | ||
|
||
# First, the contracts: | ||
cd contracts | ||
|
||
# Build & deploy the contracts: | ||
./deploy local --open-demo-troves # optionally open troves for the first 8 anvil accounts | ||
|
||
# Print the addresses of the deployed contracts: | ||
pnpm tsx utils/deployment-manifest-to-app-env.ts deployment-manifest.json | ||
|
||
# We are now ready to pass the deployed contracts to the app: | ||
cd ../frontend/app | ||
|
||
# Copy the example .env file: | ||
cp .env .env.local | ||
|
||
# Edit the .env.local file: | ||
# - Make sure the Hardhat / Anvil section is uncommented. | ||
# - Copy into it the addresses printed by command above. | ||
|
||
# Run the app development server: | ||
pnpm dev | ||
|
||
# You can now open https://localhost:3000 in your browser. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,30 @@ | |
|
||
## Preview | ||
|
||
<https://liquity2.vercel.app/> | ||
<https://liquity2-sepolia.vercel.app/> | ||
|
||
## Requirements | ||
|
||
- [Node.js](https://nodejs.org/) | ||
- [pnpm](https://pnpm.io/) | ||
- [Node.js](https://nodejs.org/) (v20 or later) | ||
- [pnpm](https://pnpm.io/) (v8) | ||
|
||
## Setup | ||
## Dependencies | ||
|
||
```sh | ||
git clone [email protected]:liquity/bold.git | ||
cd bold | ||
pnpm install | ||
pnpm install # install dependencies for all packages | ||
``` | ||
|
||
## How to develop | ||
|
||
Run the Hardhat Network local node: | ||
Copy the `.env` file to `.env.local`: | ||
|
||
```sh | ||
cd bold/contracts | ||
ACCOUNTS_BALANCE=1000 pnpm hardhat node # ACCOUNTS_BALANCE=1000 is optional but nicer than the default values in the UI | ||
``` | ||
|
||
Deploy the contracts: | ||
|
||
```sh | ||
cd bold/contracts | ||
pnpm hardhat run --network localhost utils/deploymentDev.js | ||
cp .env .env.local | ||
``` | ||
|
||
Copy the addresses of the deployed contracts to the `.env.local` file. | ||
Edit the `.env.local` file to set the environment variables. | ||
|
||
Run the development server: | ||
|
||
|
@@ -45,8 +37,6 @@ pnpm dev | |
|
||
You can now open <http://localhost:3000/> in your browser. | ||
|
||
See also `contracts/hardhatAccountsList2k.js` to import the accounts into MetaMask (the deployment script opens troves for the first six accounts). | ||
|
||
## Scripts | ||
|
||
```sh | ||
|