diff --git a/Cargo.lock b/Cargo.lock index 6890404..e2c32ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -15,9 +15,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "base16ct" @@ -25,11 +25,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" -version = "0.13.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -37,6 +43,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "block-buffer" version = "0.9.0" @@ -55,17 +67,23 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bnum" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" + [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "cfg-if" @@ -75,37 +93,38 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "cosmwasm-crypto" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75836a10cb9654c54e77ee56da94d592923092a10b369cdb0dbd56acefc16340" +checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" dependencies = [ "digest 0.10.7", + "ecdsa 0.16.8", "ed25519-zebra", - "k256", + "k256 0.13.1", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9f7f0e51bfc7295f7b2664fe8513c966428642aa765dad8a74acdab5e0c773" +checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f00b363610218eea83f24bbab09e1a7c3920b79f068334fdfcc62f6129ef9fc" +checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -116,9 +135,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae38f909b2822d32b275c9e2db9728497aa33ffe67dd463bc67c6a3b7092785c" +checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ "proc-macro2", "quote", @@ -127,11 +146,13 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49b85345e811c8e80ec55d0d091e4fcb4f00f97ab058f9be5f614c444a730cb" +checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" dependencies = [ "base64", + "bech32", + "bnum", "cosmwasm-crypto", "cosmwasm-derive", "derivative", @@ -140,16 +161,16 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.8", + "static_assertions", "thiserror", - "uint", ] [[package]] name = "cosmwasm-storage" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3737a3aac48f5ed883b5b73bfb731e77feebd8fc6b43419844ec2971072164d" +checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4" dependencies = [ "cosmwasm-std", "serde", @@ -157,24 +178,30 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "crypto-bigint" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -207,9 +234,9 @@ dependencies = [ [[package]] name = "cw-multi-test" -version = "0.16.4" +version = "0.16.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a18afd2e201221c6d72a57f0886ef2a22151bbc9e6db7af276fde8a91081042" +checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" dependencies = [ "anyhow", "cosmwasm-std", @@ -217,7 +244,7 @@ dependencies = [ "cw-utils", "derivative", "itertools", - "k256", + "k256 0.11.6", "prost", "schemars", "serde", @@ -226,9 +253,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a5083c258acd68386734f428a5a171b29f7d733151ae83090c6fcc9417ffa" +checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" dependencies = [ "cosmwasm-std", "schemars", @@ -237,7 +264,7 @@ dependencies = [ [[package]] name = "cw-umee-types" -version = "0.1.10" +version = "0.1.12" dependencies = [ "cosmwasm-std", "cosmwasm-storage", @@ -250,9 +277,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -265,15 +292,16 @@ dependencies = [ [[package]] name = "cw2" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb70cee2cf0b4a8ff7253e6bc6647107905e8eb37208f87d54f67810faa62f8" +checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", "schemars", "serde", + "thiserror", ] [[package]] @@ -286,6 +314,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "derivative" version = "2.2.0" @@ -313,15 +351,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" @@ -329,10 +368,24 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.6", + "rfc6979 0.4.0", + "signature 2.1.0", + "spki 0.7.2", ] [[package]] @@ -352,9 +405,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" @@ -362,16 +415,35 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array", + "group 0.12.1", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.3", "digest 0.10.7", - "ff", + "ff 0.13.0", "generic-array", - "group", - "pkcs8", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -386,6 +458,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "forward_ref" version = "1.0.0" @@ -400,13 +482,14 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -419,7 +502,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -459,9 +553,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "k256" @@ -470,22 +564,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "k256" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +dependencies = [ + "cfg-if", + "ecdsa 0.16.8", + "elliptic-curve 0.13.6", + "once_cell", + "sha2 0.10.8", + "signature 2.1.0", ] [[package]] name = "libc" -version = "0.2.144" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "once_cell" -version = "1.17.2" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -499,15 +607,25 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "der", - "spki", + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.2", ] [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -537,9 +655,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -565,22 +683,32 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.4.9", "hmac", "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -590,9 +718,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -606,25 +734,39 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "base16ct", - "der", + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", "generic-array", - "pkcs8", + "pkcs8 0.10.2", "subtle", "zeroize", ] [[package]] name = "semver" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] @@ -640,13 +782,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -662,9 +804,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -686,9 +828,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -705,6 +847,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "spki" version = "0.6.0" @@ -712,7 +864,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", - "der", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +dependencies = [ + "base64ct", + "der 0.7.8", ] [[package]] @@ -740,9 +902,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -751,45 +913,33 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "uint" -version = "0.9.5" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "umee-cosmwasm" -version = "0.1.10" +version = "0.1.11" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -805,9 +955,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" diff --git a/Cargo.toml b/Cargo.toml index dea60a7..b7f9f38 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "umee-cosmwasm" -version = "0.1.10" +version = "0.1.11" authors = ["Umee (umee.cc)"] edition = "2018" @@ -40,8 +40,8 @@ optimize = """docker run --rm -v "$(pwd)":/code \ """ [dependencies] -cw-umee-types = { version = "0.1.10", path = "./packages/cw-umee-types" } -cosmwasm-std = { version = "1.2.5", features = ["stargate", "staking"] } +cw-umee-types = { version = "0.1.12", path = "./packages/cw-umee-types" } +cosmwasm-std = { version = "1.3.3", features = ["stargate", "staking","cosmwasm_1_1","cosmwasm_1_2"] } cosmwasm-storage = { version = "1.2.5" } cw-storage-plus = "1.0" cw2 = "1.0" diff --git a/packages/cw-umee-types/Cargo.lock b/packages/cw-umee-types/Cargo.lock index 3052b75..6158eca 100644 --- a/packages/cw-umee-types/Cargo.lock +++ b/packages/cw-umee-types/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" dependencies = [ "getrandom", "once_cell", @@ -15,15 +15,15 @@ dependencies = [ [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] name = "base64ct" @@ -31,6 +31,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "block-buffer" version = "0.9.0" @@ -49,11 +55,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bnum" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" + [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cfg-if" @@ -63,17 +75,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "cosmwasm-crypto" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75836a10cb9654c54e77ee56da94d592923092a10b369cdb0dbd56acefc16340" +checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" dependencies = [ "digest 0.10.7", + "ecdsa", "ed25519-zebra", "k256", "rand_core 0.6.4", @@ -82,18 +95,18 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9f7f0e51bfc7295f7b2664fe8513c966428642aa765dad8a74acdab5e0c773" +checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f00b363610218eea83f24bbab09e1a7c3920b79f068334fdfcc62f6129ef9fc" +checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -104,9 +117,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae38f909b2822d32b275c9e2db9728497aa33ffe67dd463bc67c6a3b7092785c" +checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ "proc-macro2", "quote", @@ -115,11 +128,13 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49b85345e811c8e80ec55d0d091e4fcb4f00f97ab058f9be5f614c444a730cb" +checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" dependencies = [ "base64", + "bech32", + "bnum", "cosmwasm-crypto", "cosmwasm-derive", "derivative", @@ -128,16 +143,16 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.8", + "static_assertions", "thiserror", - "uint", ] [[package]] name = "cosmwasm-storage" -version = "1.2.5" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3737a3aac48f5ed883b5b73bfb731e77feebd8fc6b43419844ec2971072164d" +checksum = "bd2b4ae72a03e8f56c85df59d172d51d2d7dc9cec6e2bc811e3fb60c588032a4" dependencies = [ "cosmwasm-std", "serde", @@ -145,24 +160,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ "libc", ] -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -195,9 +204,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053a5083c258acd68386734f428a5a171b29f7d733151ae83090c6fcc9417ffa" +checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" dependencies = [ "cosmwasm-std", "schemars", @@ -206,7 +215,7 @@ dependencies = [ [[package]] name = "cw-umee-types" -version = "0.1.9" +version = "0.1.12" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -220,22 +229,23 @@ dependencies = [ [[package]] name = "cw2" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb70cee2cf0b4a8ff7253e6bc6647107905e8eb37208f87d54f67810faa62f8" +checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", "schemars", "serde", + "thiserror", ] [[package]] name = "der" -version = "0.6.1" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", @@ -268,26 +278,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] @@ -307,13 +320,12 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct", "crypto-bigint", - "der", "digest 0.10.7", "ff", "generic-array", @@ -327,9 +339,9 @@ dependencies = [ [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", @@ -349,13 +361,14 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "libc", @@ -364,9 +377,9 @@ dependencies = [ [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", @@ -399,33 +412,35 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "k256" -version = "0.11.6" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.6", + "once_cell", + "sha2 0.10.8", + "signature", ] [[package]] name = "libc" -version = "0.2.144" +version = "0.2.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" [[package]] name = "once_cell" -version = "1.17.2" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -435,9 +450,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -445,18 +460,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -478,26 +493,25 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -507,9 +521,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -519,9 +533,9 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -533,9 +547,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.163" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] @@ -551,13 +565,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] @@ -573,9 +587,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" dependencies = [ "itoa", "ryu", @@ -597,9 +611,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -608,9 +622,9 @@ dependencies = [ [[package]] name = "signature" -version = "1.6.4" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -618,9 +632,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", "der", @@ -651,9 +665,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" dependencies = [ "proc-macro2", "quote", @@ -662,47 +676,35 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.39", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "uint" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" diff --git a/packages/cw-umee-types/Cargo.toml b/packages/cw-umee-types/Cargo.toml index 40d2f16..19a095d 100644 --- a/packages/cw-umee-types/Cargo.toml +++ b/packages/cw-umee-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cw-umee-types" -version = "0.1.10" +version = "0.1.12" edition = "2021" description = "Types for CustomMsg and CustomQuery for the Umee blockchain" license = "Apache-2.0" @@ -30,7 +30,7 @@ library = [] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.2.5", features = ["stargate", "staking"] } +cosmwasm-std = { version = "1.3.3", features = ["stargate", "staking","cosmwasm_1_1","cosmwasm_1_2"] } cosmwasm-storage = { version = "1.2.5" } cw-storage-plus = "1.0" cw2 = "1.0" diff --git a/packages/cw-umee-types/src/lib.rs b/packages/cw-umee-types/src/lib.rs index 32c2afd..e458715 100644 --- a/packages/cw-umee-types/src/lib.rs +++ b/packages/cw-umee-types/src/lib.rs @@ -9,6 +9,7 @@ pub mod oracle_parameters; pub mod query; pub mod query_incentive; pub mod query_leverage; +pub mod query_metoken; pub mod query_oracle; pub mod token; diff --git a/packages/cw-umee-types/src/query.rs b/packages/cw-umee-types/src/query.rs index 59b2ac6..9d553bc 100644 --- a/packages/cw-umee-types/src/query.rs +++ b/packages/cw-umee-types/src/query.rs @@ -9,6 +9,10 @@ use crate::query_leverage::{ LiquidationTargetsParams, MarketSummaryParams, MaxWithdrawParams, RegisteredTokensParams, UmeeQueryLeverage, }; +use crate::query_metoken::{ + MetokenIndexPricesParams, MetokenIndexbalancesParams, MetokenIndexesParams, + MetokenParametersParams, MetokenRedeemfeeParams, MetokenSwapfeeParams, UmeeQueryMeToken, +}; use crate::query_oracle::{ ActiveExchangeRatesParams, AggregatePrevoteParams, AggregatePrevotesParams, AggregateVoteParams, AggregateVotesParams, ExchangeRatesParams, FeederDelegationParams, MedianDeviationsParams, @@ -33,6 +37,8 @@ pub enum UmeeQuery { Oracle(UmeeQueryOracle), // Incentive wraps all the query enums from the incentive module Incentive(UmeeQueryIncentive), + // Metoken wraps all metoken queries + Metoken(UmeeQueryMeToken), } // StructUmeeQuery expected structure to query umee native modules @@ -73,6 +79,13 @@ pub struct StructUmeeQuery { current_rates: Option, actual_rates: Option, last_reward_time: Option, + // metoken + metoken_parameters: Option, + metoken_indexes: Option, + metoken_swapfee: Option, + metoken_redeemfee: Option, + metoken_indexbalances: Option, + metoken_indexprice: Option, } fn default_struct_umee_query() -> StructUmeeQuery { @@ -110,6 +123,12 @@ fn default_struct_umee_query() -> StructUmeeQuery { current_rates: None, actual_rates: None, last_reward_time: None, + metoken_parameters: None, + metoken_indexes: None, + metoken_swapfee: None, + metoken_redeemfee: None, + metoken_indexbalances: None, + metoken_indexprice: None, } } @@ -332,4 +351,41 @@ impl StructUmeeQuery { q.median_deviations_params = Some(median_deviations_params); return q; } + + // metoken + pub fn metoken_parameters(metoken_parameter_params: MetokenParametersParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_parameters = Some(metoken_parameter_params); + return q; + } + + pub fn metoken_indexes(p: MetokenIndexesParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_indexes = Some(p); + return q; + } + + pub fn metoken_swapfee(p: MetokenSwapfeeParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_swapfee = Some(p); + return q; + } + + pub fn metoken_redeemfee(p: MetokenRedeemfeeParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_redeemfee = Some(p); + return q; + } + + pub fn metoken_indexbalances(p: MetokenIndexbalancesParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_indexbalances = Some(p); + return q; + } + + pub fn metoken_indexprice(p: MetokenIndexPricesParams) -> StructUmeeQuery { + let mut q: StructUmeeQuery = default_struct_umee_query(); + q.metoken_indexprice = Some(p); + return q; + } } diff --git a/packages/cw-umee-types/src/query_metoken.rs b/packages/cw-umee-types/src/query_metoken.rs new file mode 100644 index 0000000..41c32fd --- /dev/null +++ b/packages/cw-umee-types/src/query_metoken.rs @@ -0,0 +1,137 @@ +use cosmwasm_std::{Coin, Decimal}; +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +#[serde(rename_all = "snake_case")] +pub enum UmeeQueryMeToken { + MetokenParameters(MetokenParametersParams), + MetokenIndexes(MetokenIndexesParams), + MetokenSwapfee(MetokenSwapfeeParams), + MetokenRedeemfee(MetokenRedeemfeeParams), + MetokenIndexbalances(MetokenIndexbalancesParams), + MetokenIndexPrices(MetokenIndexPricesParams), +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenParametersParams {} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenParametersResponse { + pub params: MetokenParameters, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenParameters { + pub rebalancing_frequency: i64, + pub claiming_frequency: i64, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexesParams { + pub metoken_denom: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexesResponse { + pub registry: Vec, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct Index { + pub denom: String, + pub max_supply: i64, + pub exponent: u32, + pub fee: Fee, + pub accepted_assets: Vec, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct Fee { + pub min_fee: Decimal, + pub balanced_fee: Decimal, + pub max_fee: Decimal, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct AcceptedAsset { + pub denom: String, + pub reserve_portion: Decimal, + pub target_allocation: Decimal, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenSwapfeeParams { + pub metoken_denom: String, + pub asset: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenSwapfeeResponse { + pub asset: Coin, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenRedeemfeeParams { + pub metoken: String, + pub asset_denom: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenRedeemfeeResponse { + pub asset: Coin, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexbalancesParams { + pub metoken_denom: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexbalancesResponse { + pub index_balances: Vec, + pub index_prices: Vec, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct IndexBalances { + pub metoken_supply: Coin, + pub asset_balances: Vec, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct IndexPrices { + pub denom: String, + pub price: String, + pub exponent: u32, + pub assets: Vec, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct AssetPrice { + pub base_denom: String, + pub symbol_denom: String, + pub price: String, + pub exponent: u32, + pub swap_rate: String, + pub redeem_rate: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct AssetBalance { + pub denom: String, + pub leveraged: Decimal, + pub reserved: Decimal, + pub fees: Decimal, + pub interest: Decimal, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexPricesParams { + pub metoken_denom: String, +} + +#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug)] +pub struct MetokenIndexPricesResponse { + pub prices: Vec, +} diff --git a/rust_optimizer.sh b/rust_optimizer.sh index 7b6b64f..f2b5c67 100755 --- a/rust_optimizer.sh +++ b/rust_optimizer.sh @@ -4,7 +4,7 @@ set -eo pipefail CWD="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" BASENAME="$(basename $CWD)" -OPTIMIZER_VERSION="0.12.8" +OPTIMIZER_VERSION="0.14.0" architecture=$(uname -m) if [[ "$architecture" == "arm64" ]];then diff --git a/schema/query_msg.json b/schema/query_msg.json index 7b9b8b9..3f3a670 100644 --- a/schema/query_msg.json +++ b/schema/query_msg.json @@ -160,6 +160,27 @@ }, "BankQuery": { "oneOf": [ + { + "description": "This calls into the native bank module for querying the total supply of one denomination. It does the same as the SupplyOf call in Cosmos SDK's RPC API. Return value is of type SupplyResponse.", + "type": "object", + "required": [ + "supply" + ], + "properties": { + "supply": { + "type": "object", + "required": [ + "denom" + ], + "properties": { + "denom": { + "type": "string" + } + } + } + }, + "additionalProperties": false + }, { "description": "This calls into the native bank module for one denomination Return value is BalanceResponse", "type": "object", @@ -402,6 +423,72 @@ } } }, + "MetokenIndexPricesParams": { + "type": "object", + "required": [ + "metoken_denom" + ], + "properties": { + "metoken_denom": { + "type": "string" + } + } + }, + "MetokenIndexbalancesParams": { + "type": "object", + "required": [ + "metoken_denom" + ], + "properties": { + "metoken_denom": { + "type": "string" + } + } + }, + "MetokenIndexesParams": { + "type": "object", + "required": [ + "metoken_denom" + ], + "properties": { + "metoken_denom": { + "type": "string" + } + } + }, + "MetokenParametersParams": { + "type": "object" + }, + "MetokenRedeemfeeParams": { + "type": "object", + "required": [ + "asset_denom", + "metoken" + ], + "properties": { + "asset_denom": { + "type": "string" + }, + "metoken": { + "type": "string" + } + } + }, + "MetokenSwapfeeParams": { + "type": "object", + "required": [ + "asset", + "metoken_denom" + ], + "properties": { + "asset": { + "type": "string" + }, + "metoken_denom": { + "type": "string" + } + } + }, "MissCounterParams": { "type": "object", "required": [ @@ -872,6 +959,66 @@ } ] }, + "metoken_indexbalances": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenIndexbalancesParams" + }, + { + "type": "null" + } + ] + }, + "metoken_indexes": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenIndexesParams" + }, + { + "type": "null" + } + ] + }, + "metoken_indexprice": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenIndexPricesParams" + }, + { + "type": "null" + } + ] + }, + "metoken_parameters": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenParametersParams" + }, + { + "type": "null" + } + ] + }, + "metoken_redeemfee": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenRedeemfeeParams" + }, + { + "type": "null" + } + ] + }, + "metoken_swapfee": { + "anyOf": [ + { + "$ref": "#/definitions/MetokenSwapfeeParams" + }, + { + "type": "null" + } + ] + }, "miss_counter": { "anyOf": [ { @@ -1023,6 +1170,18 @@ } }, "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken" + ], + "properties": { + "metoken": { + "$ref": "#/definitions/UmeeQueryMeToken" + } + }, + "additionalProperties": false } ] }, @@ -1286,6 +1445,82 @@ } ] }, + "UmeeQueryMeToken": { + "oneOf": [ + { + "type": "object", + "required": [ + "metoken_parameters" + ], + "properties": { + "metoken_parameters": { + "$ref": "#/definitions/MetokenParametersParams" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken_indexes" + ], + "properties": { + "metoken_indexes": { + "$ref": "#/definitions/MetokenIndexesParams" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken_swapfee" + ], + "properties": { + "metoken_swapfee": { + "$ref": "#/definitions/MetokenSwapfeeParams" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken_redeemfee" + ], + "properties": { + "metoken_redeemfee": { + "$ref": "#/definitions/MetokenRedeemfeeParams" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken_indexbalances" + ], + "properties": { + "metoken_indexbalances": { + "$ref": "#/definitions/MetokenIndexbalancesParams" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "metoken_index_prices" + ], + "properties": { + "metoken_index_prices": { + "$ref": "#/definitions/MetokenIndexPricesParams" + } + }, + "additionalProperties": false + } + ] + }, "UmeeQueryOracle": { "oneOf": [ { @@ -1519,6 +1754,29 @@ } }, "additionalProperties": false + }, + { + "description": "Returns a [`CodeInfoResponse`] with metadata of the code", + "type": "object", + "required": [ + "code_info" + ], + "properties": { + "code_info": { + "type": "object", + "required": [ + "code_id" + ], + "properties": { + "code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + } + } + }, + "additionalProperties": false } ] } diff --git a/src/contract.rs b/src/contract.rs index c9274a8..72de871 100644 --- a/src/contract.rs +++ b/src/contract.rs @@ -1,8 +1,9 @@ #[cfg(not(feature = "library"))] use cosmwasm_std::{ - entry_point, from_binary, to_binary, to_vec, Addr, Binary, ContractResult, Deps, DepsMut, Env, - MessageInfo, QueryRequest, Response, StdError, StdResult, SystemResult, + entry_point, Addr, Binary, ContractResult, Deps, DepsMut, Env, MessageInfo, QueryRequest, + Response, StdError, StdResult, SystemResult, }; +use cosmwasm_std::{from_json, to_json_binary, to_json_vec}; use cw2::set_contract_version; use cw_umee_types::error::ContractError; use cw_umee_types::query_incentive::{ @@ -18,6 +19,12 @@ use cw_umee_types::query_leverage::{ BadDebtsParams, BadDebtsResponse, MaxBorrowParams, MaxBorrowResponse, MaxWithdrawParams, MaxWithdrawResponse, }; +use cw_umee_types::query_metoken::{ + MetokenIndexPricesParams, MetokenIndexPricesResponse, MetokenIndexbalancesParams, + MetokenIndexbalancesResponse, MetokenIndexesParams, MetokenIndexesResponse, + MetokenParametersParams, MetokenParametersResponse, MetokenRedeemfeeParams, + MetokenRedeemfeeResponse, MetokenSwapfeeParams, MetokenSwapfeeResponse, UmeeQueryMeToken, +}; use cw_umee_types::query_oracle::{ MedianDeviationsParams, MedianDeviationsParamsResponse, MediansParams, MediansParamsResponse, }; @@ -144,7 +151,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { // "owner": "umee1y6xz2ggfc0pcsmyjlekh0j9pxh6hk87ymc9due" // } // } - QueryMsg::GetOwner {} => to_binary(&query_owner(deps)?), + QueryMsg::GetOwner {} => to_json_binary(&query_owner(deps)?), // queries for anything availabe from the blockchain native modules // "iterator, staking, stargate, custom" @@ -189,12 +196,12 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { // } // } QueryMsg::ExchangeRates(exchange_rates_params) => { - to_binary(&query_exchange_rates(deps, exchange_rates_params)?) + to_json_binary(&query_exchange_rates(deps, exchange_rates_params)?) } QueryMsg::RegisteredTokens(registered_tokens_params) => { - to_binary(&query_registered_tokens(deps, registered_tokens_params)?) + to_json_binary(&query_registered_tokens(deps, registered_tokens_params)?) } - QueryMsg::LeverageParameters(leverage_parameters_params) => to_binary( + QueryMsg::LeverageParameters(leverage_parameters_params) => to_json_binary( &query_leverage_parameters(deps, leverage_parameters_params)?, ), } @@ -244,6 +251,7 @@ fn query_umee(deps: Deps, _env: Env, umee_msg: UmeeQuery) -> StdResult { UmeeQuery::Oracle(oracle) => query_oracle(deps, _env, oracle), // incentive UmeeQuery::Incentive(incentive) => query_incentive(deps, _env, incentive), + UmeeQuery::Metoken(metoken) => query_metoken(deps, _env, metoken), } } @@ -255,7 +263,7 @@ fn query_owner(deps: Deps) -> StdResult { // query_chain queries for any availabe query in the chain native modules fn query_chain(deps: Deps, request: &QueryRequest) -> StdResult { - let raw = to_vec(request).map_err(|serialize_err| { + let raw = to_json_vec(request).map_err(|serialize_err| { StdError::generic_err(format!("Serializing QueryRequest: {}", serialize_err)) })?; match deps.querier.raw_query(&raw) { @@ -274,32 +282,32 @@ fn query_chain(deps: Deps, request: &QueryRequest) -> StdResult // query_leverage contains the umee leverage available queries fn query_leverage(deps: Deps, _env: Env, msg: UmeeQueryLeverage) -> StdResult { match msg { - UmeeQueryLeverage::LeverageParameters(leverage_parameters_params) => to_binary( + UmeeQueryLeverage::LeverageParameters(leverage_parameters_params) => to_json_binary( &query_leverage_parameters(deps, leverage_parameters_params)?, ), UmeeQueryLeverage::RegisteredTokens(registered_tokens_params) => { - to_binary(&query_registered_tokens(deps, registered_tokens_params)?) + to_json_binary(&query_registered_tokens(deps, registered_tokens_params)?) } UmeeQueryLeverage::MarketSummary(market_summary_params) => { - to_binary(&query_market_summary(deps, market_summary_params)?) + to_json_binary(&query_market_summary(deps, market_summary_params)?) } UmeeQueryLeverage::AccountBalances(account_balances_params) => { - to_binary(&query_account_balances(deps, account_balances_params)?) + to_json_binary(&query_account_balances(deps, account_balances_params)?) } UmeeQueryLeverage::AccountSummary(account_summary_params) => { - to_binary(&query_account_summary(deps, account_summary_params)?) + to_json_binary(&query_account_summary(deps, account_summary_params)?) } - UmeeQueryLeverage::LiquidationTargets(liquidation_targets_params) => to_binary( + UmeeQueryLeverage::LiquidationTargets(liquidation_targets_params) => to_json_binary( &query_liquidation_targets(deps, liquidation_targets_params)?, ), UmeeQueryLeverage::BadDebts(bad_debts_params) => { - to_binary(&query_bad_debts(deps, bad_debts_params)?) + to_json_binary(&query_bad_debts(deps, bad_debts_params)?) } UmeeQueryLeverage::MaxWithdraw(max_withdraw_params) => { - to_binary(&query_max_withdraw(deps, max_withdraw_params)?) + to_json_binary(&query_max_withdraw(deps, max_withdraw_params)?) } UmeeQueryLeverage::MaxBorrow(max_borrow_params) => { - to_binary(&query_max_borrow(deps, max_borrow_params)?) + to_json_binary(&query_max_borrow(deps, max_borrow_params)?) } } } @@ -308,28 +316,202 @@ fn query_leverage(deps: Deps, _env: Env, msg: UmeeQueryLeverage) -> StdResult StdResult { match msg { UmeeQueryIncentive::IncentiveParameters(incentive_params) => { - to_binary(&query_incentive_params(deps, incentive_params)?) + to_json_binary(&query_incentive_params(deps, incentive_params)?) + } + UmeeQueryIncentive::TotalBonded(params) => to_json_binary(&query_total_bonded(deps, params)?), + UmeeQueryIncentive::TotalUnbonding(params) => { + to_json_binary(&query_total_unbonding(deps, params)?) + } + UmeeQueryIncentive::AccountBonds(params) => to_json_binary(&query_account_bonds(deps, params)?), + UmeeQueryIncentive::PendingRewards(params) => { + to_json_binary(&query_pending_rewards(deps, params)?) } - UmeeQueryIncentive::TotalBonded(params) => to_binary(&query_total_bonded(deps, params)?), - UmeeQueryIncentive::TotalUnbonding(params) => to_binary(&query_total_unbonding(deps, params)?), - UmeeQueryIncentive::AccountBonds(params) => to_binary(&query_account_bonds(deps, params)?), - UmeeQueryIncentive::PendingRewards(params) => to_binary(&query_pending_rewards(deps, params)?), UmeeQueryIncentive::CompletedIncentivePrograms(params) => { - to_binary(&query_completed_incentive_programs(deps, params)?) + to_json_binary(&query_completed_incentive_programs(deps, params)?) } UmeeQueryIncentive::OngoingIncentivePrograms(params) => { - to_binary(&query_ongoing_incentive_programs(deps, params)?) + to_json_binary(&query_ongoing_incentive_programs(deps, params)?) } UmeeQueryIncentive::UpcomingIncentivePrograms(params) => { - to_binary(&query_upcoming_incentive_programs(deps, params)?) + to_json_binary(&query_upcoming_incentive_programs(deps, params)?) } UmeeQueryIncentive::IncentiveProgram(params) => { - to_binary(&query_incentive_program(deps, params)?) + to_json_binary(&query_incentive_program(deps, params)?) + } + UmeeQueryIncentive::CurrentRates(params) => to_json_binary(&query_current_rates(deps, params)?), + UmeeQueryIncentive::ActualRates(params) => to_json_binary(&query_actutal_rates(deps, params)?), + UmeeQueryIncentive::LastRewardTime(params) => { + to_json_binary(&query_last_reward_time(deps, params)?) + } + } +} + +// query_metoken +fn query_metoken(deps: Deps, _env: Env, msg: UmeeQueryMeToken) -> StdResult { + match msg { + UmeeQueryMeToken::MetokenParameters(params) => { + to_json_binary(&query_metoken_params(deps, params)?) + } + UmeeQueryMeToken::MetokenIndexes(params) => { + to_json_binary(&query_metoken_indexes(deps, params)?) + } + UmeeQueryMeToken::MetokenSwapfee(params) => { + to_json_binary(&query_metoken_swapfee(deps, params)?) + } + UmeeQueryMeToken::MetokenRedeemfee(params) => { + to_json_binary(&query_metoken_redeemfee(deps, params)?) + } + UmeeQueryMeToken::MetokenIndexbalances(params) => { + to_json_binary(&query_metoken_indexbalances(deps, params)?) + } + UmeeQueryMeToken::MetokenIndexPrices(params) => { + to_json_binary(&query_metoken_indexprice(deps, params)?) + } + } +} + +// query_metoken_indexprice +fn query_metoken_indexprice( + deps: Deps, + params: MetokenIndexPricesParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_indexprice(params)); + let response: MetokenIndexPricesResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; + } + } + + Ok(response) +} + +// query_metoken_indexbalances +fn query_metoken_indexbalances( + deps: Deps, + params: MetokenIndexbalancesParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_indexbalances(params)); + let response: MetokenIndexbalancesResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; + } + } + + Ok(response) +} + +// query_metoken_redeemfee +fn query_metoken_redeemfee( + deps: Deps, + params: MetokenRedeemfeeParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_redeemfee(params)); + let response: MetokenRedeemfeeResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; + } + } + + Ok(response) +} + +// query_metoken_swapfee +fn query_metoken_swapfee( + deps: Deps, + params: MetokenSwapfeeParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_swapfee(params)); + let response: MetokenSwapfeeResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; + } + } + + Ok(response) +} + +// query_metoken_indexes +fn query_metoken_indexes( + deps: Deps, + params: MetokenIndexesParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_indexes(params)); + let response: MetokenIndexesResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; } - UmeeQueryIncentive::CurrentRates(params) => to_binary(&query_current_rates(deps, params)?), - UmeeQueryIncentive::ActualRates(params) => to_binary(&query_actutal_rates(deps, params)?), - UmeeQueryIncentive::LastRewardTime(params) => to_binary(&query_last_reward_time(deps, params)?), } + + Ok(response) +} + +// query_metoken_params +fn query_metoken_params( + deps: Deps, + params: MetokenParametersParams, +) -> StdResult { + let request = QueryRequest::Custom(StructUmeeQuery::metoken_parameters(params)); + let response: MetokenParametersResponse; + match query_chain(deps, &request) { + Err(err) => { + return Err(err); + } + Ok(binary) => { + match from_json::(&binary) { + Err(err) => { + return Err(err); + } + Ok(resp) => response = resp, + }; + } + } + + Ok(response) } // query_last_reward_time @@ -345,7 +527,7 @@ fn query_last_reward_time( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -367,7 +549,7 @@ fn query_actutal_rates(deps: Deps, params: ActualRatesParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -389,7 +571,7 @@ fn query_current_rates(deps: Deps, params: CurrentRatesParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -414,7 +596,7 @@ fn query_incentive_program( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -439,7 +621,7 @@ fn query_upcoming_incentive_programs( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -464,7 +646,7 @@ fn query_ongoing_incentive_programs( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -489,7 +671,7 @@ fn query_completed_incentive_programs( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -514,7 +696,7 @@ fn query_pending_rewards( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -536,7 +718,7 @@ fn query_account_bonds(deps: Deps, params: AccountBondsParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -561,7 +743,7 @@ fn query_total_unbonding( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -583,7 +765,7 @@ fn query_total_bonded(deps: Deps, params: TotalBondedParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -608,7 +790,7 @@ fn query_incentive_params( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -642,38 +824,38 @@ fn query_oracle(deps: Deps, _env: Env, msg: UmeeQueryOracle) -> StdResult { - to_binary(&query_exchange_rates(deps, exchange_rates_params)?) + to_json_binary(&query_exchange_rates(deps, exchange_rates_params)?) } - UmeeQueryOracle::ActiveExchangeRates(active_exchange_rates_params) => to_binary( + UmeeQueryOracle::ActiveExchangeRates(active_exchange_rates_params) => to_json_binary( &query_active_exchange_rates(deps, active_exchange_rates_params)?, ), UmeeQueryOracle::FeederDelegation(feeder_delegation_params) => { - to_binary(&query_feeder_delegation(deps, feeder_delegation_params)?) + to_json_binary(&query_feeder_delegation(deps, feeder_delegation_params)?) } UmeeQueryOracle::MissCounter(miss_counter_params) => { - to_binary(&query_miss_counter(deps, miss_counter_params)?) + to_json_binary(&query_miss_counter(deps, miss_counter_params)?) } UmeeQueryOracle::SlashWindow(slash_window_params) => { - to_binary(&query_slash_window(deps, slash_window_params)?) + to_json_binary(&query_slash_window(deps, slash_window_params)?) } UmeeQueryOracle::AggregatePrevote(aggregate_prevote_params) => { - to_binary(&query_aggregate_prevote(deps, aggregate_prevote_params)?) + to_json_binary(&query_aggregate_prevote(deps, aggregate_prevote_params)?) } UmeeQueryOracle::AggregatePrevotes(aggregate_prevotes_params) => { - to_binary(&query_aggregate_prevotes(deps, aggregate_prevotes_params)?) + to_json_binary(&query_aggregate_prevotes(deps, aggregate_prevotes_params)?) } UmeeQueryOracle::AggregateVote(aggregate_vote_params) => { - to_binary(&query_aggregate_vote(deps, aggregate_vote_params)?) + to_json_binary(&query_aggregate_vote(deps, aggregate_vote_params)?) } UmeeQueryOracle::AggregateVotes(aggregate_votes_params) => { - to_binary(&query_aggregate_votes(deps, aggregate_votes_params)?) + to_json_binary(&query_aggregate_votes(deps, aggregate_votes_params)?) } UmeeQueryOracle::OracleParameters(oracle_parameters_params) => { - to_binary(&query_oracle_parameters(deps, oracle_parameters_params)?) + to_json_binary(&query_oracle_parameters(deps, oracle_parameters_params)?) } - UmeeQueryOracle::Medians(median_params) => to_binary(&query_medians(deps, median_params)?), + UmeeQueryOracle::Medians(median_params) => to_json_binary(&query_medians(deps, median_params)?), UmeeQueryOracle::MedianDeviations(median_deviations_params) => { - to_binary(&query_median_deviations(deps, median_deviations_params)?) + to_json_binary(&query_median_deviations(deps, median_deviations_params)?) } } } @@ -694,7 +876,7 @@ fn query_registered_tokens( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -723,7 +905,7 @@ fn query_leverage_parameters( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -750,7 +932,7 @@ fn query_account_balances( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -777,7 +959,7 @@ fn query_account_summary( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -806,7 +988,7 @@ fn query_liquidation_targets( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -827,7 +1009,7 @@ fn query_bad_debts(deps: Deps, bad_debts_params: BadDebtsParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -852,7 +1034,7 @@ fn query_max_withdraw( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -877,7 +1059,7 @@ fn query_max_borrow( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -904,7 +1086,7 @@ fn query_market_summary( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -932,7 +1114,7 @@ fn query_exchange_rates( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -962,7 +1144,7 @@ fn query_active_exchange_rates( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -990,7 +1172,7 @@ fn query_feeder_delegation( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1018,7 +1200,7 @@ fn query_miss_counter( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1046,7 +1228,7 @@ fn query_slash_window( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1074,7 +1256,7 @@ fn query_aggregate_prevote( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1104,7 +1286,7 @@ fn query_aggregate_prevotes( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1132,7 +1314,7 @@ fn query_aggregate_vote( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1160,7 +1342,7 @@ fn query_aggregate_votes( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1188,7 +1370,7 @@ fn query_oracle_parameters( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1209,7 +1391,7 @@ fn query_medians(deps: Deps, medians_params: MediansParams) -> StdResult { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); } @@ -1235,7 +1417,7 @@ fn query_median_deviations( return Err(err); } Ok(binary) => { - match from_binary::(&binary) { + match from_json::(&binary) { Err(err) => { return Err(err); }