Skip to content

ABI printer#

Name: abi

Prints ABI of contracts in given paths or in the whole project.

Example#

wake print abi ABI for contracts/Owned.sol:Owned: [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "InvalidCaller", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oldOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnerChanged", "type": "event" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" } ], "name": "setOwner", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]

Parameters#

Command-line name TOML name Type Default value Description
--name (multiple) names List[str] [] Names of contracts to print ABI for.
--out out str abi if --out passed, None otherwise Output directory path. If not specified, the output is printed to the standard output.
--skip-empty skip_empty bool False Skip contracts with empty ABI.
--keep-folders keep_folders bool False Preserve the original folder hierarchy when exporting ABIs to output directory.