Initial commit
This commit is contained in:
28
scripts/configure.ts
Normal file
28
scripts/configure.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { ethers } from "ethers";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* Configuration Script
|
||||
* Configures deployed contracts with initial parameters
|
||||
*/
|
||||
async function main() {
|
||||
const provider = new ethers.JsonRpcProvider(process.env.RPC_URL);
|
||||
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
|
||||
|
||||
console.log("Configuring contracts with address:", wallet.address);
|
||||
|
||||
// Configuration tasks:
|
||||
// 1. Set Config Registry parameters
|
||||
// 2. Register Policy Modules
|
||||
// 3. Configure Oracle Adapter
|
||||
// 4. Grant roles
|
||||
// 5. Set allowed assets
|
||||
// 6. Configure provider caps
|
||||
|
||||
console.log("⚙️ Configuration complete!");
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
|
||||
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);
|
||||
|
||||
22
scripts/simulate.ts
Normal file
22
scripts/simulate.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { StressTester } from "../simulation/src/stress-test";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* Simulation Script
|
||||
* Runs comprehensive simulations
|
||||
*/
|
||||
async function main() {
|
||||
const rpcUrl = process.env.RPC_URL || "";
|
||||
|
||||
console.log("🧪 Running simulations...");
|
||||
|
||||
const tester = new StressTester(rpcUrl);
|
||||
await tester.runStressTests();
|
||||
|
||||
console.log("✅ Simulations complete!");
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
|
||||
27
scripts/testnet.ts
Normal file
27
scripts/testnet.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ethers } from "ethers";
|
||||
import * as dotenv from "dotenv";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
/**
|
||||
* Testnet Deployment Script
|
||||
* Deploys to testnet with test parameters
|
||||
*/
|
||||
async function main() {
|
||||
const provider = new ethers.JsonRpcProvider(process.env.TESTNET_RPC_URL);
|
||||
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
|
||||
|
||||
console.log("Deploying to testnet with address:", wallet.address);
|
||||
|
||||
// Deploy with testnet parameters
|
||||
// Use testnet addresses for:
|
||||
// - Aave Pool
|
||||
// - Uniswap Router
|
||||
// - Balancer Vault
|
||||
// - Chainlink Feeds
|
||||
|
||||
console.log("📦 Testnet deployment complete!");
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
|
||||
Reference in New Issue
Block a user