diff --git a/Cargo.lock b/Cargo.lock index 7d70f6d..92e1f7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ "getrandom", "once_cell", @@ -15,41 +15,163 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "once_cell", "version_check", + "zerocopy", ] [[package]] -name = "android-tzdata" -version = "0.1.1" +name = "allocator-api2" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", + "rayon", +] [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ats-smart-contract" -version = "1.0.0" +version = "1.0.1" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", - "prost", + "prost 0.11.9", "provwasm-mocks", "provwasm-std", "rust_decimal", @@ -63,9 +185,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base16ct" @@ -75,23 +197,32 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] -name = "base64ct" -version = "1.6.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] -name = "block-buffer" -version = "0.9.0" +name = "bech32" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" + +[[package]] +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "generic-array", + "funty", + "radium", + "tap", + "wyz", ] [[package]] @@ -105,60 +236,39 @@ dependencies = [ [[package]] name = "bnum" -version = "0.8.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" +checksum = "3e31ea183f6ee62ac8b8a8cf7feddd766317adfb13ff469de57ce033efd6a790" [[package]] name = "borsh" -version = "0.10.3" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", - "hashbrown 0.13.2", + "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "0.10.3" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ - "borsh-derive-internal", - "borsh-schema-derive-internal", + "once_cell", "proc-macro-crate", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "syn 2.0.72", + "syn_derive", ] [[package]] name = "bytecheck" -version = "0.6.10" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13fe11640a23eb24562225322cd3e452b93a3d4091d62fab69c70542fcd17d1f" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -167,26 +277,20 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.10" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - [[package]] name = "bytes" -version = "1.4.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "cfg-if" @@ -194,49 +298,72 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ - "android-tzdata", "num-traits", ] [[package]] name = "const-oid" -version = "0.9.2" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "cosmwasm-core" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +checksum = "367fc87c43759098a476ef90f915aadc66c300480ad9c155b512081fbf327bc1" [[package]] name = "cosmwasm-crypto" -version = "1.4.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ca101fbf2f76723711a30ea3771ef312ec3ec254ad021b237871ed802f9f175" +checksum = "9b7c41f3e371ea457d3b98bb592c38858b46efcf614e0e988ec2ebbdb973954f" dependencies = [ - "digest 0.10.6", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "cosmwasm-core", + "digest", + "ecdsa", "ed25519-zebra", "k256", - "rand_core 0.6.4", + "num-traits", + "p256", + "rand_core", + "rayon", + "sha2", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.4.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c73d2dd292f60e42849d2b07c03d809cf31e128a4299a805abd6d24553bcaaf5" +checksum = "c10510e8eb66cf7e109741b1e2c76ad18f30b5a1daa064f5f7115c1f733aaea0" dependencies = [ - "syn 1.0.109", + "proc-macro2", + "quote", + "syn 2.0.72", ] [[package]] name = "cosmwasm-schema" -version = "1.2.7" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "230e5d1cefae5331db8934763c81b9c871db6a2cd899056a5694fa71d292c815" +checksum = "27984b137eb2ac561f97f6bdb02004a98eb6f2ba263062c140b8e231ee1826b7" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -247,52 +374,80 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.7" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43dadf7c23406cb28079d69e6cb922c9c29b9157b0fe887e3b79c783b7d4bcb8" +checksum = "f4ef0d201f611bdb6c9124207032423eb956f1fc8ab3e3ee7253a9c08a5f5809" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "cosmwasm-std" -version = "1.4.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a44d3f9c25b2f864737c6605a98f2e4675d53fd8bbc7cf4d7c02475661a793d" +checksum = "92011c39570876f340d5f9defa68bf92797b1c44421f1b9ea9b04a31d6defd33" dependencies = [ - "base64", + "base64 0.22.1", + "bech32", "bnum", + "cosmwasm-core", "cosmwasm-crypto", "cosmwasm-derive", - "derivative", - "forward_ref", + "derive_more", "hex", + "rand_core", "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2", + "static_assertions", "thiserror", ] [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 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.3" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core 0.6.4", + "rand_core", "subtle", "zeroize", ] @@ -309,22 +464,36 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.0" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "rustc_version", "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 = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" +checksum = "f13360e9007f51998d42b1bc6b7fa0141f74feae61ed5fd1e5b0a89eec7b5de1" dependencies = [ "cosmwasm-std", "schemars", @@ -333,9 +502,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -353,21 +522,33 @@ dependencies = [ ] [[package]] -name = "digest" -version = "0.9.0" +name = "derive_more" +version = "1.0.0-beta.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +checksum = "f7abbfc297053be59290e3152f8cbcd52c8642e0728b69ee187d991d4c1af08d" dependencies = [ - "generic-array", + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0-beta.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bba3e9872d7c58ce7ef0fcf1844fcc3e23ef2a58377b50df35dd98e42a5726e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.72", + "unicode-xid", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "const-oid", "crypto-common", "subtle", @@ -375,85 +556,104 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest 0.10.6", + "digest", "elliptic-curve", "rfc6979", "signature", - "spki", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "signature", ] [[package]] name = "ed25519-zebra" -version = "3.1.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" +checksum = "7d9ce6874da5d4415896cd45ffbc4d1cfc0c4f9c079427bd870742c30f2f65a9" dependencies = [ "curve25519-dalek", - "hashbrown 0.12.3", + "ed25519", + "hashbrown 0.14.5", "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", + "rand_core", + "sha2", "zeroize", ] [[package]] name = "either" -version = "1.8.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest 0.10.6", + "digest", "ff", "generic-array", "group", - "pkcs8", - "rand_core 0.6.4", + "rand_core", "sec1", "subtle", "zeroize", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[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", + "rand_core", "subtle", ] [[package]] -name = "forward_ref" -version = "1.0.0" +name = "fiat-crypto" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" + +[[package]] +name = "funty" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -462,9 +662,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -478,7 +678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -488,7 +688,7 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.8", ] [[package]] @@ -497,7 +697,17 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.11", + "allocator-api2", ] [[package]] @@ -518,7 +728,17 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", ] [[package]] @@ -530,62 +750,105 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "k256" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", - "sha2 0.10.6", - "signature", + "sha2", ] [[package]] name = "libc" -version = "0.2.140" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "memchr" +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.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "p256" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] [[package]] -name = "pkcs8" -version = "0.10.2" +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "ppv-lite86" @@ -593,20 +856,52 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro-crate" -version = "0.1.5" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", ] [[package]] name = "proc-macro2" -version = "1.0.60" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -616,6 +911,15 @@ name = "prost" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", +] + +[[package]] +name = "prost" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ "bytes", "prost-derive", @@ -623,40 +927,40 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.9" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" dependencies = [ "anyhow", - "itertools", + "itertools 0.12.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "prost-types" -version = "0.11.9" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" dependencies = [ - "prost", + "prost 0.12.6", ] [[package]] name = "provwasm-common" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938fe0a8914598b5aa201221ce2d9c5388412e348ea312bcba36b5077376b96d" +checksum = "f64b62100d22d0d1725330b8822d31bd63bb92eb044fc5606b8a7b3e14837ee8" dependencies = [ "cosmwasm-std", ] [[package]] name = "provwasm-mocks" -version = "2.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02175727ba6205cb5feac4724d3ab6f4e5833dddae517961bf820f6df4d3a6bd" +checksum = "8c7d48d2a4ac41401e81145df5e95e208f949a5ded894146b783f775ef3d1a30" dependencies = [ "cosmwasm-std", "provwasm-common", @@ -667,27 +971,29 @@ dependencies = [ [[package]] name = "provwasm-proc-macro" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "792736fb76e0acb3118b22e5e55e456b22c67ac3ee51bfb1f7dfde09bd954560" +checksum = "7eced1494a23e220b86475b58cf74e9f3ddb9dce2ee686662abe83bd07855f08" dependencies = [ - "itertools", + "itertools 0.11.0", "proc-macro2", + "prost-types", + "provwasm-common", "quote", - "syn 2.0.18", + "syn 1.0.109", ] [[package]] name = "provwasm-std" -version = "2.0.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d216752a4c37d7bc39ee1d397f6500fa92cf1c191c60b501038aa98cafa07c69" +checksum = "d3934ce53a63366af277c28f753302dda811eefeea61e7e5f0e95a3248b831ef" dependencies = [ - "base64", + "base64 0.21.7", "chrono", "cosmwasm-schema", "cosmwasm-std", - "prost", + "prost 0.12.6", "prost-types", "provwasm-common", "provwasm-proc-macro", @@ -719,13 +1025,19 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + [[package]] name = "rand" version = "0.8.5" @@ -734,7 +1046,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -744,15 +1056,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" - [[package]] name = "rand_core" version = "0.6.4" @@ -762,11 +1068,31 @@ 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 = "rend" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581008d2099240d37fb08d77ad713bcaec2c4d89d50b5b21a8bb1996bbab68ab" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] @@ -783,23 +1109,27 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.40" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c30f1d45d9aa61cbc8cd1eb87705470892289bb2d01943e7803b873a57404dc3" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ + "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", + "tinyvec", + "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.40" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -808,14 +1138,12 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.29.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b1b21b8760b0ef8ae5b43d40913ff711a2053cb7ff892a34facff7a6365375a" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" dependencies = [ "arrayvec", "borsh", - "bytecheck", - "byteorder", "bytes", "num-traits", "rand", @@ -824,23 +1152,32 @@ dependencies = [ "serde_json", ] +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "schemars_derive", @@ -850,14 +1187,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] @@ -868,29 +1205,28 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sec1" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", "generic-array", - "pkcs8", "subtle", "zeroize", ] [[package]] name = "semver" -version = "1.0.17" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.163" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -906,40 +1242,40 @@ dependencies = [ [[package]] name = "serde-json-wasm" -version = "0.5.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15bee9b04dd165c3f4e142628982ddde884c2022a89e8ddf99c4829bf2c3a58" +checksum = "f05da0d153dd4595bdffd5099dc0e9ce425b205ee648eb93437ff7302af8c9a5" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.72", ] [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -948,36 +1284,23 @@ dependencies = [ [[package]] name = "sha2" -version = "0.9.9" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "block-buffer 0.9.0", "cfg-if", "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "signature" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest 0.10.6", - "rand_core 0.6.4", + "digest", + "rand_core", ] [[package]] @@ -987,33 +1310,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] -name = "spki" -version = "0.7.2" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" -dependencies = [ - "base64ct", - "der", -] +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -1028,61 +1347,108 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.18" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.72", +] + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.18", + "syn 2.0.72", ] [[package]] -name = "toml" -version = "0.5.11" +name = "tinyvec" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ - "serde", + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", ] [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "uuid" -version = "1.3.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa2982af2eec27de306107c027578ff7f423d65f7250e40ce0fea8f45248b81" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "version_check" @@ -1096,8 +1462,60 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "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.5.7" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +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/Cargo.toml b/Cargo.toml index 3b98168..2a7d15b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ats-smart-contract" -version = "1.0.0" +version = "1.0.1" authors = ["Ken Talley "] edition = "2018" @@ -28,9 +28,9 @@ overflow-checks = true #backtraces = ["cosmwasm-std/backtraces"] [dependencies] -cosmwasm-std = { version = "1.3.3" } -cw-storage-plus = { version = "1.1.0" } -provwasm-std = { version = "2.0.0" } +cosmwasm-std = { version = "2.1.1" } +cw-storage-plus = { version = "2.0.0" } +provwasm-std = { version = "2.3.0" } rust_decimal = "1.29.0" schemars = "0.8.11" semver = "1.0.16" @@ -41,5 +41,5 @@ uuid = { version = "1.3.3" } prost = { version = "=0.11.9", default-features = false } [dev-dependencies] -cosmwasm-schema = { version = "1.2.6" } -provwasm-mocks = { version = "2.0.0" } +cosmwasm-schema = { version = "2.1.0" } +provwasm-mocks = { version = "2.3.0" } diff --git a/Makefile b/Makefile index 2d9159f..3d4c035 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,14 @@ optimize: $(CONTAINER_RUNTIME) run --rm -v $(CURDIR):/code:Z \ --mount type=volume,source=ats-smart-contract_cache,target=/code/target \ --mount type=volume,source=ats-smart-contract_registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.12 + cosmwasm/optimizer:0.16.0 # .PHONY: optimize-arm optimize-arm: $(CONTAINER_RUNTIME) run --rm -v $(CURDIR):/code:Z \ --mount type=volume,source=ats-smart-contract_cache,target=/code/target \ --mount type=volume,source=ats-smart-contract_registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer-arm64:0.12.12 + cosmwasm/optimizer-arm64:0.16.0 .PHONY: install install: optimize diff --git a/src/contract.rs b/src/contract.rs index d82b169..dc8c9d2 100644 --- a/src/contract.rs +++ b/src/contract.rs @@ -1143,12 +1143,9 @@ fn execute_match( ); // subtract the fees and assign to net proceeds - net_proceeds = - net_proceeds - .checked_sub(Uint128::new(fee_total)) - .map_err(|error| { - ContractError::Std(StdError::Overflow { source: error }) - })?; + net_proceeds = net_proceeds + .checked_sub(Uint128::new(fee_total)) + .map_err(|error| StdError::overflow(error))?; Some(ask_fee) } diff --git a/src/contract_info.rs b/src/contract_info.rs index b83adb9..696dc3c 100644 --- a/src/contract_info.rs +++ b/src/contract_info.rs @@ -488,14 +488,17 @@ mod tests { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("approver_1"), Addr::unchecked("approver_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![ + deps.api.addr_make("approver_1"), + deps.api.addr_make("approver_2"), + ], + executors: vec![deps.api.addr_make("exec_1"), deps.api.addr_make("exec_2")], ask_fee_info: Some(FeeInfo { - account: Addr::unchecked("ask_fee_account"), + account: deps.api.addr_make("ask_fee_account"), rate: "0.01".into(), }), bid_fee_info: Some(FeeInfo { - account: Addr::unchecked("bid_fee_account"), + account: deps.api.addr_make("bid_fee_account"), rate: "0.02".into(), }), ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -505,15 +508,20 @@ mod tests { }, )?; + let approver_3_addr = deps.api.addr_make("approver_3").to_string(); + let approver_4_addr = deps.api.addr_make("approver_4").to_string(); + let new_ask_fee_account_addr = deps.api.addr_make("new_ask_fee_account").to_string(); + let new_bid_fee_account_addr = deps.api.addr_make("new_bid_fee_account").to_string(); + // migrate with new fees migrate_contract_info( deps.as_mut(), &MigrateMsg { - approvers: Some(vec!["approver_3".into(), "approver_4".into()]), + approvers: Some(vec![approver_3_addr.clone(), approver_4_addr.clone()]), ask_fee_rate: Some("0.03".into()), - ask_fee_account: Some("new_ask_fee_account".into()), + ask_fee_account: Some(new_ask_fee_account_addr), bid_fee_rate: Some("0.04".into()), - bid_fee_account: Some("new_bid_fee_account".into()), + bid_fee_account: Some(new_bid_fee_account_addr), ask_required_attributes: Some(vec!["ask_tag_3".into(), "ask_tag_4".into()]), bid_required_attributes: Some(vec!["bid_tag_3".into(), "bid_tag_4".into()]), }, @@ -527,14 +535,17 @@ mod tests { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("approver_3"), Addr::unchecked("approver_4")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![ + deps.api.addr_make("approver_3"), + deps.api.addr_make("approver_4"), + ], + executors: vec![deps.api.addr_make("exec_1"), deps.api.addr_make("exec_2")], ask_fee_info: Some(FeeInfo { - account: Addr::unchecked("new_ask_fee_account"), + account: deps.api.addr_make("new_ask_fee_account"), rate: "0.03".into(), }), bid_fee_info: Some(FeeInfo { - account: Addr::unchecked("new_bid_fee_account"), + account: deps.api.addr_make("new_bid_fee_account"), rate: "0.04".into(), }), ask_required_attributes: vec!["ask_tag_3".into(), "ask_tag_4".into()], diff --git a/src/error.rs b/src/error.rs index b588acd..87c5d9a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -105,8 +105,6 @@ pub enum ContractError { impl From for StdError { fn from(error: ContractError) -> Self { - StdError::GenericErr { - msg: error.to_string(), - } + StdError::generic_err(error.to_string()) } } diff --git a/src/tests/execute/create_ask_tests.rs b/src/tests/execute/create_ask_tests.rs index b0d5d4d..815eb7b 100644 --- a/src/tests/execute/create_ask_tests.rs +++ b/src/tests/execute/create_ask_tests.rs @@ -79,12 +79,14 @@ mod create_ask_tests { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -205,12 +207,14 @@ mod create_ask_tests { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -918,6 +922,7 @@ mod create_ask_tests { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }], pagination: None, }, diff --git a/src/tests/execute/create_bid_tests.rs b/src/tests/execute/create_bid_tests.rs index 37e8c6c..cd09784 100644 --- a/src/tests/execute/create_bid_tests.rs +++ b/src/tests/execute/create_bid_tests.rs @@ -220,12 +220,14 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -489,12 +491,14 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -639,12 +643,14 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -789,12 +795,14 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -1145,12 +1153,14 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -1481,6 +1491,7 @@ mod create_bid_tests { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }], pagination: None, }, diff --git a/src/tests/execute/execute_modify_tests.rs b/src/tests/execute/execute_modify_tests.rs index 8f75dfb..55f93bb 100644 --- a/src/tests/execute/execute_modify_tests.rs +++ b/src/tests/execute/execute_modify_tests.rs @@ -36,6 +36,10 @@ mod execute_modify_test { Ok(_) => {} } + let exec_1_addr = deps.api.addr_make("exec_1"); + let exec_2_addr = deps.api.addr_make("exec_2"); + let exec_3_addr = deps.api.addr_make("exec_3"); + setup_test_base( &mut deps.storage, &ContractInfoV3 { @@ -44,8 +48,8 @@ mod execute_modify_test { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![exec_1_addr.clone(), exec_2_addr.clone()], + executors: vec![exec_1_addr.clone(), exec_2_addr.clone()], ask_fee_info: None, bid_fee_info: None, ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -61,7 +65,7 @@ mod execute_modify_test { Ok(contract_info) => { assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec_1"), Addr::unchecked("exec_2")]) + Vec::from([exec_1_addr.clone(), exec_2_addr.clone()]) ); assert_eq!( contract_info.convertible_base_denoms, @@ -71,14 +75,22 @@ mod execute_modify_test { } } - let exec_info = mock_info("exec_1", &[]); + let approver_1_addr = deps.api.addr_make("approver_1"); + let approver_3_addr = deps.api.addr_make("approver_3"); + let fee_account_1_addr = deps.api.addr_make("fee_acct_1"); + let fee_account_2_addr = deps.api.addr_make("fee_acct_2"); + + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec1".into(), "exec3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(fee_account_1_addr.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_2".into()), + bid_fee_account: Some(fee_account_2_addr.to_string()), ask_required_attributes: Some(vec!["ask_tag_1".into()]), bid_required_attributes: Some(vec!["bid_tag_1".into(), "bid_tag_3".into()]), }; @@ -101,23 +113,23 @@ mod execute_modify_test { ); assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec1"), Addr::unchecked("exec3")]) + Vec::from([exec_1_addr, exec_3_addr]) ); assert_eq!( contract_info.approvers, - Vec::from([Addr::unchecked("approver_1"), Addr::unchecked("approver_3")]) + Vec::from([approver_1_addr, approver_3_addr]) ); assert_eq!( contract_info.ask_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_1"), + account: fee_account_1_addr, rate: "0.123".into() }) ); assert_eq!( contract_info.bid_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_2"), + account: fee_account_2_addr, rate: "0.234".into() }) ); @@ -628,12 +640,14 @@ mod execute_modify_test { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -714,12 +728,14 @@ mod execute_modify_test { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -794,6 +810,9 @@ mod execute_modify_test { #[test] fn execute_modify_contract_add_approvers() { let mut deps = mock_provenance_dependencies(); + let approver_1_addr = deps.api.addr_make("approver_1"); + let approver_2_addr = deps.api.addr_make("approver_2"); + let approver_3_addr = deps.api.addr_make("approver_3"); let version_info = set_version_info( &mut deps.storage, @@ -815,8 +834,8 @@ mod execute_modify_test { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("approver_1"), Addr::unchecked("approver_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![approver_1_addr.clone(), approver_2_addr.clone()], + executors: vec![deps.api.addr_make("exec_1"), deps.api.addr_make("exec_2")], ask_fee_info: None, bid_fee_info: None, ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -832,7 +851,7 @@ mod execute_modify_test { Ok(contract_info) => { assert_eq!( contract_info.approvers, - Vec::from([Addr::unchecked("approver_1"), Addr::unchecked("approver_2")]) + Vec::from([approver_1_addr.clone(), approver_2_addr.clone()]) ); assert_eq!( contract_info.convertible_base_denoms, @@ -852,12 +871,14 @@ mod execute_modify_test { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -884,9 +905,12 @@ mod execute_modify_test { } // empty executors not allowed, else anyone can execute - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&deps.api.addr_make("exec_1").to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), executors: None, ask_fee_rate: None, ask_fee_account: None, @@ -908,12 +932,12 @@ mod execute_modify_test { } // empty executors not allowed, else anyone can execute - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&deps.api.addr_make("exec_1").to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { approvers: Some(vec![ - "approver_1".into(), - "approver_2".into(), - "approver_3".into(), + approver_1_addr.to_string(), + approver_2_addr.to_string(), + approver_3_addr.to_string(), ]), executors: None, ask_fee_rate: None, @@ -939,9 +963,9 @@ mod execute_modify_test { assert_eq!( contract_info.approvers, Vec::from([ - Addr::unchecked("approver_1"), - Addr::unchecked("approver_2"), - Addr::unchecked("approver_3") + approver_1_addr.clone(), + approver_2_addr.clone(), + approver_3_addr.clone(), ]) ); assert_eq!( @@ -1092,6 +1116,8 @@ mod execute_modify_test { #[test] fn execute_modify_contract_invalid_attributes_conflict() { let mut deps = mock_provenance_dependencies(); + let exec_1_addr = deps.api.addr_make("exec_1"); + let exec_2_addr = deps.api.addr_make("exec_2"); let version_info = set_version_info( &mut deps.storage, @@ -1114,8 +1140,8 @@ mod execute_modify_test { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![exec_1_addr.clone(), exec_2_addr.clone()], + executors: vec![exec_1_addr.clone(), exec_2_addr.clone()], ask_fee_info: None, bid_fee_info: None, ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -1135,19 +1161,24 @@ mod execute_modify_test { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, }, ); - let asker_info: MessageInfo = mock_info("asker", &[coin(100, "base_denom")]); + let asker_info: MessageInfo = mock_info( + &deps.api.addr_make("asker").to_string(), + &[coin(100, "base_denom")], + ); let create_ask_msg = ExecuteMsg::CreateAsk { base: "base_denom".into(), id: "ab5f5a62-f6fc-46d1-aa84-51ccc51ec367".into(), @@ -1172,7 +1203,7 @@ mod execute_modify_test { Ok(contract_info) => { assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec_1"), Addr::unchecked("exec_2")]) + Vec::from([exec_1_addr.clone(), exec_2_addr.clone()]) ); assert_eq!( contract_info.convertible_base_denoms, @@ -1183,7 +1214,7 @@ mod execute_modify_test { } // ask_required_attributes conflict with active asks - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { approvers: Some(vec!["approver_1".into(), "approver_3".into()]), executors: Some(vec!["exec_1".into(), "exec_3".into()]), @@ -1206,7 +1237,7 @@ mod execute_modify_test { }, } - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { approvers: Some(vec!["approver_1".into(), "approver_3".into()]), executors: Some(vec!["exec_1".into(), "exec_3".into()]), @@ -1229,7 +1260,7 @@ mod execute_modify_test { }, } - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { approvers: Some(vec!["approver_1".into(), "approver_3".into()]), executors: Some(vec!["exec_1".into(), "exec_3".into()]), @@ -1256,7 +1287,7 @@ mod execute_modify_test { }, } - let cancel_info: MessageInfo = mock_info("asker", &[]); + let cancel_info: MessageInfo = mock_info(&deps.api.addr_make("asker").to_string(), &[]); let cancel_ask_msg = ExecuteMsg::CancelAsk { id: "ab5f5a62-f6fc-46d1-aa84-51ccc51ec367".into(), }; @@ -1271,14 +1302,23 @@ mod execute_modify_test { Err(error) => panic!("unexpected error: {:?}", error), } - let exec_info = mock_info("exec_1", &[]); + let approver_1_addr = deps.api.addr_make("approver_1"); + let approver_3_addr = deps.api.addr_make("approver_3"); + let exec_3_addr = deps.api.addr_make("exec_3"); + let ask_fee_account = deps.api.addr_make("fee_acct_1"); + let bid_fee_account = deps.api.addr_make("fee_acct_1"); + + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec1".into(), "exec3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(ask_fee_account.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_2".into()), + bid_fee_account: Some(bid_fee_account.to_string()), ask_required_attributes: Some(vec!["ask_tag_1".into()]), bid_required_attributes: Some(vec!["bid_tag_1".into(), "bid_tag_3".into()]), }; @@ -1301,23 +1341,23 @@ mod execute_modify_test { ); assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec1"), Addr::unchecked("exec3")]) + Vec::from([exec_1_addr.clone(), exec_3_addr.clone()]) ); assert_eq!( contract_info.approvers, - Vec::from([Addr::unchecked("approver_1"), Addr::unchecked("approver_3")]) + Vec::from([approver_1_addr.clone(), approver_3_addr.clone()]) ); assert_eq!( contract_info.ask_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_1"), + account: ask_fee_account.clone(), rate: "0.123".into() }) ); assert_eq!( contract_info.bid_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_2"), + account: bid_fee_account.clone(), rate: "0.234".into() }) ); @@ -1350,6 +1390,10 @@ mod execute_modify_test { Ok(_) => {} } + let exec_1_addr = deps.api.addr_make("exec_1"); + let exec_2_addr = deps.api.addr_make("exec_2"); + let exec_3_addr = deps.api.addr_make("exec_3"); + setup_test_base( &mut deps.storage, &ContractInfoV3 { @@ -1358,8 +1402,8 @@ mod execute_modify_test { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![exec_1_addr.clone(), exec_2_addr.clone()], + executors: vec![exec_1_addr.clone(), exec_2_addr.clone()], ask_fee_info: None, bid_fee_info: None, ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -1375,7 +1419,7 @@ mod execute_modify_test { Ok(contract_info) => { assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec_1"), Addr::unchecked("exec_2")]) + Vec::from([exec_1_addr.clone(), exec_2_addr.clone()]) ); assert_eq!( contract_info.convertible_base_denoms, @@ -1385,14 +1429,20 @@ mod execute_modify_test { } } - let exec_info = mock_info("exec_1", &[]); + let fee_acct_1_addr = deps.api.addr_make("fee_acct_1"); + let fee_acct_2_addr = deps.api.addr_make("fee_acct_2"); + + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec_1".into(), "exec_3".into()]), + approvers: Some(vec![ + deps.api.addr_make("approver_1").to_string(), + deps.api.addr_make("approver_3").to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(fee_acct_1_addr.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_2".into()), + bid_fee_account: Some(fee_acct_2_addr.to_string()), ask_required_attributes: None, bid_required_attributes: Some(vec![]), }; @@ -1422,7 +1472,7 @@ mod execute_modify_test { assert_eq!( contract_info.ask_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_1"), + account: fee_acct_1_addr, rate: "0.123".to_string(), }) ); @@ -1491,12 +1541,14 @@ mod execute_modify_test { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -1550,12 +1602,14 @@ mod execute_modify_test { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -1669,12 +1723,14 @@ mod execute_modify_test { value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, @@ -1745,6 +1801,9 @@ mod execute_modify_test { #[test] fn execute_modify_contract_invalid_conflicting_bid_fee() { let mut deps = mock_provenance_dependencies(); + let exec_1_addr = deps.api.addr_make("exec_1"); + let exec_2_addr = deps.api.addr_make("exec_2"); + let exec_3_addr = deps.api.addr_make("exec_3"); let version_info = set_version_info( &mut deps.storage, @@ -1767,8 +1826,8 @@ mod execute_modify_test { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![exec_1_addr.clone(), exec_2_addr.clone()], + executors: vec![exec_1_addr.clone(), exec_2_addr.clone()], ask_fee_info: None, bid_fee_info: None, ask_required_attributes: vec![], @@ -1784,7 +1843,7 @@ mod execute_modify_test { Ok(contract_info) => { assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec_1"), Addr::unchecked("exec_2")]) + Vec::from([exec_1_addr.clone(), exec_2_addr.clone()]) ); assert_eq!( contract_info.convertible_base_denoms, @@ -1804,31 +1863,36 @@ mod execute_modify_test { value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_3".to_string(), value: "bid_tag_3_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_4".to_string(), value: "bid_tag_4_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ], pagination: None, }, ); - let bidder_info = mock_info("bidder", &[coin(200, "quote_1")]); + let bidder_addr = deps.api.addr_make("bidder"); + let bidder_info = mock_info(&bidder_addr.to_string(), &[coin(200, "quote_1")]); let create_bid_msg = ExecuteMsg::CreateBid { id: "ab5f5a62-f6fc-46d1-aa84-51ccc51ec468".into(), base: "base_denom".to_string(), @@ -1849,14 +1913,22 @@ mod execute_modify_test { Err(error) => panic!("unexpected error: {:?}", error), } - let exec_info = mock_info("exec_1", &[]); + let approver_1_addr = deps.api.addr_make("approver_1"); + let approver_3_addr = deps.api.addr_make("approver_3"); + let fee_acct_1_addr = deps.api.addr_make("fee_acct_1"); + let fee_acct_2_addr = deps.api.addr_make("fee_acct_2"); + + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec_1".into(), "exec_3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(fee_acct_1_addr.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_1".into()), + bid_fee_account: Some(fee_acct_1_addr.to_string()), ask_required_attributes: None, bid_required_attributes: Some(vec![ "bid_tag_1".into(), @@ -1876,14 +1948,17 @@ mod execute_modify_test { }, } - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec_1".into(), "exec_3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(fee_acct_1_addr.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_1".into()), + bid_fee_account: Some(fee_acct_1_addr.to_string()), ask_required_attributes: None, bid_required_attributes: None, }; @@ -1899,7 +1974,7 @@ mod execute_modify_test { }, } - let cancel_info: MessageInfo = mock_info("bidder", &[]); + let cancel_info: MessageInfo = mock_info(&bidder_addr.to_string(), &[]); let cancel_bid_msg = ExecuteMsg::CancelBid { id: "ab5f5a62-f6fc-46d1-aa84-51ccc51ec468".into(), }; @@ -1914,14 +1989,17 @@ mod execute_modify_test { Err(error) => panic!("unexpected error: {:?}", error), } - let exec_info = mock_info("exec_1", &[]); + let exec_info = mock_info(&exec_1_addr.to_string(), &[]); let modify_contract_msg = ExecuteMsg::ModifyContract { - approvers: Some(vec!["approver_1".into(), "approver_3".into()]), - executors: Some(vec!["exec1".into(), "exec3".into()]), + approvers: Some(vec![ + approver_1_addr.to_string(), + approver_3_addr.to_string(), + ]), + executors: Some(vec![exec_1_addr.to_string(), exec_3_addr.to_string()]), ask_fee_rate: Some("0.123".into()), - ask_fee_account: Some("fee_acct_1".into()), + ask_fee_account: Some(fee_acct_1_addr.to_string()), bid_fee_rate: Some("0.234".into()), - bid_fee_account: Some("fee_acct_2".into()), + bid_fee_account: Some(fee_acct_2_addr.to_string()), ask_required_attributes: Some(vec!["ask_tag_1".into()]), bid_required_attributes: Some(vec!["bid_tag_1".into(), "bid_tag_3".into()]), }; @@ -1944,23 +2022,23 @@ mod execute_modify_test { ); assert_eq!( contract_info.executors, - Vec::from([Addr::unchecked("exec1"), Addr::unchecked("exec3")]) + Vec::from([exec_1_addr, exec_3_addr]) ); assert_eq!( contract_info.approvers, - Vec::from([Addr::unchecked("approver_1"), Addr::unchecked("approver_3")]) + Vec::from([approver_1_addr, approver_3_addr]) ); assert_eq!( contract_info.ask_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_1"), + account: fee_acct_1_addr.clone(), rate: "0.123".into() }) ); assert_eq!( contract_info.bid_fee_info, Some(FeeInfo { - account: Addr::unchecked("fee_acct_2"), + account: fee_acct_2_addr.clone(), rate: "0.234".into() }) ); diff --git a/src/tests/instantiate/instantiate_tests.rs b/src/tests/instantiate/instantiate_tests.rs index 2c11b4b..cef44da 100644 --- a/src/tests/instantiate/instantiate_tests.rs +++ b/src/tests/instantiate/instantiate_tests.rs @@ -20,12 +20,18 @@ mod instantiate_tests { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec!["approver_1".into(), "approver_2".into()], - executors: vec!["exec_1".into(), "exec_2".into()], + approvers: vec![ + deps.api.addr_make("approver_1").to_string(), + deps.api.addr_make("approver_2").to_string(), + ], + executors: vec![ + deps.api.addr_make("exec_1").to_string(), + deps.api.addr_make("exec_2").to_string(), + ], ask_fee_rate: Some("0.01".into()), - ask_fee_account: Some("ask_fee_account".into()), + ask_fee_account: Some(deps.api.addr_make("ask_fee_account").to_string()), bid_fee_rate: Some("0.02".into()), - bid_fee_account: Some("bid_fee_account".into()), + bid_fee_account: Some(deps.api.addr_make("bid_fee_account").to_string()), ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], bid_required_attributes: vec!["bid_tag_1".into(), "bid_tag_2".into()], price_precision: Uint128::new(2), @@ -45,14 +51,17 @@ mod instantiate_tests { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec![Addr::unchecked("approver_1"), Addr::unchecked("approver_2")], - executors: vec![Addr::unchecked("exec_1"), Addr::unchecked("exec_2")], + approvers: vec![ + deps.api.addr_make("approver_1"), + deps.api.addr_make("approver_2"), + ], + executors: vec![deps.api.addr_make("exec_1"), deps.api.addr_make("exec_2")], ask_fee_info: Some(FeeInfo { - account: Addr::unchecked("ask_fee_account"), + account: deps.api.addr_make("ask_fee_account"), rate: "0.01".into(), }), bid_fee_info: Some(FeeInfo { - account: Addr::unchecked("bid_fee_account"), + account: deps.api.addr_make("bid_fee_account"), rate: "0.02".into(), }), ask_required_attributes: vec!["ask_tag_1".into(), "ask_tag_2".into()], @@ -136,8 +145,14 @@ mod instantiate_tests { base_denom: "base_denom".into(), convertible_base_denoms: vec!["con_base_1".into(), "con_base_2".into()], supported_quote_denoms: vec!["quote_1".into(), "quote_2".into()], - approvers: vec!["approver_1".into(), "approver_2".into()], - executors: vec!["exec_1".into(), "exec_2".into()], + approvers: vec![ + deps.api.addr_make("approver_1").to_string(), + deps.api.addr_make("approver_2").to_string(), + ], + executors: vec![ + deps.api.addr_make("exec_1").to_string(), + deps.api.addr_make("exec_2").to_string(), + ], ask_fee_rate: None, ask_fee_account: None, bid_fee_rate: None, diff --git a/src/tests/test_setup_utils.rs b/src/tests/test_setup_utils.rs index 02fd75e..09b9244 100644 --- a/src/tests/test_setup_utils.rs +++ b/src/tests/test_setup_utils.rs @@ -61,12 +61,14 @@ pub fn set_default_required_attributes( value: "ask_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "ask_tag_2".to_string(), value: "ask_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ]) } @@ -77,12 +79,14 @@ pub fn set_default_required_attributes( value: "bid_tag_1_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, Attribute { name: "bid_tag_2".to_string(), value: "bid_tag_2_value".as_bytes().to_vec(), attribute_type: AttributeType::String.into(), address: "".to_string(), + expiration_date: None, }, ]) } diff --git a/src/tests/test_utils.rs b/src/tests/test_utils.rs index 71c5d41..b75816b 100644 --- a/src/tests/test_utils.rs +++ b/src/tests/test_utils.rs @@ -63,7 +63,7 @@ pub fn setup_asset_marker( QueryMarkerResponse { marker: Some(Any { type_url: "/provenance.marker.v1.MarkerAccount".to_string(), - value: expected_marker.encode_to_vec(), + value: expected_marker.to_proto_bytes(), }), } } diff --git a/src/version_info.rs b/src/version_info.rs index 5f252c3..177f120 100644 --- a/src/version_info.rs +++ b/src/version_info.rs @@ -45,6 +45,7 @@ mod tests { use crate::version_info::{get_version_info, set_version_info, VersionInfoV1}; use cosmwasm_std::StdError; use provwasm_mocks::mock_provenance_dependencies; + use std::any::Any; #[test] pub fn set_version_info_with_valid_data() { @@ -81,8 +82,11 @@ mod tests { panic!("expected error, but ok") } Err(error) => match error { - ContractError::Std(StdError::NotFound { kind }) => { - assert_eq!(kind, "ats_smart_contract::version_info::VersionInfoV1"); + ContractError::Std(StdError::NotFound { kind, backtrace: _ }) => { + assert_eq!( + kind.contains("ats_smart_contract::version_info::VersionInfoV1"), + true + ); } _ => panic!("unexpected error: {:?}", error), },