Acton
Linting rules

E031: missing-contract-header

Warns when a contract source defines standard contract entrypoints but omits the `contract` header.

Metadata

  • Code: E031
  • Rule: missing-contract-header
  • Status: Stable since v0.0.1
  • Quick 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) {
E031: contract defines entrypoints but is missing a `contract` header
// ... }

Use instead:

contract Wallet {
    storage: Storage
    incomingMessages: AllowedMessage
}

fun onInternalMessage(in: InMessage) {
    // ...
}
Source code

Last updated on

On this page