Skip to content

Commit

Permalink
Add Osmosis config (iqlusioninc#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno authored Jul 24, 2021
1 parent f2690a3 commit 50b6db4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/commands/init/config_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl ConfigBuilder {
Network::CosmosHub => include_str!("templates/networks/cosmoshub.toml"),
Network::IrisHub => include_str!("templates/networks/irishub.toml"),
Network::SentinelHub => include_str!("templates/networks/sentinelhub.toml"),
Network::Osmosis => include_str!("templates/networks/osmosis.toml"),
});
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/commands/init/networks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ pub enum Network {

/// Sentinel `sentinelhub` chain
SentinelHub,

/// Osmosis `osmosis` chain
Osmosis,
}

impl Display for Network {
Expand All @@ -29,6 +32,7 @@ impl Display for Network {
Network::CosmosHub => "cosmoshub",
Network::IrisHub => "irishub",
Network::SentinelHub => "sentinelhub",
Network::Osmosis => "osmosis",
})
}
}
Expand All @@ -41,6 +45,7 @@ impl Network {
Network::CosmosHub,
Network::IrisHub,
Network::SentinelHub,
Network::Osmosis,
]
}

Expand All @@ -51,6 +56,7 @@ impl Network {
"cosmoshub" => Network::CosmosHub,
"irishub" => Network::IrisHub,
"sentinelhub" => Network::SentinelHub,
"osmosis" => Network::Osmosis,
other => {
status_err!("unknown Tendermint network: `{}`", other);
eprintln!("\nRegistered networks:");
Expand All @@ -71,6 +77,7 @@ impl Network {
Network::CosmosHub => "cosmoshub-3",
Network::IrisHub => "irishub",
Network::SentinelHub => "sentinelhub-2",
Network::Osmosis => "osmosis-1",
}
}

Expand All @@ -81,6 +88,7 @@ impl Network {
Network::CosmosHub => "cosmos-sdk.toml",
Network::IrisHub => "iris.toml",
Network::SentinelHub => "sentinelhub.toml",
Network::Osmosis => "osmosis.toml",
}
}
}
6 changes: 6 additions & 0 deletions src/commands/init/templates/networks/osmosis.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Osmosis Network

[[chain]]
id = "osmosis-1"
key_format = { type = "bech32", account_key_prefix = "osmopub", consensus_key_prefix = "osmovalconspub" }
state_file = "$KMS_HOME/state/osmosis-1-consensus.json"
4 changes: 4 additions & 0 deletions src/commands/init/templates/schema/osmosis.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# TODO
#
# If you're interested in this, please open an issue at:
# <https://github.com/iqlusioninc/tmkms>

0 comments on commit 50b6db4

Please sign in to comment.