How to Create your Own Cryptocurrency - Testnet Token (2024)

Cryptocurrency is a new way of exchanging value, rewarding users, and paying for what you purchased. It’s often seen as the digital version of money on the internet.

According to Wikipedia: “A cryptocurrency is a tradable digital asset or digital form of money that is built on blockchain technology and only exists online.”

This tutorial will guide you on how to create and deploy your own cryptocurrency on the Rinkeby Testnet blockchain, which is transferable to other crypto wallet addresses.

Prerequisites

Before you continue with this tutorial, you should:

  • Have Metamask installed.
  • Have a basic knowledge of the Remix IDE.
  • Have a basic understanding of Solidity smart contract, which you can find here.

What Are Some Reasons to Create Your Own Cryptocurrency?

  • Testing purpose during dApp development.
  • Rewarding your users.
  • Membership coin.
  • In-game currency.
  • Fun currency owned by you and your friends.

    In this tutorial, we’ll create a fun cryptocurrency that we can share with our friends for either completing a task or winning a bet.

Step 1 - Writing the Smart Contract

The first step is to write a smart contract that will handle our cryptocurrency functionalities.

You can name your cryptocurrency whatever you want, but for this tutorial, we'll name our cryptocurrency "UncleBigBay and Friends Token" with a symbol of "UBBFT".

  • Launch the Remix IDE by clicking here:

    How to Create your Own Cryptocurrency - Testnet Token (1)

  • In the contracts folder, create a new .sol file with the name of your currency, like this: UncleBigBay_and_Friends_Token.sol.

    How to Create your Own Cryptocurrency - Testnet Token (2)

  • Copy and paste the following smart contract inside of your .sol file:

// SPDX-License-Identifier: MITpragma solidity ^0.8.13;// Token Smart Contractcontract UncleBigBay_and_Friends_Token { // 1. Token balance for address mapping (address => uint) public balances; // 2. Authorized amount allowed for others to spend mapping (address => mapping (address => uint)) public allowance; // 3. Token name string public name = "UncleBigBay and Friends Token"; // 4. Token Symbol string public symbol = "UBBFT"; // 5. Token Decimals uint public decimals = 18; // 6. Initial Supply uint public tokensIActuallyWant = 9000000; uint public totalTokenSupply = tokensIActuallyWant * 10 ** decimals; // 7. Assign the total supply to the owner constructor(){ balances[msg.sender] = totalTokenSupply; } // 8. Get balance of token owners function balanceOf(address owner) public view returns (uint){ return balances[owner]; } // 9. Transfer and Approval event event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); // 10. 2 party transfer token from one wallet to another wallet address function transfer(address to, uint value) public returns(bool){ // If transfer value is lower than the balance in the wallet require (balanceOf(msg.sender) >= value, 'Your balance is too low'); // Increase the balance of the receiver balances[to] = balances[to] + value; // Deduct the balance of the sender balances[msg.sender] = balances[msg.sender] - value; // Call the transfer function emit Transfer(msg.sender, to, value); // exit return true; } // 11. 3 party transfer token from one address to another address (requires approval) function transferFrom(address from, address to, uint value) public returns(bool){ // If transfer value is lower than the balance in the wallet require(balanceOf(from) >= value, 'Your balance is too low'); // If the transfer amount is higher than the authorized allowance require(allowance[from][msg.sender] >= value, 'You can not spend up to this amount'); // Increase the balance of the receiver balances[to] += value; // Deduct the balance of the sender balances[from] -= value; // Call the transfer function emit Transfer(from, to, value); // exit return true; } // 12. Function to approve token transactions function approve(address spender, uint value) public returns(bool){ // Check the authorized allowance of the spender allowance[msg.sender][spender] = value; // Approve the transaction if they don't exceed their allowance emit Approval(msg.sender, spender, value); // exit return true; } }

In our smart contract above,, we're creating a total supply of 9 million UBBFT tokens with the following functions:

  1. The transfer() function enables our token holders to transfer from their wallets to other wallet addresses.

  2. The transferFrom() function enables approval of token transactions, using the allowance mechanism, so that the spender doesn’t spend more than their token limits. It also allows our token holders to spend tokens on our behalf, for a gas fee or transaction confirmation on the blockchain.

  3. The approve() function authorizes the transferFrom() transaction if the spender hasn’t reached its limit.

The transfer of tokens between wallet addresses is known as the Transfer event, while the authorization of token transactions is known as the Approval event.

Step 2 - Compiling the Smart Contract

