Lesson 7: Outline
Lesson 7: Inheritance and Interfaces in Solidity
Part 1: Inheritance in Solidity
contract Base {
function greet() public pure virtual returns (string memory) {
return "Hello, world!";
}
}
contract Derived is Base {
function greet() public pure override returns (string memory) {
return "Hello, Solidity!";
}
}Part 2: Interfaces in Solidity
Last updated