Encode-Club-Solidity-Foundations / Lesson-03

4 stars 7 forks source link

I'm confused about the "virtual" keyword. Is it necessary to have it on the function of contract being inherited so that it can be overridden in the new contract? #8

Open TheCryptoChad opened 2 years ago

MatheusDaros commented 2 years ago

Hello @TheCryptoChad Yes, for overriding a function it needs to be marked as virtual first. This is about the philosophy of solidity again, to make everything explicit and clear from the beginning.