From e6af47eb39c169684c7eede6e7d957696e14cdd4 Mon Sep 17 00:00:00 2001 From: ekez Date: Wed, 5 Oct 2022 18:07:01 -0700 Subject: [PATCH 1/8] Add CosmOrc test for NFT mint and transfer. --- .cargo/config | 1 + Cargo.lock | 2767 +++++++++++++++-- Cargo.toml | 3 +- ci/bootstrap-env/Cargo.toml | 18 + ci/bootstrap-env/src/main.rs | 73 + ci/configs/cosm-orc/ci.yaml | 8 + ci/configs/test_accounts.json | 27 + ci/integration-tests/.cargo/config | 3 + ci/integration-tests/Cargo.toml | 26 + ci/integration-tests/README.md | 43 + .../gas_reports/test-1175590054.json | 1 + .../gas_reports/test-1319515518.json | 1 + .../gas_reports/test-1684095571.json | 1 + .../gas_reports/test-1763516178.json | 1 + .../gas_reports/test-1814160560.json | 1 + .../gas_reports/test-265147129.json | 1 + .../gas_reports/test-3205943217.json | 1 + .../gas_reports/test-4134311413.json | 1 + .../gas_reports/test-512151936.json | 1 + .../gas_reports/test-55710236.json | 1 + ci/integration-tests/src/helpers/chain.rs | 126 + ci/integration-tests/src/helpers/mod.rs | 1 + ci/integration-tests/src/lib.rs | 7 + .../src/tests/cw20_stake_test.rs | 120 + .../src/tests/cw721_base_test.rs | 80 + .../src/tests/cw_core_test.rs | 367 +++ ci/integration-tests/src/tests/mod.rs | 1 + contracts/cw721-fixed-price/Cargo.toml | 11 - justfile | 37 + 29 files changed, 3504 insertions(+), 225 deletions(-) create mode 100644 ci/bootstrap-env/Cargo.toml create mode 100644 ci/bootstrap-env/src/main.rs create mode 100644 ci/configs/cosm-orc/ci.yaml create mode 100644 ci/configs/test_accounts.json create mode 100644 ci/integration-tests/.cargo/config create mode 100644 ci/integration-tests/Cargo.toml create mode 100644 ci/integration-tests/README.md create mode 100644 ci/integration-tests/gas_reports/test-1175590054.json create mode 100644 ci/integration-tests/gas_reports/test-1319515518.json create mode 100644 ci/integration-tests/gas_reports/test-1684095571.json create mode 100644 ci/integration-tests/gas_reports/test-1763516178.json create mode 100644 ci/integration-tests/gas_reports/test-1814160560.json create mode 100644 ci/integration-tests/gas_reports/test-265147129.json create mode 100644 ci/integration-tests/gas_reports/test-3205943217.json create mode 100644 ci/integration-tests/gas_reports/test-4134311413.json create mode 100644 ci/integration-tests/gas_reports/test-512151936.json create mode 100644 ci/integration-tests/gas_reports/test-55710236.json create mode 100644 ci/integration-tests/src/helpers/chain.rs create mode 100644 ci/integration-tests/src/helpers/mod.rs create mode 100644 ci/integration-tests/src/lib.rs create mode 100644 ci/integration-tests/src/tests/cw20_stake_test.rs create mode 100644 ci/integration-tests/src/tests/cw721_base_test.rs create mode 100644 ci/integration-tests/src/tests/cw_core_test.rs create mode 100644 ci/integration-tests/src/tests/mod.rs create mode 100644 justfile diff --git a/.cargo/config b/.cargo/config index 71deaf22b..3548cfc6c 100644 --- a/.cargo/config +++ b/.cargo/config @@ -2,3 +2,4 @@ wasm = "build --release --target wasm32-unknown-unknown" wasm-debug = "build --target wasm32-unknown-unknown" unit-test = "test --lib" +integration-test = "test --package integration-tests -- --ignored --test-threads 1" diff --git a/Cargo.lock b/Cargo.lock index d88bcae6c..02698cea7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,164 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "opaque-debug", +] + +[[package]] +name = "ahash" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +dependencies = [ + "getrandom 0.2.7", + "once_cell", + "version_check", +] + +[[package]] +name = "aho-corasick" +version = "0.7.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +dependencies = [ + "memchr", +] + [[package]] name = "anyhow" version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602" +[[package]] +name = "assert_matches" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" + +[[package]] +name = "async-io" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83e21f3a490c72b3b0cf44962180e60045de2925d8dff97918f7ee43c8f637c7" +dependencies = [ + "autocfg", + "concurrent-queue", + "futures-lite", + "libc", + "log", + "once_cell", + "parking", + "polling", + "slab", + "socket2", + "waker-fn", + "winapi", +] + +[[package]] +name = "async-stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dad5c83079eae9969be7fadefe640a1c566901f05ff91ab221de4b6f68d9507e" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "async-trait" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76464446b8bc32758d7e88ee1a804d9914cd9b1cb264c029899680b0be29826f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "axum" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e3356844c4d6a6d6467b8da2cffb4a2820be256f50a3a386c9d152bab31043" +dependencies = [ + "async-trait", + "axum-core", + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "hyper", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "serde", + "sync_wrapper", + "tokio", + "tower", + "tower-http", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "mime", + "tower-layer", + "tower-service", +] + [[package]] name = "base16ct" version = "0.1.1" @@ -26,6 +178,30 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea2b2456fd614d856680dcd9fcc660a51a820fa09daef2e49772b56a193c8474" +[[package]] +name = "bip32" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" +dependencies = [ + "bs58", + "hmac 0.12.1", + "k256", + "once_cell", + "pbkdf2", + "rand_core 0.6.3", + "ripemd", + "sha2 0.10.5", + "subtle", + "zeroize", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "block-buffer" version = "0.9.0" @@ -44,6 +220,53 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-modes" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb03d1bed155d89dce0f845b7899b18a9a163e148fd004e1c28421a783e2d8e" +dependencies = [ + "block-padding", + "cipher", +] + +[[package]] +name = "block-padding" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" + +[[package]] +name = "bootstrap-env" +version = "0.1.0" +dependencies = [ + "anyhow", + "cosm-orc", + "cosmwasm-std", + "cw-utils", + "cw20", + "cw721-base 0.15.0", + "env_logger", + "serde", + "serde_json", + "serde_yaml", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +dependencies = [ + "sha2 0.9.9", +] + +[[package]] +name = "bumpalo" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" + [[package]] name = "byteorder" version = "1.4.3" @@ -56,18 +279,135 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +[[package]] +name = "cache-padded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" + +[[package]] +name = "cc" +version = "1.0.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "concurrent-queue" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4780a44ab5696ea9e28294517f1fffb421a83a25af521333c838635509db9c" +dependencies = [ + "cache-padded", +] + +[[package]] +name = "config" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11f1667b8320afa80d69d8bbe40830df2c8a06003d86f73d8e003b2c48df416d" +dependencies = [ + "async-trait", + "json5", + "lazy_static", + "nom", + "pathdiff", + "ron", + "rust-ini", + "serde", + "serde_json", + "toml", + "yaml-rust", +] + [[package]] name = "const-oid" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +[[package]] +name = "core-foundation" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cosm-orc" +version = "2.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49badda8d580cbb0a093f1d9c077f934860cc451d0c230d70f22c4ce9900007e" +dependencies = [ + "config", + "cosmos-sdk-proto", + "cosmrs", + "keyring", + "log", + "serde", + "serde_json", + "tendermint-rpc", + "thiserror", + "tokio", + "tonic", +] + +[[package]] +name = "cosmos-sdk-proto" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b42021d8488665b1a0d9748f1f81df7235362d194f44481e2e61bf376b77b4" +dependencies = [ + "prost 0.11.0", + "prost-types", + "tendermint-proto", + "tonic", +] + +[[package]] +name = "cosmrs" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3903590099dcf1ea580d9353034c9ba1dbf55d1389a5bd2ade98535c3445d1f9" +dependencies = [ + "bip32", + "cosmos-sdk-proto", + "ecdsa", + "eyre", + "getrandom 0.2.7", + "k256", + "rand_core 0.6.3", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror", +] + [[package]] name = "cosmwasm-crypto" version = "1.1.0" @@ -169,6 +509,25 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-mac" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" +dependencies = [ + "generic-array", + "subtle", +] + +[[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" @@ -241,8 +600,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "cw721", - "cw721-base", + "cw721 0.15.0", + "cw721-base 0.15.0", "schemars", "serde", ] @@ -271,16 +630,46 @@ dependencies = [ "serde", ] +[[package]] +name = "cw721" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20dfe04f86e5327956b559ffcc86d9a43167391f37402afd8bf40b0be16bee4d" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-utils", + "schemars", + "serde", +] + +[[package]] +name = "cw721-base" +version = "0.15.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus", + "cw-utils", + "cw2", + "cw721 0.15.0", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "cw721-base" version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62c3ee3b669fc2a8094301a73fd7be97a7454d4df2650c33599f737e8f254d24" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", "cw-utils", "cw2", - "cw721", + "cw721 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", "schemars", "serde", "thiserror", @@ -297,8 +686,8 @@ dependencies = [ "cw2", "cw20", "cw3", - "cw721-base", - "prost", + "cw721-base 0.15.0", + "prost 0.10.4", "schemars", "serde", "thiserror", @@ -311,8 +700,8 @@ dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw2", - "cw721", - "cw721-base", + "cw721 0.15.0", + "cw721-base 0.15.0", "schemars", "serde", ] @@ -358,6 +747,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "dlv-list" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" + [[package]] name = "dyn-clone" version = "1.0.9" @@ -376,6 +771,27 @@ dependencies = [ "signature", ] +[[package]] +name = "ed25519" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "sha2 0.9.9", + "zeroize", +] + [[package]] name = "ed25519-zebra" version = "3.0.0" @@ -418,395 +834,1992 @@ dependencies = [ ] [[package]] -name = "ff" -version = "0.12.0" +name = "enumflags2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "83c8d82922337cd23a15f88b70d8e4ef5f11da38dd7cdb55e84dd5de99695da0" dependencies = [ - "rand_core 0.6.3", - "subtle", + "enumflags2_derive", + "serde", ] [[package]] -name = "forward_ref" -version = "1.0.0" +name = "enumflags2_derive" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +checksum = "946ee94e3dbf58fdd324f9ce245c7b238d46a66f00e86a020b71996349e46cce" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "generic-array" -version = "0.14.6" +name = "env_logger" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" dependencies = [ - "typenum", - "version_check", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "eyre" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "indenter", + "once_cell", ] [[package]] -name = "getrandom" -version = "0.2.7" +name = "fastrand" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "instant", ] [[package]] -name = "group" +name = "ff" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" +checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ - "ff", "rand_core 0.6.3", "subtle", ] [[package]] -name = "hex" -version = "0.4.3" +name = "flex-error" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] [[package]] -name = "hmac" -version = "0.12.1" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.3", -] +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "itertools" -version = "0.10.4" +name = "form_urlencoded" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "either", + "percent-encoding", ] [[package]] -name = "itoa" -version = "1.0.3" +name = "forward_ref" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" [[package]] -name = "k256" -version = "0.11.5" +name = "futures" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3636d281d46c3b64182eb3a0a42b7b483191a2ecc3f05301fa67403f7c9bc949" +checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "sha2 0.10.5", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "libc" -version = "0.2.132" +name = "futures-channel" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" +dependencies = [ + "futures-core", + "futures-sink", +] [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "futures-core" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] -name = "pkcs8" -version = "0.9.0" +name = "futures-executor" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" dependencies = [ - "der", - "spki", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "proc-macro2" -version = "1.0.43" +name = "futures-io" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" -dependencies = [ - "unicode-ident", -] +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" [[package]] -name = "prost" -version = "0.10.4" +name = "futures-lite" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" dependencies = [ - "bytes", - "prost-derive", + "fastrand", + "futures-core", + "futures-io", + "memchr", + "parking", + "pin-project-lite", + "waker-fn", ] [[package]] -name = "prost-derive" -version = "0.10.1" +name = "futures-macro" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ - "anyhow", - "itertools", "proc-macro2", "quote", "syn", ] [[package]] -name = "quote" -version = "1.0.21" +name = "futures-sink" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2", -] +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] -name = "rand_core" -version = "0.5.1" +name = "futures-task" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] -name = "rand_core" -version = "0.6.3" +name = "futures-util" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ - "getrandom 0.2.7", + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] [[package]] -name = "rfc6979" -version = "0.3.0" +name = "generic-array" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ - "crypto-bigint", - "hmac", - "zeroize", + "typenum", + "version_check", ] [[package]] -name = "ryu" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" - -[[package]] -name = "schemars" -version = "0.8.10" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] -name = "schemars_derive" -version = "0.8.10" +name = "getrandom" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn", + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] -name = "sec1" -version = "0.3.0" +name = "group" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", + "ff", + "rand_core 0.6.3", "subtle", - "zeroize", ] [[package]] -name = "semver" -version = "1.0.13" +name = "h2" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] -name = "serde" -version = "1.0.144" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "serde_derive", + "ahash", ] [[package]] -name = "serde-json-wasm" -version = "0.4.1" +name = "headers" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" +checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" dependencies = [ - "serde", + "base64", + "bitflags", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", ] [[package]] -name = "serde_derive" -version = "1.0.144" +name = "headers-core" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "proc-macro2", - "quote", - "syn", + "http", ] [[package]] -name = "serde_derive_internals" -version = "0.26.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "proc-macro2", - "quote", - "syn", + "libc", ] [[package]] -name = "serde_json" -version = "1.0.85" +name = "hex" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hkdf" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01706d578d5c281058480e673ae4086a9f4710d8df1ad80a5b03e39ece5f886b" dependencies = [ - "itoa", - "ryu", - "serde", + "digest 0.9.0", + "hmac 0.11.0", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "hmac" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", + "crypto-mac", "digest 0.9.0", - "opaque-debug", ] [[package]] -name = "sha2" -version = "0.10.5" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "cfg-if", - "cpufeatures", "digest 0.10.3", ] [[package]] -name = "signature" -version = "1.6.1" +name = "http" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90531723b08e4d6d71b791108faf51f03e1b4a7784f96b2b87f852ebc247228" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.3", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "spki" -version = "0.6.0" +name = "http-body" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "base64ct", - "der", + "bytes", + "http", + "pin-project-lite", ] [[package]] -name = "static_assertions" -version = "1.1.0" +name = "http-range-header" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" [[package]] -name = "subtle" -version = "2.4.1" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "syn" -version = "1.0.99" +name = "httpdate" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "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 = "thiserror" -version = "1.0.35" +name = "hyper-proxy" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" dependencies = [ - "thiserror-impl", + "bytes", + "futures", + "headers", + "http", + "hyper", + "hyper-rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki", ] [[package]] -name = "thiserror-impl" -version = "1.0.35" +name = "hyper-rustls" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "proc-macro2", - "quote", - "syn", + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki", + "webpki-roots", ] [[package]] -name = "typenum" -version = "1.15.0" +name = "hyper-timeout" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] [[package]] -name = "uint" -version = "0.9.3" +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +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 = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "integration-tests" +version = "0.1.0" +dependencies = [ + "anyhow", + "assert_matches", + "cosm-orc", + "cosmwasm-std", + "cw-utils", + "cw721 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cw721-base 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", + "once_cell", + "rand", + "serde", + "serde_json", + "test-context", +] + +[[package]] +name = "itertools" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "json5" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" +dependencies = [ + "pest", + "pest_derive", + "serde", +] + +[[package]] +name = "k256" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3636d281d46c3b64182eb3a0a42b7b483191a2ecc3f05301fa67403f7c9bc949" +dependencies = [ + "cfg-if", + "ecdsa", + "elliptic-curve", + "sha2 0.10.5", + "sha3", +] + +[[package]] +name = "keccak" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9b7d56ba4a8344d6be9729995e6b06f928af29998cdf79fe390cbf6b1fee838" + +[[package]] +name = "keyring" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38fb8399ddcabfccb274577a8d90f0653e0b5b5977797c1c8834ad09839a10e5" +dependencies = [ + "byteorder", + "secret-service", + "security-framework", + "winapi", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.132" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" + +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + +[[package]] +name = "log" +version = "0.4.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "matchit" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" + +[[package]] +name = "memchr" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" + +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "mio" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", +] + +[[package]] +name = "nb-connect" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1bb540dc6ef51cfe1916ec038ce7a620daf3a111e2502d745197cd53d6bca15" +dependencies = [ + "libc", + "socket2", +] + +[[package]] +name = "nix" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4916f159ed8e5de0082076562152a76b7a1f64a01fd9d1e0fea002c37624faf" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "memoffset", +] + +[[package]] +name = "nom" +version = "7.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-complex" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" +dependencies = [ + "num-traits", +] + +[[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", +] + +[[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-iter" +version = "0.1.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +dependencies = [ + "autocfg", + "num-bigint", + "num-integer", + "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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + +[[package]] +name = "once_cell" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + +[[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 = "ordered-multimap" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +dependencies = [ + "dlv-list", + "hashbrown", +] + +[[package]] +name = "parking" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" + +[[package]] +name = "paste" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.3", +] + +[[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.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[package]] +name = "pest" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a" +dependencies = [ + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b75706b9642ebcb34dab3bc7750f811609a0eb1dd8b88c2d15bf628c1c65b2" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pest_meta" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8717927f9b79515e565a64fe46c38b8cd0427e64c40680b14a7365ab09ac8d" +dependencies = [ + "once_cell", + "pest", + "sha1", +] + +[[package]] +name = "pin-project" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[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", + "spki", +] + +[[package]] +name = "polling" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899b00b9c8ab553c743b3e11e87c5c7d423b2a2de229ba95b24a756344748011" +dependencies = [ + "autocfg", + "cfg-if", + "libc", + "log", + "wepoll-ffi", + "winapi", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +dependencies = [ + "once_cell", + "thiserror", + "toml", +] + +[[package]] +name = "proc-macro2" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" +dependencies = [ + "bytes", + "prost-derive 0.10.1", +] + +[[package]] +name = "prost" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" +dependencies = [ + "bytes", + "prost-derive 0.11.0", +] + +[[package]] +name = "prost-derive" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b670f45da57fb8542ebdbb6105a925fe571b67f9e7ed9f47a06a84e72b4e7cc" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-derive" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" +dependencies = [ + "bytes", + "prost 0.11.0", +] + +[[package]] +name = "quote" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.3", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +dependencies = [ + "getrandom 0.2.7", +] + +[[package]] +name = "regex" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.6.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" + +[[package]] +name = "rfc6979" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32" +dependencies = [ + "crypto-bigint", + "hmac 0.12.1", + "zeroize", +] + +[[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.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74e2ee464e763f6527991a6d532142e3c2016eb9907cc081401c11862c26a840" +dependencies = [ + "digest 0.10.3", +] + +[[package]] +name = "ripemd160" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "ron" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +dependencies = [ + "base64", + "bitflags", + "serde", +] + +[[package]] +name = "rust-ini" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +dependencies = [ + "cfg-if", + "ordered-multimap", +] + +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64", + "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 = "ryu" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" + +[[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.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +dependencies = [ + "lazy_static", + "windows-sys", +] + +[[package]] +name = "schemars" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" +dependencies = [ + "dyn-clone", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn", +] + +[[package]] +name = "scoped-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" + +[[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", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + +[[package]] +name = "secret-service" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1da5c423b8783185fd3fecd1c8796c267d2c089d894ce5a93c280a5d3f780a2" +dependencies = [ + "aes", + "block-modes", + "hkdf", + "lazy_static", + "num", + "rand", + "serde", + "sha2 0.9.9", + "zbus", + "zbus_macros", + "zvariant", + "zvariant_derive", +] + +[[package]] +name = "security-framework" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" + +[[package]] +name = "serde" +version = "1.0.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-json-wasm" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479b4dbc401ca13ee8ce902851b834893251404c4f3c65370a49e047a6be09a5" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_bytes" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfc50e8183eeeb6178dcb167ae34a8051d63535023ae38b5d8d12beae193d37b" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.144" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[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", +] + +[[package]] +name = "serde_json" +version = "1.0.85" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_yaml" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8613d593412a0deb7bbd8de9d908efff5a0cb9ccd8f62c641e7b2ed2f57291d1" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.3", +] + +[[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.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.3", +] + +[[package]] +name = "sha3" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaedf34ed289ea47c2b741bb72e5357a209512d67bcd4bda44359e5bf0470f56" +dependencies = [ + "digest 0.10.3", + "keccak", +] + +[[package]] +name = "signature" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e90531723b08e4d6d71b791108faf51f03e1b4a7784f96b2b87f852ebc247228" +dependencies = [ + "digest 0.10.3", + "rand_core 0.6.3", +] + +[[package]] +name = "slab" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] + +[[package]] +name = "socket2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +dependencies = [ + "libc", + "winapi", +] + +[[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", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +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 = "syn" +version = "1.0.99" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "unicode-xid", +] + +[[package]] +name = "tendermint" +version = "0.23.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467f82178deeebcd357e1273a0c0b77b9a8a0313ef7c07074baebe99d87851f4" +dependencies = [ + "async-trait", + "bytes", + "ed25519", + "ed25519-dalek", + "flex-error", + "futures", + "k256", + "num-traits", + "once_cell", + "prost 0.11.0", + "prost-types", + "ripemd160", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-config" +version = "0.23.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42ee0abc27ef5fc34080cce8d43c189950d331631546e7dfb983b6274fa327" +dependencies = [ + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", +] + +[[package]] +name = "tendermint-proto" +version = "0.23.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ce80bf536476db81ecc9ebab834dc329c9c1509a694f211a73858814bfe023" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost 0.11.0", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-rpc" +version = "0.23.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f14aafe3528a0f75e9f3f410b525617b2de16c4b7830a21f717eee62882ec60" +dependencies = [ + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom 0.2.7", + "http", + "hyper", + "hyper-proxy", + "hyper-rustls", + "peg", + "pin-project", + "serde", + "serde_bytes", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "termcolor" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "test-context" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055831a02a4f5aa28fede67f2902014273eb8c21b958ac5ebbd59b71ef30dbc3" +dependencies = [ + "async-trait", + "futures", + "test-context-macros", +] + +[[package]] +name = "test-context-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "thiserror" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "time" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" +dependencies = [ + "libc", + "num_threads", + "time-macros", +] + +[[package]] +name = "time-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" + +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + +[[package]] +name = "tokio" +version = "1.21.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +dependencies = [ + "autocfg", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "pin-project-lite", + "socket2", + "tokio-macros", + "winapi", +] + +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-macros" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +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-stream" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6edf2d6bc038a43d31353570e27270603f4648d18f5ed10c0e179abe43255af" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +dependencies = [ + "serde", +] + +[[package]] +name = "tonic" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55b9af819e54b8f33d453655bef9b9acc171568fb49523078d0cc4e7484200ec" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64", + "bytes", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-timeout", + "percent-encoding", + "pin-project", + "prost 0.11.0", + "prost-derive 0.11.0", + "tokio", + "tokio-stream", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "tracing", + "tracing-futures", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap", + "pin-project", + "pin-project-lite", + "rand", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tower-http" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" +dependencies = [ + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +dependencies = [ + "cfg-if", + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "try-lock" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" + +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + +[[package]] +name = "ucd-trie" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" + +[[package]] +name = "uint" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" dependencies = [ @@ -816,18 +2829,95 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unicode-bidi" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + [[package]] name = "unicode-ident" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcc811dc4066ac62f84f11307873c4850cb653bfa9b1719cee2bd2204a4bc5dd" +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] +name = "unsafe-libyaml" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" + [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "walkdir" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +dependencies = [ + "same-file", + "winapi", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +dependencies = [ + "log", + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -840,8 +2930,259 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" + +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki", +] + +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +dependencies = [ + "linked-hash-map", +] + +[[package]] +name = "zbus" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cbeb2291cd7267a94489b71376eda33496c1b9881adf6b36f26cc2779f3fc49" +dependencies = [ + "async-io", + "byteorder", + "derivative", + "enumflags2", + "fastrand", + "futures", + "nb-connect", + "nix", + "once_cell", + "polling", + "scoped-tls", + "serde", + "serde_repr", + "zbus_macros", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa3959a7847cf95e3d51e312856617c5b1b77191176c65a79a5f14d778bbe0a6" +dependencies = [ + "proc-macro-crate 0.1.5", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zvariant" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a68c7b55f2074489b7e8e07d2d0a6ee6b4f233867a653c664d8020ba53692525" +dependencies = [ + "byteorder", + "enumflags2", + "libc", + "serde", + "static_assertions", + "zvariant_derive", +] + +[[package]] +name = "zvariant_derive" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4ca5e22593eb4212382d60d26350065bf2a02c34b85bc850474a74b589a3de9" +dependencies = [ + "proc-macro-crate 1.2.1", + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index b50be7a00..dfa53de89 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] -members = ["packages/*", "contracts/*"] +members = ["packages/*", "contracts/*", "ci/*"] +exclude = ["ci/configs/"] [profile.release.package.cw721-base] codegen-units = 1 diff --git a/ci/bootstrap-env/Cargo.toml b/ci/bootstrap-env/Cargo.toml new file mode 100644 index 000000000..d63ca4db2 --- /dev/null +++ b/ci/bootstrap-env/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "bootstrap-env" +version = "0.1.0" +edition = "2021" +authors = ["de_husk", "ekez "] + +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +cosm-orc = { version = "2.3.1" } +cw20 = "0.15" +cw-utils = "0.15" +cosmwasm-std = { version = "1.1", features = ["ibc3"] } +cw721-base = { version = "*", path = "../../contracts/cw721-base" } + +anyhow = { version = "1.0.51"} +env_logger = "0.9.0" +serde = { version = "1.0", default-features = false, features = ["derive"] } +serde_json = "1.0" +serde_yaml = "0.9" diff --git a/ci/bootstrap-env/src/main.rs b/ci/bootstrap-env/src/main.rs new file mode 100644 index 000000000..0d8e29eff --- /dev/null +++ b/ci/bootstrap-env/src/main.rs @@ -0,0 +1,73 @@ +use anyhow::Result; +use cosm_orc::{ + config::{ + cfg::Config, + key::{Key, SigningKey}, + }, + orchestrator::cosm_orc::CosmOrc, +}; +use serde::{Deserialize, Serialize}; +use std::env; +use std::fs; +use std::time::Duration; + +#[derive(Clone, Debug, Serialize, Deserialize)] +struct Account { + name: String, + address: String, + mnemonic: String, +} + +fn main() -> Result<()> { + env_logger::init(); + + let config = env::var("CONFIG").expect("missing yaml CONFIG env var"); + let mut cfg = Config::from_yaml(&config)?; + let mut orc = CosmOrc::new(cfg.clone(), false)?; + + // use first test user as DAO admin, and only DAO member: + let accounts: Vec = + serde_json::from_slice(&fs::read("ci/configs/test_accounts.json")?)?; + let account = accounts[0].clone(); + + let key = SigningKey { + name: account.name, + key: Key::Mnemonic(account.mnemonic), + }; + let addr = account.address; + + orc.poll_for_n_blocks(1, Duration::from_millis(20_000), true)?; + + orc.store_contracts("artifacts", &key, None)?; + + let msg = cw721_base::msg::InstantiateMsg { + name: "token".to_string(), + symbol: "nonfungible".to_string(), + minter: addr.clone(), + }; + + let res = orc.instantiate( + "cw721_base", + "cw721_base_init", + &msg, + &key, + Some(addr.clone()), + vec![], + )?; + + println!(" ------------------------ "); + + println!("admin / minter address: {}", addr); + println!("cw721_base address: {}", res.address); + + // Persist contract code_ids in local.yaml so we can use + // SKIP_CONTRACT_STORE locally to avoid having to re-store them + // again + cfg.contract_deploy_info = orc.contract_map.deploy_info().clone(); + fs::write( + "ci/configs/cosm-orc/local.yaml", + serde_yaml::to_string(&cfg)?, + )?; + + Ok(()) +} diff --git a/ci/configs/cosm-orc/ci.yaml b/ci/configs/cosm-orc/ci.yaml new file mode 100644 index 000000000..d5035c197 --- /dev/null +++ b/ci/configs/cosm-orc/ci.yaml @@ -0,0 +1,8 @@ +chain_cfg: + denom: "ujunox" + prefix: "juno" + chain_id: "testing" + rpc_endpoint: "http://localhost:26657/" + grpc_endpoint: "http://localhost:9090/" + gas_prices: 0.1 + gas_adjustment: 1.5 diff --git a/ci/configs/test_accounts.json b/ci/configs/test_accounts.json new file mode 100644 index 000000000..06733aebb --- /dev/null +++ b/ci/configs/test_accounts.json @@ -0,0 +1,27 @@ +[ + { + "name": "user1", + "address": "juno10j9gpw9t4jsz47qgnkvl5n3zlm2fz72k67rxsg", + "mnemonic": "siren window salt bullet cream letter huge satoshi fade shiver permit offer happy immense wage fitness goose usual aim hammer clap about super trend" + }, + { + "name": "user2", + "address": "juno1v9xynggs6vnrv2x5ufxdj398u2ghc5n9ya57ea", + "mnemonic": "devote vast fashion hat flat ensure earth abandon gesture erode member few common lonely sword rapid police fury another surround dragon purse swear patch" + }, + { + "name": "user3", + "address": "juno1965jgwxjp39sz2urty8r2khjdyy8dgt78kzfj6", + "mnemonic": "vessel utility occur solid post dry now blush federal bonus fiscal differ mesh puppy sock cloud diagram fence silk shield bless spring ordinary banana" + }, + { + "name": "user4", + "address": "juno1zn6psr8ngkagj3wmt0830y97s2uae6eazgnnsa", + "mnemonic": "finger attitude bargain drop nephew hunt try spring link swamp submit devote forget canvas whisper almost typical photo evoke width penalty start frost strategy" + }, + { + "name": "user5", + "address": "juno1d64uqyvwzsr6wz5aw9p8rt08jya78xpjdxxaa5", + "mnemonic": "record regular they cupboard someone mutual marble evil swamp bread expire pioneer casual pitch help road hard survey unfold false decrease material bargain youth" + } +] \ No newline at end of file diff --git a/ci/integration-tests/.cargo/config b/ci/integration-tests/.cargo/config new file mode 100644 index 000000000..13f255576 --- /dev/null +++ b/ci/integration-tests/.cargo/config @@ -0,0 +1,3 @@ +[alias] +c = "check --tests" +t = "test -- --ignored --test-threads 1" \ No newline at end of file diff --git a/ci/integration-tests/Cargo.toml b/ci/integration-tests/Cargo.toml new file mode 100644 index 000000000..2d2bae284 --- /dev/null +++ b/ci/integration-tests/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "integration-tests" +version = "0.1.0" +edition = "2021" + +# This crate depends on rand. These are not features in +# wasm builds of cosmwasm. Despite this crate only being used as a dev +# dependency, because it is part of the workspace it will always be +# compiled. There is no good way to remove a member from a workspace +# conditionally. As such, we don't compile anything here if we're +# targeting wasm. +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +cosm-orc = { version = "2.3.1" } +cw-utils = "0.15" +cosmwasm-std = { version = "1.1", features = ["ibc3"] } +cw721 = "0.15" +cw721-base = "0.15" + +assert_matches = "1.5" +anyhow = { version = "1.0.51"} +serde = { version = "1.0", default-features = false, features = ["derive"] } +serde_json = "1.0" +once_cell = "1.13.0" +env_logger = "0.9.0" +test-context = "0.1.4" +rand = "0.8.5" diff --git a/ci/integration-tests/README.md b/ci/integration-tests/README.md new file mode 100644 index 000000000..dc5ef7390 --- /dev/null +++ b/ci/integration-tests/README.md @@ -0,0 +1,43 @@ +# Integration Tests + +e2e integration tests with gas profiling. + +`cd ci/integration_tests && cargo t` to run all tests. + +`cargo t fn_test_name` to run individual integration tests. + +## Adding New Integration Tests + +Add new tests in `src/tests`: +```rust +#[test_context(Chain)] +#[test] +#[ignore] +fn new_dao_has_no_items(chain: &mut Chain) { + let res = create_dao( + chain, + None, + "ex_create_dao", + chain.users["user1"].account.address.clone(), + ); + let dao = res.unwrap(); + + // use the native rust types to interact with the contract + let res = chain + .orc + .query( + "cw_core", + &cw_core::msg::QueryMsg::GetItem { + key: "meme".to_string(), + }, + ) + .unwrap(); + let res: GetItemResponse = res.data().unwrap(); + + assert_eq!(res.item, None); +} +``` + +We are currentlying [ignoring](https://doc.rust-lang.org/book/ch11-02-running-tests.html#ignoring-some-tests-unless-specifically-requested) all integration tests by adding the `#[ignore]` annotation to them, because we want to skip them when people run `cargo test` from the workspace root. + +Run `cargo c` to compile the tests. diff --git a/ci/integration-tests/gas_reports/test-1175590054.json b/ci/integration-tests/gas_reports/test-1175590054.json new file mode 100644 index 000000000..19397fdd1 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-1175590054.json @@ -0,0 +1 @@ +{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137335,"gas_wanted":181493,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1319515518.json b/ci/integration-tests/gas_reports/test-1319515518.json new file mode 100644 index 000000000..fe2df049a --- /dev/null +++ b/ci/integration-tests/gas_reports/test-1319515518.json @@ -0,0 +1 @@ +{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1684095571.json b/ci/integration-tests/gas_reports/test-1684095571.json new file mode 100644 index 000000000..cbcf06470 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-1684095571.json @@ -0,0 +1 @@ +{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28162245,"gas_wanted":42219056,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1763516178.json b/ci/integration-tests/gas_reports/test-1763516178.json new file mode 100644 index 000000000..6186940e3 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-1763516178.json @@ -0,0 +1 @@ +{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140453,"gas_wanted":186171,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137331,"gas_wanted":181488,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165333,"gas_wanted":223490,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1814160560.json b/ci/integration-tests/gas_reports/test-1814160560.json new file mode 100644 index 000000000..ed996ff14 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-1814160560.json @@ -0,0 +1 @@ +{"cw721_base":{"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165333,"gas_wanted":223490,"line_number":19}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-265147129.json b/ci/integration-tests/gas_reports/test-265147129.json new file mode 100644 index 000000000..fe2df049a --- /dev/null +++ b/ci/integration-tests/gas_reports/test-265147129.json @@ -0,0 +1 @@ +{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-3205943217.json b/ci/integration-tests/gas_reports/test-3205943217.json new file mode 100644 index 000000000..fe2df049a --- /dev/null +++ b/ci/integration-tests/gas_reports/test-3205943217.json @@ -0,0 +1 @@ +{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-4134311413.json b/ci/integration-tests/gas_reports/test-4134311413.json new file mode 100644 index 000000000..19397fdd1 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-4134311413.json @@ -0,0 +1 @@ +{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137335,"gas_wanted":181493,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-512151936.json b/ci/integration-tests/gas_reports/test-512151936.json new file mode 100644 index 000000000..cbcf06470 --- /dev/null +++ b/ci/integration-tests/gas_reports/test-512151936.json @@ -0,0 +1 @@ +{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28162245,"gas_wanted":42219056,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-55710236.json b/ci/integration-tests/gas_reports/test-55710236.json new file mode 100644 index 000000000..95e0271ab --- /dev/null +++ b/ci/integration-tests/gas_reports/test-55710236.json @@ -0,0 +1 @@ +{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":38},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":20}}} \ No newline at end of file diff --git a/ci/integration-tests/src/helpers/chain.rs b/ci/integration-tests/src/helpers/chain.rs new file mode 100644 index 000000000..52516b634 --- /dev/null +++ b/ci/integration-tests/src/helpers/chain.rs @@ -0,0 +1,126 @@ +use cosm_orc::config::key::Key; +use cosm_orc::orchestrator::cosm_orc::CosmOrc; +use cosm_orc::{config::cfg::Config, config::key::SigningKey}; +use once_cell::sync::OnceCell; +use rand::Rng; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use std::collections::HashMap; +use std::env; +use std::fs; +use std::path::Path; +use std::time::Duration; +use test_context::TestContext; + +static CONFIG: OnceCell = OnceCell::new(); + +#[derive(Debug)] +pub struct Cfg { + cfg: Config, + gas_report_dir: String, +} + +pub struct Chain { + pub cfg: Config, + pub orc: CosmOrc, + pub users: HashMap, +} + +#[derive(Clone, Debug)] +pub struct SigningAccount { + pub account: Account, + pub key: SigningKey, +} + +#[derive(Clone, Debug, Serialize, Deserialize)] +pub struct Account { + pub name: String, + pub address: String, + pub mnemonic: String, +} + +// NOTE: we have to run the integration tests in one thread right now. +// We get `account sequence mismatch` CosmosSDK error when we run in parallel. +// We could either serialize the `account.sequence` per key, or use a different key per test. + +impl TestContext for Chain { + fn setup() -> Self { + let cfg = CONFIG.get_or_init(global_setup).cfg.clone(); + let orc = CosmOrc::new(cfg.clone(), true).unwrap(); + let users = test_accounts(); + Self { cfg, orc, users } + } + + fn teardown(self) { + let cfg = CONFIG.get().unwrap(); + save_gas_report(&self.orc, &cfg.gas_report_dir); + } +} + +fn test_accounts() -> HashMap { + let bytes = fs::read("../configs/test_accounts.json").unwrap(); + let accounts: Vec = serde_json::from_slice(&bytes).unwrap(); + + let mut account_map = HashMap::new(); + for account in accounts { + account_map.insert( + account.name.clone(), + SigningAccount { + account: account.clone(), + key: SigningKey { + name: account.name, + key: Key::Mnemonic(account.mnemonic), + }, + }, + ); + } + account_map +} + +// global_setup() runs once before all of the tests +fn global_setup() -> Cfg { + env_logger::init(); + let config = env::var("CONFIG").expect("missing yaml CONFIG env var"); + let gas_report_dir = env::var("GAS_OUT_DIR").unwrap_or_else(|_| "gas_reports".to_string()); + + let mut cfg = Config::from_yaml(&config).unwrap(); + let mut orc = CosmOrc::new(cfg.clone(), true).unwrap(); + + let accounts = test_accounts(); + + // Poll for first block to make sure the node is up: + orc.poll_for_n_blocks(1, Duration::from_millis(20_000), true) + .unwrap(); + + let skip_storage = env::var("SKIP_CONTRACT_STORE").unwrap_or_else(|_| "false".to_string()); + if !skip_storage.parse::().unwrap() { + let contract_dir = "../../artifacts"; + orc.store_contracts(contract_dir, &accounts["user1"].key, None) + .unwrap(); + save_gas_report(&orc, &gas_report_dir); + // persist stored code_ids in CONFIG, so we can reuse for all tests + cfg.contract_deploy_info = orc.contract_map.deploy_info().clone(); + } + + Cfg { + cfg, + gas_report_dir, + } +} + +fn save_gas_report(orc: &CosmOrc, gas_report_dir: &str) { + let report = orc + .gas_profiler_report() + .expect("error fetching profile reports"); + + let j: Value = serde_json::to_value(report).unwrap(); + + let p = Path::new(gas_report_dir); + if !p.exists() { + fs::create_dir(p).unwrap(); + } + + let mut rng = rand::thread_rng(); + let file_name = format!("test-{}.json", rng.gen::()); + fs::write(p.join(file_name), j.to_string()).unwrap(); +} diff --git a/ci/integration-tests/src/helpers/mod.rs b/ci/integration-tests/src/helpers/mod.rs new file mode 100644 index 000000000..28ac57df5 --- /dev/null +++ b/ci/integration-tests/src/helpers/mod.rs @@ -0,0 +1 @@ +pub mod chain; diff --git a/ci/integration-tests/src/lib.rs b/ci/integration-tests/src/lib.rs new file mode 100644 index 000000000..3d559812d --- /dev/null +++ b/ci/integration-tests/src/lib.rs @@ -0,0 +1,7 @@ +#![allow(dead_code)] + +#[cfg(not(target_arch = "wasm32"))] +mod tests; + +#[cfg(not(target_arch = "wasm32"))] +mod helpers; diff --git a/ci/integration-tests/src/tests/cw20_stake_test.rs b/ci/integration-tests/src/tests/cw20_stake_test.rs new file mode 100644 index 000000000..8327d1915 --- /dev/null +++ b/ci/integration-tests/src/tests/cw20_stake_test.rs @@ -0,0 +1,120 @@ +use crate::helpers::{chain::Chain, helper::create_dao}; +use cosmwasm_std::{to_binary, Uint128}; +use cw20_stake::{msg::StakedValueResponse, state::Config}; +use cw_core_interface::voting::VotingPowerAtHeightResponse; +use std::time::Duration; +use test_context::test_context; + +// #### ExecuteMsg ##### + +#[test_context(Chain)] +#[test] +#[ignore] +fn execute_stake_tokens(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + let voting_contract = "cw20_staked_balance_voting"; + + let res = create_dao( + chain, + None, + "exc_stake_create_dao", + user_addr.clone(), + &user_key, + ); + let dao = res.unwrap(); + + let voting_addr = dao.state.voting_module.as_str(); + + // stake dao tokens: + chain + .orc + .contract_map + .add_address(voting_contract, voting_addr) + .unwrap(); + let staking_addr: String = chain + .orc + .query( + voting_contract, + &cw20_staked_balance_voting::msg::QueryMsg::StakingContract {}, + ) + .unwrap() + .data() + .unwrap(); + + chain + .orc + .contract_map + .add_address("cw20_stake", staking_addr.to_string()) + .unwrap(); + let res = chain + .orc + .query( + "cw20_stake", + &cw20_stake::msg::QueryMsg::StakedValue { + address: user_addr.clone(), + }, + ) + .unwrap(); + let staked_value: StakedValueResponse = res.data().unwrap(); + + assert_eq!(staked_value.value, Uint128::new(0)); + + let res = chain + .orc + .query("cw20_stake", &cw20_stake::msg::QueryMsg::GetConfig {}) + .unwrap(); + let config: Config = res.data().unwrap(); + + chain + .orc + .contract_map + .add_address("cw20_base", config.token_address.as_str()) + .unwrap(); + chain + .orc + .execute( + "cw20_base", + "exc_stake_stake_tokens", + &cw20_base::msg::ExecuteMsg::Send { + contract: staking_addr, + amount: Uint128::new(100), + msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), + }, + &user_key, + vec![], + ) + .unwrap(); + + let res = chain + .orc + .query( + "cw20_stake", + &cw20_stake::msg::QueryMsg::StakedValue { + address: user_addr.clone(), + }, + ) + .unwrap(); + let staked_value: StakedValueResponse = res.data().unwrap(); + + assert_eq!(staked_value.value, Uint128::new(100)); + + chain + .orc + .poll_for_n_blocks(1, Duration::from_millis(20_000), false) + .unwrap(); + + let res = chain + .orc + .query( + "cw_core", + &cw_core::msg::QueryMsg::VotingPowerAtHeight { + address: user_addr, + height: None, + }, + ) + .unwrap(); + let power: VotingPowerAtHeightResponse = res.data().unwrap(); + + assert_eq!(power.power, Uint128::new(100)); +} diff --git a/ci/integration-tests/src/tests/cw721_base_test.rs b/ci/integration-tests/src/tests/cw721_base_test.rs new file mode 100644 index 000000000..2c7a036a6 --- /dev/null +++ b/ci/integration-tests/src/tests/cw721_base_test.rs @@ -0,0 +1,80 @@ +use crate::helpers::chain::Chain; +use cosmwasm_std::Empty; +use test_context::test_context; + +#[test_context(Chain)] +#[test] +#[ignore] +fn execute_transfer_nft(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + let receiver = chain.users["user2"].account.address.clone(); + + let msg = cw721_base::msg::InstantiateMsg { + name: "token".to_string(), + symbol: "nonfungible".to_string(), + minter: user_addr.clone(), + }; + + let res = chain + .orc + .instantiate( + "cw721_base", + "cw721_base_init", + &msg, + &user_key, + Some(user_addr.clone()), + vec![], + ) + .unwrap(); + + chain + .orc + .contract_map + .add_address("cw721_base", res.address) + .unwrap(); + + chain + .orc + .execute( + "cw721_base", + "cw721_base_mint", + &cw721_base::ExecuteMsg::::Mint(cw721_base::MintMsg { + token_id: "1".to_string(), + owner: user_addr, + token_uri: None, + extension: Default::default(), + }), + &user_key, + vec![], + ) + .unwrap(); + + chain + .orc + .execute( + "cw721_base", + "cw721_base_transfer", + &cw721_base::ExecuteMsg::::TransferNft { + recipient: receiver.clone(), + token_id: "1".to_string(), + }, + &user_key, + vec![], + ) + .unwrap(); + + let owner: cw721::OwnerOfResponse = chain + .orc + .query( + "cw721_base", + &cw721_base::QueryMsg::::OwnerOf { + token_id: "1".to_string(), + include_expired: None, + }, + ) + .unwrap() + .data() + .unwrap(); + assert_eq!(owner.owner, receiver); +} diff --git a/ci/integration-tests/src/tests/cw_core_test.rs b/ci/integration-tests/src/tests/cw_core_test.rs new file mode 100644 index 000000000..e21a31f8a --- /dev/null +++ b/ci/integration-tests/src/tests/cw_core_test.rs @@ -0,0 +1,367 @@ +use crate::helpers::chain::Chain; +use crate::helpers::helper::create_dao; +use assert_matches::assert_matches; +use cosm_orc::client::error::ClientError; +use cosm_orc::orchestrator::error::ProcessError; +use cosmwasm_std::{to_binary, Addr, CosmosMsg, Decimal, Uint128}; +use cw20_stake::msg::{StakedValueResponse, TotalValueResponse}; +use cw_core::query::{GetItemResponse, PauseInfoResponse}; +use cw_utils::Duration; +use test_context::test_context; +use voting::{deposit::CheckedDepositInfo, threshold::PercentageThreshold, threshold::Threshold}; + +// #### ExecuteMsg ##### + +// TODO: Add tests for all cw-core execute msgs + +#[test_context(Chain)] +#[test] +#[ignore] +fn execute_execute_admin_msgs(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + + // if you are not the admin, you cant execute admin msgs: + let res = create_dao( + chain, + None, + "exc_admin_msgs_create_dao", + user_addr.clone(), + &user_key, + ); + let dao = res.unwrap(); + + let res = chain.orc.execute( + "cw_core", + "exc_admin_msgs_pause_dao_fail", + &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { + msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { + contract_addr: dao.addr, + msg: to_binary(&cw_core::msg::ExecuteMsg::Pause { + duration: Duration::Time(100), + }) + .unwrap(), + funds: vec![], + })], + }, + &user_key, + vec![], + ); + + assert_matches!( + res.unwrap_err(), + ProcessError::ClientError(ClientError::CosmosSdk { .. }) + ); + + let res = chain + .orc + .query("cw_core", &cw_core::msg::QueryMsg::PauseInfo {}) + .unwrap(); + let res: PauseInfoResponse = res.data().unwrap(); + + assert_eq!(res, PauseInfoResponse::Unpaused {}); + + // if you are the admin you can execute admin msgs: + let res = create_dao( + chain, + Some(user_addr.clone()), + "exc_admin_msgs_create_dao_with_admin", + user_addr, + &user_key, + ); + let dao = res.unwrap(); + + chain + .orc + .execute( + "cw_core", + "exc_admin_msgs_pause_dao", + &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { + msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { + contract_addr: dao.addr, + msg: to_binary(&cw_core::msg::ExecuteMsg::Pause { + duration: Duration::Height(100), + }) + .unwrap(), + funds: vec![], + })], + }, + &user_key, + vec![], + ) + .unwrap(); + + let res = chain + .orc + .query("cw_core", &cw_core::msg::QueryMsg::PauseInfo {}) + .unwrap(); + + let res: PauseInfoResponse = res.data().unwrap(); + assert_ne!(res, PauseInfoResponse::Unpaused {}); +} + +#[test_context(Chain)] +#[test] +#[ignore] +fn execute_items(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + + // add item: + let res = create_dao( + chain, + Some(user_addr.clone()), + "exc_items_create_dao", + user_addr, + &user_key, + ); + + let dao = res.unwrap(); + + let res = chain + .orc + .query( + "cw_core", + &cw_core::msg::QueryMsg::GetItem { + key: "meme".to_string(), + }, + ) + .unwrap(); + let res: GetItemResponse = res.data().unwrap(); + + assert_eq!(res.item, None); + + chain + .orc + .execute( + "cw_core", + "exc_items_set", + &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { + msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { + contract_addr: dao.addr.clone(), + msg: to_binary(&cw_core::msg::ExecuteMsg::SetItem { + key: "meme".to_string(), + addr: "foobar".to_string(), + }) + .unwrap(), + funds: vec![], + })], + }, + &user_key, + vec![], + ) + .unwrap(); + + let res = chain + .orc + .query( + "cw_core", + &cw_core::msg::QueryMsg::GetItem { + key: "meme".to_string(), + }, + ) + .unwrap(); + let res: GetItemResponse = res.data().unwrap(); + + assert_eq!(res.item, Some("foobar".to_string())); + + // remove item: + chain + .orc + .execute( + "cw_core", + "exc_items_rm", + &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { + msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { + contract_addr: dao.addr, + msg: to_binary(&cw_core::msg::ExecuteMsg::RemoveItem { + key: "meme".to_string(), + }) + .unwrap(), + funds: vec![], + })], + }, + &user_key, + vec![], + ) + .unwrap(); + + let res = chain + .orc + .query( + "cw_core", + &cw_core::msg::QueryMsg::GetItem { + key: "meme".to_string(), + }, + ) + .unwrap(); + let res: GetItemResponse = res.data().unwrap(); + + assert_eq!(res.item, None); +} + +// #### InstantiateMsg ##### + +#[test_context(Chain)] +#[test] +#[ignore] +fn instantiate_with_no_admin(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + + let res = create_dao(chain, None, "inst_dao_no_admin", user_addr, &user_key); + let dao = res.unwrap(); + + // ensure the dao is the admin: + assert_eq!(dao.state.admin, dao.addr); + assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); + assert_eq!( + dao.state.config, + cw_core::state::Config { + dao_uri: None, + name: "DAO DAO".to_string(), + description: "A DAO that makes DAO tooling".to_string(), + image_url: None, + automatically_add_cw20s: false, + automatically_add_cw721s: false + } + ); +} + +#[test_context(Chain)] +#[test] +#[ignore] +fn instantiate_with_admin(chain: &mut Chain) { + let user_addr = chain.users["user1"].account.address.clone(); + let user_key = chain.users["user1"].key.clone(); + let voting_contract = "cw20_staked_balance_voting"; + let proposal_contract = "cw_proposal_single"; + + let res = create_dao( + chain, + Some(user_addr.clone()), + "inst_admin_create_dao", + user_addr.clone(), + &user_key, + ); + let dao = res.unwrap(); + + // general dao info is valid: + assert_eq!(dao.state.admin, user_addr); + assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); + assert_eq!( + dao.state.config, + cw_core::state::Config { + dao_uri: None, + name: "DAO DAO".to_string(), + description: "A DAO that makes DAO tooling".to_string(), + image_url: None, + automatically_add_cw20s: false, + automatically_add_cw721s: false + } + ); + + let voting_addr = dao.state.voting_module.as_str(); + let prop_addr = dao.state.proposal_modules[0].address.as_str(); + + // voting module config is valid: + chain + .orc + .contract_map + .add_address(voting_contract, voting_addr) + .unwrap(); + let res = &chain + .orc + .query( + voting_contract, + &cw20_staked_balance_voting::msg::QueryMsg::StakingContract {}, + ) + .unwrap(); + let staking_addr: &str = res.data().unwrap(); + + chain + .orc + .contract_map + .add_address("cw20_stake", staking_addr) + .unwrap(); + let res = chain + .orc + .query( + "cw20_stake", + &cw20_stake::msg::QueryMsg::StakedValue { address: user_addr }, + ) + .unwrap(); + let staked_res: StakedValueResponse = res.data().unwrap(); + assert_eq!(staked_res.value, Uint128::new(0)); + + let res = chain + .orc + .query("cw20_stake", &cw20_stake::msg::QueryMsg::GetConfig {}) + .unwrap(); + let config_res: cw20_stake::state::Config = res.data().unwrap(); + assert_eq!( + config_res.owner, + Some(Addr::unchecked( + chain.orc.contract_map.address("cw_core").unwrap() + )) + ); + assert_eq!(config_res.manager, None); + + let res = &chain + .orc + .query( + voting_contract, + &cw20_staked_balance_voting::msg::QueryMsg::TokenContract {}, + ) + .unwrap(); + let token_addr: &str = res.data().unwrap(); + assert_eq!(config_res.token_address, token_addr); + + assert_eq!(config_res.unstaking_duration, Some(Duration::Time(1209600))); + + let res = chain + .orc + .query("cw20_stake", &cw20_stake::msg::QueryMsg::TotalValue {}) + .unwrap(); + let total_res: TotalValueResponse = res.data().unwrap(); + assert_eq!(total_res.total, Uint128::new(0)); + + // proposal module config is valid: + chain + .orc + .contract_map + .add_address(proposal_contract, prop_addr) + .unwrap(); + let res = chain + .orc + .query( + proposal_contract, + &cw_proposal_single::msg::QueryMsg::Config {}, + ) + .unwrap(); + let config_res: cw_proposal_single::state::Config = res.data().unwrap(); + + assert_eq!(config_res.min_voting_period, None); + assert_eq!(config_res.max_voting_period, Duration::Time(432000)); + assert!(!config_res.allow_revoting); + assert!(config_res.only_members_execute); + assert_eq!( + config_res.deposit_info, + Some(CheckedDepositInfo { + token: Addr::unchecked(token_addr), + deposit: Uint128::new(1000000000), + refund_failed_proposals: true, + }) + ); + assert_eq!( + config_res.threshold, + Threshold::ThresholdQuorum { + threshold: PercentageThreshold::Majority {}, + quorum: PercentageThreshold::Percent(Decimal::percent(35)), + } + ); + assert_eq!( + config_res.dao, + chain.orc.contract_map.address("cw_core").unwrap() + ); +} diff --git a/ci/integration-tests/src/tests/mod.rs b/ci/integration-tests/src/tests/mod.rs new file mode 100644 index 000000000..f71be41ff --- /dev/null +++ b/ci/integration-tests/src/tests/mod.rs @@ -0,0 +1 @@ +pub mod cw721_base_test; diff --git a/contracts/cw721-fixed-price/Cargo.toml b/contracts/cw721-fixed-price/Cargo.toml index 5342dd564..475580173 100644 --- a/contracts/cw721-fixed-price/Cargo.toml +++ b/contracts/cw721-fixed-price/Cargo.toml @@ -15,17 +15,6 @@ 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] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] diff --git a/justfile b/justfile new file mode 100644 index 000000000..b9327071c --- /dev/null +++ b/justfile @@ -0,0 +1,37 @@ +orc_config := env_var_or_default('CONFIG', '`pwd`/ci/configs/cosm-orc/ci.yaml') +test_addrs := env_var_or_default('TEST_ADDRS', `jq -r '.[].address' ci/configs/test_accounts.json | tr '\n' ' '`) + +build: + cargo build + +test: + cargo test + +lint: + cargo +nightly clippy --all-targets -- -D warnings + +integration-test: deploy-local optimize + RUST_LOG=info CONFIG={{orc_config}} cargo integration-test + +deploy-local: + docker kill cosmwasm || true + docker volume rm -f junod_data + docker run --rm -d --name cosmwasm \ + -e PASSWORD=xxxxxxxxx \ + -e STAKE_TOKEN=ujunox \ + -e GAS_LIMIT=100000000 \ + -e MAX_BYTES=22020096 \ + -e UNSAFE_CORS=true \ + -p 1317:1317 \ + -p 26656:26656 \ + -p 26657:26657 \ + -p 9090:9090 \ + --mount type=volume,source=junod_data,target=/root \ + ghcr.io/cosmoscontracts/juno:v9.0.0 /opt/setup_and_run.sh {{test_addrs}} + +optimize: + docker run --rm -v "$(pwd)":/code \ + --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ + --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ + --platform linux/amd64 \ + cosmwasm/workspace-optimizer:0.12.8 From aaaaf91ac9fe3f954a028e95b99cda7f98204a76 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 11:25:44 -0700 Subject: [PATCH 2/8] Add GitHub PR comments for gas usage changes. --- .github/workflows/cosm-orc.yml | 94 ++++++++ Cargo.lock | 216 ++++++++---------- ci/bootstrap-env/Cargo.toml | 18 -- ci/bootstrap-env/src/main.rs | 73 ------ ci/integration-tests/.gitignore | 2 + .../gas_reports/test-1175590054.json | 1 - .../gas_reports/test-1319515518.json | 1 - .../gas_reports/test-1684095571.json | 1 - .../gas_reports/test-1763516178.json | 1 - .../gas_reports/test-1814160560.json | 1 - .../gas_reports/test-265147129.json | 1 - .../gas_reports/test-3205943217.json | 1 - .../gas_reports/test-4134311413.json | 1 - .../gas_reports/test-512151936.json | 1 - .../gas_reports/test-55710236.json | 1 - justfile | 3 + 16 files changed, 190 insertions(+), 226 deletions(-) create mode 100644 .github/workflows/cosm-orc.yml delete mode 100644 ci/bootstrap-env/Cargo.toml delete mode 100644 ci/bootstrap-env/src/main.rs create mode 100644 ci/integration-tests/.gitignore delete mode 100644 ci/integration-tests/gas_reports/test-1175590054.json delete mode 100644 ci/integration-tests/gas_reports/test-1319515518.json delete mode 100644 ci/integration-tests/gas_reports/test-1684095571.json delete mode 100644 ci/integration-tests/gas_reports/test-1763516178.json delete mode 100644 ci/integration-tests/gas_reports/test-1814160560.json delete mode 100644 ci/integration-tests/gas_reports/test-265147129.json delete mode 100644 ci/integration-tests/gas_reports/test-3205943217.json delete mode 100644 ci/integration-tests/gas_reports/test-4134311413.json delete mode 100644 ci/integration-tests/gas_reports/test-512151936.json delete mode 100644 ci/integration-tests/gas_reports/test-55710236.json diff --git a/.github/workflows/cosm-orc.yml b/.github/workflows/cosm-orc.yml new file mode 100644 index 000000000..244604844 --- /dev/null +++ b/.github/workflows/cosm-orc.yml @@ -0,0 +1,94 @@ +name: gas measurement + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + name: gas measurement + runs-on: ubuntu-latest + env: + GAS_OUT_DIR: gas_reports + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install latest nightly toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + target: wasm32-unknown-unknown + override: true + + - name: Rust Dependencies Cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + artifacts/ + key: ${{ runner.os }}-cargo-with-artifacts-${{ hashFiles('**/Cargo.lock') }} + + - name: Set latest just version + run: echo "JUST_VERSION=$(cargo search just -q | sed -n -e '/^just[[:space:]]/p' | cut -d '"' -f 2)" >> $GITHUB_ENV + + - name: Get cached just + uses: actions/cache@v3 + with: + path: ~/.cargo/bin/just + key: ${{ runner.os }}-just-${{ env.JUST_VERSION }} + + - name: Install just + run: cargo install just || true + + - name: Run Integration Tests + run: just integration-test + + - name: List gas reports + run: ls ci/integration-tests/gas_reports + + - name: Combine Test Gas Reports + run: cd ci/integration-tests/ && jq -rs 'reduce .[] as $item ({}; . * $item)' gas_reports/*.json > gas_report.json + + - name: Raw Gas Report + run: cat ci/integration-tests/gas_report.json + + - name: Set GIT_BRANCH + run: echo "GIT_BRANCH=$(echo ${{ github.ref }} | sed 's|/|-|g')" >> $GITHUB_ENV + + - name: Upload Gas Report + if: ${{ github.ref == 'refs/heads/main' }} + uses: actions/upload-artifact@v3 + with: + name: cw-nfts-gas-report-${{ env.GIT_BRANCH }} + path: ci/integration-tests/gas_report.json + retention-days: 90 + + - name: Download main gas report + id: download_gas + # Because the max retention period of github artifacts is 90 days + # there's a possibility the main's report no longer exists + continue-on-error: true + if: ${{ github.ref != 'refs/heads/main' }} + # NOTE: We can't use github's `actions/download-artifact` because it doesnt support + # downloading an artifact cross workflows yet + # https://github.com/actions/download-artifact/issues/3 + uses: dawidd6/action-download-artifact@v2 + with: + branch: main + workflow: cosm-orc.yml + name: cw-nfts-gas-report-refs-heads-main + + - name: Post gas diff to PR + if: ${{ github.ref != 'refs/heads/main' && steps.download_gas.found_artifact }} + uses: de-husk/cosm-orc-gas-diff-action@v0.6.2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + current_json: ci/integration-tests/gas_report.json + old_json: gas_report.json diff --git a/Cargo.lock b/Cargo.lock index 02698cea7..2d558efcf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -189,9 +189,9 @@ dependencies = [ "k256", "once_cell", "pbkdf2", - "rand_core 0.6.3", + "rand_core 0.6.4", "ripemd", - "sha2 0.10.5", + "sha2 0.10.6", "subtle", "zeroize", ] @@ -236,22 +236,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "bootstrap-env" -version = "0.1.0" -dependencies = [ - "anyhow", - "cosm-orc", - "cosmwasm-std", - "cw-utils", - "cw20", - "cw721-base 0.15.0", - "env_logger", - "serde", - "serde_json", - "serde_yaml", -] - [[package]] name = "bs58" version = "0.4.0" @@ -399,7 +383,7 @@ dependencies = [ "eyre", "getrandom 0.2.7", "k256", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "serde_json", "subtle-encoding", @@ -410,31 +394,31 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.1.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16c50d753d44148c7ff3279ac44b87b5b91e790f4c70db0e3900df211310a2bf" +checksum = "ce1c26e5595c6a960cd3d6dc1d8629e16a2b0cb22ecd653b28bbf292d7c53a3c" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", "ed25519-zebra", "k256", - "rand_core 0.6.3", + "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.1.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9053ebe2ad85831e9f9e2124fa2b22807528a78b25cc447483ce2a4aadfba394" +checksum = "0a24050753f242554c558dfe7a6b3a456850f2bc6fcf8b518988720e40a5fa21" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.1.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c742fc698a88cf02ea304cc2b5bc18ef975c5bb9eff93c3e44d2cd565e1d458" +checksum = "9ce6fe57b9e59a87a406b825cbe647f6456e1a853f8d4c99bffcc20957fd29d6" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -445,9 +429,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.1.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88a7c4c07be11add09dd3af3064c4f4cbc2dc99c6859129bdaf820131730e996" +checksum = "62e8cfc90b557a8ed272c9daf0ff3634e6b9f4698a19832bba6a4c7baa46da04" dependencies = [ "proc-macro2", "quote", @@ -456,15 +440,16 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.1.0" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb8da0ae28693d892af2944319b48adc23c42725dc0fe7271b8baa38c10865da" +checksum = "78e50ba8bfea2e449be2e7fa96fd8b196d09fb5ef34e27a18f28835ed835b199" dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", "derivative", "forward_ref", + "hex", "schemars", "serde", "serde-json-wasm", @@ -494,7 +479,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f2b443d17d49dad5ef0ede301c3179cc923b8822f3393b4d2c28c269dd4a122" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -543,9 +528,9 @@ dependencies = [ [[package]] name = "cw-storage-plus" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ba3fb5fad2dce94263d070848b2befc46b5c8e4929adfb9a3595267823d6ec" +checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0" dependencies = [ "cosmwasm-std", "schemars", @@ -554,9 +539,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a67007ff056f4cd034f361c8ed69780c0180959b9c8037c84f3caa78120faf5" +checksum = "0ae0b69fa7679de78825b4edeeec045066aa2b2c4b6e063d80042e565bb4da5c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -569,9 +554,9 @@ dependencies = [ [[package]] name = "cw2" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a1924a28607bf7cb9fd6681a64feea3e5fa9a8cb71fb4d24cf33635b21065a" +checksum = "5abb8ecea72e09afff830252963cb60faf945ce6cef2c20a43814516082653da" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -582,9 +567,9 @@ dependencies = [ [[package]] name = "cw20" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56a48e4a85c0a31484e053a3eea15abfc3ed24fafc1a1a3e91181a0bd3a8ee91" +checksum = "f6025276fb6e603e974c21f3e4606982cdc646080e8fba3198816605505e1d9a" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -608,9 +593,9 @@ dependencies = [ [[package]] name = "cw3" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961f6959e04de1bc61f4fc3f333bc039998e2aedeab4aa79ba48239cf2d3edfa" +checksum = "0ba0aa457d0fcc9022355f520a4f0ddee24a219d85c81384b14e3d15b1cf8f73" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -738,9 +723,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" dependencies = [ "block-buffer 0.10.3", "crypto-common", @@ -761,9 +746,9 @@ checksum = "4f94fa09c2aeea5b8839e414b7b841bf429fd25b9c522116ac97ee87856d88b2" [[package]] name = "ecdsa" -version = "0.14.6" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6f2ba6c133e1d5390e2351b10b17aa43a41209c821c98efc4ec493d16a5a91" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" dependencies = [ "der", "elliptic-curve", @@ -800,7 +785,7 @@ checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" dependencies = [ "curve25519-dalek", "hex", - "rand_core 0.6.3", + "rand_core 0.6.4", "serde", "sha2 0.9.9", "thiserror", @@ -822,12 +807,12 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.5", "ff", "generic-array", "group", "pkcs8", - "rand_core 0.6.3", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -892,7 +877,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -1072,7 +1057,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7391856def869c1c81063a03457c676fbcd419709c3dfb33d8d319de484b154d" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] @@ -1170,7 +1155,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", ] [[package]] @@ -1348,9 +1333,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] @@ -1383,14 +1368,14 @@ dependencies = [ [[package]] name = "k256" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3636d281d46c3b64182eb3a0a42b7b483191a2ecc3f05301fa67403f7c9bc949" +checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2 0.10.5", + "sha2 0.10.6", "sha3", ] @@ -1420,9 +1405,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.132" +version = "0.2.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" +checksum = "329c933548736bc49fd575ee68c89e8be4d260064184389a5b77517cddd99ffb" [[package]] name = "linked-hash-map" @@ -1675,7 +1660,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", ] [[package]] @@ -1839,9 +1824,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "94e2ef8dbfc347b10c094890f778ee2e36ca9bb4262e86dc99cd217e35f3470b" dependencies = [ "unicode-ident", ] @@ -1919,7 +1904,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1929,7 +1914,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1943,9 +1928,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom 0.2.7", ] @@ -1995,11 +1980,11 @@ dependencies = [ [[package]] name = "ripemd" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74e2ee464e763f6527991a6d532142e3c2016eb9907cc081401c11862c26a840" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", ] [[package]] @@ -2086,9 +2071,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1847b767a3d62d95cbf3d8a9f0e421cf57a0d8aa4f411d4b16525afb0284d4ed" +checksum = "2a5fb6c61f29e723026dc8e923d94c694313212abbecbbe5f55a7748eec5b307" dependencies = [ "dyn-clone", "schemars_derive", @@ -2098,9 +2083,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7e1b012cb3d9129567661a63755ea4b8a7386d339dc945ae187e403c6743" +checksum = "f188d036977451159430f3b8dc82ec76364a42b7e289c2b18a9a18f4470058e9" dependencies = [ "proc-macro2", "quote", @@ -2183,15 +2168,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b" dependencies = [ "serde_derive", ] @@ -2216,9 +2201,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c" dependencies = [ "proc-macro2", "quote", @@ -2258,28 +2243,15 @@ dependencies = [ "syn", ] -[[package]] -name = "serde_yaml" -version = "0.9.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8613d593412a0deb7bbd8de9d908efff5a0cb9ccd8f62c641e7b2ed2f57291d1" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.5", ] [[package]] @@ -2297,33 +2269,33 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.5", ] [[package]] name = "sha3" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaedf34ed289ea47c2b741bb72e5357a209512d67bcd4bda44359e5bf0470f56" +checksum = "e2904bea16a1ae962b483322a1c7b81d976029203aea1f461e51cd7705db7ba9" dependencies = [ - "digest 0.10.3", + "digest 0.10.5", "keccak", ] [[package]] name = "signature" -version = "1.6.1" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e90531723b08e4d6d71b791108faf51f03e1b4a7784f96b2b87f852ebc247228" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" dependencies = [ - "digest 0.10.3", - "rand_core 0.6.3", + "digest 0.10.5", + "rand_core 0.6.4", ] [[package]] @@ -2384,9 +2356,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.99" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" +checksum = "e90cde112c4b9690b8cbe810cba9ddd8bc1d7472e2cae317b69e9438c1cba7d2" dependencies = [ "proc-macro2", "quote", @@ -2539,18 +2511,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c53f98874615aea268107765aa1ed8f6116782501d18e53d08b471733bea6c85" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b463991b4eab2d801e724172285ec4195c650e8ec79b149e6c2a8e6dd3f783" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -2758,9 +2730,9 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if", "log", @@ -2771,9 +2743,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", @@ -2782,9 +2754,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ "once_cell", ] @@ -2819,9 +2791,9 @@ checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" [[package]] name = "uint" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f03af7ccf01dd611cc450a0d10dbc9b745770d096473e2faf0ca6e2d66d1e0" +checksum = "a45526d29728d135c2900b0d30573fe3ee79fceb12ef534c7bb30e810a91b601" dependencies = [ "byteorder", "crunchy", @@ -2856,12 +2828,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" -[[package]] -name = "unsafe-libyaml" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" - [[package]] name = "untrusted" version = "0.7.1" diff --git a/ci/bootstrap-env/Cargo.toml b/ci/bootstrap-env/Cargo.toml deleted file mode 100644 index d63ca4db2..000000000 --- a/ci/bootstrap-env/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "bootstrap-env" -version = "0.1.0" -edition = "2021" -authors = ["de_husk", "ekez "] - -[target.'cfg(not(target_arch = "wasm32"))'.dependencies] -cosm-orc = { version = "2.3.1" } -cw20 = "0.15" -cw-utils = "0.15" -cosmwasm-std = { version = "1.1", features = ["ibc3"] } -cw721-base = { version = "*", path = "../../contracts/cw721-base" } - -anyhow = { version = "1.0.51"} -env_logger = "0.9.0" -serde = { version = "1.0", default-features = false, features = ["derive"] } -serde_json = "1.0" -serde_yaml = "0.9" diff --git a/ci/bootstrap-env/src/main.rs b/ci/bootstrap-env/src/main.rs deleted file mode 100644 index 0d8e29eff..000000000 --- a/ci/bootstrap-env/src/main.rs +++ /dev/null @@ -1,73 +0,0 @@ -use anyhow::Result; -use cosm_orc::{ - config::{ - cfg::Config, - key::{Key, SigningKey}, - }, - orchestrator::cosm_orc::CosmOrc, -}; -use serde::{Deserialize, Serialize}; -use std::env; -use std::fs; -use std::time::Duration; - -#[derive(Clone, Debug, Serialize, Deserialize)] -struct Account { - name: String, - address: String, - mnemonic: String, -} - -fn main() -> Result<()> { - env_logger::init(); - - let config = env::var("CONFIG").expect("missing yaml CONFIG env var"); - let mut cfg = Config::from_yaml(&config)?; - let mut orc = CosmOrc::new(cfg.clone(), false)?; - - // use first test user as DAO admin, and only DAO member: - let accounts: Vec = - serde_json::from_slice(&fs::read("ci/configs/test_accounts.json")?)?; - let account = accounts[0].clone(); - - let key = SigningKey { - name: account.name, - key: Key::Mnemonic(account.mnemonic), - }; - let addr = account.address; - - orc.poll_for_n_blocks(1, Duration::from_millis(20_000), true)?; - - orc.store_contracts("artifacts", &key, None)?; - - let msg = cw721_base::msg::InstantiateMsg { - name: "token".to_string(), - symbol: "nonfungible".to_string(), - minter: addr.clone(), - }; - - let res = orc.instantiate( - "cw721_base", - "cw721_base_init", - &msg, - &key, - Some(addr.clone()), - vec![], - )?; - - println!(" ------------------------ "); - - println!("admin / minter address: {}", addr); - println!("cw721_base address: {}", res.address); - - // Persist contract code_ids in local.yaml so we can use - // SKIP_CONTRACT_STORE locally to avoid having to re-store them - // again - cfg.contract_deploy_info = orc.contract_map.deploy_info().clone(); - fs::write( - "ci/configs/cosm-orc/local.yaml", - serde_yaml::to_string(&cfg)?, - )?; - - Ok(()) -} diff --git a/ci/integration-tests/.gitignore b/ci/integration-tests/.gitignore new file mode 100644 index 000000000..b1cac5fdb --- /dev/null +++ b/ci/integration-tests/.gitignore @@ -0,0 +1,2 @@ +gas_reports/ +gas_report.json diff --git a/ci/integration-tests/gas_reports/test-1175590054.json b/ci/integration-tests/gas_reports/test-1175590054.json deleted file mode 100644 index 19397fdd1..000000000 --- a/ci/integration-tests/gas_reports/test-1175590054.json +++ /dev/null @@ -1 +0,0 @@ -{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137335,"gas_wanted":181493,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1319515518.json b/ci/integration-tests/gas_reports/test-1319515518.json deleted file mode 100644 index fe2df049a..000000000 --- a/ci/integration-tests/gas_reports/test-1319515518.json +++ /dev/null @@ -1 +0,0 @@ -{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1684095571.json b/ci/integration-tests/gas_reports/test-1684095571.json deleted file mode 100644 index cbcf06470..000000000 --- a/ci/integration-tests/gas_reports/test-1684095571.json +++ /dev/null @@ -1 +0,0 @@ -{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28162245,"gas_wanted":42219056,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1763516178.json b/ci/integration-tests/gas_reports/test-1763516178.json deleted file mode 100644 index 6186940e3..000000000 --- a/ci/integration-tests/gas_reports/test-1763516178.json +++ /dev/null @@ -1 +0,0 @@ -{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140453,"gas_wanted":186171,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137331,"gas_wanted":181488,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165333,"gas_wanted":223490,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-1814160560.json b/ci/integration-tests/gas_reports/test-1814160560.json deleted file mode 100644 index ed996ff14..000000000 --- a/ci/integration-tests/gas_reports/test-1814160560.json +++ /dev/null @@ -1 +0,0 @@ -{"cw721_base":{"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165333,"gas_wanted":223490,"line_number":19}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-265147129.json b/ci/integration-tests/gas_reports/test-265147129.json deleted file mode 100644 index fe2df049a..000000000 --- a/ci/integration-tests/gas_reports/test-265147129.json +++ /dev/null @@ -1 +0,0 @@ -{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-3205943217.json b/ci/integration-tests/gas_reports/test-3205943217.json deleted file mode 100644 index fe2df049a..000000000 --- a/ci/integration-tests/gas_reports/test-3205943217.json +++ /dev/null @@ -1 +0,0 @@ -{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28155690,"gas_wanted":42208895,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-4134311413.json b/ci/integration-tests/gas_reports/test-4134311413.json deleted file mode 100644 index 19397fdd1..000000000 --- a/ci/integration-tests/gas_reports/test-4134311413.json +++ /dev/null @@ -1 +0,0 @@ -{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":39},"Execute__cw721_base_transfer":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":137335,"gas_wanted":181493,"line_number":55},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":21}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-512151936.json b/ci/integration-tests/gas_reports/test-512151936.json deleted file mode 100644 index cbcf06470..000000000 --- a/ci/integration-tests/gas_reports/test-512151936.json +++ /dev/null @@ -1 +0,0 @@ -{"cw2981_royalties":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":33593540,"gas_wanted":50365670,"line_number":98}},"cw721_base":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28162245,"gas_wanted":42219056,"line_number":98}},"cw721_fixed_price":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":19094770,"gas_wanted":28617515,"line_number":98}},"cw721_metadata_onchain":{"Store__Store":{"file_name":"ci/integration-tests/src/helpers/chain.rs","gas_used":28987730,"gas_wanted":43456955,"line_number":98}}} \ No newline at end of file diff --git a/ci/integration-tests/gas_reports/test-55710236.json b/ci/integration-tests/gas_reports/test-55710236.json deleted file mode 100644 index 95e0271ab..000000000 --- a/ci/integration-tests/gas_reports/test-55710236.json +++ /dev/null @@ -1 +0,0 @@ -{"cw721_base":{"Execute__cw721_base_mint":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":140457,"gas_wanted":186176,"line_number":38},"Instantiate__cw721_base_init":{"file_name":"ci/integration-tests/src/tests/cw721_base_test.rs","gas_used":165417,"gas_wanted":223617,"line_number":20}}} \ No newline at end of file diff --git a/justfile b/justfile index b9327071c..2159ac71a 100644 --- a/justfile +++ b/justfile @@ -14,6 +14,9 @@ integration-test: deploy-local optimize RUST_LOG=info CONFIG={{orc_config}} cargo integration-test deploy-local: + # Need to make these so they are not created with the docker user + # as the owner. + mkdir -p artifacts target docker kill cosmwasm || true docker volume rm -f junod_data docker run --rm -d --name cosmwasm \ From 713c1d7cbf1bf2d4d04dddddb2aa2d931b37d917 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 12:55:59 -0700 Subject: [PATCH 3/8] Update cw721-base schema post cargo update. --- contracts/cw721-base/schema/execute_msg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/cw721-base/schema/execute_msg.json b/contracts/cw721-base/schema/execute_msg.json index 858e2bc09..c79dc5e98 100644 --- a/contracts/cw721-base/schema/execute_msg.json +++ b/contracts/cw721-base/schema/execute_msg.json @@ -235,7 +235,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Empty": { From cf82004b6711119b95acdf4950e005316a4c0073 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 12:59:27 -0700 Subject: [PATCH 4/8] Add script to autogen schema. --- .../cw2981-royalties/schema/all_nft_info_response.json | 3 ++- contracts/cw2981-royalties/schema/execute_msg.json | 5 +++-- contracts/cw2981-royalties/schema/operators_response.json | 3 ++- contracts/cw2981-royalties/schema/owner_of_response.json | 3 ++- contracts/cw721-fixed-price/schema/execute_msg.json | 2 +- contracts/cw721-metadata-onchain/schema/execute_msg.json | 2 +- scripts/schema.sh | 8 ++++++++ 7 files changed, 19 insertions(+), 7 deletions(-) create mode 100755 scripts/schema.sh diff --git a/contracts/cw2981-royalties/schema/all_nft_info_response.json b/contracts/cw2981-royalties/schema/all_nft_info_response.json index eb23abb52..d263321e2 100644 --- a/contracts/cw2981-royalties/schema/all_nft_info_response.json +++ b/contracts/cw2981-royalties/schema/all_nft_info_response.json @@ -91,7 +91,8 @@ ], "properties": { "never": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/cw2981-royalties/schema/execute_msg.json b/contracts/cw2981-royalties/schema/execute_msg.json index ca78751b5..c79dc5e98 100644 --- a/contracts/cw2981-royalties/schema/execute_msg.json +++ b/contracts/cw2981-royalties/schema/execute_msg.json @@ -235,7 +235,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Empty": { @@ -281,7 +281,8 @@ ], "properties": { "never": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/cw2981-royalties/schema/operators_response.json b/contracts/cw2981-royalties/schema/operators_response.json index 14c0e2265..533a096dd 100644 --- a/contracts/cw2981-royalties/schema/operators_response.json +++ b/contracts/cw2981-royalties/schema/operators_response.json @@ -76,7 +76,8 @@ ], "properties": { "never": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/cw2981-royalties/schema/owner_of_response.json b/contracts/cw2981-royalties/schema/owner_of_response.json index 5c82729d5..abb9006d8 100644 --- a/contracts/cw2981-royalties/schema/owner_of_response.json +++ b/contracts/cw2981-royalties/schema/owner_of_response.json @@ -82,7 +82,8 @@ ], "properties": { "never": { - "type": "object" + "type": "object", + "additionalProperties": false } }, "additionalProperties": false diff --git a/contracts/cw721-fixed-price/schema/execute_msg.json b/contracts/cw721-fixed-price/schema/execute_msg.json index 08d874b4e..b9a6acead 100644 --- a/contracts/cw721-fixed-price/schema/execute_msg.json +++ b/contracts/cw721-fixed-price/schema/execute_msg.json @@ -17,7 +17,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Cw20ReceiveMsg": { diff --git a/contracts/cw721-metadata-onchain/schema/execute_msg.json b/contracts/cw721-metadata-onchain/schema/execute_msg.json index 30b2da5f6..1755aba18 100644 --- a/contracts/cw721-metadata-onchain/schema/execute_msg.json +++ b/contracts/cw721-metadata-onchain/schema/execute_msg.json @@ -235,7 +235,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Empty": { diff --git a/scripts/schema.sh b/scripts/schema.sh new file mode 100755 index 000000000..269381c61 --- /dev/null +++ b/scripts/schema.sh @@ -0,0 +1,8 @@ +START_DIR=$(pwd) +for f in ./contracts/* +do + cd "$f" + CMD="cargo run --example schema" + eval $CMD + cd "$START_DIR" +done \ No newline at end of file From a2c46ed8e7c7114b6b26d6333237b1016dbb9679 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 13:09:36 -0700 Subject: [PATCH 5/8] Include cw721 package in schema gen and add info to README. --- README.md | 57 +++++++++++++++----- justfile | 3 ++ packages/cw721/schema/cw721_execute_msg.json | 2 +- packages/cw721/schema/cw721_receive_msg.json | 2 +- scripts/schema.sh | 5 +- 5 files changed, 53 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index a4b17c3c1..38eafac6b 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,20 @@ # CosmWasm NFTS -This repo is the official repository to work on all NFT standard and examples -in the CosmWasm ecosystem. `cw721` and `cw721-base` were moved from -[`cw-plus`](https://github.com/CosmWasm/cw-plus) to start this repo, but it shall evolve -as driven by the community's needs. +This repo is the official repository to work on all NFT standard and +examples in the CosmWasm ecosystem. `cw721` and `cw721-base` were +moved from [`cw-plus`](https://github.com/CosmWasm/cw-plus) to start +this repo, but it shall evolve as driven by the community's needs. -Please feel free to modify `cw721-base` as you need to support these projects and add many extensions -and additional standards (like [cw-2981](https://github.com/CosmWasm/cw-plus/pull/414)) to meet -the demands of the various NFT projects springing forth. +Please feel free to modify `cw721-base` as you need to support these +projects and add many extensions and additional standards (like +[cw-2981](https://github.com/CosmWasm/cw-plus/pull/414)) to meet the +demands of the various NFT projects springing forth. ## Maintainers -This repo is not maintained directly by Confio (although we can provide some code reviews and support), -but rather by 4 highly active community members working on NFT projects of their own: +This repo is not maintained directly by Confio (although we can +provide some code reviews and support), but rather by highly active +community members working on NFT projects of their own: * [alwin-peng](https://github.com/alwin-peng) * [ben2x4](https://github.com/ben2x4) @@ -26,9 +28,38 @@ but rather by 4 highly active community members working on NFT projects of their ## Contributing -If you are working on an NFT project as well and wish to give input, please raise issues and/or PRs. -Additional maintainers can be added if they show commitment to the project. +If you are working on an NFT project as well and wish to give input, +please raise issues and/or PRs. Additional maintainers can be added +if they show commitment to the project. -You can also join the `#nfts` channel on [CosmWasm Discord](https://docs.cosmwasm.com/chat) -for more interactive discussion on these themes. +You can also join the `#nfts` channel on [CosmWasm +Discord](https://docs.cosmwasm.com/chat) for more interactive +discussion on these themes. + +## Development + +This repository uses [`just`](https://github.com/casey/just) for +orchestrating commands. To install, run `cargo install just`. Before +submitting a PR, update the schema files by running: + +``` +just schema +``` + +To pass CI, your changes will need to pass the following checks: + +``` +just build +just test +just lint +just integration-test +``` + +To track gas usage over time and run some tests against a real chain +we use [de-husk](https://github.com/de-husk)'s +[cosm-orc](https://github.com/de-husk/cosm-orc) library. To add a +test, edit or create a file in `ci/integration-tests/src/tests`. Any +test written in that way will be included in gas measurements. A +significant deviation in gas usage between two changes for a test will +cause a comment to be added to the relevant PR. diff --git a/justfile b/justfile index 2159ac71a..b8d0186ff 100644 --- a/justfile +++ b/justfile @@ -10,6 +10,9 @@ test: lint: cargo +nightly clippy --all-targets -- -D warnings +schema: + ./scripts/schema.sh + integration-test: deploy-local optimize RUST_LOG=info CONFIG={{orc_config}} cargo integration-test diff --git a/packages/cw721/schema/cw721_execute_msg.json b/packages/cw721/schema/cw721_execute_msg.json index eb09359fb..228b5c249 100644 --- a/packages/cw721/schema/cw721_execute_msg.json +++ b/packages/cw721/schema/cw721_execute_msg.json @@ -199,7 +199,7 @@ ], "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Expiration": { diff --git a/packages/cw721/schema/cw721_receive_msg.json b/packages/cw721/schema/cw721_receive_msg.json index 2eada9ced..5340ef957 100644 --- a/packages/cw721/schema/cw721_receive_msg.json +++ b/packages/cw721/schema/cw721_receive_msg.json @@ -22,7 +22,7 @@ "additionalProperties": false, "definitions": { "Binary": { - "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec", + "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" } } diff --git a/scripts/schema.sh b/scripts/schema.sh index 269381c61..3c234f789 100755 --- a/scripts/schema.sh +++ b/scripts/schema.sh @@ -5,4 +5,7 @@ do CMD="cargo run --example schema" eval $CMD cd "$START_DIR" -done \ No newline at end of file +done + +# Also generate schema for cw721 package. +cd packages/cw721 && cargo schema From 2b05580d4db8fa9432ac87640b60ed6ae8e8fc69 Mon Sep 17 00:00:00 2001 From: ekez Date: Thu, 6 Oct 2022 14:21:33 -0700 Subject: [PATCH 6/8] Remove test artifacts from move over from dao-contracts. --- .../src/tests/cw20_stake_test.rs | 120 ------ .../src/tests/cw_core_test.rs | 367 ------------------ 2 files changed, 487 deletions(-) delete mode 100644 ci/integration-tests/src/tests/cw20_stake_test.rs delete mode 100644 ci/integration-tests/src/tests/cw_core_test.rs diff --git a/ci/integration-tests/src/tests/cw20_stake_test.rs b/ci/integration-tests/src/tests/cw20_stake_test.rs deleted file mode 100644 index 8327d1915..000000000 --- a/ci/integration-tests/src/tests/cw20_stake_test.rs +++ /dev/null @@ -1,120 +0,0 @@ -use crate::helpers::{chain::Chain, helper::create_dao}; -use cosmwasm_std::{to_binary, Uint128}; -use cw20_stake::{msg::StakedValueResponse, state::Config}; -use cw_core_interface::voting::VotingPowerAtHeightResponse; -use std::time::Duration; -use test_context::test_context; - -// #### ExecuteMsg ##### - -#[test_context(Chain)] -#[test] -#[ignore] -fn execute_stake_tokens(chain: &mut Chain) { - let user_addr = chain.users["user1"].account.address.clone(); - let user_key = chain.users["user1"].key.clone(); - let voting_contract = "cw20_staked_balance_voting"; - - let res = create_dao( - chain, - None, - "exc_stake_create_dao", - user_addr.clone(), - &user_key, - ); - let dao = res.unwrap(); - - let voting_addr = dao.state.voting_module.as_str(); - - // stake dao tokens: - chain - .orc - .contract_map - .add_address(voting_contract, voting_addr) - .unwrap(); - let staking_addr: String = chain - .orc - .query( - voting_contract, - &cw20_staked_balance_voting::msg::QueryMsg::StakingContract {}, - ) - .unwrap() - .data() - .unwrap(); - - chain - .orc - .contract_map - .add_address("cw20_stake", staking_addr.to_string()) - .unwrap(); - let res = chain - .orc - .query( - "cw20_stake", - &cw20_stake::msg::QueryMsg::StakedValue { - address: user_addr.clone(), - }, - ) - .unwrap(); - let staked_value: StakedValueResponse = res.data().unwrap(); - - assert_eq!(staked_value.value, Uint128::new(0)); - - let res = chain - .orc - .query("cw20_stake", &cw20_stake::msg::QueryMsg::GetConfig {}) - .unwrap(); - let config: Config = res.data().unwrap(); - - chain - .orc - .contract_map - .add_address("cw20_base", config.token_address.as_str()) - .unwrap(); - chain - .orc - .execute( - "cw20_base", - "exc_stake_stake_tokens", - &cw20_base::msg::ExecuteMsg::Send { - contract: staking_addr, - amount: Uint128::new(100), - msg: to_binary(&cw20_stake::msg::ReceiveMsg::Stake {}).unwrap(), - }, - &user_key, - vec![], - ) - .unwrap(); - - let res = chain - .orc - .query( - "cw20_stake", - &cw20_stake::msg::QueryMsg::StakedValue { - address: user_addr.clone(), - }, - ) - .unwrap(); - let staked_value: StakedValueResponse = res.data().unwrap(); - - assert_eq!(staked_value.value, Uint128::new(100)); - - chain - .orc - .poll_for_n_blocks(1, Duration::from_millis(20_000), false) - .unwrap(); - - let res = chain - .orc - .query( - "cw_core", - &cw_core::msg::QueryMsg::VotingPowerAtHeight { - address: user_addr, - height: None, - }, - ) - .unwrap(); - let power: VotingPowerAtHeightResponse = res.data().unwrap(); - - assert_eq!(power.power, Uint128::new(100)); -} diff --git a/ci/integration-tests/src/tests/cw_core_test.rs b/ci/integration-tests/src/tests/cw_core_test.rs deleted file mode 100644 index e21a31f8a..000000000 --- a/ci/integration-tests/src/tests/cw_core_test.rs +++ /dev/null @@ -1,367 +0,0 @@ -use crate::helpers::chain::Chain; -use crate::helpers::helper::create_dao; -use assert_matches::assert_matches; -use cosm_orc::client::error::ClientError; -use cosm_orc::orchestrator::error::ProcessError; -use cosmwasm_std::{to_binary, Addr, CosmosMsg, Decimal, Uint128}; -use cw20_stake::msg::{StakedValueResponse, TotalValueResponse}; -use cw_core::query::{GetItemResponse, PauseInfoResponse}; -use cw_utils::Duration; -use test_context::test_context; -use voting::{deposit::CheckedDepositInfo, threshold::PercentageThreshold, threshold::Threshold}; - -// #### ExecuteMsg ##### - -// TODO: Add tests for all cw-core execute msgs - -#[test_context(Chain)] -#[test] -#[ignore] -fn execute_execute_admin_msgs(chain: &mut Chain) { - let user_addr = chain.users["user1"].account.address.clone(); - let user_key = chain.users["user1"].key.clone(); - - // if you are not the admin, you cant execute admin msgs: - let res = create_dao( - chain, - None, - "exc_admin_msgs_create_dao", - user_addr.clone(), - &user_key, - ); - let dao = res.unwrap(); - - let res = chain.orc.execute( - "cw_core", - "exc_admin_msgs_pause_dao_fail", - &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { - msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { - contract_addr: dao.addr, - msg: to_binary(&cw_core::msg::ExecuteMsg::Pause { - duration: Duration::Time(100), - }) - .unwrap(), - funds: vec![], - })], - }, - &user_key, - vec![], - ); - - assert_matches!( - res.unwrap_err(), - ProcessError::ClientError(ClientError::CosmosSdk { .. }) - ); - - let res = chain - .orc - .query("cw_core", &cw_core::msg::QueryMsg::PauseInfo {}) - .unwrap(); - let res: PauseInfoResponse = res.data().unwrap(); - - assert_eq!(res, PauseInfoResponse::Unpaused {}); - - // if you are the admin you can execute admin msgs: - let res = create_dao( - chain, - Some(user_addr.clone()), - "exc_admin_msgs_create_dao_with_admin", - user_addr, - &user_key, - ); - let dao = res.unwrap(); - - chain - .orc - .execute( - "cw_core", - "exc_admin_msgs_pause_dao", - &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { - msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { - contract_addr: dao.addr, - msg: to_binary(&cw_core::msg::ExecuteMsg::Pause { - duration: Duration::Height(100), - }) - .unwrap(), - funds: vec![], - })], - }, - &user_key, - vec![], - ) - .unwrap(); - - let res = chain - .orc - .query("cw_core", &cw_core::msg::QueryMsg::PauseInfo {}) - .unwrap(); - - let res: PauseInfoResponse = res.data().unwrap(); - assert_ne!(res, PauseInfoResponse::Unpaused {}); -} - -#[test_context(Chain)] -#[test] -#[ignore] -fn execute_items(chain: &mut Chain) { - let user_addr = chain.users["user1"].account.address.clone(); - let user_key = chain.users["user1"].key.clone(); - - // add item: - let res = create_dao( - chain, - Some(user_addr.clone()), - "exc_items_create_dao", - user_addr, - &user_key, - ); - - let dao = res.unwrap(); - - let res = chain - .orc - .query( - "cw_core", - &cw_core::msg::QueryMsg::GetItem { - key: "meme".to_string(), - }, - ) - .unwrap(); - let res: GetItemResponse = res.data().unwrap(); - - assert_eq!(res.item, None); - - chain - .orc - .execute( - "cw_core", - "exc_items_set", - &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { - msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { - contract_addr: dao.addr.clone(), - msg: to_binary(&cw_core::msg::ExecuteMsg::SetItem { - key: "meme".to_string(), - addr: "foobar".to_string(), - }) - .unwrap(), - funds: vec![], - })], - }, - &user_key, - vec![], - ) - .unwrap(); - - let res = chain - .orc - .query( - "cw_core", - &cw_core::msg::QueryMsg::GetItem { - key: "meme".to_string(), - }, - ) - .unwrap(); - let res: GetItemResponse = res.data().unwrap(); - - assert_eq!(res.item, Some("foobar".to_string())); - - // remove item: - chain - .orc - .execute( - "cw_core", - "exc_items_rm", - &cw_core::msg::ExecuteMsg::ExecuteAdminMsgs { - msgs: vec![CosmosMsg::Wasm(cosmwasm_std::WasmMsg::Execute { - contract_addr: dao.addr, - msg: to_binary(&cw_core::msg::ExecuteMsg::RemoveItem { - key: "meme".to_string(), - }) - .unwrap(), - funds: vec![], - })], - }, - &user_key, - vec![], - ) - .unwrap(); - - let res = chain - .orc - .query( - "cw_core", - &cw_core::msg::QueryMsg::GetItem { - key: "meme".to_string(), - }, - ) - .unwrap(); - let res: GetItemResponse = res.data().unwrap(); - - assert_eq!(res.item, None); -} - -// #### InstantiateMsg ##### - -#[test_context(Chain)] -#[test] -#[ignore] -fn instantiate_with_no_admin(chain: &mut Chain) { - let user_addr = chain.users["user1"].account.address.clone(); - let user_key = chain.users["user1"].key.clone(); - - let res = create_dao(chain, None, "inst_dao_no_admin", user_addr, &user_key); - let dao = res.unwrap(); - - // ensure the dao is the admin: - assert_eq!(dao.state.admin, dao.addr); - assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); - assert_eq!( - dao.state.config, - cw_core::state::Config { - dao_uri: None, - name: "DAO DAO".to_string(), - description: "A DAO that makes DAO tooling".to_string(), - image_url: None, - automatically_add_cw20s: false, - automatically_add_cw721s: false - } - ); -} - -#[test_context(Chain)] -#[test] -#[ignore] -fn instantiate_with_admin(chain: &mut Chain) { - let user_addr = chain.users["user1"].account.address.clone(); - let user_key = chain.users["user1"].key.clone(); - let voting_contract = "cw20_staked_balance_voting"; - let proposal_contract = "cw_proposal_single"; - - let res = create_dao( - chain, - Some(user_addr.clone()), - "inst_admin_create_dao", - user_addr.clone(), - &user_key, - ); - let dao = res.unwrap(); - - // general dao info is valid: - assert_eq!(dao.state.admin, user_addr); - assert_eq!(dao.state.pause_info, PauseInfoResponse::Unpaused {}); - assert_eq!( - dao.state.config, - cw_core::state::Config { - dao_uri: None, - name: "DAO DAO".to_string(), - description: "A DAO that makes DAO tooling".to_string(), - image_url: None, - automatically_add_cw20s: false, - automatically_add_cw721s: false - } - ); - - let voting_addr = dao.state.voting_module.as_str(); - let prop_addr = dao.state.proposal_modules[0].address.as_str(); - - // voting module config is valid: - chain - .orc - .contract_map - .add_address(voting_contract, voting_addr) - .unwrap(); - let res = &chain - .orc - .query( - voting_contract, - &cw20_staked_balance_voting::msg::QueryMsg::StakingContract {}, - ) - .unwrap(); - let staking_addr: &str = res.data().unwrap(); - - chain - .orc - .contract_map - .add_address("cw20_stake", staking_addr) - .unwrap(); - let res = chain - .orc - .query( - "cw20_stake", - &cw20_stake::msg::QueryMsg::StakedValue { address: user_addr }, - ) - .unwrap(); - let staked_res: StakedValueResponse = res.data().unwrap(); - assert_eq!(staked_res.value, Uint128::new(0)); - - let res = chain - .orc - .query("cw20_stake", &cw20_stake::msg::QueryMsg::GetConfig {}) - .unwrap(); - let config_res: cw20_stake::state::Config = res.data().unwrap(); - assert_eq!( - config_res.owner, - Some(Addr::unchecked( - chain.orc.contract_map.address("cw_core").unwrap() - )) - ); - assert_eq!(config_res.manager, None); - - let res = &chain - .orc - .query( - voting_contract, - &cw20_staked_balance_voting::msg::QueryMsg::TokenContract {}, - ) - .unwrap(); - let token_addr: &str = res.data().unwrap(); - assert_eq!(config_res.token_address, token_addr); - - assert_eq!(config_res.unstaking_duration, Some(Duration::Time(1209600))); - - let res = chain - .orc - .query("cw20_stake", &cw20_stake::msg::QueryMsg::TotalValue {}) - .unwrap(); - let total_res: TotalValueResponse = res.data().unwrap(); - assert_eq!(total_res.total, Uint128::new(0)); - - // proposal module config is valid: - chain - .orc - .contract_map - .add_address(proposal_contract, prop_addr) - .unwrap(); - let res = chain - .orc - .query( - proposal_contract, - &cw_proposal_single::msg::QueryMsg::Config {}, - ) - .unwrap(); - let config_res: cw_proposal_single::state::Config = res.data().unwrap(); - - assert_eq!(config_res.min_voting_period, None); - assert_eq!(config_res.max_voting_period, Duration::Time(432000)); - assert!(!config_res.allow_revoting); - assert!(config_res.only_members_execute); - assert_eq!( - config_res.deposit_info, - Some(CheckedDepositInfo { - token: Addr::unchecked(token_addr), - deposit: Uint128::new(1000000000), - refund_failed_proposals: true, - }) - ); - assert_eq!( - config_res.threshold, - Threshold::ThresholdQuorum { - threshold: PercentageThreshold::Majority {}, - quorum: PercentageThreshold::Percent(Decimal::percent(35)), - } - ); - assert_eq!( - config_res.dao, - chain.orc.contract_map.address("cw_core").unwrap() - ); -} From 48a882322ccaa78bf3f6576877b5b3a3475b40dd Mon Sep 17 00:00:00 2001 From: Jake Hartnell Date: Mon, 24 Oct 2022 13:56:35 -0700 Subject: [PATCH 7/8] Update ci/integration-tests/src/helpers/chain.rs Co-authored-by: Jakub Bogucki --- ci/integration-tests/src/helpers/chain.rs | 27 ++++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/ci/integration-tests/src/helpers/chain.rs b/ci/integration-tests/src/helpers/chain.rs index 52516b634..67ac4ea43 100644 --- a/ci/integration-tests/src/helpers/chain.rs +++ b/ci/integration-tests/src/helpers/chain.rs @@ -61,20 +61,21 @@ fn test_accounts() -> HashMap { let bytes = fs::read("../configs/test_accounts.json").unwrap(); let accounts: Vec = serde_json::from_slice(&bytes).unwrap(); - let mut account_map = HashMap::new(); - for account in accounts { - account_map.insert( - account.name.clone(), - SigningAccount { - account: account.clone(), - key: SigningKey { - name: account.name, - key: Key::Mnemonic(account.mnemonic), + accounts + .into_iter() + .map(|account| { + ( + account.name.clone(), + SigningAccount { + account: account.clone(), + key: SigningKey { + name: account.name, + key: Key::Mnemonic(account.mnemonic), + }, }, - }, - ); - } - account_map + ) + }) + .collect::>() } // global_setup() runs once before all of the tests From 7e965260f1b412256ec706fc9254496d2c7b9380 Mon Sep 17 00:00:00 2001 From: ekez Date: Mon, 24 Oct 2022 14:03:53 -0700 Subject: [PATCH 8/8] Address feedback from @de-husk. --- .github/workflows/cosm-orc.yml | 2 +- ci/integration-tests/src/tests/cw721_base_test.rs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cosm-orc.yml b/.github/workflows/cosm-orc.yml index 244604844..67ec8c961 100644 --- a/.github/workflows/cosm-orc.yml +++ b/.github/workflows/cosm-orc.yml @@ -86,7 +86,7 @@ jobs: name: cw-nfts-gas-report-refs-heads-main - name: Post gas diff to PR - if: ${{ github.ref != 'refs/heads/main' && steps.download_gas.found_artifact }} + if: ${{ github.ref != 'refs/heads/main' && steps.download_gas.outputs.found_artifact == 'true' }} uses: de-husk/cosm-orc-gas-diff-action@v0.6.2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/ci/integration-tests/src/tests/cw721_base_test.rs b/ci/integration-tests/src/tests/cw721_base_test.rs index 2c7a036a6..2a241377b 100644 --- a/ci/integration-tests/src/tests/cw721_base_test.rs +++ b/ci/integration-tests/src/tests/cw721_base_test.rs @@ -16,7 +16,7 @@ fn execute_transfer_nft(chain: &mut Chain) { minter: user_addr.clone(), }; - let res = chain + chain .orc .instantiate( "cw721_base", @@ -28,12 +28,6 @@ fn execute_transfer_nft(chain: &mut Chain) { ) .unwrap(); - chain - .orc - .contract_map - .add_address("cw721_base", res.address) - .unwrap(); - chain .orc .execute(