Voltar para Documentação

Docs Técnicas

Compiler Reports

compile_contract(...) returns a rich CompiledContract.

O conteúdo abaixo vem das fontes técnicas do repositório e é prerenderizado no site para leitura direta por pessoas, crawlers e agentes.

compile_contract(...) returns a rich CompiledContract.

Important fields:

rust
compiled.artifact
compiled.ir
compiled.static_cost
compiled.static_cost_proof
compiled.storage_layout
compiled.safety_profile
compiled.optimizer_report
compiled.type_linearity_report

Use these reports to answer different questions:

  • artifact: what code and ABI will be published;
  • ir: what lowered execution model the compiler produced;
  • static_cost and static_cost_proof: what upper bounds the compiler can prove;
  • storage_layout: whether upgrades remain compatible;
  • safety_profile: which verifier guarantees hold;
  • optimizer_report: what simplifications were applied;
  • type_linearity_report: where money-shaped types are rejected from executable surface.

Safety Profile

The safety profile records verifier guarantees such as:

  • recursion rejection;
  • view effect rejection;
  • public Money[...] ABI rejection;
  • storage Money[...] rejection;
  • local Money[...] binding rejection;
  • unknown storage access rejection;
  • untyped intrinsic rejection.

Static Cost Proof

Static cost proof provides path-aware upper bounds for:

  • storage reads;
  • storage writes;
  • post operations;
  • event emits;
  • worst-case cost units.

Storage Layout

Storage layout descriptors are used for audit reports and compatibility checks.

The compiler can report append-only compatibility while the ledger still rejects an incompatible accepted version or lifecycle state at commit time.