|
| 1 | +# Deployments Directory |
| 2 | + |
| 3 | +This directory contains JSON files with deployment information for each network deployment. |
| 4 | + |
| 5 | +## File Structure |
| 6 | + |
| 7 | +### Timestamped Deployments |
| 8 | + |
| 9 | +- `sepolia-1703123456.json` - Deployment on Sepolia at timestamp 1703123456 |
| 10 | +- `mainnet-1703234567.json` - Deployment on Mainnet at timestamp 1703234567 |
| 11 | + |
| 12 | +### Latest Deployments |
| 13 | + |
| 14 | +- `sepolia-latest.json` - Most recent Sepolia deployment |
| 15 | +- `mainnet-latest.json` - Most recent Mainnet deployment |
| 16 | + |
| 17 | +## JSON Structure |
| 18 | + |
| 19 | +Each deployment file contains: |
| 20 | + |
| 21 | +```json |
| 22 | +{ |
| 23 | + "deployer": "0x1234...", |
| 24 | + "chainId": 11155111, |
| 25 | + "blockNumber": 4567890, |
| 26 | + "timestamp": 1703123456, |
| 27 | + "network": "sepolia", |
| 28 | + "lockState": 0, |
| 29 | + "coreProtocolFee": 0, |
| 30 | + "invoiceProtocolFeeBPS": 0, |
| 31 | + "frendLendProtocolFeeBPS": 0, |
| 32 | + "adminAddress": "0x1234...", |
| 33 | + "bullaClaim": "0xabc123...", |
| 34 | + "bullaInvoice": "0xdef456...", |
| 35 | + "bullaFrendLend": "0x789ghi...", |
| 36 | + "controllerRegistry": "0xjkl012...", |
| 37 | + "whitelistPermissions": "0xmno345...", |
| 38 | + "approvalRegistry": "0xpqr678..." |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +## Usage |
| 43 | + |
| 44 | +### Reading Latest Deployment |
| 45 | + |
| 46 | +```bash |
| 47 | +# Get latest Sepolia deployment addresses |
| 48 | +cat deployments/sepolia-latest.json | jq '.bullaClaim' |
| 49 | +``` |
| 50 | + |
| 51 | +### Integration with Scripts |
| 52 | + |
| 53 | +The deployment addresses can be easily imported into other scripts: |
| 54 | + |
| 55 | +```javascript |
| 56 | +const deployment = require("./deployments/sepolia-latest.json"); |
| 57 | +console.log("BullaClaim address:", deployment.bullaClaim); |
| 58 | +``` |
| 59 | + |
| 60 | +### Environment Variable Generation |
| 61 | + |
| 62 | +```bash |
| 63 | +# Generate .env file from deployment |
| 64 | +node -e " |
| 65 | +const d = require('./deployments/sepolia-latest.json'); |
| 66 | +console.log(\`BULLA_CLAIM_ADDRESS=\${d.bullaClaim}\`); |
| 67 | +console.log(\`BULLA_INVOICE_ADDRESS=\${d.bullaInvoice}\`); |
| 68 | +console.log(\`BULLA_FRENDLEND_ADDRESS=\${d.bullaFrendLend}\`); |
| 69 | +" |
| 70 | +``` |
0 commit comments