Skip to content

Instantly share code, notes, and snippets.

@Apolloelephen
Last active May 17, 2024 11:23
Show Gist options
  • Save Apolloelephen/7daecb7a35bf8e2e93d89b29becfa4e8 to your computer and use it in GitHub Desktop.
Save Apolloelephen/7daecb7a35bf8e2e93d89b29becfa4e8 to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor() ERC20("MyToken", "MT") {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
}
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules";
const TokenModule = buildModule("TokenModule", (m) => {
const token = m.contract("MyToken");
return { token };
});
export default TokenModule;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment