git clone https://github.com/Cerebellum-Network/ink-doc-gen.git
cd ink-doc-gen
yarn
Document functions and events using ///
comments.
Then compile, and run the documentation generator:
cargo contract build --release
ABI_PATH=target/ink/ddc_bucket/metadata.json \
node ink-doc-gen/index.js
Tested with Ink! 3.0.0-rc4.
This is a smart contract.
fn create_thing(
amount: u64,
) -> ThingId
Create a new thing and return its thing_id
.
event ThingCreated(
thing_id: ThingId, (indexed)
amount: u64,
)
A thing was created.