Contract.base_contracts()
Returns Contracts object for the contracts from which contract was inherited directly or indirectly.
base_contracts() →
Contracts
It returns the Contracts object representing the base contracts of a Contract. The function is recursive. See the example.
Example query
Example output
Deposit
is the main contract. Below this text, a portion of the source code for this contract is provided. You can see that Deposit
inherits from Context
, Ownable
, and ReentrancyGuard
. The Context
contract is derived from the Ownable
contract
Code Example
Last updated