Skip to content

Commit

Permalink
Update cosmos chaintypes (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname authored Jul 31, 2024
1 parent 95101a4 commit c2d3831
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions docs/indexer/build/manifest/cosmos.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,46 @@ We can load protobuf message definitions to allow support for specific Cosmos zo

You can reference a chaintypes file for Cosmos like so (this is for Stargaze):

```ts
{
network: {
...,
chaintypes: new Map([
[
"cosmos.slashing.v1beta1",
{
file: "./proto/cosmos/slashing/v1beta1/tx.proto",
messages: ["MsgUnjail"],
},
],
[
"cosmos.gov.v1beta1",
{
file: "./proto/cosmos/gov/v1beta1/tx.proto",
messages: ["MsgVoteWeighted"],
},
],
[
"cosmos.gov.v1beta1.gov",
{
file: "./proto/cosmos/gov/v1beta1/gov.proto",
messages: ["WeightedVoteOption"],
},
],
[
"publicawesome.stargaze.claim.v1beta1",
{
file: "./proto/stargaze/claim/v1beta1/tx.proto",
messages: ["MsgInitialClaim"],
},
],
]),
}
}
```

:::details Legacy YAML Chain types

```yml
network:
...
Expand All @@ -347,6 +387,10 @@ network:
messages:
- "MsgInitialClaim"
```
:::

::: info If you have more than one file with the same namespace you can use a different key. The key is only used as a fallback if the proto file doesn't specify a namespace.
:::

Our [starter repo has chaintypes for popular Cosmos chains](https://github.com/subquery/cosmos-subql-starter/blob/stargaze-1/project.yaml#L23) already added under a branch for each chain. Additionally see [Tested and Supported networks](#tested-and-supported-networks).

Expand Down

0 comments on commit c2d3831

Please sign in to comment.