forge-inspect - Get specialized information about a smart contract
forge inspect [options] contract_name field
Get specialized information about a smart contract.
The field to inspect (field) can be any of:
abib/bytes/bytecodedeployedBytecode/deployed_bytecode/deployed-bytecode/deployedbytecode/deployedassembly/asmasmOptimized/assemblyOptimized/assemblyoptimized/assembly_optimized/asmopt/assembly-optimized/asmo/asm-optimized/asmoptimized/asm_optimizedmethods/methodidentifiers/methodIdentifiers/method_identifiers/method-identifiers/migasEstimates/gas/gas_estimates/gas-estimates/gasestimatesstorageLayout/storage_layout/storage-layout/storagelayout/storagedevdoc/dev-doc/devDocirir-optimized/irOptimized/iroptimized/iro/iroptmetadata/metauserdoc/userDoc/user-docewasm/e-wasmerrorsevents
--pretty
Pretty print the selected field, if supported.
{{#include core-build-options.md}}
{{#include common-options.md}}
-
Inspect the bytecode of a contract:
forge inspect MyContract bytecode
-
Inspect the storage layout of a contract:
forge inspect MyContract storage
-
Inspect the abi of a contract in a pretty format:
forge inspect --pretty MyContract abi