Documentation Index
Fetch the complete documentation index at: https://mintlify.com/reserve-protocol/reserve-index-dtf/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Reserve Folio uses Foundry’s scripting system for deterministic, reproducible deployments. The deployment process handles both genesis deployments (protocol infrastructure) and follow-up deployments (Folio instances).Deployment Architecture
Deployments occur in two phases:Genesis Deployment
Deploy core protocol infrastructure:
FolioDAOFeeRegistry: DAO fee managementFolioVersionRegistry: Version control for upgradesTrustedFillerRegistry: Whitelisted auction fillers
Deployment Script
The main deployment script is located atscript/Deploy.s.sol:
Deploy.s.sol
Supported Networks
Production Networks
Ethereum Mainnet
Chain ID:
1Base
Chain ID:
8453BNB Chain
Chain ID:
56Network Configuration
Each network has predefined deployment parameters:Deployment Process
Prerequisites
Deployment Commands
Deploy to Ethereum Mainnet
Deploy to Base
Deploy to BNB Chain
The
--verify flag automatically verifies contracts on block explorers. The API key is read from ETHERSCAN_KEY environment variable and works for all explorers (Etherscan, Basescan, BscScan).Custom RPC Endpoint
Use a custom RPC URL:Deployment Modes
The deployment script supports two modes:Production Mode
- Role registries
- Fee recipients (DAO multisig)
- Version registries
- Trusted filler registries
Testing Mode
- Development testing
- Integration testing
- Staging environments
Local Deployment
Deploy to Local Anvil
Local deployments automatically use mock contracts for:MockRoleRegistry: Simplified role management- Burn address for fees (address(1))
Deployment Output
Successful deployment outputs contract addresses:Save these addresses for future reference and verification.
Contract Verification
Contracts are automatically verified when using the--verify flag. Manual verification:
Post-Deployment
Verify Deployment
Register Version
After deployment, register the new Folio version:Deployment Checklist
Troubleshooting
Deployment fails with 'insufficient funds'
Deployment fails with 'insufficient funds'
Ensure the deployer address has enough ETH for gas fees. Check your balance:
Verification fails
Verification fails
- Verify the
ETHERSCAN_KEYis correct - Check that the contract bytecode matches
- Wait a few minutes and retry verification
- Use the
--watchflag for automatic retries
Wrong network parameters
Wrong network parameters
The script automatically selects parameters based on
block.chainid. Verify you’re connected to the correct network:Nonce too low error
Nonce too low error
Another transaction may be pending. Wait for it to complete or increase the nonce manually.
Security Considerations
Next Steps
Testing
Run comprehensive tests
Contributing
Contribute to the protocol