Skip to content

Commit

Permalink
Sylvia tutorial contract creation review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jawoznia committed Dec 17, 2024
1 parent 58d2aaf commit 81a2362
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pages/tutorial/setup-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ All contracts (1) passed checks!

## Macro expansion

In VSCode you can hower over a macro like [`#[contract]`](../sylvia/macros/contract), do `shift+p`
In VSCode you can hover over a macro like [`#[contract]`](../sylvia/macros/contract), do `shift+p`
and then type: `rust analyzer: Expand macro recursively`. This will open a window with a fully
expanded macro, which you can browse. In Vim you can consider installing the
[rustaceanvim](https://github.com/mrcjkb/rustaceanvim) plugin. You can also use `cargo expand` tool
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tutorial/sylvia-contract.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Sylvia contract writting tutorial
# Sylvia contract writing tutorial

This section is a step-by-step guide on how to write a Sylvia contract.
8 changes: 4 additions & 4 deletions src/pages/tutorial/sylvia-contract/contract-creation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ assembly binary. The downside of this is that such a library cannot be used as a
other Rust crates - for now, it is not needed, but later we will show how to approach reusing
contracts as dependencies.

Additionally, we added some core dependencies for smart contracts:
Additionally, we added a single dependency - [sylvia](https://docs.rs/sylvia/latest/sylvia/). This
is the only dependency you need to start since [sylvia](https://docs.rs/sylvia/latest/sylvia/)
reexports all the necessary crates for CosmWasm smart contracts. The most important reexported
crates are:

- [cosmwasm-std](https://docs.rs/cosmwasm-std/latest/cosmwasm_std/) - Crate that is a standard
library for smart contracts. It provides essential utilities for communication with the outside
world, helper functions, and types. Every smart contract we will build will use this dependency.
- [sylvia](https://docs.rs/sylvia/latest/sylvia/) - Crate, we will learn in this book. It provides
us with three procedural macros: `entry_points`, `contract` and `interface`. I will expand on them
later in the book.
- [schemars](https://docs.rs/schemars/latest/schemars/index.html) - Crate used to create JSON schema
documents for our contracts. It is automatically derived on types generated by ^sylvia and will be
later used to provide concise API for blockchain users, who might not be Rust developers.
Expand Down

0 comments on commit 81a2362

Please sign in to comment.