Skip to content

Commit 0bd970a

Browse files
committed
refactor: update documentation generation in Makefile and add comprehensive Foundry & Makefile guide
1 parent 88beab1 commit 0bd970a

File tree

3 files changed

+595
-15
lines changed

3 files changed

+595
-15
lines changed

Makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -385,18 +385,4 @@ safe-change-owner: validate-deploy change-owner
385385
# Documentation
386386
.PHONY: docs
387387
docs:
388-
@echo "Generating documentation..."
389-
@echo "Forge Scripts Documentation:" > docs/forge-scripts.md
390-
@echo "" >> docs/forge-scripts.md
391-
@echo "## Available Scripts" >> docs/forge-scripts.md
392-
@echo "" >> docs/forge-scripts.md
393-
@echo "### DeployLBC.s.sol" >> docs/forge-scripts.md
394-
@echo "Deploys the LiquidityBridgeContract with proxy and admin." >> docs/forge-scripts.md
395-
@echo "" >> docs/forge-scripts.md
396-
@echo "### UpgradeLBC.s.sol" >> docs/forge-scripts.md
397-
@echo "Upgrades the LiquidityBridgeContract to V2." >> docs/forge-scripts.md
398-
@echo "" >> docs/forge-scripts.md
399-
@echo "### ChangeOwnerToMultiSig.s.sol" >> docs/forge-scripts.md
400-
@echo "Transfers ownership to a multisig wallet." >> docs/forge-scripts.md
401-
@echo "" >> docs/forge-scripts.md
402-
@echo "Documentation generated in docs/forge-scripts.md"
388+
@echo "Documentation is available in docs/FOUNDRY_MAKEFILE_GUIDE.md"

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,58 @@ Returns the amount of pegout collateral locked by a liquidity provider \* addr:
392392
#### Return value
393393

394394
The amount of locked collateral for pegout operations
395+
396+
## Development & Deployment
397+
398+
### Foundry & Makefile
399+
400+
This project uses **Foundry** for smart contract development and deployment. We provide a comprehensive Makefile for easy deployment across different networks.
401+
402+
#### Quick Start
403+
404+
```bash
405+
# Setup environment
406+
cp example.env .env
407+
make install
408+
make build
409+
410+
# Test deployment (simulation)
411+
make deploy-lbc NETWORK=testnet
412+
413+
# Actual deployment
414+
make deploy-lbc-broadcast NETWORK=testnet
415+
```
416+
417+
#### Documentation
418+
419+
- **[Complete Guide](./docs/FOUNDRY_MAKEFILE_GUIDE.md)** - Comprehensive documentation for Foundry and Makefile usage
420+
421+
#### Key Features
422+
423+
- **Multi-network support**: Mainnet, Testnet, Dev environments
424+
- **Fork testing**: Test against forked networks
425+
- **Safety validation**: Environment checks and mainnet confirmations
426+
- **Simulation vs Deployment**: Separate commands for testing and actual deployment
427+
428+
#### Common Commands
429+
430+
```bash
431+
# Deployment
432+
make deploy-lbc NETWORK=testnet # Simulation
433+
make deploy-lbc-broadcast NETWORK=testnet # Actual deployment
434+
435+
# Upgrades
436+
make upgrade-lbc NETWORK=testnet # Simulation
437+
make upgrade-lbc-broadcast NETWORK=testnet # Actual upgrade
438+
439+
# Fork testing
440+
make testnet-fork-deploy # Testnet fork simulation
441+
make testnet-fork-deploy-broadcast # Testnet fork actual deployment
442+
443+
# Utilities
444+
make get-versions # Get contract versions
445+
make check-env NETWORK=testnet # Environment validation
446+
make help # Show all commands
447+
```
448+
449+
For detailed usage instructions, see the [Foundry & Makefile Guide](./docs/FOUNDRY_MAKEFILE_GUIDE.md).

0 commit comments

Comments
 (0)