Learn Solidity (0.5) - Error

preview_player
Показать описание
Find out how to use assert, require and revert to throw errors in Solidity.

Рекомендации по теме
Комментарии
Автор

@10:34
I made a mistake on the last bullet point.
It should be revert (like require)

smartcontractprogrammer
Автор

Well done. I appreciate how you explained overflow and underflow conditions using a clock analogy. Very helpful.

ronpoletti
Автор

Thanks a lot for this. Fantastic explanations as always man, you deserve way more subs. Keep up the great work!

xLife
Автор

👌🏻😻 clock analogy is awesome !! Great for understanding the logic!!!

salem
Автор

Thank you very much, you are a talented teacher ! You explain very well !

growthactionsmedia
Автор

Great video, i love your explanations!

manu_a
Автор

The clock example is very good! I have question, At 9:43, since we already have line#11 require, so we still need the line #14 assert or not? Please advise, Thanks!

福瑞黃
Автор

how to make my contract take 0.75% fee from the transfer amount? When I call the function that reads the fee percentage it always shows 0. The compiler shows no errors and i'm using SafeMath to handle overflows and underflows

otmaneghazal
Автор

So should one avoid using assert when building smart contracts in order to avoid using all the gas? Sounds like would make more sense to stick to require and revert

cyberdisco
Автор

I have a question, My Transaction cost does not change. Though my execution cost decreases after using "require". Is the transaction cost static? or am I doing something wrong?

vineeshukla