29 lines
725 B
TypeScript
29 lines
725 B
TypeScript
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);
|
|
|