In this step, we're going to compile our token smart contract using the Remix IDE compiler.

Follow the steps below to compile your smart contract:

How to Create your Own Cryptocurrency - Testnet Token (5)

If the "Solidity Compiler" green check turns to red, select the same smart contract version in the "Compiler" tab.

Step 3 - Getting a Rinkeby Testnet Token

In this step, we're going to deploy our smart contract on the Rinkeby Testnet. We also need some Rinkeby Testnet tokens in our wallet to pay for the smart contract deployment gas fee.

We’ll use FaucETH, a website in which you can transfer some free fake ether to your wallet.

Make sure to have Metamask installed on your browser or install it here before you proceed.

How to Create your Own Cryptocurrency - Testnet Token (6)

  • Next, click on your Metamask icon, make sure to select the "Rinkeby Test Network", and copy your wallet address.

How to Create your Own Cryptocurrency - Testnet Token (7)

  • Next, paste your wallet address inside of the input box, as shown below:

How to Create your Own Cryptocurrency - Testnet Token (8)

  • Select the Rinkeby option, solve the captcha, and click on the "Request Fund" button to process your free ETH:

How to Create your Own Cryptocurrency - Testnet Token (9)

Wait for the page to process your request (this could take a few minutes):

How to Create your Own Cryptocurrency - Testnet Token (10)

If the requested fund is successful, you'll be notified, as shown below:

How to Create your Own Cryptocurrency - Testnet Token (11)

Next, check your Metamask wallet. Your wallet should be credited with 0.45ETH, like this:

How to Create your Own Cryptocurrency - Testnet Token (12)

Note: You can only request free ether every 60 minutes.

Step 4 - Deploying the Smart Contract

After compiling our smart contract (see Step 2) and funding your wallet with a fake ETH token, the next thing to do is to deploy the smart contract on the Rinkeby Ethereum blockchain.

Rinkeby is an Ethereum Testnet network that’s used to test blockchain development before deploying on the Mainnet network.

You can deploy your smart contract on any Testnet blockchain of your choice, just make sure to have the token to pay for the gas fee.

Deploying on the Mainnet blockchain will require real money for the deployment gas fee.

Follow the steps below to deploy your smart contract on the Rinkeby Ethereum blockchain:

  • In Metamask, switch from the Mainnet to the Rinkeby network:

    How to Create your Own Cryptocurrency - Testnet Token (13)

  • Click on the "Deploy & Run Transaction" icon in the Remix sidebar.

  • Select "Injected Web3" as the environment.

  • Choose your smart contract name in the "Contract" section.

  • Leave the other default options as they are, and click on the "Deploy" button: How to Create your Own Cryptocurrency - Testnet Token (14)

  • The "Deploy" button will trigger Metamask. From your Metamask pop-up dialog box, click on the "Confirm" button:

    How to Create your Own Cryptocurrency - Testnet Token (15)

  • Next, wait for the smart contract to deploy:

    How to Create your Own Cryptocurrency - Testnet Token (16)

  • When your smart contract is deployed, you’ll receive a notification in your Remix IDE terminal, as shown below and you’ll be able to access your smart contract address under the "Deployed Contracts" section:

    How to Create your Own Cryptocurrency - Testnet Token (17)

Step 5 - Importing Our Token in Metamask

In this step, we're going to import our deployed token into our Metamask wallet.

  • Copy your token smart contract address:

    How to Create your Own Cryptocurrency - Testnet Token (18)

  • On your Metamask, switch to the deployed network, which in this case is the “Rinkeby Test Network”.the dep

    How to Create your Own Cryptocurrency - Testnet Token (19)

  • Click on "Import Tokens" on your Metamask wallet: How to Create your Own Cryptocurrency - Testnet Token (20)

  • Paste your smart contract address in the input box, “Token Contract Address”..

  • Your token symbol and decimal will be displayed automatically, as shown below.

  • Click on the "Add Custom Token" button:

    How to Create your Own Cryptocurrency - Testnet Token (21)

  • Confirm to import the token in your wallet. Out smart contract’s initial supply will be displayed as well:

    How to Create your Own Cryptocurrency - Testnet Token (22)

  • After the confirmation, our token will be added to our wallet:

    How to Create your Own Cryptocurrency - Testnet Token (23)

Step 6 - Sending Our Token to Others

In this step, we're going to transfer some of our tokens to another wallet address.

