An Introduction to Cryptocurrency Tokens – DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

admin

# blockchain BlockChain and Cyptocurrency (3 Part Series) 1 Making Sense Of Blockchain And CryptoCurrency 2 An Introduction to Cryptocurrency Tokens 3 Introduction To Solidity HeyπŸ‘€!.Ever thought of creating your own currency?.With your name,identity and stuff?.Well you can(kinda🀫)One of the best ways to learn about the inner workings of the Cryptocurrency universe is to build…

# blockchain BlockChain and Cyptocurrency (3 Part Series) 1 Making Sense Of Blockchain And CryptoCurrency 2 An Introduction to Cryptocurrency Tokens 3 Introduction To Solidity HeyπŸ‘€!.Ever thought of creating your own currency?.With your name,identity and stuff?.Well you can(kinda🀫)One of the best ways to learn about the inner workings of the Cryptocurrency universe is to build your very own token.If you are new to cryptocurrency, you can check out my previous article where I demistify blockchain and cryptocurrency.

This is part 1 of a 3 part series on building our your token on the Binance Smart Blockchain with Solidity.

Before we proceed we must differentiate between a cyptocurrency and a token.The main difference being that a cryptocurrency is the native currency of a blockchain network whereas tokens are built ontop an existing blockchain.

Etherum and bitcoin like other crypto currencies allow you to transfer and trade digital currencies.Some cyptocurrencies like Etherum took it one step further.

Ethereum introduced an Etherum Virtual Machine(EVM) which enables developers to create and launch code which runs on the etherum decentralized network.This code is often referred to as a Smart contract.

Etherum is not the only block chain that allows smart contracts just one of the most popular,other ones exist such as the Binance smart chain.

Etherum Virtual Machines allows nodes to store and process data in exchange for payment.This Payment is usually in the form of (Ether) which is the native currency of the Etherum Block Chain.The smart contract integration opened up blockchain to a myriad of opportunities and industries.Popular use cases are Decentralized finance, Logistics and Supply chain,Real-time IoT operating systems.

Example Lets say, I have a voting App where users can vote for their favourite footballer using a token I created lets call it (vtokens).The more vtokens a player has the higher the rating.

Users of my app can transfer vtokens with each other and also use vtokens to vote for their favourite player.

Daniel a user of my app wants to send 5,000 vTokens to Lionel Messi, Daniel calls a function inside my Voting App asking it to do so.”Please transfer 5000vtokens from adress D to adress LM”

I want to to use the Etherums Blockchain to store and process the voting information (who voted for who and token transfer between users).

Even though Daniel isn’t sending ether, He must still pay a fee denominated in (ether) to have his transaction request included in the Etherums blockchain and utilize the blockchains resources to send that token.I dont want Daniel to go through the stress of also buying ether.I could peg my own vtokens to the ether i.e 20,000 vtokens = 1 Ether.So for every transaction that occurs in my app I could take a percentage of my vtoken convert it to ether which can be used as payment to the Etherum network to help me do work.The more users that want my token, the more my tokens value increases.All this interopability is made possible by “Smart Contracts” which is a self-executing contract with the terms of the agreement between buyer and seller being directly written into lines of code.

TOKEN STANDARDS For two systems to work together they need a common agreement.

To create your own token on an existing blockchain you need to follow the token standard.Popular token standards are ERC-20 & BEP-20.

You can think of it as a blueprint for tokens that defines how they can be spent, who can spend them, and other rules for their usage.

By following the outline, developers don’t need to reinvent the wheel.Instead, they can build off a foundation already used across the industry.

For example, To be ERC-20-compliant, your contract needs to include six mandatory functions: totalSupply, balanceOf, transfer, transferFrom, approve, and allowance.In addition, you can specify optional functions, such as name, symbol, and decimal.From their names you might’ve already deduced what these functions do.

Below are the functions as they appear in the Ethereums Solidity language.Dont worry if you do not understand the code syntax.The next article we will be an introduction into the Solidity Language.

totalSupply function totalSupply() public view returns (uint256) Returns total coin supply in circulation balanceOf function balanceOf(address _owner) public view returns (uint256 balance) When called, it returns the balance of the specified address’s token holdings.transfer function transfer(address _to, uint256 _value) public returns (bool success) Transfers tokens from the person calling the smart contracts address to another.

transferFrom function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) Unlike the regular transfer, in transferFrom you specify the sender address.It doesnt necesarrily have to be the address of the person calling the smart contract.A good use case is if you want to set up recurring payments using a smart contract.You could transfer the token to an “Admin user” that you created and then authourize that user to transfer the token at specific intervals.approve function approve(address _spender, uint256 _value) public returns (bool success) With this function, you can limit the number of tokens that a smart contract can withdraw from your balance.allowance function allowance(address _owner, address _spender) public view returns (uint256 remaining) This is used together with the approve function.For example if your smart contract is permitted to withdraw 30tokens and it has withdrawn 20.Calling the allowance should return 10tokens.

