From fefe45d5f6f5d11e95c9e42edd0114d62daa244a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B9=96=DB=A3=DB=9CDadidou?= <50441633+WaDadidou@users.noreply.github.com> Date: Sat, 22 Feb 2025 16:39:11 -0500 Subject: [PATCH] feat(launchpad): Use DAO Proposal Single contract address in nft-launchpad contract config (#1488) Co-authored-by: hthieu1110 Co-authored-by: n0izn0iz --- Cargo.lock | 3250 ++++++++++++++++- go/pkg/networks/features.gen.go | 11 +- networks.json | 18 +- .../nft-launchpad/NftLaunchpad.types.ts | 2 + packages/networks/features.ts | 1 + packages/networks/teritori-localnet/index.ts | 14 + packages/networks/teritori-testnet/index.ts | 6 +- .../MembershipOrg/MembershipDeployerSteps.tsx | 17 + .../RolesOrg/RolesDeployerSteps.tsx | 17 + .../scripts/integration-testing/da0da0Test.ts | 13 +- .../scripts/integration-testing/simpleTest.ts | 6 - .../deployCwAddressList.ts | 30 +- .../deployCwAddressListScript.ts | 25 + .../cw-admin-factory/deployCwAdminFactory.ts | 68 + .../deployCwAdminFactoryScript.ts | 25 + .../{ => dao-dao}/deployDA0DA0.ts | 68 +- .../dao-dao/deployDA0DA0Script.ts | 26 + packages/scripts/network-setup/deployLib.ts | 22 +- .../network-setup/deployNftLaunchpad.ts | 164 - .../scripts/network-setup/deployRemoteWASM.ts | 25 + .../nft-launchpad/deployNftLaunchpad.ts | 284 ++ .../nft-launchpad/deployNftLaunchpadScript.ts | 95 + packages/utils/dao.ts | 27 +- packages/utils/types/teritorid.ts | 11 + rust/cw-contracts/nft-launchpad/Cargo.toml | 7 + rust/cw-contracts/nft-launchpad/Makefile | 54 - .../nft-launchpad/config-mainnet.json | 9 - rust/cw-contracts/nft-launchpad/config.json | 9 - .../nft-launchpad/schema/nft-launchpad.json | 18 +- .../nft-launchpad/schema/raw/execute.json | 6 + .../nft-launchpad/schema/raw/instantiate.json | 6 +- .../schema/raw/response_to_get_config.json | 6 +- .../nft-launchpad/src/contract.rs | 120 +- rust/cw-contracts/nft-launchpad/src/error.rs | 18 +- rust/cw-contracts/nft-launchpad/src/lib.rs | 3 + .../nft-launchpad/src/multitest.rs | 281 +- .../nft-launchpad/src/test_helpers.rs | 25 + rust/cw-contracts/nft-launchpad/src/utils.rs | 14 + 38 files changed, 4173 insertions(+), 628 deletions(-) rename packages/scripts/network-setup/{ => cw-address-list}/deployCwAddressList.ts (75%) create mode 100644 packages/scripts/network-setup/cw-address-list/deployCwAddressListScript.ts create mode 100644 packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactory.ts create mode 100644 packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactoryScript.ts rename packages/scripts/network-setup/{ => dao-dao}/deployDA0DA0.ts (72%) create mode 100644 packages/scripts/network-setup/dao-dao/deployDA0DA0Script.ts delete mode 100644 packages/scripts/network-setup/deployNftLaunchpad.ts create mode 100644 packages/scripts/network-setup/deployRemoteWASM.ts create mode 100644 packages/scripts/network-setup/nft-launchpad/deployNftLaunchpad.ts create mode 100644 packages/scripts/network-setup/nft-launchpad/deployNftLaunchpadScript.ts create mode 100644 packages/utils/types/teritorid.ts delete mode 100644 rust/cw-contracts/nft-launchpad/Makefile delete mode 100644 rust/cw-contracts/nft-launchpad/config-mainnet.json delete mode 100644 rust/cw-contracts/nft-launchpad/config.json create mode 100644 rust/cw-contracts/nft-launchpad/src/test_helpers.rs create mode 100644 rust/cw-contracts/nft-launchpad/src/utils.rs diff --git a/Cargo.lock b/Cargo.lock index 433b78dcc1..9b43ced945 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "ahash" version = "0.7.8" @@ -13,6 +28,15 @@ dependencies = [ "version_check", ] +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "anyhow" version = "1.0.89" @@ -23,7 +47,39 @@ checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" name = "apipb" version = "0.1.0" dependencies = [ - "prost 0.12.6", + "prost 0.12.3", +] + +[[package]] +name = "async-trait" +version = "0.1.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "644dd749086bf3771a2fbc5f256fdb982d53f011c7d5d560304eafeecebce79d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", ] [[package]] @@ -38,6 +94,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -56,6 +118,53 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +[[package]] +name = "bindgen" +version = "0.68.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726e4313eb6ec35d2730258ad4e15b547ee75d6afaa1361a922e78e59b7d8078" +dependencies = [ + "bitflags", + "cexpr", + "clang-sys", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.87", + "which", +] + +[[package]] +name = "bip32" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b30ed1d6f8437a487a266c8293aeb95b61a23261273e3e02912cdb8b68bf798b" +dependencies = [ + "bs58", + "hmac", + "k256 0.11.6", + "once_cell", + "pbkdf2", + "rand_core 0.6.4", + "ripemd", + "sha2 0.10.8", + "subtle", + "zeroize", +] + +[[package]] +name = "bitflags" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" + [[package]] name = "block-buffer" version = "0.9.0" @@ -80,6 +189,15 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" +[[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.14.0" @@ -98,12 +216,50 @@ version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +[[package]] +name = "cc" +version = "1.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" +dependencies = [ + "shlex", +] + +[[package]] +name = "cexpr" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" +dependencies = [ + "nom", +] + [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +dependencies = [ + "num-traits", +] + +[[package]] +name = "clang-sys" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" +dependencies = [ + "glob", + "libc", + "libloading", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -125,6 +281,54 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[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.9", + "prost-types 0.11.9", + "tendermint-proto", +] + +[[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 0.14.8", + "eyre", + "getrandom", + "k256 0.11.6", + "rand_core 0.6.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-rpc", + "thiserror", +] + [[package]] name = "cosmwasm-crypto" version = "1.5.8" @@ -177,7 +381,7 @@ version = "1.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c21fde95ccd20044a23c0ac6fd8c941f3e8c158169dc94b5aa6491a2d9551a8d" dependencies = [ - "base64", + "base64 0.21.7", "bech32", "bnum", "cosmwasm-crypto", @@ -193,6 +397,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cosmwasm-storage" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66de2ab9db04757bcedef2b5984fbe536903ada4a8a9766717a4a71197ef34f6" +dependencies = [ + "cosmwasm-std", + "serde", +] + [[package]] name = "cpufeatures" version = "0.2.14" @@ -236,6 +450,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "ct-logs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" +dependencies = [ + "sct", +] + [[package]] name = "curve25519-dalek" version = "3.2.0" @@ -271,6 +494,132 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw-admin-factory" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc49ddcececa7edf1f565fae21c51df1328bdb3a52bddaaa52a68775d56eeea" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "thiserror", +] + +[[package]] +name = "cw-controllers" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64bfeaf55f8dba5646cc3daddce17cd23a60f8e0c3fbacbe6735d287d7a6e33a" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.11.1", + "cw-utils 0.11.1", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-controllers" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f0bc6019b4d3d81e11f5c384bcce7173e2210bd654d75c6c9668e12cca05dfa" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.13.4", + "cw-utils 0.13.4", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-controllers" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57de8d3761e46be863e3ac1eba8c8a976362a48c6abf240df1e26c3e421ee9e8" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468b8f2696f625c8e15b5468f9420c8eabfaf23cb4fd7e6c660fc7e0cc8d77b8" +dependencies = [ + "cosmwasm-std", + "cosmwasm-storage", + "cw-core-interface", + "cw-core-macros", + "cw-paginate-storage 0.1.0", + "cw-storage-plus 0.13.4", + "cw-utils 0.13.4", + "cw2 0.13.4", + "cw20 0.13.4", + "cw721 0.13.4", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-core-interface" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c93e684945473777ebed2bcaf9f0af2291653f79d5c81774c6826350ba6d88de" +dependencies = [ + "cosmwasm-std", + "cw-core-macros", + "cw2 0.13.4", + "schemars", + "serde", +] + +[[package]] +name = "cw-core-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f20a77489d2dc8a1c12cb0b9671b6cbdca88f12fe65e1a4ee9899490f7669dcc" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cw-denom" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e07529f645ad1d3db81129a9621268ce50e71a55ab4d19d8f3776b3d82108906" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw20 1.1.2", + "thiserror", +] + +[[package]] +name = "cw-hooks" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "babe643781092ff2386991ea3cbb17b7753d91a6df484168af9255e7a16ad5b6" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "thiserror", +] + [[package]] name = "cw-multi-test" version = "0.16.5" @@ -303,7 +652,7 @@ dependencies = [ "cw-utils 1.0.3", "derivative", "itertools 0.12.1", - "prost 0.12.6", + "prost 0.12.3", "schemars", "serde", "sha2 0.10.8", @@ -337,43 +686,69 @@ dependencies = [ ] [[package]] -name = "cw-storage-plus" -version = "0.13.4" +name = "cw-paginate-storage" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648b1507290bbc03a8d88463d7cd9b04b1fa0155e5eef366c4fa052b9caaac7a" +checksum = "b854833e07c557dee02d1b61a21bb0731743bb2e3bbdc3e446a0d8a38af40ec4" dependencies = [ "cosmwasm-std", - "schemars", + "cosmwasm-storage", + "cw-storage-plus 0.13.4", "serde", ] [[package]] -name = "cw-storage-plus" -version = "0.15.1" +name = "cw-paginate-storage" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0" +checksum = "5d5baf8fc0492b3d3f6052f35379deedc01ca156764dfe8f157616862b7dcda3" dependencies = [ "cosmwasm-std", - "schemars", + "cw-storage-plus 1.2.0", "serde", ] [[package]] -name = "cw-storage-plus" -version = "0.16.0" +name = "cw-proposal-single" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b6f91c0b94481a3e9ef1ceb183c37d00764f8751e39b45fc09f4d9b970d469" +checksum = "2c6408483e1ac17a7e2b98ef6fa1379776964353bcbf501942d22ee1c1323117" dependencies = [ "cosmwasm-std", + "cosmwasm-storage", + "cw-core", + "cw-core-interface", + "cw-core-macros", + "cw-storage-plus 0.13.4", + "cw-utils 0.13.4", + "cw2 0.13.4", + "cw20 0.13.4", + "cw3", + "dao-voting 0.1.0", + "indexable-hooks", + "proposal-hooks", "schemars", "serde", + "thiserror", + "vote-hooks", +] + +[[package]] +name = "cw-stake-tracker" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1553f317c13681adc2b33f73269b0fabfd47e28be796d39735a016ab42a903f" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-wormhole", ] [[package]] name = "cw-storage-plus" -version = "1.2.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" +checksum = "7d7ee1963302b0ac2a9d42fe0faec826209c17452bfd36fbfd9d002a88929261" dependencies = [ "cosmwasm-std", "schemars", @@ -381,22 +756,118 @@ dependencies = [ ] [[package]] -name = "cw-utils" +name = "cw-storage-plus" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbaecb78c8e8abfd6b4258c7f4fbeb5c49a5e45ee4d910d3240ee8e1d714e1b" +checksum = "648b1507290bbc03a8d88463d7cd9b04b1fa0155e5eef366c4fa052b9caaac7a" dependencies = [ "cosmwasm-std", "schemars", "serde", - "thiserror", ] [[package]] -name = "cw-utils" +name = "cw-storage-plus" version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae0b69fa7679de78825b4edeeec045066aa2b2c4b6e063d80042e565bb4da5c" +checksum = "dc6cf70ef7686e2da9ad7b067c5942cd3e88dd9453f7af42f54557f8af300fb0" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "cw-storage-plus" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b6f91c0b94481a3e9ef1ceb183c37d00764f8751e39b45fc09f4d9b970d469" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "cw-storage-plus" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", +] + +[[package]] +name = "cw-tokenfactory-issuer" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625d1d2e767c14bfad21fcc02873384536fcaebba8176787ce68ade5f4bf4a88" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw-tokenfactory-types", + "cw2 1.1.2", + "dao-interface", + "osmosis-std", + "prost 0.12.3", + "prost-derive 0.12.3", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-tokenfactory-types" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f38981b9e4b9d35f508b8d0da467e6daee2fe1885d097f4c328c3c357aaab34" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "dao-interface", + "osmosis-std", + "osmosis-std-derive", + "prost 0.12.3", + "prost-derive 0.12.3", + "prost-types 0.12.3", + "schemars", + "serde", + "serde-cw-value", +] + +[[package]] +name = "cw-utils" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef842a1792e4285beff7b3b518705f760fa4111dc1e296e53f3e92d1ef7f6220" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-utils" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbaecb78c8e8abfd6b4258c7f4fbeb5c49a5e45ee4d910d3240ee8e1d714e1b" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw-utils" +version = "0.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae0b69fa7679de78825b4edeeec045066aa2b2c4b6e063d80042e565bb4da5c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -437,6 +908,63 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw-vesting" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69a69cab82f4ae894d05917efe4dcb94bfb6a387aaf49504264b02bf6dfcba30" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-denom", + "cw-ownable", + "cw-stake-tracker", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw-wormhole", + "cw2 1.1.2", + "cw20 1.1.2", + "serde", + "thiserror", + "wynd-utils", +] + +[[package]] +name = "cw-wormhole" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ea7f006ade7c25e8451f98b7771d9ee24a43e126287cc3cf0be460804af602" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "serde", +] + +[[package]] +name = "cw2" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1d81d7c359d6c1fba3aa83dad7ec6f999e512571380ae62f81257c3db569743" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.11.1", + "schemars", + "serde", +] + +[[package]] +name = "cw2" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04cf4639517490dd36b333bbd6c4fbd92e325fd0acf4683b41753bc5eb63bfc1" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.13.4", + "schemars", + "serde", +] + [[package]] name = "cw2" version = "0.15.1" @@ -478,6 +1006,135 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw20" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9671d7edef5608acaf5b2f1e473ee3f501eced2cd4f7392e2106c8cf02ba0720" +dependencies = [ + "cosmwasm-std", + "cw-utils 0.11.1", + "schemars", + "serde", +] + +[[package]] +name = "cw20" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cb782b8f110819a4eb5dbbcfed25ffba49ec16bbe32b4ad8da50a5ce68fec05" +dependencies = [ + "cosmwasm-std", + "cw-utils 0.13.4", + "schemars", + "serde", +] + +[[package]] +name = "cw20" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-utils 1.0.3", + "schemars", + "serde", +] + +[[package]] +name = "cw20-base" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f6fc8c4cd451b418fa4f1ac2ea70595811fa9d8b4033617fe47953d7a93ceb" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.11.1", + "cw-utils 0.11.1", + "cw2 0.11.1", + "cw20 0.11.1", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw20-base" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0306e606581f4fb45e82bcbb7f0333179ed53dd949c6523f01a99b4bfc1475a0" +dependencies = [ + "cosmwasm-std", + "cw-storage-plus 0.13.4", + "cw-utils 0.13.4", + "cw2 0.13.4", + "cw20 0.13.4", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw20-base" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ad79e86ea3707229bf78df94e08732e8f713207b4a77b2699755596725e7d9" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw2 1.1.2", + "cw20 1.1.2", + "schemars", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "cw20-stake" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f0d51ce27a97b51f66d737183845bc6d82f46f4b246dc959d1265d86906ccc" +dependencies = [ + "cosmwasm-std", + "cosmwasm-storage", + "cw-controllers 0.13.4", + "cw-storage-plus 0.13.4", + "cw-utils 0.13.4", + "cw2 0.13.4", + "cw20 0.13.4", + "cw20-base 0.13.4", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "cw20-stake" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59e5f67e9c2c4f4e466e59bad77180435d0e4d413e75b79829d8c4d49a4d312" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-hooks", + "cw-ownable", + "cw-paginate-storage 2.6.0", + "cw-storage-plus 1.2.0", + "cw-utils 0.13.4", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cw20-base 1.1.2", + "cw20-stake 0.2.6", + "dao-hooks", + "dao-voting 2.6.0", + "thiserror", +] + [[package]] name = "cw2981-royalties" version = "0.18.0" @@ -494,6 +1151,49 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw3" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe19462a7f644ba60c19d3443cb90d00c50d9b6b3b0a3a7fca93df8261af979b" +dependencies = [ + "cosmwasm-std", + "cw-utils 0.13.4", + "schemars", + "serde", +] + +[[package]] +name = "cw4" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "schemars", + "serde", +] + +[[package]] +name = "cw4-group" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e24a22c3af54c52edf528673b420a67a1648be2c159b8ec778d2fbf543df24b" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw4", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "cw721" version = "0.13.4" @@ -598,11 +1298,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cw721-controllers" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8e48a8280ab1863169ce8caa395c72e7cbb0a4638323ddafbd3777da002fa89" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "thiserror", +] + [[package]] name = "cw721-membership" version = "0.1.0" dependencies = [ - "base64", + "base64 0.21.7", "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus 1.2.0", @@ -633,7 +1346,433 @@ dependencies = [ ] [[package]] -name = "der" +name = "cw721-roles" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40f6b8dc8b31357b36a6293584389a642f4e1d0657cb10f3da3ffe1fcc23513" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw4", + "cw721 0.18.0", + "cw721-base 0.18.0", + "dao-cw721-extensions", + "serde", + "thiserror", +] + +[[package]] +name = "dao-cw721-extensions" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba0ca21bda2a54d2c131a461ac1f3a704d6d1445f7c95fbf14e99e1a910f6581" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw4", +] + +[[package]] +name = "dao-dao-core" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee442d972fbb2eabb7347ced363f5f4031d00c0d44174f7e145a4cc41cabb" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-core", + "cw-paginate-storage 2.6.0", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cw721 0.18.0", + "dao-dao-macros", + "dao-interface", + "thiserror", +] + +[[package]] +name = "dao-dao-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ec9711ada60774da75cf8f26301cc606afb2c16fde1172d85af3483b8085cc3" +dependencies = [ + "cosmwasm-schema", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "dao-hooks" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79df3ba2fd85f249d02a52004fbb44648d499a01c010e56e897a5b12ecf880d0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-hooks", + "cw4", + "dao-pre-propose-base", + "dao-voting 2.6.0", +] + +[[package]] +name = "dao-interface" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3502ffbcb4d4634a36901a91911722e9dba384e72f413ba625022472fc4b8e46" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cw721 0.18.0", + "osmosis-std", +] + +[[package]] +name = "dao-pre-propose-base" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd101d3154507b05213e837af306e157eb42682684f2358d6aee740cafff33ba" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-denom", + "cw-hooks", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "dao-interface", + "dao-voting 2.6.0", + "semver", + "serde", + "thiserror", +] + +[[package]] +name = "dao-pre-propose-multiple" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7fdd9dc0787b91983f56eac5071a41991cc52b60f92d3b653b64873db02ac59" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2 1.1.2", + "dao-pre-propose-base", + "dao-voting 2.6.0", +] + +[[package]] +name = "dao-pre-propose-single" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d177232ccee6f68be2d4a6dbbba2d27abd9f8062a8a81b33dbe0d83c3ddf2ac" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw2 1.1.2", + "dao-pre-propose-base", + "dao-voting 2.6.0", +] + +[[package]] +name = "dao-proposal-condorcet" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cd69eff2672edc6a6b995b601c5ef3be308cf02d073e43270c7daca4a305f29" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "dao-dao-macros", + "dao-interface", + "dao-voting 2.6.0", + "thiserror", +] + +[[package]] +name = "dao-proposal-single" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d30cc75360cf8dad9e95378fa20776693f207409266aeb6c91707e3746af42" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-hooks", + "cw-proposal-single", + "cw-storage-plus 1.2.0", + "cw-utils 0.13.4", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "dao-dao-macros", + "dao-hooks", + "dao-interface", + "dao-pre-propose-base", + "dao-voting 0.1.0", + "dao-voting 2.6.0", + "thiserror", +] + +[[package]] +name = "dao-test-custom-factory" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fc7e92426c3f56137a19de5c9b3a6bf6352f936a5494401732e998b9c66012" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw-tokenfactory-issuer", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw721 0.18.0", + "cw721-base 0.18.0", + "dao-dao-macros", + "dao-interface", + "dao-voting 2.6.0", + "thiserror", +] + +[[package]] +name = "dao-testing" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "beca021d602ff1f25c7ef3e78f42f2a321bc61dea2d8c31488afd81416fd4f4e" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-admin-factory", + "cw-core", + "cw-hooks", + "cw-multi-test 0.20.1", + "cw-proposal-single", + "cw-tokenfactory-issuer", + "cw-utils 1.0.3", + "cw-vesting", + "cw2 1.1.2", + "cw20 1.1.2", + "cw20-base 1.1.2", + "cw20-stake 2.6.0", + "cw4", + "cw4-group", + "cw721-base 0.18.0", + "cw721-roles", + "dao-dao-core", + "dao-interface", + "dao-pre-propose-multiple", + "dao-pre-propose-single", + "dao-proposal-condorcet", + "dao-proposal-single", + "dao-test-custom-factory", + "dao-voting 0.1.0", + "dao-voting 2.6.0", + "dao-voting-cw20-balance", + "dao-voting-cw20-staked", + "dao-voting-cw4", + "dao-voting-cw721-roles", + "dao-voting-cw721-staked", + "dao-voting-onft-staked", + "dao-voting-token-staked", + "osmosis-std", + "osmosis-test-tube", + "rand", + "serde", + "serde_json", + "stake-cw20", +] + +[[package]] +name = "dao-voting" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "442d770933e3b3ecab4cfb4d6e9d054082b007d35fda3cf0c3d3ddd1cfa91782" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "dao-voting" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a96db7109c0273433cb46b12904a1c2b2444bc656ebd2f5ccc645e430784eba5" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-denom", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw20 1.1.2", + "dao-dao-macros", + "dao-interface", + "thiserror", +] + +[[package]] +name = "dao-voting-cw20-balance" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0808696cc6ca7947c1c34f48d7de9b7427619118aebdc77262f233034ff350b" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cw20-base 1.1.2", + "dao-dao-macros", + "dao-interface", + "thiserror", +] + +[[package]] +name = "dao-voting-cw20-staked" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "268ffa25fe1fc3859643a348ff12ef4fbfea20eb5eafb1ee4c3b5d0ac69c0565" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw20 1.1.2", + "cw20-base 1.1.2", + "cw20-stake 2.6.0", + "dao-dao-macros", + "dao-interface", + "dao-voting 2.6.0", + "thiserror", +] + +[[package]] +name = "dao-voting-cw4" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528fce2d78cd857bf5c3d0b7f4ab470d724cffed440f861f7898d17de32c15f0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw4", + "cw4-group", + "dao-dao-macros", + "dao-interface", + "thiserror", +] + +[[package]] +name = "dao-voting-cw721-roles" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f2a19f9ca7824b14009e9b88fadb3a011fc5d619caf18e25fa8e9c2b06b9be8" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw4", + "cw721 0.18.0", + "cw721-base 0.18.0", + "dao-cw721-extensions", + "dao-dao-macros", + "dao-interface", + "thiserror", +] + +[[package]] +name = "dao-voting-cw721-staked" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aed9966496b879261551b849f905c82be639194bd76660a1a989de90aef567b8" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-hooks", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw721 0.18.0", + "cw721-base 0.18.0", + "cw721-controllers", + "dao-dao-macros", + "dao-hooks", + "dao-interface", + "dao-voting 2.6.0", + "nft-controllers", + "thiserror", +] + +[[package]] +name = "dao-voting-onft-staked" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c2ad282db57e6c6445e7cff5f37ff2f2557d092e8651e0bb211f0727af2cdc1" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-hooks", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw721-controllers", + "dao-dao-macros", + "dao-hooks", + "dao-interface", + "dao-voting 2.6.0", + "nft-controllers", + "omniflix-std", + "serde", + "thiserror", +] + +[[package]] +name = "dao-voting-token-staked" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dadf189f645c6e42a6b5be3815d8c73944c7c71875c4859b85663f4433b47d18" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-controllers 1.1.2", + "cw-hooks", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw-tokenfactory-issuer", + "cw-utils 1.0.3", + "cw2 1.1.2", + "dao-dao-macros", + "dao-hooks", + "dao-interface", + "dao-voting 2.6.0", + "thiserror", +] + +[[package]] +name = "der" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" @@ -684,6 +1823,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + [[package]] name = "dyn-clone" version = "1.0.17" @@ -716,6 +1866,27 @@ dependencies = [ "spki 0.7.3", ] +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature 1.6.4", +] + +[[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.1.0" @@ -782,6 +1953,26 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "ff" version = "0.12.1" @@ -802,12 +1993,126 @@ dependencies = [ "subtle", ] +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + [[package]] name = "forward_ref" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -832,6 +2137,18 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "glob" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" + [[package]] name = "group" version = "0.12.1" @@ -854,6 +2171,25 @@ dependencies = [ "subtle", ] +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -867,21 +2203,307 @@ dependencies = [ name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "headers" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +dependencies = [ + "base64 0.21.7", + "bytes", + "headers-core", + "http", + "httpdate", + "mime", + "sha1", +] + +[[package]] +name = "headers-core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +dependencies = [ + "http", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-proxy" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca815a891b24fdfb243fa3239c86154392b0953ee584aa1a2a1f66d20cbe75cc" +dependencies = [ + "bytes", + "futures", + "headers", + "http", + "hyper", + "hyper-rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "tower-service", + "webpki", +] + +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "ct-logs", + "futures-util", + "hyper", + "log", + "rustls", + "rustls-native-certs", + "tokio", + "tokio-rustls", + "webpki", + "webpki-roots", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] [[package]] -name = "hex" -version = "0.4.3" +name = "indenter" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] -name = "hmac" -version = "0.12.1" +name = "indexable-hooks" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "0d70922e1e0e68d99ec1a24446c70756cc3e56deaddb505b1f4b43914522d809" dependencies = [ - "digest 0.10.7", + "cosmwasm-std", + "cw-storage-plus 0.13.4", + "schemars", + "serde", + "thiserror", ] [[package]] @@ -943,6 +2565,7 @@ dependencies = [ "ecdsa 0.14.8", "elliptic-curve 0.12.3", "sha2 0.10.8", + "sha3", ] [[package]] @@ -990,115 +2613,417 @@ dependencies = [ ] [[package]] -name = "konst_proc_macros" -version = "0.3.0" +name = "konst_proc_macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e28ab1dc35e09d60c2b8c90d12a9a8d9666c876c10a3739a3196db0103b6043" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "lazycell" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" + +[[package]] +name = "libc" +version = "0.2.159" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" + +[[package]] +name = "libloading" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +dependencies = [ + "cfg-if", + "windows-targets", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "nft-controllers" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "988dfd9498024717d2a3a4e64d0b86ecf3d8fa4378643bafa9be2f28b8435fc6" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "thiserror", +] + +[[package]] +name = "nft-launchpad" +version = "0.2.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-multi-test 0.20.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2981-royalties", + "cw721 0.18.0", + "cw721-base 0.18.0", + "dao-dao-core", + "dao-interface", + "dao-proposal-single", + "dao-testing", + "dao-voting 2.6.0", + "dao-voting-token-staked", + "nft-tr721", + "schemars", + "serde", + "sylvia 0.9.3", + "thiserror", +] + +[[package]] +name = "nft-marketplace" +version = "0.1.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 0.13.4", + "cw2981-royalties", + "cw721 0.13.4", + "cw721-base 0.15.0", + "schemars", + "serde", +] + +[[package]] +name = "nft-tr721" +version = "0.2.0" +dependencies = [ + "apipb", + "cosmwasm-schema", + "cosmwasm-std", + "cw-multi-test 0.20.1", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2981-royalties", + "cw721 0.18.0", + "cw721-base 0.18.0", + "cw721-metadata-onchain", + "prost 0.12.3", + "rs_merkle", + "schemars", + "serde", + "sha3", + "sylvia 0.9.3", + "thiserror", +] + +[[package]] +name = "nfts-burner" +version = "0.1.0" +dependencies = [ + "base64 0.21.7", + "cosmwasm-schema", + "cosmwasm-std", + "cw-ownable", + "cw-storage-plus 1.2.0", + "cw2981-royalties", + "cw721 0.18.0", + "cw721-metadata-onchain", + "integer-encoding", + "schemars", + "serde", + "serde_json", + "sylvia 0.7.1", + "thiserror", +] + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_threads" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" +dependencies = [ + "libc", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "omniflix-std" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a662bd7782ef6ad1af3747a2b73d37f8e6a230bb7b1624d96c05b3567501600" +dependencies = [ + "chrono", + "cosmwasm-std", + "omniflix-std-derive", + "prost 0.12.3", + "prost-types 0.12.3", + "schemars", + "serde", + "serde-cw-value", +] + +[[package]] +name = "omniflix-std-derive" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bbd85582e3ef1a23fa7b12e0415ea604260c114e72faf40d829c2c40f1c745e" +dependencies = [ + "itertools 0.10.5", + "proc-macro2", + "prost-types 0.11.9", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "osmosis-std" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d7aa053bc3fad557ac90a0377688b400c395e2537f0f1de3293a15cad2e970" +dependencies = [ + "chrono", + "cosmwasm-std", + "osmosis-std-derive", + "prost 0.11.9", + "prost-types 0.11.9", + "schemars", + "serde", + "serde-cw-value", +] + +[[package]] +name = "osmosis-std-derive" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5ebdfd1bc8ed04db596e110c6baa9b174b04f6ed1ec22c666ddc5cb3fa91bd7" +dependencies = [ + "itertools 0.10.5", + "proc-macro2", + "prost-types 0.11.9", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "osmosis-test-tube" +version = "20.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c1534a419d9e2c27b0b4869e68496b92abca93464b82efbdd1f1b43467f2938" +dependencies = [ + "base64 0.21.7", + "bindgen", + "cosmrs", + "cosmwasm-std", + "osmosis-std", + "prost 0.11.9", + "serde", + "serde_json", + "test-tube", + "thiserror", +] + +[[package]] +name = "paste" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e28ab1dc35e09d60c2b8c90d12a9a8d9666c876c10a3739a3196db0103b6043" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "libc" -version = "0.2.159" +name = "pbkdf2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] [[package]] -name = "log" -version = "0.4.20" +name = "peeking_take_while" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] -name = "memchr" -version = "2.7.4" +name = "peg" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "nft-launchpad" -version = "0.2.0" +checksum = "07c0b841ea54f523f7aa556956fbd293bcbe06f2e67d2eb732b7278aaf1d166a" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2981-royalties", - "cw721 0.18.0", - "cw721-base 0.18.0", - "nft-tr721", - "schemars", - "serde", - "sylvia 0.9.3", - "thiserror", + "peg-macros", + "peg-runtime", ] [[package]] -name = "nft-marketplace" -version = "0.1.0" +name = "peg-macros" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 0.13.4", - "cw2981-royalties", - "cw721 0.13.4", - "cw721-base 0.15.0", - "schemars", - "serde", + "peg-runtime", + "proc-macro2", + "quote", ] [[package]] -name = "nft-tr721" -version = "0.2.0" +name = "peg-runtime" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c719dcf55f09a3a7e764c6649ab594c18a177e3599c467983cdf644bfc0a4088" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfe2e71e1471fe07709406bf725f710b02927c9c54b2b5b2ec0e8087d97c327d" dependencies = [ - "apipb", - "cosmwasm-schema", - "cosmwasm-std", - "cw-multi-test 0.20.1", - "cw-storage-plus 1.2.0", - "cw-utils 1.0.3", - "cw2981-royalties", - "cw721 0.18.0", - "cw721-base 0.18.0", - "cw721-metadata-onchain", - "prost 0.12.6", - "rs_merkle", - "schemars", - "serde", - "sha3", - "sylvia 0.9.3", - "thiserror", + "pin-project-internal", ] [[package]] -name = "nfts-burner" -version = "0.1.0" +name = "pin-project-internal" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6e859e6e5bd50440ab63c47e3ebabc90f26251f7c73c3d3e837b74a1cc3fa67" dependencies = [ - "base64", - "cosmwasm-schema", - "cosmwasm-std", - "cw-ownable", - "cw-storage-plus 1.2.0", - "cw2981-royalties", - "cw721 0.18.0", - "cw721-metadata-onchain", - "integer-encoding", - "schemars", - "serde", - "serde_json", - "sylvia 0.7.1", - "thiserror", + "proc-macro2", + "quote", + "syn 2.0.87", ] [[package]] -name = "once_cell" -version = "1.19.0" +name = "pin-project-lite" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] -name = "opaque-debug" -version = "0.3.1" +name = "pin-utils" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" @@ -1120,6 +3045,25 @@ dependencies = [ "spki 0.7.3", ] +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -1163,6 +3107,18 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "proposal-hooks" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a2f15b848398bad689771b35313c7e7095e772d444e299dbdb54b906691f8a" +dependencies = [ + "cosmwasm-std", + "indexable-hooks", + "schemars", + "serde", +] + [[package]] name = "prost" version = "0.9.0" @@ -1175,12 +3131,22 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.6" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" +dependencies = [ + "bytes", + "prost-derive 0.11.9", +] + +[[package]] +name = "prost" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", - "prost-derive 0.12.6", + "prost-derive 0.12.3", ] [[package]] @@ -1198,15 +3164,46 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools 0.10.5", "proc-macro2", "quote", - "syn 2.0.77", + "syn 1.0.109", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools 0.10.5", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "prost-types" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" +dependencies = [ + "prost 0.11.9", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost 0.12.3", ] [[package]] @@ -1222,60 +3219,195 @@ dependencies = [ name = "rakki" version = "0.1.0" dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus 1.2.0", - "getrandom", - "schemars", - "serde", - "sha3", - "sylvia 0.9.3", - "thiserror", + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "getrandom", + "schemars", + "serde", + "sha3", + "sylvia 0.9.3", + "thiserror", +] + +[[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.4", +] + +[[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.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + +[[package]] +name = "rfc6979" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +dependencies = [ + "hmac", + "subtle", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "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 = "rs_merkle" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b241d2e59b74ef9e98d94c78c47623d04c8392abaf82014dfd372a16041128f" +dependencies = [ + "sha2 0.10.8", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "rustc-demangle" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] -name = "rand_core" -version = "0.6.4" +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "rfc6979" -version = "0.3.1" +name = "rustix" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "crypto-bigint 0.4.9", - "hmac", - "zeroize", + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] [[package]] -name = "rfc6979" -version = "0.4.0" +name = "rustls" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "hmac", - "subtle", + "base64 0.13.1", + "log", + "ring", + "sct", + "webpki", ] [[package]] -name = "rs_merkle" -version = "1.4.2" +name = "rustls-native-certs" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b241d2e59b74ef9e98d94c78c47623d04c8392abaf82014dfd372a16041128f" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ - "sha2 0.10.8", + "openssl-probe", + "rustls", + "schannel", + "security-framework", ] [[package]] @@ -1284,6 +3416,24 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[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.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "schemars" version = "0.8.21" @@ -1305,7 +3455,17 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.77", + "syn 2.0.87", +] + +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", ] [[package]] @@ -1336,6 +3496,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.23" @@ -1378,6 +3561,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" version = "1.0.210" @@ -1386,7 +3578,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -1397,7 +3589,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.87", ] [[package]] @@ -1412,6 +3604,28 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.9.9" @@ -1446,6 +3660,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "1.6.4" @@ -1466,6 +3686,37 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spki" version = "0.6.0" @@ -1486,6 +3737,31 @@ dependencies = [ "der 0.7.9", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "stake-cw20" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfbd45133276dbe4d6588899f4d4d06fdb9f16921fd1394affc0bccc9a5cb0b6" +dependencies = [ + "cosmwasm-std", + "cosmwasm-storage", + "cw-controllers 0.11.1", + "cw-storage-plus 0.11.1", + "cw-utils 0.11.1", + "cw2 0.11.1", + "cw20 0.11.1", + "cw20-base 0.11.1", + "schemars", + "serde", + "thiserror", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -1498,6 +3774,15 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + [[package]] name = "sylvia" version = "0.7.1" @@ -1542,68 +3827,278 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bed182fb775d756fdfe7e87174a4e43f1c446c8f9aff1de38a2165dd04b7d805" dependencies = [ - "convert_case", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "convert_case", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "sylvia-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "178e7a0f1a957b2164dc0fd5dfe8c5db1e5fbc7299bffcdac7627b802114ce6f" +dependencies = [ + "convert_case", + "proc-macro-crate", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[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 0.11.6", + "num-traits", + "once_cell", + "prost 0.11.9", + "prost-types 0.11.9", + "ripemd160", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.9.9", + "signature 1.6.4", + "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.9", + "prost-types 0.11.9", + "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", + "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 = "test-tube" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e79c7af10967dd3383ee5aae3810637cc3f2fd040f87f862c02151db060628" +dependencies = [ + "base64 0.13.1", + "cosmrs", + "cosmwasm-std", + "osmosis-std", + "prost 0.11.9", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[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 = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", ] [[package]] -name = "sylvia-derive" -version = "0.9.3" +name = "tokio" +version = "1.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "178e7a0f1a957b2164dc0fd5dfe8c5db1e5fbc7299bffcdac7627b802114ce6f" +checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" dependencies = [ - "convert_case", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", ] [[package]] -name = "syn" -version = "1.0.109" +name = "tokio-macros" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.87", ] [[package]] -name = "syn" -version = "2.0.77" +name = "tokio-rustls" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "rustls", + "tokio", + "webpki", ] [[package]] -name = "thiserror" -version = "1.0.64" +name = "tokio-util" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ - "thiserror-impl", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] -name = "thiserror-impl" -version = "1.0.64" +name = "toml" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.77", + "serde", ] [[package]] @@ -1623,6 +4118,37 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typenum" version = "1.17.0" @@ -1656,12 +4182,78 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[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.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "vote-hooks" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef617ad17edd195f8a3bce72498bfcc406a27cecfc23828f562fa91a3e2fb141" +dependencies = [ + "cosmwasm-std", + "indexable-hooks", + "schemars", + "serde", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -1689,7 +4281,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.87", "wasm-bindgen-shared", ] @@ -1711,7 +4303,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.87", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1722,6 +4314,160 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +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 = "which" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +dependencies = [ + "either", + "home", + "once_cell", + "rustix", +] + +[[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.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.59.0", +] + +[[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.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.5.40" @@ -1731,8 +4477,134 @@ dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "wynd-utils" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daa37b3fba808df599acc6f0d7523b465baf47a0b0361867c4f1635eb53f72aa" +dependencies = [ + "cosmwasm-std", + "schemars", + "serde", + "thiserror", +] + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "synstructure", +] + [[package]] name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/go/pkg/networks/features.gen.go b/go/pkg/networks/features.gen.go index dc028972b1..536dd2ce2f 100644 --- a/go/pkg/networks/features.gen.go +++ b/go/pkg/networks/features.gen.go @@ -66,11 +66,12 @@ func (nb *NetworkBase) GetFeatureCosmWasmNFTsBurner() (*FeatureCosmWasmNFTsBurne type FeatureCosmWasmNFTLaunchpad struct { *FeatureBase - LaunchpadContractAddress string `json:"launchpadContractAddress"` - DefaultMintDenom string `json:"defaultMintDenom"` - LaunchpadEndpoint string `json:"launchpadEndpoint"` - CodeId float64 `json:"codeId"` - NftTr721CodeId float64 `json:"nftTr721CodeId"` + LaunchpadContractAddress string `json:"launchpadContractAddress"` + DefaultMintDenom string `json:"defaultMintDenom"` + LaunchpadEndpoint string `json:"launchpadEndpoint"` + CodeId float64 `json:"codeId"` + NftTr721CodeId float64 `json:"nftTr721CodeId"` + DaoProposalSingleContractAddress string `json:"daoProposalSingleContractAddress"` } var _ Feature = &FeatureCosmWasmNFTLaunchpad{} diff --git a/networks.json b/networks.json index 4e3c8cc3d5..6a809fcdce 100644 --- a/networks.json +++ b/networks.json @@ -11649,6 +11649,17 @@ "RiotP2E", "NFTMarketplaceLeaderboard" ], + "featureObjects": [ + { + "type": "CosmWasmNFTLaunchpad", + "launchpadContractAddress": "tori1l07lh669x8wg2rh3pxzpatrr2npf5ql7y6kusaup53fu2xr68p5qglyy9t", + "launchpadEndpoint": "http://localhost:9090", + "nftTr721CodeId": 60, + "codeId": 95, + "defaultMintDenom": "utori", + "daoProposalSingleContractAddress": "tori1tj2uked2zfq958w6cugnm44qlllnrpaaxk09j39qqdqhhedjpljszjyhx6" + } + ], "currencies": [ { "denom": "utori", @@ -11746,11 +11757,12 @@ }, { "type": "CosmWasmNFTLaunchpad", - "launchpadContractAddress": "tori1te7ku4de0k4rl8lhyuvpmhygaq7k7vy5zpsjq9y638efxsnx3aaqck2utf", + "launchpadContractAddress": "tori1f62uv8zght6vnnq6kh3pg69xca9s03ecwpal7gquupf9knctk25suzf7rq", "launchpadEndpoint": "https://dapp-backend.testnet.teritori.com", "nftTr721CodeId": 60, - "codeId": 71, - "defaultMintDenom": "utori" + "codeId": 96, + "defaultMintDenom": "utori", + "daoProposalSingleContractAddress": "tori1huu2ysuct2e9xnmxc28xdwfeflytw2samzp95a2devjqs0qfj6fqx47v57" }, { "type": "CosmWasmRakki", diff --git a/packages/contracts-clients/nft-launchpad/NftLaunchpad.types.ts b/packages/contracts-clients/nft-launchpad/NftLaunchpad.types.ts index 69236c95bc..9882121e20 100644 --- a/packages/contracts-clients/nft-launchpad/NftLaunchpad.types.ts +++ b/packages/contracts-clients/nft-launchpad/NftLaunchpad.types.ts @@ -14,6 +14,7 @@ export interface Config { name: string; nft_code_id: number; owner: Addr; + proposal_single_contract: Addr; } export type ExecuteMsg = { update_config: { @@ -43,6 +44,7 @@ export interface ConfigChanges { name?: string | null; nft_code_id?: number | null; owner?: string | null; + proposal_single_contract?: string | null; } export interface CollectionProject { artwork_desc?: string | null; diff --git a/packages/networks/features.ts b/packages/networks/features.ts index 0a4721375f..537abdfcd2 100644 --- a/packages/networks/features.ts +++ b/packages/networks/features.ts @@ -58,6 +58,7 @@ const zodCosmWasmNFTLaunchpad = z.object({ launchpadEndpoint: z.string(), codeId: z.number(), nftTr721CodeId: z.number(), + daoProposalSingleContractAddress: z.string(), }); export type CosmWasmNFTLaunchpad = z.infer; diff --git a/packages/networks/teritori-localnet/index.ts b/packages/networks/teritori-localnet/index.ts index d6ba71562e..7d043fa6f1 100644 --- a/packages/networks/teritori-localnet/index.ts +++ b/packages/networks/teritori-localnet/index.ts @@ -1,10 +1,23 @@ import { teritoriLocalnetCurrencies } from "./currencies"; +import { CosmWasmNFTLaunchpad } from "../features"; import { NetworkFeature, NetworkInfo, NetworkKind } from "../types"; const nameServiceContractAddress = ""; const riotContractAddressGen1 = ""; +const cosmwasmNftLaunchpadFeature: CosmWasmNFTLaunchpad = { + type: NetworkFeature.CosmWasmNFTLaunchpad, + launchpadContractAddress: + "tori1l07lh669x8wg2rh3pxzpatrr2npf5ql7y6kusaup53fu2xr68p5qglyy9t", + launchpadEndpoint: "http://localhost:9090", + nftTr721CodeId: 60, + codeId: 95, + defaultMintDenom: "utori", + daoProposalSingleContractAddress: + "tori1tj2uked2zfq958w6cugnm44qlllnrpaaxk09j39qqdqhhedjpljszjyhx6", +}; + export const teritoriLocalnetNetwork: NetworkInfo = { id: "teritori-localnet", kind: NetworkKind.Cosmos, @@ -23,6 +36,7 @@ export const teritoriLocalnetNetwork: NetworkInfo = { NetworkFeature.RiotP2E, NetworkFeature.NFTMarketplaceLeaderboard, ], + featureObjects: [cosmwasmNftLaunchpadFeature], currencies: teritoriLocalnetCurrencies, txExplorer: "", accountExplorer: "", diff --git a/packages/networks/teritori-testnet/index.ts b/packages/networks/teritori-testnet/index.ts index e2559c7f6e..59e272361e 100644 --- a/packages/networks/teritori-testnet/index.ts +++ b/packages/networks/teritori-testnet/index.ts @@ -34,11 +34,13 @@ const nftMarketplace: NFTMarketplace = { const cosmwasmNftLaunchpadFeature: CosmWasmNFTLaunchpad = { type: NetworkFeature.CosmWasmNFTLaunchpad, launchpadContractAddress: - "tori1te7ku4de0k4rl8lhyuvpmhygaq7k7vy5zpsjq9y638efxsnx3aaqck2utf", + "tori1f62uv8zght6vnnq6kh3pg69xca9s03ecwpal7gquupf9knctk25suzf7rq", launchpadEndpoint: "https://dapp-backend.testnet.teritori.com", nftTr721CodeId: 60, - codeId: 71, + codeId: 96, defaultMintDenom: "utori", + daoProposalSingleContractAddress: + "tori1huu2ysuct2e9xnmxc28xdwfeflytw2samzp95a2devjqs0qfj6fqx47v57", }; const rakkiFeature: CosmWasmRakki = { diff --git a/packages/screens/Organizations/components/MembershipOrg/MembershipDeployerSteps.tsx b/packages/screens/Organizations/components/MembershipOrg/MembershipDeployerSteps.tsx index 1a4b680cef..2e3ec6bac9 100644 --- a/packages/screens/Organizations/components/MembershipOrg/MembershipDeployerSteps.tsx +++ b/packages/screens/Organizations/components/MembershipOrg/MembershipDeployerSteps.tsx @@ -8,6 +8,7 @@ import { LaunchingOrganizationSection } from "../LaunchingOrganizationSection"; import { ConfigureVotingSection } from "@/components/dao/ConfigureVotingSection"; import { useFeedbacks } from "@/context/FeedbacksProvider"; +import { TeritoriNameServiceClient } from "@/contracts-clients/teritori-name-service/TeritoriNameService.client"; import { nsNameInfoQueryKey } from "@/hooks/useNSNameInfo"; import useSelectedWallet from "@/hooks/useSelectedWallet"; import { @@ -16,6 +17,7 @@ import { mustGetCosmosNetwork, NetworkKind, } from "@/networks"; +import { getKeplrSigningCosmWasmClient } from "@/networks/signer"; import { createDaoMemberBased, CreateDaoMemberBasedParams } from "@/utils/dao"; import { adenaDeployGnoDAO } from "@/utils/gnodao/deploy"; import { getDuration, getPercent } from "@/utils/gnodao/helpers"; @@ -100,8 +102,23 @@ export const MembershipDeployerSteps: React.FC<{ network.cwAdminFactoryContractAddress!; const walletAddress = selectedWallet.address; + const signingCosmWasmClient = + await getKeplrSigningCosmWasmClient(networkId); + + if (!network.nameServiceContractAddress) { + throw new Error("no name service contract address"); + } + + const nameServiceClient = new TeritoriNameServiceClient( + signingCosmWasmClient, + walletAddress, + network.nameServiceContractAddress, + ); + if (!memberSettingsFormData) return false; const params: CreateDaoMemberBasedParams = { + signingCosmWasmClient, + nameServiceClient, networkId, sender: walletAddress, contractAddress: cwAdminFactoryContractAddress, diff --git a/packages/screens/Organizations/components/RolesOrg/RolesDeployerSteps.tsx b/packages/screens/Organizations/components/RolesOrg/RolesDeployerSteps.tsx index bd6b04d754..fa756e7ea4 100644 --- a/packages/screens/Organizations/components/RolesOrg/RolesDeployerSteps.tsx +++ b/packages/screens/Organizations/components/RolesOrg/RolesDeployerSteps.tsx @@ -9,6 +9,7 @@ import { LaunchingOrganizationSection } from "../LaunchingOrganizationSection"; import { ConfigureVotingSection } from "@/components/dao/ConfigureVotingSection"; import { useFeedbacks } from "@/context/FeedbacksProvider"; +import { TeritoriNameServiceClient } from "@/contracts-clients/teritori-name-service/TeritoriNameService.client"; import { nsNameInfoQueryKey } from "@/hooks/useNSNameInfo"; import useSelectedWallet from "@/hooks/useSelectedWallet"; import { @@ -17,6 +18,7 @@ import { mustGetCosmosNetwork, NetworkKind, } from "@/networks"; +import { getKeplrSigningCosmWasmClient } from "@/networks/signer"; import { createDaoMemberBased, CreateDaoMemberBasedParams } from "@/utils/dao"; import { adenaDeployGnoDAO } from "@/utils/gnodao/deploy"; import { getDuration, getPercent } from "@/utils/gnodao/helpers"; @@ -113,8 +115,23 @@ export const RolesDeployerSteps: React.FC<{ network.cwAdminFactoryContractAddress!; const walletAddress = selectedWallet.address; + const signingCosmWasmClient = + await getKeplrSigningCosmWasmClient(networkId); + + if (!network.nameServiceContractAddress) { + throw new Error("no name service contract address"); + } + + const nameServiceClient = new TeritoriNameServiceClient( + signingCosmWasmClient, + walletAddress, + network.nameServiceContractAddress, + ); + if (!memberSettingsFormData) return false; const params: CreateDaoMemberBasedParams = { + signingCosmWasmClient, + nameServiceClient, networkId, sender: walletAddress, contractAddress: cwAdminFactoryContractAddress, diff --git a/packages/scripts/integration-testing/da0da0Test.ts b/packages/scripts/integration-testing/da0da0Test.ts index 4661732771..45821d264a 100644 --- a/packages/scripts/integration-testing/da0da0Test.ts +++ b/packages/scripts/integration-testing/da0da0Test.ts @@ -3,8 +3,7 @@ import fs from "fs/promises"; import { buildCosmos, startCosmosLocalnet } from "./cosmos"; import { teritoriLocalnetNetwork } from "../../networks/teritori-localnet"; - -import { deployDA0DA0 } from "@/scripts/network-setup/deployDA0DA0"; +import { deployDA0DA0 } from "../network-setup/dao-dao/deployDA0DA0"; const main = async () => { program.argument( @@ -23,11 +22,11 @@ const main = async () => { // test cosmwasm - await deployDA0DA0( - { binaryPath: binary, home, signer: admSigner }, - teritoriLocalnetNetwork.id, - "testnet-adm", - ); + await deployDA0DA0({ + opts: { binaryPath: binary, home, signer: admSigner }, + networkId: teritoriLocalnetNetwork.id, + wallet: "testnet-adm", + }); // clean diff --git a/packages/scripts/integration-testing/simpleTest.ts b/packages/scripts/integration-testing/simpleTest.ts index 55115c2726..f2fa02b818 100644 --- a/packages/scripts/integration-testing/simpleTest.ts +++ b/packages/scripts/integration-testing/simpleTest.ts @@ -20,18 +20,12 @@ const main = async () => { throw new Error("adm signer is undefined"); } - // test cosmwasm - await deployTeritoriEcosystem( { binaryPath: binary, home, signer: admSigner }, teritoriLocalnetNetwork.id, "testnet-adm", ); - - // clean - await kill(); - await fs.rm(home, { recursive: true, force: true }); }; diff --git a/packages/scripts/network-setup/deployCwAddressList.ts b/packages/scripts/network-setup/cw-address-list/deployCwAddressList.ts similarity index 75% rename from packages/scripts/network-setup/deployCwAddressList.ts rename to packages/scripts/network-setup/cw-address-list/deployCwAddressList.ts index 0d77f89cbc..4d5d19d0d1 100644 --- a/packages/scripts/network-setup/deployCwAddressList.ts +++ b/packages/scripts/network-setup/cw-address-list/deployCwAddressList.ts @@ -1,7 +1,5 @@ import { bech32 } from "bech32"; -import { program } from "commander"; import { cloneDeep } from "lodash"; -import os from "os"; import path from "path"; import { @@ -16,7 +14,7 @@ import { storeWASM, } from "@/scripts/network-setup/deployLib"; -const deployCwAddressList = async ({ +export const deployCwAddressList = async ({ opts, networkId, wallet, @@ -58,14 +56,14 @@ const deployCwAddressList = async ({ __dirname, "cw_address_list.wasm", ); - network.cwAdminFactoryCodeId = await storeWASM( + network.cwAddressListCodeId = await storeWASM( opts, wallet, network, cwAddressListWasmFilePath, ); - console.log("Instantiating cw address list", network.cwAdminFactoryCodeId); + console.log("Instantiating cw address list", network.cwAddressListCodeId); nftMarketplaceFeature.cwAddressListContractAddress = await instantiateCwAddressList(opts, wallet, walletAddr, network); @@ -83,7 +81,7 @@ const instantiateCwAddressList = async ( adminAddr: string, network: CosmosNetworkInfo, ) => { - const codeId = network.cwAdminFactoryCodeId; + const codeId = network.cwAddressListCodeId; if (!codeId) { throw new Error("CW Address List code ID not found"); } @@ -97,23 +95,3 @@ const instantiateCwAddressList = async ( {}, ); }; - -const main = async () => { - program.argument("", "Network id to deploy to"); - program.argument("", "Wallet to deploy from"); - program.option("--keyring-backend [keyring-backend]", "Keyring backend"); - program.parse(); - const [networkId, wallet] = program.args; - const { keyringBackend } = program.opts(); - - await deployCwAddressList({ - opts: { - home: path.join(os.homedir(), ".teritorid"), - binaryPath: "teritorid", - keyringBackend, - }, - networkId, - wallet, - }); -}; -main(); diff --git a/packages/scripts/network-setup/cw-address-list/deployCwAddressListScript.ts b/packages/scripts/network-setup/cw-address-list/deployCwAddressListScript.ts new file mode 100644 index 0000000000..467bcd5d8d --- /dev/null +++ b/packages/scripts/network-setup/cw-address-list/deployCwAddressListScript.ts @@ -0,0 +1,25 @@ +import { program } from "commander"; +import os from "os"; +import path from "path"; + +import { deployCwAddressList } from "./deployCwAddressList"; + +const main = async () => { + program.argument("", "Network id to deploy to"); + program.argument("", "Wallet to deploy from"); + program.option("--keyring-backend [keyring-backend]", "Keyring backend"); + program.parse(); + const [networkId, wallet] = program.args; + const { keyringBackend } = program.opts(); + + await deployCwAddressList({ + opts: { + home: path.join(os.homedir(), ".teritorid"), + binaryPath: "teritorid", + keyringBackend, + }, + networkId, + wallet, + }); +}; +main(); diff --git a/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactory.ts b/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactory.ts new file mode 100644 index 0000000000..f10ebbddef --- /dev/null +++ b/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactory.ts @@ -0,0 +1,68 @@ +import path from "path"; + +import { CosmosNetworkInfo } from "@/networks"; +import { + instantiateContract, + storeWASM, + initDeploy, +} from "@/scripts/network-setup/deployLib"; + +export const deployCwAdminFactory = async ({ + opts, + networkId, + wallet, +}: { + networkId: string; + wallet: string; + opts: { home: string; binaryPath: string; keyringBackend?: string }; +}) => { + const { network, walletAddr: deployerWalletAddress } = await initDeploy({ + opts, + networkId, + wallet, + }); + + console.log("Storing CW Admin Factory"); + const nftLaunchpadWasmFilePath = path.join( + __dirname, + "../../../artifacts/cw_admin_factory.wasm", + ); + network.cwAdminFactoryCodeId = await storeWASM( + opts, + wallet, + network, + nftLaunchpadWasmFilePath, + ); + + console.log("Instantiating CW Admin Factory", network.cwAdminFactoryCodeId); + network.cwAdminFactoryContractAddress = await instantiateCwAdminFactory( + opts, + wallet, + deployerWalletAddress, + network, + ); + + console.log(JSON.stringify(network, null, 2)); + return network; +}; + +const instantiateCwAdminFactory = async ( + opts: { home: string; binaryPath: string; keyringBackend?: string }, + wallet: string, + adminAddr: string, + network: CosmosNetworkInfo, +) => { + const codeId = network.cwAdminFactoryCodeId; + if (!codeId) { + throw new Error("CW Admin Factory code ID not found"); + } + return await instantiateContract( + opts, + wallet, + network, + codeId, + adminAddr, + "Teritori CW Admin Factory", + {}, + ); +}; diff --git a/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactoryScript.ts b/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactoryScript.ts new file mode 100644 index 0000000000..c26971aab3 --- /dev/null +++ b/packages/scripts/network-setup/cw-admin-factory/deployCwAdminFactoryScript.ts @@ -0,0 +1,25 @@ +import { program } from "commander"; +import os from "os"; +import path from "path"; + +import { deployCwAdminFactory } from "./deployCwAdminFactory"; + +const main = async () => { + program.argument("", "Network id to deploy to"); + program.argument("", "Wallet to deploy from"); + program.option("--keyring-backend [keyring-backend]", "Keyring backend"); + program.parse(); + const [networkId, wallet] = program.args; + const { keyringBackend } = program.opts(); + + await deployCwAdminFactory({ + opts: { + home: path.join(os.homedir(), ".teritorid"), + binaryPath: "teritorid", + keyringBackend, + }, + networkId, + wallet, + }); +}; +main(); diff --git a/packages/scripts/network-setup/deployDA0DA0.ts b/packages/scripts/network-setup/dao-dao/deployDA0DA0.ts similarity index 72% rename from packages/scripts/network-setup/deployDA0DA0.ts rename to packages/scripts/network-setup/dao-dao/deployDA0DA0.ts index 074171b1d3..d1897dd409 100644 --- a/packages/scripts/network-setup/deployDA0DA0.ts +++ b/packages/scripts/network-setup/dao-dao/deployDA0DA0.ts @@ -1,7 +1,3 @@ -import axios from "axios"; -import { program } from "commander"; -import fs from "fs"; -import os from "os"; import path from "path"; import { @@ -9,10 +5,9 @@ import { initDeploy, instantiateContract, instantiateNameService, - registerTNSHandle, storeWASM, - testTeritoriEcosystem, -} from "./deployLib"; +} from "../deployLib"; +import { deployRemoteWASM } from "../deployRemoteWASM"; import { CosmosNetworkInfo } from "@/networks"; @@ -22,13 +17,17 @@ import { CosmosNetworkInfo } from "@/networks"; * Store these binaries * And deploy cw_admin_factory contract */ -export const deployDA0DA0 = async ( +export const deployDA0DA0 = async ({ + opts, + networkId, + wallet, +}: { opts: DeployOpts & { keyringBackend?: string; - }, - networkId: string, - wallet: string, -) => { + }; + networkId: string; + wallet: string; +}) => { const cosmWasmCwPlusVersion = "v1.1.0"; const cosmWasmCwPlusBinariesPath = `https://github.com/CosmWasm/cw-plus/releases/download/${cosmWasmCwPlusVersion}`; const cw4GroupWasmFileName = "cw4_group.wasm"; @@ -124,12 +123,6 @@ export const deployDA0DA0 = async ( ); console.log(JSON.stringify(network, null, 2)); - - if (opts.signer) { - await registerTNSHandle(network, opts.signer); - await testTeritoriEcosystem(network); - } - return network; }; @@ -153,42 +146,3 @@ const instantiateCwAdminFactory = async ( {}, ); }; - -const deployRemoteWASM = async ( - opts: DeployOpts, - wallet: string, - network: CosmosNetworkInfo, - url: string, - name: string, -) => { - console.log(`Fetching ${url}`); - const contractsDir = path.join(opts.home, "remote-wasm"); - fs.mkdirSync(contractsDir, { recursive: true }); - const filePath = path.join(contractsDir, name); - const response = await axios.get(url, { responseType: "stream" }); - const fileStream = fs.createWriteStream(filePath); - await response.data.pipe(fileStream); - console.log(`Storing ${filePath}`); - return await storeWASM(opts, wallet, network, filePath); -}; - -const main = async () => { - program.argument("", "Network id to deploy to"); - program.argument("", "Wallet to deploy from"); - program.option("--keyring-backend [keyring-backend]", "Keyring backend"); - program.parse(); - const [networkId, wallet] = program.args; - const { keyringBackend } = program.opts(); - - await deployDA0DA0( - { - home: path.join(os.homedir(), ".teritorid"), - binaryPath: "teritorid", - keyringBackend, - signer: undefined, - }, - networkId, - wallet, - ); -}; -main(); diff --git a/packages/scripts/network-setup/dao-dao/deployDA0DA0Script.ts b/packages/scripts/network-setup/dao-dao/deployDA0DA0Script.ts new file mode 100644 index 0000000000..49e11ed9ce --- /dev/null +++ b/packages/scripts/network-setup/dao-dao/deployDA0DA0Script.ts @@ -0,0 +1,26 @@ +import { program } from "commander"; +import os from "os"; +import path from "path"; + +import { deployDA0DA0 } from "./deployDA0DA0"; + +const main = async () => { + program.argument("", "Network id to deploy to"); + program.argument("", "Wallet to deploy from"); + program.option("--keyring-backend [keyring-backend]", "Keyring backend"); + program.parse(); + const [networkId, wallet] = program.args; + const { keyringBackend } = program.opts(); + + await deployDA0DA0({ + opts: { + home: path.join(os.homedir(), ".teritorid"), + binaryPath: "teritorid", + keyringBackend, + signer: undefined, + }, + networkId, + wallet, + }); +}; +main(); diff --git a/packages/scripts/network-setup/deployLib.ts b/packages/scripts/network-setup/deployLib.ts index ee0224f8ee..f3888120ca 100644 --- a/packages/scripts/network-setup/deployLib.ts +++ b/packages/scripts/network-setup/deployLib.ts @@ -6,6 +6,8 @@ import { bech32 } from "bech32"; import _, { cloneDeep } from "lodash"; import path from "path"; +import { deployDA0DA0 } from "./dao-dao/deployDA0DA0"; +import { deployNftLaunchpad } from "./nft-launchpad/deployNftLaunchpad"; import { InstantiateMsg as MarketplaceVaultInstantiateMsg } from "../../contracts-clients/nft-marketplace/NftMarketplace.types"; import { ExecuteMsg as NameServiceExecuteMsg, @@ -132,8 +134,22 @@ export const deployTeritoriEcosystem = async ( network, ); + console.log("Deploying DA0DA0 stuff"); + await deployDA0DA0({ opts, networkId, wallet }); + if (opts.signer) { - await registerTNSHandle(network, opts.signer); + const { signingCosmWasmClient, nameServiceClient } = + await registerTNSHandle(network, opts.signer); + + console.log("Deploying NFT Launchpad"); + await deployNftLaunchpad({ + opts, + networkId, + wallet, + signingCosmWasmClient, + nameServiceClient, + }); + await testTeritoriEcosystem(network); } @@ -160,7 +176,7 @@ const goldenMetadata: Metadata = { validator_operator_address: null, }; -export const registerTNSHandle = async ( +const registerTNSHandle = async ( network: CosmosNetworkInfo, signer: OfflineSigner, ) => { @@ -185,6 +201,8 @@ export const registerTNSHandle = async ( owner: senderAddress, }); console.log("✅ TNS handle registered"); + + return { signingCosmWasmClient: cosmWasmClient, nameServiceClient }; }; export const testTeritoriEcosystem = async (network: CosmosNetworkInfo) => { diff --git a/packages/scripts/network-setup/deployNftLaunchpad.ts b/packages/scripts/network-setup/deployNftLaunchpad.ts deleted file mode 100644 index cad793aeb3..0000000000 --- a/packages/scripts/network-setup/deployNftLaunchpad.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { program } from "commander"; -import { cloneDeep } from "lodash"; -import os from "os"; -import path from "path"; - -import { InstantiateMsg as NftLaunchpadInstantiateMsg } from "@/contracts-clients/nft-launchpad"; -import { - CosmosNetworkInfo, - getNetworkFeature, - NetworkFeature, -} from "@/networks"; -import { CosmWasmNFTLaunchpad } from "@/networks/features"; -import { - DeployOpts, - initDeploy, - instantiateContract, - storeWASM, -} from "@/scripts/network-setup/deployLib"; - -const deployNftLaunchpad = async ({ - opts, - networkId, - wallet: deployerWallet, - launchpadAdmin, -}: { - networkId: string; - wallet: string; - launchpadAdmin: string; - opts: DeployOpts; -}) => { - const { network, walletAddr: deployerAddr } = await initDeploy({ - opts, - networkId, - wallet: deployerWallet, - }); - - const cosmwasmLaunchpadFeature = cloneDeep( - getNetworkFeature(networkId, NetworkFeature.CosmWasmNFTLaunchpad), - ); - if (!cosmwasmLaunchpadFeature) { - console.error(`Cosmwasm Launchpad feature not found on ${networkId}`); - process.exit(1); - } - console.log("Storing nft launchpad"); - const nftLaunchpadWasmFilePath = path.join(__dirname, "nft_launchpad.wasm"); - cosmwasmLaunchpadFeature.codeId = await storeWASM( - opts, - deployerWallet, - network, - nftLaunchpadWasmFilePath, - ); - - console.log("Instantiating nft launchpad", cosmwasmLaunchpadFeature.codeId); - cosmwasmLaunchpadFeature.launchpadContractAddress = - await instantiateNftLaunchpad( - opts, - deployerWallet, - deployerAddr, - launchpadAdmin, - network, - cosmwasmLaunchpadFeature, - ); - network.featureObjects = network.featureObjects?.map((featureObject) => { - if (featureObject.type === NetworkFeature.CosmWasmNFTLaunchpad) { - return cosmwasmLaunchpadFeature; - } else return featureObject; - }); -}; - -const instantiateNftLaunchpad = async ( - opts: DeployOpts, - deployerWallet: string, - deployerAddr: string, - launchpadAdmin: string, - network: CosmosNetworkInfo, - featureObject: CosmWasmNFTLaunchpad, -) => { - const codeId = featureObject.codeId; - if (!codeId) { - console.error("Nft Launchpad code ID not found"); - process.exit(1); - } - let nftCodeId = featureObject.nftTr721CodeId; - if (!nftCodeId) { - nftCodeId = await deployNftTr721({ - opts, - networkId: network.id, - deployerWallet, - }); - } - const instantiateMsg: NftLaunchpadInstantiateMsg = { - config: { - name: "Teritori NFT Launchpad", - owner: deployerAddr, - admin: launchpadAdmin, - nft_code_id: nftCodeId, - }, - }; - return await instantiateContract( - opts, - deployerWallet, - network, - codeId, - deployerAddr, - "Teritori NFT Launchpad", - instantiateMsg, - ); -}; - -const deployNftTr721 = async ({ - opts, - networkId, - deployerWallet, -}: { - networkId: string; - deployerWallet: string; - opts: DeployOpts; -}) => { - const { network } = await initDeploy({ - opts, - networkId, - wallet: deployerWallet, - }); - const cosmwasmLaunchpadFeature = cloneDeep( - getNetworkFeature(networkId, NetworkFeature.CosmWasmNFTLaunchpad), - ); - if (!cosmwasmLaunchpadFeature) { - console.error(`Cosmwasm Launchpad feature not found on ${networkId}`); - process.exit(1); - } - const nftTr721WasmFilePath = path.join(__dirname, "nft_tr721.wasm"); - cosmwasmLaunchpadFeature.nftTr721CodeId = await storeWASM( - opts, - deployerWallet, - network, - nftTr721WasmFilePath, - ); - return cosmwasmLaunchpadFeature.nftTr721CodeId; -}; - -const main = async () => { - program.argument("", "Network id to deploy to"); - program.argument("", "Wallet to deploy from"); - program.argument( - "", - "The DAO wallet adress to make admin things", - ); - program.option("--keyring-backend [keyring-backend]", "Keyring backend"); - program.parse(); - const [networkId, wallet, launchpadAdmin] = program.args; - const { keyringBackend } = program.opts(); - - await deployNftLaunchpad({ - opts: { - home: path.join(os.homedir(), ".teritorid"), - binaryPath: "teritorid", - keyringBackend, - }, - networkId, - wallet, - launchpadAdmin, - }); -}; -main(); diff --git a/packages/scripts/network-setup/deployRemoteWASM.ts b/packages/scripts/network-setup/deployRemoteWASM.ts new file mode 100644 index 0000000000..a0e8b5089c --- /dev/null +++ b/packages/scripts/network-setup/deployRemoteWASM.ts @@ -0,0 +1,25 @@ +import axios from "axios"; +import fs from "fs"; +import path from "path"; + +import { DeployOpts, storeWASM } from "./deployLib"; + +import { CosmosNetworkInfo } from "@/networks"; + +export const deployRemoteWASM = async ( + opts: DeployOpts, + wallet: string, + network: CosmosNetworkInfo, + url: string, + name: string, +) => { + console.log(`Fetching ${url}`); + const contractsDir = path.join(opts.home, "remote-wasm"); + fs.mkdirSync(contractsDir, { recursive: true }); + const filePath = path.join(contractsDir, name); + const response = await axios.get(url, { responseType: "stream" }); + const fileStream = fs.createWriteStream(filePath); + await response.data.pipe(fileStream); + console.log(`Storing ${filePath}`); + return await storeWASM(opts, wallet, network, filePath); +}; diff --git a/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpad.ts b/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpad.ts new file mode 100644 index 0000000000..407fa020e4 --- /dev/null +++ b/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpad.ts @@ -0,0 +1,284 @@ +import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; +import { cloneDeep } from "lodash"; +import path from "path"; + +import { deployCwAdminFactory } from "../cw-admin-factory/deployCwAdminFactory"; +import { deployDA0DA0 } from "../dao-dao/deployDA0DA0"; +import { + DeployOpts, + initDeploy, + instantiateContract, + storeWASM, +} from "../deployLib"; + +import { DaoCoreQueryClient } from "@/contracts-clients/dao-core/DaoCore.client"; +import { InstantiateMsg as NftLaunchpadInstantiateMsg } from "@/contracts-clients/nft-launchpad/NftLaunchpad.types"; +import { TeritoriNameServiceClient } from "@/contracts-clients/teritori-name-service/TeritoriNameService.client"; +import { + CosmosNetworkInfo, + getNetworkFeature, + NetworkFeature, +} from "@/networks"; +import { CosmWasmNFTLaunchpad } from "@/networks/features"; +import { createDaoMemberBased, CreateDaoMemberBasedParams } from "@/utils/dao"; +import { getPercent, getDuration } from "@/utils/gnodao/helpers"; + +/** + * Store nft-launchpad binaries + * Deploy nft-tr721 + * Deploy and instantiate cw-admin-factory + * Deploy and instantiate DAODA0 stuff (See deployDA0DA0.ts) + * Create the Launchpad Admin DAO + * Deploy and instantiate DAO Proposal Single module from https://github.com/DA0-DA0/dao-contracts (We consider using the v2.2.0) + * Deploy and instantiate nft-launchpad + */ +export const deployNftLaunchpad = async ({ + signingCosmWasmClient, + nameServiceClient, + opts, + networkId, + wallet, +}: { + signingCosmWasmClient: SigningCosmWasmClient; + nameServiceClient: TeritoriNameServiceClient; + networkId: string; + wallet: string; + opts: DeployOpts; +}) => { + const { network, walletAddr: deployerWalletAddress } = await initDeploy({ + opts, + networkId, + wallet, + }); + + // Getting the feature + const cosmwasmLaunchpadFeature = cloneDeep( + getNetworkFeature(networkId, NetworkFeature.CosmWasmNFTLaunchpad), + ); + if (!cosmwasmLaunchpadFeature) { + console.error(`Cosmwasm Launchpad feature not found on ${networkId}`); + process.exit(1); + } + + // Optimizing contract and getting WASM binaries + console.log("Storing NFT Launchpad"); + const nftLaunchpadWasmFilePath = path.join( + __dirname, + "../../../../artifacts/nft_launchpad.wasm", + ); + cosmwasmLaunchpadFeature.codeId = await storeWASM( + opts, + wallet, + network, + nftLaunchpadWasmFilePath, + ); + + // Next steps + console.log("Instantiating NFT Launchpad", cosmwasmLaunchpadFeature.codeId); + const launchpadContractAddress = await instantiateNftLaunchpad({ + signingCosmWasmClient, + nameServiceClient, + opts, + wallet, + deployerWalletAddress, + network, + featureObject: cosmwasmLaunchpadFeature, + }); + if (launchpadContractAddress) + cosmwasmLaunchpadFeature.launchpadContractAddress = + launchpadContractAddress; + console.log("NFT Launchpad instantiated:", launchpadContractAddress); + + // Updating the network with the updated feature + network.featureObjects = network.featureObjects?.map((featureObject) => { + if (featureObject.type === NetworkFeature.CosmWasmNFTLaunchpad) { + return cosmwasmLaunchpadFeature; + } else return featureObject; + }); + + console.log(JSON.stringify(network, null, 2)); + return network; +}; + +const instantiateNftLaunchpad = async ({ + signingCosmWasmClient, + nameServiceClient, + opts, + wallet, + deployerWalletAddress, + network, + featureObject, +}: { + signingCosmWasmClient: SigningCosmWasmClient; + nameServiceClient: TeritoriNameServiceClient; + opts: DeployOpts; + wallet: string; + deployerWalletAddress: string; + network: CosmosNetworkInfo; + featureObject: CosmWasmNFTLaunchpad; +}) => { + const codeId = featureObject.codeId; + if (!codeId) { + console.error("NFT Launchpad code ID not found"); + process.exit(1); + } + console.log("NFT Launchpad code ID found:", codeId); + + // NFT TR721 + let nftCodeId = featureObject.nftTr721CodeId; + if (!nftCodeId) { + console.error("No NFT TR721 code ID found. Deploying NFT TR721 ..."); + nftCodeId = await deployNftTr721({ + opts, + networkId: network.id, + wallet, + }); + } + console.log("NFT TR721 deployed:", nftCodeId); + + // CW ADMIN FACTORY + if (!network.cwAdminFactoryContractAddress) { + console.error( + "No CW ADMIN FACTORY contract found. Instantiating CW ADMIN FACTORY ...", + ); + network = await deployCwAdminFactory({ + opts, + networkId: network.id, + wallet, + }); + } + console.log( + "CW ADMIN FACTORY instantiated:", + network.cwAdminFactoryContractAddress, + ); + + // DA0DA0 + if ( + !network.daoCoreCodeId || + !network.daoPreProposeSingleCodeId || + !network.daoProposalSingleCodeId || + !network.cw4GroupCodeId || + !network.daoVotingCw4CodeId + ) { + console.error("No DA0DA0 stuff found. Deploying DA0DA0 stuff ..."); + network = await deployDA0DA0({ + opts, + networkId: network.id, + wallet, + }); + } + console.log("DA0DA0 stuff deployed"); + + console.log("Creating the Launchpad Admin DAO"); + const params: CreateDaoMemberBasedParams = { + signingCosmWasmClient, + nameServiceClient, + networkId: network.id, + sender: deployerWalletAddress, + contractAddress: network.cwAdminFactoryContractAddress!, + daoCoreCodeId: network.daoCoreCodeId!, + daoPreProposeSingleCodeId: network.daoPreProposeSingleCodeId!, + daoProposalSingleCodeId: network.daoProposalSingleCodeId!, + cw4GroupCodeId: network.cw4GroupCodeId!, + daoVotingCw4CodeId: network.daoVotingCw4CodeId!, + name: "Launchpad Admin", + description: "The DAO who reviews applied collections", + tns: "dao-" + randomTnsName(), + imageUrl: "", + members: [ + { + addr: deployerWalletAddress, + weight: 1, + }, + ], + quorum: getPercent(50), + threshold: getPercent(15), + maxVotingPeriod: getDuration("1", "0", "0"), + }; + + const { daoAddress, executeResult } = await createDaoMemberBased( + params, + "auto", + ); + if (executeResult) { + console.log("Launchpad Admin DAO created: " + daoAddress); + } else { + console.error( + "Failed to create Launchpad Admin DAO.\nNFT Launchpad contract instantiation aborted.", + ); + return null; + } + + // dao-proposal-single + const daoCoreClient = new DaoCoreQueryClient( + signingCosmWasmClient, + daoAddress, + ); + const daoProposalSingleModule = ( + await daoCoreClient.activeProposalModules({}) + )[0]; + const daoProposalSingleContractAddress = daoProposalSingleModule.address; + console.log( + "DAO Proposal Single contract used:", + daoProposalSingleContractAddress, + ); + + const instantiateMsg: NftLaunchpadInstantiateMsg = { + config: { + name: "Teritori NFT Launchpad", + owner: deployerWalletAddress, + admin: daoAddress, + nft_code_id: nftCodeId, + proposal_single_contract: daoProposalSingleContractAddress, + }, + }; + return await instantiateContract( + opts, + deployerWalletAddress, + network, + codeId, + deployerWalletAddress, + "Teritori NFT Launchpad", + instantiateMsg, + ); +}; + +const deployNftTr721 = async ({ + opts, + networkId, + wallet, +}: { + networkId: string; + wallet: string; + opts: DeployOpts; +}) => { + const { network, walletAddr: deployerWalletAddress } = await initDeploy({ + opts, + networkId, + wallet, + }); + const cosmwasmLaunchpadFeature = cloneDeep( + getNetworkFeature(networkId, NetworkFeature.CosmWasmNFTLaunchpad), + ); + if (!cosmwasmLaunchpadFeature) { + console.error(`Cosmwasm Launchpad feature not found on ${networkId}`); + process.exit(1); + } + const nftTr721WasmFilePath = path.join(__dirname, "nft_tr721.wasm"); + cosmwasmLaunchpadFeature.nftTr721CodeId = await storeWASM( + opts, + deployerWalletAddress, + network, + nftTr721WasmFilePath, + ); + return cosmwasmLaunchpadFeature.nftTr721CodeId; +}; + +const randomTnsName = () => { + const chars = "abcdefghijklmnopqrstuvwxyz0123456789"; + let result = ""; + for (let i = 0; i < 8; i++) { + result += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return result; +}; diff --git a/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpadScript.ts b/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpadScript.ts new file mode 100644 index 0000000000..cdaeb5afdb --- /dev/null +++ b/packages/scripts/network-setup/nft-launchpad/deployNftLaunchpadScript.ts @@ -0,0 +1,95 @@ +import { Secp256k1HdWallet } from "@cosmjs/amino"; +import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; +import child_process from "child_process"; +import { program } from "commander"; +import os from "os"; +import path from "path"; + +import { deployNftLaunchpad } from "./deployNftLaunchpad"; + +import { TeritoriNameServiceClient } from "@/contracts-clients/teritori-name-service/TeritoriNameService.client"; +import { cosmosNetworkGasPrice, getCosmosNetwork } from "@/networks"; +import { zodTryParseJSON } from "@/utils/sanitize"; +import { ZodKeyringList } from "@/utils/types/teritorid"; + +const main = async () => { + program.argument("", "Network id to deploy to"); + program.argument("", "Wallet to deploy from"); + program.option("", "The wallet mnemonic"); + program.option("--keyring-backend [keyring-backend]", "Keyring backend"); + program.parse(); + + const [networkId, walletName, mnemonic] = program.args; + const { keyringBackend } = program.opts(); + + try { + // Getting Cosmos network + const network = getCosmosNetwork(networkId); + if (!network) { + throw new Error(`Cosmos network ${networkId} not found`); + } + if (!network.nameServiceContractAddress) { + throw new Error("Name service contract address not found"); + } + + // Getting signer from mnemonic + const signer = await Secp256k1HdWallet.fromMnemonic(mnemonic, { + prefix: network.addressPrefix, + }); + + // Getting deployer wallet address from signer accounts + const signerAddress = (await signer.getAccounts())[0].address; + console.log("Signer wallet address:", signerAddress); + + // (To facilitate the script troubleshooting, we control now if the given mnemonic corresponds to the wallet-name) + // Checking if wallet-name exists in backend keyring + const keyringCommand = `teritorid keys list --keyring-backend ${keyringBackend} --output json`; + const keyringListJSON = child_process + .execSync(keyringCommand, { + encoding: "utf-8", + }) + .trim(); + const keyringList = zodTryParseJSON(ZodKeyringList, keyringListJSON); + if (!keyringList) { + throw new Error("Failed to parse keyring list"); + } + // Searching for the wallet with the walletName and check the associated address + const wallet = keyringList.find((entry) => entry.name === walletName); + if (wallet && wallet.address === signerAddress) { + console.log(`Mnemonic corresponds to the wallet name ${walletName}`); + } else { + throw new Error( + `Mnemonic does not correspond to the wallet name ${walletName}`, + ); + } + + // Getting CW signing client + const signingCosmWasmClient = await SigningCosmWasmClient.connectWithSigner( + network.rpcEndpoint, + signer, + { gasPrice: cosmosNetworkGasPrice(network, "average") }, + ); + const nameServiceClient = new TeritoriNameServiceClient( + signingCosmWasmClient, + signerAddress, + network.nameServiceContractAddress, + ); + + // Deploying CW NFT Launchpad stuff + await deployNftLaunchpad({ + signingCosmWasmClient, + nameServiceClient, + opts: { + home: path.join(os.homedir(), ".teritorid"), + binaryPath: "teritorid", + keyringBackend, + }, + networkId, + wallet: walletName, + }); + } catch (e) { + console.error(e); + process.exit(1); + } +}; +main(); diff --git a/packages/utils/dao.ts b/packages/utils/dao.ts index 456f6c5211..a920b20f8b 100644 --- a/packages/utils/dao.ts +++ b/packages/utils/dao.ts @@ -5,9 +5,12 @@ import { import { Coin, StdFee } from "@cosmjs/stargate"; import { Buffer } from "buffer"; +import { InstantiateMsg as DaoCoreInstantiateMsg } from "@/contracts-clients/dao-core/DaoCore.types"; +import { InstantiateMsg as PreProposeSingleInstantiateMsg } from "@/contracts-clients/dao-pre-propose-single/DaoPreProposeSingle.types"; +import { InstantiateMsg as ProposalSingleInstantiateMsg } from "@/contracts-clients/dao-proposal-single/DaoProposalSingle.types"; +import { InstantiateMsg as VotingCw4InstantiateMsg } from "@/contracts-clients/dao-voting-cw4/DaoVotingCw4.types"; import { TeritoriNameServiceClient } from "@/contracts-clients/teritori-name-service/TeritoriNameService.client"; import { getStakingCurrency, mustGetCosmosNetwork } from "@/networks"; -import { getKeplrSigningCosmWasmClient } from "@/networks/signer"; interface TokenHolder { address: string; @@ -19,6 +22,8 @@ interface DaoMember { } export interface CreateDaoMemberBasedParams { + signingCosmWasmClient: SigningCosmWasmClient; + nameServiceClient: TeritoriNameServiceClient; networkId: string; sender: string; contractAddress: string; @@ -187,6 +192,8 @@ export const createDaoTokenBased = async ( export const createDaoMemberBased = async ( { + signingCosmWasmClient, + nameServiceClient, sender, networkId, contractAddress, @@ -211,12 +218,12 @@ export const createDaoMemberBased = async ( ) => { await onStepChange?.(0); - const dao_pre_propose_single_msg = { + const dao_pre_propose_single_msg: PreProposeSingleInstantiateMsg = { deposit_info: null, extension: {}, open_proposal_submission: false, }; - const dao_proposal_single_msg = { + const dao_proposal_single_msg: ProposalSingleInstantiateMsg = { threshold: { threshold_quorum: { quorum: { percent: quorum }, @@ -256,7 +263,7 @@ export const createDaoMemberBased = async ( }, ]; - const dao_voting_cw4_msg = { + const dao_voting_cw4_msg: VotingCw4InstantiateMsg = { cw4_group_code_id: cw4GroupCodeId, initial_members: members, }; @@ -268,7 +275,7 @@ export const createDaoMemberBased = async ( msg: Buffer.from(JSON.stringify(dao_voting_cw4_msg)).toString("base64"), }; - const dao_core_instantiate_msg = { + const dao_core_instantiate_msg: DaoCoreInstantiateMsg = { admin: null, automatically_add_cw20s: true, automatically_add_cw721s: true, @@ -278,6 +285,7 @@ export const createDaoMemberBased = async ( proposal_modules_instantiate_info, voting_module_instantiate_info, }; + const instantiate_msg = Buffer.from( JSON.stringify(dao_core_instantiate_msg), ).toString("base64"); @@ -288,13 +296,6 @@ export const createDaoMemberBased = async ( throw new Error("no name service contract address"); } - const client = await getKeplrSigningCosmWasmClient(networkId); - - const nameServiceClient = new TeritoriNameServiceClient( - client, - sender, - network.nameServiceContractAddress, - ); const tokenId = (tns + network.nameServiceTLD).toLowerCase(); const amount = await nameServiceClient.mintPrice({ tokenId, @@ -316,7 +317,7 @@ export const createDaoMemberBased = async ( amount && denom ? [{ denom, amount }] : [], ); - const executeResult = await client.execute( + const executeResult = await signingCosmWasmClient.execute( sender, contractAddress, { diff --git a/packages/utils/types/teritorid.ts b/packages/utils/types/teritorid.ts new file mode 100644 index 0000000000..e884f88dba --- /dev/null +++ b/packages/utils/types/teritorid.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; + +export const ZodKeyringList = z.array( + z.object({ + name: z.string(), + type: z.string(), + address: z.string(), + pubkey: z.string(), + mnemonic: z.string().optional(), + }), +); diff --git a/rust/cw-contracts/nft-launchpad/Cargo.toml b/rust/cw-contracts/nft-launchpad/Cargo.toml index 20a870ba73..7f3ed75113 100644 --- a/rust/cw-contracts/nft-launchpad/Cargo.toml +++ b/rust/cw-contracts/nft-launchpad/Cargo.toml @@ -21,6 +21,13 @@ serde = { version = "1.0.197", features = ["derive"] } sylvia = "0.9.3" thiserror = "1.0.57" nft-tr721 = { workspace = true, features = ["library"] } +dao-proposal-single = { version = "2.6.0", features = ["library"] } +dao-voting = "2.6.0" [dev-dependencies] +cw-multi-test = "0.20.0" sylvia = { version = "0.9.3", features = ["mt"] } +dao-dao-core = { version = "2.6.0", features = ["library"] } +dao-testing = { version = "2.5.0" } +dao-interface = { version = "2.6.0" } +dao-voting-token-staked = { version = "2.6.0" } \ No newline at end of file diff --git a/rust/cw-contracts/nft-launchpad/Makefile b/rust/cw-contracts/nft-launchpad/Makefile deleted file mode 100644 index d89889f4bb..0000000000 --- a/rust/cw-contracts/nft-launchpad/Makefile +++ /dev/null @@ -1,54 +0,0 @@ -ADMIN_TESTNET=testnet-adm -ADMIN_ADDR_TESTNET=$(shell teritorid keys show $(ADMIN_TESTNET) --keyring-backend test --output json | jq -r .address) -NODE_FLAG_TESTNET=--node https://rpc.testnet.teritori.com:443 -TX_FLAGS_TESTNET=--from $(ADMIN_TESTNET) --chain-id teritori-test-7 $(NODE_FLAG_TESTNET) --gas auto --gas-adjustment 1.3 -y -b sync --output json --keyring-backend test -o json -QUERY_FLAGS_TESTNET=$(NODE_FLAG_TESTNET) -o json -CODE_ID_TESTNET=71 -CONFIG_TESTNET=$(shell cat config.json | jq -r '.owner="$(ADMIN_ADDR_TESTNET)" | tojson | @sh') - -ADMIN_MAINNET=mainnet-adm -ADMIN_ADDR_MAINNET=$(shell teritorid keys show $(ADMIN_MAINNET) --output json | jq -r .address) -NODE_FLAG_MAINNET=--node https://rpc.mainnet.teritori.com:443 -# --keyring-backend os by default -TX_FLAGS_MAINNET=--from $(ADMIN_MAINNET) --chain-id teritori-1 $(NODE_FLAG_MAINNET) --gas auto --gas-adjustment 1.3 -y -b sync --output json -o json -QUERY_FLAGS_MAINNET=$(NODE_FLAG_MAINNET) -o json -CODE_ID_MAINNET= -CONFIG_MAINNET=$(shell cat config-mainnet.json | jq -r '.owner="$(ADMIN_ADDR_MAINNET)" | tojson | @sh') - -WORKSPACE_PATH := $(shell realpath $(shell dirname $(shell pwd))/../..) - -# only informative -# CONTRACT_ADDRESS_TESTNET=tori1te7ku4de0k4rl8lhyuvpmhygaq7k7vy5zpsjq9y638efxsnx3aaqck2utf -# CONTRACT_ADDRESS_MAINNET= - -.PHONY: artifacts/nft_launchpad.wasm -artifacts/nft_launchpad.wasm: - docker run --rm -v "$(WORKSPACE_PATH):/code" \ - --platform linux/amd64 \ - --mount type=volume,source=nft_launchpad_cache,target=/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.14.0 - -.PHONY: deploy.testnet -deploy.testnet: artifacts/nft_launchpad.wasm - set -o pipefail; \ - TXHASH=$$(teritorid tx wasm store $(WORKSPACE_PATH)/artifacts/nft_launchpad.wasm $(TX_FLAGS_TESTNET) | jq -r .txhash); \ - while ! teritorid query tx $$TXHASH $(QUERY_FLAGS_TESTNET) 2>/dev/null | jq -r '.logs[0].events[] | select(.type=="store_code").attributes[] | select(.key=="code_id").value'; do sleep 1; done - -.PHONY: instantiate.testnet -instantiate.testnet: config.json - set -o pipefail; \ - TXHASH=$$(teritorid tx wasm instantiate $(CODE_ID_TESTNET) $(CONFIG_TESTNET) --label NftLaunchpad --admin $(ADMIN_ADDR_TESTNET) $(TX_FLAGS_TESTNET) | jq -r .txhash); \ - while ! teritorid query tx $$TXHASH $(QUERY_FLAGS_TESTNET) 2>/dev/null | jq -r '.logs[0].events[] | select(.type=="instantiate").attributes[] | select(.key=="_contract_address").value'; do sleep 1; done - -.PHONY: deploy.mainnet -deploy.mainnet: artifacts/nft_launchpad.wasm - set -o pipefail; \ - TXHASH=$$(teritorid tx wasm store $(WORKSPACE_PATH)/artifacts/nft_launchpad.wasm $(TX_FLAGS_MAINNET) | jq -r .txhash); \ - while ! teritorid query tx $$TXHASH $(QUERY_FLAGS_MAINNET) 2>/dev/null | jq -r '.logs[0].events[] | select(.type=="store_code").attributes[] | select(.key=="code_id").value'; do sleep 1; done - -.PHONY: instantiate.mainnet -instantiate.mainnet: config-mainnet.json - set -o pipefail; \ - TXHASH=$$(teritorid tx wasm instantiate $(CODE_ID_MAINNET) $(CONFIG_MAINNET) --label NftsBurner --admin $(ADMIN_ADDR_MAINNET) $(TX_FLAGS_MAINNET) | jq -r .txhash); \ - while ! teritorid query tx $$TXHASH $(QUERY_FLAGS_MAINNET) 2>/dev/null | jq -r '.logs[0].events[] | select(.type=="instantiate").attributes[] | select(.key=="_contract_address").value'; do sleep 1; done \ No newline at end of file diff --git a/rust/cw-contracts/nft-launchpad/config-mainnet.json b/rust/cw-contracts/nft-launchpad/config-mainnet.json deleted file mode 100644 index 0e2505c3d8..0000000000 --- a/rust/cw-contracts/nft-launchpad/config-mainnet.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "config": { - "name": "NFT Launchpad", - "supported_networks": ["teritori"], - "owner": "", - "deployer": "", - "nft_code_id": 0 - } -} diff --git a/rust/cw-contracts/nft-launchpad/config.json b/rust/cw-contracts/nft-launchpad/config.json deleted file mode 100644 index affee6a7f6..0000000000 --- a/rust/cw-contracts/nft-launchpad/config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "config": { - "name": "NFT Launchpad", - "supported_networks": ["teritori-testnet"], - "owner": "tori1llmym9upcpwnz7qte856ghlp5437ezz2gg7z0q", - "admin": "tori1kjvyqf4mttwrhfuq5gfj9xgxx9jdt92xnxzf770x853567ymx8cscrnw05", - "nft_code_id": 60 - } -} diff --git a/rust/cw-contracts/nft-launchpad/schema/nft-launchpad.json b/rust/cw-contracts/nft-launchpad/schema/nft-launchpad.json index 3b9c3b97f5..fd0a55ede3 100644 --- a/rust/cw-contracts/nft-launchpad/schema/nft-launchpad.json +++ b/rust/cw-contracts/nft-launchpad/schema/nft-launchpad.json @@ -25,7 +25,8 @@ "admin", "name", "nft_code_id", - "owner" + "owner", + "proposal_single_contract" ], "properties": { "admin": { @@ -41,6 +42,9 @@ }, "owner": { "$ref": "#/definitions/Addr" + }, + "proposal_single_contract": { + "$ref": "#/definitions/Addr" } }, "additionalProperties": false @@ -323,6 +327,12 @@ "string", "null" ] + }, + "proposal_single_contract": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false @@ -708,7 +718,8 @@ "admin", "name", "nft_code_id", - "owner" + "owner", + "proposal_single_contract" ], "properties": { "admin": { @@ -724,6 +735,9 @@ }, "owner": { "$ref": "#/definitions/Addr" + }, + "proposal_single_contract": { + "$ref": "#/definitions/Addr" } }, "additionalProperties": false, diff --git a/rust/cw-contracts/nft-launchpad/schema/raw/execute.json b/rust/cw-contracts/nft-launchpad/schema/raw/execute.json index c1c33c471c..ff4993d3db 100644 --- a/rust/cw-contracts/nft-launchpad/schema/raw/execute.json +++ b/rust/cw-contracts/nft-launchpad/schema/raw/execute.json @@ -274,6 +274,12 @@ "string", "null" ] + }, + "proposal_single_contract": { + "type": [ + "string", + "null" + ] } }, "additionalProperties": false diff --git a/rust/cw-contracts/nft-launchpad/schema/raw/instantiate.json b/rust/cw-contracts/nft-launchpad/schema/raw/instantiate.json index 33c4480887..c394bf568b 100644 --- a/rust/cw-contracts/nft-launchpad/schema/raw/instantiate.json +++ b/rust/cw-contracts/nft-launchpad/schema/raw/instantiate.json @@ -21,7 +21,8 @@ "admin", "name", "nft_code_id", - "owner" + "owner", + "proposal_single_contract" ], "properties": { "admin": { @@ -37,6 +38,9 @@ }, "owner": { "$ref": "#/definitions/Addr" + }, + "proposal_single_contract": { + "$ref": "#/definitions/Addr" } }, "additionalProperties": false diff --git a/rust/cw-contracts/nft-launchpad/schema/raw/response_to_get_config.json b/rust/cw-contracts/nft-launchpad/schema/raw/response_to_get_config.json index f58adb6046..20672a2e9f 100644 --- a/rust/cw-contracts/nft-launchpad/schema/raw/response_to_get_config.json +++ b/rust/cw-contracts/nft-launchpad/schema/raw/response_to_get_config.json @@ -6,7 +6,8 @@ "admin", "name", "nft_code_id", - "owner" + "owner", + "proposal_single_contract" ], "properties": { "admin": { @@ -22,6 +23,9 @@ }, "owner": { "$ref": "#/definitions/Addr" + }, + "proposal_single_contract": { + "$ref": "#/definitions/Addr" } }, "additionalProperties": false, diff --git a/rust/cw-contracts/nft-launchpad/src/contract.rs b/rust/cw-contracts/nft-launchpad/src/contract.rs index 43d797db0a..700a7ed1eb 100644 --- a/rust/cw-contracts/nft-launchpad/src/contract.rs +++ b/rust/cw-contracts/nft-launchpad/src/contract.rs @@ -1,5 +1,7 @@ use cosmwasm_schema::cw_serde; -use cosmwasm_std::{attr, to_json_binary, Addr, Reply, Response, StdResult, SubMsg, WasmMsg}; +use cosmwasm_std::{ + attr, to_json_binary, Addr, Reply, Response, StdResult, SubMsg, SubMsgResult, WasmMsg, +}; use cw_storage_plus::{Item, Map}; use cw_utils::parse_reply_instantiate_data; use sylvia::{ @@ -7,14 +9,22 @@ use sylvia::{ types::{ExecCtx, InstantiateCtx, QueryCtx, ReplyCtx}, }; -use crate::error::ContractError; - +use crate::{error::ContractError, utils::get_events_values}; use nft_tr721::{ contract::sv::InstantiateMsg as Tr721InstantiateMsg, contract::{MintInfo as Tr721MintInfo, MintPeriod as Tr721MintPeriod}, }; +use dao_proposal_single::msg::ExecuteMsg as DaoExecuteMsg; +use dao_voting::proposal::SingleChoiceProposeMsg; + const INSTANTIATE_REPLY_ID: u64 = 1u64; +const EXECUTE_REPLY_ID: u64 = 2u64; + +#[derive(serde::Serialize)] +pub enum ExecuteMsg { + DeployCollection { collection_id: String }, +} // Contract states ------------------------------------------------------ pub struct NftLaunchpad { @@ -62,6 +72,10 @@ impl NftLaunchpad { } // Save new config + if let Some(name) = changes.name { + config.name = name.clone(); + attributes.push(attr("new_name", name.to_string())) + } if let Some(nft_code_id) = changes.nft_code_id { config.nft_code_id = nft_code_id; attributes.push(attr("new_nft_code_id", nft_code_id.to_string())) @@ -74,6 +88,11 @@ impl NftLaunchpad { config.owner = ctx.deps.api.addr_validate(&owner)?; attributes.push(attr("new_owner", owner)) } + if let Some(proposal_single_contract) = changes.proposal_single_contract { + config.proposal_single_contract = + ctx.deps.api.addr_validate(&proposal_single_contract)?; + attributes.push(attr("new_name", proposal_single_contract.to_string())) + } self.config.save(ctx.deps.storage, &config)?; Ok(Response::new().add_attributes(attributes)) @@ -133,6 +152,8 @@ impl NftLaunchpad { merkle_root: String, ) -> Result { let storage = ctx.deps.storage; + let config = self.config.load(storage)?; + let proposal_single_contract = config.proposal_single_contract; let mut collection = self .collections @@ -153,9 +174,37 @@ impl NftLaunchpad { collection.metadatas_merkle_root = Some(merkle_root.clone()); // Update collection - self.collections.save(storage, collection_id, &collection)?; + self.collections + .save(storage, collection_id.clone(), &collection)?; + + // Create the deploy_collection proposal message + let deploy_collection_msg = cosmwasm_std::CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: ctx.env.contract.address.to_string(), + msg: to_json_binary(&ExecuteMsg::DeployCollection { + collection_id: collection_id.clone(), + })?, + funds: vec![], + }); + let single_choice_propose_msg = SingleChoiceProposeMsg { + title: format!("Propose to deploy collection {}", collection_id), + description: format!( + "Requesting approval to deploy the collection {} with ID {}", + collection.name, collection_id + ), + msgs: vec![deploy_collection_msg], + proposer: None, + vote: None, + }; + let propose_execute_msg = WasmMsg::Execute { + contract_addr: proposal_single_contract.to_string(), + msg: to_json_binary(&DaoExecuteMsg::Propose(single_choice_propose_msg))?, + funds: vec![], + }; + + let submessage = SubMsg::reply_on_success(propose_execute_msg, EXECUTE_REPLY_ID); Ok(Response::new() + .add_submessage(submessage) .add_attribute("action", "update_merkle_root") .add_attribute("merkle_root", merkle_root)) } @@ -219,7 +268,7 @@ impl NftLaunchpad { Ok(Response::new() .add_submessage(submessage) - .add_attribute("action", "collection_deployed") + .add_attribute("action", "deploy_collection") .add_attribute("collection_id", collection_id)) } @@ -244,23 +293,50 @@ impl NftLaunchpad { let msg_id = msg.id; let storage = ctx.deps.storage; + // dao single execute (propose) submessage + if msg_id == EXECUTE_REPLY_ID { + if let SubMsgResult::Ok(resp) = msg.result { + // Get proposal id from dao-proposal-single execute_propose response attributes + let proposal_id = get_events_values(&resp.events, "wasm", "proposal_id") + .first() + .ok_or(ContractError::EventValueNotFound( + "wasm".to_string(), + "proposal_id".to_string(), + ))? + .to_owned(); + + return Ok(Response::new() + .add_attribute("action", "execute_propose") + .add_attribute("proposal_id", proposal_id)); + // About these attributes, we could just get the ones from dao-proposal-single execute_propose, + // but it's better to emit ourselves and so centralise proposal_id handling here + } + return Err(ContractError::NoResultInReply); + } + + // tr271 instantiate submessage if msg_id == INSTANTIATE_REPLY_ID { - let resp = parse_reply_instantiate_data(msg).unwrap(); - let deployed_addr = resp.contract_address; - - // Get instantiating collection id - let collection_id = self.instantiating_collection_id.load(storage)?; - - // Update collection states - let mut collection = self.collections.load(storage, collection_id.to_owned())?; - collection.deployed_address = Some(deployed_addr.clone()); - self.collections - .save(storage, collection_id.to_owned(), &collection)?; - - return Ok(Response::new() - .add_attribute("action", "collection_instantiated") - .add_attribute("collection_id", collection_id) - .add_attribute("collection_addr", deployed_addr)); + let parse_reply_result = parse_reply_instantiate_data(msg); + match parse_reply_result { + Ok(parse_reply_data) => { + let deployed_addr = parse_reply_data.contract_address; + // Get instantiating collection id + let collection_id = self.instantiating_collection_id.load(storage)?; + // Update collection states + let mut collection = + self.collections.load(storage, collection_id.to_owned())?; + collection.deployed_address = Some(deployed_addr.clone()); + self.collections + .save(storage, collection_id.to_owned(), &collection)?; + + return Ok(Response::new() + .add_attribute("action", "instantiate_collection") + .add_attribute("collection_addr", deployed_addr)); + } + Err(parse_reply_error) => { + return Err(ContractError::ParseReplyError(parse_reply_error.into())) + } + } } Err(ContractError::UnknownReply { reply_id: msg_id }) @@ -274,6 +350,7 @@ pub struct Config { pub nft_code_id: u64, pub admin: Addr, pub owner: Addr, + pub proposal_single_contract: Addr, } #[cw_serde] @@ -282,6 +359,7 @@ pub struct ConfigChanges { pub nft_code_id: Option, pub admin: Option, pub owner: Option, + pub proposal_single_contract: Option, } #[cw_serde] diff --git a/rust/cw-contracts/nft-launchpad/src/error.rs b/rust/cw-contracts/nft-launchpad/src/error.rs index e2a19ed93b..e650bb67f7 100644 --- a/rust/cw-contracts/nft-launchpad/src/error.rs +++ b/rust/cw-contracts/nft-launchpad/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{Instantiate2AddressError, StdError}; +use cosmwasm_std::StdError; use cw_utils::ParseReplyError; use thiserror::Error; @@ -7,15 +7,9 @@ pub enum ContractError { #[error("{0}")] Std(#[from] StdError), - #[error("NFT Code id missing.")] - NftCodeIdMissing, - #[error("Merkle root missing.")] MerkleRootMissing, - #[error("Deployer missing.")] - DeployerMissing, - #[error("Unauthorized.")] Unauthorized, @@ -31,9 +25,6 @@ pub enum ContractError { #[error("Collection not found.")] CollectionNotFound, - #[error("Collection not deployed.")] - CollectionNotDeployed, - #[error("Wrong collection owner.")] WrongCollectionOwner, @@ -43,12 +34,15 @@ pub enum ContractError { #[error("Already deployed.")] AlreadyDeployed, + #[error("No result in reply.")] + NoResultInReply, + #[error("Unable to parse reply.")] ParseReplyError(#[from] ParseReplyError), #[error("Unknown reply id {reply_id}.")] UnknownReply { reply_id: u64 }, - #[error("{0}")] - Instantiate2AddressError(#[from] Instantiate2AddressError), + #[error("Event value not found for path '{0}.{1}'.")] + EventValueNotFound(String, String), } diff --git a/rust/cw-contracts/nft-launchpad/src/lib.rs b/rust/cw-contracts/nft-launchpad/src/lib.rs index dfc3c2d15a..7204eb8ddf 100644 --- a/rust/cw-contracts/nft-launchpad/src/lib.rs +++ b/rust/cw-contracts/nft-launchpad/src/lib.rs @@ -1,5 +1,8 @@ pub mod contract; pub mod error; +pub mod utils; #[cfg(test)] pub mod multitest; +#[cfg(test)] +pub mod test_helpers; diff --git a/rust/cw-contracts/nft-launchpad/src/multitest.rs b/rust/cw-contracts/nft-launchpad/src/multitest.rs index 3232b28d39..90ea71a76b 100644 --- a/rust/cw-contracts/nft-launchpad/src/multitest.rs +++ b/rust/cw-contracts/nft-launchpad/src/multitest.rs @@ -1,6 +1,18 @@ -use cosmwasm_std::{Addr, Attribute, Coin, Uint128}; +use cosmwasm_std::{to_json_binary, Addr, Attribute, Coin, Empty, Uint128}; +use cw_utils::Duration; +use dao_interface::msg::InstantiateMsg as DaoDaoInstantiateMsg; +use dao_interface::state::{Admin, ModuleInstantiateInfo}; +use dao_proposal_single::contract::{ + execute as dao_execute, instantiate as dao_instantiate, query as dao_query, +}; +use dao_proposal_single::msg::InstantiateMsg as DaoInstantiateMsg; +use dao_testing::contracts::{dao_dao_contract, native_staked_balances_voting_contract}; +use dao_voting::pre_propose::PreProposeInfo; +use dao_voting::threshold::Threshold; +use sylvia::cw_multi_test::{Contract, ContractWrapper, Executor}; use sylvia::multitest::App; +use crate::test_helpers::assert_wasm_attr; use crate::{ contract::{sv::multitest_utils::CodeId as LaunchpadCodeId, CollectionProject, Config}, error::ContractError, @@ -33,7 +45,7 @@ fn get_default_collection() -> CollectionProject { // Info ---------------------------- name: "name".to_string(), desc: "desc".to_string(), - symbol: "SYMBOL".to_string(), + symbol: COLLECTION_ID.to_string(), cover_img_uri: "img".to_string(), target_network: "network".to_string(), // Details ---------------------------- @@ -62,37 +74,121 @@ fn get_default_collection() -> CollectionProject { } } +const PROPOSAL_SINGLE_CONTRACT: &str = "contract1"; +const COLLECTION_ID: &str = "SYMBOL"; +const SENDER: &str = "sender"; +const ADMIN: &str = "admin"; +const DENOM: &str = "utori"; + #[test] fn instantiate() { let app = App::default(); let code_id = LaunchpadCodeId::store_code(&app); - let sender = "sender"; // Deploy NFT TR721 for sylvia contract let nft_contract = NftTr721CodeId::store_code(&app); let deployed_nft_code_id = nft_contract.code_id(); + // DAO Proposal Single module + let proposal_single_contract: &str = PROPOSAL_SINGLE_CONTRACT; // Instantiate let config = Config { name: "teritori launchpad".to_string(), nft_code_id: deployed_nft_code_id, - admin: Addr::unchecked("admin"), - owner: Addr::unchecked(sender), + admin: Addr::unchecked(ADMIN), + owner: Addr::unchecked(SENDER), + proposal_single_contract: Addr::unchecked(proposal_single_contract), }; - let contract = code_id.instantiate(config).call(sender).unwrap(); + let contract = code_id.instantiate(config).call(SENDER).unwrap(); // Check create config let config = contract.get_config().unwrap(); assert_eq!(config.name, "teritori launchpad".to_string()); } +fn single_proposal_contract() -> Box> { + let contract = ContractWrapper::new(dao_execute, dao_instantiate, dao_query); + Box::new(contract) +} + +fn instantiate_dao_contract(app: &App, sender: &str) -> Addr { + let voting_id = app + .app_mut() + .store_code(native_staked_balances_voting_contract()); + let dao_id = app.app_mut().store_code(dao_dao_contract()); + let gov_id = app.app_mut().store_code(single_proposal_contract()); + + let gov_init_msg = DaoInstantiateMsg { + threshold: Threshold::AbsoluteCount { + threshold: Uint128::new(1), + }, + max_voting_period: Duration::Height(1), + min_voting_period: Some(Duration::Height(1)), + only_members_execute: true, + allow_revoting: true, + close_proposal_on_execution_failure: true, + pre_propose_info: PreProposeInfo::AnyoneMayPropose {}, + veto: None, + }; + + let voting_init_msg = dao_voting_token_staked::msg::InstantiateMsg { + token_info: dao_voting_token_staked::msg::TokenInfo::Existing { + denom: DENOM.to_string(), + }, + unstaking_duration: Some(Duration::Height(5)), + active_threshold: None, + }; + + let dao_init_msg = DaoDaoInstantiateMsg { + dao_uri: None, + admin: None, + name: "DAO DAO".to_string(), + description: "A DAO that builds DAOs.".to_string(), + image_url: None, + automatically_add_cw20s: true, + automatically_add_cw721s: true, + voting_module_instantiate_info: ModuleInstantiateInfo { + code_id: voting_id, + msg: to_json_binary(&voting_init_msg).unwrap(), + admin: Some(Admin::Address { + addr: sender.to_string(), + }), + funds: vec![], + label: "voting module".to_string(), + }, + proposal_modules_instantiate_info: vec![ModuleInstantiateInfo { + code_id: gov_id, + msg: to_json_binary(&gov_init_msg).unwrap(), + admin: Some(Admin::Address { + addr: sender.to_string(), + }), + funds: vec![], + label: "single proposal module".to_string(), + }], + initial_items: None, + }; + + let dao_addr = app + .app_mut() + .instantiate_contract( + dao_id, + Addr::unchecked(sender), + &dao_init_msg, + &[], + "Dao dao", + None, + ) + .unwrap(); + + return dao_addr; +} + #[test] fn full_flow() { // 1. Create let default_collection = get_default_collection(); let app: App = App::default(); - let sender = "sender"; // Deploy NFT TR721 for sylvia contract let nft_contract = NftTr721CodeId::store_code(&app); @@ -103,16 +199,32 @@ fn full_flow() { .instantiate(Config { name: "teritori launchpad".to_string(), nft_code_id: deployed_nft_code_id, - admin: Addr::unchecked("admin"), - owner: Addr::unchecked(sender), + admin: Addr::unchecked(ADMIN), + owner: Addr::unchecked(SENDER), + proposal_single_contract: Addr::unchecked(PROPOSAL_SINGLE_CONTRACT), }) - .call(sender) + .call(SENDER) .unwrap(); // Check instantiated launchpad let config = contract.get_config().unwrap(); assert_eq!(config.name, "teritori launchpad".to_string()); + // Instantiate DAO contract with Single Proposal module --------------------------------------------------------- + let _ = instantiate_dao_contract(&app, SENDER); + + // FIXME: By order of execution, contract3 is the single proposal contract + // We should find a way to get that address dynamically + // For now, we just hardcode it + const SINGLE_PROPOSAL_CONTRACT_ADDR: &str = "contract3"; + let contract_data = app + .app_mut() + .contract_data(&Addr::unchecked(SINGLE_PROPOSAL_CONTRACT_ADDR)) + .unwrap(); + assert_eq!(contract_data.label, "single proposal module".to_string()); + + let single_proposal_contract_addr = SINGLE_PROPOSAL_CONTRACT_ADDR; + // Create collection without period ----------------------------------------- { let err = contract @@ -120,7 +232,7 @@ fn full_flow() { mint_periods: vec![], ..CollectionProject::default() }) - .call(sender) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::MintPeriodRequired); @@ -133,7 +245,7 @@ fn full_flow() { symbol: "a_123".to_string(), ..default_collection.clone() }) - .call(sender) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::CollectionSymbolInvalid) @@ -143,10 +255,10 @@ fn full_flow() { { let submit_collection_resp = contract .submit_collection(default_collection.clone()) - .call(sender) + .call(SENDER) .unwrap(); - // Check event + // Check events let attrs = submit_collection_resp.custom_attrs(1); assert_eq!( attrs[0], @@ -155,9 +267,25 @@ fn full_flow() { value: "submit_collection".to_string() } ); + assert_eq!( + attrs[1], + Attribute { + key: "collection_id".to_string(), + value: COLLECTION_ID.to_string() + } + ); + assert_eq!( + attrs[2], + Attribute { + key: "owner".to_string(), + value: SENDER.to_string() + } + ); // Check created collection - let commited_collection = contract.get_collection_by_id("SYMBOL".to_string()).unwrap(); + let commited_collection = contract + .get_collection_by_id(COLLECTION_ID.to_string()) + .unwrap(); assert_eq!(commited_collection.name, default_collection.name); } @@ -165,7 +293,7 @@ fn full_flow() { { let err = contract .submit_collection(default_collection.clone()) - .call(sender) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::CollectionSymbolExists); @@ -177,8 +305,9 @@ fn full_flow() { .update_config(ConfigChanges { name: Some("test".to_string()), nft_code_id: Some(deployed_nft_code_id), - admin: Some(sender.to_string()), - owner: Some(sender.to_string()), + admin: Some(SENDER.to_string()), + owner: Some(SENDER.to_string()), + proposal_single_contract: Some(single_proposal_contract_addr.to_string()), }) .call("wrong_owner") .unwrap_err(); @@ -192,14 +321,15 @@ fn full_flow() { name: Some("test".to_string()), nft_code_id: Some(deployed_nft_code_id), admin: Some("deployer".to_string()), - owner: Some(sender.to_string()), + owner: Some(SENDER.to_string()), + proposal_single_contract: Some(single_proposal_contract_addr.to_string()), }) - .call(sender) + .call(SENDER) .unwrap(); let err = contract .deploy_collection("SYMBOL_NOT_EXIST".to_string()) - .call(sender) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::WrongDeployer) } @@ -210,15 +340,16 @@ fn full_flow() { .update_config(ConfigChanges { name: Some("test".to_string()), nft_code_id: Some(deployed_nft_code_id), - admin: Some(sender.to_string()), - owner: Some(sender.to_string()), + admin: Some(SENDER.to_string()), + owner: Some(SENDER.to_string()), + proposal_single_contract: Some(single_proposal_contract_addr.to_string()), }) - .call(sender) + .call(SENDER) .unwrap(); let err = contract .deploy_collection("SYMBOL_NOT_EXIST".to_string()) - .call(sender) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::CollectionNotFound) } @@ -226,8 +357,8 @@ fn full_flow() { // Deploy collection without merkle root --------------------------------------------------------- { let err = contract - .deploy_collection("SYMBOL".to_string()) - .call(sender) + .deploy_collection(COLLECTION_ID.to_string()) + .call(SENDER) .unwrap_err(); assert_eq!(err, ContractError::MerkleRootMissing) } @@ -236,7 +367,7 @@ fn full_flow() { { let new_merkle_root = "new merkle root"; let err = contract - .update_merkle_root("SYMBOL".to_string(), new_merkle_root.to_string()) + .update_merkle_root(COLLECTION_ID.to_string(), new_merkle_root.to_string()) .call("unauthorized") .unwrap_err(); @@ -246,12 +377,44 @@ fn full_flow() { // Update merkle root { let new_merkle_root = "new merkle root"; - contract - .update_merkle_root("SYMBOL".to_string(), new_merkle_root.to_string()) - .call(sender) + let resp = contract + .update_merkle_root(COLLECTION_ID.to_string(), new_merkle_root.to_string()) + .call(SENDER) .unwrap(); - let collection_after = contract.get_collection_by_id("SYMBOL".to_string()).unwrap(); + // Check events + assert_wasm_attr( + resp.clone(), + Attribute { + key: "action".to_string(), + value: "update_merkle_root".to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), + Attribute { + key: "merkle_root".to_string(), + value: new_merkle_root.to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), + Attribute { + key: "action".to_string(), + value: "execute_propose".to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), + Attribute { + key: "proposal_id".to_string(), + value: "1".to_string(), + }, + ); + + let collection_after = contract + .get_collection_by_id(COLLECTION_ID.to_string()) + .unwrap(); assert_eq!( collection_after.metadatas_merkle_root, @@ -265,10 +428,11 @@ fn full_flow() { .update_config(ConfigChanges { name: Some("test".to_string()), nft_code_id: Some(deployed_nft_code_id), - admin: Some(sender.to_string()), - owner: Some(sender.to_string()), + admin: Some(SENDER.to_string()), + owner: Some(SENDER.to_string()), + proposal_single_contract: Some(single_proposal_contract_addr.to_string()), }) - .call(sender) + .call(SENDER) .unwrap(); let resp = contract.get_config().unwrap(); @@ -277,22 +441,49 @@ fn full_flow() { // Deploy completed collection after update merkle root + nft code id --------------------------------------------------------- { - let collection_id = "SYMBOL".to_string(); + let deployed_collection_addr = "contract4"; let resp = contract - .deploy_collection(collection_id.to_owned()) - .call(sender) + .deploy_collection(COLLECTION_ID.to_owned()) + .call(SENDER) .unwrap(); - let attrs = resp.custom_attrs(1); - assert_eq!( - attrs[1], + + // Check events + assert_wasm_attr( + resp.clone(), + Attribute { + key: "action".to_string(), + value: "deploy_collection".to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), Attribute { key: "collection_id".to_string(), - value: "SYMBOL".to_string() - } + value: COLLECTION_ID.to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), + Attribute { + key: "action".to_string(), + value: "instantiate_collection".to_string(), + }, + ); + assert_wasm_attr( + resp.clone(), + Attribute { + key: "collection_addr".to_string(), + value: deployed_collection_addr.to_string(), + }, ); // Check deployed contract - let collection = contract.get_collection_by_id(collection_id).unwrap(); - assert_eq!(collection.deployed_address, Some("contract1".to_string())); + let collection = contract + .get_collection_by_id(COLLECTION_ID.to_string()) + .unwrap(); + assert_eq!( + collection.deployed_address, + Some(deployed_collection_addr.to_string()) + ); } } diff --git a/rust/cw-contracts/nft-launchpad/src/test_helpers.rs b/rust/cw-contracts/nft-launchpad/src/test_helpers.rs new file mode 100644 index 0000000000..cde9bd728c --- /dev/null +++ b/rust/cw-contracts/nft-launchpad/src/test_helpers.rs @@ -0,0 +1,25 @@ +use cosmwasm_std::Attribute; +use cw_multi_test::AppResponse; + +fn has_attr(given_attrs: &Vec, expected_attr: &Attribute) -> bool { + let resp = given_attrs + .iter() + .find(|item| item.key == expected_attr.key && item.value == expected_attr.value); + resp.is_some() +} + +pub fn assert_wasm_attr(resp: AppResponse, expected_attr: Attribute) { + let wasm_attrs: Vec = resp + .events + .iter() + .filter(|event| event.ty == "wasm") + .flat_map(|event| event.attributes.clone()) + .collect(); + + if !has_attr(&wasm_attrs, &expected_attr) { + panic!( + "Attribute not found. Wasm attrs: {:?} - Expected attr: {:?}", + wasm_attrs, expected_attr + ) + } +} diff --git a/rust/cw-contracts/nft-launchpad/src/utils.rs b/rust/cw-contracts/nft-launchpad/src/utils.rs new file mode 100644 index 0000000000..b3cd482e7c --- /dev/null +++ b/rust/cw-contracts/nft-launchpad/src/utils.rs @@ -0,0 +1,14 @@ +use cosmwasm_std::Event; + +pub fn get_events_values(ev: &Vec, ty: &str, key: &str) -> Vec { + ev.iter() + .filter(|v| v.ty == ty) + .map(|v| { + v.attributes + .iter() + .find(|vv| vv.key == key) + .map(|vv| vv.value.clone()) + }) + .filter_map(|v| v) + .collect() +}