github.com/iotexproject/iotex-core@v1.14.1-rc1/action/protocol/execution/testdata-london/wireconnection.sol (about) 1 // SPDX-License-Identifier: GPL-3.0 2 3 pragma solidity ^0.8.14; 4 5 abstract contract Feline { 6 // This is how we write the abstract contract 7 bytes32 name; 8 9 function setname(bytes32 _name) public { 10 name = _name; 11 } 12 13 function utterance() public virtual returns (bytes32); 14 15 function Utterance() public virtual returns (bytes32); 16 } 17 18 // inherit the contract in cat and then override the function utterance with some full definition 19 contract Cat is Feline { 20 function utterance() public pure override returns (bytes32) { 21 return "miaow"; 22 } 23 24 function Utterance() public pure override returns (bytes32) { 25 return utterance(); 26 } 27 }