Linting rules
E031: missing-contract-header
Warns when a contract source defines standard contract entrypoints but omits the `contract` header.
Metadata
Code:E031Rule:missing-contract-headerStatus: Stable sincev0.0.1Quick fix: not available
What it does
Warns when a contract source defines standard contract entrypoints but omits the contract header.
Why is this bad?
The contract header is the ABI source of truth for metadata like storage and incomingMessages.
Without it, wrapper generation and other tooling cannot recover the contract shape reliably.
Example
fun onInternalMessage(in: InMessage) { // ...
}Use instead:
contract Wallet {
storage: Storage
incomingMessages: AllowedMessage
}
fun onInternalMessage(in: InMessage) {
// ...
}Last updated on