Crate ink_ir

source ·
Expand description

The ink! intermediate representation (IR) and abstractions.

This module defines everything the ink! procedural macro needs in order to parse, analyze and generate code for ink! smart contracts.

The entry point for every ink! smart contract is the Contract with its Config provided in the initial invocation at #[ink::contract(... configuration ...)].

The ink! IR tries to stay close to the original Rust syntactic structure. All ink! definitions of an ink! smart contract are always defined within a so-called Rust inline module (mod my_module { ... items ... }). Therefore all ink! definition are found and accessed using the ItemMod data structure.

Modules§

  • Types and abstractions for ink! definitions that require custom syntax.
  • Marker types and definitions.

Macros§

Structs§

Enums§

  • The kind of externally callable smart contract entity.
  • An item within an ink! implementation block.
  • An ink! specific item.
  • An ink! item within an ink! trait definition.
  • An item in the root of the ink! module (ir::ItemMod).
  • The receiver of an ink! message.
  • The visibility of an ink! message or constructor.

Traits§

Functions§

  • Computes the BLAKE-2b 256-bit hash for the given input and stores it in output.