Skip to content

Instantly share code, notes, and snippets.

@Mauss01
Mauss01 / ej1.sol
Created November 23, 2024 01:48
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
// Constructor que inicializa el token con nombre y símbolo
constructor(uint256 initialSupply) ERC20("MyToken", "MTK") {
// Mintea el supply inicial al deployer
_mint(msg.sender, initialSupply);