-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add proto structures and serde tools (#8)
* Add proto structures and serde tools * Add burn queries for wasm interaction * Add comments regarding proto generation * Fixed shim proto comment * fix proto tag * Regenerated protos for our cosmos sdk 0.47.5 and coreum with our new protobuf generator * Remove tendermint_proto not supported * Adding documentation regarding protobuf generation for the types
- Loading branch information
Showing
37 changed files
with
10,346 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
[package] | ||
name = "coreum-wasm-sdk" | ||
version = "0.1.4" | ||
version = "0.2.0" | ||
edition = "2021" | ||
description = "SDK for WASM coreum messages and queries." | ||
homepage = "https://coreum.com/" | ||
license = "Apache-2.0" | ||
|
||
[dependencies] | ||
cosmwasm-std = "1.2.6" | ||
serde = { version = "1.0.164", default-features = false, features = ["derive"] } | ||
schemars = "0.8.12" | ||
cosmwasm-schema = "1.2.6" | ||
cosmwasm-std = { version = "1.4.0", features = ["stargate"] } | ||
serde = { version = "1.0.188", default-features = false, features = ["derive"] } | ||
schemars = "0.8.13" | ||
cosmwasm-schema = "1.4.0" | ||
osmosis-std-derive = "0.16.2" | ||
chrono = { version = "0.4.30", default-features = false } | ||
prost = { version = "0.11.0", default-features = false, features = [ | ||
"prost-derive", | ||
] } | ||
prost-types = { version = "0.12.0", default-features = false } | ||
serde-cw-value = "0.7.0" |
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,22 @@ | ||
pub mod as_str { | ||
use serde::{de, Deserialize, Deserializer, Serializer}; | ||
use std::{fmt::Display, str::FromStr}; | ||
|
||
pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error> | ||
where | ||
T: FromStr, | ||
T::Err: Display, | ||
D: Deserializer<'de>, | ||
{ | ||
let s = String::deserialize(deserializer)?; | ||
T::from_str(&s).map_err(de::Error::custom) | ||
} | ||
|
||
pub fn serialize<S, T>(value: &T, serializer: S) -> Result<S::Ok, S::Error> | ||
where | ||
S: Serializer, | ||
T: Display, | ||
{ | ||
serializer.serialize_str(&value.to_string()) | ||
} | ||
} |
Oops, something went wrong.