The forge inspect command is currently not supported in foundry-zksync accurately. This command is used for inspecting various details of Solidity contracts, such as ABI, bytecode, storage layout, and other metadata.
Feature Request:
Implement the forge inspect command to enable inspection of contract details within the foundry-zksync environment.
Detailed Information:
Purpose of forge inspect:
The forge inspect command allows users to retrieve specialized information about a smart contract. It supports various fields to inspect.
Supported Fields:
Please find below a checklist of all the available inspect fields. Each field should be implemented and tested to ensure it works correctly within the ZKsync environment. A lot of the fields below are supported but are missing ZKsync specific attributes (e.g. zksolc version used).
Description:
The
forge inspect
command is currently not supported infoundry-zksync
accurately. This command is used for inspecting various details of Solidity contracts, such as ABI, bytecode, storage layout, and other metadata.Feature Request:
Implement the
forge inspect
command to enable inspection of contract details within thefoundry-zksync
environment.Detailed Information:
Purpose of
forge inspect
:The
forge inspect
command allows users to retrieve specialized information about a smart contract. It supports various fields to inspect.Supported Fields:
Please find below a checklist of all the available inspect fields. Each field should be implemented and tested to ensure it works correctly within the ZKsync environment. A lot of the fields below are supported but are missing ZKsync specific attributes (e.g. zksolc version used).
Checklist:
abi
bytecode
/bytes
/b
deployedBytecode
/deployed_bytecode
/deployed-bytecode
/deployedbytecode
/deployed
assembly
/asm
asmOptimized
/assemblyOptimized
/assemblyoptimized
/assembly_optimized
/asmopt
/assembly-optimized
/asmo
/asm-optimized
/asmoptimized
/asm_optimized
methods
/methodidentifiers
/methodIdentifiers
/method_identifiers
/method-identifiers
/mi
gasEstimates
/gas
/gas_estimates
/gas-estimates
/gasestimates
storageLayout
/storage_layout
/storage-layout
/storagelayout
/storage
devdoc
/dev-doc
/devDoc
ir
ir-optimized
/irOptimized
/iroptimized
/iro
/iropt
metadata
/meta
userdoc
/userDoc
/user-doc
ewasm
/e-wasm
errors
events
Example Usage:
Inspect the bytecode of a contract:
Inspect the storage layout of a contract:
Inspect the ABI of a contract in a pretty format:
References: