import { ethers } from "hardhat";
async function main() {
  const sla = await ethers.getContractAt("AgentSLAEnforcer", "0xc0b7cFF13C7C7f4DAF36A7c67da47B2Cb311335D");
  const [deployer] = await ethers.getSigners();
  const isMonitor = await sla.monitors(deployer.address);
  console.log("deployer is monitor:", isMonitor);
  if (!isMonitor) {
    console.log("Setting monitor...");
    const tx = await sla.setMonitor(deployer.address, true);
    await tx.wait();
    const after = await sla.monitors(deployer.address);
    console.log("deployer is monitor now:", after);
  } else {
    console.log("Already set — contract working correctly ✓");
  }
}
main().catch(console.error);
