File tree 6 files changed +119
-0
lines changed
6 files changed +119
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ export default {
5
5
core : "CosmWasm Core" ,
6
6
wasmd : "Wasmd" ,
7
7
ibc : "IBC" ,
8
+ ibc2 : "IBCv2" ,
8
9
sylvia : "Sylvia" ,
9
10
storey : "Storey" ,
10
11
"cw-storage-plus" : "StoragePlus" ,
Original file line number Diff line number Diff line change
1
+ export default {
2
+ "getting-started" : "Getting started" ,
3
+ "entrypoints" : "Entry points" ,
4
+ "message-passing" : "Message passing" ,
5
+ "example" : "Example contract" ,
6
+ } ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ tags : ["ibc"]
3
+ ---
4
+
5
+ # Entry points in IBCv2
6
+
7
+ There are 4 entry points specified in the IBCv2 protocol.
8
+
9
+ ## Receive entry point
10
+ ``` rust template="core"
11
+ #[cfg_attr(not(feature = " library" ), entry_point)]
12
+ pub fn ibc2_packet_receive (
13
+ deps : DepsMut ,
14
+ env : Env ,
15
+ msg : Ibc2PacketReceiveMsg ,
16
+ ) -> StdResult <IbcReceiveResponse > {
17
+ // [...]
18
+ }
19
+ ```
20
+
21
+ * TODO tkulik: Describe ` Ibc2PacketReceiveMsg `
22
+
23
+ ## Time out entry point
24
+
25
+ ``` rust template="core"
26
+ #[cfg_attr(not(feature = " library" ), entry_point)]
27
+ pub fn ibc2_packet_timeout (
28
+ deps : DepsMut ,
29
+ env : Env ,
30
+ msg : Ibc2PacketTimeoutMsg ,
31
+ ) -> StdResult <IbcBasicResponse > {
32
+ // [...]
33
+ ```
34
+
35
+ * TODO tkulik: Describe ` Ibc2PacketTimeoutMsg `
36
+
37
+ ## Acknowledgement receive entry point
38
+
39
+ ``` rust template="core"
40
+ #[cfg_attr(not(feature = " library" ), entry_point)]
41
+ pub fn ibc2_acknowledge_receive (
42
+ deps : DepsMut ,
43
+ env : Env ,
44
+ msg : Ibc2AcknowledgeMsg ,
45
+ ) -> StdResult <IbcBasicResponse > {
46
+ // [...]
47
+ }
48
+ ```
49
+
50
+ * TODO tkulik: Describe ` Ibc2AcknowledgeMsg `
51
+
52
+
53
+ ## Sent entry point
54
+
55
+ ``` rust template="core"
56
+ #[cfg_attr(not(feature = " library" ), entry_point)]
57
+ pub fn ibc2_packet_sent (
58
+ deps : DepsMut ,
59
+ env : Env ,
60
+ msg : Ibc2PacketSentMsg ,
61
+ ) -> StdResult <IbcBasicResponse > {
62
+ // [...]
63
+ }
64
+ ```
65
+
66
+ * TODO tkulik: Describe ` Ibc2SentMsg `
Original file line number Diff line number Diff line change
1
+ ---
2
+ tags : ["ibc"]
3
+ ---
4
+
5
+ # Example contract
6
+
7
+ * TODO tkulik: Example implementation of the ibc2 entry points
Original file line number Diff line number Diff line change
1
+ ---
2
+ tags : ["ibc"]
3
+ ---
4
+
5
+ import { Callout } from " nextra/components" ;
6
+
7
+ # Getting started
8
+
9
+ CosmWasm module uses [ ibc-go] ( https://ibc.cosmos.network/main/ ) implementation to interact with other blockchains via IBC protocol.
10
+ Along with ibc-go version 10 a new protocol version was announced - [ IBCv2] ( https://ibcprotocol.dev/blog/ibc-v2-announcement ) .
11
+ The new version allows interaction between Cosmos and non-Cosmos blockchains. To achieve this goal,
12
+ the protocol team decided to simplify the flow and reduce number of entry points.
13
+ Thanks to this update, now it's feasible to implement appropriate endpoints on chains like for e.g. Ethereum.
14
+ Side effect for the contract developers is the fact, that there are only few entry points to implement in smart contracts
15
+ in order to take full advantage of the blockchain interconnections.
16
+
17
+ <Callout >
18
+ This section of a documentation provides a basic information on how to set up contracts to use IBCv2 entry points and how
19
+ to communicate with services and contracts on different chains. To learn more about the IBC architecture we recommend
20
+ to visit the [ official ibc-go documentation page] ( https://ibc.cosmos.network/main/ ) .
21
+ </Callout >
Original file line number Diff line number Diff line change
1
+ ---
2
+ tags : ["ibc"]
3
+ ---
4
+
5
+ # Message passing
6
+
7
+ Smart contract can send IBCv2 messages from entry points we Message
8
+
9
+ ## Send IBCv2 messages
10
+
11
+
12
+
13
+ ## Entry point usage for sent messages
14
+
15
+ The special entry point ` ibc2_packet_sent ` is called
16
+
17
+ * TODO tkulik: How to send ibcv2 message
18
+ * TODO tkulik: How to send acknowledgement asynchronously
You can’t perform that action at this time.
0 commit comments