-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support kujira's /kujira.denom... tokenfactory fork (#816)
- Loading branch information
Showing
17 changed files
with
418 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
use std::convert::TryFrom; | ||
use std::convert::TryInto; | ||
|
||
use osmosis_std_derive::CosmwasmExt; | ||
|
||
/// Coin defines a token with a denomination and an amount. | ||
/// | ||
/// NOTE: The amount field is an Int which implements the custom method | ||
/// signatures required by gogoproto. | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/cosmos.base.v1beta1.Coin")] | ||
pub struct Coin { | ||
#[prost(string, tag = "1")] | ||
pub denom: ::prost::alloc::string::String, | ||
#[prost(string, tag = "2")] | ||
pub amount: ::prost::alloc::string::String, | ||
} | ||
|
||
/// DenomUnit represents a struct that describes a given | ||
/// denomination unit of the basic token. | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/cosmos.bank.v1beta1.DenomUnit")] | ||
pub struct DenomUnit { | ||
/// denom represents the string name of the given denom unit (e.g uatom). | ||
#[prost(string, tag = "1")] | ||
pub denom: ::prost::alloc::string::String, | ||
/// exponent represents power of 10 exponent that one must | ||
/// raise the base_denom to in order to equal the given DenomUnit's denom | ||
/// 1 denom = 1^exponent base_denom | ||
/// (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with | ||
/// exponent = 6, thus: 1 atom = 10^6 uatom). | ||
#[prost(uint32, tag = "2")] | ||
#[serde( | ||
serialize_with = "crate::shim::as_str::serialize", | ||
deserialize_with = "crate::shim::as_str::deserialize" | ||
)] | ||
pub exponent: u32, | ||
/// aliases is a list of string aliases for the given denom | ||
#[prost(string, repeated, tag = "3")] | ||
pub aliases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, | ||
} | ||
/// Metadata represents a struct that describes | ||
/// a basic token. | ||
#[derive( | ||
Clone, | ||
PartialEq, | ||
Eq, | ||
::prost::Message, | ||
::serde::Serialize, | ||
::serde::Deserialize, | ||
::schemars::JsonSchema, | ||
CosmwasmExt, | ||
)] | ||
#[proto_message(type_url = "/cosmos.bank.v1beta1.Metadata")] | ||
pub struct Metadata { | ||
#[prost(string, tag = "1")] | ||
pub description: ::prost::alloc::string::String, | ||
/// denom_units represents the list of DenomUnit's for a given coin | ||
#[prost(message, repeated, tag = "2")] | ||
pub denom_units: ::prost::alloc::vec::Vec<DenomUnit>, | ||
/// base represents the base denom (should be the DenomUnit with exponent = 0). | ||
#[prost(string, tag = "3")] | ||
pub base: ::prost::alloc::string::String, | ||
/// display indicates the suggested denom that should be | ||
/// displayed in clients. | ||
#[prost(string, tag = "4")] | ||
pub display: ::prost::alloc::string::String, | ||
/// name defines the name of the token (eg: Cosmos Atom) | ||
/// | ||
/// Since: cosmos-sdk 0.43 | ||
#[prost(string, tag = "5")] | ||
pub name: ::prost::alloc::string::String, | ||
/// symbol is the token symbol usually shown on exchanges (eg: ATOM). This can | ||
/// be the same as the display. | ||
/// | ||
/// Since: cosmos-sdk 0.43 | ||
#[prost(string, tag = "6")] | ||
pub symbol: ::prost::alloc::string::String, | ||
} |
Oops, something went wrong.