50- Contract Interactions 2: virtual & override

Опубликовано: 02 Июнь 2026
на канале: Soft.Tomatoes
91
4

CONTRACT INTERACTIONS 2: VIRTUAL & OVERRIDE

Virtual and override keywords are helping us to update a function from an inherited contract. With virtual and override, we can only update the implementation part of the target function, we cannot update its parameters, access modifiers or name.

We will create contract A and B. From contract B, we will access the function and variables of contract A by using import&inheritance. Later by using virtual&override we will update a function of contract A.

1- Contract A deployment does not matter.
1 - Contract B must be deployed.

2 - State of Contract A does not change.
2 - State of Contract B changes.

3- We can use functions and variables of Contract A (internal, external and public ones).

We will create our Solidity smart contract by using Remix.

Github:
Contract A: https://github.com/abdulhakim-altunka...

Contract B: https://github.com/abdulhakim-altunka...

NOTE: All videos on this channel are for exercise purposes. For tutorial purposes I kindly advise you to watch great teachers below:

Solidity:
1) Smart Contract Programmer:
   / @smartcontractprogrammer  
2) Eat the Blocks:
   / @eattheblocks  
3) Dapp University:
   / @dappuniversity  

Node-React-Javascript:
1) The Net Ninja:
   / @netninja  
2) Dave Gray :
   / @davegrayteachescode  

For Comments & Questions:
[email protected]

Buy me a Coffee:
buymeacoff.ee/softtomato