Contract.derived_contracts()

Returns Contracts object for the contracts which were derived from the contract.

derived_contracts() β†’ Contracts

Example query

from glider import *

def query():
  contracts = Contracts().exec(1)
  
  names = []
  for contract in contracts:
    derived_contracts = contract.derived_contracts().exec()

    for contract in derived_contracts:
      names.append(contract.name)

  return [{"names": names}]

Example output

{
  "names": [
    "ERC721",
    "ERC721URIStorage",
    "LTP",
    "Ownable"
  ]
}
{
  "print_output": [
    "Context"
  ]
}

Last updated