diff --git a/cosmwasm-contracts/marketing/Cargo.lock b/cosmwasm-contracts/marketing/Cargo.lock index bcc3dd642b..14d26e5305 100644 --- a/cosmwasm-contracts/marketing/Cargo.lock +++ b/cosmwasm-contracts/marketing/Cargo.lock @@ -4,167 +4,48 @@ version = 3 [[package]] name = "ahash" -version = "0.8.11" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "cfg-if", + "getrandom", "once_cell", "version_check", - "zerocopy", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "ark-bls12-381" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", - "num-traits", - "rayon", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest", - "itertools 0.10.5", - "num-bigint", - "num-traits", - "paste", - "rayon", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", ] [[package]] -name = "ark-ff-macros" -version = "0.4.2" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] -name = "ark-poly" -version = "0.4.2" +name = "base64" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "ark-serialize" -version = "0.4.2" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest", - "num-bigint", -] +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "ark-serialize-derive" -version = "0.4.2" +name = "bech32" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] -name = "ark-std" -version = "0.4.0" +name = "block-buffer" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "num-traits", - "rand", - "rayon", + "generic-array", ] -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bech32" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" - [[package]] name = "block-buffer" version = "0.10.4" @@ -176,9 +57,9 @@ dependencies = [ [[package]] name = "bnum" -version = "0.11.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" +checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" [[package]] name = "byteorder" @@ -200,9 +81,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_panic" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" +checksum = "7782af8f90fe69a4bb41e460abe1727d493403d8b2cc43201a3a3e906b24379f" [[package]] name = "convert_case" @@ -213,51 +94,33 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "cosmwasm-core" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d905990ef3afb5753bb709dc7de88e9e370aa32bcc2f31731d4b533b63e82490" - [[package]] name = "cosmwasm-crypto" -version = "2.1.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b2a7bd9c1dd9a377a4dc0f4ad97d24b03c33798cd5a6d7ceb8869b41c5d2f2d" +checksum = "0f862b355f7e47711e0acfe6af92cb3fd8fd5936b66a9eaa338b51edabd1e77d" dependencies = [ - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-serialize", - "cosmwasm-core", - "digest", - "ecdsa", + "digest 0.10.7", "ed25519-zebra", "k256", - "num-traits", - "p256", - "rand_core", - "rayon", - "sha2", + "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "2.1.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029910b409398fdf81955d7301b906caf81f2c42b013ea074fbd89720229c424" +checksum = "cd85de6467cd1073688c86b39833679ae6db18cf4771471edd9809f15f1679f1" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", + "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "2.1.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bc0d4d85e83438ab9a0fea9348446f7268bc016aacfebce37e998559f151294" +checksum = "5b4cd28147a66eba73720b47636a58097a979ad8c8bfdb4ed437ebcbfe362576" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -268,72 +131,46 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "2.1.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edf5c8adac41bb7751c050d7c4c18675be19ee128714454454575e894424eeef" +checksum = "9acd45c63d41bc9b16bc6dc7f6bd604a8c2ad29ce96c8f3c96d7fc8ef384392e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 1.0.109", ] [[package]] name = "cosmwasm-std" -version = "2.1.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51dec99a2e478715c0a4277f0dbeadbb8466500eb7dec873d0924edd086e77f1" +checksum = "2685c2182624b2e9e17f7596192de49a3f86b7a0c9a5f6b25c1df5e24592e836" dependencies = [ "base64", "bech32", "bnum", - "cosmwasm-core", "cosmwasm-crypto", "cosmwasm-derive", - "derive_more", + "derivative", + "forward_ref", "hex", - "rand_core", "schemars", "serde", "serde-json-wasm", - "sha2", + "sha2 0.10.8", "static_assertions", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - [[package]] name = "crypto-bigint" version = "0.5.5" @@ -341,7 +178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -358,36 +195,22 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.3" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version", + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", "subtle", "zeroize", ] -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "cw-storage-plus" -version = "2.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" dependencies = [ "cosmwasm-std", "schemars", @@ -416,24 +239,12 @@ dependencies = [ ] [[package]] -name = "derive_more" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" -dependencies = [ - "derive_more-impl", -] - -[[package]] -name = "derive_more-impl" -version = "1.0.0" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", - "unicode-xid", + "generic-array", ] [[package]] @@ -442,7 +253,7 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", + "block-buffer 0.10.4", "const-oid", "crypto-common", "subtle", @@ -461,42 +272,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest", + "digest 0.10.7", "elliptic-curve", "rfc6979", "signature", -] - -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "signature", + "spki", ] [[package]] name = "ed25519-zebra" -version = "4.0.3" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" +checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "ed25519", - "hashbrown 0.14.5", + "hashbrown 0.12.3", "hex", - "rand_core", - "sha2", + "rand_core 0.6.4", + "serde", + "sha2 0.9.9", "zeroize", ] -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - [[package]] name = "elliptic-curve" version = "0.13.8" @@ -505,11 +302,12 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", - "rand_core", + "pkcs8", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -527,15 +325,15 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] -name = "fiat-crypto" -version = "0.2.9" +name = "forward_ref" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] name = "generic-array" @@ -566,15 +364,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] name = "hashbrown" -version = "0.13.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -584,10 +382,6 @@ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] [[package]] name = "hex" @@ -601,37 +395,19 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] name = "indexmap" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", ] -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.11" @@ -647,7 +423,9 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2", + "once_cell", + "sha2 0.10.8", + "signature", ] [[package]] @@ -679,18 +457,22 @@ checksum = "4e28ab1dc35e09d60c2b8c90d12a9a8d9666c876c10a3739a3196db0103b6043" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "marketing" version = "0.1.0" dependencies = [ + "base64", "cosmwasm-schema", + "cosmwasm-std", "cw-storage-plus", + "schemars", "serde", "sylvia", + "thiserror", ] [[package]] @@ -699,34 +481,6 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - [[package]] name = "once_cell" version = "1.19.0" @@ -734,47 +488,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "p256" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" -dependencies = [ - "ecdsa", - "elliptic-curve", - "primeorder", - "sha2", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "ppv-lite86" -version = "0.2.20" +name = "opaque-debug" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" -dependencies = [ - "zerocopy", -] +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] -name = "primeorder" -version = "0.13.6" +name = "pkcs8" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "elliptic-curve", + "der", + "spki", ] [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ + "once_cell", "toml_edit", ] @@ -813,32 +548,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] [[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" @@ -849,26 +570,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "rfc6979" version = "0.4.0" @@ -879,15 +580,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - [[package]] name = "ryu" version = "1.0.18" @@ -915,7 +607,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -927,21 +619,16 @@ dependencies = [ "base16ct", "der", "generic-array", + "pkcs8", "subtle", "zeroize", ] -[[package]] -name = "semver" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" - [[package]] name = "serde" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -957,22 +644,22 @@ dependencies = [ [[package]] name = "serde-json-wasm" -version = "1.0.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" +checksum = "9e9213a07d53faa0b8dd81e767a54a8188a242fdb9be99ab75ec576a774bfdd7" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -983,14 +670,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -998,6 +685,19 @@ dependencies = [ "serde", ] +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + [[package]] name = "sha2" version = "0.10.8" @@ -1006,7 +706,7 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -1015,8 +715,18 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", - "rand_core", + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", ] [[package]] @@ -1033,13 +743,12 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sylvia" -version = "1.1.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d4a178c389333ad028354626f908be6b987649082d00983f96a16f8498f1a5a" +checksum = "f358d505f46900e55154f028f18811961ebb58f7a92954ec03086ffb2b26cf51" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "derivative", "konst", "schemars", "serde", @@ -1050,17 +759,16 @@ dependencies = [ [[package]] name = "sylvia-derive" -version = "1.1.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90061a95414bc81f9b903fee7a4df7db985bc38171ef7ec7d54bc8fa872c6840" +checksum = "bed182fb775d756fdfe7e87174a4e43f1c446c8f9aff1de38a2165dd04b7d805" dependencies = [ "convert_case", - "itertools 0.13.0", "proc-macro-crate", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.72", + "syn 1.0.109", ] [[package]] @@ -1076,9 +784,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -1102,7 +810,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.77", ] [[package]] @@ -1113,9 +821,9 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap", "toml_datetime", @@ -1145,9 +853,9 @@ checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-segmentation" @@ -1155,12 +863,6 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "version_check" version = "0.9.5" @@ -1182,43 +884,8 @@ dependencies = [ "memchr", ] -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] - [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.72", -] diff --git a/cosmwasm-contracts/marketing/Cargo.toml b/cosmwasm-contracts/marketing/Cargo.toml index c6333ccc9d..808182d975 100644 --- a/cosmwasm-contracts/marketing/Cargo.toml +++ b/cosmwasm-contracts/marketing/Cargo.toml @@ -8,7 +8,11 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -cosmwasm-schema = "2.1.3" -cw-storage-plus = "2.0.0" -serde = "1.0.205" -sylvia = "1.1.0" +schemars = "0.8.12" +cosmwasm-std = "1.3.1" +cosmwasm-schema = "1.3.1" +cw-storage-plus = "1.1.0" +serde = "1.0.180" +sylvia = "0.7.0" +thiserror = "1.0.44" +base64 = "0.21.7" \ No newline at end of file diff --git a/cosmwasm-contracts/marketing/src/contract.rs b/cosmwasm-contracts/marketing/src/contract.rs index 21649f10de..aba3a5c681 100644 --- a/cosmwasm-contracts/marketing/src/contract.rs +++ b/cosmwasm-contracts/marketing/src/contract.rs @@ -1,21 +1,61 @@ -use cosmwasm_schema::cw_serde; -use cw_storage_plus::{Map, Item}; -use sylvia::{ - contract, entry_points, - types::{ExecCtx, InstantiateCtx, QueryCtx}, + +use cosmwasm_std::{attr,Addr, + Response, StdResult }; +use cosmwasm_schema::cw_serde; +use crate::error::ContractError; +use cw_storage_plus::{Item, Map}; +use sylvia::{types::{ExecCtx, InstantiateCtx, QueryCtx},contract, entry_points}; + + +#[cw_serde] +pub struct Banner { + image: String, + url: String, +} + +#[cw_serde] +pub struct Action { + label: String, + url: String, +} + +#[cw_serde] +pub struct News { + title: String, + subtitle: String, + text: String, + image: String, + actions: Option, +} + +#[cw_serde] +pub struct MarketingCollectionPreview { + address: String, + image_uri: String, + collection_name: String, + creator_name: String, + twitter_url: String, + secondary_during_mint: bool, +} + +#[cw_serde] +pub struct Config { + pub admin_addr: Addr, +} pub struct MarketingContract { - pub(crate) config: Item, - pub(crate) banners: Map, - pub(crate) news: Map, - pub(crate) upcoming_collections: Map, - pub(crate) live_collections: Map, - pub(crate) highlighted_collections: Map, + pub(crate) config: Item<'static, Config>, + pub(crate) banners: Map<'static, u64, Banner>, + pub(crate) news: Map<'static, u64, News>, + pub(crate) upcoming_collections: Map<'static, u64, MarketingCollectionPreview>, + pub(crate) live_collections: Map<'static, u64, MarketingCollectionPreview>, + pub(crate) highlighted_collections: Map<'static, u64, MarketingCollectionPreview>, } #[entry_points] #[contract] +#[error(ContractError)] impl MarketingContract { pub const fn new() -> Self { Self { @@ -24,25 +64,35 @@ impl MarketingContract { news: Map::new("news"), upcoming_collections: Map::new("upcoming_collections"), live_collections: Map::new("live_collections"), + highlighted_collections: Map::new("highlighted_collections"), } } #[msg(instantiate)] pub fn instantiate(&self, ctx: InstantiateCtx , config: Config - , banners: Option> - , news: Option> - , upcoming_collections: Option> - , live_collections: Option> - , highlighted_collections: Option> + , banners: Vec + , news: Vec + , upcoming_collections: Vec + , live_collections: Vec + , highlighted_collections: Vec ) -> StdResult { - self.config.save(deps.storage, &config)?; - self.banners.save(deps.storage, &banners)?; - self.news.save(deps.storage, &news)?; - self.upcoming_collections.save(deps.storage, &upcoming_collections)?; - self.live_collections.save(deps.storage, &live_collections)?; - self.highlighted_collections.save(deps.storage, &highlighted_collections)?; - + self.config.save(ctx.deps.storage, &config)?; + for (index, banner) in banners.into_iter().enumerate() { + self.banners.save(ctx.deps.storage, index as u64, &banner)?; + } + for (index, news_item) in news.into_iter().enumerate() { + self.news.save(ctx.deps.storage, index as u64, &news_item)?; + } + for (index, upcoming_collection) in upcoming_collections.into_iter().enumerate() { + self.upcoming_collections.save(ctx.deps.storage, index as u64, &upcoming_collection)?; + } + for (index, live_collection) in live_collections.into_iter().enumerate() { + self.live_collections.save(ctx.deps.storage, index as u64, &live_collection)?; + } + for (index, highlighted_collection) in highlighted_collections.into_iter().enumerate() { + self.highlighted_collections.save(ctx.deps.storage, index as u64, &highlighted_collection)?; + } Ok(Response::default()) } @@ -51,37 +101,43 @@ impl MarketingContract { pub fn update_config( &self, ctx: ExecCtx, - config: Config, + admin_addr: Option, ) -> Result { - let mut current_config = self.config.load(ctx.deps.storage)?; - let mut attributes = vec![attr("action", "update_config")]; - // Permission check - if ctx.info.sender != current_config.admin_addr { - return Err(ContractError::Unauthorized); - } - // Validate new admin address and save it - if let Some(admin_addr) = config.admin_addr { - current_config.admin_addr = ctx.deps.api.addr_validate(&admin_addr)?; - attributes.push(attr("new_admin_addr", admin_addr)) - } - self.config.save(ctx.deps.storage, ¤t_config)?; + let attributes = vec![attr("action", "update_config")]; + self.config.update(ctx.deps.storage, |mut config| { + // Permission check + if ctx.info.sender != config.admin_addr { + return Err(ContractError::Unauthorized); + } + // Validate and save the new admin_addr in config + if let Some(admin_addr) = admin_addr { + config.admin_addr = ctx.deps.api.addr_validate(admin_addr.as_str())?; + } - Ok(Response::new().add_attributes(attributes)) - } + Ok(config) + })?; + + Ok(Response::new().add_attributes(attributes)) + } #[msg(exec)] // Only the admin can execute it pub fn update_banners( &self, ctx: ExecCtx, - banners: Vec, + banners: Vec, ) -> Result { - let mut attributes = vec![attr("action", "update_banners")]; + let attributes = vec![attr("action", "update_banners")]; + let config = self.config.load(ctx.deps.storage)?; // Permission check if ctx.info.sender != config.admin_addr { - return Err(ContractError::Unauthorized); + return Err(ContractError::Unauthorized); + } + // Replace all banners with the new ones + self.banners.clear(ctx.deps.storage); + for (index, banner) in banners.into_iter().enumerate() { + self.banners.save(ctx.deps.storage, index as u64, &banner)?; } - self.banners.save(ctx.deps.storage, &banners)?; Ok(Response::new().add_attributes(attributes)) } @@ -93,12 +149,17 @@ impl MarketingContract { ctx: ExecCtx, news: Vec, ) -> Result { - let mut attributes = vec![attr("action", "update_news")]; + let attributes = vec![attr("action", "update_news")]; + let config = self.config.load(ctx.deps.storage)?; // Permission check if ctx.info.sender != config.admin_addr { return Err(ContractError::Unauthorized); } - self.news.save(ctx.deps.storage, &news)?; + // Replace all news with the new ones + self.news.clear(ctx.deps.storage); + for (index, news_item) in news.into_iter().enumerate() { + self.news.save(ctx.deps.storage, index as u64, &news_item)?; + } Ok(Response::new().add_attributes(attributes)) } @@ -108,14 +169,19 @@ impl MarketingContract { pub fn update_live_collections( &self, ctx: ExecCtx, - collections: Vec, + live_collections: Vec, ) -> Result { - let mut attributes = vec![attr("action", "update_live_collections")]; + let attributes = vec![attr("action", "update_live_collections")]; + let config = self.config.load(ctx.deps.storage)?; // Permission check if ctx.info.sender != config.admin_addr { return Err(ContractError::Unauthorized); } - self.live_collections.save(ctx.deps.storage, &collections)?; + // Replace all live_collections with the new ones + self.live_collections.clear(ctx.deps.storage); + for (index, live_collection) in live_collections.into_iter().enumerate() { + self.live_collections.save(ctx.deps.storage, index as u64, &live_collection)?; + } Ok(Response::new().add_attributes(attributes)) } @@ -125,14 +191,19 @@ impl MarketingContract { pub fn update_upcoming_collections( &self, ctx: ExecCtx, - collections: Vec, + upcoming_collections: Vec, ) -> Result { - let mut attributes = vec![attr("action", "update_upcoming_collections")]; + let attributes = vec![attr("action", "update_upcoming_collections")]; + let config = self.config.load(ctx.deps.storage)?; // Permission check if ctx.info.sender != config.admin_addr { return Err(ContractError::Unauthorized); } - self.upcoming_collections.save(ctx.deps.storage, &collections)?; + // Replace all upcoming_collections with the new ones + self.upcoming_collections.clear(ctx.deps.storage); + for (index, upcoming_collection) in upcoming_collections.into_iter().enumerate() { + self.upcoming_collections.save(ctx.deps.storage, index as u64, &upcoming_collection)?; + } Ok(Response::new().add_attributes(attributes)) } @@ -142,14 +213,19 @@ impl MarketingContract { pub fn update_highlighted_collections( &self, ctx: ExecCtx, - collections: Vec, + highlighted_collections: Vec, ) -> Result { - let mut attributes = vec![attr("action", "update_highlighted_collections")]; + let attributes = vec![attr("action", "update_highlighted_collections")]; + let config = self.config.load(ctx.deps.storage)?; // Permission check if ctx.info.sender != config.admin_addr { return Err(ContractError::Unauthorized); } - self.highlighted_collections.save(ctx.deps.storage, &collections)?; + // Replace all highlighted_collections with the new ones + self.highlighted_collections.clear(ctx.deps.storage); + for (index, highlighted_collection) in highlighted_collections.into_iter().enumerate() { + self.highlighted_collections.save(ctx.deps.storage, index as u64, &highlighted_collection)?; + } Ok(Response::new().add_attributes(attributes)) } @@ -162,69 +238,58 @@ impl MarketingContract { #[msg(query)] pub fn get_banners(&self, ctx: QueryCtx) -> StdResult> { - let banners = self.banners.load(ctx.deps.storage)?; + let banners: Vec = self + .banners + .range(ctx.deps.storage, None, None, cosmwasm_std::Order::Ascending) + .map(|item| item.map(|(_, banner)| banner)) + .collect::>>()?; + Ok(banners) } #[msg(query)] pub fn get_news(&self, ctx: QueryCtx) -> StdResult> { - let news = self.news.load(ctx.deps.storage)?; + let news: Vec = self + .news + .range(ctx.deps.storage, None, None, cosmwasm_std::Order::Ascending) + .map(|item| item.map(|(_, news_item)| news_item)) + .collect::>>()?; + Ok(news) } #[msg(query)] pub fn get_live_collections(&self, ctx: QueryCtx) -> StdResult> { - let live_collections = self.live_collections.load(ctx.deps.storage)?; + let live_collections: Vec = self + .live_collections + .range(ctx.deps.storage, None, None, cosmwasm_std::Order::Ascending) + .map(|item| item.map(|(_, live_collection)| live_collection)) + .collect::>>()?; + Ok(live_collections) } #[msg(query)] pub fn get_upcoming_collections(&self, ctx: QueryCtx) -> StdResult> { - let upcoming_collections = self.upcoming_collections.load(ctx.deps.storage)?; + let upcoming_collections: Vec = self + .upcoming_collections + .range(ctx.deps.storage, None, None, cosmwasm_std::Order::Ascending) + .map(|item| item.map(|(_, upcoming_collection)| upcoming_collection)) + .collect::>>()?; + Ok(upcoming_collections) } #[msg(query)] pub fn get_highlighted_collections(&self, ctx: QueryCtx) -> StdResult> { - let highlighted_collections = self.highlighted_collections.load(ctx.deps.storage)?; + let highlighted_collections: Vec = self + .highlighted_collections + .range(ctx.deps.storage, None, None, cosmwasm_std::Order::Ascending) + .map(|item| item.map(|(_, highlighted_collection)| highlighted_collection)) + .collect::>>()?; + Ok(highlighted_collections) } } -#[cw_serde] -pub struct Banner { - image: String, - url: String, -} - -#[cw_serde] -pub struct Action { - label: String, - url: String, -} - -#[cw_serde] -pub struct News { - title: String, - subtitle: String, - text: String, - image: String, - actions: Option, -} - -#[cw_serde] -pub struct MarketingCollectionPreview { - address: String, - image_uri: String, - collection_name: String, - creator_name: String, - twitter_url: String, - secondary_during_mint: bool, -} - -#[cw_serde] -pub struct Config { - pub admin_addr: String, -} - diff --git a/cosmwasm-contracts/marketing/src/lib.rs b/cosmwasm-contracts/marketing/src/lib.rs index 2943dbb509..5c639a809f 100644 --- a/cosmwasm-contracts/marketing/src/lib.rs +++ b/cosmwasm-contracts/marketing/src/lib.rs @@ -1 +1,2 @@ pub mod contract; +pub mod error; \ No newline at end of file