Cover image
Blog iconMarco Besier
Mar 7

The "virtual" and "override" keywords in Solidity

Solidity has two keywords that are crucial to understand if you want to make use of contract inheritance: virtual and override. In this blog post, we'll take a closer look at these keywords and explore how you can use them in Solidity.Virtual functionsA virtual function is a function that a derived contract can override. You can mark a function as virtual by using the virtual keyword. If a derived contract overrides a virtual function, it must use the override keyword. Here's an exa...

Most popular by Marco Besier

Cover image

The "virtual" and "override" keywords in Solidity

Cover image

Zero-knowledge proofs in plain English

Cover image

How to install the MetaMask browser wallet

Cover image

How to install Node.js the right way

Cover image

How to interact with external contracts using interfaces

Marco Besier

Written by
Marco Besier

I turn programmers into professional Web3 developers.

Subscribe

2025 Paragraph Technologies Inc

PopularTrendingPrivacyTermsHome
Search...Ctrl+K

Marco Besier

Subscribe