Skip to content

Commit 048215d

Browse files
committed
Merge branch 'main' into tamjid/pfm-homecoming
2 parents 2f0b0b0 + da9b9b5 commit 048215d

File tree

6 files changed

+59
-1
lines changed

6 files changed

+59
-1
lines changed
Binary file not shown.

docs/docs/00-intro.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Since ibc-go v10, there are two versions of the protocol in the same release: IB
1717

1818
## High-level overview of IBC v2
1919

20-
For a high level overview of IBC v2, please refer to [this blog post.](https://ibcprotocol.dev/blog/ibc-v2-announcement) For a more detailed understanding of the IBC v2 protocol, please refer to the [IBC v2 protocol specification.](https://github.com/cosmos/ibc/pull/1143)
20+
For a high level overview of IBC v2, please refer to [this blog post.](https://ibcprotocol.dev/blog/ibc-v2-announcement) For a more detailed understanding of the IBC v2 protocol, please refer to the [IBC v2 protocol specification.](https://github.com/cosmos/ibc/tree/main/spec/IBC_V2)
21+
22+
If you are interested in using the cannonical deployment of IBC v2, connecting Cosmos chains and Ethereum, take a look at the [IBC Eureka](https://docs.skip.build/go/eureka/eureka-overview) documentation to get started.
2123

2224
## High-level overview of IBC Classic
2325

docs/docs/01-ibc/04-middleware/02-develop.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ slug: /ibc/middleware/develop
1010

1111
IBC middleware will wrap over an underlying IBC application (a base application or downstream middleware) and sits between core IBC and the base application.
1212

13+
:::warning
14+
middleware developers must use the same serialization and deserialization method as in ibc-go's codec: transfertypes.ModuleCdc.[Must]MarshalJSON
15+
:::
16+
17+
For middleware builders this means:
18+
19+
```go
20+
import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
21+
transfertypes.ModuleCdc.[Must]MarshalJSON
22+
func MarshalAsIBCDoes(ack channeltypes.Acknowledgement) ([]byte, error) {
23+
return transfertypes.ModuleCdc.MarshalJSON(&ack)
24+
}
25+
```
26+
1327
The interfaces a middleware must implement are found [here](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/05-port/types/module.go).
1428

1529
```go

docs/docs/01-ibc/04-middleware/02-developIBCv2.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ slug: /ibc/middleware/developIBCv2
1818

1919
IBC middleware will wrap over an underlying IBC application (a base application or downstream middleware) and sits between core IBC and the base application.
2020

21+
:::warning
22+
middleware developers must use the same serialization and deserialization method as in ibc-go's codec: transfertypes.ModuleCdc.[Must]MarshalJSON
23+
:::
24+
25+
For middleware builders this means:
26+
27+
```go
28+
import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
29+
transfertypes.ModuleCdc.[Must]MarshalJSON
30+
func MarshalAsIBCDoes(ack channeltypes.Acknowledgement) ([]byte, error) {
31+
return transfertypes.ModuleCdc.MarshalJSON(&ack)
32+
}
33+
```
34+
2135
The interfaces a middleware must implement are found in [core/api](https://github.com/cosmos/ibc-go/blob/main/modules/core/api/module.go#L11). Note that this interface has changed from IBC classic.
2236

2337
An `IBCMiddleware` struct implementing the `Middleware` interface, can be defined with its constructor as follows:

docs/versioned_docs/version-v7.8.x/01-ibc/04-middleware/01-develop.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@ Middleware allows developers to define the extensions as separate modules that c
4141

4242
IBC middleware will wrap over an underlying IBC application and sits between core IBC and the application. It has complete control in modifying any message coming from IBC to the application, and any message coming from the application to core IBC. Thus, middleware must be completely trusted by chain developers who wish to integrate them, however this gives them complete flexibility in modifying the application(s) they wrap.
4343

44+
:::warning
45+
middleware developers must use the same serialization and deserialization method as in ibc-go's codec: transfertypes.ModuleCdc.[Must]MarshalJSON
46+
:::
47+
48+
For middleware builders this means:
49+
50+
```go
51+
import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
52+
transfertypes.ModuleCdc.[Must]MarshalJSON
53+
func MarshalAsIBCDoes(ack channeltypes.Acknowledgement) ([]byte, error) {
54+
return transfertypes.ModuleCdc.MarshalJSON(&ack)
55+
}
56+
```
57+
4458
### Interfaces
4559

4660
```go

docs/versioned_docs/version-v8.5.x/01-ibc/04-middleware/02-develop.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ slug: /ibc/middleware/develop
1010

1111
IBC middleware will wrap over an underlying IBC application (a base application or downstream middleware) and sits between core IBC and the base application.
1212

13+
:::warning
14+
middleware developers must use the same serialization and deserialization method as in ibc-go's codec: transfertypes.ModuleCdc.[Must]MarshalJSON
15+
:::
16+
17+
For middleware builders this means:
18+
19+
```go
20+
import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
21+
transfertypes.ModuleCdc.[Must]MarshalJSON
22+
func MarshalAsIBCDoes(ack channeltypes.Acknowledgement) ([]byte, error) {
23+
return transfertypes.ModuleCdc.MarshalJSON(&ack)
24+
}
25+
```
26+
1327
The interfaces a middleware must implement are found [here](https://github.com/cosmos/ibc-go/blob/v7.0.0/modules/core/05-port/types/module.go).
1428

1529
```go

0 commit comments

Comments
 (0)