August 2019
Intermediate to advanced
486 pages
13h 52m
English
The surya dependencies <target_contract> <files..> command lists the C3 linearization of the inheritance for the given contract. The output lists the most derived contract; this means that, if the same function is present in the inherited contracts, it will look for the function in the listed order and use the definition (if present).
In this example of the command, we are using the 0x project Exchange.sol contract. The 0x project is an open source Decentralized Exchange (DEX). Follow the following commands:
$ git clone https://github.com/0xProject/0x-monorepo.git$ cd 0x-monorepo/contracts/exchange/contracts$ surya dependencies Exchange **/*.sol
The preceding command will generate the following output: