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.
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!
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
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
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!
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.
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.
@@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.
@@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
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!
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 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...
In my entire time in school I never had a teacher as good as you.
That’s a real shame :(
Glad you’re getting the help now :)
because they were fake teachers without any experience
Always here for these vods!
patrick sir , you are funny and a nice teacher
Many thanks :)
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!
Thank you so much Don!!! Means a TON coming from you!
You are the best teacher on TH-cam. Please Sir, make Blockchain videos using Golang. 🙏🙏
Golang? Like for tooling around interacting with the blockchain?
@@PatrickAlphaC Yes Sir. Please. Blockchain with Golang resources are so limited.
@@md.saimunhossain9867 Yes, but there isn't a lot of tooling for go either sadly :/
6:35 "Deek" or perhaps Decimal. You're funny!
Heh :)
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.
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
@@PatrickAlphaCThanks for the reply, may be I missed it from the video. I was talking about index of each emitted log
@@learntoapply_ gotcha, thanks for the feedback!
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!
Thanks for the kind words, and good luck getting into blockchain!!!
lets go!
EIP 3722 proposes a standard for something that could be used as text-only Twitter based on single event emitting.
I’ll have to look into that!
Patrick teaching us how to create contracts that are ripe and ready for a reentry attack😂
It’s just an example!
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
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
💗
Can you let us know all the extensions used in your VS code? the autocomplete/suggestions for whole functions one.
Solidity by Juan B
GitHub co-pilot
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!
Yes, that's normal :)
This would make a great stack exchange ETH or stackoverflow question for more information
Hey Patrick , How much more time would it take for the blockchain (js ) version to be published ???? , eagerly waiting for it.
A few months
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.
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.
@@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.
@@doc.greenthumb Awesome!! Looking forward to seeing you in the web3 space!! Welcome to blockchain!!
Theres something similar to console.log from hardhat or foundry, but for brownie?
@@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
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!
Can you follow along here :)
th-cam.com/video/XT8STflvwNo/w-d-xo.html
@@PatrickAlphaC Perfect, will do! Thanks so much.
Patrick, is calling ChainLink VRF function the same for Fantom Network as it would be in Ethereum??
Yes, but I don’t think it’s live there yet
@@PatrickAlphaC That's what I thought... Thank you for the reply!
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.
There is! But could you make this a question on stack exchange eth? I bet others would like to chime in
@@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...
@@itswiftyy link me the question?