Hardhat Tutorial | Smart contract framework (Truffle alternative)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ส.ค. 2024

ความคิดเห็น • 109

  • @plokkum
    @plokkum 2 ปีที่แล้ว +6

    I created my first live contract with HardHat after switching from Truffle. I have zero regrets switching. Hardhat's documentation is great too.

  • @azeezabidoye1188
    @azeezabidoye1188 ปีที่แล้ว +1

    Awesome tutorial with good illustrations. Every point is well explained and I must confess that you are a life saver. Kudos!

  • @cchen408
    @cchen408 3 ปีที่แล้ว +8

    This is awesome I just converted from truffle to hardhat but still had some questions. This will be super helpful :)

  • @niconomics1715
    @niconomics1715 2 ปีที่แล้ว

    great tutorial only thing I'll add is in the beginning you want to run these lines
    mkdir hardhat-tutorial
    cd hardhat-tutorial
    npm init --yes
    npm install --save-dev hardhat
    that way you can start where based god julian starts

  • @tarunvadde
    @tarunvadde 2 ปีที่แล้ว

    I always learn something new when I visit your channel.

  • @bakedbrotatoes
    @bakedbrotatoes 2 ปีที่แล้ว +1

    Perfect end to end tutorial video. I appreciate this more than I can say. Thank you!

  • @oniscsadi
    @oniscsadi 2 ปีที่แล้ว

    Fantastic video!
    Please note that "fails if sender does not have enough tokens" test passes no matter what the revertWith() string parameter is. It's not really testing it fully.

  • @0x0abb
    @0x0abb 2 ปีที่แล้ว +2

    Thanks again - nice tutorial - I am not a beginner but I'm still learning. Truffle is definitely easier to get going but I think hardhat looks promising. I prefer ethers over web3 but then again - I imagine a seasoned pro like yourself will be better at evaluating these two - but overall - it seems hardhat and ethers is a more modern - next level framework

  • @carlosbane147
    @carlosbane147 4 หลายเดือนก่อน

    Man you're good, this is perfect

    • @EatTheBlocks
      @EatTheBlocks  4 หลายเดือนก่อน

      Thanks a lot!

  • @markmathis3954
    @markmathis3954 3 ปีที่แล้ว +1

    I love the test helpers built into chai and the debug logging built into the solidity files. I'm not sure if we can do a native solidity test with it, though. I may wait until it gets more adopted before i switch... Thanks for the video!

  • @cyberdisco9724
    @cyberdisco9724 2 ปีที่แล้ว

    This is one of the most useful videos for me. So glad to be done with truffle lol. Thanks!

  • @0x_conspi
    @0x_conspi 2 ปีที่แล้ว

    julien the best of the best

    • @EatTheBlocks
      @EatTheBlocks  2 ปีที่แล้ว

      thanks, glad it's helpful!

  • @CoversTavo
    @CoversTavo 2 ปีที่แล้ว +1

    You are the best dude! simply the best

  • @zz6458
    @zz6458 2 ปีที่แล้ว

    This is one of the best sources ive found for how to write java tests. However some of the tests for the contract im testing are quite a bit more complex then the tests provided. Could you make another video with more complex tests? All the videos I've seen on testing focus on token contracts. Can you make a video that writes test for contracts such as arbitrage, staking, lending etc. Love your work keep it up!

  • @benjaminsanchezlopez3266
    @benjaminsanchezlopez3266 2 ปีที่แล้ว +1

    Incredible content!!!! can you do a video using hardhat and connecting Front-End to Smart Contracts to deploy on OpenSea Testnet. It would be amazing!!! thank you very much for the content!

  • @sgssergio
    @sgssergio 3 ปีที่แล้ว

    Nice video!!!
    I believe that the truffle library offer better cli deploy tool because not need create some deploy script, but not offer local test node, this functionality offers ganache-cli or ganache , the integration between them is easy.
    In fact I didn't know hardhat library but after view this video I have very interesting to probe this. Is more flexible, offer test node, transparent integrarion with ethers.js library , nice tools and a lot of plugins. Is true that the learn curve is more big that truffle, but using.the documentation is matter of time to learn it.

  • @gabi.garcez
    @gabi.garcez 3 ปีที่แล้ว +5

    Thank you for this type of content!!

  • @takemdarlington4036
    @takemdarlington4036 2 ปีที่แล้ว

    Great walkthrough!

  • @maheenkabeer4323
    @maheenkabeer4323 ปีที่แล้ว

    Can You make a full playlist for zero to hero in blockchain development with projects included ?

  • @nikkhilsharrma6596
    @nikkhilsharrma6596 2 ปีที่แล้ว

    Getting below error after running the "npx hardhat test"
    Should assign the total supply of tokens to the owner:
    Error: invalid BigNumber value (argument="value", value=undefined, code=INVALID_ARGUMENT, version=bignumber/5.6.0)

  • @Coach_Dustin_C
    @Coach_Dustin_C 2 ปีที่แล้ว +1

    @1:34 he runs the 'npx hardhat' command and gets the option to create a project. @ 1:59 he runs 'npx hardhat' , again, and gets a list of the tasks available. My problem is that I want to get the option to create a project when I run the command, however I only get the list of tasks available option.

    • @tldoesntlikebread
      @tldoesntlikebread 2 ปีที่แล้ว

      I've never gotten that problem, have you installed hardhat?

    • @darylferreras6241
      @darylferreras6241 2 ปีที่แล้ว

      Getting this problem too. Did you ever figure it out? Also having problems installing the plugins saying they are not found in the registry.

    • @lilnaxx919
      @lilnaxx919 2 ปีที่แล้ว

      @@darylferreras6241 same problem with me . any solution from you?

  • @lihe5156
    @lihe5156 2 ปีที่แล้ว

    awesome

  • @dave4148
    @dave4148 2 ปีที่แล้ว

    So then the deployer address has all those tokens… how do people/teams manage that private key to keep it secure? Not like you can rotate that…

  • @saas2708
    @saas2708 2 ปีที่แล้ว

    Hello sir, I can't access to 2nd video on your website.(Free training)

  • @artofficialapol
    @artofficialapol 2 ปีที่แล้ว +1

    Me: npm install -D hardhat
    GitBash: up to date, audited 10 packages in 939ms
    found 0 vulnerabilities
    Me: npx hardhat
    GitBash: npm ERR! could not determine executable to run
    HELP!!! Please.

  • @evahaufe3306
    @evahaufe3306 2 ปีที่แล้ว

    CAN YOU HELP ME to SOLVE THE ISSUE: Error HH600: Compilation failed, when i deploy the Transaction.sol Thanks please

  • @arsalankashkoyi3035
    @arsalankashkoyi3035 2 ปีที่แล้ว

    Hello
    Why does it warn me when I write the pragma solidity ^0.8.0 ?
    the warn is " Source file requires different ccompiler version ( current compiler is 0.7.3+commit.9bfce1f6 ) ".

  • @grupoebic9468
    @grupoebic9468 2 ปีที่แล้ว

    I saw your video and I really enjoyed it. But I have a problem on my NFT concerning the image visualization on the ethereun network through Opensea.
    The name NFT: Cripto The Iron Family

  • @damagedgoodies
    @damagedgoodies 2 ปีที่แล้ว

    This was really helpful information. Thanks!

  • @VijayManikpuri
    @VijayManikpuri 2 ปีที่แล้ว

    please also share the matching code repo , I have to search the exact file which you are using in entire repo

  • @rabapatrick8906
    @rabapatrick8906 ปีที่แล้ว

    do I need to set up and initialize testing environment every time when I create a new project/folder?

  • @danielany1590
    @danielany1590 2 ปีที่แล้ว

    Great tutorial!! Thank you!

  • @steemycoinz
    @steemycoinz 3 ปีที่แล้ว +4

    Can you do more hardhat tutorials with interesting smart contracts, testing and so forth

  • @rajatarora9139
    @rajatarora9139 3 ปีที่แล้ว

    I am getting error in test ` AssertionError: expected { Object (_hex, _isBigNumber) } to equal { Object (_hex, _isBigNumber) }`. Followed the same as you mentioned in the video

  • @naz3eh
    @naz3eh 3 ปีที่แล้ว +1

    integrating with frontend just went little bit over the mind

  • @UserHuge
    @UserHuge 3 ปีที่แล้ว

    Hi, I supposed CLI prompt for the priv. key in the way of `prompt.get({"hidden: true"})...` would be better but had no success, any gist on how to achieve such deployment flow for the main-net?

  • @techspec_
    @techspec_ 2 ปีที่แล้ว

    what software are you using? looks amazing,

  • @algorithm1313
    @algorithm1313 3 ปีที่แล้ว

    Why is your private key public to us?

  • @rogerzhang5993
    @rogerzhang5993 3 ปีที่แล้ว

    I hate truffle so much, thanks for this video!

  • @50kT
    @50kT 2 ปีที่แล้ว

    Is there a way to get error linting using hardhat and vscode? I like how remix tells me I did something wrong right away. I'm new though so for me I really need it.

  • @SpontaneousCube
    @SpontaneousCube 3 ปีที่แล้ว

    Great video, thanks so much 👍

  • @ramyak8143
    @ramyak8143 3 ปีที่แล้ว

    When I done "npx hardhat test" I am getting "0 passing"
    Please can u tell me the solution for this

  • @yurakriachko7008
    @yurakriachko7008 3 ปีที่แล้ว

    Thank you

  • @ishanagrawal631
    @ishanagrawal631 2 ปีที่แล้ว

    Is this ERC 20 token ?

  • @cyberdisco9724
    @cyberdisco9724 2 ปีที่แล้ว

    When testing, is there a way to deploy from an account other than the first one in the getSigners array? Like deploying from the second account in the getSigners array for instance

  • @vervv74ify
    @vervv74ify 2 ปีที่แล้ว

    Hello, Julien
    Is there any possibility to add a network with ‘wss’ (not ‘http’) URL for hardhat test? Now i have the message "TypeError: Only HTTP(S) protocols are supported" while testing

  •  3 ปีที่แล้ว +1

    Great content, but I still prefer Truffle 5! Thank you!

    • @Viralplace
      @Viralplace 3 ปีที่แล้ว

      Why?

    •  3 ปีที่แล้ว

      @@Viralplace It's easier

    • @ritikjain3975
      @ritikjain3975 2 ปีที่แล้ว +1

      @ market demands hardhat

    •  2 ปีที่แล้ว

      I've changed and using Hardhat today... The learning curve is steeper, but it's more flexible.

    •  2 ปีที่แล้ว

      By the way, I'm launching one more DeFi product soon...

  • @zhiroboss7813
    @zhiroboss7813 2 ปีที่แล้ว

    Лучший!!!

  • @dsi7382
    @dsi7382 3 ปีที่แล้ว

    Is it possible to use hardhat with web3 and mocha ? Would some dependencies change other than the ethers and chai dependencies ?

  • @mrirvgottea6315
    @mrirvgottea6315 ปีที่แล้ว

    Hi do you have the github code?

  • @kritterkult1318
    @kritterkult1318 2 ปีที่แล้ว

    token does not have a connect() member function. Or is that added by hardhat or something?

    • @oniscsadi
      @oniscsadi 2 ปีที่แล้ว

      make sure you are using the "token" object and not "Token" to call connect.

  • @rauppz
    @rauppz 3 ปีที่แล้ว

    Is there a way to deploy contracts using a ledger wallet?

    • @EatTheBlocks
      @EatTheBlocks  3 ปีที่แล้ว +3

      Yes. There is a NodeJS library for that. I did it with Truffle (you can see my video on deploying the token of ETB). I am sure you can do it with hardhat as well.

    • @rauppz
      @rauppz 3 ปีที่แล้ว

      @@EatTheBlocks Thanks, your videos are really helpful!

  • @sanyasareen971
    @sanyasareen971 2 ปีที่แล้ว

    Don't use the latest verion of node

  • @aminghasemi2621
    @aminghasemi2621 3 ปีที่แล้ว

    what is the advantage of using hardhat over truffle?

  • @bitmammothOG
    @bitmammothOG 3 ปีที่แล้ว

    how do we verify a contract using this method?

    • @bitmammothOG
      @bitmammothOG 3 ปีที่แล้ว

      I assume its using a plugin like with truffle to connect to etherscan

    • @bitmammothOG
      @bitmammothOG 3 ปีที่แล้ว +1

      yep :) thank you for the tutorial!

  • @illuminated2438
    @illuminated2438 3 ปีที่แล้ว

    We need to learn truffle so we can use an alternative? That sounds inefficient

    • @EatTheBlocks
      @EatTheBlocks  3 ปีที่แล้ว +6

      If you don't know Truffle start with that. And if you don't like Truffle, checkout Hardhat.

    • @illuminated2438
      @illuminated2438 2 ปีที่แล้ว

      @@EatTheBlocks Thanks

  • @bhupendrabisht6951
    @bhupendrabisht6951 3 ปีที่แล้ว

    Thus hope it has support of typescript 😟

    • @joshfisidi
      @joshfisidi 3 ปีที่แล้ว

      it does -- hardhat.org/guides/typescript.html

  • @xaapt
    @xaapt 2 ปีที่แล้ว

    🌍🌎🌏🌐

  • @magnetto90
    @magnetto90 2 ปีที่แล้ว

    This video deserves an update??

  • @from2ureview251
    @from2ureview251 3 ปีที่แล้ว

    Why don't you use VS Code

    • @EatTheBlocks
      @EatTheBlocks  3 ปีที่แล้ว +1

      because I prefer vim.

    • @from2ureview251
      @from2ureview251 3 ปีที่แล้ว

      @@EatTheBlocks mmm i see ;) Thanks!

  • @irvinggonzalez2415
    @irvinggonzalez2415 ปีที่แล้ว

    POST YOUR GITHUB TY

  • @mitchs6488
    @mitchs6488 3 ปีที่แล้ว

    Hey @eattheblocks, im very interested in doing my own sort of yield farming token but am a complete noob at code. Im able to read/deploy no problem - but for web3/api and a ctually linking them i dont know where to begin.
    Is there any group or way to message you directly? I have telegram?
    I'm willing to pay for you to teach me, even if its simple! Ypuve that fucking smart, just watching your videos you explain things so well my man. Reply to this comment with your response. Im being as genuine as possible with all of this.
    Be safe brother.

  • @joseysusamigos
    @joseysusamigos 2 ปีที่แล้ว

    mejor directo en la EVM :v

  • @killerjerry6125
    @killerjerry6125 3 ปีที่แล้ว

    Bro tell me about how can I do an online interview for remote block chain job because I am from India
    Tell me suggestions bro please please 🙏

  • @TheShoTo
    @TheShoTo 3 ปีที่แล้ว

    Hardhat a l'air d'être moins instable que Truffle

    • @EatTheBlocks
      @EatTheBlocks  3 ปีที่แล้ว +1

      Beaucoup de dev ont switche a Hardhat oui

    • @TheShoTo
      @TheShoTo 3 ปีที่แล้ว

      @@EatTheBlocks je suis intéressé par le cours sur la defi, on peut le suivre avec hardhat ?

    • @EatTheBlocks
      @EatTheBlocks  3 ปีที่แล้ว

      @@TheShoTo On utilise Truffle dans le cours, mais si tu veux tu peux essayer avec Hardhat, ca devrait marcher aussi.

  • @debarshikundu5853
    @debarshikundu5853 3 ปีที่แล้ว

    Sir i have sent you mail regarding purchase of defi course...

  • @bendedjorgensen9997
    @bendedjorgensen9997 2 ปีที่แล้ว

    "TypeError: token.balanceOf is not a function"
    the error pop up when I tried ran the code from the video ......need some help here .......

    • @nikkhilsharrma6596
      @nikkhilsharrma6596 2 ปีที่แล้ว +1

      Validate the letter's case of balanceOf in .sol file. both should be same.

  • @saposabio7418
    @saposabio7418 2 ปีที่แล้ว

    Wow!!! This was awesome!!! Thank you for sharing! Already subscribe me. 👏

  • @DevrajSinghRawat
    @DevrajSinghRawat 2 ปีที่แล้ว

    Thanks for the video @eattheblock
    I would like you ask at 23:32
    What do you mean by first we should get the contract factory using const Token = await ether.getContractFactory('Token')