Web3 Tutorial Project | Build a Faucet dApp with Ethersjs & Reactjs

Поділитися
Вставка
  • Опубліковано 27 вер 2022
  • In this project-based web3 tutorial we build a complete faucet dApp using Ethersjs and Reactjs to connect to a wallet and interact with a Solidity faucet smart contract on the Ethereum Goerli network.
    Topics covered include: connecting a wallet, interacting with a smart contract, dApps, web3 tutorial for beginners, Reactjs, Ethersjs library, web3js library, application binary interface (abi), Ethereum Goerli testnet, sending tokens.
    Starter code repo:
    github.com/jspruance/faucet-d...
    Completed project repo:
    github.com/jspruance/erc20-tu...
    Ocean Token (OCT) smart contract address (Goerli):
    0x2225d9117e37329713884942992EE040B742D906
    Faucet smart contract address (Goerli):
    0xE16738Fb636c83b198A71368dd0D580FBc3B993B
    Faucet smart contract tutorial:
    • Faucet Smart Contract ...
    ERC20 token tutorial:
    • ERC20 Token Tutorial |...
    Ethers.js docs:
    docs.ethers.io/v5/
    Metamask API docs:
    docs.metamask.io/guide/ethere...
  • Наука та технологія

КОМЕНТАРІ • 25

  • @quantaraum
    @quantaraum Рік тому +3

    huge value derived from you!
    you are a master at explaining, while still explaining at a comprehensive speed.
    Much appreciated blockexplorer!
    Thanks for your time and energy

  • @josephdelgiorgio3997
    @josephdelgiorgio3997 Рік тому

    That was a fun one! I appreciate the content. Stay safe for the storm!

  • @thom1897
    @thom1897 Рік тому

    Thank you so much for your video !!!

  • @scorp9838
    @scorp9838 2 місяці тому

    Thanks bro, you best👍

  • @bestzenyatta3362
    @bestzenyatta3362 Рік тому

    thanks alot for the videos

  • @ivanlagade
    @ivanlagade Рік тому

    nice tutorial bro..

  • @BillyBishop589
    @BillyBishop589 Рік тому

    another great tutorial.. thanks so much for this content.. im learning so much with your help.. im working with matic but absolutely was able to follow along .. great job!!!!

  • @kirazami2282
    @kirazami2282 Рік тому

    Hi thanks for the video, could you do a follow up video to remove the string message from the page please ? Thanks

  • @samarabdelhameed2397
    @samarabdelhameed2397 Рік тому

    Thanks .. when I press get token I got error estimate gaslimit can u help me

  • @jims7089
    @jims7089 Рік тому

    To clarify, was the src folder installed by the npm i ethers cli command?

    • @jims7089
      @jims7089 Рік тому

      Nevermind, I worked my way thru the vid and sorted it!

  • @charlesb2842
    @charlesb2842 Рік тому

    Great video, but had a quick question:
    my JsonRpcSigner address is returning null, which results in "signer" being undefined. Any thoughts on where I should be looking to resolve?
    my err.message is "Cannot read properties of undefined (reading 'connect')"
    Thanks!

    • @BlockExplorerMedia
      @BlockExplorerMedia  Рік тому +1

      Couple of thoughts. You could try passing in an explicit address to 'provider.getSigner()'. By default (if no value passed in) it should use the first wallet address. Check if your provider is being properly created, since 'getSigner' is a method on that object. MM installed and connected?

    • @charlesb2842
      @charlesb2842 Рік тому

      @@BlockExplorerMedia Thanks for the feedback! Not sure what the issue is - I even get the same error if I just clone your repo and run. MM installed and working. Will keep tinkering with this.

    • @BlockExplorerMedia
      @BlockExplorerMedia  Рік тому +1

      I just did a fresh clone of the project and ran it but unable to repro. Thinking of what to suggest...I wonder if it could be a collision with any globally installed packages like ethersjs or hardhat. Maybe try to look at the exact versions installed. Update MM to latest version...although unclear if that could be the issue.

  • @abderrahmanemya6602
    @abderrahmanemya6602 3 місяці тому

    im busting my head trying to create a test token faucet that any wallet can request tokens from. what you did here seems to me like request a transfer from account1 to account 2. which are both in the same wallet and both were granted permissions. am i wrong

  • @thinkingmad1685
    @thinkingmad1685 Рік тому

    Hey how can we make our smart contract pay the gas fees for transaction in order to get the token. I can see here the address requesting for token paying the gas fees , is it possible ? I know it's a stupid question but i m curious?

    • @BlockExplorerMedia
      @BlockExplorerMedia  Рік тому +1

      Great question. Yeah, there' a way to do gas sponsorship through a 3rd party smart contract called a 'paymaster' which contains logic that decides who should pay the gas fee for any given transaction. I haven't done a deep dive into it yet but it's related to the EIP-4337 proposal and I know there are a few projects using it.

    • @BlockExplorerMedia
      @BlockExplorerMedia  Рік тому +1

      Here's a great article describing EIP-4337. See 'Sponsorship with Paymasters' towards the end:
      medium.com/infinitism/erc-4337-account-abstraction-without-ethereum-protocol-changes-d75c9d94dc4a

    • @thinkingmad1685
      @thinkingmad1685 Рік тому +1

      @@BlockExplorerMedia thankyou will surely look into it :)

  • @joseph5058
    @joseph5058 Рік тому +2

    Please build a swap with farm and stuff please 🙏🙏🙏

  • @akangsurya7461
    @akangsurya7461 Рік тому

    help me sir..
    cannot estimate gas; transaction may fail or may require manual gas limit (reason="execution reverted", method="estimateGas", transaction={"from":"0xcdBcCE83100828DB71349174Ba0c505aCCE7d316","to":"0x8Ed2E536cca663b03db24d3E29810C53012D6261","data":"0x359cf2b7","accessList":null}, error={"code":-32000,"message":"execution reverted"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)