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 12, 2024
1 parent 63434aa commit e5f7f55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ impl MyContract {

* `sv::msg_attr` forwards any attribute to the message's type.

* `sv::attr` forwards any attribute to the enum's field of the given variant.
* `sv::attr` forwards any attribute to the enum's variant.


## Usage in external crates
Expand Down Expand Up @@ -391,9 +391,16 @@ pub fn evaluate_member(&self, ctx: ExecCtx, ...) -> StdResult<Response> {

## Executor message builder

Sylvia defines the [`ExecutorBuilder`]() type, which can be accessed through [`Remote::executor`]().
It's generic over the contract type and exposes execute methods from the
contract and every interface implemented on it through an auto-generated `Executor` traits.
Execute messages of other contracts can be built with `Remote` as well by
calling `executor` method. It returns a message builder that implements
auto-generated `Executor` traits of all sylvia contracts.
auto-generated `Executor` traits of all Sylvia contracts.
Methods defined in the `Executor` traits constructs an execute message,
which variant corresponds to the method name.
The message is then wrapped in the `WasmMsg`, and returned once [`ExecutorBuilder::build()`]
method is called.

```rust
use sylvia::types::Remote;
Expand Down
2 changes: 1 addition & 1 deletion sylvia-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub(crate) fn crate_module() -> Path {
/// ### `sv::msg_attr(msg_type, {...})`
///
/// This attribute can be used for the whole `trait Interface {}` block and
/// for the following message types: `exec`, `query`, `sudo` and `reply`.
/// for the following message types: `exec`, `query` and `sudo`.
/// The `{...}` part will be forwarded as an attribute `#[{...}]` to the
/// given message type (enum or struct).
///
Expand Down

0 comments on commit e5f7f55

Please sign in to comment.