https://liquity2-sepolia.vercel.app/
git clone [email protected]:liquity/bold.git
cd bold
pnpm install # install dependencies for all packages
Copy the .env
file to .env.local
:
cp .env .env.local
Edit the .env.local
file to set the environment variables.
Run the development server:
cd bold/frontend/app
pnpm build-deps # only needed once
pnpm dev
You can now open http://localhost:3000/ in your browser.
pnpm build # build the static app in out/
pnpm build-deps # build all the dependencies needed by the app
pnpm build-graphql # update the code generated from the GraphQL queries
pnpm build-panda # update the code generated from the Panda CSS config
pnpm build-uikit # builds the UI kit in ../uikit
pnpm dev # run the development server
pnpm fmt # format the code
pnpm lint # lint the code
pnpm test # run the tests
pnpm update-liquity-abis # build the contracts and update the ABIs
Create .env.local
from the .env
file and fill in the required values (see the description of each variable below).
cp .env .env.local
See ./src/env.ts for details about how the environment variables are being imported by the app.
Supported Variables
The Ethereum network to connect to.
# Example
NEXT_PUBLIC_CHAIN_ID=1
The name of the Ethereum network.
# Example
NEXT_PUBLIC_CHAIN_NAME=Ethereum
The currency of the Ethereum network.
# Format
NEXT_PUBLIC_CHAIN_CURRENCY=name|symbol|decimals
# Example
NEXT_PUBLIC_CHAIN_CURRENCY=Ether|ETH|18
The RPC URL for the Ethereum network.
# Example
NEXT_PUBLIC_CHAIN_RPC_URL=https://cloudflare-eth.com
The block explorer for the Ethereum network. Optional.
# Format
NEXT_PUBLIC_CHAIN_BLOCK_EXPLORER=name|url
# Example
NEXT_PUBLIC_CHAIN_BLOCK_EXPLORER=Etherscan|https://etherscan.io
The address of the ENS registry contract. Optional.
# Format
NEXT_PUBLIC_CHAIN_CONTRACT_ENS_REGISTRY=address
# Example
NEXT_PUBLIC_CHAIN_CONTRACT_ENS_REGISTRY=0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
The address of the ENS resolver contract. Optional.
# Format
NEXT_PUBLIC_CHAIN_CONTRACT_ENS_RESOLVER=address|blockCreated
# Example
NEXT_PUBLIC_CHAIN_CONTRACT_ENS_RESOLVER=0xce01f8eee7E479C928F8919abD53E553a36CeF67|19258213
The address of the Multicall contract. Optional.
# Format
NEXT_PUBLIC_CHAIN_CONTRACT_MULTICALL=address|blockCreated
# Example
NEXT_PUBLIC_CHAIN_CONTRACT_MULTICALL=0xca11bde05977b3631167028862be2a173976ca11|14353601
API key for CoinGecko integration. Use 'demo' for the demo API or 'pro' for the pro API.
# Format
NEXT_PUBLIC_COINGECKO_API_KEY=apiType|API_KEY
# Example
NEXT_PUBLIC_COINGECKO_API_KEY=pro|CG-xxxxxxxxxxxxxxxxxxxx
Smart contract address for the blocking list implementation. The contract must implement isBlackListed(address)(bool)
.
# Example
NEXT_PUBLIC_BLOCKING_LIST=0x97044531D0fD5B84438499A49629488105Dc58e6
VPNAPI.io detection to only allow certain country codes.
# Format
NEXT_PUBLIC_BLOCKING_VPNAPI=key|countryCodes
# Example
NEXT_PUBLIC_BLOCKING_VPNAPI=1234|US,CA
Enable or disable demo mode for testing purposes.
# Example
NEXT_PUBLIC_DEMO_MODE=false
URL for fetching known initiatives data (optional).
URL for fetching Liquity protocol statistics.
# Example
NEXT_PUBLIC_LIQUITY_STATS_URL=https://api.liquity.org/v2/testnet/sepolia.json
URL for the Safe transaction service API.
# Example
NEXT_PUBLIC_SAFE_API_URL=https://safe-transaction-mainnet.safe.global/api
URL for The Graph protocol subgraph queries.
# Example
NEXT_PUBLIC_SUBGRAPH_URL=https://api.studio.thegraph.com/query/…
Enable or disable Vercel Analytics for tracking application metrics.
# Example
NEXT_PUBLIC_VERCEL_ANALYTICS=false
A WalletConnect project ID which can be obtained by creating a WalletConnect project.
Addresses of the Liquity contracts.
src/
abi/ # ABIs of the Liquity contracts
app/ # The Next.js app (mostly routing only)
comps/ # UI Components
demo-mode/ # Files related to the app running in demo mode
screens/ # App Screens (used by /app routing components)
services/ # Service Components
tx-flows/ # Transaction Flows