# Basic Smart Contracts > Deploying Your Own ERC-20 Token **Published by:** [The Web3 Book](https://paragraph.com/@theweb3book/) **Published on:** 2024-11-29 **Categories:** solidity, ethereum, web3, blockchain, smartcontracts **URL:** https://paragraph.com/@theweb3book/erc20 ## Content Let’s explore:What ERC-20 tokens are.How to create and deploy your own token.Understanding functions like transfer, approve, and allowance.What is ERC-20 Token?> It stands for “Ethereum Request for Comments.”> A cryptocurrency token on ETH that follows a specific standard set of rules.> All tokens are identical and interchangeable, just like 1USD = 1USD no matter where you are!Steps to Build:Set up the environment (preferably Remix IDE).Write the ERC-20 contract (using OpenZeppelin’s library).Breaking it Down.Deploying on Sepolia Testnet.Test the token by transferring it between two accounts.Step 1: SetupVisit Remix IDE.Create a new file called Token.sol.Step 2: Write the ContractHere’s the code:// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // Importing OpenZeppelin's ERC-20 library import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract Token is ERC20 { // Constructor is run once when the contract is deployed constructor() ERC20("Web3Book", "W3B") { // That Mints 1000 tokens to the deployer's address // 1 Token = 10^18 smallest units (wei) _mint(msg.sender, 1000 * 10 ** decimals()); } }Step 3: Let’s Break it Down.Import OpenZeppelin’s Libraryimport "@openzeppelin/contracts/token/ERC20/ERC20.sol";This gives access to all the standard functions of an ERC-20 token (like transfer, approve, etc.), no more reinventing the wheel!.2. Contract Declarationcontract MyToken is ERC20 {}Specifies that our contract inherits all the ERC-20 functionalities from OpenZeppelin library.3. Constructorconstructor() ERC20("Web3Book", "W3B") {}Setting the name (Web3Book) and symbol (W3B) of the token.4. Minting Tokens_mint(msg.sender, 1000 * 10 ** decimals());Mints 1000 tokens (with 18 decimals by default) to the deployer’s (our ) wallet when the contract is deployed.Step 4: Deploy on Sepolia TestnetCompile the contract in Remix.Go to the “Solidity Compiler” tab and click Compile Token.sol.2. Deploy using Injected Provider (MetaMask).Switch your MetaMask to the Sepolia network. please!Go to the “Deploy & Run Transactions” tab.Select Injected Provider — MetaMask or Use WalletConnect to connect to Metamask and then deploy the contract.3. Minted TokensNow Check your MetaMask wallet — 1000 W3B tokens will appear under the assets section!You’re rich now! (by knowledge ofcourse!). Step 5: Test the TokenTransfer TokensCall the transfer function (with correct parameters!) to send tokens to another wallet.2. Add Token to MetaMaskCopy the contract address and add it in MetaMask as a custom token to view your token balance.Step 6: Understanding transfer(), approve() & allowance()1. transfer()The transfer function is used to send tokens from your wallet to someone else's wallet. 2. approve()The approve function allows someone (a spender) to spend a certain amount of your tokens on your behalf. 3. allowance()The allowance function checks how many tokens a spender is allowed to spend on your behalf. 4. balanceOf()It returns the token balance of a given Ethereum address. This was it for your first very basic Smart Contract! 🎉 ## Publication Information - [The Web3 Book](https://paragraph.com/@theweb3book/): Publication homepage - [All Posts](https://paragraph.com/@theweb3book/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@theweb3book): Subscribe to updates ## Optional - [Collect as NFT](https://paragraph.com/@theweb3book/erc20): Support the author by collecting this post - [View Collectors](https://paragraph.com/@theweb3book/erc20/collectors): See who has collected this post