Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.66 KB

documentation.md

File metadata and controls

57 lines (42 loc) · 1.66 KB

Contributing to documentation

Amplifier documentation uses the tool mdbook to generate this book from .md files. Documentation files can be found under the doc directory in the project root

Reference code snippets with ANCHOR

Use ANCHOR: <name> and ANCHOR_END: <name> to label code snippets in rust files. Make sure to not use triple slashes /// for anchors in the code snippets, or they will be interpreted as part of the struct documentation

// ANCHOR: events

pub struct MyEvent {
    pub field: u32
}

// ANCHOR_END: events

Then reference the code snippet in the book with \{{#include <path>:<anchor_name>}}

\{{#include ../contracts/multisig/src/events.rs:events}}

See Including portions of a file for more info

Note: Include directives to missing files do not return error

Mermaid diagram

Mermaid diagrams can be rendered in the book automatically thanks to the configured preprocessor mdbook-mermaid

flowchart TD
subgraph Axelar
	G1{"Gateway"}
    G2{"Gateway"}
	Vr{"Aggregate Verifier"}
	Vo{"Voting verifier"}
	R{"Router"}
    S{"Service Registry"}
end

Relayer --"VerifyMessages([M1,M2])"-->G1
G1 --"VerifyMessages([M1,M2])"--> Vr
Vr --"VerifyMessages([M1,M2])"--> Vo
Vo --"GetActiveVerifiers"--> S
Verifiers --"Vote(poll_id, votes)"--> Vo

Relayer --"RouteMessages([M1,M2])"-->G1
G1 --"RouteMessages([M1,M2])"-->R
R --"RouteMessages([M1,M2])"-->G2
Loading