From 2adb52fff65abfe3e0a8464865dae2654bc8462b Mon Sep 17 00:00:00 2001 From: Tomasz Kulik Date: Wed, 10 Jul 2024 13:46:02 +0200 Subject: [PATCH] docs: Update after review --- src/advanced/attributes_forwarding.md | 7 +++---- src/advanced/entry_points_overriding.md | 4 ++-- src/advanced/sudo.md | 5 +++-- src/basics/first-messages.md | 10 ++++++++++ src/basics/remote.md | 2 +- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/advanced/attributes_forwarding.md b/src/advanced/attributes_forwarding.md index 89f81cd..b0a93e9 100644 --- a/src/advanced/attributes_forwarding.md +++ b/src/advanced/attributes_forwarding.md @@ -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 diff --git a/src/advanced/entry_points_overriding.md b/src/advanced/entry_points_overriding.md index dff64ed..221da38 100644 --- a/src/advanced/entry_points_overriding.md +++ b/src/advanced/entry_points_overriding.md @@ -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 { +pub fn custom_entrypoint(deps: DepsMut, _env: Env, _msg: SudoMsg) -> StdResult { CounterContract::new().counter.save(deps.storage, &3)?; Ok(Response::new()) } diff --git a/src/advanced/sudo.md b/src/advanced/sudo.md index 7052f7c..876a6c6 100644 --- a/src/advanced/sudo.md +++ b/src/advanced/sudo.md @@ -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 diff --git a/src/basics/first-messages.md b/src/basics/first-messages.md index 84126d0..fd81e51 100644 --- a/src/basics/first-messages.md +++ b/src/basics/first-messages.md @@ -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! +``` \ No newline at end of file diff --git a/src/basics/remote.md b/src/basics/remote.md index 4b64b0d..ed47b5a 100644 --- a/src/basics/remote.md +++ b/src/basics/remote.md @@ -75,7 +75,7 @@ use sylvia::types::Remote; use crate::contract::sv::Executor; let increment_msg: WasmMsg = Remote::::new(addr) - .executor(&ctx.deps.querier) + .executor() .increment_count()? .build(); ```