Skip to main content

neo_method

Attribute Macro neo_method 

Source
#[neo_method]
Expand description

Neo N3 Method macro

This macro marks a function as a Neo N3 contract method.

§Example

#[neo_method]
pub fn my_method(&self, arg: NeoInteger) -> NeoResult<NeoString> {
    // Method implementation
    Ok(NeoString::from_str("Hello, Neo!"))
}