This repository was archived by the owner on Feb 3, 2023. It is now read-only.
This repository was archived by the owner on Feb 3, 2023. It is now read-only.
Simplify zome macro: inputs and outputs #725
Open
Description
Proposal to change zome function macro structure:
- change
inputs
andoutputs
to singular:input
andoutput
- use
{}
instead of||
to wrap input params, since on the wasm side it represents a single param with keys and values rather than distinct function parameters - remove the named output, since it is just a return value and is never named
// before:
create_post: {
inputs: |content: String, in_reply_to: Address|,
outputs: |post: Post|,
handler: blog::handle_check_sum
}
// after:
create_post: {
input: {content: String, in_reply_to: Address},
output: Post,
handler: blog::handle_check_sum
}