Files
no_five/scripts/deploy.ts
2025-11-20 15:35:25 -08:00

32 lines
742 B
TypeScript

import { ethers } from "ethers";
import * as dotenv from "dotenv";
dotenv.config();
/**
* Deployment Script
* Deploys all contracts in the correct order
*/
async function main() {
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
console.log("Deploying contracts with address:", wallet.address);
// Deployment order (respects dependencies):
// 1. Oracle Adapter
// 2. Config Registry
// 3. Policy Modules
// 4. Policy Engine
// 5. Vault
// 6. Flash Router
// 7. Collateral Manager
// 8. Governance Guard
// 9. Kernel
console.log("📦 Deployment complete!");
}
main().catch(console.error);