Skip to content

Instantly share code, notes, and snippets.

@TehilaFavourite
Created May 24, 2023 08:14
Show Gist options
  • Save TehilaFavourite/1792c66f8593a99f6bf93c9d85b2a282 to your computer and use it in GitHub Desktop.
Save TehilaFavourite/1792c66f8593a99f6bf93c9d85b2a282 to your computer and use it in GitHub Desktop.
// 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