Retrieval of hierarchy contracts