Follow the steps below to send your cryptocurrency token to another wallet address:

  • Request the receiver's wallet address:

    How to Create your Own Cryptocurrency - Testnet Token (24)

  • Ask the receiver to import the token on their "Rinkeby Test Network" in their Metamask: How to Create your Own Cryptocurrency - Testnet Token (25)

  • Share your smart contract address with them and follow Step 5.

  • Next, click on your token under "Assets":

    How to Create your Own Cryptocurrency - Testnet Token (26)

  • Click on the "Send" icon:

    How to Create your Own Cryptocurrency - Testnet Token (27)

  • Enter the receiver's wallet address and click the "Next" button:

    How to Create your Own Cryptocurrency - Testnet Token (28)

  • Enter the amount you want to send:

    How to Create your Own Cryptocurrency - Testnet Token (29)

  • Confirm the transaction:

    How to Create your Own Cryptocurrency - Testnet Token (30)

  • Wait for the transaction to be processed and confirmed on the blockchain:

    How to Create your Own Cryptocurrency - Testnet Token (31)

  • You'll be notified whether or not the transaction was successful:How to Create your Own Cryptocurrency - Testnet Token (32)

  • Confirm with the receiver if they've received the fund:

    How to Create your Own Cryptocurrency - Testnet Token (33)

  • Check your token balance and transactions:

    How to Create your Own Cryptocurrency - Testnet Token (34)

Wrapping Up

In this tutorial, we've learned how to create and deploy our own cryptocurrency token.This token can also be transferred from one wallet address to another.

This tutorial deploys our token on the Testnet environments, although you can apply the same steps when you're ready to deploy to a Mainnet network (requires real money for the gas fees).

Where Do You Go Next?

Now that you’ve learned how to create and deploy your own cryptocurrency, and how to distribute it to another wallet addresses:

  • Learn How to Build a Web3 Login with Web3.js Library here.

  • Learn How to Build your Own NFT Explorer with Moralis React SDK here

  • Learn How to Build and Deploy an NFT Minting dApp with Solidity and React here

This article is a part of the Hashnode Web3 blog, where a team of curated writers are bringing out new resources to help you discover the universe of web3. Check us out for more on NFTs, DAOs, blockchains, and the decentralized future.

How to Create your Own Cryptocurrency - Testnet Token (2024)

FAQs

What are the steps of creating a token on the testnet? ›

Here's a detailed, step-by-step guide:
  1. Step 1: Define The Purpose Of Your Cryptocurrency Token.
  2. Step 2: Choose a Blockchain Platform.
  3. Step 3: Select a Token Standard.
  4. Step 4: Design Your Cryptocurrency Token.
  5. Step 5: Develop and Code the Smart Contract.
  6. Step 6: Test the Crypto Token on a Testnet.

Can I create my own crypto token? ›

Can I Create My Own Cryptocurrency? You can make your own cryptocurrency. Usually creating a new coin or token requires some computer coding expertise, but you also can choose to hire a blockchain developer to create a digital currency for you.

Are testnet tokens worth anything? ›

Testnet Tokens: A Starter's Guide

In simple terms, testnet tokens mimic the functionality of coins on a blockchain network, but they hold no real economic value.

How do you get tokens on testnet? ›

You can get Testnet token using the Public Testnet Faucet. You only need to input a valid Testnet address and the faucet will send you test tokens, so you can safely develop your application without risking any capital.

How to make your own crypto coin for free? ›

How To Create Your Own Cryptocurrency: Step-by-Step Guide
  1. Step 1: Research the Use Cases. ...
  2. Step 2: Choose a Consensus Mechanism. ...
  3. Step 3: Select a Blockchain Platform. ...
  4. Step 4: Publish the Whitepaper on Your Website and Social Media. ...
  5. Step 5: Design the Nodes. ...
  6. Step 5: Establish Your Blockchain's Internal Architecture.

How do I convert testnet coins to real coins? ›

All transactions and contract calls will be conducted on testnets. As mentioned, testnet wallets do not involve real currency, and there is no way to turn testnet coins into cryptocurrency with real financial value.

How much does it cost to create my own token? ›

The cost of writing a smart contract for a simple token can range from $1,000 to $5,000. However, complex smart contracts can include additional functionality. These functionalities include governance mechanisms, stake features, and integration with other decentralized applications (dApps).

How do I create a private token? ›

In the left sidebar, click Developer settings. In the left sidebar, under Personal access tokens, click Tokens (classic). Select Generate new token, then click Generate new token (classic). In the "Note" field, give your token a descriptive name.

How do I create a custom token? ›