Basically how many tokens are left for the smart contract to call.

To create your own token there is an easy and a hard way.Easy way using the cointool app(Very Basic functionality).Hard way programming your smart contract in Solidity.(Endless possiblities).In this article we will be exploring this.But later on in this series we will create our tokens smart contract with solidity.

Creating your own token on Binance Smart Chain Download trust wallet app Andriod ios Create a token using the coin tool app here -Specify the token name,symbol,initial supply(How many total tokens you want to create) and decimals.

-Token decimals are an interesting concept.Basically this specifies the lowest unit of your token.Example.1ETH = 1,000,000,000,000,000,000 wei.1 Bitcoin = 100,000,000 Satoshis.This means I can own 0.1 Eth, OR 0.1 BTC.

It essentially helps to make our token very divisible.1.Can Burn- This means the total circulating token can be reduced 2.Can Mint- Means an addtional amount of this token can be “minted”/”created”.3.Can Pause- This specifies whether your token and its associated functions can pause.Maybe due to hacking.-Click on Connect wallet –> Trust wallet –> BNB Network Chain.

-Logon to your trust wallet –> settings –> Wallet Connect Scan the QR code and Approve Create token -The token will be created once you approve this transaction fee.Usually about (0.01)BNB.Unfortunately i dont have suffiecient BNB to complete this token creation.πŸ˜‘ To make it show Go to trust wallet Click on the two sliders on the top right of the home page -Scroll down to –> add custom token Select Network to Smart chain Fill in your network address Fill in the rest of the details Log out and Login and see your token.Congratulations you are now own your token.Start collecting payments to your token address.🀝 In summary we have learnt

A Cyptocurrency is the native currency of a blockchain whilst a token is build untop an existing block chains network.

Smart contracts are codes used to execute functions for a given token.For a token to be created on a Block chains network it needs to follow the token standards by specifying certain mandatory functions.In the part 2 of this article I will be expounding on the solidity language which is used to write smart contracts.

Follow me here and across my social media for more content like this Twitter Linkedin

BlockChain and Cyptocurrency (3 Part Series) 1 Making Sense Of Blockchain And CryptoCurrency 2 An Introduction to Cryptocurrency Tokens 3 Introduction To Solidity Top comments (0) Crown

Sort discussion: Selected Sort Option

Top Most upvoted and relevant comments will be first Latest Most recent comments will be first Oldest The oldest comments will be first Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use.

Submit Preview Dismiss Code of Conduct β€’ Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment’s permalink .

Hide child comments as well

Confirm

For further actions, you may consider blocking this person and/or reporting abuse

🌚 Life is too short to browse without dark mode Read next Learn Web3 programming and how to build dapps on the Internet Computer (preview) Wenura Ravindu – Jun 2

Connect to Polygon in MetaMask Eric Bishard – May 31

Day 2 – Comments and NatSpec Vedant Chainani – May 30

Day 1 – Licenses and Pragma Vedant Chainani – May 29

Elegberun Olugbenga Follow Technology enthusiast passionate about building smarter cities.Excited about learning and teaching Work Computer Science Msc Candidate @ GSU Joined May 31, 2020 More from Elegberun Olugbenga Introduction To Solidity # solidity # etherum # blockchain Making Sense Of Blockchain And CryptoCurrency # blockchain Once suspended, gbengelebs will not be able to comment or publish posts until their suspension is removed.

Note:

Submit & Suspend Once unsuspended, gbengelebs will be able to comment and publish posts again.

Note:

Submit & Unsuspend Once unpublished, all posts by gbengelebs will become hidden and only accessible to themselves.

If gbengelebs is not suspended, they can still re-publish their posts from their dashboard.

Unpublish all posts Once unpublished, this post will become invisible to the public and only accessible to Elegberun Olugbenga.

They can still re-publish the post if they are not suspended.

Unpublish post Thanks for keeping DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» safe.

Here is what you can do to flag gbengelebs:

Make all posts by gbengelebs less visible gbengelebs consistently posts content that violates DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»’s code of conduct because it is harassing, offensive or spammy.

Report other inappropriate conduct

Confirm Flag Unflagging gbengelebs will restore default visibility to their posts.

Confirm Unflag.

Leave a Reply

Next Post

Russia reportedly mulls digital currency in trade with China - Global Times

Photo taken on March 24, 2022 shows ruble banknotes and coins in Moscow, capital of Russia.Photo:Xinhua Russia may use a digital currency in cross-border settlements with China amid an accelerated push to develop the digital ruble, as a move to reduce the US' global financial hegemony, Reuters reported on Monday, citing a senior Russian lawmaker.…
Russia reportedly mulls digital currency in trade with China – Global Times

Subscribe US Now