Create your own Token

Description:

A simple verified smart contract to create your own token.
After the creation of your coin, you can find your token on Uniswap or another DEX by your contract number, and then add a pool and buy your token.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Brut code:

// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Importing the ERC20 implementation from OpenZeppelin import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; /// @title Currency /// @notice This ERC-20 contract mints a given amount of tokens to a specified wallet contract Monnaie is ERC20 { constructor( string memory _name, string memory _symbol, uint256 _supply, address _wallet ) ERC20(_name, _symbol) { // Initial minting of tokens to the specified address (_wallet) _mint(_wallet, _supply); } } /// @title TokenFactory /// @notice This contract allows creating new tokens by calling the createToken function. contract TokenFactory { // Event to notify the creation of a new token event TokenCreated(address tokenAddress); /// @notice Creates a new ERC-20 token. /// @param _name The full name of the token. /// @param _symbol The symbol (abbreviation) of the token. /// @param _supply The total amount of tokens to create (beware of decimals; here the amount is raw). /// @param _wallet The address that will receive the entire supply of created tokens. /// @return The address of the new token contract. function createToken( string memory _name, string memory _symbol, uint256 _supply, address _wallet ) public returns (address) { Monnaie newToken = new Monnaie(_name, _symbol, _supply, _wallet); emit TokenCreated(address(newToken)); return address(newToken); } }

Tags: own, token, create, coin, Ethereum, contract

Submitted on: 2025-03-31 15:36:15


Comments

Log in to comment.

No comments yet.