Attribute Macro sewup_derive::ewasm_main [−][src]
#[ewasm_main]
Expand description
ewasm_main
is a macro for the main function of the contract
There are three different contract output.
#[ewasm_main]
The default contract output, the error will be return as a string message
This is for a scenario that you just want to modify the data on
chain only, and the error will to string than return.
#[ewasm_main(rusty)]
The rust styl output, the result object from ewasm_main function will be
returned, this is for a scenario that you are using a rust client to catch
and want to catch the result from the contract.
#[ewasm_main(unwrap)]
The unwrap the output of the result object from ewasm_main function.
This is for a scenario that you are using a rust non-rust client,
and you are only care the happy case of excuting the contract.