File tree Expand file tree Collapse file tree 5 files changed +10
-33
lines changed Expand file tree Collapse file tree 5 files changed +10
-33
lines changed Original file line number Diff line number Diff line change 22tags : ["sylvia", "attributes"]
33---
44
5- import { Callout } from " nextra/components" ;
6-
75# sv::data attribute
86
97Use ` sv::data ` to specify if the
108[ ` SubMsgResponse::data ` ] ( https://docs.rs/cosmwasm-std/latest/cosmwasm_std/struct.SubMsgResponse.html )
119field should be deserialized or not.
1210
13- <Callout >
14- To use ` sv::data ` attribute pre Sylvia ` 2.0.0 ` , you need to enable the ` replies ` feature using the
15- [ ` sv::features ` ] ( features ) .
16- </Callout >
17-
1811## Macros
1912
2013List of macros supporting the ` sv::data ` attribute:
Original file line number Diff line number Diff line change @@ -45,10 +45,6 @@ impl Contract {
4545}
4646```
4747
48- Parameters supported by the ` sv::features ` :
49-
50- - replies - enables better reply handling. This includes:
51- - Auto dispatching of replies to the correct handler,
52- - Deserialization of the ` data ` and ` payload ` fields,
53- - Reply id generation.
54- - [ ` SubMsg ` ] ( https://docs.rs/cosmwasm-std/latest/cosmwasm_std/struct.SubMsg.html ) builder trait
48+ <Callout >
49+ Please note that as of ** Sylvia 2.0.0** , feature parameters are no longer supported.
50+ </Callout >
Original file line number Diff line number Diff line change @@ -92,11 +92,6 @@ fn some_query(&self, ctx: QueryCtx) -> SomeResult {
9292
9393## Handling replies
9494
95- <Callout >
96- To use attributes present in this paragraph pre-Sylvia ` 2.0.0 ` , you need to enable the ` replies `
97- feature using the [ ` sv::features ` ] ( features ) attribute.
98- </Callout >
99-
10095You can use additional parameters ` handlers ` and ` reply_on ` in the ` #[sv::msg(reply)] ` attribute.
10196
10297``` rust {1} template="sylvia-cw-storage-contract"
Original file line number Diff line number Diff line change 22tags : ["sylvia", "attributes"]
33---
44
5- import { Callout } from " nextra/components" ;
6-
75# sv::payload attribute
86
97Use ` sv::payload ` to specify if the
@@ -12,11 +10,6 @@ forwarded as `Binary`. Exactly _ONE_ reply method parameter can be marked with t
1210attribute. If missing, Sylvia will deserialize the ` payload ` to types defined after the ` sv::data `
1311parameter.
1412
15- <Callout >
16- To use ` sv::payload ` attribute pre Sylvia ` 2.0.0 ` , you need to enable the ` replies ` feature using
17- the [ ` sv::features ` ] ( features ) .
18- </Callout >
19-
2013## Macros
2114
2215List of macros supporting the ` sv::data ` attribute:
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ types received in the contract entrypoints.
1212
1313Those types are:
1414
15- - [ ` InstantiateCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.InstantiateCtx.html )
16- - [ ` ExecCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.ExecCtx.html )
17- - [ ` QueryCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.QueryCtx.html )
18- - [ ` MigrateCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.MigrateCtx.html )
19- - [ ` ReplyCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.ReplyCtx.html )
20- - [ ` SudoCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/types /struct.SudoCtx.html )
15+ - [ ` InstantiateCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.InstantiateCtx.html )
16+ - [ ` ExecCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.ExecCtx.html )
17+ - [ ` QueryCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.QueryCtx.html )
18+ - [ ` MigrateCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.MigrateCtx.html )
19+ - [ ` ReplyCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.ReplyCtx.html )
20+ - [ ` SudoCtx ` ] ( https://docs.rs/sylvia/latest/sylvia/ctx /struct.SudoCtx.html )
2121
2222<Callout >Use the above context types in contract message methods.</Callout >
2323
@@ -26,7 +26,7 @@ Those types are:
2626Example instantiate method:
2727
2828``` rust
29- use sylvia :: types :: InstantiateCtx ;
29+ use sylvia :: ctx :: InstantiateCtx ;
3030
3131#[sv:: msg(instantiate)]
3232fn instantiate (& self , ctx : InstantiateCtx , mutable : bool ) -> StdResult <Response > {
You can’t perform that action at this time.
0 commit comments