From cc2e95709b6a69f7f04191ce3420de5da2caf40d Mon Sep 17 00:00:00 2001 From: Dorin Marian Iancu Date: Thu, 11 Jul 2024 11:09:23 +0300 Subject: [PATCH] upgrade --- .github/workflows/actions.yml | 7 +- .../on_pull_request_build_contracts.yml | 14 + .github/workflows/release.yml | 7 +- Cargo.lock | 922 ++++++++---------- launchpad-common/Cargo.toml | 4 +- launchpad-common/src/lib.rs | 1 - launchpad-common/src/ongoing_operation.rs | 2 + launchpad-common/src/random.rs | 2 + launchpad-guaranteed-tickets/Cargo.toml | 8 +- launchpad-guaranteed-tickets/meta/Cargo.toml | 6 +- launchpad-guaranteed-tickets/meta/src/main.rs | 2 +- .../src/guranteed_ticket_winners.rs | 1 + launchpad-guaranteed-tickets/wasm/Cargo.lock | 146 +-- launchpad-guaranteed-tickets/wasm/Cargo.toml | 13 +- launchpad-guaranteed-tickets/wasm/src/lib.rs | 84 +- .../Cargo.toml | 8 +- .../meta/Cargo.toml | 6 +- .../meta/src/main.rs | 3 +- .../simple_lock_mock.rs | 12 +- .../wasm/Cargo.lock | 146 +-- .../wasm/Cargo.toml | 13 +- .../wasm/src/lib.rs | 74 +- launchpad-locked-tokens/Cargo.toml | 8 +- launchpad-locked-tokens/meta/Cargo.toml | 6 +- launchpad-locked-tokens/meta/src/main.rs | 2 +- .../tests/launchpad_locked_tokens_test.rs | 12 +- launchpad-locked-tokens/wasm/Cargo.lock | 146 +-- launchpad-locked-tokens/wasm/Cargo.toml | 13 +- launchpad-locked-tokens/wasm/src/lib.rs | 72 +- .../Cargo.toml | 8 +- .../meta/Cargo.toml | 6 +- .../meta/src/main.rs | 2 +- .../src/guranteed_ticket_winners.rs | 1 + .../migration_guaranteed_tickets_setup/mod.rs | 12 +- .../migration_guaranteed_tickets_test.rs | 351 +++---- .../wasm/Cargo.lock | 146 +-- .../wasm/Cargo.toml | 13 +- .../wasm/src/lib.rs | 74 +- .../Cargo.toml | 10 +- .../meta/Cargo.toml | 6 +- .../meta/src/main.rs | 2 +- .../src/combined_selection.rs | 1 + .../wasm/Cargo.lock | 146 +-- .../wasm/Cargo.toml | 13 +- .../wasm/src/lib.rs | 87 +- launchpad-with-nft/Cargo.toml | 10 +- launchpad-with-nft/meta/Cargo.toml | 6 +- launchpad-with-nft/meta/src/main.rs | 2 +- launchpad-with-nft/wasm/Cargo.lock | 146 +-- launchpad-with-nft/wasm/Cargo.toml | 13 +- launchpad-with-nft/wasm/src/lib.rs | 87 +- launchpad/Cargo.toml | 6 +- launchpad/meta/Cargo.toml | 6 +- launchpad/meta/src/main.rs | 2 +- launchpad/wasm/Cargo.lock | 146 +-- launchpad/wasm/Cargo.toml | 13 +- launchpad/wasm/src/lib.rs | 68 +- 57 files changed, 1258 insertions(+), 1865 deletions(-) create mode 100644 .github/workflows/on_pull_request_build_contracts.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 0badafa..3d651c9 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -8,15 +8,14 @@ on: permissions: checks: write - contents: read pull-requests: write jobs: contracts: name: Contracts - uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2.3.5 + uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.2.0 with: - rust-toolchain: nightly-2023-05-27 - vmtools-version: v1.4.60 + rust-toolchain: stable + enable-contracts-size-report: false secrets: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/on_pull_request_build_contracts.yml b/.github/workflows/on_pull_request_build_contracts.yml new file mode 100644 index 0000000..e35a86a --- /dev/null +++ b/.github/workflows/on_pull_request_build_contracts.yml @@ -0,0 +1,14 @@ +name: On pull request, build contracts + +on: + pull_request: + +permissions: + contents: write + +jobs: + build: + uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v3.2.0 + with: + image_tag: v7.0.0 + package_whole_project_src: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d25526..112b601 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: On release build and attach artifacts +name: On release, build contracts on: release: @@ -9,7 +9,8 @@ permissions: jobs: build: - uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v2.3.5 + uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v3.2.0 with: - image_tag: v5.5.0 + image_tag: v7.0.0 attach_to_existing_release: true + package_whole_project_src: true diff --git a/Cargo.lock b/Cargo.lock index 32dc38e..b21c53c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,122 +2,90 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", -] - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" -dependencies = [ - "memchr", + "zerocopy", ] [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] -name = "atty" -version = "0.2.14" +name = "autocfg" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] -name = "autocfg" -version = "1.1.0" +name = "base64" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bech32" @@ -127,9 +95,9 @@ checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -137,7 +105,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", "generic-array", ] @@ -150,39 +117,11 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "bstr" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "cc" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" - -[[package]] -name = "cfg-if" -version = "0.1.10" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cfg-if" @@ -192,70 +131,60 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.3.0" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93aae7a4192245f70fe75dd9157fc7b4a5bf53e88d30bd4396f7d8f9284d5acc" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.3.0" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f423e341edefb78c9caba2d9c7f7687d0e72e89df3ce3394554754393ac3990" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", - "bitflags", "clap_lex", - "once_cell", "strsim", ] [[package]] name = "clap_derive" -version = "4.3.0" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "191d9573962933b4027f932c600cd252ce27a8ad5979418fe78e43c07996f27b" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.18", + "syn", ] [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "colored" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" dependencies = [ - "atty", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] -[[package]] -name = "common-path" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" - [[package]] name = "convert_case" version = "0.6.0" @@ -267,9 +196,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -286,9 +215,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "3.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" dependencies = [ "byteorder", "digest 0.9.0", @@ -318,9 +247,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "signature", ] @@ -341,9 +270,9 @@ dependencies = [ [[package]] name = "either" -version = "1.6.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "endian-type" @@ -352,37 +281,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] -name = "errno" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys", -] - -[[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fnv" -version = "1.0.7" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "generic-array" -version = "0.14.5" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -394,70 +302,37 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.2.5" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] - -[[package]] -name = "globset" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" -dependencies = [ - "aho-corasick 0.7.20", - "bstr", - "fnv", - "log", - "regex", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", + "serde", ] [[package]] name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hermit-abi" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hex" @@ -467,80 +342,47 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" - -[[package]] -name = "ignore" -version = "0.4.20" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" -dependencies = [ - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ - "hermit-abi 0.3.1", - "libc", - "windows-sys", + "equivalent", + "hashbrown", + "serde", ] [[package]] -name = "is-terminal" -version = "0.4.7" +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" -dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", - "windows-sys", -] +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" -version = "0.10.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "keccak" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] @@ -551,7 +393,7 @@ version = "0.0.0" dependencies = [ "launchpad-common", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -568,7 +410,7 @@ version = "0.0.0" dependencies = [ "launchpad-common", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-scenario", "num-bigint", ] @@ -579,7 +421,7 @@ version = "0.0.0" dependencies = [ "launchpad-guaranteed-tickets", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -588,7 +430,7 @@ version = "0.0.0" dependencies = [ "launchpad-common", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-scenario", "num-bigint", ] @@ -601,7 +443,7 @@ dependencies = [ "launchpad-guaranteed-tickets", "launchpad-locked-tokens", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-scenario", "num-bigint", ] @@ -612,7 +454,7 @@ version = "0.0.0" dependencies = [ "launchpad-locked-tokens-and-guaranteed-tickets", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -621,7 +463,7 @@ version = "0.0.0" dependencies = [ "launchpad-locked-tokens", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -630,7 +472,7 @@ version = "0.0.0" dependencies = [ "launchpad", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -639,7 +481,7 @@ version = "0.0.0" dependencies = [ "launchpad-common", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-scenario", "num-bigint", ] @@ -650,7 +492,7 @@ version = "0.0.0" dependencies = [ "launchpad-migration-guaranteed-tickets", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -662,7 +504,7 @@ dependencies = [ "launchpad-guaranteed-tickets", "launchpad-with-nft", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", @@ -675,7 +517,7 @@ version = "0.0.0" dependencies = [ "launchpad-nft-and-guaranteed-tickets", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -685,7 +527,7 @@ dependencies = [ "hex", "launchpad-common", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", @@ -698,50 +540,38 @@ version = "0.0.0" dependencies = [ "launchpad-with-nft", "multiversx-sc", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[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.144" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "log" -version = "0.4.18" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518ef76f2f87365916b142844c16d8fefd85039bc5699050210a7778ee1cd1de" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memory_units" -version = "0.4.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "multiversx-chain-scenario-format" -version = "0.19.1" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d2592a441608937c5aebec6732c38e6097f58de1dc9a64d7dbe98e0ab97a3c0" +checksum = "921a66f6db5ffff311e355d42a49fd49baf72d7a6a6215b0484dcd9d8dd512a3" dependencies = [ "bech32", "hex", @@ -749,128 +579,141 @@ dependencies = [ "num-traits", "serde", "serde_json", - "sha3 0.9.1", + "sha3", ] [[package]] name = "multiversx-chain-vm" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c3cbb5b2609eda4d5c5070e8c08441b668440c88763fb41bcf9dfa4fb630cb1" +checksum = "a8d91b6ce610a3ac1272f0813284a3f03a34d55db2f86cddaff357bf651074ee" dependencies = [ - "bech32", + "bitflags", + "colored", "ed25519-dalek", "hex", + "hex-literal", "itertools", - "multiversx-chain-scenario-format", - "multiversx-sc", - "multiversx-sc-meta", + "multiversx-chain-vm-executor", "num-bigint", "num-traits", "rand 0.8.5", "rand_seeder", - "serde", - "serde_json", - "sha2 0.10.6", - "sha3 0.10.8", + "sha2 0.10.8", + "sha3", ] +[[package]] +name = "multiversx-chain-vm-executor" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" + [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown 0.13.2", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", "num-bigint", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", "quote", - "syn 1.0.86", + "syn", ] [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", "quote", "radix_trie", - "syn 1.0.86", + "syn", ] [[package]] -name = "multiversx-sc-meta" -version = "0.41.1" +name = "multiversx-sc-meta-lib" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca81ea694896b732a379dea9457153d04e5e783a1f7e788842c34e4e1560b5ae" +checksum = "eb12232450627cb0e9f3ba9493b0bd7445a40066f0e311e19e84de812bbffd56" dependencies = [ "clap", "colored", - "common-path", "convert_case", "hex", "lazy_static", "multiversx-sc", - "pathdiff", - "ruplacer", "rustc_version", + "semver", "serde", "serde_json", "toml", + "wasmparser", + "wasmprinter", ] [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-scenario" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cd84767e9e06589412cbfb572bee7dbead1eb9be6d1a0204619503f5f7d3dd0" +checksum = "6b7a5e1289d021c89c44688d77110d78edf83ea52b2eff40481a8119ad2f0411" dependencies = [ + "base64", + "bech32", "colored", "hex", "itertools", + "log", + "multiversx-chain-scenario-format", "multiversx-chain-vm", + "multiversx-chain-vm-executor", + "multiversx-sc", + "multiversx-sc-meta-lib", + "num-bigint", "num-traits", "pathdiff", "serde", "serde_json", - "sha2 0.10.6", + "sha2 0.10.8", + "unwrap-infallible", ] [[package]] @@ -884,45 +727,43 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.17.2" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[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 = "pathdiff" @@ -932,24 +773,24 @@ checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -985,7 +826,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha 0.3.1", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1005,7 +846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -1019,11 +860,11 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.5", + "getrandom 0.2.15", ] [[package]] @@ -1041,39 +882,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "regex" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81ca098a9821bd52d6b24fd8b10bd081f47d39c22778cafaa75a2857a62c6390" -dependencies = [ - "aho-corasick 1.0.1", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78" - -[[package]] -name = "ruplacer" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1001b63b19333d7a462006c7d281a43ce5c1b3c44cd2a9696ab54b8e9aa7e388" -dependencies = [ - "Inflector", - "anyhow", - "atty", - "clap", - "colored", - "ignore", - "regex", + "rand_core 0.6.4", ] [[package]] @@ -1085,72 +894,58 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.37.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys", - "windows-sys", -] - [[package]] name = "ryu" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" - -[[package]] -name = "same-file" -version = "1.0.6" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "semver" -version = "1.0.6" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 1.0.86", + "syn", ] [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + [[package]] name = "sha2" version = "0.9.9" @@ -1158,7 +953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -1166,27 +961,15 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - [[package]] name = "sha3" version = "0.10.8" @@ -1199,111 +982,112 @@ dependencies = [ [[package]] name = "signature" -version = "1.5.0" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "1.0.86" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] -name = "syn" -version = "2.0.18" +name = "termcolor" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "winapi-util", ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "toml" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.86", - "unicode-xid", + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] -name = "thread_local" -version = "1.1.7" +name = "toml_datetime" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ - "cfg-if 1.0.0", - "once_cell", + "serde", ] [[package]] -name = "toml" -version = "0.5.8" +name = "toml_edit" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] [[package]] name = "typenum" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] -name = "unicode-xid" -version = "0.2.2" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "version_check" @@ -1311,16 +1095,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -1329,136 +1103,228 @@ checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] -name = "wee_alloc" -version = "0.4.5" +name = "wasmparser" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" +checksum = "8d28bc49ba1e5c5b61ffa7a2eace10820443c4b7d1c0b144109261d14570fdf8" dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", + "ahash", + "bitflags", + "hashbrown", + "indexmap", + "semver", + "serde", ] [[package]] -name = "winapi" -version = "0.3.9" +name = "wasmprinter" +version = "0.212.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "dfac65326cc561112af88c3028f6dfdb140acff67ede33a8e86be2dc6b8956f7" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "anyhow", + "termcolor", + "wasmparser", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "winapi-util" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] -name = "winapi-util" -version = "0.1.5" +name = "windows-sys" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "winapi", + "windows-targets 0.48.5", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-sys" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] [[package]] -name = "windows-sys" -version = "0.48.0" +name = "windows-targets" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows-targets", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "zeroize" -version = "1.3.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.86", - "synstructure", + "syn", ] diff --git a/launchpad-common/Cargo.toml b/launchpad-common/Cargo.toml index b977c75..aa58e29 100644 --- a/launchpad-common/Cargo.toml +++ b/launchpad-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" [dependencies.multiversx-sc-modules] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-common/src/lib.rs b/launchpad-common/src/lib.rs index 0791681..db2dca3 100644 --- a/launchpad-common/src/lib.rs +++ b/launchpad-common/src/lib.rs @@ -1,5 +1,4 @@ #![no_std] -#![feature(trait_alias)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/launchpad-common/src/ongoing_operation.rs b/launchpad-common/src/ongoing_operation.rs index c4e3b7c..cbf36ec 100644 --- a/launchpad-common/src/ongoing_operation.rs +++ b/launchpad-common/src/ongoing_operation.rs @@ -1,6 +1,8 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); +use multiversx_sc::api::CryptoApi; + use crate::{random::Random, FIRST_TICKET_ID}; const MIN_GAS_TO_SAVE_PROGRESS: u64 = 10_000_000; diff --git a/launchpad-common/src/random.rs b/launchpad-common/src/random.rs index 317d11c..580889d 100644 --- a/launchpad-common/src/random.rs +++ b/launchpad-common/src/random.rs @@ -1,3 +1,5 @@ +use multiversx_sc::api::{CryptoApi, CryptoApiImpl}; + multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/launchpad-guaranteed-tickets/Cargo.toml b/launchpad-guaranteed-tickets/Cargo.toml index fde6fb5..ed8aed2 100644 --- a/launchpad-guaranteed-tickets/Cargo.toml +++ b/launchpad-guaranteed-tickets/Cargo.toml @@ -12,13 +12,13 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-guaranteed-tickets/meta/Cargo.toml b/launchpad-guaranteed-tickets/meta/Cargo.toml index 47bad9c..8f97705 100644 --- a/launchpad-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-guaranteed-tickets/meta/src/main.rs b/launchpad-guaranteed-tickets/meta/src/main.rs index d300f83..4a62d3e 100644 --- a/launchpad-guaranteed-tickets/meta/src/main.rs +++ b/launchpad-guaranteed-tickets/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad-guaranteed-tickets/src/guranteed_ticket_winners.rs b/launchpad-guaranteed-tickets/src/guranteed_ticket_winners.rs index b98ada6..362cfe2 100644 --- a/launchpad-guaranteed-tickets/src/guranteed_ticket_winners.rs +++ b/launchpad-guaranteed-tickets/src/guranteed_ticket_winners.rs @@ -6,6 +6,7 @@ use launchpad_common::{ random::Random, tickets::{TicketRange, WINNING_TICKET}, }; +use multiversx_sc::api::CryptoApi; const VEC_MAPPER_START_INDEX: usize = 1; diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.lock b/launchpad-guaranteed-tickets/wasm/Cargo.lock index 8ef4cc8..735ee08 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -94,48 +62,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -145,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -158,18 +114,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -185,33 +141,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -234,9 +184,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -250,41 +200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.toml b/launchpad-guaranteed-tickets/wasm/Cargo.toml index 31ca040..3e2ab06 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-guaranteed-tickets-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-guaranteed-tickets] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-guaranteed-tickets/wasm/src/lib.rs b/launchpad-guaranteed-tickets/wasm/src/lib.rs index edcc270..3b437cb 100644 --- a/launchpad-guaranteed-tickets/wasm/src/lib.rs +++ b/launchpad-guaranteed-tickets/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 41 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,46 +17,47 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_guaranteed_tickets ( - addTickets - depositLaunchpadTokens - addUsersToBlacklist - removeGuaranteedUsersFromBlacklist - distributeGuaranteedTickets - claimLaunchpadTokens - claimTicketPayment - getUserTicketsStatus - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalLaunchpadTokensDeposited - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens - setUnlockSchedule - getClaimableTokens - getUserTotalClaimableBalance - getUserClaimedBalance - getUnlockSchedule + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + removeGuaranteedUsersFromBlacklist => remove_guaranteed_users_from_blacklist_endpoint + distributeGuaranteedTickets => distribute_guaranteed_tickets_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + getUserTicketsStatus => user_tickets_status + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed + setUnlockSchedule => set_unlock_schedule + getClaimableTokens => compute_claimable_tokens + getUserTotalClaimableBalance => user_total_claimable_balance + getUserClaimedBalance => user_claimed_balance + getUnlockSchedule => unlock_schedule ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml index b635263..cdc6807 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml @@ -18,13 +18,13 @@ path = "../launchpad-locked-tokens" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml index b2652ac..3efbda1 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/meta/src/main.rs b/launchpad-locked-tokens-and-guaranteed-tickets/meta/src/main.rs index 6b5cf5c..50f299a 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/meta/src/main.rs +++ b/launchpad-locked-tokens-and-guaranteed-tickets/meta/src/main.rs @@ -1,3 +1,4 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::( + ); } diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/tests/guaranteed_tickets_setup/simple_lock_mock.rs b/launchpad-locked-tokens-and-guaranteed-tickets/tests/guaranteed_tickets_setup/simple_lock_mock.rs index 49b58df..6ae95d2 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/tests/guaranteed_tickets_setup/simple_lock_mock.rs +++ b/launchpad-locked-tokens-and-guaranteed-tickets/tests/guaranteed_tickets_setup/simple_lock_mock.rs @@ -56,7 +56,11 @@ impl SimpleLockMock { let mut result = Vec::new(); payment.top_encode(&mut result).unwrap(); - api.tx_result_cell.borrow_mut().result_values.push(result); + api.tx_result_cell + .try_lock() + .unwrap() + .result_values + .push(result); return; } @@ -86,7 +90,11 @@ impl SimpleLockMock { ); let mut result = Vec::new(); output_payment.top_encode(&mut result).unwrap(); - api.tx_result_cell.borrow_mut().result_values.push(result); + api.tx_result_cell + .try_lock() + .unwrap() + .result_values + .push(result); } } diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock index 99dd1a7..c1dfcda 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -112,48 +80,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -163,9 +119,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -176,18 +132,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -203,33 +159,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -252,9 +202,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -268,41 +218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml index e61cc4f..349579e 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-locked-tokens-and-guaranteed-tickets-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-locked-tokens-and-guaranteed-tickets] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/src/lib.rs b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/src/lib.rs index 0d4b0aa..dd0966e 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/src/lib.rs +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 36 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,41 +17,42 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_locked_tokens_and_guaranteed_tickets ( - addTickets - depositLaunchpadTokens - addUsersToBlacklist - distributeGuaranteedTickets - claimLaunchpadTokens - claimTicketPayment - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens - getLaunchpadTokensLockPercentage - getLaunchpadTokensUnlockEpoch + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + distributeGuaranteedTickets => distribute_guaranteed_tickets_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed + getLaunchpadTokensLockPercentage => launchpad_tokens_lock_percentage + getLaunchpadTokensUnlockEpoch => launchpad_tokens_unlock_epoch ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/launchpad-locked-tokens/Cargo.toml b/launchpad-locked-tokens/Cargo.toml index 611ad14..031670f 100644 --- a/launchpad-locked-tokens/Cargo.toml +++ b/launchpad-locked-tokens/Cargo.toml @@ -12,13 +12,13 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-locked-tokens/meta/Cargo.toml b/launchpad-locked-tokens/meta/Cargo.toml index 884984c..f7b874a 100644 --- a/launchpad-locked-tokens/meta/Cargo.toml +++ b/launchpad-locked-tokens/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-locked-tokens/meta/src/main.rs b/launchpad-locked-tokens/meta/src/main.rs index 5721bbb..5f7107c 100644 --- a/launchpad-locked-tokens/meta/src/main.rs +++ b/launchpad-locked-tokens/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad-locked-tokens/tests/launchpad_locked_tokens_test.rs b/launchpad-locked-tokens/tests/launchpad_locked_tokens_test.rs index edcb1a8..01303d9 100644 --- a/launchpad-locked-tokens/tests/launchpad_locked_tokens_test.rs +++ b/launchpad-locked-tokens/tests/launchpad_locked_tokens_test.rs @@ -183,7 +183,11 @@ impl SimpleLockMock { let mut result = Vec::new(); payment.top_encode(&mut result).unwrap(); - api.tx_result_cell.borrow_mut().result_values.push(result); + api.tx_result_cell + .try_lock() + .unwrap() + .result_values + .push(result); return; } @@ -213,7 +217,11 @@ impl SimpleLockMock { ); let mut result = Vec::new(); output_payment.top_encode(&mut result).unwrap(); - api.tx_result_cell.borrow_mut().result_values.push(result); + api.tx_result_cell + .try_lock() + .unwrap() + .result_values + .push(result); } } diff --git a/launchpad-locked-tokens/wasm/Cargo.lock b/launchpad-locked-tokens/wasm/Cargo.lock index b4f7f36..fa21c0f 100644 --- a/launchpad-locked-tokens/wasm/Cargo.lock +++ b/launchpad-locked-tokens/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -94,48 +62,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -145,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -158,18 +114,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -185,33 +141,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -234,9 +184,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -250,41 +200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-locked-tokens/wasm/Cargo.toml b/launchpad-locked-tokens/wasm/Cargo.toml index d97b886..2c32d5b 100644 --- a/launchpad-locked-tokens/wasm/Cargo.toml +++ b/launchpad-locked-tokens/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-locked-tokens-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-locked-tokens] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-locked-tokens/wasm/src/lib.rs b/launchpad-locked-tokens/wasm/src/lib.rs index 5fbddfc..80c87a4 100644 --- a/launchpad-locked-tokens/wasm/src/lib.rs +++ b/launchpad-locked-tokens/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 35 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,40 +17,41 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_locked_tokens ( - addTickets - depositLaunchpadTokens - claimLaunchpadTokens - claimTicketPayment - addUsersToBlacklist - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens - getLaunchpadTokensLockPercentage - getLaunchpadTokensUnlockEpoch + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed + getLaunchpadTokensLockPercentage => launchpad_tokens_lock_percentage + getLaunchpadTokensUnlockEpoch => launchpad_tokens_unlock_epoch ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/launchpad-migration-guaranteed-tickets/Cargo.toml b/launchpad-migration-guaranteed-tickets/Cargo.toml index 2b31188..f0af2fb 100644 --- a/launchpad-migration-guaranteed-tickets/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/Cargo.toml @@ -12,13 +12,13 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml index d99e49d..b76a67d 100644 --- a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-migration-guaranteed-tickets/meta/src/main.rs b/launchpad-migration-guaranteed-tickets/meta/src/main.rs index 24f9ce5..a305666 100644 --- a/launchpad-migration-guaranteed-tickets/meta/src/main.rs +++ b/launchpad-migration-guaranteed-tickets/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad-migration-guaranteed-tickets/src/guranteed_ticket_winners.rs b/launchpad-migration-guaranteed-tickets/src/guranteed_ticket_winners.rs index b98ada6..362cfe2 100644 --- a/launchpad-migration-guaranteed-tickets/src/guranteed_ticket_winners.rs +++ b/launchpad-migration-guaranteed-tickets/src/guranteed_ticket_winners.rs @@ -6,6 +6,7 @@ use launchpad_common::{ random::Random, tickets::{TicketRange, WINNING_TICKET}, }; +use multiversx_sc::api::CryptoApi; const VEC_MAPPER_START_INDEX: usize = 1; diff --git a/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_setup/mod.rs b/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_setup/mod.rs index 9fa2563..049284e 100644 --- a/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_setup/mod.rs +++ b/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_setup/mod.rs @@ -31,18 +31,22 @@ pub const TICKET_COST: u64 = 10; pub struct LaunchpadSetup where - LaunchpadBuilder: 'static + Copy + Fn() -> launchpad_migration_guaranteed_tickets::ContractObj, + LaunchpadBuilder: + 'static + Copy + Fn() -> launchpad_migration_guaranteed_tickets::ContractObj, { pub b_mock: BlockchainStateWrapper, pub owner_address: Address, pub participants: Vec
, - pub lp_wrapper: - ContractObjWrapper, LaunchpadBuilder>, + pub lp_wrapper: ContractObjWrapper< + launchpad_migration_guaranteed_tickets::ContractObj, + LaunchpadBuilder, + >, } impl LaunchpadSetup where - LaunchpadBuilder: 'static + Copy + Fn() -> launchpad_migration_guaranteed_tickets::ContractObj, + LaunchpadBuilder: + 'static + Copy + Fn() -> launchpad_migration_guaranteed_tickets::ContractObj, { pub fn new(nr_winning_tickets: usize, lp_builder: LaunchpadBuilder) -> Self { let rust_zero = rust_biguint!(0u64); diff --git a/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_test.rs b/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_test.rs index 9aa4366..2a20fb8 100644 --- a/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_test.rs +++ b/launchpad-migration-guaranteed-tickets/tests/migration_guaranteed_tickets_test.rs @@ -2,10 +2,6 @@ mod migration_guaranteed_tickets_setup; -use migration_guaranteed_tickets_setup::{ - LaunchpadSetup, CLAIM_START_BLOCK, CONFIRM_START_BLOCK, LAUNCHPAD_TOKENS_PER_TICKET, - LAUNCHPAD_TOKEN_ID, MAX_TIER_TICKETS, TICKET_COST, WINNER_SELECTION_START_BLOCK, -}; use launchpad_common::{ config::ConfigModule, setup::SetupModule, @@ -19,6 +15,10 @@ use launchpad_migration_guaranteed_tickets::{ }, LaunchpadMigrationGuaranteedTickets, }; +use migration_guaranteed_tickets_setup::{ + LaunchpadSetup, CLAIM_START_BLOCK, CONFIRM_START_BLOCK, LAUNCHPAD_TOKENS_PER_TICKET, + LAUNCHPAD_TOKEN_ID, MAX_TIER_TICKETS, TICKET_COST, WINNER_SELECTION_START_BLOCK, +}; use multiversx_sc::types::{EgldOrEsdtTokenIdentifier, MultiValueEncoded}; use multiversx_sc_scenario::{managed_address, managed_biguint, rust_biguint}; @@ -512,176 +512,185 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() #[test] fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { - let nr_random_tickets = 1; - let nr_staking_guaranteed_tickets = 2; - let nr_migration_guaranteed_tickets = 2; - let nr_winning_tickets = - nr_random_tickets + nr_staking_guaranteed_tickets + nr_migration_guaranteed_tickets; - let mut lp_setup = LaunchpadSetup::new( - nr_winning_tickets, - launchpad_migration_guaranteed_tickets::contract_obj, - ); - let mut participants = lp_setup.participants.clone(); - - let new_participant = lp_setup - .b_mock - .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64)); - participants.push(new_participant.clone()); - - let second_new_participant = lp_setup - .b_mock - .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); - participants.push(second_new_participant.clone()); - - // add 2 new users with migration guaranteed tickets - lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); - lp_setup - .b_mock - .execute_tx( - &lp_setup.owner_address, - &lp_setup.lp_wrapper, - &rust_biguint!(0), - |sc| { - let mut args = MultiValueEncoded::new(); - args.push((managed_address!(&new_participant), 1, 1, true).into()); - args.push( - ( - managed_address!(&second_new_participant), - MAX_TIER_TICKETS, - MAX_TIER_TICKETS, - true, - ) - .into(), - ); - - sc.add_tickets_endpoint(args); - }, - ) - .assert_ok(); - - lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); - - // user[0] and user[1] will not confirm, so they get filtered - // user[3] confirms only 1 from maximum of 2 allowed tickets - should win by migration guaranteed - lp_setup.confirm(&participants[2], 3).assert_ok(); - lp_setup.confirm(&participants[3], 1).assert_ok(); - lp_setup.confirm(&participants[4], 6).assert_ok(); - - lp_setup - .b_mock - .set_block_nonce(WINNER_SELECTION_START_BLOCK); - - lp_setup.filter_tickets().assert_ok(); - - lp_setup.select_base_winners_mock(2).assert_ok(); - - // distribute guaranteed tickets - lp_setup - .b_mock - .execute_tx( - &lp_setup.owner_address, - &lp_setup.lp_wrapper, - &rust_biguint!(0), - |sc| { - sc.distribute_guaranteed_tickets_endpoint(); - } - ) - .assert_ok(); - - lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); - - // check EGLD balances of participants before they claim - let base_user_balance = rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64); - lp_setup.b_mock.check_egld_balance(&participants[0], &base_user_balance); - lp_setup.b_mock.check_egld_balance(&participants[1], &base_user_balance); - lp_setup.b_mock.check_egld_balance(&participants[2], &(&base_user_balance - TICKET_COST * 3)); - lp_setup.b_mock.check_egld_balance(&participants[3], &(&base_user_balance - TICKET_COST)); - lp_setup.b_mock.check_egld_balance(&participants[4], &(&base_user_balance * 2_u64 - TICKET_COST * 6)); - - // check launchpad tokens balances of participants before they claim - for p in participants.iter() { + let nr_random_tickets = 1; + let nr_staking_guaranteed_tickets = 2; + let nr_migration_guaranteed_tickets = 2; + let nr_winning_tickets = + nr_random_tickets + nr_staking_guaranteed_tickets + nr_migration_guaranteed_tickets; + let mut lp_setup = LaunchpadSetup::new( + nr_winning_tickets, + launchpad_migration_guaranteed_tickets::contract_obj, + ); + let mut participants = lp_setup.participants.clone(); + + let new_participant = lp_setup + .b_mock + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64)); + participants.push(new_participant.clone()); + + let second_new_participant = lp_setup + .b_mock + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); + participants.push(second_new_participant.clone()); + + // add 2 new users with migration guaranteed tickets + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut args = MultiValueEncoded::new(); + args.push((managed_address!(&new_participant), 1, 1, true).into()); + args.push( + ( + managed_address!(&second_new_participant), + MAX_TIER_TICKETS, + MAX_TIER_TICKETS, + true, + ) + .into(), + ); + + sc.add_tickets_endpoint(args); + }, + ) + .assert_ok(); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + + // user[0] and user[1] will not confirm, so they get filtered + // user[3] confirms only 1 from maximum of 2 allowed tickets - should win by migration guaranteed + lp_setup.confirm(&participants[2], 3).assert_ok(); + lp_setup.confirm(&participants[3], 1).assert_ok(); + lp_setup.confirm(&participants[4], 6).assert_ok(); + + lp_setup + .b_mock + .set_block_nonce(WINNER_SELECTION_START_BLOCK); + + lp_setup.filter_tickets().assert_ok(); + + lp_setup.select_base_winners_mock(2).assert_ok(); + + // distribute guaranteed tickets + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + sc.distribute_guaranteed_tickets_endpoint(); + }, + ) + .assert_ok(); + + lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); + + // check EGLD balances of participants before they claim + let base_user_balance = rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64); + lp_setup + .b_mock + .check_egld_balance(&participants[0], &base_user_balance); + lp_setup + .b_mock + .check_egld_balance(&participants[1], &base_user_balance); + lp_setup + .b_mock + .check_egld_balance(&participants[2], &(&base_user_balance - TICKET_COST * 3)); + lp_setup + .b_mock + .check_egld_balance(&participants[3], &(&base_user_balance - TICKET_COST)); + lp_setup.b_mock.check_egld_balance( + &participants[4], + &(&base_user_balance * 2_u64 - TICKET_COST * 6), + ); + + // check launchpad tokens balances of participants before they claim + for p in participants.iter() { + lp_setup + .b_mock + .check_esdt_balance(p, LAUNCHPAD_TOKEN_ID, &rust_biguint!(0)); + } + + // check EGLD and launchpad token balance for the owner before users claim + lp_setup + .b_mock + .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + &lp_setup.owner_address, + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), + ); + + // 1st and 2nd participants have not confirmed anything. So they should not be able to claim anything. + + lp_setup + .claim_user(&participants[0]) + .assert_error(4, "You have no tickets"); + + lp_setup + .claim_user(&participants[1]) + .assert_error(4, "You have no tickets"); + + // 3rd participant claims. + lp_setup.claim_user(&participants[2]).assert_ok(); + + // Out of 3 confirmed tickets, 1 was won, and 2 were refunded. + lp_setup + .b_mock + .check_egld_balance(&participants[2], &rust_biguint!(2 * TICKET_COST)); + + lp_setup.b_mock.check_esdt_balance( + &participants[2], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // 4th participant claims + lp_setup.claim_user(&participants[3]).assert_ok(); + + // Out of 1 confirmed ticket, 1 was won. lp_setup - .b_mock - .check_esdt_balance(p, LAUNCHPAD_TOKEN_ID, &rust_biguint!(0)); - } - - // check EGLD and launchpad token balance for the owner before users claim - lp_setup - .b_mock - .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(0)); - lp_setup - .b_mock - .check_esdt_balance( + .b_mock + .check_egld_balance(&participants[3], &rust_biguint!(2 * TICKET_COST)); + + lp_setup.b_mock.check_esdt_balance( + &participants[3], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(LAUNCHPAD_TOKENS_PER_TICKET), + ); + + //5th participant claims + lp_setup.claim_user(&participants[4]).assert_ok(); + + // Out of 6 confirmed tickets, 3 are winning, 3 are refunded. + lp_setup + .b_mock + .check_egld_balance(&participants[4], &rust_biguint!(3 * TICKET_COST)); + + lp_setup.b_mock.check_esdt_balance( + &participants[4], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(3 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Owner claims. All nr_winning_tickets are sold for EGLD. No launchpad tokens refunded. + lp_setup.claim_owner().assert_ok(); + + lp_setup.b_mock.check_egld_balance( + &lp_setup.owner_address, + &rust_biguint!(TICKET_COST * nr_winning_tickets as u64), + ); + + lp_setup.b_mock.check_esdt_balance( &lp_setup.owner_address, LAUNCHPAD_TOKEN_ID, - &rust_biguint!(0) - ); - - // 1st and 2nd participants have not confirmed anything. So they should not be able to claim anything. - - lp_setup - .claim_user(&participants[0]) - .assert_error(4, "You have no tickets"); - - lp_setup - .claim_user(&participants[1]) - .assert_error(4, "You have no tickets"); - - // 3rd participant claims. - lp_setup.claim_user(&participants[2]).assert_ok(); - - // Out of 3 confirmed tickets, 1 was won, and 2 were refunded. - lp_setup - .b_mock - .check_egld_balance(&participants[2], &rust_biguint!(2 * TICKET_COST)); - - lp_setup.b_mock.check_esdt_balance( - &participants[2], - LAUNCHPAD_TOKEN_ID, - &rust_biguint!(LAUNCHPAD_TOKENS_PER_TICKET), - ); - - // 4th participant claims - lp_setup.claim_user(&participants[3]).assert_ok(); - - // Out of 1 confirmed ticket, 1 was won. - lp_setup - .b_mock - .check_egld_balance(&participants[3], &rust_biguint!(2 * TICKET_COST)); - - lp_setup.b_mock.check_esdt_balance( - &participants[3], - LAUNCHPAD_TOKEN_ID, - &rust_biguint!(LAUNCHPAD_TOKENS_PER_TICKET), - ); - - //5th participant claims - lp_setup.claim_user(&participants[4]).assert_ok(); - - // Out of 6 confirmed tickets, 3 are winning, 3 are refunded. - lp_setup - .b_mock - .check_egld_balance(&participants[4], &rust_biguint!(3 * TICKET_COST)); - - lp_setup.b_mock.check_esdt_balance( - &participants[4], - LAUNCHPAD_TOKEN_ID, - &rust_biguint!(3 * LAUNCHPAD_TOKENS_PER_TICKET), - ); - - // Owner claims. All nr_winning_tickets are sold for EGLD. No launchpad tokens refunded. - lp_setup.claim_owner().assert_ok(); - - lp_setup.b_mock.check_egld_balance( - &lp_setup.owner_address, - &rust_biguint!(TICKET_COST * nr_winning_tickets as u64), - ); - - lp_setup.b_mock.check_esdt_balance( - &lp_setup.owner_address, - LAUNCHPAD_TOKEN_ID, - &rust_biguint!(0), - ); + &rust_biguint!(0), + ); } #[test] diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock index 440c2ab..e47b830 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -94,48 +62,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -145,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -158,18 +114,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -185,33 +141,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -234,9 +184,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -250,41 +200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml index a2555b6..d65a7aa 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-migration-guaranteed-tickets-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-migration-guaranteed-tickets] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-migration-guaranteed-tickets/wasm/src/lib.rs b/launchpad-migration-guaranteed-tickets/wasm/src/lib.rs index d7e1f50..af098ea 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/src/lib.rs +++ b/launchpad-migration-guaranteed-tickets/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 36 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,41 +17,42 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_migration_guaranteed_tickets ( - addTickets - depositLaunchpadTokens - addUsersToBlacklist - removeGuaranteedUsersFromBlacklist - distributeGuaranteedTickets - claimLaunchpadTokens - claimTicketPayment - getUserTicketsStatus - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + removeGuaranteedUsersFromBlacklist => remove_guaranteed_users_from_blacklist_endpoint + distributeGuaranteedTickets => distribute_guaranteed_tickets_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + getUserTicketsStatus => user_tickets_status + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/launchpad-nft-and-guaranteed-tickets/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/Cargo.toml index f71001c..7a84a1f 100644 --- a/launchpad-nft-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/Cargo.toml @@ -18,13 +18,13 @@ path = "../launchpad-with-nft" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" [dependencies.multiversx-sc-modules] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" @@ -32,4 +32,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml index 5d1c15a..bb37113 100644 --- a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-nft-and-guaranteed-tickets/meta/src/main.rs b/launchpad-nft-and-guaranteed-tickets/meta/src/main.rs index a68e748..3afc35c 100644 --- a/launchpad-nft-and-guaranteed-tickets/meta/src/main.rs +++ b/launchpad-nft-and-guaranteed-tickets/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad-nft-and-guaranteed-tickets/src/combined_selection.rs b/launchpad-nft-and-guaranteed-tickets/src/combined_selection.rs index 3cfee7c..b5b7891 100644 --- a/launchpad-nft-and-guaranteed-tickets/src/combined_selection.rs +++ b/launchpad-nft-and-guaranteed-tickets/src/combined_selection.rs @@ -3,6 +3,7 @@ multiversx_sc::derive_imports!(); use launchpad_common::random::Random; use launchpad_guaranteed_tickets::guranteed_ticket_winners::GuaranteedTicketsSelectionOperation; +use multiversx_sc::api::CryptoApi; #[derive(TopDecode, TopEncode)] pub enum CombinedSelectionStep { diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock index 310252d..30dcfc2 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -114,48 +82,36 @@ dependencies = [ "multiversx-sc-modules", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -165,9 +121,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -178,18 +134,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -205,33 +161,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -254,9 +204,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -270,41 +220,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml index 051a5f9..93f0d10 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-nft-and-guaranteed-tickets-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-nft-and-guaranteed-tickets] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/src/lib.rs b/launchpad-nft-and-guaranteed-tickets/wasm/src/lib.rs index 655b42c..f9316b0 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/src/lib.rs +++ b/launchpad-nft-and-guaranteed-tickets/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 42 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,46 +17,48 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_nft_and_guaranteed_tickets ( - addTickets - depositLaunchpadTokens - addUsersToBlacklist - claimLaunchpadTokens - claimTicketPayment - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens - setNftCost - getNftCost - issueMysterySft - createInitialSfts - setTransferRole - confirmNft - hasUserConfirmedNft - hasUserWonNft - secondarySelectionStep - callBack + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed + setNftCost => set_nft_cost + getNftCost => nft_cost + issueMysterySft => issue_mystery_sft + createInitialSfts => create_initial_sfts + setTransferRole => set_transfer_role + confirmNft => confirm_nft + hasUserConfirmedNft => has_user_confirmed_nft + hasUserWonNft => has_user_won_nft + secondarySelectionStep => secondary_selection_step ) } + +multiversx_sc_wasm_adapter::async_callback! { launchpad_nft_and_guaranteed_tickets } diff --git a/launchpad-with-nft/Cargo.toml b/launchpad-with-nft/Cargo.toml index d4d4f69..e8f2717 100644 --- a/launchpad-with-nft/Cargo.toml +++ b/launchpad-with-nft/Cargo.toml @@ -12,13 +12,13 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" [dependencies.multiversx-sc-modules] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" [dev-dependencies] num-bigint = "0.4.2" @@ -26,4 +26,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "0.41.1" +version = "0.51.1" diff --git a/launchpad-with-nft/meta/Cargo.toml b/launchpad-with-nft/meta/Cargo.toml index c5d0d23..36b6b4b 100644 --- a/launchpad-with-nft/meta/Cargo.toml +++ b/launchpad-with-nft/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad-with-nft/meta/src/main.rs b/launchpad-with-nft/meta/src/main.rs index e800c99..6ceb70d 100644 --- a/launchpad-with-nft/meta/src/main.rs +++ b/launchpad-with-nft/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad-with-nft/wasm/Cargo.lock b/launchpad-with-nft/wasm/Cargo.lock index bf08094..28f034c 100644 --- a/launchpad-with-nft/wasm/Cargo.lock +++ b/launchpad-with-nft/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad-common" @@ -95,48 +63,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -146,9 +102,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -159,18 +115,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -186,33 +142,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -235,9 +185,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -251,41 +201,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad-with-nft/wasm/Cargo.toml b/launchpad-with-nft/wasm/Cargo.toml index 488f4ad..dcea519 100644 --- a/launchpad-with-nft/wasm/Cargo.toml +++ b/launchpad-with-nft/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-with-nft-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad-with-nft] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.1" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad-with-nft/wasm/src/lib.rs b/launchpad-with-nft/wasm/src/lib.rs index b4b7033..2a1f43e 100644 --- a/launchpad-with-nft/wasm/src/lib.rs +++ b/launchpad-with-nft/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 42 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,46 +17,48 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad_with_nft ( - addTickets - depositLaunchpadTokens - addUsersToBlacklist - selectNftWinners - claimLaunchpadTokens - claimTicketPayment - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens - setNftCost - getNftCost - issueMysterySft - createInitialSfts - setTransferRole - confirmNft - hasUserConfirmedNft - hasUserWonNft - callBack + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + selectNftWinners => select_nft_winners_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed + setNftCost => set_nft_cost + getNftCost => nft_cost + issueMysterySft => issue_mystery_sft + createInitialSfts => create_initial_sfts + setTransferRole => set_transfer_role + confirmNft => confirm_nft + hasUserConfirmedNft => has_user_confirmed_nft + hasUserWonNft => has_user_won_nft ) } + +multiversx_sc_wasm_adapter::async_callback! { launchpad_with_nft } diff --git a/launchpad/Cargo.toml b/launchpad/Cargo.toml index 95f630b..324b897 100644 --- a/launchpad/Cargo.toml +++ b/launchpad/Cargo.toml @@ -12,7 +12,7 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dev-dependencies.multiversx-sc-meta] -version = "0.41.1" +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad/meta/Cargo.toml b/launchpad/meta/Cargo.toml index 275b310..dab190d 100644 --- a/launchpad/meta/Cargo.toml +++ b/launchpad/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.41.1" +version = "0.51.1" -[dependencies.multiversx-sc-meta] -version = "0.41.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.51.1" diff --git a/launchpad/meta/src/main.rs b/launchpad/meta/src/main.rs index 4460cca..661bd8f 100644 --- a/launchpad/meta/src/main.rs +++ b/launchpad/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/launchpad/wasm/Cargo.lock b/launchpad/wasm/Cargo.lock index 79b4168..c808656 100644 --- a/launchpad/wasm/Cargo.lock +++ b/launchpad/wasm/Cargo.lock @@ -2,22 +2,11 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", -] - [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -27,21 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -49,15 +26,6 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hex" version = "0.4.3" @@ -66,9 +34,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hex-literal" -version = "0.3.4" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "launchpad" @@ -94,48 +62,36 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842795458f7aa56ca04191993628980987baa8558357f708a93514c1b2e9948a" +checksum = "236f7890b2208796df8b5ac73b8572ffaf5e2b1531c7ad549d669328b715b657" dependencies = [ "bitflags", - "hashbrown", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "fcecd449ea708b72f92edaa17158fe4859c1780aed9b52b14de45f26124ccb8b" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "68f7fa25402e5e8054d719951289306fd79e481f7c21b2565b5549b6bc359772" dependencies = [ "hex", "proc-macro2", @@ -145,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99390a0cc0406e86993772bdf16c6be4e990117f939df94a6a6e2f89d18c4983" +checksum = "eb683bc78d0e2eb43c16cac790144f53cc2ab27912aeb1484433895742ce698d" dependencies = [ "hex", "proc-macro2", @@ -158,18 +114,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf2f13e0d94bd5e2d1b0c1b1f31ffe7ef223d396a4b939d46a66c3519557d0a3" +checksum = "16af268784dff8a34cb696605413c325253da793d85f81b00dcb0e66f82963c9" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.41.1" +version = "0.51.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70852439508cfbbc1d92f11210f76c8c1ca2a8869fe8cbd316c2a82518c58249" +checksum = "b2f0d6be22f911ce45427491a9bec94612a1678eab2769dd08c9c9731d13da53" dependencies = [ "multiversx-sc", ] @@ -185,33 +141,27 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] -[[package]] -name = "once_cell" -version = "1.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9670a07f94779e00908f3e686eab508878ebb390ba6e604d3a284c00e8d0487b" - [[package]] name = "proc-macro2" -version = "1.0.59" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aeca18b86b413c660b781aa319e4e2648a3e6f9eadc9b47e9038e6fe9f3451b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.28" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -234,9 +184,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" dependencies = [ "proc-macro2", "quote", @@ -250,41 +200,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "unwrap-infallible" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/launchpad/wasm/Cargo.toml b/launchpad/wasm/Cargo.toml index 14e68ec..42904fa 100644 --- a/launchpad/wasm/Cargo.toml +++ b/launchpad/wasm/Cargo.toml @@ -1,7 +1,12 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "launchpad-wasm" version = "0.0.0" -authors = ["Dorin Marian Iancu "] edition = "2021" publish = false @@ -14,12 +19,16 @@ opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" [dependencies.launchpad] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.41.0" +version = "0.51.1" [workspace] members = ["."] diff --git a/launchpad/wasm/src/lib.rs b/launchpad/wasm/src/lib.rs index 69c76ac..2cd6ee6 100644 --- a/launchpad/wasm/src/lib.rs +++ b/launchpad/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 33 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,38 +17,39 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { launchpad ( - addTickets - depositLaunchpadTokens - claimLaunchpadTokens - claimTicketPayment - addUsersToBlacklist - getLaunchStageFlags - getConfiguration - getLaunchpadTokenId - getLaunchpadTokensPerWinningTicket - getTicketPrice - getNumberOfWinningTickets - getTotalNumberOfWinningTickets - setTicketPrice - setLaunchpadTokensPerWinningTicket - setConfirmationPeriodStartBlock - setWinnerSelectionStartBlock - setClaimStartBlock - getTicketRangeForAddress - getTotalNumberOfTicketsForAddress - getTotalNumberOfTickets - getNumberOfConfirmedTicketsForAddress - filterTickets - selectWinners - getNumberOfWinningTicketsForAddress - getWinningTicketIdsForAddress - setSupportAddress - getSupportAddress - removeUsersFromBlacklist - isUserBlacklisted - confirmTickets - hasUserClaimedTokens + init => init + addTickets => add_tickets_endpoint + depositLaunchpadTokens => deposit_launchpad_tokens_endpoint + claimLaunchpadTokens => claim_launchpad_tokens_endpoint + claimTicketPayment => claim_ticket_payment_endpoint + addUsersToBlacklist => add_users_to_blacklist_endpoint + getLaunchStageFlags => flags + getConfiguration => configuration + getLaunchpadTokenId => launchpad_token_id + getLaunchpadTokensPerWinningTicket => launchpad_tokens_per_winning_ticket + getTicketPrice => ticket_price + getNumberOfWinningTickets => nr_winning_tickets + getTotalLaunchpadTokensDeposited => total_launchpad_tokens_deposited + setTicketPrice => set_ticket_price + setLaunchpadTokensPerWinningTicket => set_launchpad_tokens_per_winning_ticket + setConfirmationPeriodStartBlock => set_confirmation_period_start_block + setWinnerSelectionStartBlock => set_winner_selection_start_block + setClaimStartBlock => set_claim_start_block + getTicketRangeForAddress => get_ticket_range_for_address + getTotalNumberOfTicketsForAddress => get_total_number_of_tickets_for_address + getTotalNumberOfTickets => last_ticket_id + getNumberOfConfirmedTicketsForAddress => nr_confirmed_tickets + filterTickets => filter_tickets + selectWinners => select_winners + getNumberOfWinningTicketsForAddress => get_number_of_winning_tickets_for_address + getWinningTicketIdsForAddress => get_winning_ticket_ids_for_address + setSupportAddress => add_support_address + getSupportAddress => support_address + removeUsersFromBlacklist => remove_users_from_blacklist + isUserBlacklisted => is_user_blacklisted + confirmTickets => confirm_tickets + hasUserClaimedTokens => has_user_claimed ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {}