Skip to content

Instantly share code, notes, and snippets.

@AyDeveloper
Created August 9, 2022 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AyDeveloper/502bd1c11d3ea526346201602dfd9ae7 to your computer and use it in GitHub Desktop.
Save AyDeveloper/502bd1c11d3ea526346201602dfd9ae7 to your computer and use it in GitHub Desktop.
contract A {
function foo() virtual public pure returns (string memory) {
return "Foo from A";
}
function boo() public pure returns (string memory) {
return "Boo from A";
}
}
contract B is A {
function foo() override public pure returns (string memory) {
return "I override the Contract A's foo function";
}
function boo2() public pure returns (string memory) {
return "Boo from B";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment