Integrate React.js with Smart Contracts (read / write / events)

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 90

  • @ArturChmaro
    @ArturChmaro  2 года назад +5

    🛠 Web3 Starter for JS Devs (email course): bit.ly/web3starter

    • @BisiOlaYemi
      @BisiOlaYemi Месяц назад

      Can you please make a video on how to integrate react with TON smart contract also Boss

  • @Brandon.busher
    @Brandon.busher 2 года назад +4

    bro your like the only person on youtube who can explain this correctly

  • @TheNodeKillProtocol
    @TheNodeKillProtocol 2 года назад +6

    Yes! This is absolutely amazing! This is the first React/Web3 tutorial that I can actually get to work without any errors. Thank you so much Artur. 😎

  • @Street.Credit
    @Street.Credit 2 года назад +2

    Dope tutorial my guy. You explained exactly what i needed to know. Will be adding this to Street Credit functionality

  • @John-wx3zn
    @John-wx3zn 2 года назад

    Thank you Artur for contributing to my education. A transaction is not being mined. It is the nonce that is being mined. Transactions are paided for and given to the miners on the network into the transaction mempool list. The miner who finds the nonce that produces the special 256 bit hash gets to add a list of transactions to the new block based on highest gas price first in descending order which is all programmed for the miner. They do this because the miner wants to get paid more.

  • @internetkids5813
    @internetkids5813 2 года назад +1

    Thank you so much brother, just what I needed. You are the best !!!

  • @mehrdad1068
    @mehrdad1068 2 года назад

    One of most explainatory tutorial of dapps🌱🌻

  • @johncramer9912
    @johncramer9912 4 месяца назад

    Thank you! Exactly what I needed!

  • @0x0abb
    @0x0abb 2 года назад +1

    Very nice lesson - thank you so much!

  • @josegrillo6867
    @josegrillo6867 2 года назад

    Thank you for sharing your knowledge ... despite the difficulty with the language (my English is very bad) I understood everything ... you explain very well ...
    You already have a Spanish-speaking subscriber, Jose Grillo greets you from Venezuela
    ESPAÑOL
    Gracias por compartir tus conocimiento ... a pesar de la dificultad con el idioma (mi ingles es muy malo) entendi todo... explicas muy bien...
    Ya tienes un subscritor de habla hispana te saluda Jose Grillo desde Venezuela

  • @keremsozen380
    @keremsozen380 2 года назад

    again, my life saver, thanks man!

  • @Ks-oj6tc
    @Ks-oj6tc 2 года назад

    Amazing sir, Thanks a lot for an wonderfull session.

  • @aryandeshmukh9741
    @aryandeshmukh9741 5 месяцев назад

    can you help me with one problem , i want to deploy the smart contract throught the frontend to create token directly , how can i deploy smart contract form react

  • @magicmermaidasmr
    @magicmermaidasmr 2 года назад

    Is it possible to retrieve last 10 smart contacts details? As we retrieve last 10 transactions in ether.js?

  • @DeezoAce
    @DeezoAce Год назад

    thx man really helpful

  • @skellybrownston3641
    @skellybrownston3641 2 года назад

    Nice video. Truly appreciate it. can you kindly do a video to monitor liquidity in ethers.js

  • @0x0abb
    @0x0abb 2 года назад

    Artur, I am getting a warning in VSC that I need to include "contractListened" in the useEffect hook as a dependency but if I include it, the page does not load at all, otherwise it all works fine but I rather not have that warning....?

  • @rapx21x
    @rapx21x Год назад

    Sir thank you so much for the tutorial, Can I use this smart contract on my web3 project ?

  • @hungmai2124
    @hungmai2124 6 месяцев назад

    Hello,
    Your video is really great and easy to understand. However, the way DEXs display the latest transactions is as buy/sell. I'm wondering how they can distinguish transactions from or to liquidity pools to determine whether it's a buy/sell?
    I really look forward to your assistance.
    Many thanks!!!

    • @ArturChmaro
      @ArturChmaro  6 месяцев назад

      i think it's just a matter of UI structuring and selecting write words/phrases. If the customer has selected USDT/ETH pair and got USDT then it's buy, opposite is sell :)

  • @jakelazareth1
    @jakelazareth1 4 месяца назад

    Great tutorial. I’ve got a question, what’s the difference between sendTransaction, and writeContract, using transfer abi ?

    • @ArturChmaro
      @ArturChmaro  3 месяца назад

      sendTransaction = used mainly for just sending raw transactions like ETH from one wallet to another
      writeContract = interacting with smart contracts

  • @mehrdad1068
    @mehrdad1068 2 года назад

    Great tutorial 🙏

  • @FengWei149
    @FengWei149 Год назад

    how about for ico smart contract? should i make abi ico smart contract only or also the token smart contract?

  • @AhmedKhan-rt6oz
    @AhmedKhan-rt6oz 2 года назад

    Is there any complete from 0 to 1 guide to all of these connectivity, like some course, youtube video or any article please recommend me thanks

  • @mehrdad1068
    @mehrdad1068 2 года назад

    Super teacher 🤙🔥

  • @chgian77
    @chgian77 Год назад

    Code doesn't run. there are some issues with the window.ethereum expression

    • @ArturChmaro
      @ArturChmaro  Год назад

      Do you have metamask wallet extension in your browser? 😊

  • @ivanlagade
    @ivanlagade 2 года назад

    excellent!

  • @patienceadajah
    @patienceadajah 2 года назад

    Great video. I learnt alot.
    You copied the contract ABI from remix after deploying your smart contract. Is the ABI unique to individual contracts?
    Asking because the app works with DAI even though you didn't change the ABI code. Can you please explain this?

    • @ArturChmaro
      @ArturChmaro  2 года назад +1

      ABI is a schema of contract. If your contract has the same functions as another contract then parts of schema are matching

  • @Glow0110
    @Glow0110 2 года назад

    Can you do a video explaining the code of a taxed crypto token like Shibnobi? I am really trying to understand how to create my own custom tokens, but I am reaching some roadblocks. Eventually I would like to be able to build my own dapps like this, but first I need to actually understand how to create my own token.

  • @hadishams3544
    @hadishams3544 2 года назад

    thnks alot bro!!!!

  • @tinnguyen9651
    @tinnguyen9651 Год назад

    can you give for me the abi json file in this video?

  • @binkie2182
    @binkie2182 2 года назад

    you are an absolute chad

  • @AshuSingh-mw2wt
    @AshuSingh-mw2wt 2 года назад +1

    please, make a video on how to handle royalty in opesea.

    • @ArturChmaro
      @ArturChmaro  2 года назад +1

      Good idea, thanks Ashu! Can't promise when I will shoot it. Pretty busy atm

  • @sahnedeyiz3870
    @sahnedeyiz3870 2 года назад

    Hello, your video is amazing. But when I refresh this remix ide page, the orange buttons don't come up without deploying the contract. Do I have to deploy the contract every time? How can I save this contract and use the orange functions over and over after deploying it.

    • @ArturChmaro
      @ArturChmaro  2 года назад

      You can't use over and over contracts deployed to JavaScript VM. However you may deploy your contracts to real or test network. Then you can get back to Remix IDE, keep the code and just provide contract address that you've deployed previously. Orange buttons will "talk" to your contract ;)

  • @parteeksinghjamwal9537
    @parteeksinghjamwal9537 2 года назад

    For every transaction that requires a state change, do we need to re-define the provider, signer and other stuff?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Nope. You can keep the same provider/signer for other calls ;)

  • @ikhwanrahman9595
    @ikhwanrahman9595 2 года назад

    how to make buy and sell smartcontract?

  • @jefersonguillenhuari2915
    @jefersonguillenhuari2915 2 года назад

    I have a question , do you use solidity ? Or Just web3?

  • @henryphilbrook5074
    @henryphilbrook5074 2 года назад

    Great video really helped me out but next time can you raise you mic it's a tad hard to hear.

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Will do Henry! Glad you like it

  • @javaidrauf4426
    @javaidrauf4426 2 года назад

    I have added approve function and it is functioning properly, but facing issue in adding tranferFrom function. Can u please explain how to add transferFrom function in React.js? Thanks!

    • @ArturChmaro
      @ArturChmaro  2 года назад

      What issues are you facing?

    • @javaidrauf4426
      @javaidrauf4426 2 года назад

      @@ArturChmaro In transferFrom function, we have to connect with the 'spender' address which is approved in 'approve' function to transfer tokens from owner to recipient address. So, how could we switch account from owner to 'spender' address. Please explain transferFrom handler in detail. const handleTransferFrom = async(e)=>{
      e.preventDefault();
      const data = new FormData(e.target);
      const provider = new ethers.providers.Web3Provider(window.ethereum);
      await provider.send("eth_requestAccounts", []);
      const signer = await provider.getSigner(); **....../it signed the transaction with metamask zero account, however here we need to connect with the 'spender' address which is approved through erc20.approve(data.get("spender"), data.get("amount")) .......**
      const erc20 = new ethers.Contract(contractInfo.address, erc20_dapp_abi,signer);
      await erc20.transferFrom(data.get("owner"), data.get("recipient"), data.get("amount"));
      };

  • @arsalankashkoyi3035
    @arsalankashkoyi3035 2 года назад

    I did not understand the part of the event, could you give an explanation ?

    • @ArturChmaro
      @ArturChmaro  2 года назад +1

      What exactly would you like to grasp?

    • @arsalankashkoyi3035
      @arsalankashkoyi3035 2 года назад

      @@ArturChmaro The part of useEffect that you explain , i didn't understand

  • @loseless2428
    @loseless2428 Месяц назад

    How do you save deployed contract

    • @ArturChmaro
      @ArturChmaro  Месяц назад

      All you need is it's address. You may find it in the block explorer on the transaction that deployed the contract

  • @php6515
    @php6515 2 года назад

    thanks for amazing video
    i just wanted to understand, i have nft based website, the website is developed using custom code, meta mask is connected, we want to implement a feature to buy nft, but we want to get some percentage amount when user buy nft from my market place, will this concept of Smart Contract will help in such case, means i will do two transactions, one will be nft fees to be shared with the nft owner and the other one would be some percentage to be shared in my accounts, is that possible ?

    • @0xdamian595
      @0xdamian595 2 года назад

      So, you want to charge fees on your NFT marketplace.
      Yes, it's possible.

  • @mchuatak
    @mchuatak 9 месяцев назад

    Is it possible to listen to an event and check for “open trading”?

    • @ArturChmaro
      @ArturChmaro  9 месяцев назад

      What open trading you mean? At some DeFi protocol?

    • @mchuatak
      @mchuatak 9 месяцев назад

      First of all, thank you for the reply. My apologies for missing explanation there, is there a way for us to listen to a contract address and get a notification when the CA is already live?

    • @ArturChmaro
      @ArturChmaro  9 месяцев назад

      @@mchuatak yes, after sending transaction store transaction hash in the variable. Get the receipt (use ethers or other library for that). Transaction receipt should contain contract address :)

    • @mchuatak
      @mchuatak 9 месяцев назад

      No, what i mean is like sniping a new contract address until it’s live. Not my token. Do you think that's possible?

    • @ArturChmaro
      @ArturChmaro  9 месяцев назад

      Never done it. Perhaps you have to learn about mempool and analyzing transactions that are waiting to be mined.

  • @pidousuon2019
    @pidousuon2019 2 года назад

    Interesting, Artur. I've sent my email to you as well as said Hi to your facebook. Hope I will get reply soon for my next desire after disccusion. Thanks

  • @carlosalbertobatistacruz
    @carlosalbertobatistacruz 2 года назад

    How transfer main address from my address?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Just send funds from one address to another. Not sure if I got the question right though...

    • @carlosalbertobatistacruz
      @carlosalbertobatistacruz 2 года назад

      ​@@ArturChmaro Sorry, my question was vague... I was talking about a claim system, as the address of the ''earn'' tokens (primary) transfers to my address (local user), understand?

  • @jony_s
    @jony_s 2 года назад

    сними по нашему такое же

  • @bigmac5865
    @bigmac5865 2 года назад

    Yo The Artur ..... H

  • @nikitayaskevich813
    @nikitayaskevich813 Год назад +1

    Course didnt age well.

    • @ArturChmaro
      @ArturChmaro  Год назад

      Why? Crypto is down, but smart contracts are still useful

  • @inquisitiveye
    @inquisitiveye 2 года назад

    Getting this error on the codesandbox code: erc20.name is not a function
    Anything i'm missing there?

    • @ArturChmaro
      @ArturChmaro  2 года назад

      Perhaps you are calling wrong address/network?