import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";

const EasyTokensModule = buildModule("EasyTokensModule", (m) => {
  // Deployer/admin account (receives all roles in both constructors)
  const admin = m.getAccount(0);

  // Parameters with sensible defaults per project preferences
  const erc20Name = m.getParameter("erc20Name", "EasyBRL");
  const erc20Symbol = m.getParameter("erc20Symbol", "eBRL");

  const erc721Name = m.getParameter("erc721Name", "EasyToken");
  const erc721Symbol = m.getParameter("erc721Symbol", "eToken");

  // Deploy ERC20 (EasyBRLStable) and ERC721 (EasyTokenDocument)
  const easyBRLStable = m.contract("EasyBRLStable", [admin, erc20Name, erc20Symbol]);
  const easyTokenDocument = m.contract("EasyTokenDocument", [admin, erc721Name, erc721Symbol]);

  return { easyBRLStable, easyTokenDocument };
});

export default EasyTokensModule;
