Bitcoin Forum
November 04, 2024, 10:23:13 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Minting - Solidity Ethereum  (Read 76 times)
Croin (OP)
Sr. Member
****
Offline Offline

Activity: 518
Merit: 250


View Profile
November 07, 2021, 03:55:25 AM
 #1

Hey guys,

in the following tutorial https://jamesbachini.com/new-token/ the guy explains how to deploy your own ERC20 token on the Ethereum network.
In the end he simply mints them without any limit.
But how do they usually do it that the minting is only done once, so ppl who deploy the contract won't use the function over and over again and increase the amount of tokens?

Thank you
TastyChillySauce00
Legendary
*
Offline Offline

Activity: 3164
Merit: 1038


Leading Crypto Sports Betting & Casino Platform


View Profile
November 07, 2021, 08:01:22 AM
Merited by vv181 (1)
 #2

in the following tutorial https://jamesbachini.com/new-token/ the guy explains how to deploy your own ERC20 token on the Ethereum network.
In the end he simply mints them without any limit.
That means he was adding mint fuction on his smartcontract, when you're adding this to the your smartcontract and you will able to mint token as much as you want. Minting token with unlimited supply will be result destroying your token caused by inflation.


But how do they usually do it that the minting is only done once, so ppl who deploy the contract won't use the function over and over again and increase the amount of tokens?
As far as i know it can be done through various wasy just like adding minting function in your smartcontract that will allow you to mint new token anytime. That's why there will be an audit to make sure this funtion will not be used for bad purpose. There are bunch of scammers have been silently putting mint function in their smartcontract to be used to mint more tokens and dump it to the market.
This link may help you https://ethereum.stackexchange.com/questions/73421/is-there-a-way-to-create-an-erc20-token-with-an-unlimited-suplly

I thought that if it's better if you learn more from openzeppelin. https://docs.openzeppelin.com/contracts/2.x/erc20-supply

..Stake.com..   ▄████████████████████████████████████▄
   ██ ▄▄▄▄▄▄▄▄▄▄            ▄▄▄▄▄▄▄▄▄▄ ██  ▄████▄
   ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██  ██████
   ██ ██████████ ██      ██ ██████████ ██   ▀██▀
   ██ ██      ██ ██████  ██ ██      ██ ██    ██
   ██ ██████  ██ █████  ███ ██████  ██ ████▄ ██
   ██ █████  ███ ████  ████ █████  ███ ████████
   ██ ████  ████ ██████████ ████  ████ ████▀
   ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██
   ██            ▀▀▀▀▀▀▀▀▀▀            ██ 
   ▀█████████▀ ▄████████████▄ ▀█████████▀
  ▄▄▄▄▄▄▄▄▄▄▄▄███  ██  ██  ███▄▄▄▄▄▄▄▄▄▄▄▄
 ██████████████████████████████████████████
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄
█  ▄▀▄             █▀▀█▀▄▄
█  █▀█             █  ▐  ▐▌
█       ▄██▄       █  ▌  █
█     ▄██████▄     █  ▌ ▐▌
█    ██████████    █ ▐  █
█   ▐██████████▌   █ ▐ ▐▌
█    ▀▀██████▀▀    █ ▌ █
█     ▄▄▄██▄▄▄     █ ▌▐▌
█                  █▐ █
█                  █▐▐▌
█                  █▐█
▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█
▄▄█████████▄▄
▄██▀▀▀▀█████▀▀▀▀██▄
▄█▀       ▐█▌       ▀█▄
██         ▐█▌         ██
████▄     ▄█████▄     ▄████
████████▄███████████▄████████
███▀    █████████████    ▀███
██       ███████████       ██
▀█▄       █████████       ▄█▀
▀█▄    ▄██▀▀▀▀▀▀▀██▄  ▄▄▄█▀
▀███████         ███████▀
▀█████▄       ▄█████▀
▀▀▀███▄▄▄███▀▀▀
..PLAY NOW..
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
November 07, 2021, 11:54:02 AM
 #3

The minting function usually come up with a hard cap limit that disallows minting a token beyond the cap. Actually, I'm far from smart contract dev, so you should take my word with a grain of salt. AFAIK, there's also a function that allows to renounce the ownership/minter role of the token, so as an example, they set a few amounts of the token to be minted then renouncing the role, so they can't mint anymore.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!