diff --git a/.circleci/config.yml b/.circleci/config.yml index 87c65e9bf..0b299111a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ workflows: jobs: contract_sg721_base: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/collections/sg721-base steps: - checkout: @@ -41,7 +41,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg721-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg721-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -63,11 +63,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg721-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg721-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_sg721_nt: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/collections/sg721-nt steps: - checkout: @@ -77,7 +77,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg721-nt-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg721-nt-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -99,11 +99,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg721-nt-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg721-nt-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_base_factory: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/factories/base-factory steps: - checkout: @@ -113,7 +113,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-base-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-base-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -135,11 +135,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-base-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-base-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_base_minter: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/minters/base-minter steps: - checkout: @@ -149,7 +149,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-base-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-base-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -171,11 +171,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-base-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-base-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_vending_factory: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/factories/vending-factory steps: - checkout: @@ -185,7 +185,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-vending-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-vending-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -207,11 +207,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-vending-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-vending-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_vending_minter: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/minters/vending-minter steps: - checkout: @@ -221,7 +221,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-vending-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-vending-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -243,11 +243,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-vending-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-vending-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_open_edition_factory: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/factories/open-edition-factory steps: - checkout: @@ -257,7 +257,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-open-edition-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-open-edition-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -279,11 +279,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-open-edition-factory-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-open-edition-factory-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_open_edition_minter: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/minters/open-edition-minter steps: - checkout: @@ -293,7 +293,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-open-edition-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-open-edition-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -315,11 +315,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-open-edition-minter-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-open-edition-minter-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} contract_whitelist: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/whitelists/whitelist steps: - checkout: @@ -329,7 +329,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-whitelist-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-whitelist-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -351,10 +351,10 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-whitelist-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-whitelist-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} test-suite: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/test-suite steps: - checkout: @@ -364,7 +364,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-test-suite-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-test-suite-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -374,11 +374,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-test-suite-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-test-suite-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} package_sg_std: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/package/sg-std steps: - checkout: @@ -388,7 +388,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg-std-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg-std-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -398,11 +398,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg-std-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg-std-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} package_sg_utils: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/package/sg-utils steps: - checkout: @@ -412,7 +412,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg-utils-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg-utils-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -422,11 +422,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg-utils-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg-utils-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} sg-eth-airdrop: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 working_directory: ~/project/contracts/sg-eth-airdrop steps: - checkout: @@ -436,7 +436,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-sg-eth-airdrop-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-sg-eth-airdrop-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Unit Tests environment: @@ -458,11 +458,11 @@ jobs: paths: - /usr/local/cargo/registry - target - key: cargocache-sg-eth-airdrop-rust:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-sg-eth-airdrop-rust:1.75.0-{{ checksum "~/project/Cargo.lock" }} lint: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 steps: - checkout - run: @@ -470,7 +470,7 @@ jobs: command: rustc --version; cargo --version; rustup --version; rustup target list --installed - restore_cache: keys: - - cargocache-v2-lint-rust:1.74.0-{{ checksum "Cargo.lock" }} + - cargocache-v2-lint-rust:1.75.0-{{ checksum "Cargo.lock" }} - run: name: Add rustfmt component command: rustup component add rustfmt @@ -489,7 +489,7 @@ jobs: - target/debug/.fingerprint - target/debug/build - target/debug/deps - key: cargocache-v2-lint-rust:1.74.0-{{ checksum "Cargo.lock" }} + key: cargocache-v2-lint-rust:1.75.0-{{ checksum "Cargo.lock" }} # This runs one time on the top level to ensure all contracts compile properly into wasm. # We don't run the wasm build per contract build, and then reuse a lot of the same dependencies, so this speeds up CI time @@ -497,7 +497,7 @@ jobs: # We also sanity-check the resultant wasm files. wasm-build: docker: - - image: rust:1.74.0 + - image: rust:1.75.0 steps: - checkout: path: ~/project @@ -506,7 +506,7 @@ jobs: command: rustc --version; cargo --version; rustup --version - restore_cache: keys: - - cargocache-wasm-rust-no-wasm:1.74.0-{{ checksum "~/project/Cargo.lock" }} + - cargocache-wasm-rust-no-wasm:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Add wasm32 target command: rustup target add wasm32-unknown-unknown @@ -553,7 +553,7 @@ jobs: - /target/debug - /target/release - /target/tarpaulin - key: cargocache-wasm-rust-no-wasm:1.74.0-{{ checksum "~/project/Cargo.lock" }} + key: cargocache-wasm-rust-no-wasm:1.75.0-{{ checksum "~/project/Cargo.lock" }} - run: name: Check wasm contracts command: | diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8f514a7e9..f28d7f9e9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,7 +13,7 @@ jobs: env: GAS_OUT_DIR: gas_reports ENABLE_MAX_COLLECTION: true - GAS_LIMIT: 75000000 + GAS_LIMIT: 150000000 steps: - name: Checkout sources uses: actions/checkout@v3 diff --git a/Cargo.lock b/Cargo.lock index cba862644..0466c0804 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,24 +4,24 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", @@ -41,24 +41,24 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert_matches" @@ -79,28 +79,26 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener 5.0.0", - "event-listener-strategy 0.5.0", + "event-listener-strategy", "futures-core", "pin-project-lite", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec" dependencies = [ - "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", - "futures-lite 2.2.0", + "fastrand", + "futures-lite", "slab", ] @@ -110,89 +108,60 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 2.2.0", + "async-channel 2.3.1", "async-executor", - "async-io 2.3.1", - "async-lock 3.3.0", + "async-io", + "async-lock", "blocking", - "futures-lite 2.2.0", + "futures-lite", "once_cell", ] [[package]] name = "async-io" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" -dependencies = [ - "async-lock 2.8.0", - "autocfg", - "cfg-if", - "concurrent-queue", - "futures-lite 1.13.0", - "log", - "parking", - "polling 2.8.0", - "rustix 0.37.27", - "slab", - "socket2 0.4.10", - "waker-fn", -] - -[[package]] -name = "async-io" -version = "2.3.1" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ - "async-lock 3.3.0", + "async-lock", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "parking", - "polling 3.4.0", - "rustix 0.38.31", + "polling", + "rustix", "slab", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "async-lock" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" -dependencies = [ - "event-listener 2.5.3", -] - -[[package]] -name = "async-lock" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "event-listener 4.0.3", - "event-listener-strategy 0.4.0", + "event-listener 5.3.1", + "event-listener-strategy", "pin-project-lite", ] [[package]] name = "async-std" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" +checksum = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io 1.13.0", - "async-lock 2.8.0", + "async-io", + "async-lock", "crossbeam-utils", "futures-channel", "futures-core", "futures-io", - "futures-lite 1.13.0", + "futures-lite", "gloo-timers", "kv-log-macro", "log", @@ -223,24 +192,24 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "async-task" -version = "4.7.0" +version = "4.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -262,20 +231,20 @@ dependencies = [ [[package]] name = "auto_impl" -version = "1.1.2" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823b8bb275161044e2ac7a25879cb3e2480cb403e3943022c7c769c599b756aa" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" @@ -324,22 +293,22 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets", ] [[package]] name = "base-factory" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -357,7 +326,7 @@ dependencies = [ [[package]] name = "base-minter" -version = "3.14.0" +version = "3.15.0" dependencies = [ "base-factory", "cosmwasm-schema", @@ -478,9 +447,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -554,18 +523,15 @@ dependencies = [ [[package]] name = "blocking" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "async-channel 2.2.0", - "async-lock 3.3.0", + "async-channel 2.3.1", "async-task", - "fastrand 2.0.1", "futures-io", - "futures-lite 2.2.0", + "futures-lite", "piper", - "tracing", ] [[package]] @@ -576,9 +542,9 @@ checksum = "56953345e39537a3e18bdaeba4cb0c58a78c1f61f361dc0fa7c5c7340ae87c5f" [[package]] name = "borsh" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d4d6dafc1a3bb54687538972158f07b2c948bc57d5890df22c0739098b3028" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ "borsh-derive", "cfg_aliases", @@ -586,15 +552,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4918709cc4dd777ad2b6303ed03cb37f3ca0ccede8c1b0d28ac6db8f4710e0" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 2.0.2", + "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "syn_derive", ] @@ -609,9 +575,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -655,20 +621,20 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" dependencies = [ "serde", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "2d74707dde2ba56f86ae90effb3b43ddd369504387e718014de010cec7959800" dependencies = [ - "libc", + "shlex", ] [[package]] @@ -679,15 +645,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "num-traits", ] @@ -761,9 +727,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -814,9 +780,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cosm-orc" @@ -884,32 +850,31 @@ dependencies = [ [[package]] name = "cosmwasm-crypto" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9934c79e58d9676edfd592557dee765d2a6ef54c09d5aa2edb06156b00148966" +checksum = "0f862b355f7e47711e0acfe6af92cb3fd8fd5936b66a9eaa338b51edabd1e77d" dependencies = [ "digest 0.10.7", - "ecdsa 0.16.9", "ed25519-zebra", - "k256 0.13.1", + "k256 0.13.3", "rand_core 0.6.4", "thiserror", ] [[package]] name = "cosmwasm-derive" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5e72e330bd3bdab11c52b5ecbdeb6a8697a004c57964caeb5d876f0b088b3c" +checksum = "cd85de6467cd1073688c86b39833679ae6db18cf4771471edd9809f15f1679f1" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3e3a2136e2a60e8b6582f5dffca5d1a683ed77bf38537d330bc1dfccd69010" +checksum = "5b4cd28147a66eba73720b47636a58097a979ad8c8bfdb4ed437ebcbfe362576" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -920,9 +885,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5d803bea6bd9ed61bd1ee0b4a2eb09ee20dbb539cc6e0b8795614d20952ebb1" +checksum = "9acd45c63d41bc9b16bc6dc7f6bd604a8c2ad29ce96c8f3c96d7fc8ef384392e" dependencies = [ "proc-macro2", "quote", @@ -931,9 +896,9 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.5.3" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8666e572a3a2519010dde88c04d16e9339ae751b56b2bb35081fe3f7d6be74" +checksum = "2685c2182624b2e9e17f7596192de49a3f86b7a0c9a5f6b25c1df5e24592e836" dependencies = [ "base64 0.21.7", "bech32 0.9.1", @@ -953,18 +918,18 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1306,9 +1271,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1336,13 +1301,13 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -1383,13 +1348,13 @@ checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "e2e" -version = "3.14.0" +version = "3.15.0" dependencies = [ "assert_matches", "cosm-orc", @@ -1429,7 +1394,7 @@ version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.7.8", + "der 0.7.9", "digest 0.10.7", "elliptic-curve 0.13.8", "rfc6979 0.4.0", @@ -1475,9 +1440,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1548,9 +1513,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1628,7 +1593,7 @@ dependencies = [ [[package]] name = "ethereum-verify" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1692,43 +1657,22 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.3" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" dependencies = [ "concurrent-queue", "parking", "pin-project-lite", ] -[[package]] -name = "event-listener" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72557800024fabbaa2449dd4bf24e37b93702d457a4d4f2b0dd1f0f039f20c1" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" -dependencies = [ - "event-listener 4.0.3", - "pin-project-lite", -] - [[package]] name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ - "event-listener 5.0.0", + "event-listener 5.3.1", "pin-project-lite", ] @@ -1750,18 +1694,9 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fastrand" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] - -[[package]] -name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "ff" @@ -1882,26 +1817,11 @@ checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" -version = "1.13.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 1.9.0", - "futures-core", - "futures-io", - "memchr", - "parking", - "pin-project-lite", - "waker-fn", -] - -[[package]] -name = "futures-lite" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" -dependencies = [ - "fastrand 2.0.1", + "fastrand", "futures-core", "futures-io", "parking", @@ -1916,7 +1836,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -1971,9 +1891,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1984,15 +1904,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "gloo-timers" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" dependencies = [ "futures-channel", "futures-core", @@ -2024,9 +1944,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -2034,7 +1954,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.3", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2052,9 +1972,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "headers" @@ -2097,9 +2017,15 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.5" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -2118,9 +2044,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2140,9 +2066,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2158,9 +2084,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2173,7 +2099,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio", "tower-service", "tracing", @@ -2295,12 +2221,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown 0.14.5", ] [[package]] @@ -2312,26 +2238,6 @@ dependencies = [ "generic-array 0.14.7", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.5", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "itertools" version = "0.10.5" @@ -2343,15 +2249,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2382,9 +2288,9 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa 0.16.9", @@ -2414,15 +2320,15 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "linked-hash-map" @@ -2432,21 +2338,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "value-bag", ] @@ -2459,9 +2359,9 @@ checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" @@ -2477,22 +2377,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] name = "mio" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2524,37 +2425,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.5", - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "33ea5043e58958ee56f3e15a90aee535795cd7dfd319846288d93c5b57d85cbe" [[package]] name = "opaque-debug" @@ -2564,13 +2455,13 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "open-edition-factory" -version = "3.14.0" +version = "3.15.0" dependencies = [ "base-factory", "cosmwasm-schema", @@ -2589,7 +2480,7 @@ dependencies = [ [[package]] name = "open-edition-minter" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -2611,9 +2502,34 @@ dependencies = [ "url", ] +[[package]] +name = "open-edition-minter-merkle-wl" +version = "3.15.0" +dependencies = [ + "cosmwasm-schema", + "cosmwasm-std", + "cw-storage-plus 1.2.0", + "cw-utils 1.0.3", + "cw2 1.1.2", + "cw721-base 0.18.0", + "open-edition-factory", + "semver", + "serde", + "sg-metadata", + "sg-std", + "sg-whitelist", + "sg1", + "sg2", + "sg4", + "sg721", + "thiserror", + "url", + "whitelist-mtree", +] + [[package]] name = "open-edition-minter-wl-flex" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -2678,9 +2594,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" +checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ "arrayvec", "bitvec 1.0.1", @@ -2692,11 +2608,11 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.9" +version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 2.0.2", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -2704,9 +2620,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "password-hash" @@ -2721,9 +2637,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -2778,9 +2694,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "9c73c26c01b8c87956cea613c907c9d6ecffd8d18a2a5908e5de0adfaa185cea" dependencies = [ "memchr", "thiserror", @@ -2789,9 +2705,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.7" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +checksum = "664d22978e2815783adbdd2c588b455b1bd625299ce36b2a99881ac9627e6d8d" dependencies = [ "pest", "pest_generator", @@ -2799,22 +2715,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.7" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +checksum = "a2d5487022d5d33f4c30d91c22afa240ce2a644e87fe08caad974d4eab6badbe" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "pest_meta" -version = "2.7.7" +version = "2.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +checksum = "0091754bbd0ea592c4deb3a122ce8ecbb0753b738aa82bc055fcc2eccc8d8174" dependencies = [ "once_cell", "pest", @@ -2823,29 +2739,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2855,12 +2771,12 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand", "futures-io", ] @@ -2880,38 +2796,23 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.8", + "der 0.7.9", "spki 0.7.3", ] [[package]] name = "polling" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" -dependencies = [ - "autocfg", - "bitflags 1.3.2", - "cfg-if", - "concurrent-queue", - "libc", - "log", - "pin-project-lite", - "windows-sys 0.48.0", -] - -[[package]] -name = "polling" -version = "3.4.0" +version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.4.0", "pin-project-lite", - "rustix 0.38.31", + "rustix", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2922,9 +2823,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "primitive-types" @@ -2942,22 +2846,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.2" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -2985,9 +2878,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3069,9 +2962,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3135,9 +3028,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3147,9 +3040,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3158,9 +3051,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rend" @@ -3224,14 +3117,14 @@ checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" dependencies = [ "block-buffer 0.9.0", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec 1.0.1", "bytecheck", @@ -3242,14 +3135,14 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.7.0", + "uuid 1.10.0", ] [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -3309,9 +3202,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.34.3" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39449a79f45e8da28c57c341891b69a183044b29518bb8f86dbac9df60bb7df" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "borsh", @@ -3325,9 +3218,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hex" @@ -3337,28 +3230,14 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.37.27" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys 0.4.13", + "linux-raw-sys", "windows-sys 0.52.0", ] @@ -3389,15 +3268,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -3419,9 +3298,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" dependencies = [ "cfg-if", "derive_more", @@ -3431,11 +3310,11 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.10.0" +version = "2.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" dependencies = [ - "proc-macro-crate 1.3.1", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -3443,18 +3322,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" dependencies = [ "dyn-clone", "schemars_derive", @@ -3464,14 +3343,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] @@ -3523,7 +3402,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", - "der 0.7.8", + "der 0.7.9", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -3532,11 +3411,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3545,9 +3424,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3555,15 +3434,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] @@ -3579,60 +3458,61 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_repr" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "sg-controllers" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3646,7 +3526,7 @@ dependencies = [ [[package]] name = "sg-eth-airdrop" -version = "3.14.0" +version = "3.15.0" dependencies = [ "anyhow", "async-std", @@ -3681,7 +3561,7 @@ dependencies = [ [[package]] name = "sg-metadata" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "schemars", @@ -3690,7 +3570,7 @@ dependencies = [ [[package]] name = "sg-mint-hooks" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3729,7 +3609,7 @@ dependencies = [ [[package]] name = "sg-splits" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3762,7 +3642,7 @@ dependencies = [ [[package]] name = "sg-whitelist" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3779,7 +3659,7 @@ dependencies = [ [[package]] name = "sg-whitelist-flex" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3796,7 +3676,7 @@ dependencies = [ [[package]] name = "sg1" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-std", "cw-utils 1.0.3", @@ -3807,7 +3687,7 @@ dependencies = [ [[package]] name = "sg2" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3821,7 +3701,7 @@ dependencies = [ [[package]] name = "sg4" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3832,7 +3712,7 @@ dependencies = [ [[package]] name = "sg721" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3846,7 +3726,7 @@ dependencies = [ [[package]] name = "sg721-base" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3865,7 +3745,7 @@ dependencies = [ [[package]] name = "sg721-metadata-onchain" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3883,7 +3763,7 @@ dependencies = [ [[package]] name = "sg721-nt" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3900,7 +3780,7 @@ dependencies = [ [[package]] name = "sg721-updatable" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -3953,7 +3833,7 @@ dependencies = [ "cfg-if", "cpufeatures", "digest 0.9.0", - "opaque-debug 0.3.0", + "opaque-debug 0.3.1", ] [[package]] @@ -3977,6 +3857,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "shuffle" version = "0.1.7" @@ -4023,22 +3909,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4064,7 +3940,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der 0.7.8", + "der 0.7.9", ] [[package]] @@ -4097,9 +3973,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "subtle-encoding" @@ -4123,9 +3999,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -4141,7 +4017,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -4264,9 +4140,9 @@ dependencies = [ [[package]] name = "test-context" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055831a02a4f5aa28fede67f2902014273eb8c21b958ac5ebbd59b71ef30dbc3" +checksum = "b7b6965c21232186af0092233c18030fe607cfc3960dbabb209325272458eeea" dependencies = [ "async-trait", "futures", @@ -4275,17 +4151,17 @@ dependencies = [ [[package]] name = "test-context-macros" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901a55b0a7a06ebc4a674dcca925170da8e613fa3b163a1df804ed10afb154d" +checksum = "d506c7664333e246f564949bee4ed39062aa0f11918e6f5a95f553cdad65c274" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.77", ] [[package]] name = "test-suite" -version = "3.14.0" +version = "3.15.0" dependencies = [ "anyhow", "async-std", @@ -4340,29 +4216,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "num-conv", @@ -4380,9 +4256,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", @@ -4399,9 +4275,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -4414,19 +4290,18 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "pin-project-lite", - "socket2 0.5.5", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4441,13 +4316,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -4463,9 +4338,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -4474,16 +4349,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -4497,28 +4371,17 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.3", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.2.3", + "indexmap 2.5.0", "toml_datetime", "winnow", ] @@ -4577,15 +4440,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -4606,7 +4469,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] [[package]] @@ -4666,30 +4529,30 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "untrusted" @@ -4699,9 +4562,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -4720,19 +4583,19 @@ dependencies = [ [[package]] name = "uuid" -version = "1.7.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" [[package]] name = "value-bag" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" +checksum = "5a84c137d37ab0142f0f2ddfe332651fdbf252e7b7dbb4e67b6c1f1b2e925101" [[package]] name = "vending-factory" -version = "3.14.0" +version = "3.15.0" dependencies = [ "base-factory", "cosmwasm-schema", @@ -4752,7 +4615,7 @@ dependencies = [ [[package]] name = "vending-minter" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4781,7 +4644,7 @@ dependencies = [ [[package]] name = "vending-minter-featured" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4810,7 +4673,7 @@ dependencies = [ [[package]] name = "vending-minter-merkle-wl" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4840,7 +4703,7 @@ dependencies = [ [[package]] name = "vending-minter-merkle-wl-featured" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4870,7 +4733,7 @@ dependencies = [ [[package]] name = "vending-minter-wl-flex" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4899,7 +4762,7 @@ dependencies = [ [[package]] name = "vending-minter-wl-flex-featured" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -4928,21 +4791,15 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "waker-fn" -version = "1.1.1" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -4965,34 +4822,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5002,9 +4860,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5012,28 +4870,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5060,7 +4918,7 @@ dependencies = [ [[package]] name = "whitelist-immutable" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -5077,7 +4935,7 @@ dependencies = [ [[package]] name = "whitelist-mtree" -version = "3.14.0" +version = "3.15.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -5115,11 +4973,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5128,143 +4986,93 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets", ] [[package]] -name = "windows-targets" -version = "0.48.5" +name = "windows-sys" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "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.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] -name = "windows_i686_gnu" -version = "0.52.0" +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -5287,11 +5095,32 @@ dependencies = [ "linked-hash-map", ] +[[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.77", +] + [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -5304,5 +5133,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.77", ] diff --git a/Cargo.toml b/Cargo.toml index c0b2a5e6b..cca0d98c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ resolver = "2" [workspace.package] -version = "3.14.0" +version = "3.15.0" rust-version = "1.73.0" edition = "2021" homepage = "https://stargaze.zone" diff --git a/Makefile b/Makefile index 1da438363..42a1633bf 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: deploy-local e2etest e2etest-full lint optimize publish-packages publish-contracts schema release TEST_ADDRS ?= $(shell jq -r '.[].address' ./e2e/configs/test_accounts.json | tr '\n' ' ') -GAS_LIMIT ?= "75000000" +GAS_LIMIT ?= "150000000" deploy-local: docker kill stargaze || true diff --git a/contracts/minters/open-edition-minter-merkle-wl/.cargo/config b/contracts/minters/open-edition-minter-merkle-wl/.cargo/config new file mode 100644 index 000000000..ab407a024 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/.cargo/config @@ -0,0 +1,4 @@ +[alias] +wasm = "build --release --lib --target wasm32-unknown-unknown" +unit-test = "test --lib" +schema = "run --example schema" diff --git a/contracts/minters/open-edition-minter-merkle-wl/.editorconfig b/contracts/minters/open-edition-minter-merkle-wl/.editorconfig new file mode 100644 index 000000000..3d36f20b1 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/.editorconfig @@ -0,0 +1,11 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.rs] +indent_size = 4 diff --git a/contracts/minters/open-edition-minter-merkle-wl/.gitignore b/contracts/minters/open-edition-minter-merkle-wl/.gitignore new file mode 100644 index 000000000..dfdaaa6bc --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/.gitignore @@ -0,0 +1,15 @@ +# Build results +/target + +# Cargo+Git helper file (https://github.com/rust-lang/cargo/blob/0.44.1/src/cargo/sources/git/utils.rs#L320-L327) +.cargo-ok + +# Text file backups +**/*.rs.bk + +# macOS +.DS_Store + +# IDEs +*.iml +.idea diff --git a/contracts/minters/open-edition-minter-merkle-wl/Cargo.toml b/contracts/minters/open-edition-minter-merkle-wl/Cargo.toml new file mode 100644 index 000000000..63cae44e7 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/Cargo.toml @@ -0,0 +1,47 @@ +[package] +name = "open-edition-minter-merkle-wl" +authors = ["Racoon Supply "] +description = "Stargaze open edition minter contract" +version = { workspace = true } +edition = { workspace = true } +homepage = { workspace = true } +repository = { workspace = true } +license = { workspace = true } + +exclude = [ + # Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication. + "contract.wasm", + "hash.txt", +] + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[lib] +crate-type = ["cdylib", "rlib"] + +[features] +# for more explicit tests, cargo test --features=backtraces +backtraces = ["cosmwasm-std/backtraces"] +# use library feature to disable all instantiate/execute/query exports +library = [] + +[dependencies] +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } +cw2 = { workspace = true } +cw721-base = { workspace = true, features = ["library"] } +cw-storage-plus = { workspace = true } +cw-utils = { workspace = true } +serde = { workspace = true } +sg1 = { workspace = true } +sg2 = { workspace = true } +sg4 = { workspace = true } +sg721 = { workspace = true } +sg-std = { workspace = true } +sg-whitelist = { workspace = true, features = ["library"] } +whitelist-mtree = { workspace = true, features = ["library"] } +sg-metadata = { workspace = true } +thiserror = { workspace = true } +url = { workspace = true } +open-edition-factory = { workspace = true, features = ["library"] } +semver = {workspace = true } diff --git a/contracts/minters/open-edition-minter-merkle-wl/LICENSE b/contracts/minters/open-edition-minter-merkle-wl/LICENSE new file mode 100644 index 000000000..1520ce81b --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2022 Public Awesome + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/contracts/minters/open-edition-minter-merkle-wl/README.md b/contracts/minters/open-edition-minter-merkle-wl/README.md new file mode 100644 index 000000000..1a2318413 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/README.md @@ -0,0 +1,6 @@ +# Stargaze Open Edition Minter Contract with Merkle Tree Whitelist Compatibility + +An Open Edition minter will mint 1 pre-defined NFT and the metadata can be on-chain and off-chain. + +There is a maximum number of nft an address can mint and there are fees to be considered when the metadata is stored on-chain. +There is also a 2% fees that is given to the developers of this minter. These fees happen when the `mint` method is used. diff --git a/contracts/minters/open-edition-minter-merkle-wl/examples/schema.rs b/contracts/minters/open-edition-minter-merkle-wl/examples/schema.rs new file mode 100644 index 000000000..0245802c8 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/examples/schema.rs @@ -0,0 +1,29 @@ +use std::env::current_dir; +use std::fs::create_dir_all; + +use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; + +use open_edition_minter_merkle_wl::msg::{ + ConfigResponse, ExecuteMsg, InstantiateMsg, MintCountResponse, MintPriceResponse, + MintableNumTokensResponse, QueryMsg, StartTimeResponse, +}; +use open_edition_minter_merkle_wl::state::Config; +use sg4::StatusResponse; + +fn main() { + let mut out_dir = current_dir().unwrap(); + out_dir.push("schema"); + create_dir_all(&out_dir).unwrap(); + remove_schemas(&out_dir).unwrap(); + + export_schema(&schema_for!(InstantiateMsg), &out_dir); + export_schema(&schema_for!(ExecuteMsg), &out_dir); + export_schema(&schema_for!(QueryMsg), &out_dir); + export_schema(&schema_for!(Config), &out_dir); + export_schema(&schema_for!(ConfigResponse), &out_dir); + export_schema(&schema_for!(MintableNumTokensResponse), &out_dir); + export_schema(&schema_for!(MintCountResponse), &out_dir); + export_schema(&schema_for!(StartTimeResponse), &out_dir); + export_schema(&schema_for!(MintPriceResponse), &out_dir); + export_schema(&schema_for!(StatusResponse), &out_dir); +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/rustfmt.toml b/contracts/minters/open-edition-minter-merkle-wl/rustfmt.toml new file mode 100644 index 000000000..11a85e6a9 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/rustfmt.toml @@ -0,0 +1,15 @@ +# stable +newline_style = "unix" +hard_tabs = false +tab_spaces = 4 + +# unstable... should we require `rustup run nightly cargo fmt` ? +# or just update the style guide when they are stable? +#fn_single_line = true +#format_code_in_doc_comments = true +#overflow_delimited_expr = true +#reorder_impl_items = true +#struct_field_align_threshold = 20 +#struct_lit_single_line = true +#report_todo = "Always" + diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/config_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/config_response.json new file mode 100644 index 000000000..76f0ee214 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/config_response.json @@ -0,0 +1,248 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ConfigResponse", + "type": "object", + "required": [ + "admin", + "factory", + "mint_price", + "nft_data", + "per_address_limit", + "sg721_address", + "sg721_code_id", + "start_time" + ], + "properties": { + "admin": { + "type": "string" + }, + "end_time": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "factory": { + "type": "string" + }, + "mint_price": { + "$ref": "#/definitions/Coin" + }, + "nft_data": { + "$ref": "#/definitions/NftData" + }, + "num_tokens": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "payment_address": { + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + }, + "per_address_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "sg721_address": { + "type": "string" + }, + "sg721_code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "start_time": { + "$ref": "#/definitions/Timestamp" + }, + "whitelist": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false, + "definitions": { + "Addr": { + "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Metadata": { + "description": "OpenSea metadata standard, used by Stargaze marketplace. See [this link](https://docs.opensea.io/docs/metadata-standards) for details.", + "type": "object", + "properties": { + "animation_url": { + "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n\nAnimation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", + "type": [ + "string", + "null" + ] + }, + "attributes": { + "description": "These are the attributes for the item, which will show up on the OpenSea page for the item.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Trait" + } + }, + "background_color": { + "description": "Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A human readable description of the item. Markdown is supported.", + "type": [ + "string", + "null" + ] + }, + "external_url": { + "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", + "type": [ + "string", + "null" + ] + }, + "image": { + "description": "This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by OpenSea), and can be [IPFS](https://github.com/ipfs/is-ipfs) URLs or paths. We recommend using a 350 x 350 image.", + "type": [ + "string", + "null" + ] + }, + "image_data": { + "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the `image` parameter.", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the item.", + "type": [ + "string", + "null" + ] + }, + "youtube_url": { + "description": "A URL to a YouTube video.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "NftData": { + "type": "object", + "required": [ + "nft_data_type" + ], + "properties": { + "extension": { + "anyOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "nft_data_type": { + "$ref": "#/definitions/NftMetadataType" + }, + "token_uri": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "NftMetadataType": { + "type": "string", + "enum": [ + "on_chain_metadata", + "off_chain_metadata" + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Trait": { + "description": "An attribute of the token as defined by the [OpenSea metadata standard](https://docs.opensea.io/docs/metadata-standards#attributes).", + "type": "object", + "required": [ + "trait_type", + "value" + ], + "properties": { + "display_type": { + "type": [ + "string", + "null" + ] + }, + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/execute_msg.json b/contracts/minters/open-edition-minter-merkle-wl/schema/execute_msg.json new file mode 100644 index 000000000..1bbec3afc --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/execute_msg.json @@ -0,0 +1,210 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "ExecuteMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "mint" + ], + "properties": { + "mint": { + "type": "object", + "required": [ + "proof_hashes" + ], + "properties": { + "allocation": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "proof_hashes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "set_whitelist" + ], + "properties": { + "set_whitelist": { + "type": "object", + "required": [ + "whitelist" + ], + "properties": { + "whitelist": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "purge" + ], + "properties": { + "purge": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_mint_price" + ], + "properties": { + "update_mint_price": { + "type": "object", + "required": [ + "price" + ], + "properties": { + "price": { + "type": "integer", + "format": "uint128", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_start_time" + ], + "properties": { + "update_start_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_end_time" + ], + "properties": { + "update_end_time": { + "$ref": "#/definitions/Timestamp" + } + }, + "additionalProperties": false + }, + { + "description": "Runs custom checks against TradingStartTime on VendingMinter, then updates by calling sg721-base", + "type": "object", + "required": [ + "update_start_trading_time" + ], + "properties": { + "update_start_trading_time": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "update_per_address_limit" + ], + "properties": { + "update_per_address_limit": { + "type": "object", + "required": [ + "per_address_limit" + ], + "properties": { + "per_address_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "mint_to" + ], + "properties": { + "mint_to": { + "type": "object", + "required": [ + "recipient" + ], + "properties": { + "recipient": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "burn_remaining" + ], + "properties": { + "burn_remaining": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ], + "definitions": { + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/instantiate_msg.json b/contracts/minters/open-edition-minter-merkle-wl/schema/instantiate_msg.json new file mode 100644 index 000000000..0c8e8524d --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/instantiate_msg.json @@ -0,0 +1,440 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "InstantiateMsg", + "type": "object", + "required": [ + "create_msg", + "params" + ], + "properties": { + "create_msg": { + "$ref": "#/definitions/CreateMinterMsg_for_OpenEditionMinterInitMsgExtension" + }, + "params": { + "$ref": "#/definitions/MinterParams_for_ParamsExtension" + } + }, + "additionalProperties": false, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "CollectionInfo_for_RoyaltyInfoResponse": { + "type": "object", + "required": [ + "creator", + "description", + "image" + ], + "properties": { + "creator": { + "type": "string" + }, + "description": { + "type": "string" + }, + "explicit_content": { + "type": [ + "boolean", + "null" + ] + }, + "external_link": { + "type": [ + "string", + "null" + ] + }, + "image": { + "type": "string" + }, + "royalty_info": { + "anyOf": [ + { + "$ref": "#/definitions/RoyaltyInfoResponse" + }, + { + "type": "null" + } + ] + }, + "start_trading_time": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "CollectionParams": { + "type": "object", + "required": [ + "code_id", + "info", + "name", + "symbol" + ], + "properties": { + "code_id": { + "description": "The collection code id", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "info": { + "$ref": "#/definitions/CollectionInfo_for_RoyaltyInfoResponse" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + } + }, + "additionalProperties": false + }, + "CreateMinterMsg_for_OpenEditionMinterInitMsgExtension": { + "type": "object", + "required": [ + "collection_params", + "init_msg" + ], + "properties": { + "collection_params": { + "$ref": "#/definitions/CollectionParams" + }, + "init_msg": { + "$ref": "#/definitions/OpenEditionMinterInitMsgExtension" + } + }, + "additionalProperties": false + }, + "Decimal": { + "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)", + "type": "string" + }, + "Metadata": { + "description": "OpenSea metadata standard, used by Stargaze marketplace. See [this link](https://docs.opensea.io/docs/metadata-standards) for details.", + "type": "object", + "properties": { + "animation_url": { + "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n\nAnimation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", + "type": [ + "string", + "null" + ] + }, + "attributes": { + "description": "These are the attributes for the item, which will show up on the OpenSea page for the item.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Trait" + } + }, + "background_color": { + "description": "Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A human readable description of the item. Markdown is supported.", + "type": [ + "string", + "null" + ] + }, + "external_url": { + "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", + "type": [ + "string", + "null" + ] + }, + "image": { + "description": "This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by OpenSea), and can be [IPFS](https://github.com/ipfs/is-ipfs) URLs or paths. We recommend using a 350 x 350 image.", + "type": [ + "string", + "null" + ] + }, + "image_data": { + "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the `image` parameter.", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the item.", + "type": [ + "string", + "null" + ] + }, + "youtube_url": { + "description": "A URL to a YouTube video.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "MinterParams_for_ParamsExtension": { + "description": "Common params for all minters used for storage", + "type": "object", + "required": [ + "allowed_sg721_code_ids", + "code_id", + "creation_fee", + "extension", + "frozen", + "max_trading_offset_secs", + "min_mint_price", + "mint_fee_bps" + ], + "properties": { + "allowed_sg721_code_ids": { + "type": "array", + "items": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "code_id": { + "description": "The minter code id", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "creation_fee": { + "$ref": "#/definitions/Coin" + }, + "extension": { + "$ref": "#/definitions/ParamsExtension" + }, + "frozen": { + "type": "boolean" + }, + "max_trading_offset_secs": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "min_mint_price": { + "$ref": "#/definitions/Coin" + }, + "mint_fee_bps": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "NftData": { + "type": "object", + "required": [ + "nft_data_type" + ], + "properties": { + "extension": { + "anyOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "nft_data_type": { + "$ref": "#/definitions/NftMetadataType" + }, + "token_uri": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "NftMetadataType": { + "type": "string", + "enum": [ + "on_chain_metadata", + "off_chain_metadata" + ] + }, + "OpenEditionMinterInitMsgExtension": { + "type": "object", + "required": [ + "mint_price", + "nft_data", + "per_address_limit", + "start_time" + ], + "properties": { + "end_time": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "mint_price": { + "$ref": "#/definitions/Coin" + }, + "nft_data": { + "$ref": "#/definitions/NftData" + }, + "num_tokens": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "payment_address": { + "type": [ + "string", + "null" + ] + }, + "per_address_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "start_time": { + "$ref": "#/definitions/Timestamp" + }, + "whitelist": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "ParamsExtension": { + "type": "object", + "required": [ + "airdrop_mint_fee_bps", + "airdrop_mint_price", + "dev_fee_address", + "max_per_address_limit", + "max_token_limit" + ], + "properties": { + "airdrop_mint_fee_bps": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "airdrop_mint_price": { + "$ref": "#/definitions/Coin" + }, + "dev_fee_address": { + "type": "string" + }, + "max_per_address_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "max_token_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false + }, + "RoyaltyInfoResponse": { + "type": "object", + "required": [ + "payment_address", + "share" + ], + "properties": { + "payment_address": { + "type": "string" + }, + "share": { + "$ref": "#/definitions/Decimal" + } + }, + "additionalProperties": false + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Trait": { + "description": "An attribute of the token as defined by the [OpenSea metadata standard](https://docs.opensea.io/docs/metadata-standards#attributes).", + "type": "object", + "required": [ + "trait_type", + "value" + ], + "properties": { + "display_type": { + "type": [ + "string", + "null" + ] + }, + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/mint_count_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/mint_count_response.json new file mode 100644 index 000000000..8cb578300 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/mint_count_response.json @@ -0,0 +1,20 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MintCountResponse", + "type": "object", + "required": [ + "address", + "count" + ], + "properties": { + "address": { + "type": "string" + }, + "count": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/mint_price_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/mint_price_response.json new file mode 100644 index 000000000..5df14b3ff --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/mint_price_response.json @@ -0,0 +1,53 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MintPriceResponse", + "type": "object", + "required": [ + "airdrop_price", + "current_price", + "public_price" + ], + "properties": { + "airdrop_price": { + "$ref": "#/definitions/Coin" + }, + "current_price": { + "$ref": "#/definitions/Coin" + }, + "public_price": { + "$ref": "#/definitions/Coin" + }, + "whitelist_price": { + "anyOf": [ + { + "$ref": "#/definitions/Coin" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "definitions": { + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/mintable_num_tokens_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/mintable_num_tokens_response.json new file mode 100644 index 000000000..01e65ad4d --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/mintable_num_tokens_response.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MintableNumTokensResponse", + "type": "object", + "properties": { + "count": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + } + }, + "additionalProperties": false +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/minter_config_for__config_extension.json b/contracts/minters/open-edition-minter-merkle-wl/schema/minter_config_for__config_extension.json new file mode 100644 index 000000000..72ab619af --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/minter_config_for__config_extension.json @@ -0,0 +1,261 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "MinterConfig_for_ConfigExtension", + "description": "Saved in every minter", + "type": "object", + "required": [ + "collection_code_id", + "extension", + "factory", + "mint_price" + ], + "properties": { + "collection_code_id": { + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "extension": { + "$ref": "#/definitions/ConfigExtension" + }, + "factory": { + "$ref": "#/definitions/Addr" + }, + "mint_price": { + "$ref": "#/definitions/Coin" + } + }, + "additionalProperties": false, + "definitions": { + "Addr": { + "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", + "type": "string" + }, + "Coin": { + "type": "object", + "required": [ + "amount", + "denom" + ], + "properties": { + "amount": { + "$ref": "#/definitions/Uint128" + }, + "denom": { + "type": "string" + } + } + }, + "ConfigExtension": { + "type": "object", + "required": [ + "admin", + "nft_data", + "per_address_limit", + "start_time" + ], + "properties": { + "admin": { + "$ref": "#/definitions/Addr" + }, + "end_time": { + "anyOf": [ + { + "$ref": "#/definitions/Timestamp" + }, + { + "type": "null" + } + ] + }, + "nft_data": { + "$ref": "#/definitions/NftData" + }, + "num_tokens": { + "type": [ + "integer", + "null" + ], + "format": "uint32", + "minimum": 0.0 + }, + "payment_address": { + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + }, + "per_address_limit": { + "type": "integer", + "format": "uint32", + "minimum": 0.0 + }, + "start_time": { + "$ref": "#/definitions/Timestamp" + }, + "whitelist": { + "anyOf": [ + { + "$ref": "#/definitions/Addr" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false + }, + "Metadata": { + "description": "OpenSea metadata standard, used by Stargaze marketplace. See [this link](https://docs.opensea.io/docs/metadata-standards) for details.", + "type": "object", + "properties": { + "animation_url": { + "description": "A URL to a multi-media attachment for the item. The file extensions GLTF, GLB, WEBM, MP4, M4V, OGV, and OGG are supported, along with the audio-only extensions MP3, WAV, and OGA.\n\nAnimation_url also supports HTML pages, allowing you to build rich experiences and interactive NFTs using JavaScript canvas, WebGL, and more. Scripts and relative paths within the HTML page are now supported. However, access to browser extensions is not supported.", + "type": [ + "string", + "null" + ] + }, + "attributes": { + "description": "These are the attributes for the item, which will show up on the OpenSea page for the item.", + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/Trait" + } + }, + "background_color": { + "description": "Background color of the item on OpenSea. Must be a six-character hexadecimal without a pre-pended #.", + "type": [ + "string", + "null" + ] + }, + "description": { + "description": "A human readable description of the item. Markdown is supported.", + "type": [ + "string", + "null" + ] + }, + "external_url": { + "description": "This is the URL that will appear below the asset's image on OpenSea and will allow users to leave OpenSea and view the item on your site.", + "type": [ + "string", + "null" + ] + }, + "image": { + "description": "This is the URL to the image of the item. Can be just about any type of image (including SVGs, which will be cached into PNGs by OpenSea), and can be [IPFS](https://github.com/ipfs/is-ipfs) URLs or paths. We recommend using a 350 x 350 image.", + "type": [ + "string", + "null" + ] + }, + "image_data": { + "description": "Raw SVG image data, if you want to generate images on the fly (not recommended). Only use this if you're not including the `image` parameter.", + "type": [ + "string", + "null" + ] + }, + "name": { + "description": "Name of the item.", + "type": [ + "string", + "null" + ] + }, + "youtube_url": { + "description": "A URL to a YouTube video.", + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "NftData": { + "type": "object", + "required": [ + "nft_data_type" + ], + "properties": { + "extension": { + "anyOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] + }, + "nft_data_type": { + "$ref": "#/definitions/NftMetadataType" + }, + "token_uri": { + "type": [ + "string", + "null" + ] + } + }, + "additionalProperties": false + }, + "NftMetadataType": { + "type": "string", + "enum": [ + "on_chain_metadata", + "off_chain_metadata" + ] + }, + "Timestamp": { + "description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```", + "allOf": [ + { + "$ref": "#/definitions/Uint64" + } + ] + }, + "Trait": { + "description": "An attribute of the token as defined by the [OpenSea metadata standard](https://docs.opensea.io/docs/metadata-standards#attributes).", + "type": "object", + "required": [ + "trait_type", + "value" + ], + "properties": { + "display_type": { + "type": [ + "string", + "null" + ] + }, + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "additionalProperties": false + }, + "Uint128": { + "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", + "type": "string" + }, + "Uint64": { + "description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```", + "type": "string" + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/query_msg.json b/contracts/minters/open-edition-minter-merkle-wl/schema/query_msg.json new file mode 100644 index 000000000..0bcc3dcc0 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/query_msg.json @@ -0,0 +1,118 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "QueryMsg", + "oneOf": [ + { + "type": "object", + "required": [ + "config" + ], + "properties": { + "config": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "start_time" + ], + "properties": { + "start_time": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "end_time" + ], + "properties": { + "end_time": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "mint_price" + ], + "properties": { + "mint_price": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "mint_count" + ], + "properties": { + "mint_count": { + "type": "object", + "required": [ + "address" + ], + "properties": { + "address": { + "type": "string" + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "total_mint_count" + ], + "properties": { + "total_mint_count": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + }, + { + "type": "object", + "required": [ + "mintable_num_tokens" + ], + "properties": { + "mintable_num_tokens": { + "type": "object", + "additionalProperties": false + } + }, + "additionalProperties": false + } + ] +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/start_time_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/start_time_response.json new file mode 100644 index 000000000..40a03518d --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/start_time_response.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "StartTimeResponse", + "type": "object", + "required": [ + "start_time" + ], + "properties": { + "start_time": { + "type": "string" + } + }, + "additionalProperties": false +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/schema/status_response.json b/contracts/minters/open-edition-minter-merkle-wl/schema/status_response.json new file mode 100644 index 000000000..dfcf3dc33 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/schema/status_response.json @@ -0,0 +1,36 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "StatusResponse", + "type": "object", + "required": [ + "status" + ], + "properties": { + "status": { + "$ref": "#/definitions/Status" + } + }, + "additionalProperties": false, + "definitions": { + "Status": { + "type": "object", + "required": [ + "is_blocked", + "is_explicit", + "is_verified" + ], + "properties": { + "is_blocked": { + "type": "boolean" + }, + "is_explicit": { + "type": "boolean" + }, + "is_verified": { + "type": "boolean" + } + }, + "additionalProperties": false + } + } +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/contract.rs b/contracts/minters/open-edition-minter-merkle-wl/src/contract.rs new file mode 100644 index 000000000..94a02e82c --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/contract.rs @@ -0,0 +1,1120 @@ +use crate::error::ContractError; +use crate::helpers::mint_nft_msg; +use crate::msg::{ + ConfigResponse, EndTimeResponse, ExecuteMsg, MintCountResponse, MintPriceResponse, + MintableNumTokensResponse, QueryMsg, StartTimeResponse, TotalMintCountResponse, +}; +use crate::state::{ + increment_token_index, Config, ConfigExtension, CONFIG, MINTABLE_NUM_TOKENS, MINTER_ADDRS, + SG721_ADDRESS, STATUS, TOTAL_MINT_COUNT, +}; +#[cfg(not(feature = "library"))] +use cosmwasm_std::entry_point; +use cosmwasm_std::{ + coin, ensure, to_json_binary, Addr, BankMsg, Binary, Coin, Decimal, Deps, DepsMut, Empty, Env, + Event, MessageInfo, Order, Reply, ReplyOn, StdError, StdResult, Timestamp, WasmMsg, +}; +use cw2::set_contract_version; +use cw_utils::{may_pay, maybe_addr, nonpayable, parse_reply_instantiate_data}; +use open_edition_factory::msg::{OpenEditionMinterCreateMsg, ParamsResponse}; +use open_edition_factory::state::OpenEditionMinterParams; +use open_edition_factory::types::NftMetadataType; +use semver::Version; +use sg1::{checked_fair_burn, ibc_denom_fair_burn}; +use sg2::query::Sg2QueryMsg; +use sg4::{MinterConfig, Status, StatusResponse, SudoMsg}; +use sg721::{ExecuteMsg as Sg721ExecuteMsg, InstantiateMsg as Sg721InstantiateMsg}; +use sg_std::{StargazeMsgWrapper, NATIVE_DENOM}; +use url::Url; +use whitelist_mtree::msg::{ + ConfigResponse as WhitelistConfigResponse, HasMemberResponse, QueryMsg as WhitelistQueryMsg, +}; +pub type Response = cosmwasm_std::Response; +pub type SubMsg = cosmwasm_std::SubMsg; + +// version info for migration info +const CONTRACT_NAME: &str = "crates.io:sg-open-edition-minter"; +const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION"); + +const INSTANTIATE_SG721_REPLY_ID: u64 = 1; + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn instantiate( + deps: DepsMut, + env: Env, + info: MessageInfo, + mut msg: OpenEditionMinterCreateMsg, +) -> Result { + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + + let factory = info.sender.clone(); + + // Make sure the sender is the factory contract + // This will fail if the sender cannot parse a response from the factory contract + let factory_response: ParamsResponse = deps + .querier + .query_wasm_smart(factory.clone(), &Sg2QueryMsg::Params {})?; + let factory_params = factory_response.params; + + // set default status so it can be queried without failing + STATUS.save(deps.storage, &Status::default())?; + + match msg.init_msg.nft_data.nft_data_type { + // If off-chain metadata -> Sanitize base token uri + NftMetadataType::OffChainMetadata => { + let base_token_uri = msg + .init_msg + .nft_data + .token_uri + .as_ref() + .map(|uri| uri.trim().to_string()) + .map_or_else(|| Err(ContractError::InvalidBaseTokenURI {}), Ok)?; + // Token URI must be a valid URL (ipfs, https, etc.) + Url::parse(&base_token_uri).map_err(|_| ContractError::InvalidBaseTokenURI {})?; + msg.init_msg.nft_data.token_uri = Some(base_token_uri); + } + // If on-chain metadata -> make sure that the image data is a valid URL + NftMetadataType::OnChainMetadata => { + let base_img_url = msg + .init_msg + .nft_data + .extension + .as_ref() + .and_then(|ext| ext.image.as_ref().map(|img| img.trim())) + .map(Url::parse) + .transpose()? + .map(|url| url.to_string()); + if let Some(ext) = msg.init_msg.nft_data.extension.as_mut() { + ext.image = base_img_url; + } + } + } + + // Validations/Check at the factory level: + // - Mint price, # of tokens / address, Start & End time, Max Tokens + + // Validate address for the optional whitelist contract + let whitelist_addr = msg + .init_msg + .whitelist + .and_then(|w| deps.api.addr_validate(w.as_str()).ok()); + + if let Some(whitelist) = whitelist_addr.clone() { + // check the whitelist exists + let res: WhitelistConfigResponse = deps + .querier + .query_wasm_smart(whitelist, &WhitelistQueryMsg::Config {})?; + if res.is_active { + return Err(ContractError::WhitelistAlreadyStarted {}); + } + } + + // Use default start trading time if not provided + let mut collection_info = msg.collection_params.info.clone(); + let offset = factory_params.max_trading_offset_secs; + let default_start_time_with_offset = msg.init_msg.start_time.plus_seconds(offset); + if let Some(start_trading_time) = msg.collection_params.info.start_trading_time { + // If trading start time > start_time + offset, return error + if start_trading_time > default_start_time_with_offset { + return Err(ContractError::InvalidStartTradingTime( + start_trading_time, + default_start_time_with_offset, + )); + } + } + let start_trading_time = msg + .collection_params + .info + .start_trading_time + .or(Some(default_start_time_with_offset)); + collection_info.start_trading_time = start_trading_time; + + let config = Config { + factory: factory.clone(), + collection_code_id: msg.collection_params.code_id, + extension: ConfigExtension { + admin: deps + .api + .addr_validate(&msg.collection_params.info.creator)?, + payment_address: maybe_addr(deps.api, msg.init_msg.payment_address)?, + per_address_limit: msg.init_msg.per_address_limit, + start_time: msg.init_msg.start_time, + end_time: msg.init_msg.end_time, + nft_data: msg.init_msg.nft_data, + num_tokens: msg.init_msg.num_tokens, + whitelist: whitelist_addr, + }, + mint_price: msg.init_msg.mint_price, + }; + + CONFIG.save(deps.storage, &config)?; + + // Init the minted tokens count + TOTAL_MINT_COUNT.save(deps.storage, &0)?; + + // Max token count (optional) + if let Some(max_num_tokens) = msg.init_msg.num_tokens { + MINTABLE_NUM_TOKENS.save(deps.storage, &max_num_tokens)?; + } else { + MINTABLE_NUM_TOKENS.save(deps.storage, &factory_params.extension.max_token_limit)?; + } + + // Submessage to instantiate sg721 contract + let submsg = SubMsg { + msg: WasmMsg::Instantiate { + code_id: msg.collection_params.code_id, + msg: to_json_binary(&Sg721InstantiateMsg { + name: msg.collection_params.name.clone(), + symbol: msg.collection_params.symbol, + minter: env.contract.address.to_string(), + collection_info, + })?, + funds: info.funds, + admin: Some(config.extension.admin.to_string()), + label: format!("SG721-{}", msg.collection_params.name.trim()), + } + .into(), + id: INSTANTIATE_SG721_REPLY_ID, + gas_limit: None, + reply_on: ReplyOn::Success, + }; + + Ok(Response::new() + .add_attribute("action", "instantiate") + .add_attribute("contract_name", CONTRACT_NAME) + .add_attribute("contract_version", CONTRACT_VERSION) + .add_attribute("sender", factory) + .add_submessage(submsg)) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn execute( + deps: DepsMut, + env: Env, + info: MessageInfo, + msg: ExecuteMsg, +) -> Result { + match msg { + ExecuteMsg::Mint { + proof_hashes, + allocation, + } => execute_mint_sender(deps, env, info, proof_hashes, allocation), + ExecuteMsg::Purge {} => execute_purge(deps, env, info), + ExecuteMsg::UpdateMintPrice { price } => execute_update_mint_price(deps, env, info, price), + ExecuteMsg::UpdateStartTime(time) => execute_update_start_time(deps, env, info, time), + ExecuteMsg::UpdateEndTime(time) => execute_update_end_time(deps, env, info, time), + ExecuteMsg::UpdateStartTradingTime(time) => { + execute_update_start_trading_time(deps, env, info, time) + } + ExecuteMsg::UpdatePerAddressLimit { per_address_limit } => { + execute_update_per_address_limit(deps, env, info, per_address_limit) + } + ExecuteMsg::MintTo { recipient } => execute_mint_to(deps, env, info, recipient), + ExecuteMsg::SetWhitelist { whitelist } => { + execute_set_whitelist(deps, env, info, &whitelist) + } + ExecuteMsg::BurnRemaining {} => execute_burn_remaining(deps, env, info), + } +} + +// Purge frees data after a mint has ended +// Anyone can purge +pub fn execute_purge( + deps: DepsMut, + env: Env, + info: MessageInfo, +) -> Result { + nonpayable(&info)?; + + // Check if mint has ended (optional) + let end_time = CONFIG.load(deps.storage)?.extension.end_time; + if let Some(end_time_u) = end_time { + if env.block.time <= end_time_u { + return Err(ContractError::MintingHasNotYetEnded {}); + } + } + + // check if sold out before end time (optional) + let mintable_num_tokens = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; + if let Some(mintable_nb_tokens) = mintable_num_tokens { + if mintable_nb_tokens != 0 && end_time.is_none() { + return Err(ContractError::NotSoldOut {}); + } + } + + let keys = MINTER_ADDRS + .keys(deps.storage, None, None, Order::Ascending) + .collect::>(); + for key in keys { + MINTER_ADDRS.remove(deps.storage, &key?); + } + + Ok(Response::new() + .add_attribute("action", "purge") + .add_attribute("contract", env.contract.address.to_string()) + .add_attribute("sender", info.sender)) +} + +pub fn execute_set_whitelist( + deps: DepsMut, + env: Env, + info: MessageInfo, + whitelist: &str, +) -> Result { + nonpayable(&info)?; + let mut config = CONFIG.load(deps.storage)?; + let MinterConfig { + factory, + extension: + ConfigExtension { + whitelist: existing_whitelist, + admin, + start_time, + .. + }, + .. + } = config.clone(); + ensure!( + admin == info.sender, + ContractError::Unauthorized("Sender is not an admin".to_owned()) + ); + + ensure!( + env.block.time < start_time, + ContractError::AlreadyStarted {} + ); + + if let Some(whitelist) = existing_whitelist { + let res: WhitelistConfigResponse = deps + .querier + .query_wasm_smart(whitelist, &WhitelistQueryMsg::Config {})?; + + ensure!(!res.is_active, ContractError::WhitelistAlreadyStarted {}); + } + + let new_wl = deps.api.addr_validate(whitelist)?; + config.extension.whitelist = Some(new_wl.clone()); + // check that the new whitelist exists + let WhitelistConfigResponse { + is_active: wl_is_active, + mint_price: wl_mint_price, + .. + } = deps + .querier + .query_wasm_smart(new_wl, &WhitelistQueryMsg::Config {})?; + + ensure!(!wl_is_active, ContractError::WhitelistAlreadyStarted {}); + + ensure!( + wl_mint_price.denom == config.mint_price.denom, + ContractError::InvalidDenom { + expected: config.mint_price.denom, + got: wl_mint_price.denom, + } + ); + + // Whitelist could be free, while factory minimum is not + let ParamsResponse { + params: + OpenEditionMinterParams { + min_mint_price: factory_min_mint_price, + .. + }, + } = deps + .querier + .query_wasm_smart(factory, &Sg2QueryMsg::Params {})?; + + ensure!( + factory_min_mint_price.amount <= wl_mint_price.amount, + ContractError::InsufficientWhitelistMintPrice { + expected: factory_min_mint_price.amount.into(), + got: wl_mint_price.amount.into(), + } + ); + + // Whitelist denom should match factory mint denom + ensure!( + factory_min_mint_price.denom == wl_mint_price.denom, + ContractError::InvalidDenom { + expected: factory_min_mint_price.denom, + got: wl_mint_price.denom, + } + ); + + CONFIG.save(deps.storage, &config)?; + + Ok(Response::default() + .add_attribute("action", "set_whitelist") + .add_attribute("whitelist", whitelist.to_string())) +} + +pub fn execute_mint_sender( + deps: DepsMut, + env: Env, + info: MessageInfo, + proof_hashes: Option>, + allocation: Option, +) -> Result { + let config = CONFIG.load(deps.storage)?; + let action = "mint_sender"; + + // If there is no active whitelist right now, check public mint + let is_public_mint = is_public_mint(deps.as_ref(), &info, proof_hashes, allocation)?; + // Check start and end time (if not optional) + if is_public_mint && (env.block.time < config.extension.start_time) { + return Err(ContractError::BeforeMintStartTime {}); + } + if let Some(end_time) = config.extension.end_time { + if env.block.time >= end_time { + return Err(ContractError::AfterMintEndTime {}); + } + } + + // Check if already minted max per address limit + if matches!(mint_count_per_addr(deps.as_ref(), &info)?, count if count >= config.extension.per_address_limit) + { + return Err(ContractError::MaxPerAddressLimitExceeded {}); + } + + _execute_mint(deps, env, info, action, false, None) +} + +// Check if a whitelist exists and not ended +// Sender has to be whitelisted to mint +fn is_public_mint( + deps: Deps, + info: &MessageInfo, + proof_hashes: Option>, + allocation: Option, +) -> Result { + let config = CONFIG.load(deps.storage)?; + + // If there is no whitelist, there's only a public mint + if config.extension.whitelist.is_none() { + return Ok(true); + } + + let whitelist = config.extension.whitelist.unwrap(); + + let wl_config: WhitelistConfigResponse = deps + .querier + .query_wasm_smart(whitelist.clone(), &WhitelistQueryMsg::Config {})?; + + if !wl_config.is_active { + return Ok(true); + } + + let res: HasMemberResponse = if proof_hashes.is_some() { + deps.querier.query_wasm_smart( + whitelist, + &WhitelistQueryMsg::HasMember { + member: match allocation { + Some(allocation) => format!("{}{}", info.sender, allocation), + None => info.sender.to_string(), + }, + proof_hashes: proof_hashes.unwrap(), + }, + )? + } else { + return Err(ContractError::MissingProofHashes {}); + }; + + if !res.has_member { + return Err(ContractError::NotWhitelisted { + addr: info.sender.to_string(), + }); + } + + // Check wl per address limit + let mint_count = mint_count(deps, info)?; + let max_count = match allocation { + Some(allocation) => allocation, + None => wl_config.per_address_limit, + }; + if mint_count >= max_count { + return Err(ContractError::MaxPerAddressLimitExceeded {}); + } + + Ok(false) +} + +fn mint_count(deps: Deps, info: &MessageInfo) -> Result { + let mint_count = MINTER_ADDRS + .key(&info.sender) + .may_load(deps.storage)? + .unwrap_or(0); + Ok(mint_count) +} + +pub fn execute_mint_to( + deps: DepsMut, + env: Env, + info: MessageInfo, + recipient: String, +) -> Result { + let recipient = deps.api.addr_validate(&recipient)?; + let config = CONFIG.load(deps.storage)?; + let action = "mint_to"; + + // Check only admin + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + + if let Some(end_time) = config.extension.end_time { + if env.block.time >= end_time { + return Err(ContractError::AfterMintEndTime {}); + } + } + + _execute_mint(deps, env, info, action, true, Some(recipient)) +} + +// Generalize checks and mint message creation +// mint -> _execute_mint(recipient: None, token_id: None) +// mint_to(recipient: "friend") -> _execute_mint(Some(recipient), token_id: None) +fn _execute_mint( + deps: DepsMut, + _env: Env, + info: MessageInfo, + action: &str, + is_admin: bool, + recipient: Option, +) -> Result { + let mintable_num_tokens = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; + if let Some(mintable_nb_tokens) = mintable_num_tokens { + if mintable_nb_tokens == 0 { + return Err(ContractError::SoldOut {}); + } + } + let config = CONFIG.load(deps.storage)?; + + let sg721_address = SG721_ADDRESS.load(deps.storage)?; + + let recipient_addr = match recipient { + Some(some_recipient) => some_recipient, + None => info.sender.clone(), + }; + + let mint_price: Coin = mint_price(deps.as_ref(), is_admin)?; + // Exact payment only accepted + let payment = may_pay(&info, &mint_price.denom)?; + if payment != mint_price.amount { + return Err(ContractError::IncorrectPaymentAmount( + coin(payment.u128(), &config.mint_price.denom), + mint_price, + )); + } + + let mut res = Response::new(); + + let factory: ParamsResponse = deps + .querier + .query_wasm_smart(config.factory, &Sg2QueryMsg::Params {})?; + let factory_params = factory.params; + + // Create fee msgs + // Metadata Storage fees -> minting fee will be enabled for on-chain metadata mints + // dev fees are intrinsic in the mint fee (assuming a 50% share) + let mint_fee = if is_admin { + Decimal::bps(factory_params.extension.airdrop_mint_fee_bps) + } else { + Decimal::bps(factory_params.mint_fee_bps) + }; + let network_fee = mint_price.amount * mint_fee; + + // This is for the network fee msg + // send non-native fees to community pool + if mint_price.denom != NATIVE_DENOM { + // only send non-zero amounts + // send portion to dev addr + if !network_fee.is_zero() { + ibc_denom_fair_burn( + coin(network_fee.u128(), mint_price.denom.to_string()), + Some( + deps.api + .addr_validate(&factory_params.extension.dev_fee_address)?, + ), + &mut res, + )?; + } + } else if !network_fee.is_zero() { + checked_fair_burn( + &info, + network_fee.u128(), + Some( + deps.api + .addr_validate(&factory_params.extension.dev_fee_address)?, + ), + &mut res, + )?; + } + + // Token ID to mint + update the config counter + let token_id = increment_token_index(deps.storage)?.to_string(); + + // Create mint msg -> dependents on the NFT data type + let msg = mint_nft_msg( + sg721_address, + token_id.clone(), + recipient_addr.clone(), + match config.extension.nft_data.nft_data_type { + NftMetadataType::OnChainMetadata => config.extension.nft_data.extension, + NftMetadataType::OffChainMetadata => None, + }, + match config.extension.nft_data.nft_data_type { + NftMetadataType::OnChainMetadata => None, + NftMetadataType::OffChainMetadata => config.extension.nft_data.token_uri, + }, + )?; + res = res.add_message(msg); + + // Save the new mint count for the sender's address + let new_mint_count = mint_count_per_addr(deps.as_ref(), &info)? + 1; + MINTER_ADDRS.save(deps.storage, &info.sender, &new_mint_count)?; + + // Update the mint count + TOTAL_MINT_COUNT.update( + deps.storage, + |mut updated_mint_count| -> Result<_, ContractError> { + updated_mint_count += 1u32; + Ok(updated_mint_count) + }, + )?; + + // Update mintable count (optional) + if let Some(mintable_nb_tokens) = mintable_num_tokens { + MINTABLE_NUM_TOKENS.save(deps.storage, &(mintable_nb_tokens - 1))?; + } + + let seller_amount = { + // the net amount is mint price - network fee (mint free + dev fee) + let amount = mint_price.amount.checked_sub(network_fee)?; + let payment_address = config.extension.payment_address; + let seller = config.extension.admin; + // Sending 0 coins fails, so only send if amount is non-zero + if !amount.is_zero() { + let msg = BankMsg::Send { + to_address: payment_address.unwrap_or(seller).to_string(), + amount: vec![coin(amount.u128(), mint_price.clone().denom)], + }; + res = res.add_message(msg); + } + amount + }; + + Ok(res + .add_attribute("action", action) + .add_attribute("sender", info.sender) + .add_attribute("recipient", recipient_addr) + .add_attribute("token_id", token_id) + .add_attribute( + "network_fee", + coin(network_fee.into(), mint_price.clone().denom).to_string(), + ) + .add_attribute("mint_price", mint_price.to_string()) + .add_attribute( + "seller_amount", + coin(seller_amount.into(), mint_price.denom).to_string(), + )) +} + +pub fn execute_update_mint_price( + deps: DepsMut, + env: Env, + info: MessageInfo, + price: u128, +) -> Result { + nonpayable(&info)?; + let mut config = CONFIG.load(deps.storage)?; + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + + if let Some(end_time) = config.extension.end_time { + if env.block.time >= end_time { + return Err(ContractError::AfterMintEndTime {}); + } + } + + // If current time is after the stored start_time, only allow lowering price + if env.block.time >= config.extension.start_time && price >= config.mint_price.amount.u128() { + return Err(ContractError::UpdatedMintPriceTooHigh { + allowed: config.mint_price.amount.u128(), + updated: price, + }); + } + + let factory: ParamsResponse = deps + .querier + .query_wasm_smart(config.clone().factory, &Sg2QueryMsg::Params {})?; + let factory_params = factory.params; + + if factory_params.min_mint_price.amount.u128() > price { + return Err(ContractError::InsufficientMintPrice { + expected: factory_params.min_mint_price.amount.u128(), + got: price, + }); + } + + if config.extension.num_tokens.is_none() { + ensure!(price != 0, ContractError::NoTokenLimitWithZeroMintPrice {}) + } + + config.mint_price = coin(price, config.mint_price.denom); + CONFIG.save(deps.storage, &config)?; + Ok(Response::new() + .add_attribute("action", "update_mint_price") + .add_attribute("sender", info.sender) + .add_attribute("mint_price", config.mint_price.to_string())) +} + +pub fn execute_update_start_time( + deps: DepsMut, + env: Env, + info: MessageInfo, + start_time: Timestamp, +) -> Result { + nonpayable(&info)?; + let mut config = CONFIG.load(deps.storage)?; + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + // If current time is after the stored start time return error + if env.block.time >= config.extension.start_time { + return Err(ContractError::AlreadyStarted {}); + } + + // If current time already passed the new start_time return error + if env.block.time > start_time { + return Err(ContractError::InvalidStartTime(start_time, env.block.time)); + } + + // If the new start_time is after end_time return error + if let Some(end_time) = config.extension.end_time { + if start_time > end_time { + return Err(ContractError::InvalidStartTime(end_time, start_time)); + } + } + + config.extension.start_time = start_time; + CONFIG.save(deps.storage, &config)?; + Ok(Response::new() + .add_attribute("action", "update_start_time") + .add_attribute("sender", info.sender) + .add_attribute("start_time", start_time.to_string())) +} + +pub fn execute_update_end_time( + deps: DepsMut, + env: Env, + info: MessageInfo, + end_time: Timestamp, +) -> Result { + nonpayable(&info)?; + let mut config = CONFIG.load(deps.storage)?; + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + // If current time is after the stored end time return error + if let Some(end_time_u) = config.extension.end_time { + if env.block.time >= end_time_u { + return Err(ContractError::AfterMintEndTime {}); + } + } else { + // Cant define a end time if it was not initially defined to have one + return Err(ContractError::NoEndTimeInitiallyDefined {}); + } + + // If current time already passed the new end_time return error + if env.block.time > end_time { + return Err(ContractError::InvalidEndTime(end_time, env.block.time)); + } + + // If the new end_time if before the start_time return error + if end_time < config.extension.start_time { + return Err(ContractError::InvalidEndTime( + end_time, + config.extension.start_time, + )); + } + + config.extension.end_time = Some(end_time); + CONFIG.save(deps.storage, &config)?; + Ok(Response::new() + .add_attribute("action", "update_end_time") + .add_attribute("sender", info.sender) + .add_attribute("end_time", end_time.to_string())) +} + +pub fn execute_update_start_trading_time( + deps: DepsMut, + env: Env, + info: MessageInfo, + start_time: Option, +) -> Result { + nonpayable(&info)?; + let config = CONFIG.load(deps.storage)?; + let sg721_contract_addr = SG721_ADDRESS.load(deps.storage)?; + + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + + // add custom rules here + let factory_params: ParamsResponse = deps + .querier + .query_wasm_smart(config.factory.clone(), &Sg2QueryMsg::Params {})?; + let default_start_time_with_offset = config + .extension + .start_time + .plus_seconds(factory_params.params.max_trading_offset_secs); + + if let Some(start_trading_time) = start_time { + if env.block.time > start_trading_time { + return Err(ContractError::InvalidStartTradingTime( + env.block.time, + start_trading_time, + )); + } + // If new start_trading_time > old start time + offset , return error + if start_trading_time > default_start_time_with_offset { + return Err(ContractError::InvalidStartTradingTime( + start_trading_time, + default_start_time_with_offset, + )); + } + } + + // execute sg721 contract + let msg = WasmMsg::Execute { + contract_addr: sg721_contract_addr.to_string(), + msg: to_json_binary(&Sg721ExecuteMsg::::UpdateStartTradingTime( + start_time, + ))?, + funds: vec![], + }; + + Ok(Response::new() + .add_attribute("action", "update_start_trading_time") + .add_attribute("sender", info.sender) + .add_message(msg)) +} + +pub fn execute_update_per_address_limit( + deps: DepsMut, + _env: Env, + info: MessageInfo, + per_address_limit: u32, +) -> Result { + nonpayable(&info)?; + let mut config = CONFIG.load(deps.storage)?; + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + + let factory: ParamsResponse = deps + .querier + .query_wasm_smart(config.factory.clone(), &Sg2QueryMsg::Params {})?; + let factory_params = factory.params; + + if per_address_limit == 0 || per_address_limit > factory_params.extension.max_per_address_limit + { + return Err(ContractError::InvalidPerAddressLimit { + max: factory_params.extension.max_per_address_limit, + min: 1, + got: per_address_limit, + }); + } + + config.extension.per_address_limit = per_address_limit; + CONFIG.save(deps.storage, &config)?; + Ok(Response::new() + .add_attribute("action", "update_per_address_limit") + .add_attribute("sender", info.sender) + .add_attribute("limit", per_address_limit.to_string())) +} + +// if admin_no_fee => no fee, +// else if in whitelist => whitelist price +// else => config unit price +pub fn mint_price(deps: Deps, is_admin: bool) -> Result { + let config = CONFIG.load(deps.storage)?; + + if is_admin { + let factory: ParamsResponse = deps + .querier + .query_wasm_smart(config.factory, &Sg2QueryMsg::Params {})?; + let factory_params = factory.params; + if factory_params.extension.airdrop_mint_price.amount.is_zero() { + ensure!( + config.extension.num_tokens.is_some(), + StdError::generic_err( + "Open Edition collections should have a non-zero airdrop price" + ) + ); + } + Ok(coin( + factory_params.extension.airdrop_mint_price.amount.u128(), + factory_params.extension.airdrop_mint_price.denom, + )) + } else { + if config.extension.whitelist.is_none() { + return Ok(config.mint_price.clone()); + } + let whitelist = config.extension.whitelist.unwrap(); + let whitelist_config: WhitelistConfigResponse = deps + .querier + .query_wasm_smart(whitelist, &WhitelistQueryMsg::Config {})?; + + if whitelist_config.is_active { + Ok(whitelist_config.mint_price) + } else { + Ok(config.mint_price.clone()) + } + } +} + +pub fn execute_burn_remaining( + deps: DepsMut, + env: Env, + info: MessageInfo, +) -> Result { + nonpayable(&info)?; + let config = CONFIG.load(deps.storage)?; + // Check only admin + if info.sender != config.extension.admin { + return Err(ContractError::Unauthorized( + "Sender is not an admin".to_owned(), + )); + } + + // check mint if still time to mint + if let Some(end_time) = config.extension.end_time { + if env.block.time <= end_time { + return Err(ContractError::MintingHasNotYetEnded {}); + } + } + + // check mint not sold out + let mintable_num_tokens = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; + if let Some(mintable_nb_tokens) = mintable_num_tokens { + if mintable_nb_tokens == 0 { + return Err(ContractError::SoldOut {}); + } + } + + // Decrement mintable num tokens + if mintable_num_tokens.is_some() { + MINTABLE_NUM_TOKENS.save(deps.storage, &0)?; + } + + let event = Event::new("burn-remaining") + .add_attribute("sender", info.sender) + .add_attribute("tokens_burned", mintable_num_tokens.unwrap().to_string()) + .add_attribute("minter", env.contract.address.to_string()); + Ok(Response::new().add_event(event)) +} + +fn mint_count_per_addr(deps: Deps, info: &MessageInfo) -> Result { + let mint_count = (MINTER_ADDRS.key(&info.sender).may_load(deps.storage)?).unwrap_or(0); + Ok(mint_count) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result { + match msg { + SudoMsg::UpdateStatus { + is_verified, + is_blocked, + is_explicit, + } => update_status(deps, is_verified, is_blocked, is_explicit) + .map_err(|_| ContractError::UpdateStatus {}), + } +} + +/// Only governance can update contract params +pub fn update_status( + deps: DepsMut, + is_verified: bool, + is_blocked: bool, + is_explicit: bool, +) -> StdResult { + let mut status = STATUS.load(deps.storage)?; + status.is_verified = is_verified; + status.is_blocked = is_blocked; + status.is_explicit = is_explicit; + + Ok(Response::new().add_attribute("action", "sudo_update_status")) +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { + match msg { + QueryMsg::Config {} => to_json_binary(&query_config(deps)?), + QueryMsg::Status {} => to_json_binary(&query_status(deps)?), + QueryMsg::StartTime {} => to_json_binary(&query_start_time(deps)?), + QueryMsg::EndTime {} => to_json_binary(&query_end_time(deps)?), + QueryMsg::MintPrice {} => to_json_binary(&query_mint_price(deps)?), + QueryMsg::MintCount { address } => { + to_json_binary(&query_mint_count_per_address(deps, address)?) + } + QueryMsg::TotalMintCount {} => to_json_binary(&query_mint_count(deps)?), + QueryMsg::MintableNumTokens {} => to_json_binary(&query_mintable_num_tokens(deps)?), + } +} + +fn query_config(deps: Deps) -> StdResult { + let config = CONFIG.load(deps.storage)?; + let sg721_address = SG721_ADDRESS.load(deps.storage)?; + + Ok(ConfigResponse { + admin: config.extension.admin.to_string(), + nft_data: config.extension.nft_data, + payment_address: config.extension.payment_address, + per_address_limit: config.extension.per_address_limit, + num_tokens: config.extension.num_tokens, + end_time: config.extension.end_time, + sg721_address: sg721_address.to_string(), + sg721_code_id: config.collection_code_id, + start_time: config.extension.start_time, + mint_price: config.mint_price, + factory: config.factory.to_string(), + whitelist: config.extension.whitelist.map(|w| w.to_string()), + }) +} + +pub fn query_status(deps: Deps) -> StdResult { + let status = STATUS.load(deps.storage)?; + + Ok(StatusResponse { status }) +} + +fn query_mint_count_per_address(deps: Deps, address: String) -> StdResult { + let addr = deps.api.addr_validate(&address)?; + let mint_count = (MINTER_ADDRS.key(&addr).may_load(deps.storage)?).unwrap_or(0); + Ok(MintCountResponse { + address: addr.to_string(), + count: mint_count, + }) +} + +fn query_mint_count(deps: Deps) -> StdResult { + let mint_count = TOTAL_MINT_COUNT.load(deps.storage)?; + Ok(TotalMintCountResponse { count: mint_count }) +} + +fn query_mintable_num_tokens(deps: Deps) -> StdResult { + let count = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; + Ok(MintableNumTokensResponse { count }) +} + +fn query_start_time(deps: Deps) -> StdResult { + let config = CONFIG.load(deps.storage)?; + Ok(StartTimeResponse { + start_time: config.extension.start_time.to_string(), + }) +} + +fn query_end_time(deps: Deps) -> StdResult { + let config = CONFIG.load(deps.storage)?; + let end_time_response = config + .extension + .end_time + .map(|end_time| EndTimeResponse { + end_time: Some(end_time.to_string()), + }) + .unwrap_or(EndTimeResponse { end_time: None }); + + Ok(end_time_response) +} + +fn query_mint_price(deps: Deps) -> StdResult { + let config = CONFIG.load(deps.storage)?; + + let factory: ParamsResponse = deps + .querier + .query_wasm_smart(config.factory, &Sg2QueryMsg::Params {})?; + + let factory_params = factory.params; + + let current_price = mint_price(deps, false)?; + let public_price = config.mint_price.clone(); + let whitelist_price: Option = if let Some(whitelist) = config.extension.whitelist { + let wl_config: WhitelistConfigResponse = deps + .querier + .query_wasm_smart(whitelist, &WhitelistQueryMsg::Config {})?; + Some(wl_config.mint_price) + } else { + None + }; + let airdrop_price = coin( + factory_params.extension.airdrop_mint_price.amount.u128(), + config.mint_price.denom, + ); + Ok(MintPriceResponse { + public_price, + airdrop_price, + whitelist_price, + current_price, + }) +} + +// Reply callback triggered from cw721 contract instantiation +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn reply(deps: DepsMut, _env: Env, msg: Reply) -> Result { + if msg.id != INSTANTIATE_SG721_REPLY_ID { + return Err(ContractError::InvalidReplyID {}); + } + + let reply = parse_reply_instantiate_data(msg); + match reply { + Ok(res) => { + let sg721_address = res.contract_address; + SG721_ADDRESS.save(deps.storage, &Addr::unchecked(sg721_address.clone()))?; + Ok(Response::default() + .add_attribute("action", "instantiate_sg721_reply") + .add_attribute("sg721_address", sg721_address)) + } + Err(_) => Err(ContractError::InstantiateSg721Error {}), + } +} + +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn migrate(deps: DepsMut, _env: Env, _msg: Empty) -> Result { + let current_version = cw2::get_contract_version(deps.storage)?; + if current_version.contract != CONTRACT_NAME { + return Err(StdError::generic_err("Cannot upgrade to a different contract").into()); + } + let version: Version = current_version + .version + .parse() + .map_err(|_| StdError::generic_err("Invalid contract version"))?; + let new_version: Version = CONTRACT_VERSION + .parse() + .map_err(|_| StdError::generic_err("Invalid contract version"))?; + + if version > new_version { + return Err(StdError::generic_err("Cannot upgrade to a previous contract version").into()); + } + // if same version return + if version == new_version { + return Ok(Response::new()); + } + + // set new contract version + set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; + Ok(Response::new()) +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/error.rs b/contracts/minters/open-edition-minter-merkle-wl/src/error.rs new file mode 100644 index 000000000..89af45fc0 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/error.rs @@ -0,0 +1,132 @@ +use cosmwasm_std::{Coin, OverflowError, StdError, Timestamp}; +use cw_utils::PaymentError; +use thiserror::Error; +use url::ParseError; + +use sg1::FeeError; + +#[derive(Error, Debug, PartialEq)] +pub enum ContractError { + #[error("{0}")] + Std(#[from] StdError), + + #[error("{0}")] + Payment(#[from] PaymentError), + + #[error("{0}")] + ParseError(#[from] ParseError), + + #[error("{0}")] + OverflowError(#[from] OverflowError), + + #[error("{0}")] + Fee(#[from] FeeError), + + #[error("Unauthorized: {0}")] + Unauthorized(String), + + #[error("UpdateStatus")] + UpdateStatus {}, + + #[error("Invalid reply ID")] + InvalidReplyID {}, + + #[error("Not enough funds sent")] + NotEnoughFunds {}, + + #[error("TooManyCoins")] + TooManyCoins {}, + + #[error("IncorrectPaymentAmount {0} != {1}")] + IncorrectPaymentAmount(Coin, Coin), + + #[error("InvalidNumTokens {max}, min: 1")] + InvalidNumTokens { max: u32, min: u32 }, + + #[error("Open Edition collections should have a non-zero airdrop price")] + NoTokenLimitWithZeroAirdropPrice {}, + + #[error("Open Edition collections should have a non-zero mint price")] + NoTokenLimitWithZeroMintPrice {}, + + #[error("Sold out")] + SoldOut {}, + + #[error("Not Sold out")] + NotSoldOut {}, + + #[error("MintingHasNotYetEnded")] + MintingHasNotYetEnded {}, + + #[error("InvalidDenom {expected} got {got}")] + InvalidDenom { expected: String, got: String }, + + #[error("Minimum network mint price {expected} got {got}")] + InsufficientMintPrice { expected: u128, got: u128 }, + + #[error("Minimum whitelist mint price {expected} got {got}")] + InsufficientWhitelistMintPrice { expected: u128, got: u128 }, + + #[error("Update price {updated} higher than allowed price {allowed}")] + UpdatedMintPriceTooHigh { allowed: u128, updated: u128 }, + + #[error("Invalid address {addr}")] + InvalidAddress { addr: String }, + + #[error("Invalid token id")] + InvalidTokenId {}, + + #[error("AlreadyStarted")] + AlreadyStarted {}, + + #[error("BeforeGenesisTime")] + BeforeGenesisTime {}, + + #[error("WhitelistAlreadyStarted")] + WhitelistAlreadyStarted {}, + + #[error("MissingProofHashes")] + MissingProofHashes {}, + + #[error("InvalidStartTime {0} < {1}")] + InvalidStartTime(Timestamp, Timestamp), + + #[error("InvalidEndTime {0} < {1}")] + InvalidEndTime(Timestamp, Timestamp), + + #[error("InvalidStartTradingTime {0} > {1}")] + InvalidStartTradingTime(Timestamp, Timestamp), + + #[error("Instantiate sg721 error")] + InstantiateSg721Error {}, + + #[error("Invalid base token URI (must be an IPFS URI)")] + InvalidBaseTokenURI {}, + + #[error("address not on whitelist: {addr}")] + NotWhitelisted { addr: String }, + + #[error("Minting has not started yet")] + BeforeMintStartTime {}, + + #[error("No End Time Initially Defined")] + NoEndTimeInitiallyDefined {}, + + #[error("Minting has ended")] + AfterMintEndTime {}, + + #[error("Invalid minting limit per address. max: {max}, min: 1, got: {got}")] + InvalidPerAddressLimit { max: u32, min: u32, got: u32 }, + + #[error("Max minting limit per address exceeded")] + MaxPerAddressLimitExceeded {}, + + #[error("Token id: {token_id} already sold")] + TokenIdAlreadySold { token_id: u32 }, + + #[error("NoEnvTransactionIndex")] + NoEnvTransactionIndex {}, + + #[error("Multiply Fraction Error")] + CheckedMultiplyFractionError {}, +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/helpers.rs b/contracts/minters/open-edition-minter-merkle-wl/src/helpers.rs new file mode 100644 index 000000000..b3bf68d8e --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/helpers.rs @@ -0,0 +1,98 @@ +use cosmwasm_schema::cw_serde; +use cosmwasm_std::{ + to_json_binary, Addr, Coin, ContractInfoResponse, CustomQuery, Empty, Querier, QuerierWrapper, + StdError, StdResult, WasmMsg, WasmQuery, +}; +use cw721_base::Extension; +use sg721::ExecuteMsg as Sg721ExecuteMsg; +use sg_metadata::Metadata; +use sg_std::CosmosMsg; + +use crate::msg::{ConfigResponse, ExecuteMsg, QueryMsg}; + +/// MinterContract is a wrapper around Addr that provides a lot of helpers +/// for working with this. +#[cw_serde] +pub struct MinterContract(pub Addr); + +impl MinterContract { + pub fn addr(&self) -> Addr { + self.0.clone() + } + + pub fn call>(&self, msg: T) -> StdResult { + let msg = to_json_binary(&msg.into())?; + Ok(WasmMsg::Execute { + contract_addr: self.addr().into(), + msg, + funds: vec![], + } + .into()) + } + + pub fn call_with_funds>( + &self, + msg: T, + funds: Coin, + ) -> StdResult { + let msg = to_json_binary(&msg.into())?; + Ok(WasmMsg::Execute { + contract_addr: self.addr().into(), + msg, + funds: vec![funds], + } + .into()) + } + + pub fn contract_info(&self, querier: &Q) -> StdResult + where + Q: Querier, + T: Into, + CQ: CustomQuery, + { + let query = WasmQuery::ContractInfo { + contract_addr: self.addr().into(), + } + .into(); + let res: ContractInfoResponse = QuerierWrapper::::new(querier).query(&query)?; + Ok(res) + } + + pub fn config(&self, querier: &QuerierWrapper) -> StdResult { + let res: ConfigResponse = querier.query_wasm_smart(self.addr(), &QueryMsg::Config {})?; + Ok(res) + } +} + +pub fn mint_nft_msg( + sg721_address: Addr, + token_id: String, + recipient_addr: Addr, + extension: Option, + token_uri: Option, +) -> Result { + let mint_msg = if let Some(extension) = extension { + CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: sg721_address.to_string(), + msg: to_json_binary(&Sg721ExecuteMsg::::Mint { + token_id, + owner: recipient_addr.to_string(), + token_uri: None, + extension, + })?, + funds: vec![], + }) + } else { + CosmosMsg::Wasm(WasmMsg::Execute { + contract_addr: sg721_address.to_string(), + msg: to_json_binary(&Sg721ExecuteMsg::::Mint { + token_id, + owner: recipient_addr.to_string(), + token_uri, + extension: None, + })?, + funds: vec![], + }) + }; + Ok(mint_msg) +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/lib.rs b/contracts/minters/open-edition-minter-merkle-wl/src/lib.rs new file mode 100644 index 000000000..d34586b11 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/lib.rs @@ -0,0 +1,9 @@ +pub use crate::error::ContractError; + +pub mod contract; +mod error; +pub mod msg; + +pub mod helpers; +pub mod state; +pub mod validation; diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/msg.rs b/contracts/minters/open-edition-minter-merkle-wl/src/msg.rs new file mode 100644 index 000000000..91a978f1c --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/msg.rs @@ -0,0 +1,99 @@ +use cosmwasm_schema::cw_serde; +use cosmwasm_std::{Addr, Coin, Timestamp}; + +use open_edition_factory::types::NftData; +use open_edition_factory::{msg::OpenEditionMinterCreateMsg, state::OpenEditionMinterParams}; + +#[cw_serde] +pub struct InstantiateMsg { + pub create_msg: OpenEditionMinterCreateMsg, + pub params: OpenEditionMinterParams, +} + +#[cw_serde] +pub enum ExecuteMsg { + Mint { + proof_hashes: Option>, + allocation: Option, + }, + SetWhitelist { + whitelist: String, + }, + Purge {}, + UpdateMintPrice { + price: u128, + }, + UpdateStartTime(Timestamp), + UpdateEndTime(Timestamp), + /// Runs custom checks against TradingStartTime on VendingMinter, then updates by calling sg721-base + UpdateStartTradingTime(Option), + UpdatePerAddressLimit { + per_address_limit: u32, + }, + MintTo { + recipient: String, + }, + BurnRemaining {}, +} + +#[cw_serde] +pub enum QueryMsg { + Config {}, + StartTime {}, + EndTime {}, + MintPrice {}, + MintCount { address: String }, + TotalMintCount {}, + Status {}, + MintableNumTokens {}, +} + +#[cw_serde] +pub struct ConfigResponse { + pub admin: String, + pub nft_data: NftData, + pub payment_address: Option, + pub per_address_limit: u32, + pub num_tokens: Option, + pub end_time: Option, + pub sg721_address: String, + pub sg721_code_id: u64, + pub start_time: Timestamp, + pub mint_price: Coin, + pub factory: String, + pub whitelist: Option, +} + +#[cw_serde] +pub struct MintableNumTokensResponse { + pub count: Option, +} + +#[cw_serde] +pub struct StartTimeResponse { + pub start_time: String, +} + +#[cw_serde] +pub struct EndTimeResponse { + pub end_time: Option, +} + +#[cw_serde] +pub struct MintPriceResponse { + pub public_price: Coin, + pub airdrop_price: Coin, + pub whitelist_price: Option, + pub current_price: Coin, +} + +#[cw_serde] +pub struct MintCountResponse { + pub address: String, + pub count: u32, +} + +#[cw_serde] +pub struct TotalMintCountResponse { + pub count: u32, +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/state.rs b/contracts/minters/open-edition-minter-merkle-wl/src/state.rs new file mode 100644 index 000000000..84b2b02cb --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/state.rs @@ -0,0 +1,40 @@ +use cosmwasm_schema::cw_serde; +use cosmwasm_std::{Addr, StdResult, Storage, Timestamp}; +use cw_storage_plus::{Item, Map}; + +use open_edition_factory::types::NftData; +use sg4::{MinterConfig, Status}; + +#[cw_serde] +pub struct ConfigExtension { + pub admin: Addr, + pub payment_address: Option, + pub nft_data: NftData, + pub start_time: Timestamp, + pub end_time: Option, + pub per_address_limit: u32, + pub num_tokens: Option, + pub whitelist: Option, +} +pub type Config = MinterConfig; + +pub const CONFIG: Item = Item::new("config"); +pub const SG721_ADDRESS: Item = Item::new("sg721_address"); +pub const MINTER_ADDRS: Map<&Addr, u32> = Map::new("ma"); + +/// This keeps track of the mint count +pub const TOTAL_MINT_COUNT: Item = Item::new("total_mint_count"); + +pub const MINTABLE_NUM_TOKENS: Item = Item::new("mintable_num_tokens"); + +/// Holds the status of the minter. Can be changed with on-chain governance proposals. +pub const STATUS: Item = Item::new("status"); + +/// This keeps track of the token index for the token_ids +pub const TOKEN_INDEX: Item = Item::new("token_index"); + +pub fn increment_token_index(store: &mut dyn Storage) -> StdResult { + let val = TOKEN_INDEX.may_load(store)?.unwrap_or_default() + 1; + TOKEN_INDEX.save(store, &val)?; + Ok(val) +} diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/testing.rs b/contracts/minters/open-edition-minter-merkle-wl/src/testing.rs new file mode 100644 index 000000000..8af010928 --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/testing.rs @@ -0,0 +1,2 @@ +mod setup; +mod tests; diff --git a/contracts/minters/open-edition-minter-merkle-wl/src/validation.rs b/contracts/minters/open-edition-minter-merkle-wl/src/validation.rs new file mode 100644 index 000000000..ee2f08a2a --- /dev/null +++ b/contracts/minters/open-edition-minter-merkle-wl/src/validation.rs @@ -0,0 +1,29 @@ +use cosmwasm_std::Uint128; + +use crate::ContractError; +use crate::ContractError::CheckedMultiplyFractionError; + +pub fn get_three_percent_of_tokens(num_tokens: u32) -> Result { + let three_percent = (Uint128::new(3), Uint128::new(100)); + let three_percent_tokens = Uint128::from(num_tokens) + .checked_mul_ceil(three_percent) + .map_err(|_| CheckedMultiplyFractionError {})?; + Ok(three_percent_tokens) +} + +// Check per address limit to make sure it's <= 1% num tokens +pub fn check_dynamic_per_address_limit( + per_address_limit: u32, + num_tokens: u32, + max_per_address_limit: u32, +) -> Result { + if per_address_limit > max_per_address_limit { + return Ok(false); + } + if num_tokens < 100 { + return Ok(per_address_limit <= 3); + } + let three_percent_tokens = get_three_percent_of_tokens(num_tokens)?; + let result = Uint128::from(per_address_limit) <= three_percent_tokens; + Ok(result) +} diff --git a/contracts/minters/open-edition-minter/src/contract.rs b/contracts/minters/open-edition-minter/src/contract.rs index e7fa409fb..caedb3177 100644 --- a/contracts/minters/open-edition-minter/src/contract.rs +++ b/contracts/minters/open-edition-minter/src/contract.rs @@ -156,6 +156,8 @@ pub fn instantiate( // Max token count (optional) if let Some(max_num_tokens) = msg.init_msg.num_tokens { MINTABLE_NUM_TOKENS.save(deps.storage, &max_num_tokens)?; + } else { + MINTABLE_NUM_TOKENS.save(deps.storage, &factory_params.extension.max_token_limit)?; } // Submessage to instantiate sg721 contract @@ -221,13 +223,6 @@ pub fn execute_purge( info: MessageInfo, ) -> Result { nonpayable(&info)?; - // check if sold out (optional) - let mintable_num_tokens = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; - if let Some(mintable_nb_tokens) = mintable_num_tokens { - if mintable_nb_tokens != 0 { - return Err(ContractError::NotSoldOut {}); - } - } // Check if mint has ended (optional) let end_time = CONFIG.load(deps.storage)?.extension.end_time; @@ -237,6 +232,14 @@ pub fn execute_purge( } } + // check if sold out before end time (optional) + let mintable_num_tokens = MINTABLE_NUM_TOKENS.may_load(deps.storage)?; + if let Some(mintable_nb_tokens) = mintable_num_tokens { + if mintable_nb_tokens != 0 && end_time.is_none() { + return Err(ContractError::NotSoldOut {}); + } + } + let keys = MINTER_ADDRS .keys(deps.storage, None, None, Order::Ascending) .collect::>(); diff --git a/contracts/minters/vending-minter-merkle-wl-featured/src/contract.rs b/contracts/minters/vending-minter-merkle-wl-featured/src/contract.rs index 0ee32c569..008ff1cb5 100644 --- a/contracts/minters/vending-minter-merkle-wl-featured/src/contract.rs +++ b/contracts/minters/vending-minter-merkle-wl-featured/src/contract.rs @@ -218,7 +218,10 @@ pub fn execute( msg: ExecuteMsg, ) -> Result { match msg { - ExecuteMsg::Mint { proof_hashes } => execute_mint_sender(deps, env, info, proof_hashes), + ExecuteMsg::Mint { + proof_hashes, + allocation, + } => execute_mint_sender(deps, env, info, proof_hashes, allocation), ExecuteMsg::Purge {} => execute_purge(deps, env, info), ExecuteMsg::UpdateMintPrice { price } => execute_update_mint_price(deps, env, info, price), ExecuteMsg::UpdateStartTime(time) => execute_update_start_time(deps, env, info, time), @@ -496,21 +499,26 @@ pub fn execute_mint_sender( env: Env, info: MessageInfo, proof_hashes: Option>, + allocation: Option, ) -> Result { let config = CONFIG.load(deps.storage)?; let action = "mint_sender"; // If there is no active whitelist right now, check public mint + let is_public_mint = is_public_mint(deps.as_ref(), &info, proof_hashes, allocation)?; // Check if after start_time - if is_public_mint(deps.as_ref(), &info, proof_hashes)? - && (env.block.time < config.extension.start_time) - { + if is_public_mint && (env.block.time < config.extension.start_time) { return Err(ContractError::BeforeMintStartTime {}); } // Check if already minted max per address limit let mint_count = mint_count(deps.as_ref(), &info)?; - if mint_count >= config.extension.per_address_limit { + + if allocation.is_some() { + if is_public_mint && mint_count >= config.extension.per_address_limit { + return Err(ContractError::MaxPerAddressLimitExceeded {}); + } + } else if mint_count >= config.extension.per_address_limit { return Err(ContractError::MaxPerAddressLimitExceeded {}); } @@ -523,6 +531,7 @@ fn is_public_mint( deps: Deps, info: &MessageInfo, proof_hashes: Option>, + allocation: Option, ) -> Result { let config = CONFIG.load(deps.storage)?; @@ -545,7 +554,10 @@ fn is_public_mint( deps.querier.query_wasm_smart( whitelist, &WhitelistMtreeQueryMsg::HasMember { - member: info.sender.to_string(), + member: match allocation { + Some(allocation) => format!("{}{}", info.sender, allocation), + None => info.sender.to_string(), + }, proof_hashes: proof_hashes.unwrap(), }, )? @@ -566,7 +578,11 @@ fn is_public_mint( // Check wl per address limit let mint_count = mint_count(deps, info)?; - if mint_count >= wl_config.per_address_limit { + let max_count = match allocation { + Some(allocation) => allocation, + None => wl_config.per_address_limit, + }; + if mint_count >= max_count { return Err(ContractError::MaxPerAddressLimitExceeded {}); } diff --git a/contracts/minters/vending-minter-merkle-wl-featured/src/msg.rs b/contracts/minters/vending-minter-merkle-wl-featured/src/msg.rs index 9644543c3..44bc33ebf 100644 --- a/contracts/minters/vending-minter-merkle-wl-featured/src/msg.rs +++ b/contracts/minters/vending-minter-merkle-wl-featured/src/msg.rs @@ -12,6 +12,7 @@ pub struct InstantiateMsg { pub enum ExecuteMsg { Mint { proof_hashes: Option>, + allocation: Option, }, SetWhitelist { whitelist: String, diff --git a/contracts/minters/vending-minter-merkle-wl/src/contract.rs b/contracts/minters/vending-minter-merkle-wl/src/contract.rs index 2906fcad7..4e7ea5770 100644 --- a/contracts/minters/vending-minter-merkle-wl/src/contract.rs +++ b/contracts/minters/vending-minter-merkle-wl/src/contract.rs @@ -218,7 +218,10 @@ pub fn execute( msg: ExecuteMsg, ) -> Result { match msg { - ExecuteMsg::Mint { proof_hashes } => execute_mint_sender(deps, env, info, proof_hashes), + ExecuteMsg::Mint { + proof_hashes, + allocation, + } => execute_mint_sender(deps, env, info, proof_hashes, allocation), ExecuteMsg::Purge {} => execute_purge(deps, env, info), ExecuteMsg::UpdateMintPrice { price } => execute_update_mint_price(deps, env, info, price), ExecuteMsg::UpdateStartTime(time) => execute_update_start_time(deps, env, info, time), @@ -496,21 +499,26 @@ pub fn execute_mint_sender( env: Env, info: MessageInfo, proof_hashes: Option>, + allocation: Option, ) -> Result { let config = CONFIG.load(deps.storage)?; let action = "mint_sender"; // If there is no active whitelist right now, check public mint + let is_public_mint = is_public_mint(deps.as_ref(), &info, proof_hashes, allocation)?; // Check if after start_time - if is_public_mint(deps.as_ref(), &info, proof_hashes)? - && (env.block.time < config.extension.start_time) - { + if is_public_mint && (env.block.time < config.extension.start_time) { return Err(ContractError::BeforeMintStartTime {}); } // Check if already minted max per address limit let mint_count = mint_count(deps.as_ref(), &info)?; - if mint_count >= config.extension.per_address_limit { + + if allocation.is_some() { + if is_public_mint && mint_count >= config.extension.per_address_limit { + return Err(ContractError::MaxPerAddressLimitExceeded {}); + } + } else if mint_count >= config.extension.per_address_limit { return Err(ContractError::MaxPerAddressLimitExceeded {}); } @@ -523,6 +531,7 @@ fn is_public_mint( deps: Deps, info: &MessageInfo, proof_hashes: Option>, + allocation: Option, ) -> Result { let config = CONFIG.load(deps.storage)?; @@ -545,7 +554,10 @@ fn is_public_mint( deps.querier.query_wasm_smart( whitelist, &WhitelistMtreeQueryMsg::HasMember { - member: info.sender.to_string(), + member: match allocation { + Some(allocation) => format!("{}{}", info.sender, allocation), + None => info.sender.to_string(), + }, proof_hashes: proof_hashes.unwrap(), }, )? @@ -566,7 +578,11 @@ fn is_public_mint( // Check wl per address limit let mint_count = mint_count(deps, info)?; - if mint_count >= wl_config.per_address_limit { + let max_count = match allocation { + Some(allocation) => allocation, + None => wl_config.per_address_limit, + }; + if mint_count >= max_count { return Err(ContractError::MaxPerAddressLimitExceeded {}); } diff --git a/contracts/minters/vending-minter-merkle-wl/src/msg.rs b/contracts/minters/vending-minter-merkle-wl/src/msg.rs index 9644543c3..44bc33ebf 100644 --- a/contracts/minters/vending-minter-merkle-wl/src/msg.rs +++ b/contracts/minters/vending-minter-merkle-wl/src/msg.rs @@ -12,6 +12,7 @@ pub struct InstantiateMsg { pub enum ExecuteMsg { Mint { proof_hashes: Option>, + allocation: Option, }, SetWhitelist { whitelist: String, diff --git a/contracts/whitelists/whitelist-merkletree/src/contract.rs b/contracts/whitelists/whitelist-merkletree/src/contract.rs index 17f5cb3ba..30f5a4fe1 100644 --- a/contracts/whitelists/whitelist-merkletree/src/contract.rs +++ b/contracts/whitelists/whitelist-merkletree/src/contract.rs @@ -255,8 +255,6 @@ pub fn query_has_member( member: String, proof_hashes: Vec, ) -> StdResult { - deps.api.addr_validate(&member)?; - let merkle_root = MERKLE_ROOT.load(deps.storage)?; let member_init_hash_slice = Sha256::hash(member.as_bytes()); diff --git a/test-suite/src/open_edition_minter/tests/complete_mint_all_outcomes_validation.rs b/test-suite/src/open_edition_minter/tests/complete_mint_all_outcomes_validation.rs index 71f7a8669..e000958a2 100644 --- a/test-suite/src/open_edition_minter/tests/complete_mint_all_outcomes_validation.rs +++ b/test-suite/src/open_edition_minter/tests/complete_mint_all_outcomes_validation.rs @@ -11,7 +11,7 @@ use open_edition_minter::msg::{ use sg4::StatusResponse; use crate::common_setup::setup_accounts_and_block::{coins_for_msg, setup_block_time}; -use crate::common_setup::setup_minter::common::constants::DEV_ADDRESS; +use crate::common_setup::setup_minter::common::constants::{DEV_ADDRESS, MAX_TOKEN_LIMIT}; use crate::common_setup::setup_minter::open_edition_minter::minter_params::{ default_nft_data, init_msg, }; @@ -93,7 +93,7 @@ fn check_mint_revenues_distribution(num_tokens: Option, end_minter_time: Op .query_wasm_smart(minter_addr.clone(), &query_config_msg) .unwrap(); if end_minter_time.is_some() { - assert_eq!(res.count, None); + assert_eq!(res.count, Some(MAX_TOKEN_LIMIT)); } else { assert_eq!(res.count, Some(5)); } @@ -423,7 +423,7 @@ fn check_mint_revenues_distribution(num_tokens: Option, end_minter_time: Op } #[test] -fn check_mint_revenues_distribution_without_end_time() { +fn check_mint_revenues_distribution_with_end_time() { check_mint_revenues_distribution( None, Some(Timestamp::from_nanos(GENESIS_MINT_START_TIME + 10_000)), @@ -431,6 +431,6 @@ fn check_mint_revenues_distribution_without_end_time() { } #[test] -fn check_mint_revenues_distribution_with_end_time() { +fn check_mint_revenues_distribution_without_end_time() { check_mint_revenues_distribution(Some(5u32), None) }