BasicERC20Module.ts 589 B

1234567891011121314151617181920
  1. import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"
  2. /**
  3. * BasicERC20Module for deploying the BasicERC20 token contract
  4. */
  5. const BasicERC20Module = buildModule("BasicERC20Module", (m) => {
  6. // Contract parameters
  7. const tokenName = m.getParameter("name", "Default Token Name")
  8. const tokenSymbol = m.getParameter("symbol", "DTN")
  9. // Account index 0 is the owner and deployer
  10. const owner = m.getAccount(0)
  11. const basicERC20 = m.contract("BasicERC20", [tokenName, tokenSymbol, owner], {
  12. from: owner,
  13. })
  14. return { basicERC20 }
  15. })
  16. export default BasicERC20Module