Contract.direct_base_contracts()

Returns Contracts for the contracts from which the contract was inherited directly.

direct_base_contracts() → Contracts | NoneObject

Query Example

from glider import *


def query():
  contracts = Contracts().exec(1, 7)
  
  for contract in contracts:
    direct_base_contracts = contract.direct_base_contracts().exec()
    print(f"Contract name: {contract.name}")
    for direct_base_contract in direct_base_contracts:
      print(f"Direct base contract name: {direct_base_contracts.name}")
 
  return contracts

Example Output

Last updated