In Solidity, require and revert statements are used to check some pre-conditions before executing the main part of a function. However, these Solidity constructs can also be used to debug your smart contracts. In this video, I am going to show you how you can use require and revert statements…
Read StoryIn Solidity, you can return some values from functions, like in other programming languages. Its also possible to use these return statements to inspect some variables and do some debugging. In this video, I am going to show you how to do this.
Read StoryWhen I started learning Solidity, there was nothing more frustrating than running accross "VM Exception: invalid opcode" or "VM Exception: revert" errors. These errors messages are really not helpful. In this video, I explain you: what are these errors what kind of Solidity code trigger them how to troubleshoot them
Read Story"Out of gas".. what a lovely Solidity error! This really use to make me mad when I started with Solidity smart contracts! In this video, I am going to show you how to simply solve this error and more importantly how you can find out how much gas is needed…
Read Story"out of gas", "revert", "invalid opcode", what are all these weird error names in Solidity? In this video I will give you a full list of the errors in Solidity, and I will explain them to you, so that you can easily understand whats going on when you see them.
Read StoryTo debug syntax errors, you can rely on Solidity syntax highlighting. Fortunately for us, Remix has syntax highlighting activated by default, so we are good about this. In this video, I will teach you: How to fix the usual Solidity syntax errors? How to setup syntax highlighting in other code…
Read StoryA lot of people are confused about debugging in general and don't know the difference between a syntax error and a logic error. It's important to be understand the difference, so that you become good a debugging Solidity smart contracts. In this video, I am going to explain you simply…
Read StoryWhen I started to debug Solidity smart contracts, I was really confused by the fact that although there was a return statement in Solidity, I could not always read returned values when triggering functions from outside the smart contract. I was confused because I didn't know that Ethereum has 2…
Read StoryPreviously, we have implemented the main functionality of our split payment smart contract in Solidity. In this video tutorial, we are going to finish smart contract by adding access control. We will use Solidity require() statement for this.
Read StoryIn this video, we will start a smart contract to do split payments. Split payments allow to split an Ether payment into several addresses, with different amounts (i.e recipient addresses can receive different amounts). It can be especially useful for companies who want to pay employees or freelancers in Ether.…
Read Story