File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ All contracts (1) passed checks!
94
94
95
95
## Macro expansion
96
96
97
- In VSCode you can hower over a macro like [ ` #[contract] ` ] ( ../sylvia/macros/contract ) , do ` shift+p `
97
+ In VSCode you can hover over a macro like [ ` #[contract] ` ] ( ../sylvia/macros/contract ) , do ` shift+p `
98
98
and then type: ` rust analyzer: Expand macro recursively ` . This will open a window with a fully
99
99
expanded macro, which you can browse. In Vim you can consider installing the
100
100
[ rustaceanvim] ( https://github.com/mrcjkb/rustaceanvim ) plugin. You can also use ` cargo expand ` tool
Original file line number Diff line number Diff line change 1
- # Sylvia contract writting tutorial
1
+ # Sylvia contract writing tutorial
2
2
3
3
This section is a step-by-step guide on how to write a Sylvia contract.
Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ assembly binary. The downside of this is that such a library cannot be used as a
54
54
other Rust crates - for now, it is not needed, but later we will show how to approach reusing
55
55
contracts as dependencies.
56
56
57
- Additionally, we added some core dependencies for smart contracts:
57
+ Additionally, we added a single dependency - [ sylvia] ( https://docs.rs/sylvia/latest/sylvia/ ) . This
58
+ is the only dependency you need to start since [ sylvia] ( https://docs.rs/sylvia/latest/sylvia/ )
59
+ reexports all the necessary crates for CosmWasm smart contracts. The most important reexported
60
+ crates are:
58
61
59
62
- [ cosmwasm-std] ( https://docs.rs/cosmwasm-std/latest/cosmwasm_std/ ) - Crate that is a standard
60
63
library for smart contracts. It provides essential utilities for communication with the outside
61
64
world, helper functions, and types. Every smart contract we will build will use this dependency.
62
- - [ sylvia] ( https://docs.rs/sylvia/latest/sylvia/ ) - Crate, we will learn in this book. It provides
63
- us with three procedural macros: ` entry_points ` , ` contract ` and ` interface ` . I will expand on them
64
- later in the book.
65
65
- [ schemars] ( https://docs.rs/schemars/latest/schemars/index.html ) - Crate used to create JSON schema
66
66
documents for our contracts. It is automatically derived on types generated by ^sylvia and will be
67
67
later used to provide concise API for blockchain users, who might not be Rust developers.
You can’t perform that action at this time.
0 commit comments