Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre committed Dec 17, 2024
2 parents 18d22aa + 02312e6 commit 3ff8976
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 68 deletions.
48 changes: 48 additions & 0 deletions INSTRUCTIONS.md
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.
51 changes: 1 addition & 50 deletions README.md
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)

Expand Down Expand Up @@ -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.
```
26 changes: 8 additions & 18 deletions frontend/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down

0 comments on commit 3ff8976

Please sign in to comment.