Other commands
February 4, 2025 ยท View on GitHub
cargo-contract provides CLI support for displaying info directly from the command
line.
info
Fetch and display information for a given contract.
e.g.
cargo contract info \
--contract 5DVGLfDGBvqMr9nCg48g99oD8Mz3sruWmb6ek5UbWvDnbTgZ
--contractthe account id of the instantiated contract to examine.
Optional
--urlthe url of the rpc endpoint you want to specify - by defaultws://localhost:9944.--configthe chain config to be used as part of the call - by defaultPolkadot.--chainthe name of a production chain to be communicated with, conflicts with--urland--config--output-jsonto export the output as JSON.--binaryoutputs the contract as a binary blob. If used in combination with--output-json, outputs the contract's binary as a JSON object with hex string.--alloutputs all contracts addresses. It can not be used together with--binaryflag.