File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
docs/developers/architecture Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ id : architecture-api
3+ title : SC API architecture
4+ ---
5+
6+ [ comment ] : # ( mx-abstract )
7+
8+ There is quite a long way from smart contract code to VM hook calls.
9+
10+ [ comment ] : # ( mx-context-auto )
11+
12+ ## Components overview
13+
14+ ``` mermaid
15+ graph BT
16+ sc[Smart Contract code]
17+ sc --> wrapper[Api Wrapper]
18+ wrapper --> api[Api]
19+ api --> UncallableApi --> ABI
20+ api --> VmApiImpl --> wasm-imports[Wasm FFI Imports]
21+ wasm-imports --> wasm[.wasm binary] --> Wasmer
22+ api --> VMHooksApi
23+ Wasmer --> |hooks| capi[C API] --> go-vm[Go VM]
24+ Wasmer -.->|hooks| TxContextStack
25+ subgraph VMHooksApi["VMHooksApi<Backend>"]
26+ StaticApi
27+ DebugApi
28+ SingleTxApi
29+ end
30+ DebugApi --> DebugApiBackend
31+ DebugApiBackend ---->|hooks| TxContextStack
32+ DebugApiBackend -->|static data| StaticVarStack
33+ StaticApi --> StaticApiBackend
34+ StaticApiBackend --->|hooks| STATIC_API_VH_CELL
35+ StaticApiBackend -->|static data| STATIC_API_STATIC_CELL
36+ SingleTxApi --> SingleTxApiBackend
37+ SingleTxApiBackend --->|hooks| SINGLE_TX_API_VH_CELL
38+ SingleTxApiBackend -->|static data| SINGLE_TX_API_STATIC_CELL
39+ TxContextStack --> context[Rust VM]
40+ ```
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ const sidebars = {
128128 label : "Architecture" ,
129129 items : [
130130 "developers/architecture/architecture-overview" ,
131+ "developers/architecture/architecture-api" ,
131132 ] ,
132133 } ,
133134 ] ,
You can’t perform that action at this time.
0 commit comments