All about Logging, Events, Solidity, Bloom Filter | Brownie

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

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

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

    Always here for these vods!

  • @kyle_bro
    @kyle_bro 2 года назад +10

    In my entire time in school I never had a teacher as good as you.

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

      That’s a real shame :(
      Glad you’re getting the help now :)

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

      because they were fake teachers without any experience

  • @DonDodge
    @DonDodge 2 года назад +3

    Patrick, you are an amazing teacher. You explain everything, edge cases, terminology, how to do it, and WHY we need to do it. Thank you!

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

      Thank you so much Don!!! Means a TON coming from you!

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

    patrick sir , you are funny and a nice teacher

  • @md.saimunhossain9867
    @md.saimunhossain9867 2 года назад

    You are the best teacher on RUclips. Please Sir, make Blockchain videos using Golang. 🙏🙏

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

      Golang? Like for tooling around interacting with the blockchain?

    • @md.saimunhossain9867
      @md.saimunhossain9867 2 года назад

      @@PatrickAlphaC Yes Sir. Please. Blockchain with Golang resources are so limited.

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

      @@md.saimunhossain9867 Yes, but there isn't a lot of tooling for go either sadly :/

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

    6:35 "Deek" or perhaps Decimal. You're funny!

  • @omarciano42
    @omarciano42 2 года назад +3

    EIP 3722 proposes a standard for something that could be used as text-only Twitter based on single event emitting.

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

    I'm at the last part of your freecodecamp tutorial, and dude you're an amazing teacher!
    Thank you for putting out such great material!
    Getting into blockchain world now and soon will be hunting for jobs!

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

      Thanks for the kind words, and good luck getting into blockchain!!!

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

    I Highly appreciate your content, one thing I found missing in this video is log index of txn. Which is critical and has many uses, etherscan displays that in little circle.

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

      Thanks for the feedback! Are you talking about the indexed logs like topics? We did cover that. Or are you talking about the index of each emitted log

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

      @@PatrickAlphaCThanks for the reply, may be I missed it from the video. I was talking about index of each emitted log

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

      @@learntoapply_ gotcha, thanks for the feedback!

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

    Patrick teaching us how to create contracts that are ripe and ready for a reentry attack😂

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

    lets go!

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

    Can you let us know all the extensions used in your VS code? the autocomplete/suggestions for whole functions one.

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

    Great video Patrick! I have a question about how you access the past events of a contract? It seems to be tied to transactions (eg in the video you do tx.events) so every time you call a new transaction you lose access to the previous events? I'm storing data in events and want a way to be able to search and retrieve data from any event that has occurred

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

      Yep! You’d have to replay all the he transactions from a blockchain and save the events. Something like the graph is a decentralized way to do this, or use moralis

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

    hey Patrick, i want to ask you a question, say if we use upgradeable contract from openzeppelin and already got it verified with its implementation contract. But the logs cannot be decoded even though its implementation contract its already veirified. Is this normal behaviour? that proxy smart contract logs cannot be decoded directly from etherscan? thanks patrick!

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

      Yes, that's normal :)
      This would make a great stack exchange ETH or stackoverflow question for more information

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

    Hey Patrick , How much more time would it take for the blockchain (js ) version to be published ???? , eagerly waiting for it.

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

    Hi Patrick, thanks for the very clear video. I am getting an error like this (I have my own contract): ValueError: Execution reverted during call: 'no logs produced by tx'. This transaction will likely revert. If you wish to broadcast, include `allow_revert:True` as a transaction parameter. I can't seem to find much about this. I understand somehow there are no logs, but how would I include those? I can't seem to find any help in the brownie docs, but I am completely new to brownie coming over from hardhat. Thanks!

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

      Can you follow along here :)
      ruclips.net/video/XT8STflvwNo/видео.html

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

      @@PatrickAlphaC Perfect, will do! Thanks so much.

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

    Patrick, is calling ChainLink VRF function the same for Fantom Network as it would be in Ethereum??

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

      Yes, but I don’t think it’s live there yet

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

      @@PatrickAlphaC That's what I thought... Thank you for the reply!

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

    💗

  • @doc.greenthumb
    @doc.greenthumb Год назад

    Patric great explanation. One question that I have. Can I use event/emit and retrieve the information in the same way for debugging? In my case I have a script that interacts with a dex contract and its failing and returning with a “reverted”. So I copied the contracts of the dex included some emits and inherited it in my own contract, but the function execution fails without the event been printed in my terminal.

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

      You can! But you're need a tool that can print those emitted events to your terminal. IMO better debugging tools would be using:
      - Foundry's `console.sol`
      - Hardhat's `console.sol`
      - writing a script that reads emitted events and prints them
      - Writing reverts with rationales
      - Using step through debuggers like foundry, the VSCode truffle plugin, remix, tenderly, etc
      There is a lot of tooling out there to help you do what you're looking to do, you shouldn't have to reinvent the wheel.

    • @doc.greenthumb
      @doc.greenthumb Год назад +1

      @@PatrickAlphaC I appreciate your prompt response and helpful advice. When I get home, I will definitely try out your suggestion. Thank you again for your time and expertise.
      I also wanted to say your videos have inspired me to make a change in my career. Your Python, Brownie, and Solidity tutorials are among my favorites.
      As an "outdated" data analyst who has been out of the market for more than five years, I believe that blockchain development/analysis is an excellent opportunity for me to return to the technology field. Thank you for being a valuable resource for me as I pursue this new path.

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

      @@doc.greenthumb Awesome!! Looking forward to seeing you in the web3 space!! Welcome to blockchain!!

    • @doc.greenthumb
      @doc.greenthumb Год назад

      Theres something similar to console.log from hardhat or foundry, but for brownie?

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

      @@doc.greenthumb not that I know of :/
      I emit events and then write custom stuff to print them - or I write revert statements when using brownie. This would be a good issue to make on apeworx

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

    Hi Patrick! I'm stuck with this doubt. Hope you can help me. I'm working on a testnet and ganache-local.
    Is there any way to call an old tx and get the events?
    Example: (assuming createCollectible emits events)
    tx = contract.createCollectible({"from": get_account(wallet=1)})
    If I run again the code, it will create a new tx object.

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

      There is! But could you make this a question on stack exchange eth? I bet others would like to chime in

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

      @@PatrickAlphaC hey could you provide the solution to this? I've found that ignacio posted on stack overflow but it hasn't been answered. I've been searching for hours to find a solution...

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

      @@itswiftyy link me the question?