A lot of people have been asking how to deploy to mainnet. In retrospect, I should have had that in the video! First add a 'mainnet' configuration in hardhat.config.js, under 'networks'. Then add your mainnet endpoint from Infura to the 'url' field. Finally target that configuration when you issue the deploy command, like this: 'npx hardhat run scripts/deploy.js --network mainnet'. Hope this helps.
@bethchen87 Жыл бұрын
@BlockExplorerMedia I was inplementing your code at 1:03:45, but got the error message: TypeError: oceanToken.deployed is not a function at main (C:\Projects\erc-20-tutorial\ocean-token\scripts\deploy.js:8:20) at processTicksAndRejections (node:internal/process/task_queues:95:5) What might be the problem? Can somebody figure it out?
@jacek0x-b7u Жыл бұрын
@47:00 I believe there's no need to duplicate the code in the _mint override of the token. Simply using super should suffice, as it will invoke the capped contract logic, which then triggers the ERC20 logic. This approach should maintain functionality without redundant code.
@MikeDougherty Жыл бұрын
It's been a while, so maybe you realized this already, but at 1:10:00 the explorer shows two transfers. One for the 1,000,000 and another to a different address for 50. I assume that is the blockReward you were trying to find toward the end, no?
@adityasingh111562 жыл бұрын
Thanks😊 for sharing it. Your teaching style is very good. I like how you explain in detail each related concept smoothly rather than rushing through topic fastly.
@BlockExplorerMedia2 жыл бұрын
Thanks Aditya - I appreciate the feedback and glad you liked it.
@SmillaBoyRishRush-lx5nfАй бұрын
9.45@@BlockExplorerMedia
@suryarghyasaha4984 Жыл бұрын
I'm new to Blockchain Development and your videos helped me so much to grasp all the concepts so fast. You're an amazing teacher and I look forward to learning more and more from you. And since I recently made my own ERC20 token inspired by this tutorial, I sent some of them to the wallet address you mentioned in the descriptions. Thank You So Much man. Please keep up the good work.🙏🤝
@BlockExplorerMedia Жыл бұрын
Thanks so much and congrats on your token. May I know the smart contract address so I can import the token in my wallet? Nice work : )
@kevinjurden9114 Жыл бұрын
Could you create a video showing how to create a Token, and instead of minting rewards to 'miners'. Create an Liquidity pool, and mint rewards to those who are staking? Could be implemented into a Defi/Dapp video
@alexismollet6751 Жыл бұрын
I loved this video very new to coding and got stuck on some coding errors, but your explaining was very detailed and I watched the whole thing anyway
@MohamedMokhtar1013 ай бұрын
Thank you so much for an amazing explanation! I have a question if you can explain or link to video about the concept of pegging a token to an already established stable coin like USDT C, and what would be the impact in implementing this pegging of a token?
@Akhbash2 жыл бұрын
It does display the mining reward in rinkeby etherscan, but it is inside the same transaction. Look at 1:10:00, there are two token transfers ;D
@BlockExplorerMedia2 жыл бұрын
Oh good catch! I wonder why the transaction is bundled like that. In the past the reward was always a separate transaction. Thanks for letting me know!
@abrahamhicksah2 жыл бұрын
Please can you clarify, why do we need the mining reward? Just a little confused about the need for that part of the code.
@BlockExplorerMedia2 жыл бұрын
I want to be clear that the mining reward part is totally optional! It is just an example of one way of generating new token supply into circulation. There are many different options here and you could also not have any supply-generating mechanism and mint all tokens up front. It's really up to the developer. Hope that helps!
@GauravSinghnikumb Жыл бұрын
the soidity version also takes into consideration the openzeppelin pragma solidity version , so keep that in mind
@andrecastro7817 Жыл бұрын
hey thanks alot for your video!! can this be deployed on the Binance Smart chian Network ? im trying to make one that taxes and gives reflections on each transactions.
@TheTravelHubs Жыл бұрын
thanks, bro, I created one token and I sent it to your wallet 1m also... thanks again
@motivationalwebsite7173 Жыл бұрын
Hello bhai
@elmergriffen3010 Жыл бұрын
How do i contact you?
@tokunbosuleimon48022 жыл бұрын
Thanks😊 for sharing it. Your teaching style is very good. I like how you explain in detail each related concept smoothly rather than rushing through topic fastly, and please can you do a front -end
@tanaytambe396 Жыл бұрын
Can we use goerli test network ? in my system there is not rinkeby network avaliable. Can you please help me how can i go further?
@kirazami2282 Жыл бұрын
Hi did you find a solution ? Thanks
@tanaytambe396 Жыл бұрын
@@kirazami2282 not yetbro!
@albechannel1 Жыл бұрын
Thanks a lot for this! Just a question: now that Rinkeby has been deprecated, would you suggest (to a newby like me…) how to use another testnet?
@shjndohjkaru Жыл бұрын
you can using sepolia for same
@advikmarini Жыл бұрын
Rinkeby has now been turned into Sepolia by the same company “alchemy” so I just went ahead and used the sepolia test network
@talhagerginn76722 жыл бұрын
Error: cannot estimate gas; transaction may fail or may require manual gas limit Help me
@TradeMarker-t4f Жыл бұрын
same here. are there any solution here?
@eurekachi86318 күн бұрын
Thanks for sharing the knowledge; its massive.
@adonides6 ай бұрын
11:08 Why does the message “infinite gas 733800 gas” appear to me? How can I avoid this? Thanks!
@nehmetekle72743 ай бұрын
thanks for this amazing video, I have a question can I use your strategy and implement it to my senior project? I am using angular as frontend.
@elmmacwebmobileapps Жыл бұрын
Thanks for teaching master. I appreciate. Question is, how do you give or set a value to the token. say 1000000 tokens, have seen in the tutorial wher it say 1000000 and value $0.00 | so ho do i change or give value to the tokens.??
@osempo Жыл бұрын
Amazing video, the best tutorial on how to create and deploy a token, I hope you keep uploading content more often!
@AroseLove Жыл бұрын
Amazing great stuff a few additional errors here and there (my own doing as only downloaded visual studio code today so was mainly extension errors) Thank you so much for this tutorial, there isn’t another started tutorial I’ve seen as good as this. 🙏🏻
@nosktech78182 жыл бұрын
Can you show or direct me to adding the coding for a “creator reward” for receiving a percentage on every transaction , thank you great walk through 👍
@sirnawaz Жыл бұрын
39:45. `block.coinbase`.. How does this field `coinbase` come from? Is it defined by (or related to) Coinbase Exchange? What is the type of `block`? Is it some `any` kind where arbitrary fields can be added by anyone?
@Luxorians8 ай бұрын
If you want to split the sale, First Pre-sale and after that the main one, how to be organized in the contract?
@TimKariuki2 жыл бұрын
Is it possible to add custom metadata to a token?
@TRVLCreative2 жыл бұрын
Awesome video. Awesome teacher. Thank you for taking the time to teach the world about web3 effectively :)
@vaerube6670 Жыл бұрын
thanks for sharing... hi sir @BlockExplorerMedia i got a question, when I perform the npx hardhat test, it shows "0 passing (1ms) ". I notice your terminal using is "node" instead of "powershell", is that the problems ?& how to solve it? 🙏
@aayushchopra60809 ай бұрын
Same, unsure what's goin on
@DEWITTJeffersonАй бұрын
I admire Web3 Infinity's team's transparency. It's an endeavour with moral integrity.
@bethchen87 Жыл бұрын
@BlockExplorerMedia I was inplementing your code at 1:03:45, but got the error message: TypeError: oceanToken.deployed is not a function at main (C:\Projects\erc-20-tutorial\ocean-token\scripts\deploy.js:8:20) at processTicksAndRejections (node:internal/process/task_queues:95:5) What might be the problem? Can somebody figure it out?
@HexElement2 жыл бұрын
Hey bro I have a quick question. This is my first crypto Im messing around with and am a total noob. When it comes to the Capped supply vs the Max Total Supply, I want to own 80% of the token and have 20% on the market. I put the cap amount at 10 mill and my amount to send the owner 8 mil. Does this mean there is only 8 mil in existence and 2 more mil can be minted.... Or does it mean that 2 mill can be bought and or minted? I need there to be a max supply of 10 mil and 2 mil of that is ready to be traded by the public, but etherscan is only showing 8. I know this is a crazy noob question, but I appreciate your time bro! Awesome tutorial!
@BlockExplorerMedia2 жыл бұрын
hey Hex - great question. so for the tokens that you want to make publicly available on the market, those should go to your wallet first (at the time of contract deployment) and then you would transfer those tokens from your wallet into liquidity pools, for example on Uniswap, to be made available for trading. the remaining 20% left unminted could be for miner rewards or any other utility that you can think of. at least that's how I've always done it. some tokens don't have any kind of time-based minting or mining rewards. so at the simplest, you could send yourself 100%, provide 20% of that as liquidity and keep the remaining 80%. hope this helps.
@HexElement2 жыл бұрын
@@BlockExplorerMedia You just saved my life! Thats exactly what I was wanting to figure out. Thank you man, you got a subscriber!
@BlockExplorerMedia2 жыл бұрын
You bet - thanks!!
@franklinokafor3229 Жыл бұрын
@@HexElementcan you guys teach me i will pay.
@Globetrottersz1 Жыл бұрын
@@BlockExplorerMedia a quick one, have compiled as successful unfortunately on. Js test have only managed 3 passing and 4 failing. Where might I be wrong!!?. Thanks in advance
@АлександрГудов-э5ч5 ай бұрын
Hi all! Would you share ,please, how to import assign a picture/avatar for a token?
@andrew549338 күн бұрын
Hello, very informative video. I'm stuck though, when i try to run "npx hardhat compile" it tells me there is nothing to compile. Am i missing something?
@officialjobsdekho5426 Жыл бұрын
bro which code editor should I use to install hardhat? I am not familiar with visual code. If you can make a video about visual code for deploying the contract it would be easy to understand.
@VVAIBHAVTIWARI8 ай бұрын
vs code
@hberrios23 Жыл бұрын
do you have any videos on creating a coin on different block chain network or all of the are the same?
@BlockExplorerMedia Жыл бұрын
So far I've only done Ethereum, but the code would be the same for any EVM-compatible chain (such as Polygon). You would just create a network config specific to that chain in the Hardhat config file and then target that for your deploy. For something like Solana it would be totally different code and process though.
@Pjaming6 ай бұрын
So how do you load the coin to main net and on crypto exchanges?
@alihosseini77082 жыл бұрын
Hi, why i dont have any other mainnet than görli and sepolia (59:10)?
@BlockExplorerMedia2 жыл бұрын
Other testnets where phased out after the Ethereum 2.0 merge in Sept 2022. The recommendation is to use Goerli going forward.
@24PetrocoinLLC10 ай бұрын
can you include initial token pricing in the contract before deployment?
@jimgarlie4 ай бұрын
Great video, and I see the Rinkeby is now longer available so can you expand on using Sapolia or any others?
@BillyBishop5892 жыл бұрын
thanks for this great tutorial.. first tutorial in this blockchain space that worked.. everytime i write code i hit a brick wall with deprecated and outdated info.. thanks much when i go mainnet on polygon ill definitely will be sending a fat stack your way thanks again..
@coinlisting_net5 ай бұрын
how is your token doing mate.
@shaikhnabeel64433 ай бұрын
Thankyou you really made it look so simple ❤️. Can you tell me if can make NFT on testnet and buy that nft using test ethers? Can i do that?
@ivanlagade2 жыл бұрын
Continue making valuable content sir. God bless you more.
@SultHes2 ай бұрын
Many thanks for your time. In blockchain my USDT shows with ERC20 * * * network ( ERC20 with 3 astrikes). what does it mean? I can not find such network. Kindly tell me what to do?
@AliFarther Жыл бұрын
Hello thank you for the video, how can we deploy to main net, can you help with the configuration?
@BlockExplorerMedia Жыл бұрын
I pinned a comment to the top of this video explaining how. Let me know if you have any other questions.
@telego11518 ай бұрын
Hey, thank you for the video, super thorough and helpful! One quick question though, is the coding the same for minting and BlockRewards now that Ethereum has moved to Proof of Stake or should we do anything different?
@paranormalgamesstudiosАй бұрын
Any MEV Blocker protection included in this?
@Bobbybaitz8 ай бұрын
Hi, I'm running into this error: npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm init + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundE xception Any help?
@sayantanmitra48513 ай бұрын
hey have you installed npm
@sayantanmitra48513 ай бұрын
node package manager
@AashishK19933 күн бұрын
@@sayantanmitra4851 I just did but it's still saying the same thing? Any idea why?
@williamwallace57079 ай бұрын
Very in-depth, great tutorial. I was wondering what type of environment you are coding in. Are you using Docker, a VM, cloud or your PC? I am new to coding, very basic understanding and am concerned about installing and experimenting with various scripts/software and blockchain based things.
@mobiactive9 ай бұрын
Good morning, to create a BSC network, do I need to change the router or do I have to change something else in the code?
@digitalthoughts334 Жыл бұрын
Thanks for uploading this tutorial. Amazing work. I am facing issues at 36:56 and getting this error: TypeError: Derived contract must override function "_mint". Two or more base classes define function with same name and parameter types. Could you please suggest what could be causing these issues? I don't see you have any issues.
@drawcontent3664 Жыл бұрын
This error occurs when a contract is derived from two or more base contracts that have a function with the same name and input parameter types. In your case, it seems that you have defined the _mint function in your derived contract and also inherited it from one or more base contracts. To resolve this error, you need to override the _mint function in your derived contract to ensure that it has the same function signature as the base contract(s). This means that the function name, input parameter types, and return type must be exactly the same. Here's an example of how you can override the _mint function in your derived contract: javascript Copy code function _mint(address account, uint256 amount) public onlyOwner { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } This adds the onlyOwner modifier to restrict minting to the contract owner, but you can modify it as per your requirements. Just make sure that the function signature is the same as the base contract(s) to avoid the error.
@kirazami2282 Жыл бұрын
Hi did you find solution ? thanks
@shachar991 Жыл бұрын
It happens because of multiple references to the ERC20 contract (ERC20Capped & ERC20Burnable). If are talking about the _mint function (defined in both ERC20 and ERC20Capped contracts), you should override the function in your Token contract (add override(ERC20, ERC20Capped) to the _mint() signature - the order doesn't matter) and call super._mint(). The code will use the ERC20Capped function since we are using super and it's "closer" in the inheritance chain (you can also just use ERC20Capped._mint() explicitly). Hope it helped.
@Dekon7 Жыл бұрын
What is presale, private presale l, fairlaunch, stealth launch etc. Plz make a video on that sir! On all the launch types
@jhhnadkins56692 жыл бұрын
Hello, thanks very much for video. Process is same for bep20 token too? Can I find out? And can we add halving?
@thelegendjustice Жыл бұрын
it says "infinite gas" for me on creating the constructor, what did i do wrong ? thanks
@jcw1197 Жыл бұрын
Your block reward was showing in the tx hash! Just FYI, 🙂
@VioletClaw8162 жыл бұрын
Derived contract must override function "_mint". Two or more base classes define function with same name and parameter types when I inherited those two contracts.
@dadsquad_89144 ай бұрын
im assuming to figured this problem out by now?
@VioletClaw8164 ай бұрын
@@dadsquad_8914 ha. I think so. I finished that project but I forgot what I did.
@DrRAZI999 күн бұрын
brother anything Rinkeby related just doesn't work anymore , what should i change it to ?
@PulokPandit Жыл бұрын
what will be the procedure to deploy it to main net and does it gonna cost me something ??
@xTazzyD3 ай бұрын
In the beggining of the program VS its says: 'npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operabl e program. Check the spelling of the name, or if a path was included, verify that the path is cor rect and try again. At line:1 char:1 + npm init + ~~~ + CategoryInfo : ObjectNotFound: (npm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException' can you tell me what to do ?
@ardianzzz1 Жыл бұрын
i got an error : TypeError: Cannot read properties of undefined (reading 'formatEther') How can you successfully compiled it without importing ether.js?
@myhapylife Жыл бұрын
I got the same, you managed to solve this?
@ObscureOdysseys Жыл бұрын
Alright so after a lot of debugging I actually got it to work on sepolia, what a great feeling! But, you never went back and taught us how to deploy on mainnet. Is it simply changing the infura endpoint link to mainnet link?
@BlockExplorerMedia Жыл бұрын
Yes, exactly. I pinned a comment to the top explaining. A lot of people have been asking this. Thanks!
@jaspaw.54732 жыл бұрын
Am getting an "import error" on my code which I don't know how to solve. I downloaded your source code and it is giving me the same error.... I have a feeling that something with my visual code IDE is not right. ,Could someone please help me with this, it's been stressing me out for hours now. Thanks in advance.
@okarakas408621 күн бұрын
Hi. I created token but I can't verfiy. tried many ways, including flattened contract file, but this did not resolve the issue. Could you tell how to solve problem and verify contract please? The contract created by Remix for BSC, ERC20. And contract deployed. Also all toknes transferred to Metamask. But can not verify!
@superfunsurf10 ай бұрын
cool. and how do you setup an image url?
@armanqlf22208 ай бұрын
And do you know it now?
@superfunsurf8 ай бұрын
@@armanqlf2220 with etherscan
@galeraonthebeat2 жыл бұрын
Why do we need ERC20Capped if we created the same function (_mint) inside our token contract? We do not have a function that overrides cap value so we could just use our cap value that we could declare in constructor.
@ng8530 Жыл бұрын
Please, a tutorial to launch an ICO 🙏🙏🙏
@TreelandPlantation-oy5lc Жыл бұрын
when im in visual studio and type npm init it gives an error and says npm term is not recognized as the name cmdlet and check the name and etc
Check to make sure you have NodeJS installed on your machine first - that's what will give you npm. nodejs.org/en/download
@hybrid_animals689 ай бұрын
i have error please help me : Should set the max capped supply to the argument provided during deployment: TypeError: Cannot read properties of undefined (reading 'formatEther')
@REZAZIMohamedabdessamed Жыл бұрын
Thanks for the quality explanation. I've a question, on the Transfer method I checked the original ERC20 implementation and they didn't multiply the amount input with the decimals... however it is still working (the balance got updated correctly).. how is that
@astrofoundation2 жыл бұрын
Can you make a video where we create an ICO - full dApp ?
@BlockExplorerMedia2 жыл бұрын
Yeah I've been thinking about something like that to follow this one up with - thanks for the suggestion.
@rosariosway Жыл бұрын
Thank you for this video! I have learned a lot of stuff through it, you did an excellent job! 👏
@EclipseEgg10 ай бұрын
will you get in trouble if you don't include MIT license statement?
@opionetics9 ай бұрын
whats the block reward for?
@advikmarini Жыл бұрын
I am getting another error when I try to run "npx hardhat run --network rinkeby scripts/deploy.js" This is the error that I am getting: TypeError: no matching function (argument="key", value="deployed", code=INVALID_ARGUMENT, version=6.6.4) I understand that it has something to do with the ethers version that I am using, but I'm not quite sure what the substitute would be for "deployed" in the current version that I am using for ethers, and I haven't been able to find a substitute on the internet for this function. Thanks!
@syamimirfan4303 Жыл бұрын
I'm using GoerliETH for my project. How many GoerliETH do I need to fix Error: insufficient funds for intrinsic transaction cost this error?
@kirazami2282 Жыл бұрын
Did it work for you on goerli ?
@syamimirfan4303 Жыл бұрын
@@kirazami2282 nope it didn't. But I change to sepoliaETH instead of GoerliETH.
@richiebrown6065 Жыл бұрын
which state are you in?
@MichaelWongManTak Жыл бұрын
Sir, thanks for your video. Is it possible to get support in real time guidance in setting up our token. ??
@mrcrazy39602 жыл бұрын
Please I’m getting this error any help “Before each” hook for “should set the right owner”: HardhatError; HH700: Artifact for contract “sunToken” not Found
@xVngi2 жыл бұрын
is Rinkeby still viable, even though the website you displayed in here, no longer works & is no longer a metamask test network, is there another alternative, you'd recommend?
@BlockExplorerMedia2 жыл бұрын
Rinkeby and others were deprecated after the Ethereum 2.0 merge. Recommendation is to use Goerli now.
@xVngi2 жыл бұрын
@@BlockExplorerMedia Thanks for the response, I actually attempted this too although once I attempt to deploy i see: Error HH100: Network goerli doesn't exist
@xVngi2 жыл бұрын
I actually resolved this, I made a slight typo, oops although now I see this: reason: 'insufficient funds for intrinsic transaction cost', code: 'INSUFFICIENT_FUNDS'
@kanjinft2 жыл бұрын
@@xVngi How did you solved it?
@kanjinft2 жыл бұрын
@@xVngi Did you used Goerli Faucet?
@ediilie664 Жыл бұрын
whitch is the difference to deploy on maynnet ?
@brenobertulucci134 Жыл бұрын
on minute 53 i received this error on 3 last test function: TypeError: Cannot read properties of undefined (reading 'address')
@UsmanKhan-nc2md Жыл бұрын
honestelly sir this is one of the best vidio
@mikelac2 Жыл бұрын
Will this work with prc-20?
@samrahul1993 Жыл бұрын
when ever im tring to do npm init.. its giving me an error npm : The term 'npm' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + npm init + ~~~
@UsmanKhan-nc2md Жыл бұрын
Thank You So much Sir I learned Alot
@indiuma Жыл бұрын
still get solidity version error tho it matches to hardhat file doesnt compile
@donaldschell1696 Жыл бұрын
npm init gives me an error... npm ; the term 'npm' is not recognized as the cmdlet, function, script file, or operable program....
@realfightnation Жыл бұрын
how did you fix this?
@bearsbestanimals Жыл бұрын
Hello, how do I add a picture to the token?
@SoftWorkDotNg2 жыл бұрын
The correct link contains a subdirectory "blob", that was what you missed.
@MarketMasteryMedia7 ай бұрын
How can I set Buy and Sell Tax 5% on my token? Could you help me?
@kruzoty92910 ай бұрын
hello, how i can add a web site and a twitter account to my contract erc20 ? a specifical code lign ?
@noahcurry4510 Жыл бұрын
Around 15 minutes, we’re trying to deploy and run transactions but I keep getting a “false transaction mined but execution failed” it looks like it’s giving me an error pertaining to gas fees. Anybody know a fix?
@jiaxunhoa42742 жыл бұрын
why you switch from remix to VS code IDE?
@BlockExplorerMedia2 жыл бұрын
I use VS code IDE to develop and Remix for testing due to the convenient contract UI interface.
@SuryaVino9 ай бұрын
at 44.35 you dont have artifacts folder and then 44.41 artifacts is shown here how
@HarbingerOfDank2 жыл бұрын
Imagine the post office uses tokens/nfts to ship letters and such. It would include a built in tracking system. The nft could represent the Stamp and include to:/from: information. Or nfts that represent land in real world. Owners of the nft land could be incentivized by rental income, land development, etc. Or small business nft that would be backed by material or products. In lieu of rasing capital and giving away % in your company. Take a nft loan by backing your purchase orders with nfts designed to return a certain %.
@williamchen8368 Жыл бұрын
I am trying all on your steps, but i am stuck at the contract RTXToken is ERC20 {....sadly i cant compile with success.
@stevelawless14 ай бұрын
Hey I loved your video, I have a dating app just about to launch which I am looking at creating a token for a variety of reward reasons for my users, I develop in javascript and php and wondered if you had a video which would build on this video, and tie in how to programmatically send tokens to users who meet certain goals, any help would be great thanks.
@pantherverse2 жыл бұрын
Hey man, am getting this error 'aquaToken contract "before each" hook for "Should set the right owner": HardhatError: HH700: Artifact for contract "AquaToken" not found.' What might be the problem?
@apricotcomputers3943 Жыл бұрын
Is erc20 the same as brp20
@kirazami2282 Жыл бұрын
Hi Rinkeby test network has been deprecated, any solutions ? Thanks
@ericcribbs4715 Жыл бұрын
The npm init command is not taking in my vs code terminal im at a loss how this is working for yall