Created
May 24, 2023 08:14
-
-
Save TehilaFavourite/1792c66f8593a99f6bf93c9d85b2a282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.0; | |
contract ContractA { | |
function doActivity() public pure virtual returns (string memory) { | |
return "Activity from ContractA"; | |
} | |
} | |
contract ContractB { | |
function doActivity() public pure virtual returns (string memory) { | |
return "Activity from ContractB"; | |
} | |
} | |
contract DerivedContract is ContractA, ContractB { | |
function doActivity() public pure override(ContractA, ContractB) returns (string memory) { | |
return ContractA.doActivity(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment