Expand description

Procedural macros for ink! analyzer.


Using ink_analyzer_macro::entity proc-macro to create a Contract type.

use ink_analyzer_ir::{Event, Message, Storage};
use ink_analyzer_ir::ast;

#[ink_analyzer_macro::entity(macro_kind = Contract)]
#[derive(Debug, Clone, PartialEq, Eq)]
struct Contract {
    ast: ast::Module,
    storage: Option<Storage>,
    events: Vec<Event>,
    #[initializer(call = ink_analyzer_ir::ink_callable_closest_descendants)]
    messages: Vec<Message>,
    // --snip--

Attribute Macros§

  • proc-macro that implements the InkEntity trait for any struct with an ast field, where the type for ast is T: ASTNode.