Custom tokens are typically created within custom modules, which offer a structured way to extend Drupal's functionality without altering core files.
  1. Create a Custom Module Directory. Navigate to the module directory of your Drupal installation. ...
  2. Define Module Metadata. ...
  3. Implement Token Functions. ...
  4. Clear Drupal's Cache.
Apr 29, 2024

Can I sell testnet token? ›

In general, the process involves first exchanging the testnet tokens for mainnet tokens on a supported exchange, and then transferring the mainnet tokens to your desired destination address. You can't sell any testnet tokens. It's for testing purposes only and has no real value.

How to get free testnet? ›

Get ETH from the faucet

On the Sepolia testnet chain page, scroll down to the 'Faucet' section. Click 'Connect' and choose the wallet you would like to connect with. Make sure you use the same wallet you intend to be using to develop your app on the testnet. Once selected, click 'Get 0.01 ETH'.

Are testnet coins real? ›

Testnet coins are distinct from actual coins, and testnet coins do not have any monetary value. This allows application developers or testers to experiment without having to use valuable coins. In a few words, testnet is a parallel network intended for testing purposes.

How to earn with testnet? ›

After joining a testnet, wait for the platform to transfer the rewards to the wallet used. These rewards include crypto, NFTs, discounts on transaction fees, and other digital collectibles. Rewards are often given after the testnet program has been concluded or when the protocol's native token has been launched.

How do I fund testnet? ›

How to get testnet tokens via the token faucet 💰
  1. Copy your account's address and paste it into the token faucet available within each network configuration. ...
  2. Within the block explorer homepage, press the Get Funds button.
  3. Paste the address you wish to top-up in the pop-up window and then press Add Funds.
Jul 19, 2024

How do you create a token step by step? ›

You can create your ERC20 token using the following five steps.
  1. Token specifications. The first step is related to the specifications of the token. ...
  2. Codification of the contract. ...
  3. Testing the token on a testnet. ...
  4. Verify the token source code.

What is a testnet token? ›

What is the testnet? The testnet is an alternative blockchain to be used for testing. Testnet coins are distinct from actual coins, and testnet coins do not have any monetary value. This allows application developers or testers to experiment without having to use valuable coins.

Top Articles
What Is a Good APR for a Credit Card? - NerdWallet
How to add funds to your Wirex account
Srtc Tifton Ga
Dannys U Pull - Self-Service Automotive Recycling
Elleypoint
Cars & Trucks - By Owner near Kissimmee, FL - craigslist
Mychart Mercy Lutherville
DEA closing 2 offices in China even as the agency struggles to stem flow of fentanyl chemicals
Exam With A Social Studies Section Crossword
Truist Park Section 135
Northern Whooping Crane Festival highlights conservation and collaboration in Fort Smith, N.W.T. | CBC News
Katie Boyle Dancer Biography
WK Kellogg Co (KLG) Dividends
Remnant Graveyard Elf
Lenscrafters Huebner Oaks
Byte Delta Dental
Daily Voice Tarrytown
Bend Pets Craigslist
Fraction Button On Ti-84 Plus Ce
Gayla Glenn Harris County Texas Update
Https Paperlesspay Talx Com Boydgaming
Grimes County Busted Newspaper
Ford F-350 Models Trim Levels and Packages
12 Facts About John J. McCloy: The 20th Century’s Most Powerful American?
Ceramic tiles vs vitrified tiles: Which one should you choose? - Building And Interiors
Avatar: The Way Of Water Showtimes Near Maya Pittsburg Cinemas
Lovindabooty
JVID Rina sauce set1
CVS Health’s MinuteClinic Introduces New Virtual Care Offering
417-990-0201
Grandstand 13 Fenway
15 Downer Way, Crosswicks, NJ 08515 - MLS NJBL2072416 - Coldwell Banker
Jay Gould co*ck
Craigslist Org Sf
Cross-Border Share Swaps Made Easier Through Amendments to India’s Foreign Exchange Regulations - Transatlantic Law International
RALEY MEDICAL | Oklahoma Department of Rehabilitation Services
Toth Boer Goats
Infinite Campus Parent Portal Hall County
Best Restaurants West Bend
Ethan Cutkosky co*ck
Vintage Stock Edmond Ok
Bmp 202 Blue Round Pill
Youravon Com Mi Cuenta
Cvs Coit And Alpha
Ronnie Mcnu*t Uncensored
Barber Gym Quantico Hours
Smoke From Street Outlaws Net Worth
De Donde Es El Area +63
Where To Find Mega Ring In Pokemon Radical Red
Ihop Deliver
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 6776

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.