【Inheritance】
// First import the contract
import B from 'path/to/B.sol';
//Then make your contract inherit from it
contract A is B {
//Then call the constructor of the B contract
constructor() B() {}
}contract B {
function foo() external {...}
}
contract A is B {
function foo() external {...}
}Last updated