diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2ffe38b..42587da0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/tutorial_test.sh" @@ -56,7 +56,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/attrs_test.sh" @@ -77,7 +77,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/marker_test.sh" @@ -98,7 +98,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/msgfees_test.sh" @@ -119,7 +119,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/name_test.sh" @@ -140,7 +140,7 @@ jobs: # uses: provenance-io/provenance-testing-action@v1.2.0 # with: # github_token: ${{ secrets.GITHUB_TOKEN }} -# provenance_version: "v1.17.0-rc1" +# provenance_version: "v1.17.1" # smart_contract_action_version: "v1.2.0" # test_script: "./scripts/gh-action-test/nft_test.sh" @@ -161,7 +161,7 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/scope_test.sh" @@ -182,6 +182,6 @@ jobs: uses: provenance-io/provenance-testing-action@v1.2.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} - provenance_version: "v1.17.0-rc1" + provenance_version: "v1.17.1" smart_contract_action_version: "v1.2.0" test_script: "./scripts/gh-action-test/trigger_test.sh" diff --git a/CHANGELOG.md b/CHANGELOG.md index 79d58e16..34dd30e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ ## Unreleased changes * Add wasm message types ([#133](https://github.com/provenance-io/provwasm/issues/133)) +* Bump to Provenance 1.17.1 ([#135](https://github.com/provenance-io/provwasm/issues/135)) +* Add ibc message types ([#136](https://github.com/provenance-io/provwasm/issues/136)) +* Update contracts to use `cosmwasm/optimzer` ([#140](https://github.com/provenance-io/provwasm/issues/140)) ## Releases diff --git a/Cargo.lock b/Cargo.lock index f76da0d4..d5d975d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -24,9 +24,24 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" + +[[package]] +name = "attrs" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "serde_json", + "thiserror", +] [[package]] name = "autocfg" @@ -40,6 +55,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -48,9 +69,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f1e31e207a6b8fb791a38ea3105e6cb541f55e4d029902d3039a4ad07cc4105" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -67,6 +88,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "bitflags" version = "1.3.2" @@ -133,31 +160,32 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "cosmwasm-crypto" -version = "1.2.5" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75836a10cb9654c54e77ee56da94d592923092a10b369cdb0dbd56acefc16340" +checksum = "8ed6aa9f904de106fa16443ad14ec2abe75e94ba003bb61c681c0e43d4c58d2a" dependencies = [ "digest 0.10.7", + "ecdsa 0.16.9", "ed25519-zebra", - "k256", + "k256 0.13.3", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.2.5" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9f7f0e51bfc7295f7b2664fe8513c966428642aa765dad8a74acdab5e0c773" +checksum = "bc5e72e330bd3bdab11c52b5ecbdeb6a8697a004c57964caeb5d876f0b088b3c" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.2.5" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f00b363610218eea83f24bbab09e1a7c3920b79f068334fdfcc62f6129ef9fc" +checksum = "e0864db0a1e0ba2abd35d1105d0487e779538f616daa0338697315cc1601bf24" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -168,9 +196,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.2.5" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae38f909b2822d32b275c9e2db9728497aa33ffe67dd463bc67c6a3b7092785c" +checksum = "2cd0f686ff907612ed63fdff97906b3eafe169d560ebd428e92ef400fb56479f" dependencies = [ "proc-macro2", "quote", @@ -179,9 +207,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.2.5" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49b85345e811c8e80ec55d0d091e4fcb4f00f97ab058f9be5f614c444a730cb" +checksum = "197ed654c41885e2d76b23bff8db11b0f9745bfdede0909de9daa564edb19187" dependencies = [ "base64 0.13.1", "cosmwasm-crypto", @@ -192,7 +220,7 @@ dependencies = [ "schemars", "serde", "serde-json-wasm", - "sha2 0.10.6", + "sha2 0.10.8", "thiserror", "uint", ] @@ -224,6 +252,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -247,6 +287,113 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cw-address-like" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "451a4691083a88a3c0630a8a88799e9d4cd6679b7ce8ff22b8da2873ff31d380" +dependencies = [ + "cosmwasm-std", +] + +[[package]] +name = "cw-multi-test" +version = "0.16.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "127c7bb95853b8e828bdab97065c81cb5ddc20f7339180b61b2300565aaa99d1" +dependencies = [ + "anyhow", + "cosmwasm-std", + "cw-storage-plus", + "cw-utils", + "derivative", + "itertools 0.10.5", + "k256 0.11.6", + "prost 0.9.0", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-ownable" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093dfb4520c48b5848274dd88ea99e280a04bc08729603341c7fb0d758c74321" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-address-like", + "cw-ownable-derive", + "cw-storage-plus", + "cw-utils", + "thiserror", +] + +[[package]] +name = "cw-ownable-derive" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d3bf2e0f341bb6cc100d7d441d31cf713fbd3ce0c511f91e79f14b40a889af" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cw-storage-plus" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f0e92a069d62067f3472c62e30adedb4cab1754725c0f2a682b3128d2bf3c79" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "cw-utils" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "cw2" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw721" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c4d286625ccadc957fe480dd3bdc54ada19e0e6b5b9325379db3130569e914" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-utils", + "schemars", + "serde", +] + [[package]] name = "der" version = "0.6.1" @@ -257,6 +404,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "derivative" version = "2.2.0" @@ -284,6 +441,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -306,10 +464,24 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", ] [[package]] @@ -339,16 +511,35 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", + "generic-array", + "group 0.12.1", + "pkcs8 0.9.0", + "rand_core 0.6.4", + "sec1 0.3.0", + "subtle", + "zeroize", +] + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", "digest 0.10.7", - "ff", + "ff 0.13.0", "generic-array", - "group", - "pkcs8", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1", + "sec1 0.7.3", "subtle", "zeroize", ] @@ -406,6 +597,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "ff" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +dependencies = [ + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -426,6 +627,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -451,7 +653,18 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ - "ff", + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", "rand_core 0.6.4", "subtle", ] @@ -498,6 +711,30 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "ibc-local" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "ibc-remote" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-std", + "schemars", + "serde", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -564,6 +801,12 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +[[package]] +name = "jsonformat" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a9e3ffc93bf9ba3d42139380ec3255ff6006fdfb1ee3b75ca31c3e42d784296" + [[package]] name = "k256" version = "0.11.6" @@ -571,9 +814,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.8", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", + "once_cell", + "sha2 0.10.8", + "signature 2.2.0", ] [[package]] @@ -603,18 +860,87 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "marker" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "prost 0.11.9", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "msgfees" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "multimap" version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "name" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "jsonformat", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "nft" +version = "2.2.0" +dependencies = [ + "bech32", + "cosmwasm-schema", + "cosmwasm-std", + "cw-multi-test", + "cw-ownable", + "cw-storage-plus", + "cw-utils", + "cw2", + "cw721", + "hex", + "provwasm-mocks", + "provwasm-std", + "schemars", + "semver", + "serde", + "serde_json", + "sha2 0.10.8", + "thiserror", + "uuid", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -636,9 +962,9 @@ dependencies = [ [[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" @@ -662,8 +988,18 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" dependencies = [ - "der", - "spki", + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.3", ] [[package]] @@ -688,23 +1024,33 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.5" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617feabb81566b593beb4886fb8c1f38064169dae4dccad0e3220160c3b37203" +checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" dependencies = [ "proc-macro2", - "syn 2.0.16", + "syn 2.0.48", ] [[package]] name = "proc-macro2" -version = "1.0.58" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" +dependencies = [ + "bytes", + "prost-derive 0.9.0", +] + [[package]] name = "prost" version = "0.11.9" @@ -712,7 +1058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive", + "prost-derive 0.11.9", ] [[package]] @@ -729,7 +1075,7 @@ dependencies = [ "multimap", "petgraph", "prettyplease 0.1.25", - "prost", + "prost 0.11.9", "prost-types", "regex", "syn 1.0.109", @@ -737,6 +1083,19 @@ dependencies = [ "which", ] +[[package]] +name = "prost-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "prost-derive" version = "0.11.9" @@ -756,7 +1115,7 @@ version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost", + "prost 0.11.9", ] [[package]] @@ -767,15 +1126,15 @@ dependencies = [ "itertools 0.11.0", "log", "pretty_env_logger", - "prettyplease 0.2.5", + "prettyplease 0.2.9", "proc-macro2", - "prost", + "prost 0.11.9", "prost-build", "prost-types", "quote", "regex", "rustix", - "syn 2.0.16", + "syn 2.0.48", "walkdir", ] @@ -804,11 +1163,11 @@ dependencies = [ "cosmwasm-std", "itertools 0.11.0", "proc-macro2", - "prost", + "prost 0.11.9", "provwasm-common", "quote", "serde", - "syn 2.0.16", + "syn 2.0.48", "trybuild", ] @@ -816,11 +1175,11 @@ dependencies = [ name = "provwasm-std" version = "2.2.0" dependencies = [ - "base64 0.21.1", + "base64 0.21.7", "chrono", "cosmwasm-schema", "cosmwasm-std", - "prost", + "prost 0.11.9", "prost-types", "provwasm-common", "provwasm-proc-macro", @@ -830,11 +1189,24 @@ dependencies = [ "strum_macros", ] +[[package]] +name = "provwasm-tutorial" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-std", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "quote" -version = "1.0.27" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -886,11 +1258,21 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" dependencies = [ - "crypto-bigint", + "crypto-bigint 0.4.9", "hmac", "zeroize", ] +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + [[package]] name = "rustix" version = "0.37.26" @@ -928,9 +1310,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -940,9 +1322,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -950,25 +1332,60 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "scope" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "serde_json", + "thiserror", +] + [[package]] name = "sec1" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ - "base16ct", - "der", + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", "generic-array", - "pkcs8", + "pkcs8 0.10.2", "subtle", "zeroize", ] +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + [[package]] name = "serde" -version = "1.0.163" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -993,13 +1410,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.163" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.48", ] [[package]] @@ -1015,9 +1432,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -1039,9 +1456,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -1058,6 +1475,16 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + [[package]] name = "spki" version = "0.6.0" @@ -1065,7 +1492,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ "base64ct", - "der", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.8", ] [[package]] @@ -1084,7 +1521,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.16", + "syn 2.0.48", ] [[package]] @@ -1106,9 +1543,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.16" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -1139,22 +1576,37 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.16", + "syn 2.0.48", +] + +[[package]] +name = "trigger" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "jsonformat", + "provwasm-mocks", + "provwasm-std", + "schemars", + "serde", + "thiserror", ] [[package]] @@ -1197,6 +1649,12 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +[[package]] +name = "uuid" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" + [[package]] name = "version_check" version = "0.9.4" @@ -1395,6 +1853,6 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Cargo.toml b/Cargo.toml index fac8b3f7..4977f4ce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,62 @@ [workspace] -members = ["packages/proto-build", "packages/provwasm-common", "packages/provwasm-proc-macro", "packages/provwasm-std", "packages/provwasm-mocks"] -exclude = ["contracts"] +resolver = "2" +members = [ + "packages/proto-build", + "packages/provwasm-common", + "packages/provwasm-proc-macro", + "packages/provwasm-std", + "packages/provwasm-mocks", + "contracts/attrs", + "contracts/ibc/local", + "contracts/ibc/remote", + "contracts/marker", + "contracts/msgfees", + "contracts/name", + "contracts/nft", + "contracts/scope", + "contracts/trigger", + "contracts/tutorial" +] +exclude = [ + "contracts/template" +] + +[workspace.package] +version = "2.2.0" +repository = "https://github.com/provenance-io/provwasm" +edition = "2021" +license = "Apache-2.0" + +[workspace.dependencies] +### CosmWasm +cosmwasm-schema = { version = "=1.2.8" } +cosmwasm-std = { version = "=1.2.8", default-features = false } +cw-storage-plus = { version = "=1.1.0" } + +### ProvWasm +provwasm-proto-build = { version = "0.1.0", path = "packages/proto-build" } +provwasm-common = { version = "0.1.0", path = "packages/provwasm-common" } +provwasm-mocks = { version = "2.2.0", path = "packages/provwasm-mocks" } +provwasm-proc-macro = { version = "0.1.0", path = "packages/provwasm-proc-macro" } +provwasm-std = { version = "2.2.0", path = "packages/provwasm-std" } + +base64 = "=0.21.7" +chrono = { version = "=0.4.33", default-features = false } +prost = { version = "=0.11.9", default-features = false, features = ["prost-derive"] } +prost-types = { version = "=0.11.9", default-features = false } +prost-build = "=0.11.9" +schemars = "=0.8.16" +serde = { version = "=1.0.196", default-features = false, features = ["derive"] } +serde_json = { version = "=1.0.113", features = ["std"] } +thiserror = { version = "=1.0.56" } [profile.release] opt-level = 3 debug = false +rpath = false +lto = true debug-assertions = false codegen-units = 1 -incremental = false \ No newline at end of file +panic = 'abort' +incremental = false +overflow-checks = true \ No newline at end of file diff --git a/Makefile b/Makefile index 91d45c43..fe3bcacf 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,10 @@ optimize-tutorial: attrs: @make -C contracts/attrs +.PHONY: ibc +attrs: + @make -C contracts/ibc + .PHONY: marker marker: @make -C contracts/marker @@ -38,57 +42,18 @@ msgfees: name: @make -C contracts/name +.PHONY: nft +name: + @make -C contracts/nft + .PHONY: scope scope: @make -C contracts/scope -.PHONY: build-release-zip -build-release-zip: tutorial - zip provwasm_tutorial.zip ./contracts/tutorial/artifacts/provwasm_tutorial.wasm - -PROVENANCE_TEST_VERSION = "v1.8.0" - -.PHONY: test-tutorial -test-tutorial: tutorial optimize-tutorial - docker rm -f test_container || true - docker pull provenanceio/provenance-testing-action - docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/tutorial_test.sh" "$(PROVENANCE_TEST_VERSION)" - docker cp ./scripts test_container:/scripts - docker cp ./contracts test_container:/go/contracts - docker start test_container - -.PHONY: test-attrs -test-attrs: attrs - docker rm -f test_container || true - docker pull provenanceio/provenance-testing-action - docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/attrs_test.sh" "$(PROVENANCE_TEST_VERSION)" - docker cp ./scripts test_container:/scripts - docker cp ./contracts test_container:/go/contracts - docker start test_container - -.PHONY: test-marker -test-marker: marker - docker rm -f test_container || true - docker pull provenanceio/provenance-testing-action - docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/marker_test.sh" "$(PROVENANCE_TEST_VERSION)" - docker cp ./scripts test_container:/scripts - docker cp ./contracts test_container:/go/contracts - docker start test_container - -.PHONY: test-name -test-name: name - docker rm -f test_container || true - docker pull provenanceio/provenance-testing-action - docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/name_test.sh" "$(PROVENANCE_TEST_VERSION)" - docker cp ./scripts test_container:/scripts - docker cp ./contracts test_container:/go/contracts - docker start test_container +.PHONY: template +scope: + @make -C contracts/template -.PHONY: test-scope -test-scope: scope - docker rm -f test_container || true - docker pull provenanceio/provenance-testing-action - docker create --name test_container provenanceio/provenance-testing-action --entrypoint "/scripts/scope_test.sh" "$(PROVENANCE_TEST_VERSION)" - docker cp ./scripts test_container:/scripts - docker cp ./contracts test_container:/go/contracts - docker start test_container \ No newline at end of file +.PHONY: trigger +scope: + @make -C contracts/trigger diff --git a/RELEASE_CHANGELOG.md b/RELEASE_CHANGELOG.md index 57aba577..560c20f9 100644 --- a/RELEASE_CHANGELOG.md +++ b/RELEASE_CHANGELOG.md @@ -1,4 +1,6 @@ -### [v2.1.0](https://github.com/provenance-io/provwasm/tree/v2.1.0) +### [v2.2.0](https://github.com/provenance-io/provwasm/tree/v2.2.0) -* Add trigger module message types ([#120](https://github.com/provenance-io/provwasm/issues/120)) -* Add exchange module message types ([#127](https://github.com/provenance-io/provwasm/issues/127)) \ No newline at end of file +* Add wasm message types ([#133](https://github.com/provenance-io/provwasm/issues/133)) +* Bump to Provenance 1.17.1 ([#135](https://github.com/provenance-io/provwasm/issues/135)) +* Add ibc message types ([#136](https://github.com/provenance-io/provwasm/issues/136)) +* Update contracts to use `cosmwasm/optimzer` ([#140](https://github.com/provenance-io/provwasm/issues/140)) diff --git a/contracts/README.md b/contracts/README.md index dfbf35ba..c888d5f7 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -6,6 +6,11 @@ Rust bindings. ## Listing - [Attributes](attrs/README.md) - manage account attributes. -- [Markers](marker/README.md) - manage marker accounts. -- [Names](name/README.md) - bind names to addresses. +- [IBC](ibc/README.md) - ibc contracts for local and remote chains. +- [Marker](marker/README.md) - manage marker accounts. +- [Msg Fees](msgfees/README.md) - apply msg fees to tx. +- [Name](name/README.md) - bind names to addresses. +- [NFT](nft/README.md) - CW721 NFT contract utilizing the metadata module. - [Metadata](scope/README.md) - manage metadata and scopes. +- [Template](template/README.md) - example contract that serves as a template. +- [Tutorial](tutorial/README.md) - complete contract created from the tutorial. diff --git a/contracts/attrs/Cargo.lock b/contracts/attrs/Cargo.lock index 2cb3e40b..a434f2c5 100644 --- a/contracts/attrs/Cargo.lock +++ b/contracts/attrs/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" version = "0.7.6" @@ -13,12 +28,32 @@ dependencies = [ "version_check", ] +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + [[package]] name = "anyhow" version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +[[package]] +name = "async-trait" +version = "0.1.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + [[package]] name = "attrs" version = "2.2.0" @@ -28,6 +63,7 @@ dependencies = [ "cosmwasm-storage", "provwasm-mocks", "provwasm-std", + "provwasm-test-tube", "schemars", "serde", "serde_json", @@ -40,12 +76,33 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -54,9 +111,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -64,6 +121,59 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bindgen" +version = "0.68.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +dependencies = [ + "bitflags 2.4.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.16", + "which", +] + +[[package]] +name = "bip32" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" +dependencies = [ + "bs58", + "hmac", + "k256 0.13.3", + "once_cell", + "pbkdf2", + "rand_core 0.6.4", + "ripemd", + "sha2 0.10.6", + "subtle", + "zeroize", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "block-buffer" version = "0.9.0" @@ -82,6 +192,21 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "sha2 0.10.6", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + [[package]] name = "byteorder" version = "1.4.3" @@ -93,6 +218,27 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -110,21 +256,80 @@ dependencies = [ "num-traits", ] +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "const-oid" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cosmos-sdk-proto" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" +dependencies = [ + "prost", + "prost-types", + "tendermint-proto", +] + +[[package]] +name = "cosmrs" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af13955d6f356272e6def9ff5e2450a7650df536d8934f47052a20c76513d2f6" +dependencies = [ + "bip32", + "cosmos-sdk-proto", + "ecdsa 0.16.9", + "eyre", + "getrandom", + "k256 0.13.3", + "rand_core 0.6.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror", +] + [[package]] name = "cosmwasm-crypto" version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75836a10cb9654c54e77ee56da94d592923092a10b369cdb0dbd56acefc16340" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "ed25519-zebra", - "k256", + "k256 0.11.6", "rand_core 0.6.4", "thiserror", ] @@ -219,6 +424,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -229,6 +446,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct", +] + [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -242,6 +468,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + [[package]] name = "der" version = "0.6.1" @@ -252,6 +491,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" + [[package]] name = "derivative" version = "2.2.0" @@ -274,11 +529,12 @@ dependencies = [ [[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", + "const-oid", "crypto-common", "subtle", ] @@ -295,10 +551,47 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -308,7 +601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -328,562 +621,2063 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", - "digest 0.10.6", - "ff", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", + "digest 0.10.7", + "ff 0.12.1", "generic-array", - "group", - "pkcs8", + "group 0.12.1", + "pkcs8 0.9.0", "rand_core 0.6.4", - "sec1", + "sec1 0.3.0", "subtle", "zeroize", ] [[package]] -name = "ff" -version = "0.12.1" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff 0.13.0", + "generic-array", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", + "sec1 0.7.3", "subtle", + "zeroize", ] [[package]] -name = "forward_ref" -version = "1.0.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "generic-array" -version = "0.14.7" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "typenum", - "version_check", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "getrandom" -version = "0.2.9" +name = "eyre" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" dependencies = [ - "cfg-if", - "libc", - "wasi", + "indenter", + "once_cell", ] [[package]] -name = "group" +name = "ff" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "ff", "rand_core 0.6.4", "subtle", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "ff" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "ahash", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "heck" -version = "0.4.1" +name = "flex-error" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] [[package]] -name = "hex" -version = "0.4.3" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "hmac" -version = "0.12.1" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "digest 0.10.6", + "percent-encoding", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "forward_ref" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ - "either", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "itertools" -version = "0.11.0" +name = "futures-channel" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ - "either", + "futures-core", + "futures-sink", ] [[package]] -name = "itoa" -version = "1.0.6" +name = "futures-core" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "k256" -version = "0.11.6" +name = "futures-executor" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "libc" -version = "0.2.141" +name = "futures-io" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] -name = "num-integer" -version = "0.1.45" +name = "futures-macro" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "autocfg", - "num-traits", + "proc-macro2", + "quote", + "syn 2.0.16", ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "futures-sink" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] -name = "once_cell" -version = "1.17.1" +name = "futures-task" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-proxy" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" +dependencies = [ + "bytes", + "futures", + "headers", + "http", + "hyper", + "hyper-rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki", + "webpki-roots", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "js-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +dependencies = [ + "cfg-if", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.6", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", + "once_cell", + "sha2 0.10.6", + "signature 2.2.0", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "peg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.3", +] + +[[package]] +name = "prettyplease" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" +dependencies = [ + "proc-macro2", + "syn 2.0.16", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "provwasm-common" +version = "0.1.0" +dependencies = [ + "cosmwasm-std", +] + +[[package]] +name = "provwasm-mocks" +version = "2.2.0" +dependencies = [ + "cosmwasm-std", + "provwasm-common", + "provwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "provwasm-proc-macro" +version = "0.1.0" +dependencies = [ + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "provwasm-std" +version = "2.2.0" +dependencies = [ + "base64 0.21.7", + "chrono", + "cosmwasm-schema", + "cosmwasm-std", + "prost", + "prost-types", + "provwasm-common", + "provwasm-proc-macro", + "schemars", + "serde", + "serde-cw-value", + "strum_macros", +] + +[[package]] +name = "provwasm-test-tube" +version = "0.1.0" +dependencies = [ + "base64 0.21.7", + "bindgen", + "cosmrs", + "cosmwasm-std", + "prost", + "provwasm-std", + "serde", + "serde_json", + "test-tube-prov", + "thiserror", +] + +[[package]] +name = "quote" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +dependencies = [ + "proc-macro2", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + +[[package]] +name = "rustversion" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemars" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", + "generic-array", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + +[[package]] +name = "serde" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-cw-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde-json-wasm" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c5113243e4a3a1c96587342d067f3e6b0f50790b6cf40d2868eb647a3eef0e" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "serde_json" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +dependencies = [ + "itoa", + "ryu", + "serde", +] [[package]] -name = "pkcs8" -version = "0.9.0" +name = "serde_repr" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" dependencies = [ - "der", - "spki", + "proc-macro2", + "quote", + "syn 2.0.16", ] [[package]] -name = "proc-macro2" -version = "1.0.58" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "unicode-ident", + "cfg-if", + "cpufeatures", + "digest 0.10.7", ] [[package]] -name = "prost" -version = "0.11.9" +name = "sha2" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ - "bytes", - "prost-derive", + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", ] [[package]] -name = "prost-derive" -version = "0.11.9" +name = "sha2" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "anyhow", - "itertools 0.10.5", + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der 0.6.1", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der 0.7.8", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +dependencies = [ + "heck", "proc-macro2", "quote", - "syn 1.0.109", + "rustversion", + "syn 2.0.16", ] [[package]] -name = "prost-types" -version = "0.11.9" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tendermint" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" +dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256 0.13.3", + "num-traits", + "once_cell", + "prost", + "prost-types", + "ripemd", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.6", + "signature 2.2.0", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-config" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71a72dbbea6dde12045d261f2c70c0de039125675e8a026c8d5ad34522756372" dependencies = [ + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", +] + +[[package]] +name = "tendermint-proto" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", ] [[package]] -name = "provwasm-common" +name = "tendermint-rpc" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d119d83a130537fc4a98c3c9eb6899ebe857fea4860400a61675bfb5f0b35129" +dependencies = [ + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom", + "http", + "hyper", + "hyper-proxy", + "hyper-rustls", + "peg", + "pin-project", + "semver", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "test-tube-prov" version = "0.1.0" dependencies = [ + "base64 0.13.1", + "cosmrs", "cosmwasm-std", + "prost", + "serde", + "serde_json", + "tendermint-proto", + "thiserror", ] [[package]] -name = "provwasm-mocks" -version = "2.2.0" +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ - "cosmwasm-std", - "provwasm-common", - "provwasm-std", - "schemars", + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "time" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" +dependencies = [ + "deranged", "serde", + "time-core", + "time-macros", ] [[package]] -name = "provwasm-proc-macro" -version = "0.1.0" +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.16", ] [[package]] -name = "provwasm-std" -version = "2.2.0" +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "base64 0.21.0", - "chrono", - "cosmwasm-schema", - "cosmwasm-std", - "prost", - "prost-types", - "provwasm-common", - "provwasm-proc-macro", - "schemars", - "serde", - "serde-cw-value", - "strum_macros", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] -name = "quote" -version = "1.0.27" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "proc-macro2", + "serde", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "rand_core" -version = "0.6.4" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "getrandom", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "rfc6979" -version = "0.3.1" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "crypto-bigint", - "hmac", - "zeroize", + "once_cell", ] [[package]] -name = "rustversion" -version = "1.0.12" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "ryu" -version = "1.0.13" +name = "typenum" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] -name = "schemars" -version = "0.8.12" +name = "uint" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", + "byteorder", + "crunchy", + "hex", + "static_assertions", ] [[package]] -name = "schemars_derive" -version = "0.8.12" +name = "unicode-bidi" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", + "tinyvec", ] [[package]] -name = "sec1" -version = "0.3.0" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "form_urlencoded", + "idna", + "percent-encoding", ] [[package]] -name = "serde" -version = "1.0.163" +name = "uuid" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "serde_derive", + "same-file", + "winapi-util", ] [[package]] -name = "serde-cw-value" -version = "0.7.0" +name = "want" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "serde", + "try-lock", ] [[package]] -name = "serde-json-wasm" -version = "0.5.1" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ - "serde", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "serde_derive" -version = "1.0.163" +name = "wasm-bindgen-backend" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ + "bumpalo", + "log", + "once_cell", "proc-macro2", "quote", "syn 2.0.16", + "wasm-bindgen-shared", ] [[package]] -name = "serde_derive_internals" -version = "0.26.0" +name = "wasm-bindgen-macro" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "serde_json" -version = "1.0.96" +name = "wasm-bindgen-shared" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" + +[[package]] +name = "web-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ - "itoa", - "ryu", - "serde", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "webpki" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "ring", + "untrusted", ] [[package]] -name = "sha2" -version = "0.10.6" +name = "webpki-roots" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.6", + "webpki", ] [[package]] -name = "signature" -version = "1.6.4" +name = "which" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ - "digest 0.10.6", - "rand_core 0.6.4", + "either", + "home", + "once_cell", + "rustix", ] [[package]] -name = "spki" -version = "0.6.0" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "base64ct", - "der", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] -name = "strum_macros" -version = "0.25.3" +name = "winapi-util" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.16", + "winapi", ] [[package]] -name = "subtle" -version = "2.4.1" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "syn" -version = "1.0.109" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "windows-targets 0.48.5", ] [[package]] -name = "syn" -version = "2.0.16" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "windows-targets 0.52.0", ] [[package]] -name = "thiserror" -version = "1.0.40" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "thiserror-impl", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] -name = "thiserror-impl" -version = "1.0.40" +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.16", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] -name = "typenum" -version = "1.16.0" +name = "windows_aarch64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "uint" -version = "0.9.5" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] -name = "unicode-ident" -version = "1.0.8" +name = "windows_aarch64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "version_check" -version = "0.9.4" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] diff --git a/contracts/attrs/Cargo.toml b/contracts/attrs/Cargo.toml index 8d80a028..6c4af085 100644 --- a/contracts/attrs/Cargo.toml +++ b/contracts/attrs/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "attrs" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ - "attrs.wasm", - "checksums.txt", + "attrs.wasm", + "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -27,14 +18,14 @@ crate-type = ["cdylib", "rlib"] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", default-features = false } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.12" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.40" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, default-features = false } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] -serde_json = { version = "1.0.96", features = ["std"]} -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +serde_json = { workspace = true, features = ["std"] } +provwasm-mocks = { workspace = true } diff --git a/contracts/attrs/Makefile b/contracts/attrs/Makefile index 2c799b7d..61143ef6 100644 --- a/contracts/attrs/Makefile +++ b/contracts/attrs/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/attrs \ --mount type=volume,source=attrs_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/attrs/schema/attrs.json b/contracts/attrs/schema/attrs.json index c990495e..bb9f4424 100644 --- a/contracts/attrs/schema/attrs.json +++ b/contracts/attrs/schema/attrs.json @@ -1,6 +1,6 @@ { "contract_name": "attrs", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/attrs/src/contract.rs b/contracts/attrs/src/contract.rs index c07a29f7..a61e848d 100644 --- a/contracts/attrs/src/contract.rs +++ b/contracts/attrs/src/contract.rs @@ -1,6 +1,7 @@ use cosmwasm_std::{ entry_point, to_binary, Deps, DepsMut, Env, MessageInfo, QueryResponse, Response, StdError, }; + use provwasm_std::types::provenance::attribute::v1::{AttributeQuerier, AttributeType}; use crate::error::ContractError; @@ -11,7 +12,7 @@ use crate::helpers::{ use crate::msg::{ ExecuteMsg, InitMsg, Label, LabelNameResponse, LabelsResponse, MigrateMsg, QueryMsg, }; -use crate::state::{config, config_read, State}; +use crate::state::{State, CONFIG}; /// Initialize the smart contract config state and bind a name to the contract address. #[entry_point] @@ -22,10 +23,13 @@ pub fn instantiate( msg: InitMsg, ) -> Result { // Create and save contract config state. - config(deps.storage).save(&State { - contract_owner: info.sender.clone(), - contract_name: msg.name.clone(), - })?; + CONFIG.save( + deps.storage, + &State { + contract_owner: info.sender.clone(), + contract_name: msg.name.clone(), + }, + )?; // Create bind name message. let bind_name_msg = bind_name( @@ -54,7 +58,7 @@ pub fn execute( msg: ExecuteMsg, ) -> Result { // Load contract state - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; // Validate the message sender is the contact owner. if info.sender != state.contract_owner { @@ -177,7 +181,7 @@ fn try_update_label( /// Handle label query requests. #[entry_point] pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result { - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; let attr_name = format!("{}.{}", "label", state.contract_name); match msg { QueryMsg::GetLabelName {} => to_binary(&LabelNameResponse { name: attr_name }), @@ -198,9 +202,9 @@ pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result = Item::new("config"); #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] pub struct State { pub contract_owner: Addr, // Ensures only sender from contract init can call handle. pub contract_name: String, // The root name of the contract. } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/contracts/ibc/local/Cargo.toml b/contracts/ibc/local/Cargo.toml index 18991f76..e5dd4223 100644 --- a/contracts/ibc/local/Cargo.toml +++ b/contracts/ibc/local/Cargo.toml @@ -1,8 +1,10 @@ [package] name = "ibc-local" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ "ibc_local.wasm", @@ -12,27 +14,16 @@ exclude = [ [lib] crate-type = ["cdylib", "rlib"] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [features] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", features = ["iterator", "staking", "stargate"] } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../../packages/provwasm-std" } -schemars = "0.8.3" -serde = { version = "1.0.103", default-features = false, features = ["derive"] } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["iterator", "staking", "stargate"] } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } [dev-dependencies] #provwasm-mocks = { path = "../../../todo/mocks" } diff --git a/contracts/ibc/local/Makefile b/contracts/ibc/local/Makefile index c848b634..f72d1186 100644 --- a/contracts/ibc/local/Makefile +++ b/contracts/ibc/local/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../../:/code:Z --workdir /code/contracts/ibc/local \ --mount type=volume,source=ibc_local_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/ibc/local/schema/ibc-local.json b/contracts/ibc/local/schema/ibc-local.json index f8acbeab..85b433d6 100644 --- a/contracts/ibc/local/schema/ibc-local.json +++ b/contracts/ibc/local/schema/ibc-local.json @@ -1,6 +1,6 @@ { "contract_name": "ibc-local", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/ibc/local/src/contract.rs b/contracts/ibc/local/src/contract.rs index 4b7badd2..c6fa1b01 100644 --- a/contracts/ibc/local/src/contract.rs +++ b/contracts/ibc/local/src/contract.rs @@ -9,7 +9,7 @@ use crate::msg::{ AccountInfo, AccountResponse, AdminResponse, ExecuteMsg, InstantiateMsg, ListAccountsResponse, QueryMsg, }; -use crate::state::{accounts, accounts_read, config, config_read, Config}; +use crate::state::{Config, ACCOUNTS, CONFIG}; #[entry_point] pub fn instantiate( @@ -20,7 +20,7 @@ pub fn instantiate( ) -> StdResult { // we store the reflect_id for creating accounts later let cfg = Config { admin: info.sender }; - config(deps.storage).save(&cfg)?; + CONFIG.save(deps.storage, &cfg)?; Ok(Response::new().add_attribute("action", "instantiate")) } @@ -39,12 +39,12 @@ pub fn handle_update_admin( new_admin: String, ) -> StdResult { // auth check - let mut cfg = config(deps.storage).load()?; + let mut cfg = CONFIG.load(deps.storage)?; if info.sender != cfg.admin { return Err(StdError::generic_err("Only admin may set new admin")); } cfg.admin = deps.api.addr_validate(&new_admin)?; - config(deps.storage).save(&cfg)?; + CONFIG.save(deps.storage, &cfg)?; Ok(Response::new() .add_attribute("action", "handle_update_admin") @@ -58,12 +58,12 @@ pub fn handle_who_am_i( channel_id: String, ) -> StdResult { // auth check - let cfg = config(deps.storage).load()?; + let cfg = CONFIG.load(deps.storage)?; if info.sender != cfg.admin { return Err(StdError::generic_err("Only admin may send messages")); } // ensure the channel exists (not found if not registered) - accounts(deps.storage).load(channel_id.as_bytes())?; + ACCOUNTS.load(deps.storage, &channel_id)?; // construct a packet to send let packet = PacketMsg::WhoAmI {}; @@ -89,16 +89,15 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { } fn query_account(deps: Deps, channel_id: String) -> StdResult { - let account = accounts_read(deps.storage).load(channel_id.as_bytes())?; + let account = ACCOUNTS.load(deps.storage, &channel_id)?; Ok(account.into()) } fn query_list_accounts(deps: Deps) -> StdResult { - let accounts: StdResult> = accounts_read(deps.storage) - .range(None, None, Order::Ascending) + let accounts: StdResult> = ACCOUNTS + .range(deps.storage, None, None, Order::Ascending) .map(|r| { - let (k, account) = r?; - let channel_id = String::from_utf8(k)?; + let (channel_id, account) = r?; Ok(AccountInfo::convert(channel_id, account)) }) .collect(); @@ -108,7 +107,7 @@ fn query_list_accounts(deps: Deps) -> StdResult { } fn query_admin(deps: Deps) -> StdResult { - let Config { admin } = config_read(deps.storage).load()?; + let Config { admin } = CONFIG.load(deps.storage)?; Ok(AdminResponse { admin: admin.into(), }) diff --git a/contracts/ibc/local/src/ibc.rs b/contracts/ibc/local/src/ibc.rs index ade14470..13b79a3b 100644 --- a/contracts/ibc/local/src/ibc.rs +++ b/contracts/ibc/local/src/ibc.rs @@ -1,11 +1,11 @@ use cosmwasm_std::{ - entry_point, from_slice, to_binary, DepsMut, Env, IbcBasicResponse, IbcChannelCloseMsg, + entry_point, from_binary, to_binary, DepsMut, Env, IbcBasicResponse, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcMsg, IbcOrder, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, StdError, StdResult, }; use crate::ibc_msg::{AcknowledgementMsg, PacketMsg, WhoAmIResponse}; -use crate::state::{accounts, AccountData}; +use crate::state::{AccountData, ACCOUNTS}; pub const IBC_APP_VERSION: &str = "pio-ibc-example-v1"; pub const PACKET_LIFETIME: u64 = 60 * 60; @@ -48,7 +48,7 @@ pub fn ibc_channel_connect( // create an account holder the channel exists (not found if not registered) let data = AccountData::default(); - accounts(deps.storage).save(channel_id.as_bytes(), &data)?; + ACCOUNTS.save(deps.storage, channel_id, &data)?; // construct a packet to send let packet = PacketMsg::WhoAmI {}; @@ -75,7 +75,7 @@ pub fn ibc_channel_close( // remove the channel let channel_id = &channel.endpoint.channel_id; - accounts(deps.storage).remove(channel_id.as_bytes()); + ACCOUNTS.remove(deps.storage, channel_id); Ok(IbcBasicResponse::new() .add_attribute("action", "ibc_channel_close") @@ -102,10 +102,10 @@ pub fn ibc_packet_ack( // which local channel was this packet send from let caller = msg.original_packet.src.channel_id; // we need to parse the ack based on our request - let packet: PacketMsg = from_slice(&msg.original_packet.data)?; + let packet: PacketMsg = from_binary(&msg.original_packet.data)?; match packet { PacketMsg::WhoAmI {} => { - let res: AcknowledgementMsg = from_slice(&msg.acknowledgement.data)?; + let res: AcknowledgementMsg = from_binary(&msg.acknowledgement.data)?; acknowledge_who_am_i(deps, caller, res) } } @@ -127,11 +127,11 @@ fn acknowledge_who_am_i( AcknowledgementMsg::Err(e) => { return Ok(IbcBasicResponse::new() .add_attribute("action", "acknowledge_who_am_i") - .add_attribute("error", e)) + .add_attribute("error", e)); } }; - accounts(deps.storage).update(caller.as_bytes(), |acct| -> StdResult<_> { + ACCOUNTS.update(deps.storage, &caller, |acct| -> StdResult<_> { match acct { Some(mut acct) => { // set the account the first time @@ -251,7 +251,7 @@ mod tests { channel_id: channel_id.into(), }; let r = query(deps.as_ref(), mock_env(), q).unwrap(); - let acct: AccountResponse = from_slice(&r).unwrap(); + let acct: AccountResponse = from_binary(&r).unwrap(); assert!(acct.remote_addr.is_none()); assert!(acct.remote_balance.is_empty()); assert_eq!(0, acct.last_update_time.nanos()); @@ -265,7 +265,7 @@ mod tests { channel_id: channel_id.into(), }; let r = query(deps.as_ref(), mock_env(), q).unwrap(); - let acct: AccountResponse = from_slice(&r).unwrap(); + let acct: AccountResponse = from_binary(&r).unwrap(); assert_eq!(acct.remote_addr.unwrap(), remote_addr); assert!(acct.remote_balance.is_empty()); assert_eq!(0, acct.last_update_time.nanos()); diff --git a/contracts/ibc/local/src/state.rs b/contracts/ibc/local/src/state.rs index f9bed38f..51602e4c 100644 --- a/contracts/ibc/local/src/state.rs +++ b/contracts/ibc/local/src/state.rs @@ -1,13 +1,9 @@ +use cosmwasm_std::{Addr, Coin, Timestamp}; +use cw_storage_plus::{Item, Map}; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{Addr, Coin, Storage, Timestamp}; -use cosmwasm_storage::{ - bucket, bucket_read, singleton, singleton_read, Bucket, ReadonlyBucket, ReadonlySingleton, - Singleton, -}; - -pub const KEY_CONFIG: &[u8] = b"config"; -pub const PREFIX_ACCOUNTS: &[u8] = b"accounts"; +pub const CONFIG: Item = Item::new("config"); +pub const ACCOUNTS: Map<&str, AccountData> = Map::new("accounts"); #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Config { @@ -29,20 +25,3 @@ pub struct AccountData { pub time: Timestamp, pub chain_id: String, } - -/// accounts is lookup of channel_id to reflect contract -pub fn accounts(storage: &mut dyn Storage) -> Bucket { - bucket(storage, PREFIX_ACCOUNTS) -} - -pub fn accounts_read(storage: &dyn Storage) -> ReadonlyBucket { - bucket_read(storage, PREFIX_ACCOUNTS) -} - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, KEY_CONFIG) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, KEY_CONFIG) -} diff --git a/contracts/ibc/remote/Cargo.toml b/contracts/ibc/remote/Cargo.toml index bda40d01..dd0e48c6 100644 --- a/contracts/ibc/remote/Cargo.toml +++ b/contracts/ibc/remote/Cargo.toml @@ -1,8 +1,10 @@ [package] name = "ibc-remote" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ "ibc_remote.wasm", @@ -12,27 +14,16 @@ exclude = [ [lib] crate-type = ["cdylib", "rlib"] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [features] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", features = ["ibc3", "iterator", "staking", "stargate"] } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../../packages/provwasm-std" } -schemars = "0.8.3" -serde = { version = "1.0.103", default-features = false, features = ["derive"] } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["ibc3", "iterator", "staking", "stargate"] } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } [dev-dependencies] #provwasm-mocks = { path = "../../../todo/mocks" } diff --git a/contracts/ibc/remote/Makefile b/contracts/ibc/remote/Makefile index 6bc27b95..45594c54 100644 --- a/contracts/ibc/remote/Makefile +++ b/contracts/ibc/remote/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../../:/code:Z --workdir /code/contracts/ibc/remote \ --mount type=volume,source=ibc_remote_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/ibc/remote/schema/ibc-remote.json b/contracts/ibc/remote/schema/ibc-remote.json index ce854dbf..77b174a8 100644 --- a/contracts/ibc/remote/schema/ibc-remote.json +++ b/contracts/ibc/remote/schema/ibc-remote.json @@ -1,6 +1,6 @@ { "contract_name": "ibc-remote", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/ibc/remote/src/contract.rs b/contracts/ibc/remote/src/contract.rs index da3d576d..9a9b10fd 100644 --- a/contracts/ibc/remote/src/contract.rs +++ b/contracts/ibc/remote/src/contract.rs @@ -1,5 +1,5 @@ use cosmwasm_std::{ - entry_point, from_slice, to_binary, DepsMut, Empty, Env, Event, Ibc3ChannelOpenResponse, + entry_point, from_binary, to_binary, DepsMut, Empty, Env, Event, Ibc3ChannelOpenResponse, IbcBasicResponse, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, IbcChannelOpenResponse, IbcOrder, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, IbcReceiveResponse, MessageInfo, Response, StdError, StdResult, @@ -93,7 +93,7 @@ pub fn ibc_packet_receive( let packet = msg.packet; // which local channel did this packet come on let caller = packet.dest.channel_id; - let msg: PacketMsg = from_slice(&packet.data)?; + let msg: PacketMsg = from_binary(&packet.data)?; match msg { PacketMsg::WhoAmI {} => receive_who_am_i(deps, env, caller), } diff --git a/contracts/marker/Cargo.lock b/contracts/marker/Cargo.lock index 262dcfea..69caf05c 100644 --- a/contracts/marker/Cargo.lock +++ b/contracts/marker/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + [[package]] name = "ahash" version = "0.7.6" @@ -13,24 +28,65 @@ dependencies = [ "version_check", ] +[[package]] +name = "aho-corasick" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +dependencies = [ + "memchr", +] + [[package]] name = "anyhow" version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +[[package]] +name = "async-trait" +version = "0.1.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + [[package]] name = "base16ct" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + [[package]] name = "base64" version = "0.13.1" @@ -39,9 +95,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -49,6 +105,59 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bindgen" +version = "0.68.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +dependencies = [ + "bitflags 2.4.2", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.16", + "which", +] + +[[package]] +name = "bip32" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" +dependencies = [ + "bs58", + "hmac", + "k256 0.13.3", + "once_cell", + "pbkdf2", + "rand_core 0.6.4", + "ripemd", + "sha2 0.10.6", + "subtle", + "zeroize", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" + [[package]] name = "block-buffer" version = "0.9.0" @@ -67,6 +176,21 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bs58" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +dependencies = [ + "sha2 0.10.6", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + [[package]] name = "byteorder" version = "1.4.3" @@ -78,6 +202,27 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] [[package]] name = "cfg-if" @@ -95,12 +240,71 @@ dependencies = [ "num-traits", ] +[[package]] +name = "clang-sys" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "const-oid" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cosmos-sdk-proto" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73c9d2043a9e617b0d602fbc0a0ecd621568edbf3a9774890a6d562389bd8e1c" +dependencies = [ + "prost", + "prost-types", + "tendermint-proto", +] + +[[package]] +name = "cosmrs" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af13955d6f356272e6def9ff5e2450a7650df536d8934f47052a20c76513d2f6" +dependencies = [ + "bip32", + "cosmos-sdk-proto", + "ecdsa 0.16.9", + "eyre", + "getrandom", + "k256 0.13.3", + "rand_core 0.6.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror", +] + [[package]] name = "cosmwasm-crypto" version = "1.2.5" @@ -109,7 +313,7 @@ checksum = "75836a10cb9654c54e77ee56da94d592923092a10b369cdb0dbd56acefc16340" dependencies = [ "digest 0.10.7", "ed25519-zebra", - "k256", + "k256 0.11.6", "rand_core 0.6.4", "thiserror", ] @@ -204,6 +408,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "subtle", + "zeroize", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -214,6 +430,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct", +] + [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -227,6 +452,19 @@ dependencies = [ "zeroize", ] +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.6.4", + "subtle-ng", + "zeroize", +] + [[package]] name = "der" version = "0.6.1" @@ -237,6 +475,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" + [[package]] name = "derivative" version = "2.2.0" @@ -264,6 +518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -280,10 +535,47 @@ version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ - "der", - "elliptic-curve", - "rfc6979", - "signature", + "der 0.6.1", + "elliptic-curve 0.12.3", + "rfc6979 0.3.1", + "signature 1.6.4", +] + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +dependencies = [ + "der 0.7.8", + "digest 0.10.7", + "elliptic-curve 0.13.8", + "rfc6979 0.4.0", + "signature 2.2.0", + "spki 0.7.3", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8 0.10.2", + "signature 2.2.0", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core 0.6.4", + "sha2 0.9.9", + "zeroize", ] [[package]] @@ -293,7 +585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "serde", @@ -313,577 +605,2079 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" dependencies = [ - "base16ct", - "crypto-bigint", - "der", + "base16ct 0.1.1", + "crypto-bigint 0.4.9", + "der 0.6.1", "digest 0.10.7", - "ff", + "ff 0.12.1", "generic-array", - "group", - "pkcs8", + "group 0.12.1", + "pkcs8 0.9.0", "rand_core 0.6.4", - "sec1", + "sec1 0.3.0", "subtle", "zeroize", ] [[package]] -name = "ff" -version = "0.12.1" +name = "elliptic-curve" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ + "base16ct 0.2.0", + "crypto-bigint 0.5.5", + "digest 0.10.7", + "ff 0.13.0", + "generic-array", + "group 0.13.0", + "pkcs8 0.10.2", "rand_core 0.6.4", + "sec1 0.7.3", "subtle", + "zeroize", ] [[package]] -name = "forward_ref" -version = "1.0.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "generic-array" -version = "0.14.7" +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "typenum", - "version_check", + "libc", + "windows-sys 0.52.0", ] [[package]] -name = "getrandom" -version = "0.2.9" +name = "eyre" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" dependencies = [ - "cfg-if", - "libc", - "wasi", + "indenter", + "once_cell", ] [[package]] -name = "group" +name = "ff" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "ff", "rand_core 0.6.4", "subtle", ] [[package]] -name = "hashbrown" -version = "0.12.3" +name = "ff" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "ahash", + "rand_core 0.6.4", + "subtle", ] [[package]] -name = "heck" -version = "0.4.1" +name = "flex-error" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] [[package]] -name = "hex" -version = "0.4.3" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "hmac" -version = "0.12.1" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "digest 0.10.7", + "percent-encoding", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "forward_ref" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ - "either", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "itertools" -version = "0.11.0" +name = "futures-channel" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ - "either", + "futures-core", + "futures-sink", ] [[package]] -name = "itoa" -version = "1.0.6" +name = "futures-core" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] -name = "k256" -version = "0.11.6" +name = "futures-executor" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.6", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "libc" -version = "0.2.144" +name = "futures-io" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] -name = "marker" -version = "2.2.0" +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cosmwasm-storage", - "prost", - "provwasm-mocks", - "provwasm-std", - "schemars", - "serde", - "thiserror", -] + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", + "zeroize", +] + +[[package]] +name = "getrandom" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "glob" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff 0.12.1", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "group" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" +dependencies = [ + "ff 0.13.0", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "h2" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-proxy" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" +dependencies = [ + "bytes", + "futures", + "headers", + "http", + "hyper", + "hyper-rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki", + "webpki-roots", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" + +[[package]] +name = "js-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "k256" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +dependencies = [ + "cfg-if", + "ecdsa 0.14.8", + "elliptic-curve 0.12.3", + "sha2 0.10.6", +] + +[[package]] +name = "k256" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +dependencies = [ + "cfg-if", + "ecdsa 0.16.9", + "elliptic-curve 0.13.8", + "once_cell", + "sha2 0.10.6", + "signature 2.2.0", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.152" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" + +[[package]] +name = "libloading" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "marker" +version = "2.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cosmwasm-storage", + "prost", + "provwasm-mocks", + "provwasm-std", + "provwasm-test-tube", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "peeking_take_while" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" + +[[package]] +name = "peg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der 0.6.1", + "spki 0.6.0", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der 0.7.8", + "spki 0.7.3", +] + +[[package]] +name = "prettyplease" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9825a04601d60621feed79c4e6b56d65db77cdca55cef43b46b0de1096d1c282" +dependencies = [ + "proc-macro2", + "syn 2.0.16", +] + +[[package]] +name = "proc-macro2" +version = "1.0.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost", +] + +[[package]] +name = "provwasm-common" +version = "0.1.0" +dependencies = [ + "cosmwasm-std", +] + +[[package]] +name = "provwasm-mocks" +version = "2.2.0" +dependencies = [ + "cosmwasm-std", + "provwasm-common", + "provwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "provwasm-proc-macro" +version = "0.1.0" +dependencies = [ + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "provwasm-std" +version = "2.2.0" +dependencies = [ + "base64 0.21.7", + "chrono", + "cosmwasm-schema", + "cosmwasm-std", + "prost", + "prost-types", + "provwasm-common", + "provwasm-proc-macro", + "schemars", + "serde", + "serde-cw-value", + "strum_macros", +] + +[[package]] +name = "provwasm-test-tube" +version = "0.1.0" +dependencies = [ + "base64 0.21.7", + "bindgen", + "cosmrs", + "cosmwasm-std", + "prost", + "provwasm-std", + "serde", + "serde_json", + "test-tube-prov", + "thiserror", +] + +[[package]] +name = "quote" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +dependencies = [ + "proc-macro2", +] + +[[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7fa1134405e2ec9353fd416b17f8dacd46c473d7d3fd1cf202706a14eb792a" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustix" +version = "0.38.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "322394588aaf33c24007e8bb3238ee3e4c5c09c084ab32bc73890b99ff326bca" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64 0.13.1", + "log", + "ring", + "sct", + "webpki", +] + +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + +[[package]] +name = "rustversion" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" + +[[package]] +name = "ryu" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "schemars" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 1.0.109", +] + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct 0.1.1", + "der 0.6.1", + "generic-array", + "pkcs8 0.9.0", + "subtle", + "zeroize", +] + +[[package]] +name = "sec1" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +dependencies = [ + "base16ct 0.2.0", + "der 0.7.8", + "generic-array", + "pkcs8 0.10.2", + "subtle", + "zeroize", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + +[[package]] +name = "serde" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-cw-value" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" +dependencies = [ + "serde", +] + +[[package]] +name = "serde-json-wasm" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c5113243e4a3a1c96587342d067f3e6b0f50790b6cf40d2868eb647a3eef0e" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.163" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "serde_json" +version = "1.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +dependencies = [ + "itoa", + "ryu", + "serde", +] [[package]] -name = "num-integer" -version = "0.1.45" +name = "serde_repr" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "6f0a21fba416426ac927b1691996e82079f8b6156e920c85345f135b2e9ba2de" dependencies = [ - "autocfg", - "num-traits", + "proc-macro2", + "quote", + "syn 2.0.16", ] [[package]] -name = "num-traits" -version = "0.2.15" +name = "sha1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[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.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] -name = "once_cell" -version = "1.17.1" +name = "socket2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "spin" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "pkcs8" -version = "0.9.0" +name = "spki" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ - "der", - "spki", + "base64ct", + "der 0.6.1", ] [[package]] -name = "proc-macro2" -version = "1.0.58" +name = "spki" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ - "unicode-ident", + "base64ct", + "der 0.7.8", ] [[package]] -name = "prost" -version = "0.11.9" +name = "static_assertions" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strum_macros" +version = "0.25.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "bytes", - "prost-derive", + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.16", ] [[package]] -name = "prost-derive" -version = "0.11.9" +name = "subtle" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "anyhow", - "itertools 0.10.5", "proc-macro2", "quote", - "syn 1.0.109", + "unicode-ident", ] [[package]] -name = "prost-types" -version = "0.11.9" +name = "syn" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tendermint" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f0a7d05cf78524782337f8edd55cbc578d159a16ad4affe2135c92f7dbac7f0" dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "k256 0.13.3", + "num-traits", + "once_cell", "prost", + "prost-types", + "ripemd", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.6", + "signature 2.2.0", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", ] [[package]] -name = "provwasm-common" +name = "tendermint-config" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71a72dbbea6dde12045d261f2c70c0de039125675e8a026c8d5ad34522756372" +dependencies = [ + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", +] + +[[package]] +name = "tendermint-proto" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0cec054567d16d85e8c3f6a3139963d1a66d9d3051ed545d31562550e9bcc3d" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-rpc" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d119d83a130537fc4a98c3c9eb6899ebe857fea4860400a61675bfb5f0b35129" +dependencies = [ + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom", + "http", + "hyper", + "hyper-proxy", + "hyper-rustls", + "peg", + "pin-project", + "semver", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "test-tube-prov" version = "0.1.0" dependencies = [ + "base64 0.13.1", + "cosmrs", "cosmwasm-std", + "prost", + "serde", + "serde_json", + "tendermint-proto", + "thiserror", ] [[package]] -name = "provwasm-mocks" -version = "2.2.0" +name = "thiserror" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ - "cosmwasm-std", - "provwasm-common", - "provwasm-std", - "schemars", + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] + +[[package]] +name = "time" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a79d09ac6b08c1ab3906a2f7cc2e81a0e27c7ae89c63812df75e52bef0751e07" +dependencies = [ + "deranged", "serde", + "time-core", + "time-macros", ] [[package]] -name = "provwasm-proc-macro" -version = "0.1.0" +name = "time-core" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" + +[[package]] +name = "time-macros" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c65469ed6b3a4809d987a41eb1dc918e9bc1d92211cbad7ae82931846f7451" +dependencies = [ + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.35.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.16", ] [[package]] -name = "provwasm-std" -version = "2.2.0" +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" dependencies = [ - "base64 0.21.0", - "chrono", - "cosmwasm-schema", - "cosmwasm-std", - "prost", - "prost-types", - "provwasm-common", - "provwasm-proc-macro", - "schemars", - "serde", - "serde-cw-value", - "strum_macros", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] -name = "quote" -version = "1.0.27" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "proc-macro2", + "serde", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "rand_core" -version = "0.6.4" +name = "tracing" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "getrandom", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "rfc6979" -version = "0.3.1" +name = "tracing-core" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ - "crypto-bigint", - "hmac", - "zeroize", + "once_cell", ] [[package]] -name = "rustversion" -version = "1.0.12" +name = "try-lock" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "ryu" -version = "1.0.13" +name = "typenum" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] -name = "schemars" -version = "0.8.12" +name = "uint" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", + "byteorder", + "crunchy", + "hex", + "static_assertions", ] [[package]] -name = "schemars_derive" -version = "0.8.12" +name = "unicode-bidi" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", + "tinyvec", ] [[package]] -name = "sec1" -version = "0.3.0" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "form_urlencoded", + "idna", + "percent-encoding", ] [[package]] -name = "serde" -version = "1.0.163" +name = "uuid" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ - "serde_derive", + "same-file", + "winapi-util", ] [[package]] -name = "serde-cw-value" -version = "0.7.0" +name = "want" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75d32da6b8ed758b7d850b6c3c08f1d7df51a4df3cb201296e63e34a78e99d4" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "serde", + "try-lock", ] [[package]] -name = "serde-json-wasm" -version = "0.5.1" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a62a1fad1e1828b24acac8f2b468971dade7b8c3c2e672bcadefefb1f8c137" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ - "serde", + "cfg-if", + "wasm-bindgen-macro", ] [[package]] -name = "serde_derive" -version = "1.0.163" +name = "wasm-bindgen-backend" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ + "bumpalo", + "log", + "once_cell", "proc-macro2", "quote", "syn 2.0.16", + "wasm-bindgen-shared", ] [[package]] -name = "serde_derive_internals" -version = "0.26.0" +name = "wasm-bindgen-macro" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "serde_json" -version = "1.0.96" +name = "wasm-bindgen-shared" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" + +[[package]] +name = "web-sys" +version = "0.3.67" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ - "itoa", - "ryu", - "serde", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "webpki" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "ring", + "untrusted", ] [[package]] -name = "sha2" -version = "0.10.6" +name = "webpki-roots" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", + "webpki", ] [[package]] -name = "signature" -version = "1.6.4" +name = "which" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", + "either", + "home", + "once_cell", + "rustix", ] [[package]] -name = "spki" -version = "0.6.0" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "base64ct", - "der", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] -name = "strum_macros" -version = "0.25.3" +name = "winapi-util" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.16", + "winapi", ] [[package]] -name = "subtle" -version = "2.5.0" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "syn" -version = "1.0.109" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "windows-targets 0.48.5", ] [[package]] -name = "syn" -version = "2.0.16" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "windows-targets 0.52.0", ] [[package]] -name = "thiserror" -version = "1.0.40" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "thiserror-impl", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] -name = "thiserror-impl" -version = "1.0.40" +name = "windows-targets" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.16", + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", ] [[package]] -name = "typenum" -version = "1.16.0" +name = "windows_aarch64_gnullvm" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] -name = "uint" -version = "0.9.5" +name = "windows_aarch64_gnullvm" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" [[package]] -name = "unicode-ident" -version = "1.0.8" +name = "windows_aarch64_msvc" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] -name = "version_check" -version = "0.9.4" +name = "windows_aarch64_msvc" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" [[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +name = "windows_i686_gnu" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.16", +] diff --git a/contracts/marker/Cargo.toml b/contracts/marker/Cargo.toml index acd33e1b..41ed3055 100644 --- a/contracts/marker/Cargo.toml +++ b/contracts/marker/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "marker" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Phil Story ", "Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2018" exclude = [ "marker.wasm", "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -28,14 +19,14 @@ crate-type = ["cdylib", "rlib"] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5" } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.12" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.40" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = {workspace = true} +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] -prost = {version = "0.11.9", default-features = false} -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +prost = {workspace = true, default-features = false} +provwasm-mocks = { workspace = true } diff --git a/contracts/marker/Makefile b/contracts/marker/Makefile index 7191ef48..61ae11a4 100644 --- a/contracts/marker/Makefile +++ b/contracts/marker/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/marker \ --mount type=volume,source=marker_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/marker/schema/marker.json b/contracts/marker/schema/marker.json index 0be1c1d3..d6dff32e 100644 --- a/contracts/marker/schema/marker.json +++ b/contracts/marker/schema/marker.json @@ -1,6 +1,6 @@ { "contract_name": "marker", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/marker/src/contract.rs b/contracts/marker/src/contract.rs index 6a12e33f..b8b9aabb 100644 --- a/contracts/marker/src/contract.rs +++ b/contracts/marker/src/contract.rs @@ -12,7 +12,7 @@ use crate::helpers::{ grant_marker_access, mint_marker_supply, transfer_marker_coins, withdraw_coins, }; use crate::msg::{ExecuteMsg, InitMsg, QueryMsg}; -use crate::state::{config, State}; +use crate::state::{State, CONFIG}; /// Initialize the smart contract config state, then bind a name to the contract address. #[entry_point] @@ -23,9 +23,12 @@ pub fn instantiate( msg: InitMsg, ) -> Result { // Create and save state - config(deps.storage).save(&State { - contract_name: msg.name.clone(), - })?; + CONFIG.save( + deps.storage, + &State { + contract_name: msg.name.clone(), + }, + )?; // Create a name for the contract let bind_name_msg = bind_name( @@ -322,6 +325,8 @@ mod tests { allow_governance_control: false, allow_forced_transfer: false, required_attributes: vec![], + usd_cents: 0, + volume: 0, } .try_into() .unwrap(); @@ -371,6 +376,8 @@ mod tests { allow_governance_control: false, allow_forced_transfer: true, required_attributes: vec![], + usd_cents: 0, + volume: 0, } .try_into() .unwrap(); diff --git a/contracts/marker/src/helpers.rs b/contracts/marker/src/helpers.rs index 803acfbf..c7866e50 100644 --- a/contracts/marker/src/helpers.rs +++ b/contracts/marker/src/helpers.rs @@ -64,6 +64,8 @@ pub fn create_marker>( allow_governance_control: false, allow_forced_transfer, required_attributes: vec![], + usd_cents: 0, + volume: 0, } .into()) } diff --git a/contracts/marker/src/state.rs b/contracts/marker/src/state.rs index 77cfd7d1..3decddd1 100644 --- a/contracts/marker/src/state.rs +++ b/contracts/marker/src/state.rs @@ -1,20 +1,10 @@ +use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::Storage; -use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; - -pub static CONFIG_KEY: &[u8] = b"config"; +pub const CONFIG: Item = Item::new("config"); #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] pub struct State { pub contract_name: String, // The root name of the contract. } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/contracts/msgfees/Cargo.toml b/contracts/msgfees/Cargo.toml index f8d08c8c..28c0298a 100644 --- a/contracts/msgfees/Cargo.toml +++ b/contracts/msgfees/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "msgfees" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ - "msgfees.wasm", - "checksums.txt", + "msgfees.wasm", + "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -27,13 +18,13 @@ crate-type = ["cdylib", "rlib"] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5" } -cosmwasm-storage = "1.2.5" -provwasm-std = { path = "../../packages/provwasm-std"} -schemars = "0.8.12" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.40" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +provwasm-mocks = { workspace = true } diff --git a/contracts/msgfees/Makefile b/contracts/msgfees/Makefile index eb93ffcd..97c81cee 100644 --- a/contracts/msgfees/Makefile +++ b/contracts/msgfees/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/msgfees \ --mount type=volume,source=msgfees_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/msgfees/schema/msgfees.json b/contracts/msgfees/schema/msgfees.json index 9e3ffb2e..ee309a48 100644 --- a/contracts/msgfees/schema/msgfees.json +++ b/contracts/msgfees/schema/msgfees.json @@ -1,6 +1,6 @@ { "contract_name": "msgfees", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/msgfees/src/contract.rs b/contracts/msgfees/src/contract.rs index e9234ca3..2eadf70b 100644 --- a/contracts/msgfees/src/contract.rs +++ b/contracts/msgfees/src/contract.rs @@ -4,7 +4,7 @@ use provwasm_std::types::cosmos::bank::v1beta1::MsgSend; use crate::error::ContractError; use crate::helpers::assess_custom_fee; use crate::msg::{ExecuteMsg, InitMsg}; -use crate::state::{config, config_read, State}; +use crate::state::{State, CONFIG}; /// Initialize the smart contract config state and bind a name to the contract address. #[entry_point] @@ -21,7 +21,7 @@ pub fn instantiate( }; // Save contract config state. - config(deps.storage).save(&state)?; + CONFIG.save(deps.storage, &state)?; // Dispatch bind name message and add event attributes. let res = Response::new() @@ -56,7 +56,7 @@ pub fn try_send_funds( to_address: Addr, ) -> Result { // Load contract state - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; // Dispatch message to handler and emit events let mut res = Response::new() @@ -133,7 +133,7 @@ mod tests { ] ); assert_eq!( - config_read(&deps.storage).load().unwrap(), + CONFIG.load(&deps.storage).unwrap(), State { fee_amount: Some(coin(100_000, "nhash")), fee_recipient: Some(Addr::unchecked("fee_address")), @@ -148,11 +148,14 @@ mod tests { let env = mock_env(); let info = mock_info("sender", &[coin(200_000, "nhash")]); - config(&mut deps.storage) - .save(&State { - fee_amount: Some(coin(100_000, "nhash")), - fee_recipient: Some(Addr::unchecked("fee_address")), - }) + CONFIG + .save( + &mut deps.storage, + &State { + fee_amount: Some(coin(100_000, "nhash")), + fee_recipient: Some(Addr::unchecked("fee_address")), + }, + ) .expect("failed to save test state"); let msg = ExecuteMsg::SendFunds { @@ -214,11 +217,14 @@ mod tests { let env = mock_env(); let info = mock_info("sender", &[]); - config(&mut deps.storage) - .save(&State { - fee_amount: None, - fee_recipient: None, - }) + CONFIG + .save( + &mut deps.storage, + &State { + fee_amount: None, + fee_recipient: None, + }, + ) .expect("failed to save test state"); let msg = ExecuteMsg::SendFunds { diff --git a/contracts/msgfees/src/state.rs b/contracts/msgfees/src/state.rs index a86e3572..367fd92a 100644 --- a/contracts/msgfees/src/state.rs +++ b/contracts/msgfees/src/state.rs @@ -1,21 +1,12 @@ +use cosmwasm_std::{Addr, Coin}; +use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{Addr, Coin, Storage}; -use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; - -pub static CONFIG_KEY: &[u8] = b"config"; +pub const CONFIG: Item = Item::new("config"); #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] pub struct State { pub(crate) fee_amount: Option, pub(crate) fee_recipient: Option, } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/contracts/name/Cargo.toml b/contracts/name/Cargo.toml index ecfc9f18..7c18664b 100644 --- a/contracts/name/Cargo.toml +++ b/contracts/name/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "name" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ - "name.wasm", - "checksums.txt", + "name.wasm", + "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -27,14 +18,14 @@ crate-type = ["cdylib", "rlib"] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5" } -cosmwasm-storage = { version = "1.2.5" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw-storage-plus = { workspace = true } jsonformat = "2.0.0" -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.12" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.40" } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +provwasm-mocks = { workspace = true } diff --git a/contracts/name/Makefile b/contracts/name/Makefile index 6663a33d..3ab30071 100644 --- a/contracts/name/Makefile +++ b/contracts/name/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/name \ --mount type=volume,source=name_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/name/schema/name.json b/contracts/name/schema/name.json index 03043c0c..d5afed72 100644 --- a/contracts/name/schema/name.json +++ b/contracts/name/schema/name.json @@ -1,6 +1,6 @@ { "contract_name": "name", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/name/src/contract.rs b/contracts/name/src/contract.rs index 3cf888c4..77545f7f 100644 --- a/contracts/name/src/contract.rs +++ b/contracts/name/src/contract.rs @@ -7,7 +7,7 @@ use provwasm_std::types::provenance::name::v1::{ use crate::error::ContractError; use crate::msg::{ExecuteMsg, InitMsg, QueryMsg}; -use crate::state::{config, config_read, State}; +use crate::state::{State, CONFIG}; /// Initialize the smart contract config state and bind a name to the contract address. #[entry_point] @@ -24,7 +24,7 @@ pub fn instantiate( }; // Save contract config state. - config(deps.storage).save(&state)?; + CONFIG.save(deps.storage, &state)?; let split: Vec<&str> = msg.name.splitn(2, '.').collect(); let record = split.first(); @@ -83,7 +83,7 @@ pub fn try_bind_prefix( prefix: String, ) -> Result { // Load contract state - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; // Validate the message sender is the contact owner. if info.sender != state.contract_owner { @@ -125,7 +125,7 @@ pub fn try_unbind_prefix( prefix: String, ) -> Result { // Load contract state - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; // Validate the message sender is the contact owner. if info.sender != state.contract_owner { diff --git a/contracts/name/src/state.rs b/contracts/name/src/state.rs index ee1975aa..3198e4b4 100644 --- a/contracts/name/src/state.rs +++ b/contracts/name/src/state.rs @@ -1,21 +1,12 @@ +use cosmwasm_std::Addr; +use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{Addr, Storage}; -use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; - -pub static CONFIG_KEY: &[u8] = b"config"; +pub const CONFIG: Item = Item::new("config"); #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] pub struct State { pub contract_owner: Addr, // Ensures only sender from contract init can call handle. pub contract_name: String, // The root name of the contract. } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/contracts/nft/Cargo.toml b/contracts/nft/Cargo.toml index 2cdaaf2a..d503b770 100644 --- a/contracts/nft/Cargo.toml +++ b/contracts/nft/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "nft" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ "nft.wasm", "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -28,25 +19,24 @@ backtraces = [] [dependencies] bech32 = "0.9.1" -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", features = ["cosmwasm_1_1"] } -cosmwasm-storage = { version = "1.2.5" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["cosmwasm_1_1"] } cw2 = "1.0.1" cw721 = "0.18.0" cw-ownable = "0.5.1" -cw-storage-plus = { version = "1.1.0", features = ["iterator"] } +cw-storage-plus = { workspace = true, features = ["iterator"] } cw-utils = "1.0.1" hex = { version = "0.4.3", default-features = false } -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.10" -serde = { version = "1.0.145", default-features = false, features = ["derive"] } -serde_json = { version = "1.0.96" } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +serde_json = { workspace = true } sha2 = { version = "0.10.7", default-features = false } -thiserror = { version = "1.0.31" } +thiserror = { workspace = true } semver = "1" uuid = { version = "1.4.1", default-features = false } [dev-dependencies] -serde_json = { version = "1.0.96", features = ["std"] } -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +serde_json = { workspace = true, features = ["std"] } +provwasm-mocks = { workspace = true } cw-multi-test = "0.16.2" \ No newline at end of file diff --git a/contracts/nft/Makefile b/contracts/nft/Makefile index a99bc30d..72af1704 100644 --- a/contracts/nft/Makefile +++ b/contracts/nft/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/nft \ --mount type=volume,source=nft_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/nft/schema/execute_msg.json b/contracts/nft/schema/execute_msg.json index a0239b12..6aa4cd54 100644 --- a/contracts/nft/schema/execute_msg.json +++ b/contracts/nft/schema/execute_msg.json @@ -118,8 +118,8 @@ "type": "object", "required": [ "recipient", - "scope_uuid", - "session_uuid" + "session_uuid", + "token_id" ], "properties": { "recipient": { @@ -130,13 +130,13 @@ } ] }, - "scope_uuid": { - "description": "Generated UUID to use for creating the NFT (Scope)", - "type": "string" - }, "session_uuid": { "description": "Generated UUID to use for creating the Session which encapsulates an owner data record", "type": "string" + }, + "token_id": { + "description": "Generated UUID to use for creating the NFT (Scope)", + "type": "string" } }, "additionalProperties": false diff --git a/contracts/nft/src/core/error.rs b/contracts/nft/src/core/error.rs index cc43645f..37df3c81 100644 --- a/contracts/nft/src/core/error.rs +++ b/contracts/nft/src/core/error.rs @@ -17,7 +17,7 @@ pub enum ContractError { #[error("Funds present")] FundsPresent {}, - + #[error("Limit exceeds maximum of: {max_limit}")] MaxLimitExceeded { max_limit: u32 }, diff --git a/contracts/nft/src/query/nft_info.rs b/contracts/nft/src/query/nft_info.rs index c7baac53..11cb7455 100644 --- a/contracts/nft/src/query/nft_info.rs +++ b/contracts/nft/src/query/nft_info.rs @@ -20,5 +20,13 @@ pub fn handle(deps: Deps, _env: Env, token_id: String) -> Result Result { - MetadataQuerier::new(&querier).scope(scope_id, "".to_string(), "".to_string(), true, true) + MetadataQuerier::new(&querier).scope( + scope_id, + "".to_string(), + "".to_string(), + true, + true, + false, + false, + ) } diff --git a/contracts/scope/Cargo.toml b/contracts/scope/Cargo.toml index f3544b2f..2ff90786 100644 --- a/contracts/scope/Cargo.toml +++ b/contracts/scope/Cargo.toml @@ -1,25 +1,16 @@ [package] name = "scope" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" exclude = [ - "scope.wasm", - "checksums.txt", + "scope.wasm", + "checksums.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - [lib] crate-type = ["cdylib", "rlib"] @@ -27,14 +18,14 @@ crate-type = ["cdylib", "rlib"] backtraces = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", default-features = false } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.12" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.40" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, default-features = false } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] -serde_json = { version = "1.0.96", features = ["std"]} -provwasm-mocks = { path = "../../packages/provwasm-mocks" } +serde_json = { workspace = true, features = ["std"] } +provwasm-mocks = { workspace = true } diff --git a/contracts/scope/Makefile b/contracts/scope/Makefile index 66e09084..f5afb162 100644 --- a/contracts/scope/Makefile +++ b/contracts/scope/Makefile @@ -1,6 +1,8 @@ .PHONY: all all: fmt build test lint schema optimize +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -32,10 +34,15 @@ check: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/scope \ --mount type=volume,source=scope_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 .PHONY: install install: diff --git a/contracts/scope/schema/scope.json b/contracts/scope/schema/scope.json index 13e40ee8..2567a768 100644 --- a/contracts/scope/schema/scope.json +++ b/contracts/scope/schema/scope.json @@ -1,6 +1,6 @@ { "contract_name": "scope", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", @@ -373,13 +373,21 @@ "ContractSpecificationRequest": { "type": "object", "required": [ + "exclude_id_info", "include_record_specs", + "include_request", "specification_id" ], "properties": { + "exclude_id_info": { + "type": "boolean" + }, "include_record_specs": { "type": "boolean" }, + "include_request": { + "type": "boolean" + }, "specification_id": { "type": "string" } @@ -446,7 +454,7 @@ "source": { "anyOf": [ { - "$ref": "#/definitions/Source" + "$ref": "#/definitions/Source2" }, { "type": "null" @@ -616,6 +624,39 @@ "additionalProperties": false } ] + }, + "Source2": { + "oneOf": [ + { + "type": "object", + "required": [ + "record_id" + ], + "properties": { + "record_id": { + "type": "array", + "items": { + "type": "integer", + "format": "uint8", + "minimum": 0.0 + } + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "hash" + ], + "properties": { + "hash": { + "type": "string" + } + }, + "additionalProperties": false + } + ] } } }, @@ -1073,6 +1114,8 @@ "RecordsRequest": { "type": "object", "required": [ + "exclude_id_info", + "include_request", "include_scope", "include_sessions", "name", @@ -1081,6 +1124,12 @@ "session_id" ], "properties": { + "exclude_id_info": { + "type": "boolean" + }, + "include_request": { + "type": "boolean" + }, "include_scope": { "type": "boolean" }, @@ -1891,6 +1940,8 @@ "RecordsRequest": { "type": "object", "required": [ + "exclude_id_info", + "include_request", "include_scope", "include_sessions", "name", @@ -1899,6 +1950,12 @@ "session_id" ], "properties": { + "exclude_id_info": { + "type": "boolean" + }, + "include_request": { + "type": "boolean" + }, "include_scope": { "type": "boolean" }, @@ -2874,16 +2931,24 @@ "ScopeRequest": { "type": "object", "required": [ + "exclude_id_info", "include_records", + "include_request", "include_sessions", "record_addr", "scope_id", "session_addr" ], "properties": { + "exclude_id_info": { + "type": "boolean" + }, "include_records": { "type": "boolean" }, + "include_request": { + "type": "boolean" + }, "include_sessions": { "type": "boolean" }, @@ -3951,7 +4016,9 @@ "SessionsRequest": { "type": "object", "required": [ + "exclude_id_info", "include_records", + "include_request", "include_scope", "record_addr", "record_name", @@ -3959,9 +4026,15 @@ "session_id" ], "properties": { + "exclude_id_info": { + "type": "boolean" + }, "include_records": { "type": "boolean" }, + "include_request": { + "type": "boolean" + }, "include_scope": { "type": "boolean" }, diff --git a/contracts/scope/src/contract.rs b/contracts/scope/src/contract.rs index c4b8e69b..8bf2e23a 100644 --- a/contracts/scope/src/contract.rs +++ b/contracts/scope/src/contract.rs @@ -1,12 +1,13 @@ use cosmwasm_std::{ entry_point, to_binary, Deps, DepsMut, Env, MessageInfo, QueryResponse, Response, StdError, }; + use provwasm_std::types::provenance::metadata::v1::{MetadataQuerier, MsgWriteScopeRequest, Scope}; use provwasm_std::types::provenance::name::v1::{MsgBindNameRequest, NameRecord}; use crate::error::ContractError; use crate::msg::{ExecuteMsg, InitMsg, QueryMsg}; -use crate::state::{config, State}; +use crate::state::{State, CONFIG}; /// Initialize config state and bind a name to the contract address. #[entry_point] @@ -17,9 +18,12 @@ pub fn instantiate( msg: InitMsg, ) -> Result { // Create and save contract config state. - config(deps.storage).save(&State { - contract_name: msg.name.clone(), - })?; + CONFIG.save( + deps.storage, + &State { + contract_name: msg.name.clone(), + }, + )?; let split: Vec<&str> = msg.name.splitn(2, '.').collect(); let record = split.first(); @@ -100,14 +104,22 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> Result Result { let querier = MetadataQuerier::new(&deps.querier); - let contract_spec_response = querier.contract_specification(id, true)?; + let contract_spec_response = querier.contract_specification(id, true, false, false)?; to_binary(&contract_spec_response) } // Use a ProvenanceQuerier to get a scope by ID. fn try_get_scope(deps: Deps, id: String) -> Result { let querier = MetadataQuerier::new(&deps.querier); - let scope_response = querier.scope(id, "".to_string(), "".to_string(), false, false)?; + let scope_response = querier.scope( + id, + "".to_string(), + "".to_string(), + false, + false, + false, + false, + )?; to_binary(&scope_response) } @@ -121,6 +133,8 @@ fn try_get_sessions(deps: Deps, scope_id: String) -> Result Result Result { let querier = MetadataQuerier::new(&deps.querier); - let records_response = - querier.records("".to_string(), scope_id, "".to_string(), name, false, false)?; + let records_response = querier.records( + "".to_string(), + scope_id, + "".to_string(), + name, + false, + false, + false, + false, + )?; to_binary(&records_response) } #[cfg(test)] mod tests { - use super::*; use cosmwasm_std::from_binary; use cosmwasm_std::testing::{mock_env, mock_info}; + use provwasm_mocks::mock_provenance_dependencies; use provwasm_std::types::provenance::metadata::v1::process::ProcessId; use provwasm_std::types::provenance::metadata::v1::record_input::Source; @@ -165,6 +189,8 @@ mod tests { ScopeWrapper, Session, SessionWrapper, SessionsRequest, SessionsResponse, }; + use super::*; + #[test] fn valid_init() { // Create default provenance mocks. diff --git a/contracts/scope/src/state.rs b/contracts/scope/src/state.rs index 77cfd7d1..3decddd1 100644 --- a/contracts/scope/src/state.rs +++ b/contracts/scope/src/state.rs @@ -1,20 +1,10 @@ +use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::Storage; -use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; - -pub static CONFIG_KEY: &[u8] = b"config"; +pub const CONFIG: Item = Item::new("config"); #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] pub struct State { pub contract_name: String, // The root name of the contract. } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/contracts/template/Cargo.lock b/contracts/template/Cargo.lock index b198b8ee..48cc8ee6 100644 --- a/contracts/template/Cargo.lock +++ b/contracts/template/Cargo.lock @@ -31,6 +31,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.4" @@ -61,12 +67,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bnum" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" - [[package]] name = "byteorder" version = "1.5.0" @@ -124,9 +124,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema" -version = "1.4.1" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fef683a9c1c4eabd6d31515719d0d2cc66952c4c87f7eb192bfc90384517dc34" +checksum = "0f00b363610218eea83f24bbab09e1a7c3920b79f068334fdfcc62f6129ef9fc" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.4.1" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9567025acbb4c0c008178393eb53b3ac3c2e492c25949d3bf415b9cbe80772d8" +checksum = "ae38f909b2822d32b275c9e2db9728497aa33ffe67dd463bc67c6a3b7092785c" dependencies = [ "proc-macro2", "quote", @@ -148,12 +148,11 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.4.1" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d89d680fb60439b7c5947b15f9c84b961b88d1f8a3b20c4bd178a3f87db8bae" +checksum = "a49b85345e811c8e80ec55d0d091e4fcb4f00f97ab058f9be5f614c444a730cb" dependencies = [ - "base64", - "bnum", + "base64 0.13.1", "cosmwasm-crypto", "cosmwasm-derive", "derivative", @@ -164,16 +163,7 @@ dependencies = [ "serde-json-wasm", "sha2 0.10.8", "thiserror", -] - -[[package]] -name = "cosmwasm-storage" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1c574d30feffe4b8121e61e839c231a5ce21901221d2fb4d5c945968a4f00" -dependencies = [ - "cosmwasm-std", - "serde", + "uint", ] [[package]] @@ -185,6 +175,12 @@ dependencies = [ "libc", ] +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + [[package]] name = "crypto-bigint" version = "0.5.3" @@ -220,25 +216,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "cw-multi-test" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d818f5323c80ed4890db7f89d65eda3f0261fe21878e628c27ea2d8de4b7ba4" -dependencies = [ - "anyhow", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "derivative", - "itertools 0.11.0", - "prost 0.12.1", - "schemars", - "serde", - "sha2 0.10.8", - "thiserror", -] - [[package]] name = "cw-storage-plus" version = "1.1.0" @@ -252,9 +229,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -267,9 +244,9 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" +checksum = "29ac2dc7a55ad64173ca1e0a46697c31b7a5c51342f55a1e84a724da4eb99908" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -469,15 +446,6 @@ 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 = "itoa" version = "1.0.9" @@ -537,9 +505,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -551,17 +519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" -dependencies = [ - "bytes", - "prost-derive 0.12.1", + "prost-derive", ] [[package]] @@ -571,32 +529,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "prost-derive" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" -dependencies = [ - "anyhow", - "itertools 0.11.0", - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "prost-types" version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ - "prost 0.11.9", + "prost", ] [[package]] @@ -610,9 +555,9 @@ dependencies = [ [[package]] name = "provwasm-mocks" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02175727ba6205cb5feac4724d3ab6f4e5833dddae517961bf820f6df4d3a6bd" +checksum = "e1143b9d41f537559d30a3cbbcbaa3a196f829fc298daaa4bbacd5ca90309950" dependencies = [ "cosmwasm-std", "provwasm-common", @@ -627,23 +572,23 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "792736fb76e0acb3118b22e5e55e456b22c67ac3ee51bfb1f7dfde09bd954560" dependencies = [ - "itertools 0.10.5", + "itertools", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] name = "provwasm-std" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d216752a4c37d7bc39ee1d397f6500fa92cf1c191c60b501038aa98cafa07c69" +checksum = "cc1be9fcaa463174e3bec59a179ed5b3590aa038f0e9c68d5132bc19df212383" dependencies = [ - "base64", + "base64 0.21.4", "chrono", "cosmwasm-schema", "cosmwasm-std", - "prost 0.11.9", + "prost", "prost-types", "provwasm-common", "provwasm-proc-macro", @@ -655,9 +600,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -701,9 +646,9 @@ checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "schemars" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -713,9 +658,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -739,15 +684,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" [[package]] name = "serde" -version = "1.0.189" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] @@ -772,13 +717,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.189" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -847,6 +792,12 @@ dependencies = [ "der", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "strum_macros" version = "0.24.3" @@ -879,9 +830,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -890,12 +841,10 @@ dependencies = [ [[package]] name = "template" -version = "2.2.0" +version = "2.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "cosmwasm-storage", - "cw-multi-test", "cw-storage-plus", "cw-utils", "cw2", @@ -909,22 +858,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.48", ] [[package]] @@ -933,6 +882,18 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "uint" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/contracts/template/Cargo.toml b/contracts/template/Cargo.toml index 7cb59aec..f2f5f322 100644 --- a/contracts/template/Cargo.toml +++ b/contracts/template/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "template" -version = "2.2.0" +version = "2.1.0" authors = ["Matthew Witkowski "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/provenance-io/fkneeland-figure/smart-contract-tutorial" description = "A simple smart contract used for testing inside of the Provenance blockchain" exclude = [ - # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. - "contract.wasm", - "hash.txt", + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", ] -[profile.release] -opt-level = 3 -debug = false -rpath = false -lto = true -debug-assertions = false -codegen-units = 1 -panic = 'abort' -incremental = false -overflow-checks = true - # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [lib] @@ -37,13 +26,13 @@ backtraces = [] #library = [] [dependencies] -cosmwasm-schema = { version = "1.2.5" } -cosmwasm-std = { version = "1.2.5", default-features = false } -cosmwasm-storage = { version = "1.2.5" } -provwasm-std = { path = "../../packages/provwasm-std" } -schemars = "0.8.3" -serde = { version = "1.0.127", default-features = false, features = ["derive"] } -thiserror = { version = "1.0.26" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, default-features = false } +cw-storage-plus = { workspace = true } +provwasm-std = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } +thiserror = { workspace = true } [dev-dependencies] #provwasm-mocks = { path = "../../todo/mocks" } diff --git a/contracts/tutorial/Makefile b/contracts/tutorial/Makefile index d6903adf..5d648a4f 100644 --- a/contracts/tutorial/Makefile +++ b/contracts/tutorial/Makefile @@ -4,6 +4,8 @@ all: fmt build test lint schema optimize .PHONY: pre-optimize pre-optimize: fmt build test lint schema +UNAME_M := $(shell uname -m) + .PHONY: fmt fmt: @cargo fmt --all -- --check @@ -31,7 +33,12 @@ clean: .PHONY: optimize optimize: - @docker run --rm -v $(CURDIR):/code:Z -v "$(CURDIR)/../../packages":/packages:Z \ + @if [ "$(UNAME_M)" = "arm64" ]; then \ + image="cosmwasm/optimizer-arm64"; \ + else \ + image="cosmwasm/optimizer"; \ + fi; \ + docker run --rm -v $(CURDIR)/../../:/code:Z --workdir /code/contracts/tutorial \ --mount type=volume,source=tutorial_cache,target=/code/target \ --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.10 + $$image:0.15.0 diff --git a/contracts/tutorial/schema/provwasm-tutorial.json b/contracts/tutorial/schema/provwasm-tutorial.json index 49af4334..9e6b9806 100644 --- a/contracts/tutorial/schema/provwasm-tutorial.json +++ b/contracts/tutorial/schema/provwasm-tutorial.json @@ -1,6 +1,6 @@ { "contract_name": "provwasm-tutorial", - "contract_version": "2.1.0", + "contract_version": "2.2.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", diff --git a/contracts/tutorial/src/contract.rs b/contracts/tutorial/src/contract.rs index db40f94c..62271d3e 100644 --- a/contracts/tutorial/src/contract.rs +++ b/contracts/tutorial/src/contract.rs @@ -7,7 +7,7 @@ use std::ops::Mul; use crate::error::ContractError; use crate::msg::{ExecuteMsg, InitMsg, MigrateMsg, QueryMsg}; -use crate::state::{config, config_read, State}; +use crate::state::{State, CONFIG}; /// Initialize the contract #[entry_point] @@ -40,12 +40,15 @@ pub fn instantiate( // Create and save contract config state. The fee collection address represents the network // (ie they get paid fees), thus they must be the message sender. let merchant_address = deps.api.addr_validate(&msg.merchant_address)?; - config(deps.storage).save(&State { - purchase_denom: msg.purchase_denom, - merchant_address, - fee_collection_address: info.sender, - fee_percent: msg.fee_percent, - })?; + CONFIG.save( + deps.storage, + &State { + purchase_denom: msg.purchase_denom, + merchant_address, + fee_collection_address: info.sender, + fee_percent: msg.fee_percent, + }, + )?; // Create a message that will bind a restricted name to the contract address. let split: Vec<&str> = msg.contract_name.splitn(2, '.').collect(); @@ -89,7 +92,7 @@ pub fn query( ) -> StdResult { match msg { QueryMsg::QueryRequest {} => { - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; let json = to_binary(&state)?; Ok(json) } @@ -130,7 +133,7 @@ fn try_purchase( } // Load state - let state = config_read(deps.storage).load()?; + let state = CONFIG.load(deps.storage)?; let fee_pct = state.fee_percent; // Ensure the funds have the required amount and denomination diff --git a/contracts/tutorial/src/state.rs b/contracts/tutorial/src/state.rs index 0883d08d..82b1ea2d 100644 --- a/contracts/tutorial/src/state.rs +++ b/contracts/tutorial/src/state.rs @@ -1,10 +1,9 @@ +use cosmwasm_std::{Addr, Decimal}; +use cw_storage_plus::Item; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; -use cosmwasm_std::{Addr, Decimal, Storage}; -use cosmwasm_storage::{singleton, singleton_read, ReadonlySingleton, Singleton}; - -pub static CONFIG_KEY: &[u8] = b"config"; +pub const CONFIG: Item = Item::new("config"); /// Fields that comprise the smart contract state #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] @@ -18,11 +17,3 @@ pub struct State { // The percentage to collect on transfers pub fee_percent: Decimal, } - -pub fn config(storage: &mut dyn Storage) -> Singleton { - singleton(storage, CONFIG_KEY) -} - -pub fn config_read(storage: &dyn Storage) -> ReadonlySingleton { - singleton_read(storage, CONFIG_KEY) -} diff --git a/dependencies/provenance b/dependencies/provenance index 5edcbb25..7b165708 160000 --- a/dependencies/provenance +++ b/dependencies/provenance @@ -1 +1 @@ -Subproject commit 5edcbb258e45c1d6b07903418b9471150d654b71 +Subproject commit 7b165708ccd30b98df0ac47fd541f572bcf2f001 diff --git a/packages/proto-build/Cargo.toml b/packages/proto-build/Cargo.toml index 7092b687..c6681f1b 100644 --- a/packages/proto-build/Cargo.toml +++ b/packages/proto-build/Cargo.toml @@ -1,9 +1,10 @@ [package] name = "proto-build" version = "0.1.0" +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley "] -edition = "2021" -license = "Apache-2.0" publish = false [dependencies] @@ -12,12 +13,12 @@ itertools = "0.11.0" log = "0.4.17" pretty_env_logger = "0.5.0" prettyplease = "0.2.4" -prost = "0.11.9" -prost-build = "0.11.9" -prost-types = "0.11.9" +prost = { workspace = true } +prost-build = { workspace = true } +prost-types = { workspace = true } quote = "1.0.26" regex = "1" rustix = "0.37.26" -syn = {version = "2.0.15", features = ["full", "parsing", "extra-traits"]} +syn = { version = "2.0.15", features = ["full", "parsing", "extra-traits"] } walkdir = "2" proc-macro2 = "1.0.56" \ No newline at end of file diff --git a/packages/proto-build/provenance.buf.gen.yaml b/packages/proto-build/provenance.buf.gen.yaml index 29c4868d..8d443163 100644 --- a/packages/proto-build/provenance.buf.gen.yaml +++ b/packages/proto-build/provenance.buf.gen.yaml @@ -8,7 +8,6 @@ plugins: - extern_path=.google.protobuf.Any=crate::shim::Any types: include: - - provenance.attribute.v1.Params - provenance.attribute.v1.Attribute - provenance.attribute.v1.AttributeType - provenance.attribute.v1.EventAttributeAdd @@ -46,7 +45,6 @@ types: - provenance.exchange.v1.EventMarketReqAttrUpdated - provenance.exchange.v1.EventMarketCreated - provenance.exchange.v1.EventMarketFeesUpdated - - provenance.exchange.v1.EventParamsUpdated - provenance.exchange.v1.MarketAccount - provenance.exchange.v1.MarketDetails - provenance.exchange.v1.MarketBrief @@ -57,7 +55,6 @@ types: - provenance.exchange.v1.Order - provenance.exchange.v1.AskOrder - provenance.exchange.v1.BidOrder - - provenance.exchange.v1.Params - provenance.exchange.v1.DenomSplit - provenance.exchange.v1.QueryOrderFeeCalcRequest - provenance.exchange.v1.QueryOrderFeeCalcResponse @@ -127,7 +124,6 @@ types: - provenance.marker.v1.AccessGrant - provenance.marker.v1.Access - provenance.marker.v1.MarkerTransferAuthorization - - provenance.marker.v1.Params - provenance.marker.v1.MarkerAccount - provenance.marker.v1.MarkerType - provenance.marker.v1.MarkerStatus @@ -193,6 +189,7 @@ types: - provenance.marker.v1.MsgWithdrawResponse - provenance.marker.v1.MsgTransferRequest - provenance.marker.v1.MsgTransferResponse + - provenance.marker.v1.MsgIbcTransferRequest - provenance.marker.v1.MsgIbcTransferResponse - provenance.marker.v1.MsgSetDenomMetadataRequest - provenance.marker.v1.MsgSetDenomMetadataResponse @@ -222,7 +219,6 @@ types: - provenance.metadata.v1.EventOSLocatorCreated - provenance.metadata.v1.EventOSLocatorUpdated - provenance.metadata.v1.EventOSLocatorDeleted - - provenance.metadata.v1.Params - provenance.metadata.v1.ScopeIdInfo - provenance.metadata.v1.SessionIdInfo - provenance.metadata.v1.RecordIdInfo @@ -330,12 +326,14 @@ types: - provenance.msgfees.v1.EventMsgFee - provenance.msgfees.v1.EventMsgFees - provenance.msgfees.v1.MsgFee - - provenance.msgfees.v1.Params - provenance.msgfees.v1.QueryParamsRequest - provenance.msgfees.v1.QueryParamsResponse + - provenance.msgfees.v1.QueryAllMsgFeesRequest + - provenance.msgfees.v1.QueryAllMsgFeesResponse + - provenance.msgfees.v1.CalculateTxFeesRequest + - provenance.msgfees.v1.CalculateTxFeesResponse - provenance.msgfees.v1.MsgAssessCustomMsgFeeRequest - provenance.msgfees.v1.MsgAssessCustomMsgFeeResponse - - provenance.name.v1.Params - provenance.name.v1.NameRecord - provenance.name.v1.CreateRootNameProposal - provenance.name.v1.EventNameBound diff --git a/packages/proto-build/src/main.rs b/packages/proto-build/src/main.rs index f32956bc..a0428d3e 100644 --- a/packages/proto-build/src/main.rs +++ b/packages/proto-build/src/main.rs @@ -10,7 +10,7 @@ use proto_build::{ }; /// The provenance commit or tag to be cloned and used to build the proto files -const PROVENANCE_REV: &str = "v1.17.0-rc1"; +const PROVENANCE_REV: &str = "v1.17.1"; // All paths must end with a / and either be absolute or include a ./ to reference the current // working directory. diff --git a/packages/proto-build/src/transformers.rs b/packages/proto-build/src/transformers.rs index 6c3f602e..323f7085 100644 --- a/packages/proto-build/src/transformers.rs +++ b/packages/proto-build/src/transformers.rs @@ -486,20 +486,20 @@ fn find_prost_enumeration_value(attrs: &[Attribute]) -> Option { }) } -fn has_prost_one_of_attr(attrs: &[Attribute]) -> bool { - attrs.iter().any(|attr| { - // Check if the attribute name is "prost". - if !attr.path().is_ident("prost") { - return false; - } - - // Parse all nested items inside the attribute - let list = attr.meta.require_list().unwrap(); - let nested = list - .parse_args_with(Punctuated::::parse_terminated) - .unwrap(); - - // Search all nested items and look for the "oneof" attribute. - nested.iter().any(|meta| meta.path().is_ident("oneof")) - }) -} +// fn has_prost_one_of_attr(attrs: &[Attribute]) -> bool { +// attrs.iter().any(|attr| { +// // Check if the attribute name is "prost". +// if !attr.path().is_ident("prost") { +// return false; +// } +// +// // Parse all nested items inside the attribute +// let list = attr.meta.require_list().unwrap(); +// let nested = list +// .parse_args_with(Punctuated::::parse_terminated) +// .unwrap(); +// +// // Search all nested items and look for the "oneof" attribute. +// nested.iter().any(|meta| meta.path().is_ident("oneof")) +// }) +// } diff --git a/packages/proto-build/third-party.buf.gen.yaml b/packages/proto-build/third-party.buf.gen.yaml index 809e9f47..50d2eb43 100644 --- a/packages/proto-build/third-party.buf.gen.yaml +++ b/packages/proto-build/third-party.buf.gen.yaml @@ -65,8 +65,6 @@ types: - cosmos.gov.v1beta1.MsgSubmitProposalResponse - cosmos.gov.v1beta1.MsgVote - cosmos.gov.v1beta1.MsgVoteResponse - - cosmos.gov.v1beta1.QueryProposalRequest - - cosmos.gov.v1beta1.QueryProposalResponse - cosmos.gov.v1beta1.QueryDepositRequest - cosmos.gov.v1beta1.QueryDepositResponse - cosmos.gov.v1beta1.QueryParamsRequest @@ -92,4 +90,20 @@ types: - cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - cosmos.upgrade.v1beta1.ModuleVersion - - cosmwasm.wasm.v1 \ No newline at end of file + - cosmwasm.wasm.v1 + - ibc.applications.fee.v1.MsgRegisterPayee + - ibc.applications.fee.v1.MsgRegisterPayeeResponse + - ibc.applications.fee.v1.MsgRegisterCounterpartyPayee + - ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse + - ibc.applications.fee.v1.MsgPayPacketFee + - ibc.applications.fee.v1.MsgPayPacketFeeResponse + - ibc.applications.fee.v1.MsgPayPacketFeeAsync + - ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse + - ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount + - ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse + - ibc.applications.interchain_accounts.controller.v1.MsgSendTx + - ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse + - ibc.applications.transfer.v1.MsgTransfer + - ibc.applications.transfer.v1.MsgTransferResponse + - ibc.applications.transfer.v1.QueryDenomTraceRequest + - ibc.applications.transfer.v1.QueryDenomTraceResponse \ No newline at end of file diff --git a/packages/provwasm-common/Cargo.toml b/packages/provwasm-common/Cargo.toml index 3d71e540..9d314eed 100644 --- a/packages/provwasm-common/Cargo.toml +++ b/packages/provwasm-common/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "provwasm-common" version = "0.1.0" +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/provenance-io/provwasm/tree/main/packages/provwasm-common" description = "Common library for ProvWasm internal" keywords = ["provenance", "blockchain", "smart-contracts", "defi", "finance"] categories = ["cryptography::cryptocurrencies", "wasm"] @@ -12,5 +12,5 @@ categories = ["cryptography::cryptocurrencies", "wasm"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = {version = "1.2.5", features = ["stargate"]} +cosmwasm-std = {workspace = true, features = ["stargate"]} diff --git a/packages/provwasm-mocks/Cargo.toml b/packages/provwasm-mocks/Cargo.toml index 37f965da..6f48512c 100644 --- a/packages/provwasm-mocks/Cargo.toml +++ b/packages/provwasm-mocks/Cargo.toml @@ -1,18 +1,18 @@ [package] name = "provwasm-mocks" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley <4344285+kwtalley@users.noreply.github.com"] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/provenance-io/provwasm/tree/main/packages/provwasm-mocks" description = "Rust mocks that enable unit testing of CosmWasm smart contracts that interact with custom modules in the Provenance Blockchain" readme = "README.md" keywords = ["provenance", "blockchain", "smart-contracts", "defi", "finance"] categories = ["development-tools::testing", "cryptography::cryptocurrencies", "wasm"] [dependencies] -provwasm-common = { version = "0.1.0", path = "../provwasm-common"} -provwasm-std = { version = "2.2.0", path = "../provwasm-std" } -cosmwasm-std = { version = "1.2.5", default-features = false } -schemars = "0.8.8" -serde = { version = "1.0.163", default-features = false, features = ["derive"] } +provwasm-common = { workspace = true } +provwasm-std = { workspace = true } +cosmwasm-std = { workspace = true, default-features = false } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } diff --git a/packages/provwasm-mocks/src/attribute.rs b/packages/provwasm-mocks/src/attribute.rs deleted file mode 100644 index 5116f43b..00000000 --- a/packages/provwasm-mocks/src/attribute.rs +++ /dev/null @@ -1,217 +0,0 @@ -use crate::common::query_result; -use cosmwasm_std::{to_binary, Addr, Binary, QuerierResult}; -use provwasm_std::{Attribute, AttributeQueryParams, AttributeValueType, Attributes}; -use std::collections::HashMap; - -/// A mock for testing provenance account attribute queries. -#[deprecated(since = "2.0.0")] -#[derive(Clone, Default)] -pub struct AttributeQuerier { - records: HashMap>, -} - -// Helper function to convert string to attribute value type. -#[deprecated(since = "2.0.0")] -fn determine_attr_type(typ: &str) -> AttributeValueType { - if typ == "json" { - AttributeValueType::Json - } else if typ == "bytes" { - AttributeValueType::Bytes - } else if typ == "uuid" { - AttributeValueType::Uuid - } else if typ == "uri" { - AttributeValueType::Uri - } else if typ == "proto" { - AttributeValueType::Proto - } else if typ == "int" { - AttributeValueType::Int - } else if typ == "float" { - AttributeValueType::Float - } else { - AttributeValueType::String - } -} - -impl AttributeQuerier { - pub fn new(address: &str, inputs: &[(&str, &str, &str)]) -> Self { - let mut records = HashMap::new(); - let mut attrs = vec![]; - for (n, v, t) in inputs.iter() { - let name = (*n).to_string(); - let value = (*v).to_string(); - attrs.push(Attribute { - name, - value: Binary::from(value.as_bytes()), - value_type: determine_attr_type(t), - }); - } - records.insert(Addr::unchecked(address), attrs); - AttributeQuerier { records } - } - - fn get_attributes_by_name(&self, address: &Addr, name: &str) -> Attributes { - Attributes { - address: address.clone(), - attributes: self - .records - .get(address) - .map(|attrs| { - attrs - .iter() - .filter(|r| r.name.to_lowercase() == *name.to_lowercase()) - .cloned() - .collect() - }) - .unwrap_or_else(Vec::new), - } - } - - fn get_attributes(&self, address: &Addr) -> Attributes { - Attributes { - address: address.clone(), - attributes: self.records.get(address).unwrap_or(&vec![]).to_vec(), - } - } - - pub fn query(&self, params: &AttributeQueryParams) -> QuerierResult { - let attributes = match params { - AttributeQueryParams::GetAttributes { address, name } => { - self.get_attributes_by_name(address, name) - } - AttributeQueryParams::GetAllAttributes { address } => self.get_attributes(address), - }; - query_result(to_binary(&attributes)) - } -} - -#[cfg(test)] -mod test { - use super::*; - use cosmwasm_std::from_binary; - use provwasm_std::{AttributeQueryParams, Attributes}; - - #[test] - fn get_attributes() { - let querier = AttributeQuerier::new( - "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", - &[ - ("id", "88202946-4447-401c-b38c-75c46d8b5692", "uuid"), - ("profile", "dd152f91-e39f-4c17-9ebf-6eb534ec61e5", "uuid"), - ], - ); - - let params = AttributeQueryParams::GetAttributes { - address: Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync"), - name: String::from("id"), - }; - - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Attributes = from_binary(&bin).unwrap(); - - assert_eq!( - rep.address, - Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync") - ); - assert_eq!(rep.attributes.len(), 1); - assert_eq!( - rep.attributes[0].value, - Binary::from("88202946-4447-401c-b38c-75c46d8b5692".as_bytes()) - ) - } - - #[test] - fn get_attributes_empty() { - let querier = AttributeQuerier::new( - "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", - &[ - ("id", "88202946-4447-401c-b38c-75c46d8b5692", "uuid"), - ("profile", "dd152f91-e39f-4c17-9ebf-6eb534ec61e5", "uuid"), - ], - ); - - let params = AttributeQueryParams::GetAttributes { - address: Addr::unchecked("tp1fhdhzrnpq9rnnyp8r6xvm75t0cmdul3xqyp6sd"), - name: String::from("uuid"), - }; - - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Attributes = from_binary(&bin).unwrap(); - - // Assert there are no records, but not an error - assert_eq!(rep.attributes.len(), 0); - } - - #[test] - fn get_all_attributes() { - let querier = AttributeQuerier::new( - "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", - &[ - ("id", "88202946-4447-401c-b38c-75c46d8b5692", "uuid"), - ("profile", "dd152f91-e39f-4c17-9ebf-6eb534ec61e5", "uuid"), - ("kyc", "8cd6ec14-3f5e-4a08-98c5-0ea1585f9b76", "uuid"), - ], - ); - - let params = AttributeQueryParams::GetAllAttributes { - address: Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync"), - }; - - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Attributes = from_binary(&bin).unwrap(); - - assert_eq!( - rep.address, - Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync") - ); - assert_eq!(rep.attributes.len(), 3); - } - - #[test] - fn get_attributes_dup_keys() { - let querier = AttributeQuerier::new( - "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", - &[ - ("id", "88202946-4447-401c-b38c-75c46d8b5692", "uuid"), - ("id", "06c1494e-fdee-4396-b7e9-16688ff5966c", "uuid"), - ("profile", "dd152f91-e39f-4c17-9ebf-6eb534ec61e5", "uuid"), - ("kyc", "8cd6ec14-3f5e-4a08-98c5-0ea1585f9b76", "uuid"), - ], - ); - - let params = AttributeQueryParams::GetAttributes { - address: Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync"), - name: String::from("id"), - }; - - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Attributes = from_binary(&bin).unwrap(); - - assert_eq!( - rep.address, - Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync") - ); - assert_eq!(rep.attributes.len(), 2); - } - - #[test] - fn get_all_attributes_empty() { - let querier = AttributeQuerier::new( - "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", - &[ - ("id", "88202946-4447-401c-b38c-75c46d8b5692", "uuid"), - ("profile", "dd152f91-e39f-4c17-9ebf-6eb534ec61e5", "uuid"), - ("kyc", "8cd6ec14-3f5e-4a08-98c5-0ea1585f9b76", "uuid"), - ], - ); - - let params = AttributeQueryParams::GetAllAttributes { - address: Addr::unchecked("tp1fhdhzrnpq9rnnyp8r6xvm75t0cmdul3xqyp6sd"), - }; - - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Attributes = from_binary(&bin).unwrap(); - - // Assert there are no records, but not an error - assert_eq!(rep.attributes.len(), 0); - } -} diff --git a/packages/provwasm-mocks/src/common.rs b/packages/provwasm-mocks/src/common.rs deleted file mode 100644 index eb8a8e98..00000000 --- a/packages/provwasm-mocks/src/common.rs +++ /dev/null @@ -1,31 +0,0 @@ -use cosmwasm_std::{Binary, ContractResult, QuerierResult, StdResult, SystemError, SystemResult}; -use std::fs::File; -use std::io::Read; - -// Helper for returning mock query success cases. -pub fn query_result(bin: StdResult) -> QuerierResult { - SystemResult::Ok(ContractResult::Ok(bin.unwrap())) -} - -// Helper for returning mock query error cases. -pub fn query_error(error: &str, bin: StdResult) -> QuerierResult { - SystemResult::Err(SystemError::InvalidRequest { - error: String::from(error), - request: bin.unwrap(), - }) -} - -/// A helper function for mock testing. This function allows tests to read a file in CosmWasm binary -/// format. This function will panic on any error. Because of this, it should only be used in tests. -pub fn must_read_binary_file(filename: &str) -> Binary { - match File::open(filename) { - Ok(mut file) => { - let mut content = String::new(); - file.read_to_string(&mut content).unwrap(); - Binary::from(content.as_bytes()) - } - Err(error) => { - panic!("Error opening file {}: {}", filename, error); - } - } -} diff --git a/packages/provwasm-mocks/src/lib.rs b/packages/provwasm-mocks/src/lib.rs index 8d90866b..ebcdf606 100644 --- a/packages/provwasm-mocks/src/lib.rs +++ b/packages/provwasm-mocks/src/lib.rs @@ -1,26 +1,6 @@ -#[allow(deprecated)] -pub use attribute::AttributeQuerier; -pub use common::must_read_binary_file; -#[allow(deprecated)] -pub use marker::MarkerQuerier; -#[allow(deprecated)] -pub use metadata::MetadataQuerier; -#[allow(deprecated)] -pub use name::NameQuerier; -#[allow(deprecated)] pub use querier::{ - mock_dependencies, mock_dependencies_with_balances, mock_provenance_dependencies, - mock_provenance_dependencies_with_custom_querier, MockProvenanceQuerier, ProvenanceMockQuerier, + mock_provenance_dependencies, mock_provenance_dependencies_with_custom_querier, + MockProvenanceQuerier, }; - -#[allow(deprecated)] -mod attribute; -mod common; -#[allow(deprecated)] -mod marker; -#[allow(deprecated)] -mod metadata; -#[allow(deprecated)] -mod name; #[allow(deprecated)] mod querier; diff --git a/packages/provwasm-mocks/src/marker.rs b/packages/provwasm-mocks/src/marker.rs deleted file mode 100644 index dd43672e..00000000 --- a/packages/provwasm-mocks/src/marker.rs +++ /dev/null @@ -1,136 +0,0 @@ -use crate::common::{query_error, query_result}; -use cosmwasm_std::{to_binary, Addr, QuerierResult}; -use provwasm_std::{Marker, MarkerQueryParams}; -use std::collections::HashMap; - -/// A mock for testing provenance marker module queries. -#[deprecated(since = "2.0.0")] -#[derive(Clone, Default)] -pub struct MarkerQuerier { - denom_records: HashMap, - address_records: HashMap, -} - -impl MarkerQuerier { - pub fn new(inputs: Vec) -> Self { - let mut denom_records = HashMap::new(); - let mut address_records = HashMap::new(); - for m in inputs.iter() { - denom_records.insert(m.denom.clone(), m.clone()); - address_records.insert(m.address.clone(), m.clone()); - } - MarkerQuerier { - denom_records, - address_records, - } - } - - fn get_marker_by_denom(&self, denom: &str) -> Option { - self.denom_records - .get(denom) - .map(|marker| query_result(to_binary(&marker))) - } - - fn get_marker_by_address(&self, address: &Addr) -> Option { - self.address_records - .get(address) - .map(|marker| query_result(to_binary(&marker))) - } - - pub fn query(&self, params: &MarkerQueryParams) -> QuerierResult { - let maybe_marker = match params { - MarkerQueryParams::GetMarkerByAddress { address } => { - self.get_marker_by_address(address) - } - MarkerQueryParams::GetMarkerByDenom { denom } => self.get_marker_by_denom(denom), - }; - match maybe_marker { - Some(r) => r, - None => query_error("marker not found", to_binary(params)), - } - } -} - -#[cfg(test)] -mod test { - use super::*; - use crate::common::must_read_binary_file; - use cosmwasm_std::{from_binary, SystemError}; - use provwasm_std::{MarkerQueryParams, MarkerStatus, MarkerType}; - - #[test] - fn get_marker_by_denom() { - let bin = must_read_binary_file("testdata/marker.json"); - let expected_marker: Marker = from_binary(&bin).unwrap(); - let querier = MarkerQuerier::new(vec![expected_marker.clone()]); - - let params = MarkerQueryParams::GetMarkerByDenom { - denom: "nugz".into(), - }; - let bin = querier.query(¶ms).unwrap().unwrap(); - let marker: Marker = from_binary(&bin).unwrap(); - - assert_eq!(marker, expected_marker) - } - - #[test] - fn get_manager() { - // Set up mocks - let bin = must_read_binary_file("testdata/marker.json"); - let test_marker: Marker = from_binary(&bin).unwrap(); - let querier = MarkerQuerier::new(vec![test_marker]); - - // Query for marker - let res = querier - .query(&MarkerQueryParams::GetMarkerByDenom { - denom: "nugz".into(), - }) - .unwrap(); - let bin = res.unwrap(); - let marker: Marker = from_binary(&bin).unwrap(); - - // Ensure the manager address is set on proposed marker. - assert_eq!(marker.status, MarkerStatus::Proposed); - assert_eq!(marker.manager, "tp15rrl3qjafxzlzguu5x29xh29pam35uetkpnnph") - } - - #[test] - fn get_marker_by_address() { - let bin = must_read_binary_file("testdata/marker.json"); - let expected_marker: Marker = from_binary(&bin).unwrap(); - let querier = MarkerQuerier::new(vec![expected_marker.clone()]); - - let params = MarkerQueryParams::GetMarkerByAddress { - address: Addr::unchecked("tp18vmzryrvwaeykmdtu6cfrz5sau3dhc5c73ms0u"), - }; - let bin = querier.query(¶ms).unwrap().unwrap(); - let marker: Marker = from_binary(&bin).unwrap(); - - assert_eq!(marker, expected_marker) - } - - #[test] - fn get_marker_not_found() { - let querier = MarkerQuerier::default(); - let params = MarkerQueryParams::GetMarkerByDenom { - denom: "budz".into(), - }; - let err = querier.query(¶ms).unwrap_err(); - match err { - SystemError::InvalidRequest { error, .. } => assert_eq!(error, "marker not found"), - _ => panic!("unexpected error type"), - } - } - - #[test] - fn get_active_restricted_marker() { - // Assert that bank sends are disabled for restricted markers - let bin = must_read_binary_file("testdata/marker_restricted.json"); - let marker: Marker = from_binary(&bin).unwrap(); - assert_eq!(marker.marker_type, MarkerType::Restricted); - assert_eq!(marker.bank_sends_disabled(), true); - // Check manager is None for active markers - assert_eq!(marker.status, MarkerStatus::Active); - assert_eq!(marker.manager, ""); - } -} diff --git a/packages/provwasm-mocks/src/metadata.rs b/packages/provwasm-mocks/src/metadata.rs deleted file mode 100644 index 5902f7c4..00000000 --- a/packages/provwasm-mocks/src/metadata.rs +++ /dev/null @@ -1,155 +0,0 @@ -use crate::common::{query_error, query_result}; -use cosmwasm_std::{to_binary, QuerierResult}; -use provwasm_std::{MetadataQueryParams, Records, Scope, Sessions}; -use std::collections::HashMap; - -/// A mock for testing provenance metadata module queries. -#[deprecated(since = "2.0.0")] -#[derive(Clone, Default)] -pub struct MetadataQuerier { - scope_store: HashMap, - sessions_store: HashMap, - records_store: HashMap, -} - -impl MetadataQuerier { - /// Create a new mock metdata querier with some scope metadata set. It is assumed that if - /// sessions and records are passed, they are for the provided scope. - pub fn new(scope: Scope, sessions: Option, records: Option) -> Self { - // Store scope - let mut scope_store = HashMap::new(); - scope_store.insert(scope.scope_id.to_string(), scope.clone()); - // Store sessions - let mut sessions_store = HashMap::new(); - sessions.into_iter().for_each(|s| { - sessions_store.insert(scope.scope_id.to_string(), s); - }); - // Store records - let mut records_store = HashMap::new(); - records.into_iter().for_each(|r| { - records_store.insert(scope.scope_id.to_string(), r); - }); - // Create and return the mock metadata querier - MetadataQuerier { - scope_store, - sessions_store, - records_store, - } - } - - fn get_scope(&self, scope_id: &str) -> Option { - self.scope_store - .get(&scope_id.to_string()) - .map(|scope| query_result(to_binary(scope))) - } - - fn get_sessions(&self, scope_id: &str) -> Option { - self.sessions_store - .get(&scope_id.to_string()) - .map(|sessions| query_result(to_binary(sessions))) - } - - fn get_records(&self, scope_id: &str, name: Option) -> Option { - self.records_store - .get(&scope_id.to_string()) - .map(|r| Records { - records: r - .records - .iter() - .filter(|rec| name.is_none() || rec.name == name.clone().unwrap()) - .cloned() - .collect(), - }) - .map(|records| query_result(to_binary(&records))) - } - - pub fn query(&self, params: &MetadataQueryParams) -> QuerierResult { - let maybe_result = match params { - MetadataQueryParams::GetScope { scope_id } => self.get_scope(scope_id), - MetadataQueryParams::GetSessions { scope_id } => self.get_sessions(scope_id), - MetadataQueryParams::GetRecords { scope_id, name } => { - self.get_records(scope_id, name.clone()) - } - }; - match maybe_result { - Some(r) => r, - None => query_error("metadata not found", to_binary(params)), - } - } -} - -#[cfg(test)] -mod test { - use super::*; - use crate::common::must_read_binary_file; - use cosmwasm_std::{from_binary, Binary}; - - // The scope ID used for test queries. - const TEST_SCOPE_ID: &str = "scope1qqqqq2wf3c4yt4u447m8pw65qcdqrre82d"; - - // Read a test scope from file. - fn test_scope() -> Scope { - let bin = must_read_binary_file("testdata/scope.json"); - from_binary(&bin).unwrap() - } - // Read test sessions from file. - fn test_sessions() -> Sessions { - let bin = must_read_binary_file("testdata/sessions.json"); - from_binary(&bin).unwrap() - } - - // Read test records from file. - fn test_records() -> Records { - let bin = must_read_binary_file("testdata/records.json"); - from_binary(&bin).unwrap() - } - - // Execute a query against the mock metadata querier. - fn mock_query(params: &MetadataQueryParams) -> Binary { - let querier = - MetadataQuerier::new(test_scope(), Some(test_sessions()), Some(test_records())); - querier.query(params).unwrap().unwrap() - } - - #[test] - fn query_scope() { - let result = mock_query(&MetadataQueryParams::GetScope { - scope_id: TEST_SCOPE_ID.into(), - }); - let scope: Scope = from_binary(&result).unwrap(); - assert_eq!(scope, test_scope()) - } - - #[test] - fn query_sessions() { - let result = mock_query(&MetadataQueryParams::GetSessions { - scope_id: TEST_SCOPE_ID.into(), - }); - let sessions: Sessions = from_binary(&result).unwrap(); - assert_eq!(sessions, test_sessions()) - } - - #[test] - fn query_records() { - let result = mock_query(&MetadataQueryParams::GetRecords { - scope_id: TEST_SCOPE_ID.into(), - name: None, - }); - let records: Records = from_binary(&result).unwrap(); - assert_eq!(records, test_records()) - } - - #[test] - fn query_records_by_name() { - let bin = must_read_binary_file("testdata/loan_record.json"); - let expected: Records = from_binary(&bin).unwrap(); - - let result = mock_query(&MetadataQueryParams::GetRecords { - scope_id: TEST_SCOPE_ID.into(), - name: Some("loan".into()), - }); - - let records: Records = from_binary(&result).unwrap(); - assert_eq!(records, expected) - } -} diff --git a/packages/provwasm-mocks/src/name.rs b/packages/provwasm-mocks/src/name.rs deleted file mode 100644 index 48a37a84..00000000 --- a/packages/provwasm-mocks/src/name.rs +++ /dev/null @@ -1,138 +0,0 @@ -use crate::common::{query_error, query_result}; -use cosmwasm_std::{to_binary, Addr, QuerierResult}; -use provwasm_std::{Name, NameQueryParams, Names}; -use std::collections::HashMap; - -/// A mock for testing provenance name module queries. -#[deprecated(since = "2.0.0")] -#[derive(Clone, Default)] -pub struct NameQuerier { - records: HashMap, -} - -impl NameQuerier { - pub fn new(inputs: &[(&str, &str, bool)]) -> Self { - let mut records = HashMap::new(); - for (n, a, r) in inputs.iter() { - let name = (*n).to_string(); - records.insert( - name.clone(), - Name { - name, - address: Addr::unchecked(*a), - restricted: *r, - }, - ); - } - NameQuerier { records } - } - - fn get_names(&self, name: &str) -> Option { - self.records.get(name).map(|record| Names { - records: vec![record.to_owned()], - }) - } - - fn lookup_names(&self, address: &Addr) -> Names { - Names { - records: self - .records - .values() - .cloned() - .filter(|r| !r.address.to_string().is_empty() && r.address == *address) - .collect(), - } - } - - pub fn query(&self, params: &NameQueryParams) -> QuerierResult { - match params { - NameQueryParams::Resolve { name } => match self.get_names(name) { - Some(names) => query_result(to_binary(&names)), - None => query_error("no address bound to name", to_binary(params)), - }, - NameQueryParams::Lookup { address } => { - let names = self.lookup_names(address); - query_result(to_binary(&names)) - } - } - } -} - -#[cfg(test)] -mod test { - use super::*; - use cosmwasm_std::{from_binary, SystemError}; - - #[test] - fn resolve() { - let querier = NameQuerier::new(&[ - ("foo.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false), - ("bar.pb", "tp1238aw49q0nvz6nyj86mxgppn0wt60td5ngfhk9", false), - ]); - - let params = NameQueryParams::Resolve { - name: String::from("foo.pb"), - }; - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Names = from_binary(&bin).unwrap(); - - assert_eq!(rep.records.len(), 1); - assert_eq!( - rep.records[0].address, - Addr::unchecked("tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync") - ) - } - - #[test] - fn resolve_name_not_bound_err() { - let querier = - NameQuerier::new(&[("foo.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false)]); - - let params = NameQueryParams::Resolve { - name: String::from("bar.pb"), - }; - let err = querier.query(¶ms).unwrap_err(); - - match err { - SystemError::InvalidRequest { error, .. } => { - assert_eq!(error, "no address bound to name") - } - _ => panic!("unexpected error type"), - } - } - - #[test] - fn lookup() { - let querier = NameQuerier::new(&[ - ("foo.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false), - ("bar.pb", "tp1238aw49q0nvz6nyj86mxgppn0wt60td5ngfhk9", false), - ]); - - let params = NameQueryParams::Lookup { - address: Addr::unchecked("tp1238aw49q0nvz6nyj86mxgppn0wt60td5ngfhk9"), - }; - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Names = from_binary(&bin).unwrap(); - - assert_eq!(rep.records.len(), 1); - assert_eq!(rep.records[0].name, "bar.pb") - } - - #[test] - fn lookup_empty() { - let querier = NameQuerier::new(&[ - ("foo.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false), - ("bar.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false), - ("baz.pb", "tp1y0txdp3sqmxjvfdaa8hfvwcljl8ugcfv26uync", false), - ]); - - let params = NameQueryParams::Lookup { - address: Addr::unchecked("tp1238aw49q0nvz6nyj86mxgppn0wt60td5ngfhk9"), - }; - let bin = querier.query(¶ms).unwrap().unwrap(); - let rep: Names = from_binary(&bin).unwrap(); - - // Assert there are no records, but not an error - assert_eq!(rep.records.len(), 0); - } -} diff --git a/packages/provwasm-mocks/src/querier.rs b/packages/provwasm-mocks/src/querier.rs index 19fa2041..7967cad6 100644 --- a/packages/provwasm-mocks/src/querier.rs +++ b/packages/provwasm-mocks/src/querier.rs @@ -1,126 +1,14 @@ -use crate::{AttributeQuerier, MarkerQuerier, MetadataQuerier, NameQuerier}; -use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage, MOCK_CONTRACT_ADDR}; -use cosmwasm_std::{ - from_slice, to_binary, Binary, Coin, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, - StdResult, SystemError, SystemResult, -}; -use provwasm_common::MockableQuerier; -use provwasm_std::{Marker, ProvenanceQuery, ProvenanceQueryParams, Records, Scope, Sessions}; -use serde::de::DeserializeOwned; use std::collections::HashMap; use std::marker::PhantomData; -/// A drop-in replacement for cosmwasm_std::testing::mock_dependencies that uses the mock -/// provenance querier. -#[deprecated(since = "2.0.0")] -pub fn mock_dependencies( - contract_balance: &[Coin], -) -> OwnedDeps { - let base = MockQuerier::new(&[(MOCK_CONTRACT_ADDR, contract_balance)]); - OwnedDeps { - storage: MockStorage::default(), - api: MockApi::default(), - querier: ProvenanceMockQuerier::new(base), - custom_query_type: PhantomData, - } -} - -/// Initializes the mock querier with the account balances provided. NOTE: contract balance must -/// be set in the balances slice passed if required. -#[deprecated(since = "2.0.0")] -pub fn mock_dependencies_with_balances( - balances: &[(&str, &[Coin])], -) -> OwnedDeps { - let base = MockQuerier::new(balances); - OwnedDeps { - storage: MockStorage::default(), - api: MockApi::default(), - querier: ProvenanceMockQuerier::new(base), - custom_query_type: PhantomData, - } -} - -#[deprecated(since = "2.0.0")] -pub struct ProvenanceMockQuerier { - pub base: MockQuerier, - name: NameQuerier, - attribute: AttributeQuerier, - marker: MarkerQuerier, - metadata: MetadataQuerier, -} - -impl Querier for ProvenanceMockQuerier { - fn raw_query(&self, bin_request: &[u8]) -> QuerierResult { - let request: StdResult> = from_slice(bin_request); - match &request { - Ok(provenance_query) => self.handle_query(provenance_query), - _ => self.base.raw_query(bin_request), - } - } -} - -impl ProvenanceMockQuerier { - pub fn handle_query(&self, request: &QueryRequest) -> QuerierResult { - match request { - QueryRequest::Custom(custom) => match &custom.params { - ProvenanceQueryParams::Attribute(p) => self.attribute.query(p), - ProvenanceQueryParams::Marker(p) => self.marker.query(p), - ProvenanceQueryParams::Name(p) => self.name.query(p), - ProvenanceQueryParams::Metadata(p) => self.metadata.query(p), - }, - QueryRequest::Bank(q) => self.base.handle_query(&QueryRequest::Bank(q.clone())), - #[cfg(feature = "staking")] - QueryRequest::Staking(q) => self.base.handle_query(&QueryRequest::Staking(q.clone())), - QueryRequest::Wasm(q) => self.base.handle_query(&QueryRequest::Wasm(q.clone())), - // Note: As of 0.14, no mocks exist for stargate or ibc queries in base, so we just - // return an error. - _ => SystemResult::Err(SystemError::InvalidRequest { - error: "invalid query request type".into(), - request: to_binary(&request).unwrap(), - }), - } - } -} - -impl ProvenanceMockQuerier { - pub fn new(base: MockQuerier) -> Self { - ProvenanceMockQuerier { - base, - attribute: AttributeQuerier::default(), - name: NameQuerier::default(), - marker: MarkerQuerier::default(), - metadata: MetadataQuerier::default(), - } - } - - pub fn with_names(&mut self, inputs: &[(&str, &str, bool)]) { - self.name = NameQuerier::new(inputs); - } - - pub fn with_attributes(&mut self, address: &str, inputs: &[(&str, &str, &str)]) { - self.attribute = AttributeQuerier::new(address, inputs); - } - - pub fn with_markers(&mut self, inputs: Vec) { - self.marker = MarkerQuerier::new(inputs); - } - - pub fn with_scope(&mut self, scope: Scope) { - self.metadata = MetadataQuerier::new(scope, None, None) - } - - pub fn with_sessions(&mut self, scope: Scope, sessions: Sessions) { - self.metadata = MetadataQuerier::new(scope, Some(sessions), None) - } - - pub fn with_records(&mut self, scope: Scope, records: Records) { - self.metadata = MetadataQuerier::new(scope, None, Some(records)) - } +use cosmwasm_std::testing::{MockApi, MockQuerier, MockStorage}; +use cosmwasm_std::{ + from_slice, Binary, Coin, Empty, OwnedDeps, Querier, QuerierResult, QueryRequest, SystemError, + SystemResult, +}; +use serde::de::DeserializeOwned; - pub fn with_metadata(&mut self, scope: Scope, sessions: Sessions, records: Records) { - self.metadata = MetadataQuerier::new(scope, Some(sessions), Some(records)) - } -} +use provwasm_common::MockableQuerier; pub struct MockProvenanceQuerier { /// Default CosmWASM mock querier. @@ -172,7 +60,7 @@ impl Querier for MockProvenanceQuerier { return SystemResult::Err(SystemError::InvalidRequest { error: format!("Parsing query request: {}", e), request: bin_request.into(), - }) + }); } }; self.handle_query(&request) @@ -207,28 +95,9 @@ pub fn mock_provenance_dependencies( #[cfg(test)] mod test { - use super::*; use cosmwasm_std::{coin, from_binary, BalanceResponse, BankQuery}; - #[test] - fn query_with_balances() { - let amount = coin(12345, "denom"); - let deps = mock_dependencies_with_balances(&[("alice", &[amount.clone()])]); - let bin = deps - .querier - .handle_query( - &BankQuery::Balance { - address: "alice".into(), - denom: "denom".into(), - } - .into(), - ) - .unwrap() - .unwrap(); - - let res: BalanceResponse = from_binary(&bin).unwrap(); - assert_eq!(res.amount, amount); - } + use super::*; #[test] fn query_with_balances_2_0() { diff --git a/packages/provwasm-proc-macro/Cargo.toml b/packages/provwasm-proc-macro/Cargo.toml index f6130e13..f583096f 100644 --- a/packages/provwasm-proc-macro/Cargo.toml +++ b/packages/provwasm-proc-macro/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "provwasm-proc-macro" version = "0.1.0" +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/provenance-io/provwasm/tree/main/packages/provwasm-proc-macro" description = "Rust macros that simplify query and response types for Provenance Blockchain smart contracts" keywords = ["provenance", "blockchain", "smart-contracts", "defi", "finance"] categories = ["api-bindings", "cryptography::cryptocurrencies", "wasm"] @@ -19,8 +19,8 @@ quote = "1.0.27" syn = "2.0.16" [dev-dependencies] -cosmwasm-std = {version = "1.2.5", features = ["stargate"]} -prost = "0.11.9" -serde = "1.0.163" +cosmwasm-std = {workspace = true, features = ["stargate"]} +prost = {workspace = true} +serde = {workspace = true} trybuild = {version = "1.0.80", features = ["diff"]} -provwasm-common = { version = "0.1.0", path = "../provwasm-common" } \ No newline at end of file +provwasm-common = { workspace = true } \ No newline at end of file diff --git a/packages/provwasm-std/Cargo.toml b/packages/provwasm-std/Cargo.toml index 39af1ec8..0ce699ff 100644 --- a/packages/provwasm-std/Cargo.toml +++ b/packages/provwasm-std/Cargo.toml @@ -1,24 +1,24 @@ [package] name = "provwasm-std" -version = "2.2.0" +version = { workspace = true } +repository = { workspace = true } +edition = { workspace = true } +license = { workspace = true } authors = ["Ken Talley "] -edition = "2021" -license = "Apache-2.0" -repository = "https://github.com/provenance-io/provwasm/tree/main/packages/provwasm-std" description = "Rust bindings that enable CosmWasm smart contracts to interact with custom modules in the Provenance Blockchain" keywords = ["provenance", "blockchain", "smart-contracts", "defi", "finance"] categories = ["api-bindings", "cryptography::cryptocurrencies", "wasm"] [dependencies] -chrono = {version = "0.4.24", default-features = false} -cosmwasm-std = {version = "1.2.5", features = ["stargate"]} -cosmwasm-schema = { version = "1.2.5" } -prost = {version = "0.11.9", default-features = false, features = ["prost-derive"]} -prost-types = {version = "0.11.9", default-features = false} -provwasm-common = {version = "0.1.0", path = "../provwasm-common" } -provwasm-proc-macro = {version = "0.1.0", path = "../provwasm-proc-macro" } -schemars = "0.8.12" -serde = {version = "1.0.163", default-features = false, features = ["derive"]} +chrono = { version = "0.4.24", default-features = false } +cosmwasm-std = { workspace = true, features = ["stargate"] } +cosmwasm-schema = { workspace = true } +prost = { workspace = true, default-features = false, features = ["prost-derive"] } +prost-types = { workspace = true, default-features = false } +provwasm-common = { workspace = true } +provwasm-proc-macro = { workspace = true } +schemars = { workspace = true } +serde = { workspace = true, default-features = false, features = ["derive"] } serde-cw-value = "0.7.0" base64 = "0.21.0" strum_macros = "0.25.3" diff --git a/packages/provwasm-std/src/common.rs b/packages/provwasm-std/src/common.rs deleted file mode 100644 index cce3f4da..00000000 --- a/packages/provwasm-std/src/common.rs +++ /dev/null @@ -1,51 +0,0 @@ -use cosmwasm_std::{Addr, StdError, StdResult}; - -/// A helper that ensures string params are non-empty. -pub fn validate_string>(input: S, param_name: &str) -> StdResult { - let s: String = input.into(); - if s.trim().is_empty() { - let errm = format!("{} must not be empty", param_name); - Err(StdError::generic_err(errm)) - } else { - Ok(s) - } -} - -/// A helper that ensures address params are non-empty. -pub fn validate_address>(input: H) -> StdResult { - let h: Addr = input.into(); - if h.to_string().trim().is_empty() { - Err(StdError::generic_err("address must not be empty")) - } else { - Ok(h) - } -} - -#[cfg(test)] -mod test { - use super::*; - - #[test] - fn validate_string_empty() { - let whitespace = " \r \n \t "; - let err = validate_string(whitespace, "whitespace").unwrap_err(); - match err { - StdError::GenericErr { msg, .. } => { - assert_eq!(msg, "whitespace must not be empty") - } - _ => panic!("unexpected error"), - } - } - - #[test] - fn validate_address_empty() { - let empty = Addr::unchecked(" "); - let err = validate_address(empty).unwrap_err(); - match err { - StdError::GenericErr { msg, .. } => { - assert_eq!(msg, "address must not be empty") - } - _ => panic!("unexpected error"), - } - } -} diff --git a/packages/provwasm-std/src/lib.rs b/packages/provwasm-std/src/lib.rs index 50283285..a9410b76 100644 --- a/packages/provwasm-std/src/lib.rs +++ b/packages/provwasm-std/src/lib.rs @@ -1,43 +1,9 @@ /// The version (commit hash) of the Cosmos SDK used when generating this library. pub const PROVENANCE_VERSION: &str = include_str!("types/PROVENANCE_COMMIT"); -mod common; -#[allow(deprecated)] -mod msg; -#[allow(deprecated)] -mod querier; -#[allow(deprecated)] -mod query; mod serde; pub mod shim; -#[allow(deprecated)] pub mod types; - -#[allow(deprecated)] -pub use msg::{ - activate_marker, add_attribute, add_json_attribute, assess_custom_fee, bind_name, - burn_marker_supply, cancel_marker, create_forced_transfer_marker, create_marker, - delete_attributes, delete_distinct_attribute, destroy_marker, finalize_marker, - grant_marker_access, mint_marker_supply, revoke_marker_access, transfer_marker_coins, - unbind_name, update_attribute, withdraw_coins, write_scope, AttributeMsgParams, - MarkerMsgParams, MetadataMsgParams, MsgFeesMsgParams, NameMsgParams, ProvenanceMsg, - ProvenanceMsgParams, -}; -#[allow(deprecated)] -pub use querier::ProvenanceQuerier; -#[allow(deprecated)] -pub use query::{ - AttributeQueryParams, MarkerQueryParams, MetadataQueryParams, NameQueryParams, ProvenanceQuery, - ProvenanceQueryParams, -}; -#[allow(deprecated)] -pub use types::{ - AccessGrant, Attribute, AttributeValueType, Attributes, Marker, MarkerAccess, MarkerStatus, - MarkerType, Name, NameBinding, Names, Party, PartyType, Process, ProcessId, ProvenanceRoute, - Record, RecordInput, RecordInputSource, RecordInputStatus, RecordOutput, Records, ResultStatus, - Scope, Session, Sessions, -}; - // Indicate that smart contracts that use this lib can only be run on the Provenance Blockchain. #[no_mangle] extern "C" fn requires_provenance() {} diff --git a/packages/provwasm-std/src/msg.rs b/packages/provwasm-std/src/msg.rs deleted file mode 100644 index 9637e836..00000000 --- a/packages/provwasm-std/src/msg.rs +++ /dev/null @@ -1,901 +0,0 @@ -use cosmwasm_std::{ - coin, to_binary, Addr, Binary, Coin, CosmosMsg, CustomMsg, StdError, StdResult, -}; -use schemars::JsonSchema; -use serde::{Deserialize, Serialize}; - -use crate::common::{validate_address, validate_string}; -use crate::types::{ - AttributeValueType, MarkerAccess, MarkerType, NameBinding, ProvenanceRoute, Scope, -}; - -// The data format version to pass into provenance for message encoding -static MSG_DATAFMT_VERSION: &str = "2.0.0"; - -/// Represents a request to encode custom provenance messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub struct ProvenanceMsg { - pub route: ProvenanceRoute, // The module router key - pub params: ProvenanceMsgParams, // The module-specific encoder params - pub version: String, // The data format version -} - -impl CustomMsg for ProvenanceMsg {} - -// Implements From for ProvenanceMsg so it can be used in place of CosmosMsg -impl From for CosmosMsg { - fn from(msg: ProvenanceMsg) -> Self { - CosmosMsg::Custom(msg) - } -} - -/// Input params for custom provenance message encoders. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -pub enum ProvenanceMsgParams { - Name(NameMsgParams), - Attribute(AttributeMsgParams), - Marker(MarkerMsgParams), - Metadata(MetadataMsgParams), - MsgFees(MsgFeesMsgParams), -} - -/// Input params for creating name module messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum NameMsgParams { - BindName { - name: String, - address: Addr, - restrict: bool, - }, - DeleteName { - name: String, - }, -} - -// Create a custom cosmos message using name module params. -#[deprecated(since = "2.0.0")] -fn create_name_msg(params: NameMsgParams) -> CosmosMsg { - CosmosMsg::Custom(ProvenanceMsg { - route: ProvenanceRoute::Name, - params: ProvenanceMsgParams::Name(params), - version: String::from(MSG_DATAFMT_VERSION), - }) -} - -/// Create a message that will bind a name to an address. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{bind_name, NameBinding, ProvenanceMsg}; -/// -/// // Bind a name to an address. -/// fn exec_bind_name( -/// name: String, -/// address: Addr, -/// ) -> StdResult> { -/// let msg = bind_name(&name, address, NameBinding::Restricted)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn bind_name, H: Into>( - name: S, - address: H, - binding: NameBinding, -) -> StdResult> { - Ok(create_name_msg(NameMsgParams::BindName { - name: validate_string(name, "name")?, - address: validate_address(address)?, - restrict: matches!(binding, NameBinding::Restricted), - })) -} - -/// Create a message that will un-bind a name from an address. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{unbind_name, ProvenanceMsg}; -/// -/// // Unbind a name -/// fn exec_unbind_name(name: String) -> StdResult> { -/// let msg = unbind_name(&name)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn unbind_name>(name: S) -> StdResult> { - Ok(create_name_msg(NameMsgParams::DeleteName { - name: validate_string(name, "name")?, - })) -} - -/// Input params for creating attribute module messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum AttributeMsgParams { - AddAttribute { - address: Addr, - name: String, - value: Binary, - value_type: AttributeValueType, - }, - DeleteAttribute { - address: Addr, - name: String, - }, - DeleteDistinctAttribute { - address: Addr, - name: String, - value: Binary, - }, - UpdateAttribute { - address: Addr, - name: String, - original_value: Binary, - original_value_type: AttributeValueType, - update_value: Binary, - update_value_type: AttributeValueType, - }, -} - -// Create a custom cosmos message using attribute module params. -#[deprecated(since = "2.0.0")] -fn create_attribute_msg(params: AttributeMsgParams) -> CosmosMsg { - CosmosMsg::Custom(ProvenanceMsg { - route: ProvenanceRoute::Attribute, - params: ProvenanceMsgParams::Attribute(params), - version: String::from(MSG_DATAFMT_VERSION), - }) -} - -/// Create a message that will add an attribute (a typed key-value pair) to an account. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Binary, Env, Addr, Response, StdResult}; -/// use provwasm_std::{add_attribute, AttributeValueType, ProvenanceMsg}; -/// -/// // Add a greeting attribute to an account. -/// // NOTE: The name below must resolve to the contract address. -/// fn exec_add_greeting( -/// env: Env, -/// address: Addr, -/// text: String, -/// ) -> StdResult> { -/// let attr_name = String::from("greeting.my-contract.sc.pb"); -/// let greeting = String::from("hello"); -/// let msg = add_attribute( -/// address, -/// &attr_name, -/// Binary::from(greeting.as_bytes()), -/// AttributeValueType::String, -/// )?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn add_attribute, S: Into, B: Into>( - address: H, - name: S, - value: B, - value_type: AttributeValueType, -) -> StdResult> { - if value_type == AttributeValueType::Unspecified { - return Err(StdError::generic_err( - "cannot add attribute with unspecified value type", - )); - } - Ok(create_attribute_msg(AttributeMsgParams::AddAttribute { - address: validate_address(address)?, - name: validate_string(name, "name")?, - value: value.into(), - value_type, - })) -} - -/// Create a message that will add a JSON attribute to an account. Serializable types can be passed -/// into this function, but it's up to the user to handle StdResult error case. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Env, Addr, Response, StdResult}; -/// use provwasm_std::{add_json_attribute, ProvenanceMsg}; -/// use schemars::JsonSchema; -/// use serde::{Deserialize, Serialize}; -/// -/// // Add a label attribute. NOTE: The name below must resolve to the contract address. -/// fn exec_add_label( -/// env: Env, -/// address: Addr, -/// text: String, -/// ) -> StdResult> { -/// let attr_name = String::from("label.my-contract.sc.pb"); -/// let timestamp = env.block.time.nanos(); -/// let label = Label { text, timestamp }; -/// let msg = add_json_attribute(address, &attr_name, &label)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// -/// // Text with a timestamp. -/// #[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -/// #[serde(rename_all = "snake_case")] -/// pub struct Label { -/// pub text: String, -/// pub timestamp: u64, -/// } -/// -/// ``` -#[deprecated(since = "2.0.0")] -pub fn add_json_attribute, S: Into, T: Serialize + ?Sized>( - address: H, - name: S, - data: &T, -) -> StdResult> { - // Serialize the value, bailing on error - let value = to_binary(data)?; - // Create and return json typed message - add_attribute(address, name, value, AttributeValueType::Json) -} - -/// Create a message that will remove all attributes with the given name from an account. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{delete_attributes, ProvenanceMsg}; -/// -/// // Delete all label attributes. NOTE: The name below must resolve to the contract address. -/// fn exec_delete_labels( -/// address: Addr, -/// ) -> StdResult> { -/// let attr_name = String::from("label.my-contract.sc.pb"); -/// let msg = delete_attributes(address, &attr_name)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn delete_attributes, S: Into>( - address: H, - name: S, -) -> StdResult> { - Ok(create_attribute_msg(AttributeMsgParams::DeleteAttribute { - address: validate_address(address)?, - name: validate_string(name, "name")?, - })) -} - -/// Create a message that will delete a distinct attribute with the given name and value from an account. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult, to_binary}; -/// use provwasm_std::{delete_distinct_attribute, ProvenanceMsg}; -/// -/// // Delete the distinct label attribute. NOTE: The name below must resolve to the contract address. -/// fn try_delete_distinct_label( -/// address: Addr, -/// ) -> StdResult> { -/// let attr_name = String::from("label.my-contract.sc.pb"); -/// let attr_value = String::from("hello"); -/// let msg = delete_distinct_attribute(address, &attr_name, to_binary(&attr_value)?)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn delete_distinct_attribute, S: Into, B: Into>( - address: H, - name: S, - value: B, -) -> StdResult> { - Ok(create_attribute_msg( - AttributeMsgParams::DeleteDistinctAttribute { - address: validate_address(address)?, - name: validate_string(name, "name")?, - value: value.into(), - }, - )) -} - -/// Create a message that will update an attribute (a typed key-value pair) on an account. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Binary, Env, Addr, Response, StdResult}; -/// use provwasm_std::{update_attribute, AttributeValueType, ProvenanceMsg}; -/// -/// // Update an attribute on an account. -/// // NOTE: The name below must resolve to the contract address. -/// fn try_update_attribute( -/// env: Env, -/// address: Addr, -/// text: String, -/// ) -> StdResult> { -/// let attr_name = String::from("attribute.my-contract.sc.pb"); -/// let original_attribute_value = String::from("hello"); -/// let updated_attribute_value = String::from("goodbye"); -/// let msg = update_attribute( -/// address, -/// &attr_name, -/// Binary::from(original_attribute_value.as_bytes()), -/// AttributeValueType::String, -/// Binary::from(original_attribute_value.as_bytes()), -/// AttributeValueType::String, -/// )?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn update_attribute, S: Into, B: Into>( - address: H, - name: S, - original_value: B, - original_value_type: AttributeValueType, - update_value: B, - update_value_type: AttributeValueType, -) -> StdResult> { - if original_value_type == AttributeValueType::Unspecified { - return Err(StdError::generic_err( - "cannot update attribute with unspecified original value type", - )); - } - if update_value_type == AttributeValueType::Unspecified { - return Err(StdError::generic_err( - "cannot update attribute with unspecified update value type", - )); - } - Ok(create_attribute_msg(AttributeMsgParams::UpdateAttribute { - address: validate_address(address)?, - name: validate_string(name, "name")?, - original_value: original_value.into(), - original_value_type, - update_value: update_value.into(), - update_value_type, - })) -} - -/// Input params for creating marker module messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum MarkerMsgParams { - CreateMarker { - coin: Coin, - marker_type: MarkerType, - allow_forced_transfer: bool, - }, - GrantMarkerAccess { - denom: String, - address: Addr, - permissions: Vec, - }, - RevokeMarkerAccess { - denom: String, - address: Addr, - }, - FinalizeMarker { - denom: String, - }, - ActivateMarker { - denom: String, - }, - CancelMarker { - denom: String, - }, - DestroyMarker { - denom: String, - }, - MintMarkerSupply { - coin: Coin, - }, - BurnMarkerSupply { - coin: Coin, - }, - WithdrawCoins { - marker_denom: String, - coin: Coin, - recipient: Addr, - }, - TransferMarkerCoins { - coin: Coin, - to: Addr, - from: Addr, - }, -} - -// Create a custom cosmos message using marker module params. -#[deprecated(since = "2.0.0")] -fn create_marker_msg(params: MarkerMsgParams) -> CosmosMsg { - CosmosMsg::Custom(ProvenanceMsg { - route: ProvenanceRoute::Marker, - params: ProvenanceMsgParams::Marker(params), - version: String::from(MSG_DATAFMT_VERSION), - }) -} - -/// Create a message that will propose a new marker with a given type. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{create_marker, MarkerType, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will propose a new unrestricted marker. -/// fn try_create_marker( -/// amount: u128, -/// denom: String, -/// ) -> StdResult> { -/// let msg = create_marker(amount, &denom, MarkerType::Coin)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn create_marker>( - amount: u128, - denom: S, - marker_type: MarkerType, -) -> StdResult> { - let coin = coin(amount, validate_string(denom, "denom")?); - Ok(create_marker_msg(MarkerMsgParams::CreateMarker { - coin, - marker_type, - allow_forced_transfer: false, - })) -} - -/// Create a message that will propose a new restricted marker that allows forced transfers. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{create_forced_transfer_marker, MarkerType, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will propose a new restricted marker that allows forced transfers. -/// fn try_create_forced_transfer_marker( -/// amount: u128, -/// denom: String, -/// ) -> StdResult> { -/// let msg = create_forced_transfer_marker(amount, &denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn create_forced_transfer_marker>( - amount: u128, - denom: S, -) -> StdResult> { - let coin = coin(amount, validate_string(denom, "denom")?); - Ok(create_marker_msg(MarkerMsgParams::CreateMarker { - coin, - marker_type: MarkerType::Restricted, - allow_forced_transfer: true, - })) -} - -/// Create a message that will grant permissions on a marker. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{grant_marker_access, MarkerAccess, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will grant specific permissions to a marker for an address. -/// fn try_grant_marker_access( -/// denom: String, -/// address: Addr, -/// ) -> StdResult> { -/// let permissions = vec![MarkerAccess::Burn, MarkerAccess::Mint]; -/// let msg = grant_marker_access(&denom, address, permissions)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn grant_marker_access, H: Into>( - denom: S, - address: H, - permissions: Vec, -) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::GrantMarkerAccess { - denom: validate_string(denom, "denom")?, - address: validate_address(address)?, - permissions, - })) -} - -/// Create a message that will revoke marker permissions. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{revoke_marker_access, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will revoke all permissions from a marker for an address. -/// fn try_revoke_marker_access( -/// denom: String, -/// address: Addr, -/// ) -> StdResult> { -/// let msg = revoke_marker_access(&denom, address)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn revoke_marker_access, H: Into>( - denom: S, - address: H, -) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::RevokeMarkerAccess { - denom: validate_string(denom, "denom")?, - address: validate_address(address)?, - })) -} - -/// Create a message that will finalize a proposed marker. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{finalize_marker, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will finalize a proposed marker. -/// fn try_finalize_marker(denom: String) -> StdResult> { -/// let msg = finalize_marker(&denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn finalize_marker>(denom: S) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::FinalizeMarker { - denom: validate_string(denom, "denom")?, - })) -} - -/// Create a message that will activate a finalized marker. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{activate_marker, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will activate a finalized marker. -/// fn try_activate_marker(denom: String) -> StdResult> { -/// let msg = activate_marker(&denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn activate_marker>(denom: S) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::ActivateMarker { - denom: validate_string(denom, "denom")?, - })) -} - -/// Create a message that will cancel a marker. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{cancel_marker, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will cancel a marker. -/// fn try_cancel_marker(denom: String) -> StdResult> { -/// let msg = cancel_marker(&denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn cancel_marker>(denom: S) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::CancelMarker { - denom: validate_string(denom, "denom")?, - })) -} - -/// Create a message that will destroy a marker. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{destroy_marker, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will destroy a marker. -/// fn try_destroy_marker(denom: String) -> StdResult> { -/// let msg = destroy_marker(&denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn destroy_marker>(denom: S) -> StdResult> { - Ok(create_marker_msg(MarkerMsgParams::DestroyMarker { - denom: validate_string(denom, "denom")?, - })) -} - -/// Create a message that will mint marker coins. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{mint_marker_supply, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will mint marker supply. -/// fn try_mint_marker(amount: u128, denom: String) -> StdResult> { -/// let msg = mint_marker_supply(amount, &denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn mint_marker_supply>( - amount: u128, - denom: S, -) -> StdResult> { - if amount == 0 { - return Err(StdError::generic_err("mint amount must be > 0")); - } - let coin = coin(amount, validate_string(denom, "denom")?); - Ok(create_marker_msg(MarkerMsgParams::MintMarkerSupply { - coin, - })) -} - -/// Create a message that will burn marker coins. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Response, StdResult}; -/// use provwasm_std::{burn_marker_supply, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will burn marker supply. -/// fn try_burn_marker(amount: u128, denom: String) -> StdResult> { -/// let msg = burn_marker_supply(amount, &denom)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn burn_marker_supply>( - amount: u128, - denom: S, -) -> StdResult> { - if amount == 0 { - return Err(StdError::generic_err("burn amount must be > 0")); - } - let coin = coin(amount, validate_string(denom, "denom")?); - Ok(create_marker_msg(MarkerMsgParams::BurnMarkerSupply { - coin, - })) -} - -/// Create a message that will withdraw coins from a marker account to a recipient account. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{withdraw_coins, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will withdraw coins from a marker. -/// fn try_withdraw_coins( -/// marker_denom: String, -/// amount: u128, -/// denom: String, -/// recipient: Addr, -/// ) -> StdResult> { -/// let msg = withdraw_coins(&marker_denom, amount, &denom, recipient)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn withdraw_coins, H: Into>( - marker_denom: S, - amount: u128, - denom: S, - recipient: H, -) -> StdResult> { - if amount == 0 { - return Err(StdError::generic_err("withdraw amount must be > 0")); - } - let coin = coin(amount, validate_string(denom, "denom")?); - Ok(create_marker_msg(MarkerMsgParams::WithdrawCoins { - marker_denom: validate_string(marker_denom, "marker_denom")?, - coin, - recipient: validate_address(recipient)?, - })) -} - -/// Create a message that will transfer a marker amount from one account to another. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdResult}; -/// use provwasm_std::{transfer_marker_coins, ProvenanceMsg}; -/// -/// // Create and dispatch a message that will transfer marker coins from one account to another. -/// // NOTE: Transfer is only enabled for restricted markers. -/// fn try_transfer_marker_coins( -/// amount: u128, -/// denom: String, -/// to: Addr, -/// from: Addr, -/// ) -> StdResult> { -/// let msg = transfer_marker_coins(amount, &denom, to, from)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn transfer_marker_coins, H: Into>( - amount: u128, - denom: S, - to: H, - from: H, -) -> StdResult> { - if amount == 0 { - return Err(StdError::generic_err("transfer amount must be > 0")); - } - let coin = coin(amount, validate_string(denom, "denom")?); - let msg = create_marker_msg(MarkerMsgParams::TransferMarkerCoins { - coin, - to: validate_address(to)?, - from: validate_address(from)?, - }); - Ok(msg) -} - -/// Input params for creating marker module messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum MetadataMsgParams { - WriteScope { scope: Scope, signers: Vec }, -} - -// Create a custom cosmos message using metadata module params. -#[deprecated(since = "2.0.0")] -fn create_metadata_msg(params: MetadataMsgParams) -> CosmosMsg { - CosmosMsg::Custom(ProvenanceMsg { - route: ProvenanceRoute::Metadata, - params: ProvenanceMsgParams::Metadata(params), - version: String::from(MSG_DATAFMT_VERSION), - }) -} - -/// Create a message that will create, or update, a scope. -/// -/// ### Example -/// -/// ```rust -/// // Imports required -/// use cosmwasm_std::{Addr, Response, StdError}; -/// use provwasm_std::{ProvenanceMsg, Scope, write_scope}; -/// -/// // Create and dispatch a message that will create, or update, a scope. -/// fn try_write_scope(scope: Scope, signers: Vec) -> Result, StdError> { -/// let msg = write_scope(scope, signers)?; -/// let mut res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn write_scope, H: Into>( - scope: S, - signers: Vec, -) -> Result, StdError> { - Ok(create_metadata_msg(MetadataMsgParams::WriteScope { - scope: scope.into(), - signers: signers - .into_iter() - .map(validate_address) - .collect::, _>>()?, - })) -} - -/// Input params for creating msgfee module messages. -#[deprecated(since = "2.0.0")] -#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, JsonSchema)] -#[serde(rename_all = "snake_case")] -pub enum MsgFeesMsgParams { - AssessCustomFee { - amount: Coin, - from: Addr, - name: Option, - recipient: Option, - }, -} - -// Create a custom cosmos message using msgfees module params. -#[deprecated(since = "2.0.0")] -fn create_msgfees_msg(params: MsgFeesMsgParams) -> CosmosMsg { - CosmosMsg::Custom(ProvenanceMsg { - route: ProvenanceRoute::Msgfees, - params: ProvenanceMsgParams::MsgFees(params), - version: String::from(MSG_DATAFMT_VERSION), - }) -} - -/// Create a message that will assess a custom fee -/// ### Example -/// -/// ```rust -/// use cosmwasm_std::{Addr, Coin, Response, StdError}; -/// use provwasm_std::{assess_custom_fee, MsgFeesMsgParams, ProvenanceMsg}; -/// -/// fn try_assess_custom_fee(amount: Coin, name: Option, from: Addr, recipient: Option) -> Result, StdError>{ -/// let msg = assess_custom_fee(amount, name, from, recipient)?; -/// let res = Response::new().add_message(msg); -/// Ok(res) -/// } -/// ``` -#[deprecated(since = "2.0.0")] -pub fn assess_custom_fee>( - amount: Coin, - name: Option, - from: Addr, - recipient: Option, -) -> Result, StdError> { - Ok(create_msgfees_msg(MsgFeesMsgParams::AssessCustomFee { - amount, - name: name.map(|name| name.into()), - from, - recipient, - })) -} diff --git a/packages/provwasm-std/src/querier.rs b/packages/provwasm-std/src/querier.rs deleted file mode 100644 index b0950f7d..00000000 --- a/packages/provwasm-std/src/querier.rs +++ /dev/null @@ -1,370 +0,0 @@ -use cosmwasm_std::{from_binary, Addr, QuerierWrapper, StdError, StdResult}; -use serde::de::DeserializeOwned; - -use crate::common::{validate_address, validate_string}; -use crate::query::{ - AttributeQueryParams, MarkerQueryParams, MetadataQueryParams, NameQueryParams, ProvenanceQuery, - ProvenanceQueryParams, -}; -use crate::types::{ - AttributeValueType, Attributes, Marker, Name, Names, ProvenanceRoute, Record, Records, Scope, - Sessions, -}; - -// The data format version to pass into provenance for queries. -static QUERY_DATAFMT_VERSION: &str = "2.0.0"; - -/// A type for simplifying provenance custom queries. -#[deprecated(since = "2.0.0")] -pub struct ProvenanceQuerier<'a> { - querier: &'a QuerierWrapper<'a, ProvenanceQuery>, -} - -impl<'a> ProvenanceQuerier<'a> { - /// Creates a new provenance querier - pub fn new(querier: &'a QuerierWrapper<'a, ProvenanceQuery>) -> Self { - ProvenanceQuerier { querier } - } - - // Execute a name module query. - fn query_name_module(&self, params: NameQueryParams) -> StdResult { - let request = ProvenanceQuery { - route: ProvenanceRoute::Name, - params: ProvenanceQueryParams::Name(params), - version: String::from(QUERY_DATAFMT_VERSION), - }; - let res: Names = self.querier.query(&request.into())?; - Ok(res) - } - - /// Resolve the address for a name. - /// - /// ### Example - /// - /// ```rust - /// // Imports required - /// use cosmwasm_std::{Deps, QueryResponse, StdResult}; - /// use provwasm_std::{Name, ProvenanceQuerier, ProvenanceQuery}; - /// - /// // Resolve the address for a name. - /// fn query_resolve_name(deps: Deps, name: String) -> StdResult { - /// let querier = ProvenanceQuerier::new(&deps.querier); - /// let name: Name = querier.resolve_name(&name)?; - /// // Do something with name.address ... - /// todo!() - /// } - /// ``` - pub fn resolve_name>(&self, name: S) -> StdResult { - let res = self.query_name_module(NameQueryParams::Resolve { - name: validate_string(name, "name")?, - })?; - if res.records.len() != 1 { - return Err(StdError::generic_err( - "expected only one address bound to name", - )); - } - Ok(res.records[0].clone()) - } - - /// Lookup all names bound to the given address. - /// - /// ### Example - /// - /// ```rust - /// // Imports required - /// use cosmwasm_std::{Addr, Deps, QueryResponse, StdResult}; - /// use provwasm_std::{Names, ProvenanceQuerier, ProvenanceQuery}; - /// - /// // Lookup all names bound to an address. - /// fn query_lookup_names(deps: Deps, address: Addr) -> StdResult { - /// let querier = ProvenanceQuerier::new(&deps.querier); - /// let names: Names = querier.lookup_names(address)?; - /// // Do something with names.records ... - /// todo!() - /// } - /// ``` - pub fn lookup_names>(&self, address: H) -> StdResult { - self.query_name_module(NameQueryParams::Lookup { - address: validate_address(address)?, - }) - } - - // Execute a attribute module query. - fn query_attributes(&self, params: AttributeQueryParams) -> StdResult { - let request = ProvenanceQuery { - route: ProvenanceRoute::Attribute, - params: ProvenanceQueryParams::Attribute(params), - version: String::from(QUERY_DATAFMT_VERSION), - }; - let res: Attributes = self.querier.query(&request.into())?; - Ok(res) - } - - /// Get attributes for an account. If the name parameter is `None`, all attributes are returned. - /// - /// ### Example - /// - /// ```rust - /// // Imports required - /// use cosmwasm_std::{Addr, Deps, QueryResponse, StdResult}; - /// use provwasm_std::{Attributes, ProvenanceQuerier, ProvenanceQuery}; - /// - /// // Query all attributes added to an account. - /// pub fn try_query_attributes(deps: Deps, address: Addr) -> StdResult { - /// let querier = ProvenanceQuerier::new(&deps.querier); - /// let none: Option = None; - /// let res: Attributes = querier.get_attributes(address, none)?; - /// // Do something with res.attributes ... - /// todo!() - /// } - /// ``` - pub fn get_attributes, S: Into>( - &self, - address: H, - name: Option, - ) -> StdResult { - let address = validate_address(address)?; - match name { - None => self.query_attributes(AttributeQueryParams::GetAllAttributes { address }), - Some(name) => self.query_attributes(AttributeQueryParams::GetAttributes { - address, - name: validate_string(name, "name")?, - }), - } - } - - /// Get named JSON attributes from an account and deserialize the values. - /// Attribute values with the same name must be able to be deserialized to the same type. - /// - /// ### Example - /// - /// ```rust - /// // Imports required - /// use cosmwasm_std::{Addr, Deps, QueryResponse, StdResult}; - /// use provwasm_std::{ProvenanceQuerier, ProvenanceQuery}; - /// use schemars::JsonSchema; - /// use serde::{Deserialize, Serialize}; - /// - /// // Query all label attributes added to an account. - /// pub fn query_labels(deps: Deps, address: Addr) -> StdResult { - /// let attr_name = String::from("label.my-contract.sc.pb"); - /// let querier = ProvenanceQuerier::new(&deps.querier); - /// let labels: Vec