Initial commit
This commit is contained in:
31
scripts/deploy.ts
Normal file
31
scripts/deploy.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user