Crate sewup_derive

Crate sewup_derive 

Source

Macros§

SizedString
help you write the field which storage string no longer than the specific size
ewasm_assert_eq
helps you assert output from the handle of a contract with Vec<u8>.
ewasm_assert_ok
helps you assert your handler without error and returns
ewasm_auto_assert_eq
helps you assert return instance from your handler with auto unwrap ewasm_main, namely #[ewasm_main(auto)]
ewasm_call_only_by
helps you return handler when caller is not in access control list
ewasm_err_output
helps you to get the binary result of the thiserror,
ewasm_fn_sig
helps you get you function signature
ewasm_input
helps you generate the input raw data for specific contract handler
ewasm_input_from
helps you to get the input data from contract caller
ewasm_output_from
help you generate the exactly contract output form rust instance
ewasm_rusty_assert_ok
helps you assert return Ok(()) your handler with rusty ewasm_main, namely #[ewasm_main(rusty)]
ewasm_rusty_err_output
helps you assert return Err your handler with rusty ewasm_main, namely #[ewasm_main(rusty)]
ewasm_storage_debug
helps you inspect the storage in test this will print out the detail of storage, you can add description on the storage debug or leave it empty

Attribute Macros§

ewasm_constructor
helps you to build your constructor for the contract
ewasm_fn
helps you to build your handlers in the contract
ewasm_lib_fn
helps you to build your handler in other module
ewasm_main
helps you setup the main function of a contract
ewasm_test
helps you setup the test mododule, and test cases in contract.

Derive Macros§

Key
Key derive help you implement Key trait for the kv feature
Table
provides the handers for CRUD and the Protocol struct to communicate with these handlers.
Value
Value derive help you implement Value trait for kv feature