Skip to content

Commit

Permalink
docs: Update after review
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Jul 11, 2024
1 parent 29d17bc commit 2adb52f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
7 changes: 3 additions & 4 deletions src/advanced/attributes_forwarding.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Attributes forwarding

This feature allows ^sylvia users to forward any attribute to every message
type using `#[sv::msg_attr(msg_type, ...)]` attribute. For the messages
that resolves to enum types it is possible to forward attributes per
enum field by using `#[sv::attr(...)]` - this works for `exec`, `query`
This feature allows ^sylvia users to forward any attribute to any message
type using `#[sv::msg_attr(msg_type, ...)]` attribute.
For the messages that resolves to enum types it is possible to forward attributes to their specific variants by using `#[sv::attr(...)]` on top of the appropriate method - this works for `exec`, `query`
and `sudo` methods.

## Example
Expand Down
4 changes: 2 additions & 2 deletions src/advanced/entry_points_overriding.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ like `execute` and `query`.

## Example

To make ^sylvia generate multitest helpers with `cusom_entrypoint` support, you first need to define your
To make ^sylvia generate multitest helpers with `custom_entrypoint` support, you first need to define your
`entry point`.

```rust,noplayground
#[entry_point]
pub fn cusom_entrypoint(deps: DepsMut, _env: Env, _msg: SudoMsg) -> StdResult<Response> {
pub fn custom_entrypoint(deps: DepsMut, _env: Env, _msg: SudoMsg) -> StdResult<Response> {
CounterContract::new().counter.save(deps.storage, &3)?;
Ok(Response::new())
}
Expand Down
5 changes: 3 additions & 2 deletions src/advanced/sudo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
Sylvia supports a `sudo` type entry point both in interfaces and in
contracts. Those methods can be used as a part of the network's
governance procedures. More informations can be found in official
CosmWasm documentation. From ^sylvia user point of view there's no
much difference between `sudo` and `exec` methods.
[CosmWasm documentation](https://cosmwasm-docs.vercel.app/core/entrypoints/sudo).
From ^sylvia user point of view there's no much difference between `sudo`
and `exec` methods.

## Example

Expand Down
10 changes: 10 additions & 0 deletions src/basics/first-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,13 @@ and then run:
```shell
contract $ cosmwasm-check target/wasm32-unknown-unknown/release/contract.wasm
```

The output should look like this:

```shell
Available capabilities: {"stargate", "staking", "cosmwasm_1_3", "cosmwasm_2_0", "cosmwasm_1_1", "cosmwasm_1_2", "cosmwasm_1_4", "iterator"}

target/wasm32-unknown-unknown/release/contract.wasm: pass

All contracts (1) passed checks!
```
2 changes: 1 addition & 1 deletion src/basics/remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ use sylvia::types::Remote;
use crate::contract::sv::Executor;
let increment_msg: WasmMsg = Remote::<CounterContract>::new(addr)
.executor(&ctx.deps.querier)
.executor()
.increment_count()?
.build();
```
Expand Down

0 comments on commit 2adb52f

Please sign in to comment.