Skip to content

Instantly share code, notes, and snippets.

@amarachiugwu
Created April 4, 2023 20:37
Show Gist options
  • Select an option

  • Save amarachiugwu/d2bb22b5b7d29d5881ed44e7b35cad1a to your computer and use it in GitHub Desktop.

Select an option

Save amarachiugwu/d2bb22b5b7d29d5881ed44e7b35cad1a to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;
// GGGF -> Great Grand Grand Father
// GGF -> Great Grand Father
// GF -> Grand Father
// F -> Father
contract GGGF {
function name () public pure virtual returns ( string memory) {
return 'GGGF';
}
}
contract GGF is GGGF{
function name () public pure virtual override returns ( string memory) {
return 'GGF';
}
function a () public pure returns ( string memory) {
return 'a';
}
}
contract GF is GGGF, GGF{
function name () public pure virtual override(GGGF, GGF) returns ( string memory) {
return 'GF';
}
function b () public pure returns ( string memory) {
return 'b';
}
}
contract F is GGGF, GGF, GF{
function name () public pure override(GGGF, GGF, GF) returns ( string memory) {
return 'F';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment