analyze_contract
Analyze Klever smart contract Rust source code to detect common issues such as missing imports, macros, endpoint annotations, and storage mappers. Get findings with severity levels and knowledge base links.
Instructions
Analyze Klever smart contract Rust source code for common issues. Checks for missing imports, missing #[klever_sc::contract] macro, missing endpoint annotations, payable handlers without call_value usage, storage mappers without #[storage_mapper], and missing event definitions. Returns findings with severity (error/warning/info) and links to relevant knowledge base entries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceCode | Yes | The full Rust source code of the Klever smart contract to analyze. Must be valid Rust code using klever_sc imports. | |
| contractName | No | Human-readable name for the contract (used in output labeling). Defaults to "contract" if omitted. |